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, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
27 #if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
28 #error "Only <gdk/gdk.h> can be included directly."
31 #ifndef __GDK_SELECTION_H__
32 #define __GDK_SELECTION_H__
34 #include <gdk/gdktypes.h>
38 /* Predefined atoms relating to selections. In general, one will need to use
42 * GDK_SELECTION_PRIMARY:
44 * A #GdkAtom representing the <literal>PRIMARY</literal> selection.
46 #define GDK_SELECTION_PRIMARY _GDK_MAKE_ATOM (1)
49 * GDK_SELECTION_SECONDARY:
51 * A #GdkAtom representing the <literal>SECONDARY</literal> selection.
53 #define GDK_SELECTION_SECONDARY _GDK_MAKE_ATOM (2)
56 * GDK_SELECTION_CLIPBOARD:
58 * A #GdkAtom representing the <literal>CLIPBOARD</literal> selection.
60 #define GDK_SELECTION_CLIPBOARD _GDK_MAKE_ATOM (69)
65 * A #GdkAtom representing the <literal>BITMAP</literal> selection target.
67 #define GDK_TARGET_BITMAP _GDK_MAKE_ATOM (5)
70 * GDK_TARGET_COLORMAP:
72 * A #GdkAtom representing the <literal>COLORMAP</literal> selection target.
74 #define GDK_TARGET_COLORMAP _GDK_MAKE_ATOM (7)
77 * GDK_TARGET_DRAWABLE:
79 * A #GdkAtom representing the <literal>DRAWABLE</literal> selection target.
81 #define GDK_TARGET_DRAWABLE _GDK_MAKE_ATOM (17)
86 * A #GdkAtom representing the <literal>PIXMAP</literal> selection target.
88 #define GDK_TARGET_PIXMAP _GDK_MAKE_ATOM (20)
93 * A #GdkAtom representing the <literal>STRING</literal> selection target.
95 #define GDK_TARGET_STRING _GDK_MAKE_ATOM (31)
98 * GDK_SELECTION_TYPE_ATOM:
100 * A #GdkAtom representing the <literal>ATOM</literal> selection type.
102 #define GDK_SELECTION_TYPE_ATOM _GDK_MAKE_ATOM (4)
105 * GDK_SELECTION_TYPE_BITMAP:
107 * A #GdkAtom representing the <literal>BITMAP</literal> selection type.
109 #define GDK_SELECTION_TYPE_BITMAP _GDK_MAKE_ATOM (5)
112 * GDK_SELECTION_TYPE_COLORMAP:
114 * A #GdkAtom representing the <literal>COLORMAP</literal> selection type.
116 #define GDK_SELECTION_TYPE_COLORMAP _GDK_MAKE_ATOM (7)
119 * GDK_SELECTION_TYPE_DRAWABLE:
121 * A #GdkAtom representing the <literal>DRAWABLE</literal> selection type.
123 #define GDK_SELECTION_TYPE_DRAWABLE _GDK_MAKE_ATOM (17)
126 * GDK_SELECTION_TYPE_INTEGER:
128 * A #GdkAtom representing the <literal>INTEGER</literal> selection type.
130 #define GDK_SELECTION_TYPE_INTEGER _GDK_MAKE_ATOM (19)
133 * GDK_SELECTION_TYPE_PIXMAP:
135 * A #GdkAtom representing the <literal>PIXMAP</literal> selection type.
137 #define GDK_SELECTION_TYPE_PIXMAP _GDK_MAKE_ATOM (20)
140 * GDK_SELECTION_TYPE_WINDOW:
142 * A #GdkAtom representing the <literal>WINDOW</literal> selection type.
144 #define GDK_SELECTION_TYPE_WINDOW _GDK_MAKE_ATOM (33)
147 * GDK_SELECTION_TYPE_STRING:
149 * A #GdkAtom representing the <literal>STRING</literal> selection type.
151 #define GDK_SELECTION_TYPE_STRING _GDK_MAKE_ATOM (31)
156 #ifndef GDK_MULTIHEAD_SAFE
157 gboolean gdk_selection_owner_set (GdkWindow *owner,
160 gboolean send_event);
161 GdkWindow* gdk_selection_owner_get (GdkAtom selection);
162 #endif/* GDK_MULTIHEAD_SAFE */
164 gboolean gdk_selection_owner_set_for_display (GdkDisplay *display,
168 gboolean send_event);
169 GdkWindow *gdk_selection_owner_get_for_display (GdkDisplay *display,
173 * gdk_selection_convert:
174 * @requestor: a #GdkWindow.
175 * @selection: an atom identifying the selection to get the
177 * @target: the form in which to retrieve the selection.
178 * @time_: the timestamp to use when retrieving the
179 * selection. The selection owner may refuse the
180 * request if it did not own the selection at
181 * the time indicated by the timestamp.
183 * Retrieves the contents of a selection in a given
186 void gdk_selection_convert (GdkWindow *requestor,
190 gint gdk_selection_property_get (GdkWindow *requestor,
195 #ifndef GDK_MULTIHEAD_SAFE
196 void gdk_selection_send_notify (GdkNativeWindow requestor,
201 #endif /* GDK_MULTIHEAD_SAFE */
203 void gdk_selection_send_notify_for_display (GdkDisplay *display,
204 GdkNativeWindow requestor,
212 #endif /* __GDK_SELECTION_H__ */