From b3fcc83a62da80b7763eab6acb34009da1772997 Mon Sep 17 00:00:00 2001 From: GMT 2000 Tony Gale Date: Tue, 5 Dec 2000 13:18:56 +0000 Subject: [PATCH] DND updates Tue Dec 5 13:17:53 GMT 2000 Tony Gale * docs/tutorial/gtk-tut.sgml: DND updates --- ChangeLog | 4 ++ ChangeLog.pre-2-0 | 4 ++ ChangeLog.pre-2-10 | 4 ++ ChangeLog.pre-2-2 | 4 ++ ChangeLog.pre-2-4 | 4 ++ ChangeLog.pre-2-6 | 4 ++ ChangeLog.pre-2-8 | 4 ++ docs/tutorial/gtk-tut.sgml | 117 +++++++++++++++++++++++++------------ 8 files changed, 107 insertions(+), 38 deletions(-) diff --git a/ChangeLog b/ChangeLog index f3891f8cee..6378084be6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Dec 5 13:17:53 GMT 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: DND updates + 2000-12-05 Alexander Larsson * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3): diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index f3891f8cee..6378084be6 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,7 @@ +Tue Dec 5 13:17:53 GMT 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: DND updates + 2000-12-05 Alexander Larsson * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f3891f8cee..6378084be6 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,7 @@ +Tue Dec 5 13:17:53 GMT 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: DND updates + 2000-12-05 Alexander Larsson * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3): diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index f3891f8cee..6378084be6 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,7 @@ +Tue Dec 5 13:17:53 GMT 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: DND updates + 2000-12-05 Alexander Larsson * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f3891f8cee..6378084be6 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,7 @@ +Tue Dec 5 13:17:53 GMT 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: DND updates + 2000-12-05 Alexander Larsson * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f3891f8cee..6378084be6 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,7 @@ +Tue Dec 5 13:17:53 GMT 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: DND updates + 2000-12-05 Alexander Larsson * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f3891f8cee..6378084be6 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,7 @@ +Tue Dec 5 13:17:53 GMT 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: DND updates + 2000-12-05 Alexander Larsson * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3): diff --git a/docs/tutorial/gtk-tut.sgml b/docs/tutorial/gtk-tut.sgml index c4e2222021..d3d9fb6b94 100755 --- a/docs/tutorial/gtk-tut.sgml +++ b/docs/tutorial/gtk-tut.sgml @@ -12871,7 +12871,7 @@ target) come into play only in your request and received data handler functions. The term selection target is somewhat misleading. It is a term adapted from GTK+ selection (cut/copy and paste). What selection target -actually means is the data's format type (ie GdkAtom, integer, or +actually means is the data's format type (i.e. GdkAtom, integer, or string) that being sent or received. Your request data handler function needs to specify the type (selection target) of data that it sends out and your received data handler needs to handle @@ -12884,6 +12884,7 @@ received. Functions + Setting up the source widget @@ -12942,60 +12943,100 @@ void gtk_drag_source_unset( GtkWidget *widget ); + Signals on the source widget: - - drag_begin - prototype: void (*drag_begin)(GtkWidget -*widget, GdkDragContext *dc, gpointer data) - +The source widget is sent the following signals during a +drag-and-drop operation. - drag_motion - prototype gboolean -(*drag_motion)(GtkWidget *widget, GdkDragContext *dc, gint x, gint y, guint t, gpointer data) - - - drag_data_get - prototype void -(*drag_data_get)(GtkWidget *widget, GdkDragContext *dc, GtkSelectionData *selection_data, guint info, guint t, gpointer data) - - - drag_data_delete - prototype void -(*drag_data_delete)(GtkWidget *widget, GdkDragContext *dc, gpointer data) - - - drag_drop - prototype gboolean -(*drag_drop)(GtkWidget *widget, GdkDragContext *dc, gint x, gint y, guint t, gpointer data) - - - drag_end - prototype void (*drag_end)(GtkWidget *widget, GdkDragContext *dc, gpointer data) - - + +Source widget signals + + + + + +drag_begin +void (*drag_begin)(GtkWidget *widget, +GdkDragContext *dc, gpointer data) + + +drag_motion +gboolean (*drag_motion)(GtkWidget *widget, +GdkDragContext *dc, gint x, gint y, guint t, gpointer data) + + +drag_data_get +void (*drag_data_get)(GtkWidget *widget, +GdkDragContext *dc, GtkSelectionData *selection_data, guint info, guint t, gpointer data) + + +drag_data_delete +void (*drag_data_delete)(GtkWidget *widget, +GdkDragContext *dc, gpointer data) + + +drag_drop +gboolean (*drag_drop)(GtkWidget *widget, +GdkDragContext *dc, gint x, gint y, guint t, gpointer data) + + +drag_end +void (*drag_end)(GtkWidget *widget, +GdkDragContext *dc, gpointer data) + + + +
+ Setting up a destination widget: - - gtk_drag_dest_set() specifies -that this widget can recieve drops and specifies what types of drops it -can recieve. - + gtk_drag_dest_set() specifies +that this widget can receive drops and specifies what types of drops it +can receive. - gtk_drag_dest_unset() specifies -that the widget can no longer recieve drops. - - + gtk_drag_dest_unset() specifies +that the widget can no longer receive drops. + + +void gtk_drag_dest_set( GtkWidget *widget, + GtkDestDefaults flags, + const GtkTargetEntry *targets, + gint n_targets, + GdkDragAction actions ); + +void gtk_drag_dest_unset( GtkWidget *widget ); + + Signals on the destination widget: - - drag_data_received - prototype: void (*drag_data_received)(GtkWidget *widget, GdkDragContext - *dc, gint x, gint y, GtkSelectionData *selection_data, guint info, guint t, gpointer data) - - +The destination widget is sent the following signals during a +drag-and-drop operation. + + +Destination widget signals + + + + + +drag_data_received +void (*drag_data_received)(GtkWidget *widget, +GdkDragContext *dc, gint x, gint y, GtkSelectionData *selection_data, guint info, guint t, +gpointer data) + + + +