gtk2/docs/reference/gtk/tmpl/gtkselection.sgml

406 lines
6.0 KiB
Plaintext
Raw Normal View History

1999-08-16 18:51:52 +00:00
<!-- ##### SECTION Title ##### -->
Selections
<!-- ##### SECTION Short_Description ##### -->
Functions for handling inter-process communication via selections
1999-08-16 18:51:52 +00:00
<!-- ##### SECTION Long_Description ##### -->
<para>
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
#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>
<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>
<!-- ##### SECTION Stability_Level ##### -->
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.
</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:
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
<!-- ##### FUNCTION gtk_target_list_add_text_targets ##### -->
<para>
</para>
@list:
@info:
<!-- ##### FUNCTION gtk_target_list_add_image_targets ##### -->
<para>
</para>
@list:
@info:
@writable:
<!-- ##### FUNCTION gtk_target_list_add_uri_targets ##### -->
<para>
</para>
@list:
@info:
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
<!-- ##### FUNCTION gtk_selection_owner_set ##### -->
<para>
</para>
@widget:
@selection:
docs/reference/gdk/tmpl/dnd.sgml docs/reference/gdk/tmpl/drawing.sgml Fri Nov 8 20:14:52 2002 Soeren Sandmann <sandmann@daimi.au.dk> * docs/reference/gdk/tmpl/dnd.sgml docs/reference/gdk/tmpl/drawing.sgml docs/reference/gdk/tmpl/gdk-unused.sgml docs/reference/gdk/tmpl/gdkdisplay.sgml docs/reference/gdk/tmpl/general.sgml docs/reference/gdk/tmpl/input_devices.sgml docs/reference/gdk/tmpl/selections.sgml docs/reference/gtk/tmpl/gtkcellrenderer.sgml docs/reference/gtk/tmpl/gtkcurve.sgml docs/reference/gtk/tmpl/gtkdnd.sgml docs/reference/gtk/tmpl/gtkitemfactory.sgml docs/reference/gtk/tmpl/gtkmenu.sgml docs/reference/gtk/tmpl/gtkoldeditable.sgml docs/reference/gtk/tmpl/gtkoptionmenu.sgml docs/reference/gtk/tmpl/gtkpreview.sgml docs/reference/gtk/tmpl/gtkselection.sgml docs/reference/gtk/tmpl/gtksocket.sgml docs/reference/gtk/tmpl/gtkstyle.sgml docs/reference/gtk/tmpl/gtktextbuffer.sgml docs/reference/gtk/tmpl/gtktreemodel.sgml docs/reference/gtk/tmpl/gtkwidget.sgml gdk/gdk.h gdk/gdkdisplay.c gdk/gdkdisplay.h gdk/gdkdnd.h gdk/gdkdraw.c gdk/gdkdrawable.h gdk/gdkinput.h gdk/gdkselection.h gdk/x11/gdkdisplay-x11.c gdk/x11/gdkdnd-x11.c gdk/x11/gdkselection-x11.c gtk/gtkcurve.h gtk/gtkdnd.h gtk/gtkitemfactory.c gtk/gtkitemfactory.h gtk/gtkmenu.h gtk/gtkoldeditable.c gtk/gtkoldeditable.h gtk/gtkoptionmenu.h gtk/gtkplug.c gtk/gtkplug.h gtk/gtkpreview.h gtk/gtkrange.h gtk/gtkselection.c gtk/gtkselection.h gtk/gtksocket.c gtk/gtksocket.h gtk/gtkstyle.c gtk/gtkstyle.h gtk/gtktextlayout.c gtk/gtktextlayout.h gtk/gtktreemodel.c gtk/gtktreemodel.h gtk/gtkwidget.h Trivial s/foo/foo_/ fixes to make gtk.h includable with -Wshadow without warnings. (#91680)
2002-11-08 19:41:50 +00:00
@time_:
@Returns:
<!-- ##### FUNCTION gtk_selection_owner_set_for_display ##### -->
<para>
</para>
@display:
@widget:
@selection:
docs/reference/gdk/tmpl/dnd.sgml docs/reference/gdk/tmpl/drawing.sgml Fri Nov 8 20:14:52 2002 Soeren Sandmann <sandmann@daimi.au.dk> * docs/reference/gdk/tmpl/dnd.sgml docs/reference/gdk/tmpl/drawing.sgml docs/reference/gdk/tmpl/gdk-unused.sgml docs/reference/gdk/tmpl/gdkdisplay.sgml docs/reference/gdk/tmpl/general.sgml docs/reference/gdk/tmpl/input_devices.sgml docs/reference/gdk/tmpl/selections.sgml docs/reference/gtk/tmpl/gtkcellrenderer.sgml docs/reference/gtk/tmpl/gtkcurve.sgml docs/reference/gtk/tmpl/gtkdnd.sgml docs/reference/gtk/tmpl/gtkitemfactory.sgml docs/reference/gtk/tmpl/gtkmenu.sgml docs/reference/gtk/tmpl/gtkoldeditable.sgml docs/reference/gtk/tmpl/gtkoptionmenu.sgml docs/reference/gtk/tmpl/gtkpreview.sgml docs/reference/gtk/tmpl/gtkselection.sgml docs/reference/gtk/tmpl/gtksocket.sgml docs/reference/gtk/tmpl/gtkstyle.sgml docs/reference/gtk/tmpl/gtktextbuffer.sgml docs/reference/gtk/tmpl/gtktreemodel.sgml docs/reference/gtk/tmpl/gtkwidget.sgml gdk/gdk.h gdk/gdkdisplay.c gdk/gdkdisplay.h gdk/gdkdnd.h gdk/gdkdraw.c gdk/gdkdrawable.h gdk/gdkinput.h gdk/gdkselection.h gdk/x11/gdkdisplay-x11.c gdk/x11/gdkdnd-x11.c gdk/x11/gdkselection-x11.c gtk/gtkcurve.h gtk/gtkdnd.h gtk/gtkitemfactory.c gtk/gtkitemfactory.h gtk/gtkmenu.h gtk/gtkoldeditable.c gtk/gtkoldeditable.h gtk/gtkoptionmenu.h gtk/gtkplug.c gtk/gtkplug.h gtk/gtkpreview.h gtk/gtkrange.h gtk/gtkselection.c gtk/gtkselection.h gtk/gtksocket.c gtk/gtksocket.h gtk/gtkstyle.c gtk/gtkstyle.h gtk/gtktextlayout.c gtk/gtktextlayout.h gtk/gtktreemodel.c gtk/gtktreemodel.h gtk/gtkwidget.h Trivial s/foo/foo_/ fixes to make gtk.h includable with -Wshadow without warnings. (#91680)
2002-11-08 19:41:50 +00:00
@time_:
@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
<!-- ##### 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
<!-- ##### FUNCTION gtk_selection_data_set_text ##### -->
<para>
</para>
@selection_data:
@str:
@len:
@Returns:
<!-- ##### FUNCTION gtk_selection_data_get_text ##### -->
<para>
</para>
@selection_data:
@Returns:
<!-- ##### 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:
<!-- ##### 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:
<!-- ##### FUNCTION gtk_selection_data_targets_include_text ##### -->
<para>
</para>
@selection_data:
@Returns:
<!-- ##### FUNCTION gtk_selection_data_targets_include_uri ##### -->
<para>
</para>
@selection_data:
@Returns:
<!-- ##### 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:
Some updates 2000-10-18 Havoc Pennington <hp@redhat.com> * gtk/gtk-sections.txt: Some updates * gdk/gdk-sections.txt: remove GdkPixbufAlphaMode * gdk-pixbuf/gdk-pixbuf-sections.txt: Add new API, remove GdkPixbufClass/GdkAnimationClass since those are private * gdk-pixbuf/Makefile.am (IGNORE_HFILES): ignore more headers 2000-10-18 Havoc Pennington <hp@redhat.com> * gtk/gtktextiter.c (gtk_text_iter_forward_to_newline): Fix a bug where any number of empty lines would get skipped * gtk/gtktextiter.h: Remove padding from GtkTextIter; live on the edge. * gtk/gtktextiter.c (gtk_text_iter_make_surreal): enhance the warning about invalid iterators (explain more thoroughly) (gtk_text_iter_in_region): rename gtk_text_iter_in_range * gtk/gtktextview.c (FOCUS_EDGE_WIDTH): Make focus rectangle less big * demos/*.c: Add error handling * gtk/gtktextbuffer.c: don't modify const iterators * gtk/gdk-pixbuf-loader.c: Add full error handling here * gtk/gtkimage.c (gtk_image_set_from_file): ignore errors on file load * gtk/gtkiconfactory.c: Update to reflect addition of error handling to gdk-pixbuf loaders 2000-10-16 Havoc Pennington <hp@redhat.com> * gdk-pixbuf-io.c (gdk_pixbuf_get_module) (gdk_pixbuf_get_named_module) (gdk_pixbuf_load_module): add error reporting here also * make-inline-pixbuf.c (main): use GError * io-xpm.c: include unistd.h * gdk-pixbuf-util.c: include string.h * io-*.c: add error reporting * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file): add error reporting * gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): Add error reporting * gdk-pixbuf-io.h: Add GError** to load_increment and load methods * gdk-pixbuf-io.c (gdk_pixbuf_save) (gdk_pixbuf_savev): return a G_FILE_ERROR if we fail to write or close the file. * gdk-pixbuf.h: remove GDK_PIXBUF_ERROR_IO, instead we'll use G_FILE_ERROR_*. Rename enum to GdkPixbufError, properly following the GError naming rules. Add GError** to load functions.
2000-10-18 18:42:54 +00:00
<!-- ##### FUNCTION gtk_selection_remove_all ##### -->
<para>
</para>
2005-06-20 22:06:27 +00:00
@widget:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_selection_clear ##### -->
<para>
</para>
@widget:
@event:
@Returns:
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