mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-31 21:21:08 +00:00
Gtk callback stuff.
This commit is contained in:
parent
4d3ee18120
commit
30be3b777f
@ -166,22 +166,20 @@ void nsClipboard::SetTopLevelWidget(GtkWidget* w)
|
||||
|
||||
mWidget = w;
|
||||
|
||||
#if 0
|
||||
// Respond to requests for the selection:
|
||||
gtk_signal_connect(GTK_OBJECT(mWidget),
|
||||
"selection_get",
|
||||
GTK_SIGNAL_FUNC(nsSelectionMgr::SelectionRequestCB),
|
||||
theSelectionMgr);
|
||||
gtk_signal_connect(GTK_OBJECT(mWidget), "selection_get",
|
||||
GTK_SIGNAL_FUNC(nsClipboard::SelectionRequestCB),
|
||||
0);
|
||||
|
||||
// When someone else takes the selection away:
|
||||
gtk_signal_connect(GTK_OBJECT(mWidget), "selection_clear_event",
|
||||
GTK_SIGNAL_FUNC(nsSelectionMgr::SelectionClearCB),
|
||||
theSelectionMgr);
|
||||
GTK_SIGNAL_FUNC(nsClipboard::SelectionClearCB),
|
||||
0);
|
||||
|
||||
// Set up the paste handler:
|
||||
gtk_signal_connect(GTK_OBJECT(mWidget), "selection_received",
|
||||
GTK_SIGNAL_FUNC(nsSelectionMgr::SelectionReceivedCB),
|
||||
theSelectionMgr);
|
||||
GTK_SIGNAL_FUNC(nsClipboard::SelectionReceivedCB),
|
||||
0);
|
||||
|
||||
// Hmm, sometimes we need this, sometimes not. I'm not clear why:
|
||||
// Register all the target types we handle:
|
||||
@ -191,5 +189,4 @@ void nsClipboard::SetTopLevelWidget(GtkWidget* w)
|
||||
// Need to add entries for whatever it is that emacs uses
|
||||
// Need to add entries for XIF and HTML
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -43,10 +43,12 @@ public:
|
||||
// nsIClipboard
|
||||
NS_IMETHOD ForceDataToClipboard();
|
||||
|
||||
void SetTopLevelWidget(GtkWidget* w);
|
||||
|
||||
|
||||
protected:
|
||||
NS_IMETHOD SetNativeClipboardData();
|
||||
NS_IMETHOD GetNativeClipboardData(nsITransferable * aTransferable);
|
||||
void SetTopLevelWidget(GtkWidget* w);
|
||||
|
||||
PRBool mIgnoreEmptyNotification;
|
||||
|
||||
@ -54,6 +56,20 @@ protected:
|
||||
nsITransferable *mTransferable;
|
||||
nsIWidget *mWindow;
|
||||
GtkWidget *mWidget;
|
||||
|
||||
private:
|
||||
static void SelectionRequestCB( GtkWidget *widget,
|
||||
GtkSelectionData *selection_data,
|
||||
guint info,
|
||||
guint time,
|
||||
gpointer data );
|
||||
static void SelectionClearCB( GtkWidget *widget,
|
||||
GdkEventSelection *event,
|
||||
gpointer data );
|
||||
static void SelectionReceivedCB(GtkWidget *aWidget,
|
||||
GtkSelectionData *aSelectionData,
|
||||
gpointer aData);
|
||||
|
||||
};
|
||||
|
||||
#endif // nsClipboard_h__
|
||||
|
Loading…
Reference in New Issue
Block a user