gdkselection.h 3.57 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* GDK - The GIMP Drawing Kit
 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

/*
 * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
 * file for a list of people on the GTK+ Team.  See the ChangeLog
 * files for a list of changes.  These files are distributed with
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
 */

Owen Taylor's avatar
Started  
Owen Taylor committed
27
28
29
30
31
#ifndef __GDK_SELECTION_H__
#define __GDK_SELECTION_H__

#include <gdk/gdktypes.h>

32
G_BEGIN_DECLS
Owen Taylor's avatar
Started  
Owen Taylor committed
33

34
35
36
37
38
39
40
41
42
43
/* Predefined atoms relating to selections. In general, one will need to use
 * gdk_intern_atom
 */
#define GDK_SELECTION_PRIMARY 		_GDK_MAKE_ATOM (1)
#define GDK_SELECTION_SECONDARY 	_GDK_MAKE_ATOM (2)
#define GDK_SELECTION_CLIPBOARD 	_GDK_MAKE_ATOM (69)
#define GDK_TARGET_BITMAP 		_GDK_MAKE_ATOM (5)
#define GDK_TARGET_COLORMAP 		_GDK_MAKE_ATOM (7)
#define GDK_TARGET_DRAWABLE 		_GDK_MAKE_ATOM (17)
#define GDK_TARGET_PIXMAP 		_GDK_MAKE_ATOM (20)
44
#define GDK_TARGET_STRING 		_GDK_MAKE_ATOM (31)
45
46
47
48
49
50
51
#define GDK_SELECTION_TYPE_ATOM 	_GDK_MAKE_ATOM (4)
#define GDK_SELECTION_TYPE_BITMAP 	_GDK_MAKE_ATOM (5)
#define GDK_SELECTION_TYPE_COLORMAP 	_GDK_MAKE_ATOM (7)
#define GDK_SELECTION_TYPE_DRAWABLE 	_GDK_MAKE_ATOM (17)
#define GDK_SELECTION_TYPE_INTEGER 	_GDK_MAKE_ATOM (19)
#define GDK_SELECTION_TYPE_PIXMAP 	_GDK_MAKE_ATOM (20)
#define GDK_SELECTION_TYPE_WINDOW 	_GDK_MAKE_ATOM (33)
52
#define GDK_SELECTION_TYPE_STRING 	_GDK_MAKE_ATOM (31)
53
54
55
56
57
58
59
60

#ifndef GDK_DISABLE_DEPRECATED

typedef GdkAtom GdkSelection;
typedef GdkAtom GdkTarget;
typedef GdkAtom GdkSelectionType;

#endif /* GDK_DISABLE_DEPRECATED */
Owen Taylor's avatar
Started  
Owen Taylor committed
61
62
63

/* Selections
 */
64
65

#ifndef GDK_MULTIHEAD_SAFE
Owen Taylor's avatar
Started  
Owen Taylor committed
66
67
gboolean   gdk_selection_owner_set (GdkWindow	 *owner,
				    GdkAtom	  selection,
68
				    guint32	  time_,
Owen Taylor's avatar
Owen Taylor committed
69
				    gboolean      send_event);
Owen Taylor's avatar
Started  
Owen Taylor committed
70
GdkWindow* gdk_selection_owner_get (GdkAtom	  selection);
71
72
73
74
75
#endif/* GDK_MULTIHEAD_SAFE */

gboolean   gdk_selection_owner_set_for_display (GdkDisplay *display,
						GdkWindow  *owner,
						GdkAtom     selection,
76
						guint32     time_,
77
78
79
80
						gboolean    send_event);
GdkWindow *gdk_selection_owner_get_for_display (GdkDisplay *display,
						GdkAtom     selection);

Owen Taylor's avatar
Started  
Owen Taylor committed
81
82
83
void	   gdk_selection_convert   (GdkWindow	 *requestor,
				    GdkAtom	  selection,
				    GdkAtom	  target,
84
				    guint32	  time_);
Owen Taylor's avatar
Started  
Owen Taylor committed
85
86
87
88
gboolean   gdk_selection_property_get (GdkWindow  *requestor,
				       guchar	 **data,
				       GdkAtom	  *prop_type,
				       gint	  *prop_format);
89
90

#ifndef GDK_MULTIHEAD_SAFE
Owen Taylor's avatar
Started  
Owen Taylor committed
91
92
93
94
void	   gdk_selection_send_notify (guint32	    requestor,
				      GdkAtom	    selection,
				      GdkAtom	    target,
				      GdkAtom	    property,
95
				      guint32	    time_);
96
97
98
99
100
101
102
#endif /* GDK_MULTIHEAD_SAFE */

void       gdk_selection_send_notify_for_display (GdkDisplay *display,
						  guint32     requestor,
						  GdkAtom     selection,
						  GdkAtom     target,
						  GdkAtom     property,
103
						  guint32     time_);
Owen Taylor's avatar
Started  
Owen Taylor committed
104

105
G_END_DECLS
Owen Taylor's avatar
Started  
Owen Taylor committed
106
107

#endif /* __GDK_SELECTION_H__ */