<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Selections</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="GDK 2 Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk2-Keyboard-Handling.html" title="Key Values">
<link rel="next" href="gdk2-Drag-and-Drop.html" title="Drag and Drop">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</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="gdk2-Keyboard-Handling.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.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">GDK 2 Reference Manual</th>
<td><a accesskey="n" href="gdk2-Drag-and-Drop.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gdk2-Selections.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gdk2-Selections.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gdk2-Selections"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk2-Selections.top_of_page"></a>Selections</span></h2>
<p>Selections — Functions for transfering data via the X selection mechanism</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gdk2-Selections.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gdk/gdk.h&gt;

typedef             <a class="link" href="gdk2-Selections.html#GdkSelection" title="GdkSelection">GdkSelection</a>;
typedef             <a class="link" href="gdk2-Selections.html#GdkSelectionType" title="GdkSelectionType">GdkSelectionType</a>;
typedef             <a class="link" href="gdk2-Selections.html#GdkTarget" title="GdkTarget">GdkTarget</a>;
#define             <a class="link" href="gdk2-Selections.html#GDK-SELECTION-PRIMARY:CAPS" title="GDK_SELECTION_PRIMARY">GDK_SELECTION_PRIMARY</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-SELECTION-SECONDARY:CAPS" title="GDK_SELECTION_SECONDARY">GDK_SELECTION_SECONDARY</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-SELECTION-CLIPBOARD:CAPS" title="GDK_SELECTION_CLIPBOARD">GDK_SELECTION_CLIPBOARD</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-TARGET-BITMAP:CAPS" title="GDK_TARGET_BITMAP">GDK_TARGET_BITMAP</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-TARGET-COLORMAP:CAPS" title="GDK_TARGET_COLORMAP">GDK_TARGET_COLORMAP</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-TARGET-DRAWABLE:CAPS" title="GDK_TARGET_DRAWABLE">GDK_TARGET_DRAWABLE</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-TARGET-PIXMAP:CAPS" title="GDK_TARGET_PIXMAP">GDK_TARGET_PIXMAP</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-TARGET-STRING:CAPS" title="GDK_TARGET_STRING">GDK_TARGET_STRING</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-SELECTION-TYPE-ATOM:CAPS" title="GDK_SELECTION_TYPE_ATOM">GDK_SELECTION_TYPE_ATOM</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-SELECTION-TYPE-BITMAP:CAPS" title="GDK_SELECTION_TYPE_BITMAP">GDK_SELECTION_TYPE_BITMAP</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-SELECTION-TYPE-COLORMAP:CAPS" title="GDK_SELECTION_TYPE_COLORMAP">GDK_SELECTION_TYPE_COLORMAP</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-SELECTION-TYPE-DRAWABLE:CAPS" title="GDK_SELECTION_TYPE_DRAWABLE">GDK_SELECTION_TYPE_DRAWABLE</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-SELECTION-TYPE-INTEGER:CAPS" title="GDK_SELECTION_TYPE_INTEGER">GDK_SELECTION_TYPE_INTEGER</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-SELECTION-TYPE-PIXMAP:CAPS" title="GDK_SELECTION_TYPE_PIXMAP">GDK_SELECTION_TYPE_PIXMAP</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-SELECTION-TYPE-WINDOW:CAPS" title="GDK_SELECTION_TYPE_WINDOW">GDK_SELECTION_TYPE_WINDOW</a>
#define             <a class="link" href="gdk2-Selections.html#GDK-SELECTION-TYPE-STRING:CAPS" title="GDK_SELECTION_TYPE_STRING">GDK_SELECTION_TYPE_STRING</a>
<span class="returnvalue">gboolean</span>            <a class="link" href="gdk2-Selections.html#gdk-selection-owner-set" title="gdk_selection_owner_set ()">gdk_selection_owner_set</a>             (<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *owner</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> time_</code></em>,
                                                         <em class="parameter"><code><span class="type">gboolean</span> send_event</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="gdk2-Selections.html#gdk-selection-owner-set-for-display" title="gdk_selection_owner_set_for_display ()">gdk_selection_owner_set_for_display</a> (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *owner</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> time_</code></em>,
                                                         <em class="parameter"><code><span class="type">gboolean</span> send_event</code></em>);
<a class="link" href="gdk2-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> *         <a class="link" href="gdk2-Selections.html#gdk-selection-owner-get" title="gdk_selection_owner_get ()">gdk_selection_owner_get</a>             (<em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>);
<a class="link" href="gdk2-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> *         <a class="link" href="gdk2-Selections.html#gdk-selection-owner-get-for-display" title="gdk_selection_owner_get_for_display ()">gdk_selection_owner_get_for_display</a> (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Selections.html#gdk-selection-convert" title="gdk_selection_convert ()">gdk_selection_convert</a>               (<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *requestor</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> time_</code></em>);
<span class="returnvalue">gint</span>                <a class="link" href="gdk2-Selections.html#gdk-selection-property-get" title="gdk_selection_property_get ()">gdk_selection_property_get</a>          (<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *requestor</code></em>,
                                                         <em class="parameter"><code><span class="type">guchar</span> **data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> *prop_type</code></em>,
                                                         <em class="parameter"><code><span class="type">gint</span> *prop_format</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Selections.html#gdk-selection-send-notify" title="gdk_selection_send_notify ()">gdk_selection_send_notify</a>           (<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> requestor</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> property</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> time_</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Selections.html#gdk-selection-send-notify-for-display" title="gdk_selection_send_notify_for_display ()">gdk_selection_send_notify_for_display</a>
                                                        (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> requestor</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> property</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> time_</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gdk2-Selections.description"></a><h2>Description</h2>
<p>
The X selection mechanism provides a way to transfer
arbitrary chunks of data between programs.
A <em class="firstterm">selection</em> is a essentially
a named clipboard, identified by a string interned
as a <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a>. By claiming ownership of a selection,
an application indicates that it will be responsible
for supplying its contents. The most common
selections are <code class="literal">PRIMARY</code> and
<code class="literal">CLIPBOARD</code>.
</p>
<p>
The contents of a selection can be represented in
a number of formats, called <em class="firstterm">targets</em>.
Each target is identified by an atom. A list of
all possible targets supported by the selection owner
can be retrieved by requesting the special target
<code class="literal">TARGETS</code>. When a selection is
retrieved, the data is accompanied by a type
(an atom), and a format (an integer, representing
the number of bits per item).
See Properties and Atoms
for more information.
</p>
<p>
The functions in this section only contain the lowlevel
parts of the selection protocol. A considerably more
complicated implementation is needed on top of this.
GTK+ contains such an implementation in the functions
in <code class="literal">gtkselection.h</code> and programmers
should use those functions instead of the ones presented
here. If you plan to implement selection handling
directly on top of the functions here, you should refer
to the X Inter-client Communication Conventions Manual
(ICCCM).
</p>
</div>
<div class="refsect1">
<a name="gdk2-Selections.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GdkSelection"></a><h3>GdkSelection</h3>
<pre class="programlisting">typedef GdkAtom GdkSelection;
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GdkSelection</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
The <a class="link" href="gdk2-Selections.html#GdkSelection" title="GdkSelection"><span class="type">GdkSelection</span></a> enumeration contains predefined
atom values for several common selections.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GdkSelectionType"></a><h3>GdkSelectionType</h3>
<pre class="programlisting">typedef GdkAtom GdkSelectionType;
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GdkSelectionType</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
The <a class="link" href="gdk2-Selections.html#GdkSelectionType" title="GdkSelectionType"><span class="type">GdkSelectionType</span></a> enumeration contains predefined
atom values used to represent the types of data transferred
in response to a request for a target. See the
ICCCM for details about what data should be transferred
for each of these types. Other atoms can be used,
and the recommended practice for GTK+ is to to use mime
types for this purpose. However, supporting these types
may be useful for compatibility with older programs.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GdkTarget"></a><h3>GdkTarget</h3>
<pre class="programlisting">typedef GdkAtom GdkTarget;
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GdkTarget</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
The <a class="link" href="gdk2-Selections.html#GdkTarget" title="GdkTarget"><span class="type">GdkTarget</span></a> enumeration contains predefined atom values which are
used to describe possible targets for a selection. Other atoms can be
used, and the recommended practice for GTK+ is to to use mime types
for this purpose. However, supporting these types may be useful for
compatibility with older programs.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-SELECTION-PRIMARY:CAPS"></a><h3>GDK_SELECTION_PRIMARY</h3>
<pre class="programlisting">#define GDK_SELECTION_PRIMARY 		_GDK_MAKE_ATOM (1)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">PRIMARY</code> selection.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-SELECTION-SECONDARY:CAPS"></a><h3>GDK_SELECTION_SECONDARY</h3>
<pre class="programlisting">#define GDK_SELECTION_SECONDARY 	_GDK_MAKE_ATOM (2)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">SECONDARY</code> selection.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-SELECTION-CLIPBOARD:CAPS"></a><h3>GDK_SELECTION_CLIPBOARD</h3>
<pre class="programlisting">#define GDK_SELECTION_CLIPBOARD 	_GDK_MAKE_ATOM (69)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">CLIPBOARD</code> selection.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-TARGET-BITMAP:CAPS"></a><h3>GDK_TARGET_BITMAP</h3>
<pre class="programlisting">#define GDK_TARGET_BITMAP 		_GDK_MAKE_ATOM (5)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">BITMAP</code> selection target.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-TARGET-COLORMAP:CAPS"></a><h3>GDK_TARGET_COLORMAP</h3>
<pre class="programlisting">#define GDK_TARGET_COLORMAP 		_GDK_MAKE_ATOM (7)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">COLORMAP</code> selection target.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-TARGET-DRAWABLE:CAPS"></a><h3>GDK_TARGET_DRAWABLE</h3>
<pre class="programlisting">#define GDK_TARGET_DRAWABLE 		_GDK_MAKE_ATOM (17)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">DRAWABLE</code> selection target.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-TARGET-PIXMAP:CAPS"></a><h3>GDK_TARGET_PIXMAP</h3>
<pre class="programlisting">#define GDK_TARGET_PIXMAP 		_GDK_MAKE_ATOM (20)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">PIXMAP</code> selection target.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-TARGET-STRING:CAPS"></a><h3>GDK_TARGET_STRING</h3>
<pre class="programlisting">#define GDK_TARGET_STRING 		_GDK_MAKE_ATOM (31)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">STRING</code> selection target.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-SELECTION-TYPE-ATOM:CAPS"></a><h3>GDK_SELECTION_TYPE_ATOM</h3>
<pre class="programlisting">#define GDK_SELECTION_TYPE_ATOM 	_GDK_MAKE_ATOM (4)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">ATOM</code> selection type.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-SELECTION-TYPE-BITMAP:CAPS"></a><h3>GDK_SELECTION_TYPE_BITMAP</h3>
<pre class="programlisting">#define GDK_SELECTION_TYPE_BITMAP 	_GDK_MAKE_ATOM (5)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">BITMAP</code> selection type.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-SELECTION-TYPE-COLORMAP:CAPS"></a><h3>GDK_SELECTION_TYPE_COLORMAP</h3>
<pre class="programlisting">#define GDK_SELECTION_TYPE_COLORMAP 	_GDK_MAKE_ATOM (7)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">COLORMAP</code> selection type.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-SELECTION-TYPE-DRAWABLE:CAPS"></a><h3>GDK_SELECTION_TYPE_DRAWABLE</h3>
<pre class="programlisting">#define GDK_SELECTION_TYPE_DRAWABLE 	_GDK_MAKE_ATOM (17)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">DRAWABLE</code> selection type.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-SELECTION-TYPE-INTEGER:CAPS"></a><h3>GDK_SELECTION_TYPE_INTEGER</h3>
<pre class="programlisting">#define GDK_SELECTION_TYPE_INTEGER 	_GDK_MAKE_ATOM (19)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">INTEGER</code> selection type.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-SELECTION-TYPE-PIXMAP:CAPS"></a><h3>GDK_SELECTION_TYPE_PIXMAP</h3>
<pre class="programlisting">#define GDK_SELECTION_TYPE_PIXMAP 	_GDK_MAKE_ATOM (20)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">PIXMAP</code> selection type.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-SELECTION-TYPE-WINDOW:CAPS"></a><h3>GDK_SELECTION_TYPE_WINDOW</h3>
<pre class="programlisting">#define GDK_SELECTION_TYPE_WINDOW 	_GDK_MAKE_ATOM (33)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">WINDOW</code> selection type.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-SELECTION-TYPE-STRING:CAPS"></a><h3>GDK_SELECTION_TYPE_STRING</h3>
<pre class="programlisting">#define GDK_SELECTION_TYPE_STRING 	_GDK_MAKE_ATOM (31)
</pre>
<p>
A <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> representing the <code class="literal">STRING</code> selection type.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-selection-owner-set"></a><h3>gdk_selection_owner_set ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gdk_selection_owner_set             (<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *owner</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> time_</code></em>,
                                                         <em class="parameter"><code><span class="type">gboolean</span> send_event</code></em>);</pre>
<p>
Sets the owner of the given selection.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>owner</code></em> :</span></p></td>
<td>a <a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to indicate that the
the owner for the given should be unset.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>an atom identifying a selection.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
<td>timestamp to use when setting the selection.
If this is older than the timestamp given last
time the owner was set for the given selection, the
request will be ignored.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>send_event</code></em> :</span></p></td>
<td>if <code class="literal">TRUE</code>, and the new owner is different
from the current owner, the current owner
will be sent a SelectionClear event.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if the selection owner was successfully
changed to <em class="parameter"><code>owner</code></em>, otherwise <code class="literal">FALSE</code>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-selection-owner-set-for-display"></a><h3>gdk_selection_owner_set_for_display ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gdk_selection_owner_set_for_display (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *owner</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> time_</code></em>,
                                                         <em class="parameter"><code><span class="type">gboolean</span> send_event</code></em>);</pre>
<p>
Sets the <a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> <em class="parameter"><code>owner</code></em> as the current owner of the selection <em class="parameter"><code>selection</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
<td>the <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>owner</code></em> :</span></p></td>
<td>a <a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to indicate that the owner for
the given should be unset.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>an atom identifying a selection.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
<td>timestamp to use when setting the selection.
If this is older than the timestamp given last time the owner was
set for the given selection, the request will be ignored.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>send_event</code></em> :</span></p></td>
<td>if <code class="literal">TRUE</code>, and the new owner is different from the current
owner, the current owner will be sent a SelectionClear event.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if the selection owner was successfully changed to owner,
otherwise <code class="literal">FALSE</code>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-selection-owner-get"></a><h3>gdk_selection_owner_get ()</h3>
<pre class="programlisting"><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> *         gdk_selection_owner_get             (<em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>);</pre>
<p>
Determines the owner of the given selection.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>an atom indentifying a selection.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>if there is a selection owner for this window,
and it is a window known to the current process,
the <a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> that owns the selection, otherwise
<a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. Note that the return value may be owned
by a different process if a foreign window
was previously created for that window, but
a new foreign window will never be created by
this call.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-selection-owner-get-for-display"></a><h3>gdk_selection_owner_get_for_display ()</h3>
<pre class="programlisting"><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> *         gdk_selection_owner_get_for_display (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>);</pre>
<p>
Determine the owner of the given selection.
</p>
<p>
Note that the return value may be owned by a different 
process if a foreign window was previously created for that
window, but a new foreign window will never be created by this call.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
<td>a <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>an atom indentifying a selection.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>if there is a selection owner for this window, and it is a
window known to the current process, the <a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> that owns the
selection, otherwise <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-selection-convert"></a><h3>gdk_selection_convert ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_selection_convert               (<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *requestor</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
<p>
Retrieves the contents of a selection in a given
form.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>requestor</code></em> :</span></p></td>
<td>a <a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>an atom identifying the selection to get the
contents of.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td>the form in which to retrieve the selection.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
<td>the timestamp to use when retrieving the
selection. The selection owner may refuse the
request if it did not own the selection at
the time indicated by the timestamp.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-selection-property-get"></a><h3>gdk_selection_property_get ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>                gdk_selection_property_get          (<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *requestor</code></em>,
                                                         <em class="parameter"><code><span class="type">guchar</span> **data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> *prop_type</code></em>,
                                                         <em class="parameter"><code><span class="type">gint</span> *prop_format</code></em>);</pre>
<p>
Retrieves selection data that was stored by the selection
data in response to a call to <a class="link" href="gdk2-Selections.html#gdk-selection-convert" title="gdk_selection_convert ()"><code class="function">gdk_selection_convert()</code></a>. This function
will not be used by applications, who should use the <a href="http://developer.gnome.org/gtk2/gtk3-Clipboards.html#GtkClipboard"><span class="type">GtkClipboard</span></a>
API instead.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>requestor</code></em> :</span></p></td>
<td>the window on which the data is stored</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>location to store a pointer to the retrieved data.
If the retrieval failed, <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> we be stored here, otherwise, it
will be non-<a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> and the returned data should be freed with <code class="function">g_free()</code>
when you are finished using it. The length of the
allocated memory is one more than the length
of the returned data, and the final byte will always
be zero, to ensure nul-termination of strings.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prop_type</code></em> :</span></p></td>
<td>location to store the type of the property.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prop_format</code></em> :</span></p></td>
<td>location to store the format of the property.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the length of the retrieved data.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-selection-send-notify"></a><h3>gdk_selection_send_notify ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_selection_send_notify           (<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> requestor</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> property</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
<p>
Sends a response to SelectionRequest event.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>requestor</code></em> :</span></p></td>
<td>window to which to deliver response.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>selection that was requested.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td>target that was selected.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property</code></em> :</span></p></td>
<td>property in which the selection owner stored the
data, or <a class="link" href="gdk2-Properties-and-Atoms.html#GDK-NONE:CAPS" title="GDK_NONE"><code class="literal">GDK_NONE</code></a> to indicate that the request
was rejected.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
<td>timestamp.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-selection-send-notify-for-display"></a><h3>gdk_selection_send_notify_for_display ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_selection_send_notify_for_display
                                                        (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> requestor</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> property</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
<p>
Send a response to SelectionRequest event.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
<td>the <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> where <em class="parameter"><code>requestor</code></em> is realized</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>requestor</code></em> :</span></p></td>
<td>window to which to deliver response.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>selection that was requested.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td>target that was selected.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property</code></em> :</span></p></td>
<td>property in which the selection owner stored the data,
or <a class="link" href="gdk2-Properties-and-Atoms.html#GDK-NONE:CAPS" title="GDK_NONE"><code class="literal">GDK_NONE</code></a> to indicate that the request was rejected.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
<td>timestamp.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>