18.3. Functions

18.3.1. Setting up the source widget

The function gtk_drag_source_set() specifies a set of target types for a drag operation on a widget.

void gtk_drag_source_set( GtkWidget            *widget,
                          GdkModifierType       start_button_mask,
                          const GtkTargetEntry *targets,
                          gint                  n_targets,
                          GdkDragAction         actions );

The parameters signify the following:

The targets parameter is an array of the following structure:

struct GtkTargetEntry {
   gchar *target;
   guint  flags;
   guint  info;
 };

The fields specify a string representing the drag type, optional flags and application assigned integer identifier.

If a widget is no longer required to act as a source for drag-and-drop operations, the function gtk_drag_source_unset() can be used to remove a set of drag-and-drop target types.

void gtk_drag_source_unset( GtkWidget *widget );

18.3.2. Signals on the source widget:

The source widget is sent the following signals during a drag-and-drop operation.

18.3.3. Setting up a destination widget:

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 receive drops.

void gtk_drag_dest_set( GtkWidget            *widget,
                        GtkDests       flags,
                        const GtkTargetEntry *targets,
                        gint                  n_targets,
                        GdkDragAction         actions );

void gtk_drag_dest_unset( GtkWidget *widget );

18.3.4. Signals on the destination widget:

The destination widget is sent the following signals during a drag-and-drop operation.

Bhopal news
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100

India website designer web development India php ecommerce developer | Web design India, Ecommerce web design | India web hosting website host india | Windows hosting India web hosting | Software development India | Flash web designer india