1 /* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
20 * file for a list of people on the GTK+ Team. See the ChangeLog
21 * files for a list of changes. These files are distributed with
22 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25 #ifndef __GDK_SELECTION_H__
26 #define __GDK_SELECTION_H__
28 #if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
29 #error "Only <gdk/gdk.h> can be included directly."
32 #include <gdk/gdktypes.h>
36 /* Predefined atoms relating to selections. In general, one will need to use
40 * GDK_SELECTION_PRIMARY:
42 * A #GdkAtom representing the <literal>PRIMARY</literal> selection.
44 #define GDK_SELECTION_PRIMARY _GDK_MAKE_ATOM (1)
47 * GDK_SELECTION_SECONDARY:
49 * A #GdkAtom representing the <literal>SECONDARY</literal> selection.
51 #define GDK_SELECTION_SECONDARY _GDK_MAKE_ATOM (2)
54 * GDK_SELECTION_CLIPBOARD:
56 * A #GdkAtom representing the <literal>CLIPBOARD</literal> selection.
58 #define GDK_SELECTION_CLIPBOARD _GDK_MAKE_ATOM (69)
63 * A #GdkAtom representing the <literal>BITMAP</literal> selection target.
65 #define GDK_TARGET_BITMAP _GDK_MAKE_ATOM (5)
68 * GDK_TARGET_COLORMAP:
70 * A #GdkAtom representing the <literal>COLORMAP</literal> selection target.
72 #define GDK_TARGET_COLORMAP _GDK_MAKE_ATOM (7)
75 * GDK_TARGET_DRAWABLE:
77 * A #GdkAtom representing the <literal>DRAWABLE</literal> selection target.
79 #define GDK_TARGET_DRAWABLE _GDK_MAKE_ATOM (17)
84 * A #GdkAtom representing the <literal>PIXMAP</literal> selection target.
86 #define GDK_TARGET_PIXMAP _GDK_MAKE_ATOM (20)
91 * A #GdkAtom representing the <literal>STRING</literal> selection target.
93 #define GDK_TARGET_STRING _GDK_MAKE_ATOM (31)
96 * GDK_SELECTION_TYPE_ATOM:
98 * A #GdkAtom representing the <literal>ATOM</literal> selection type.
100 #define GDK_SELECTION_TYPE_ATOM _GDK_MAKE_ATOM (4)
103 * GDK_SELECTION_TYPE_BITMAP:
105 * A #GdkAtom representing the <literal>BITMAP</literal> selection type.
107 #define GDK_SELECTION_TYPE_BITMAP _GDK_MAKE_ATOM (5)
110 * GDK_SELECTION_TYPE_COLORMAP:
112 * A #GdkAtom representing the <literal>COLORMAP</literal> selection type.
114 #define GDK_SELECTION_TYPE_COLORMAP _GDK_MAKE_ATOM (7)
117 * GDK_SELECTION_TYPE_DRAWABLE:
119 * A #GdkAtom representing the <literal>DRAWABLE</literal> selection type.
121 #define GDK_SELECTION_TYPE_DRAWABLE _GDK_MAKE_ATOM (17)
124 * GDK_SELECTION_TYPE_INTEGER:
126 * A #GdkAtom representing the <literal>INTEGER</literal> selection type.
128 #define GDK_SELECTION_TYPE_INTEGER _GDK_MAKE_ATOM (19)
131 * GDK_SELECTION_TYPE_PIXMAP:
133 * A #GdkAtom representing the <literal>PIXMAP</literal> selection type.
135 #define GDK_SELECTION_TYPE_PIXMAP _GDK_MAKE_ATOM (20)
138 * GDK_SELECTION_TYPE_WINDOW:
140 * A #GdkAtom representing the <literal>WINDOW</literal> selection type.
142 #define GDK_SELECTION_TYPE_WINDOW _GDK_MAKE_ATOM (33)
145 * GDK_SELECTION_TYPE_STRING:
147 * A #GdkAtom representing the <literal>STRING</literal> selection type.
149 #define GDK_SELECTION_TYPE_STRING _GDK_MAKE_ATOM (31)
154 #ifndef GDK_MULTIHEAD_SAFE
155 gboolean gdk_selection_owner_set (GdkWindow *owner,
158 gboolean send_event);
159 GdkWindow* gdk_selection_owner_get (GdkAtom selection);
160 #endif/* GDK_MULTIHEAD_SAFE */
162 gboolean gdk_selection_owner_set_for_display (GdkDisplay *display,
166 gboolean send_event);
167 GdkWindow *gdk_selection_owner_get_for_display (GdkDisplay *display,
171 * gdk_selection_convert:
172 * @requestor: a #GdkWindow.
173 * @selection: an atom identifying the selection to get the
175 * @target: the form in which to retrieve the selection.
176 * @time_: the timestamp to use when retrieving the
177 * selection. The selection owner may refuse the
178 * request if it did not own the selection at
179 * the time indicated by the timestamp.
181 * Retrieves the contents of a selection in a given
184 void gdk_selection_convert (GdkWindow *requestor,
188 gint gdk_selection_property_get (GdkWindow *requestor,
193 void gdk_selection_send_notify (GdkWindow *requestor,
199 void gdk_selection_send_notify_for_display (GdkDisplay *display,
200 GdkWindow *requestor,
208 #endif /* __GDK_SELECTION_H__ */