KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21585/root/usr/share/gtk-doc/html/gtk/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/share/gtk-doc/html/gtk/gtk-Selections.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Selections</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="gtkbase.html" title="Part&#160;II.&#160;GTK+ Core Reference">
<link rel="prev" href="GtkStyle.html" title="Styles">
<link rel="next" href="gtk-Feature-Test-Macros.html" title="Version Information">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gtk.html" title="Part&#160;I.&#160;GTK+ Overview">
<link rel="part" href="gtkbase.html" title="Part&#160;II.&#160;GTK+ Core Reference">
<link rel="part" href="gtkobjects.html" title="Part&#160;III.&#160;GTK+ Widgets and Objects">
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
<link rel="chapter" href="ch02.html" title="Widget Gallery">
<link rel="chapter" href="WindowWidgets.html" title="Windows">
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
<link rel="chapter" href="Ornaments.html" title="Ornaments">
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
<link rel="chapter" href="Printing.html" title="Printing">
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
<link rel="part" href="migrating.html" title="Part&#160;IV.&#160;Migrating from Previous Versions of GTK+">
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and 
         GtkComboBoxEntry">
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
<link rel="part" href="pt05.html" title="Part&#160;V.&#160;GTK+ Tools">
<link rel="glossary" href="glossary.html" title="Glossary">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GtkStyle.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="gtkbase.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ Reference Manual</th>
<td><a accesskey="n" href="gtk-Feature-Test-Macros.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2730048" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2732096" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gtk-Selections"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2730048"></a><span class="refentrytitle">Selections</span>
</h2>
<p>Selections &#8212; Functions for handling inter-process communication via selections</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;gtk/gtk.h&gt;


            <a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a>;
            <a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a>;
            <a href="gtk-Selections.html#GtkTargetPair">GtkTargetPair</a>;
<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a>* <a href="gtk-Selections.html#gtk-target-list-new">gtk_target_list_new</a>          (const <a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> ntargets);
<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a>* <a href="gtk-Selections.html#gtk-target-list-ref">gtk_target_list_ref</a>          (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list);
void        <a href="gtk-Selections.html#gtk-target-list-unref">gtk_target_list_unref</a>           (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list);
void        <a href="gtk-Selections.html#gtk-target-list-add">gtk_target_list_add</a>             (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> target,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> flags,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> info);
void        <a href="gtk-Selections.html#gtk-target-list-add-table">gtk_target_list_add_table</a>       (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             const <a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> ntargets);
void        <a href="gtk-Selections.html#gtk-target-list-add-text-targets">gtk_target_list_add_text_targets</a>
                                            (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> info);
void        <a href="gtk-Selections.html#gtk-target-list-add-image-targets">gtk_target_list_add_image_targets</a>
                                            (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> info,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> writable);
void        <a href="gtk-Selections.html#gtk-target-list-add-uri-targets">gtk_target_list_add_uri_targets</a> (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> info);
void        <a href="gtk-Selections.html#gtk-target-list-add-rich-text-targets">gtk_target_list_add_rich_text_targets</a>
                                            (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> info,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> deserializable,
                                             <a href="GtkTextBuffer.html" title="GtkTextBuffer">GtkTextBuffer</a> *buffer);
void        <a href="gtk-Selections.html#gtk-target-list-remove">gtk_target_list_remove</a>          (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> target);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-target-list-find">gtk_target_list_find</a>            (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> target,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> *info);
void        <a href="gtk-Selections.html#gtk-target-table-free">gtk_target_table_free</a>           (<a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_targets);
<a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a>* <a href="gtk-Selections.html#gtk-target-table-new-from-list">gtk_target_table_new_from_list</a>
                                            (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *n_targets);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-selection-owner-set">gtk_selection_owner_set</a>         (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> selection,
                                             <a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> time_);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-selection-owner-set-for-display">gtk_selection_owner_set_for_display</a>
                                            (<a
href="../gdk/GdkDisplay.html"
>GdkDisplay</a> *display,
                                             <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> selection,
                                             <a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> time_);
void        <a href="gtk-Selections.html#gtk-selection-add-target">gtk_selection_add_target</a>        (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> selection,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> target,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> info);
void        <a href="gtk-Selections.html#gtk-selection-add-targets">gtk_selection_add_targets</a>       (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> selection,
                                             const <a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> ntargets);
void        <a href="gtk-Selections.html#gtk-selection-clear-targets">gtk_selection_clear_targets</a>     (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> selection);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-selection-convert">gtk_selection_convert</a>           (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> selection,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> target,
                                             <a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> time_);
void        <a href="gtk-Selections.html#gtk-selection-data-set">gtk_selection_data_set</a>          (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> type,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> format,
                                             const <a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> *data,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-selection-data-set-text">gtk_selection_data_set_text</a>     (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> len);
<a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a>*     <a href="gtk-Selections.html#gtk-selection-data-get-text">gtk_selection_data_get_text</a>     (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-selection-data-set-pixbuf">gtk_selection_data_set_pixbuf</a>   (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,
                                             <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a> *pixbuf);
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  <a href="gtk-Selections.html#gtk-selection-data-get-pixbuf">gtk_selection_data_get_pixbuf</a>   (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-selection-data-set-uris">gtk_selection_data_set_uris</a>     (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,
                                             <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> **uris);
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>**     <a href="gtk-Selections.html#gtk-selection-data-get-uris">gtk_selection_data_get_uris</a>     (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-selection-data-get-targets">gtk_selection_data_get_targets</a>  (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> **targets,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *n_atoms);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-selection-data-targets-include-image">gtk_selection_data_targets_include_image</a>
                                            (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> writable);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-selection-data-targets-include-text">gtk_selection_data_targets_include_text</a>
                                            (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-selection-data-targets-include-uri">gtk_selection_data_targets_include_uri</a>
                                            (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-selection-data-targets-include-rich-text">gtk_selection_data_targets_include_rich_text</a>
                                            (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,
                                             <a href="GtkTextBuffer.html" title="GtkTextBuffer">GtkTextBuffer</a> *buffer);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-targets-include-image">gtk_targets_include_image</a>       (<a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_targets,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> writable);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-targets-include-text">gtk_targets_include_text</a>        (<a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_targets);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-targets-include-uri">gtk_targets_include_uri</a>         (<a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_targets);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-targets-include-rich-text">gtk_targets_include_rich_text</a>   (<a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_targets,
                                             <a href="GtkTextBuffer.html" title="GtkTextBuffer">GtkTextBuffer</a> *buffer);
void        <a href="gtk-Selections.html#gtk-selection-remove-all">gtk_selection_remove_all</a>        (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gtk-Selections.html#gtk-selection-clear">gtk_selection_clear</a>             (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
                                             <a
href="../gdk/gdk-Event-Structures.html#GdkEventSelection"
>GdkEventSelection</a> *event);
<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a>* <a href="gtk-Selections.html#gtk-selection-data-copy">gtk_selection_data_copy</a>   (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *data);
void        <a href="gtk-Selections.html#gtk-selection-data-free">gtk_selection_data_free</a>         (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *data);


</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2732096"></a><h2>Description</h2>
<p>
The selection mechanism provides the basis for different types
of communication between processes. In particular, drag and drop and
<a href="gtk-Clipboards.html#GtkClipboard"><span class="type">GtkClipboard</span></a> work via selections. You will very seldom or
never need to use most of the functions in this section directly;
<a href="gtk-Clipboards.html#GtkClipboard"><span class="type">GtkClipboard</span></a> provides a nicer interface to the same functionality.
</p>
<p>
Some of the datatypes defined this section are used in
the <a href="gtk-Clipboards.html#GtkClipboard"><span class="type">GtkClipboard</span></a> and drag-and-drop API's as well. The
<a href="gtk-Selections.html#GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> structure and <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> objects represent
lists of data types that are supported when sending or
receiving data. The <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object is used to
store a chunk of data along with the data type and other
associated information.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2732174"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2732185"></a><h3>
<a name="GtkTargetEntry"></a>GtkTargetEntry</h3>
<a class="indexterm" name="id2732196"></a><pre class="programlisting">typedef struct {
  gchar *target;
  guint  flags;
  guint  info;
} GtkTargetEntry;
</pre>
<p>
A <a href="gtk-Selections.html#GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> 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 <a href="gtk-Drag-and-Drop.html#GtkTargetFlags"><span class="type">GtkTargetFlags</span></a>),
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.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2732237"></a><h3>
<a name="GtkTargetList"></a>GtkTargetList</h3>
<a class="indexterm" name="id2732247"></a><pre class="programlisting">typedef struct {
  GList *list;
  guint ref_count;
} GtkTargetList;
</pre>
<p>
A <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> structure is a reference counted list
of <a href="gtk-Selections.html#GtkTargetPair"><span class="type">GtkTargetPair</span></a>. It is used to represent the same
information as a table of <a href="gtk-Selections.html#GtkTargetEntry"><span class="type">GtkTargetEntry</span></a>, but in
an efficient form. This structure should be treated as
opaque.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2732284"></a><h3>
<a name="GtkTargetPair"></a>GtkTargetPair</h3>
<a class="indexterm" name="id2732295"></a><pre class="programlisting">typedef struct {
  GdkAtom   target;
  guint     flags;
  guint     info;
} GtkTargetPair;
</pre>
<p>
Internally used structure in the drag-and-drop and 
selection handling code.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2732312"></a><h3>
<a name="gtk-target-list-new"></a>gtk_target_list_new ()</h3>
<a class="indexterm" name="id2732322"></a><pre class="programlisting"><a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a>* gtk_target_list_new          (const <a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> ntargets);</pre>
<p>
Creates a new <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> from an array of <a href="gtk-Selections.html#GtkTargetEntry"><span class="type">GtkTargetEntry</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>targets</code></em>&#160;:</span></td>
<td> Pointer to an array of <a href="gtk-Selections.html#GtkTargetEntry"><span class="type">GtkTargetEntry</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ntargets</code></em>&#160;:</span></td>
<td>  number of entries in <em class="parameter"><code>targets</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the new <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2732424"></a><h3>
<a name="gtk-target-list-ref"></a>gtk_target_list_ref ()</h3>
<a class="indexterm" name="id2732435"></a><pre class="programlisting"><a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a>* gtk_target_list_ref          (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list);</pre>
<p>
Increases the reference count of a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> by one.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></td>
<td>  a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the passed in <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2732508"></a><h3>
<a name="gtk-target-list-unref"></a>gtk_target_list_unref ()</h3>
<a class="indexterm" name="id2732518"></a><pre class="programlisting">void        gtk_target_list_unref           (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list);</pre>
<p>
Decreases the reference count of a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> by one.
If the resulting reference count is zero, frees the list.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></td>
<td> a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2732576"></a><h3>
<a name="gtk-target-list-add"></a>gtk_target_list_add ()</h3>
<a class="indexterm" name="id2732587"></a><pre class="programlisting">void        gtk_target_list_add             (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> target,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> flags,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> info);</pre>
<p>
Appends another target to a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></td>
<td>  a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>target</code></em>&#160;:</span></td>
<td> the interned atom representing the target
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></td>
<td> the flags for this target
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>info</code></em>&#160;:</span></td>
<td> an ID that will be passed back to the application
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2732702"></a><h3>
<a name="gtk-target-list-add-table"></a>gtk_target_list_add_table ()</h3>
<a class="indexterm" name="id2732713"></a><pre class="programlisting">void        gtk_target_list_add_table       (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             const <a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> ntargets);</pre>
<p>
Prepends a table of <a href="gtk-Selections.html#GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> to a target list.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></td>
<td> a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>targets</code></em>&#160;:</span></td>
<td> the table of <a href="gtk-Selections.html#GtkTargetEntry"><span class="type">GtkTargetEntry</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ntargets</code></em>&#160;:</span></td>
<td> number of targets in the table
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2732814"></a><h3>
<a name="gtk-target-list-add-text-targets"></a>gtk_target_list_add_text_targets ()</h3>
<a class="indexterm" name="id2732829"></a><pre class="programlisting">void        gtk_target_list_add_text_targets
                                            (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> info);</pre>
<p>
Appends the text targets supported by <span class="type">GtkSelection</span> to
the target list. All targets are added with the same <em class="parameter"><code>info</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></td>
<td> a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>info</code></em>&#160;:</span></td>
<td> an ID that will be passed back to the application
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2732918"></a><h3>
<a name="gtk-target-list-add-image-targets"></a>gtk_target_list_add_image_targets ()</h3>
<a class="indexterm" name="id2732933"></a><pre class="programlisting">void        gtk_target_list_add_image_targets
                                            (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> info,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> writable);</pre>
<p>
Appends the image targets supported by <span class="type">GtkSelection</span> to
the target list. All targets are added with the same <em class="parameter"><code>info</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></td>
<td> a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>info</code></em>&#160;:</span></td>
<td> an ID that will be passed back to the application
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>writable</code></em>&#160;:</span></td>
<td> whether to add only targets for which GTK+ knows
  how to convert a pixbuf into the format
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2733042"></a><h3>
<a name="gtk-target-list-add-uri-targets"></a>gtk_target_list_add_uri_targets ()</h3>
<a class="indexterm" name="id2733056"></a><pre class="programlisting">void        gtk_target_list_add_uri_targets (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> info);</pre>
<p>
Appends the URI targets supported by <span class="type">GtkSelection</span> to
the target list. All targets are added with the same <em class="parameter"><code>info</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></td>
<td> a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>info</code></em>&#160;:</span></td>
<td> an ID that will be passed back to the application
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2733144"></a><h3>
<a name="gtk-target-list-add-rich-text-targets"></a>gtk_target_list_add_rich_text_targets ()</h3>
<a class="indexterm" name="id2733159"></a><pre class="programlisting">void        gtk_target_list_add_rich_text_targets
                                            (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> info,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> deserializable,
                                             <a href="GtkTextBuffer.html" title="GtkTextBuffer">GtkTextBuffer</a> *buffer);</pre>
<p>
Appends the rich text targets registered with
<a href="GtkTextBuffer.html#gtk-text-buffer-register-serialize-format"><code class="function">gtk_text_buffer_register_serialize_format()</code></a> or
<a href="GtkTextBuffer.html#gtk-text-buffer-register-deserialize-format"><code class="function">gtk_text_buffer_register_deserialize_format()</code></a> to the target list. All
targets are added with the same <em class="parameter"><code>info</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></td>
<td> a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>info</code></em>&#160;:</span></td>
<td> an ID that will be passed back to the application
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>deserializable</code></em>&#160;:</span></td>
<td> if <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>, then deserializable rich text formats
                 will be added, serializable formats otherwise.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>buffer</code></em>&#160;:</span></td>
<td> a <a href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2733318"></a><h3>
<a name="gtk-target-list-remove"></a>gtk_target_list_remove ()</h3>
<a class="indexterm" name="id2733329"></a><pre class="programlisting">void        gtk_target_list_remove          (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> target);</pre>
<p>
Removes a target from a target list.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></td>
<td> a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>target</code></em>&#160;:</span></td>
<td> the interned atom representing the target
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2733398"></a><h3>
<a name="gtk-target-list-find"></a>gtk_target_list_find ()</h3>
<a class="indexterm" name="id2733409"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_target_list_find            (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> target,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> *info);</pre>
<p>
Looks up a given target in a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></td>
<td> a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>target</code></em>&#160;:</span></td>
<td> an interned atom representing the target to search for
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>info</code></em>&#160;:</span></td>
<td> a pointer to the location to store application info for target
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the target was found, otherwise <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2733533"></a><h3>
<a name="gtk-target-table-free"></a>gtk_target_table_free ()</h3>
<a class="indexterm" name="id2733545"></a><pre class="programlisting">void        gtk_target_table_free           (<a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_targets);</pre>
<p>
This function frees a target table as returned by
<a href="gtk-Selections.html#gtk-target-table-new-from-list"><code class="function">gtk_target_table_new_from_list()</code></a></p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>targets</code></em>&#160;:</span></td>
<td> a <a href="gtk-Selections.html#GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> array
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_targets</code></em>&#160;:</span></td>
<td> the number of entries in the array
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2733638"></a><h3>
<a name="gtk-target-table-new-from-list"></a>gtk_target_table_new_from_list ()</h3>
<a class="indexterm" name="id2733654"></a><pre class="programlisting"><a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a>* gtk_target_table_new_from_list
                                            (<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *list,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *n_targets);</pre>
<p>
This function creates an <a href="gtk-Selections.html#GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> array that contains the
same targets as the passed <code class="literal">list</code>. The returned table is newly
allocated and should be freed using <a href="gtk-Selections.html#gtk-target-table-free"><code class="function">gtk_target_table_free()</code></a> when no
longer needed.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></td>
<td> a <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_targets</code></em>&#160;:</span></td>
<td> return location for the number ot targets in the table
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the new table.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2733784"></a><h3>
<a name="gtk-selection-owner-set"></a>gtk_selection_owner_set ()</h3>
<a class="indexterm" name="id2733798"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_selection_owner_set         (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> selection,
                                             <a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> time_);</pre>
<p>
Claims ownership of a given selection for a particular widget,
or, if <em class="parameter"><code>widget</code></em> is <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, release ownership of the selection.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em>&#160;:</span></td>
<td>  a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection</code></em>&#160;:</span></td>
<td>  an interned atom representing the selection to claim
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>time_</code></em>&#160;:</span></td>
<td> timestamp with which to claim the selection
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the operation succeeded
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2733948"></a><h3>
<a name="gtk-selection-owner-set-for-display"></a>gtk_selection_owner_set_for_display ()</h3>
<a class="indexterm" name="id2733965"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_selection_owner_set_for_display
                                            (<a
href="../gdk/GdkDisplay.html"
>GdkDisplay</a> *display,
                                             <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> selection,
                                             <a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> time_);</pre>
<p>
Claim ownership of a given selection for a particular widget, or,
if <em class="parameter"><code>widget</code></em> is <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, release ownership of the selection.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>display</code></em>&#160;:</span></td>
<td> the <span class="type">Gdkdisplay</span> where the selection is set 
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em>&#160;:</span></td>
<td> new selection owner (a <span class="type">GdkWidget</span>), or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection</code></em>&#160;:</span></td>
<td> an interned atom representing the selection to claim.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>time_</code></em>&#160;:</span></td>
<td> timestamp with which to claim the selection
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE if the operation succeeded 

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2734142"></a><h3>
<a name="gtk-selection-add-target"></a>gtk_selection_add_target ()</h3>
<a class="indexterm" name="id2734156"></a><pre class="programlisting">void        gtk_selection_add_target        (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> selection,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> target,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> info);</pre>
<p>
Appends a specified target to the list of supported targets for a 
given widget and selection.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em>&#160;:</span></td>
<td>  a <span class="type">GtkTarget</span>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection</code></em>&#160;:</span></td>
<td> the selection
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>target</code></em>&#160;:</span></td>
<td> target to add.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>info</code></em>&#160;:</span></td>
<td> A unsigned integer which will be passed back to the application.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2734281"></a><h3>
<a name="gtk-selection-add-targets"></a>gtk_selection_add_targets ()</h3>
<a class="indexterm" name="id2734295"></a><pre class="programlisting">void        gtk_selection_add_targets       (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> selection,
                                             const <a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> ntargets);</pre>
<p>
Prepends a table of targets to the list of supported targets
for a given widget and selection.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em>&#160;:</span></td>
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection</code></em>&#160;:</span></td>
<td> the selection
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>targets</code></em>&#160;:</span></td>
<td> a table of targets to add
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ntargets</code></em>&#160;:</span></td>
<td>  number of entries in <em class="parameter"><code>targets</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2734424"></a><h3>
<a name="gtk-selection-clear-targets"></a>gtk_selection_clear_targets ()</h3>
<a class="indexterm" name="id2734438"></a><pre class="programlisting">void        gtk_selection_clear_targets     (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> selection);</pre>
<p>
Remove all targets registered for the given selection for the
widget.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em>&#160;:</span></td>
<td>    a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection</code></em>&#160;:</span></td>
<td> an atom representing a selection
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2734518"></a><h3>
<a name="gtk-selection-convert"></a>gtk_selection_convert ()</h3>
<a class="indexterm" name="id2734532"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_selection_convert           (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> selection,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> target,
                                             <a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> time_);</pre>
<p>
Requests the contents of a selection. When received, 
a "selection_received" signal will be generated.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em>&#160;:</span></td>
<td> The widget which acts as requestor
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection</code></em>&#160;:</span></td>
<td> Which selection to get
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>target</code></em>&#160;:</span></td>
<td> Form of information desired (e.g., STRING)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>time_</code></em>&#160;:</span></td>
<td> Time of request (usually of triggering event)
       In emergency, you could use <a
href="../gdk/gdk-Events.html#GDK-CURRENT-TIME:CAPS"
><span class="type">GDK_CURRENT_TIME</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if requested succeeded. <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> if we could not process
         request. (e.g., there was already a request in process for
         this widget).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2734691"></a><h3>
<a name="gtk-selection-data-set"></a>gtk_selection_data_set ()</h3>
<a class="indexterm" name="id2734704"></a><pre class="programlisting">void        gtk_selection_data_set          (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> type,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> format,
                                             const <a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> *data,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length);</pre>
<p>
Stores new data into a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object. Should
<span class="emphasis"><em>only</em></span> be called from a selection handler callback.
Zero-terminates the stored data.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection_data</code></em>&#160;:</span></td>
<td> a pointer to a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
<td> the type of selection data
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></td>
<td> format (number of bits in a unit)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
<td> pointer to the data (will be copied)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em>&#160;:</span></td>
<td> length of the data
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2734865"></a><h3>
<a name="gtk-selection-data-set-text"></a>gtk_selection_data_set_text ()</h3>
<a class="indexterm" name="id2734879"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_selection_data_set_text     (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> len);</pre>
<p>
Sets the contents of the selection from a UTF-8 encoded string.
The string is converted to the form determined by
<em class="parameter"><code>selection_data-&gt;target</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection_data</code></em>&#160;:</span></td>
<td> a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>str</code></em>&#160;:</span></td>
<td> a UTF-8 string
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>len</code></em>&#160;:</span></td>
<td> the length of <em class="parameter"><code>str</code></em>, or -1 if <em class="parameter"><code>str</code></em> is nul-terminated.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the selection was successfully set,
  otherwise <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2735030"></a><h3>
<a name="gtk-selection-data-get-text"></a>gtk_selection_data_get_text ()</h3>
<a class="indexterm" name="id2735044"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a>*     gtk_selection_data_get_text     (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data);</pre>
<p>
Gets the contents of the selection data as a UTF-8 string.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection_data</code></em>&#160;:</span></td>
<td> a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> if the selection data contained a recognized
  text type and it could be converted to UTF-8, a newly allocated
  string containing the converted text, otherwise <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
  If the result is non-<a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> it must be freed with <a
href="../glib/glib-Memory-Allocation.html#g-free"
><code class="function">g_free()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2735147"></a><h3>
<a name="gtk-selection-data-set-pixbuf"></a>gtk_selection_data_set_pixbuf ()</h3>
<a class="indexterm" name="id2735163"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_selection_data_set_pixbuf   (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,
                                             <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a> *pixbuf);</pre>
<p>
Sets the contents of the selection from a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>
The pixbuf is converted to the form determined by
<em class="parameter"><code>selection_data-&gt;target</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection_data</code></em>&#160;:</span></td>
<td> a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>pixbuf</code></em>&#160;:</span></td>
<td> a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the selection was successfully set,
  otherwise <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2735301"></a><h3>
<a name="gtk-selection-data-get-pixbuf"></a>gtk_selection_data_get_pixbuf ()</h3>
<a class="indexterm" name="id2735317"></a><pre class="programlisting"><a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  gtk_selection_data_get_pixbuf   (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data);</pre>
<p>
Gets the contents of the selection data as a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection_data</code></em>&#160;:</span></td>
<td> a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> if the selection data contained a recognized
  image type and it could be converted to a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>, a 
  newly allocated pixbuf is returned, otherwise <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
  If the result is non-<a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> it must be freed with <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2735440"></a><h3>
<a name="gtk-selection-data-set-uris"></a>gtk_selection_data_set_uris ()</h3>
<a class="indexterm" name="id2735457"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_selection_data_set_uris     (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,
                                             <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> **uris);</pre>
<p>
Sets the contents of the selection from a list of URIs.
The string is converted to the form determined by
<em class="parameter"><code>selection_data-&gt;target</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection_data</code></em>&#160;:</span></td>
<td> a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>uris</code></em>&#160;:</span></td>
<td> a <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>-terminated array of strings hilding URIs
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the selection was successfully set,
  otherwise <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2735590"></a><h3>
<a name="gtk-selection-data-get-uris"></a>gtk_selection_data_get_uris ()</h3>
<a class="indexterm" name="id2735606"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>**     gtk_selection_data_get_uris     (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data);</pre>
<p>
Gets the contents of the selection data as array of URIs.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection_data</code></em>&#160;:</span></td>
<td> a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> if the selection data contains a list of
  URIs, a newly allocated <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>-terminated string array
  containing the URIs, otherwise <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>. If the result is 
  non-<a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> it must be freed with <a
href="../glib/glib-String-Utility-Functions.html#g-strfreev"
><code class="function">g_strfreev()</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2735722"></a><h3>
<a name="gtk-selection-data-get-targets"></a>gtk_selection_data_get_targets ()</h3>
<a class="indexterm" name="id2735736"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_selection_data_get_targets  (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,
                                             <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> **targets,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *n_atoms);</pre>
<p>
Gets the contents of <em class="parameter"><code>selection_data</code></em> as an array of targets.
This can be used to interpret the results of getting
the standard TARGETS target that is always supplied for
any selection.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection_data</code></em>&#160;:</span></td>
<td> a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>targets</code></em>&#160;:</span></td>
<td> location to store an array of targets. The result
          stored here must be freed with <a
href="../glib/glib-Memory-Allocation.html#g-free"
><code class="function">g_free()</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_atoms</code></em>&#160;:</span></td>
<td> location to store number of items in <em class="parameter"><code>targets</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>selection_data</code></em> contains a valid
   array of targets, otherwise <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2735902"></a><h3>
<a name="gtk-selection-data-targets-include-image"></a>gtk_selection_data_targets_include_image ()</h3>
<a class="indexterm" name="id2735918"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_selection_data_targets_include_image
                                            (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> writable);</pre>
<p>
Given a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object holding a list of targets,
determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
provide a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection_data</code></em>&#160;:</span></td>
<td> a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>writable</code></em>&#160;:</span></td>
<td> whether to accept only targets for which GTK+ knows
  how to convert a pixbuf into the format
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>selection_data</code></em> holds a list of targets,
  and a suitable target for images is included, otherwise <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2736066"></a><h3>
<a name="gtk-selection-data-targets-include-text"></a>gtk_selection_data_targets_include_text ()</h3>
<a class="indexterm" name="id2736080"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_selection_data_targets_include_text
                                            (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data);</pre>
<p>
Given a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object holding a list of targets,
determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
provide text.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection_data</code></em>&#160;:</span></td>
<td> a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>selection_data</code></em> holds a list of targets,
  and a suitable target for text is included, otherwise <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2736194"></a><h3>
<a name="gtk-selection-data-targets-include-uri"></a>gtk_selection_data_targets_include_uri ()</h3>
<a class="indexterm" name="id2736210"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_selection_data_targets_include_uri
                                            (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data);</pre>
<p>
Given a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object holding a list of targets,
determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
provide a list or URIs.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection_data</code></em>&#160;:</span></td>
<td> a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>selection_data</code></em> holds a list of targets,
  and a suitable target for text is included, otherwise <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2736328"></a><h3>
<a name="gtk-selection-data-targets-include-rich-text"></a>gtk_selection_data_targets_include_rich_text ()</h3>
<a class="indexterm" name="id2736344"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_selection_data_targets_include_rich_text
                                            (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,
                                             <a href="GtkTextBuffer.html" title="GtkTextBuffer">GtkTextBuffer</a> *buffer);</pre>
<p>
Given a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object holding a list of targets,
determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
provide rich text.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>selection_data</code></em>&#160;:</span></td>
<td> a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>buffer</code></em>&#160;:</span></td>
<td> a <a href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>selection_data</code></em> holds a list of targets,
              and a suitable target for rich text is included,
              otherwise <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2736493"></a><h3>
<a name="gtk-targets-include-image"></a>gtk_targets_include_image ()</h3>
<a class="indexterm" name="id2736509"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_targets_include_image       (<a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_targets,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> writable);</pre>
<p>
Determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
provide a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>targets</code></em>&#160;:</span></td>
<td> an array of <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
><span class="type">GdkAtom</span></a>s
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_targets</code></em>&#160;:</span></td>
<td> the length of <em class="parameter"><code>targets</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>writable</code></em>&#160;:</span></td>
<td> whether to accept only targets for which GTK+ knows
  how to convert a pixbuf into the format
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>targets</code></em> include a suitable target for images,
  otherwise <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2736674"></a><h3>
<a name="gtk-targets-include-text"></a>gtk_targets_include_text ()</h3>
<a class="indexterm" name="id2736690"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_targets_include_text        (<a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_targets);</pre>
<p>
Determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
provide text.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>targets</code></em>&#160;:</span></td>
<td> an array of <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
><span class="type">GdkAtom</span></a>s
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_targets</code></em>&#160;:</span></td>
<td> the length of <em class="parameter"><code>targets</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>targets</code></em> include a suitable target for text,
  otherwise <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2736825"></a><h3>
<a name="gtk-targets-include-uri"></a>gtk_targets_include_uri ()</h3>
<a class="indexterm" name="id2736841"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_targets_include_uri         (<a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_targets);</pre>
<p>
Determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
provide an uri list.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>targets</code></em>&#160;:</span></td>
<td> an array of <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
><span class="type">GdkAtom</span></a>s
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_targets</code></em>&#160;:</span></td>
<td> the length of <em class="parameter"><code>targets</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>targets</code></em> include a suitable target for uri lists,
  otherwise <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2736976"></a><h3>
<a name="gtk-targets-include-rich-text"></a>gtk_targets_include_rich_text ()</h3>
<a class="indexterm" name="id2736992"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_targets_include_rich_text   (<a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
>GdkAtom</a> *targets,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_targets,
                                             <a href="GtkTextBuffer.html" title="GtkTextBuffer">GtkTextBuffer</a> *buffer);</pre>
<p>
Determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
provide rich text.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>targets</code></em>&#160;:</span></td>
<td> an array of <a
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
><span class="type">GdkAtom</span></a>s
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_targets</code></em>&#160;:</span></td>
<td> the length of <em class="parameter"><code>targets</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>buffer</code></em>&#160;:</span></td>
<td> a <a href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>targets</code></em> include a suitable target for rich text,
              otherwise <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2737157"></a><h3>
<a name="gtk-selection-remove-all"></a>gtk_selection_remove_all ()</h3>
<a class="indexterm" name="id2737171"></a><pre class="programlisting">void        gtk_selection_remove_all        (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
<p>
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.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em>&#160;:</span></td>
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> 
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2737231"></a><h3>
<a name="gtk-selection-clear"></a>gtk_selection_clear ()</h3>
<a class="indexterm" name="id2737247"></a><a class="indexterm" name="id2737254"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_selection_clear             (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
                                             <a
href="../gdk/gdk-Event-Structures.html#GdkEventSelection"
>GdkEventSelection</a> *event);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_selection_clear</code> has been deprecated since version 2.4 and should not be used in newly-written code. Instead of calling this function, chain up from
your selection_clear_event handler. Calling this function
from any other context is illegal.</p>
</div>
<p>
The default handler for the GtkWidget::selection_clear_event
signal.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em>&#160;:</span></td>
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>event</code></em>&#160;:</span></td>
<td> the event
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the event was handled, otherwise false

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.2

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2737373"></a><h3>
<a name="gtk-selection-data-copy"></a>gtk_selection_data_copy ()</h3>
<a class="indexterm" name="id2737386"></a><pre class="programlisting"><a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a>* gtk_selection_data_copy   (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *data);</pre>
<p>
Makes a copy of a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure and its data.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
<td> a pointer to a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a pointer to a copy of <em class="parameter"><code>data</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2737470"></a><h3>
<a name="gtk-selection-data-free"></a>gtk_selection_data_free ()</h3>
<a class="indexterm" name="id2737484"></a><pre class="programlisting">void        gtk_selection_data_free         (<a href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *data);</pre>
<p>
Frees a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure returned from
<a href="gtk-Selections.html#gtk-selection-data-copy"><code class="function">gtk_selection_data_copy()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
<td> a pointer to a <a href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure.
</td>
</tr></tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2737563"></a><h2>See Also</h2>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a></span></td>
<td><p>Much of the operation of selections happens via
             signals for <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>. 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.</p></td>
</tr></tbody>
</table></div>
<p>

</p>
</div>
</div>
</body>
</html>

Anon7 - 2021