Details
struct GtkTargetEntry
struct GtkTargetEntry {
gchar *target;
guint flags;
guint info;
}; |
A GtkTargetEntry structure represents a single type of
data than can be supplied for by a widget for a selection
or for supplied or received during drag-and-drop. It
contains a string representing the drag type, a flags
field (used only for drag and drop - see GtkTargetFlags),
and an application assigned integer ID. The integer
ID will later be passed as a signal parameter for signals
like "selection_get". It allows the application to identify
the target type without extensive string compares.
struct GtkTargetList
struct GtkTargetList {
GList *list;
guint ref_count;
}; |
A GtkTargetList structure is a reference counted list
of GtkTargetPair. It is used to represent the same
information as a table of GtkTargetEntry, but in
an efficient form. This structure should be treated as
opaque.
struct GtkTargetPair
struct GtkTargetPair {
GdkAtom target;
guint flags;
guint info;
}; |
Internally used structure in the drag-and-drop and
selection handling code.
gtk_target_list_ref ()
Increase the reference count of a GtkTargetList by one.
gtk_target_list_unref ()
Decrease the reference count of a GtkTargetList by one.
If the resulting reference count is zero, free the list.
gtk_target_list_add ()
void gtk_target_list_add (GtkTargetList *list,
GdkAtom target,
guint flags,
guint info); |
Add another target to a GtkTargetList
gtk_target_list_add_table ()
Add a table of GtkTargetEntry into a target list
gtk_target_list_remove ()
void gtk_target_list_remove (GtkTargetList *list,
GdkAtom target); |
Remove a target from a target list
gtk_target_list_find ()
gboolean gtk_target_list_find (GtkTargetList *list,
GdkAtom target,
guint *info); |
Look up a given target in a GtkTargetList
gtk_selection_owner_set ()
gint gtk_selection_owner_set (GtkWidget *widget,
GdkAtom selection,
guint32 time); |
Claim ownership of a given selection for a particular widget,
or, if widget is NULL, release ownership of the selection.
gtk_selection_add_target ()
void gtk_selection_add_target (GtkWidget *widget,
GdkAtom selection,
GdkAtom target,
guint info); |
Add specified target to the list of supported targets for a
given widget and selection.
gtk_selection_add_targets ()
void gtk_selection_add_targets (GtkWidget *widget,
GdkAtom selection,
const GtkTargetEntry *targets,
guint ntargets); |
Add a table of targets to the list of supported targets
for a given widget and selection.
gtk_selection_convert ()
gint gtk_selection_convert (GtkWidget *widget,
GdkAtom selection,
GdkAtom target,
guint32 time); |
Request the contents of a selection. When received,
a "selection_received" signal will be generated.
gtk_selection_data_set ()
void gtk_selection_data_set (GtkSelectionData *selection_data,
GdkAtom type,
gint format,
guchar *data,
gint length); |
Store new data into a GtkSelectionData object. Should
_only_ by called from a selection handler callback.
Null terminates the stored data.
gtk_selection_remove_all ()
void gtk_selection_remove_all (GtkWidget *widget); |
Removes all handlers and unsets ownership of all
selections for a widget. Called when widget is being
destroyed. This function will not generally be
called by applications.
gtk_selection_data_copy ()
Make a copy of a GtkSelection data structure and its
data.
gtk_selection_clear ()
gint gtk_selection_clear (GtkWidget *widget,
GdkEventSelection *event); |
Internal function.
gtk_selection_incr_event ()
gint gtk_selection_incr_event (GdkWindow *window,
GdkEventProperty *event); |
Internal function.
gtk_selection_notify ()
gint gtk_selection_notify (GtkWidget *widget,
GdkEventSelection *event); |
Internal function.
gtk_selection_property_notify ()
gint gtk_selection_property_notify (GtkWidget *widget,
GdkEventProperty *event); |
Internal function.
gtk_selection_request ()
gint gtk_selection_request (GtkWidget *widget,
GdkEventSelection *event); |
Internal function.