1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
Selections
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2002-11-29 23:08:54 +00:00
|
|
|
Functions for handling inter-process communication via selections
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
|
|
|
|
<para>
|
2000-09-14 16:39:16 +00:00
|
|
|
The selection mechanism provides the basis for different types
|
Doc typo fix. (#68172)
* gtk/gtksocket.c (gtk_socket_get_id): Doc typo fix. (#68172)
* gtk/gtktreemodel.c (gtk_tree_path_is_descendant): Fix docs.
* gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Document.
* gtk/gtkwindow.c (gtk_window_remove_accel_group): Fix docs.
* gtk/gtkrc.c (gtk_rc_get_style_by_paths),
gtk/gtkwidget.c (gtk_widget_get_toplevel,
gtk_widget_push_composite_child), gtk/gtkdialog.c
(gtk_dialog_new_with_buttons, gtk_dialog_run): Keep gtk-doc
from messing up the indentation of inline examples.
* gtk/gtkmain.c, gtk/gtkrc.c: Consistently call g_getenv()
instead of getenv().
* gtk/gtktreemodel.c, gtk/gtkaccelgroup.c, gtk/gtkclipboard.c,
gtk/gtkdnd.c, gtk/gtkiconfactory.c, gtk/gtkrc.c,
gtk/gtkstyle.c, gtk/gtkselection.c: Doc fixes.
* gtk/gtkaccelmap.c (gtk_accel_map_add_filter,
gtk_accel_map_foreach_unfiltered, gtk_accel_map_load_scanner):
Document.
* gtk/tmpl/gtksocket.sgml: Mention gtk_socket_get_id()
instead of GTK_WINDOW_XWINDOW(). (#68172)
* gtk/gtk-sections.txt: Move functions which are documented
as "private" or "internal" into Private subsections.
* gtk/tmpl/gtkdnd.sgml, gtk/tmpl/gtkobject.sgml,
gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtktooltips.sgml,
gtk/tmpl/gtkwidget.sgml, gtk/tmpl/gtkclipboard.sgml,
gtk/tmpl/gtkstyle.sgml, gtk/tmpl/gtkselection.sgml,
gtk/tmpl/gtkfeatures.sgml: Minor markup fixes.
* gtk/tmpl/gtksignal.sgml: Add link to GLib signal docs.
* gtk/tmpl/gtkpreview.sgml, gtk/tmpl/gtktext.sgml,
gtk/tmpl/gtktree.sgml: Remove "deprecated" from short desc.
* gtk/tmpl/gtkrc.sgml: Correct names of default RC files.
2002-01-08 00:04:57 +00:00
|
|
|
of communication between processes. In particular, drag and drop and
|
2000-09-14 16:39:16 +00:00
|
|
|
#GtkClipboard work via selections. You will very seldom or
|
|
|
|
never need to use most of the functions in this section directly;
|
|
|
|
#GtkClipboard provides a nicer interface to the same functionality.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Some of the datatypes defined this section are used in
|
|
|
|
the #GtkClipboard and drag-and-drop API's as well. The
|
|
|
|
#GtkTargetEntry structure and #GtkTargetList objects represent
|
|
|
|
lists of data types that are supported when sending or
|
|
|
|
receiving data. The #GtkSelectionData object is used to
|
|
|
|
store a chunk of data along with the data type and other
|
|
|
|
associated information.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
2000-09-14 16:39:16 +00:00
|
|
|
<variablelist>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>#GtkWidget</term>
|
|
|
|
<listitem><para>Much of the operation of selections happens via
|
|
|
|
signals for #GtkWidget. In particular, if you are
|
|
|
|
using the functions in this section, you may need
|
|
|
|
to pay attention to ::selection_get,
|
|
|
|
::selection_received, and :selection_clear_event
|
|
|
|
signals.</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2005-04-01 21:20:58 +00:00
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
|
|
|
2010-05-08 05:18:53 +00:00
|
|
|
<!-- ##### SECTION Image ##### -->
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### STRUCT GtkTargetEntry ##### -->
|
|
|
|
<para>
|
|
|
|
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.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@target:
|
|
|
|
@flags:
|
|
|
|
@info:
|
|
|
|
|
|
|
|
<!-- ##### STRUCT GtkTargetList ##### -->
|
|
|
|
<para>
|
|
|
|
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.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@list:
|
|
|
|
@ref_count:
|
|
|
|
|
|
|
|
<!-- ##### STRUCT GtkTargetPair ##### -->
|
|
|
|
<para>
|
|
|
|
Internally used structure in the drag-and-drop and
|
|
|
|
selection handling code.
|
1999-08-17 13:10:00 +00:00
|
|
|
</para>
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
@target:
|
|
|
|
@flags:
|
|
|
|
@info:
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_target_list_new ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2005-05-02 16:17:12 +00:00
|
|
|
@targets:
|
2005-06-20 22:06:27 +00:00
|
|
|
@ntargets:
|
2005-05-02 16:17:12 +00:00
|
|
|
@Returns:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_target_list_ref ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
@list:
|
2006-05-05 16:21:19 +00:00
|
|
|
@Returns:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_target_list_unref ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2005-05-02 16:17:12 +00:00
|
|
|
@list:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_target_list_add ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
@list:
|
|
|
|
@target:
|
2005-05-02 16:17:12 +00:00
|
|
|
@flags:
|
|
|
|
@info:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_target_list_add_table ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2005-05-02 16:17:12 +00:00
|
|
|
@list:
|
|
|
|
@targets:
|
|
|
|
@ntargets:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2004-07-18 15:14:05 +00:00
|
|
|
<!-- ##### FUNCTION gtk_target_list_add_text_targets ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@list:
|
2004-10-24 07:05:00 +00:00
|
|
|
@info:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_target_list_add_image_targets ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@list:
|
|
|
|
@info:
|
|
|
|
@writable:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_target_list_add_uri_targets ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@list:
|
|
|
|
@info:
|
2004-07-18 15:14:05 +00:00
|
|
|
|
|
|
|
|
2006-05-05 16:21:19 +00:00
|
|
|
<!-- ##### FUNCTION gtk_target_list_add_rich_text_targets ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@list:
|
|
|
|
@info:
|
|
|
|
@deserializable:
|
|
|
|
@buffer:
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_target_list_remove ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
@list:
|
|
|
|
@target:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_target_list_find ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
@list:
|
2005-05-02 16:17:12 +00:00
|
|
|
@target:
|
|
|
|
@info:
|
|
|
|
@Returns:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2006-05-05 16:21:19 +00:00
|
|
|
<!-- ##### FUNCTION gtk_target_table_free ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@targets:
|
|
|
|
@n_targets:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_target_table_new_from_list ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@list:
|
|
|
|
@n_targets:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_selection_owner_set ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2002-05-14 20:55:22 +00:00
|
|
|
@widget:
|
|
|
|
@selection:
|
2002-11-08 19:41:50 +00:00
|
|
|
@time_:
|
2002-05-14 20:55:22 +00:00
|
|
|
@Returns:
|
2002-04-30 18:16:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_owner_set_for_display ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@display:
|
|
|
|
@widget:
|
|
|
|
@selection:
|
2002-11-08 19:41:50 +00:00
|
|
|
@time_:
|
2002-04-30 18:16:14 +00:00
|
|
|
@Returns:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_add_target ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
@widget:
|
2005-05-02 16:17:12 +00:00
|
|
|
@selection:
|
|
|
|
@target:
|
|
|
|
@info:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_add_targets ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
@widget:
|
|
|
|
@selection:
|
2005-05-02 16:17:12 +00:00
|
|
|
@targets:
|
2005-06-20 22:06:27 +00:00
|
|
|
@ntargets:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2000-11-14 16:36:20 +00:00
|
|
|
<!-- ##### FUNCTION gtk_selection_clear_targets ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@widget:
|
|
|
|
@selection:
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_selection_convert ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
@widget:
|
2005-05-02 16:17:12 +00:00
|
|
|
@selection:
|
|
|
|
@target:
|
|
|
|
@time_:
|
|
|
|
@Returns: x
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_data_set ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
2005-05-02 16:17:12 +00:00
|
|
|
@type:
|
2005-06-20 22:06:27 +00:00
|
|
|
@format:
|
2005-05-02 16:17:12 +00:00
|
|
|
@data:
|
|
|
|
@length:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2000-11-14 16:36:20 +00:00
|
|
|
<!-- ##### FUNCTION gtk_selection_data_set_text ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@str:
|
2001-11-01 00:06:32 +00:00
|
|
|
@len:
|
2000-11-14 16:36:20 +00:00
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_data_get_text ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2004-10-24 07:05:00 +00:00
|
|
|
<!-- ##### FUNCTION gtk_selection_data_set_pixbuf ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@pixbuf:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_data_get_pixbuf ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_data_set_uris ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@uris:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_data_get_uris ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2001-11-21 21:43:47 +00:00
|
|
|
<!-- ##### FUNCTION gtk_selection_data_get_targets ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@targets:
|
|
|
|
@n_atoms:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2004-11-12 17:52:08 +00:00
|
|
|
<!-- ##### FUNCTION gtk_selection_data_targets_include_image ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@writable:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2001-11-21 21:43:47 +00:00
|
|
|
<!-- ##### FUNCTION gtk_selection_data_targets_include_text ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2005-09-13 12:19:07 +00:00
|
|
|
<!-- ##### FUNCTION gtk_selection_data_targets_include_uri ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2006-05-05 16:21:19 +00:00
|
|
|
<!-- ##### FUNCTION gtk_selection_data_targets_include_rich_text ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@buffer:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2009-01-01 22:24:56 +00:00
|
|
|
<!-- ##### FUNCTION gtk_selection_data_get_selection ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2008-07-22 00:39:10 +00:00
|
|
|
<!-- ##### FUNCTION gtk_selection_data_get_data ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
2008-09-04 16:56:51 +00:00
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_data_get_length ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
2008-07-22 00:39:10 +00:00
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_data_get_data_type ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_data_get_display ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_data_get_format ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_data_get_target ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection_data:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2005-09-13 12:19:07 +00:00
|
|
|
<!-- ##### FUNCTION gtk_targets_include_image ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@targets:
|
|
|
|
@n_targets:
|
|
|
|
@writable:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_targets_include_text ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@targets:
|
|
|
|
@n_targets:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_targets_include_uri ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@targets:
|
|
|
|
@n_targets:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2006-05-05 16:21:19 +00:00
|
|
|
<!-- ##### FUNCTION gtk_targets_include_rich_text ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@targets:
|
|
|
|
@n_targets:
|
|
|
|
@buffer:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2000-10-18 18:42:54 +00:00
|
|
|
<!-- ##### FUNCTION gtk_selection_remove_all ##### -->
|
2000-09-14 16:39:16 +00:00
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
@widget:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_data_copy ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
@data:
|
|
|
|
@Returns:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_selection_data_free ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
@data:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|