]> Pileus Git - ~andy/gtk/blob - gdk/gdkselection.h
d8f7d6e1f38c3f3be38fb0c3f19353c88b6ed1ef
[~andy/gtk] / gdk / gdkselection.h
1 #ifndef __GDK_SELECTION_H__
2 #define __GDK_SELECTION_H__
3
4 #include <gdk/gdktypes.h>
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif /* __cplusplus */
9
10 /* The next three types define enums for predefined atoms relating
11    to selections. In general, one will need to use gdk_intern_atom */
12
13 typedef enum
14 {
15   GDK_SELECTION_PRIMARY = 1,
16   GDK_SELECTION_SECONDARY = 2
17 } GdkSelection;
18
19 typedef enum
20 {
21   GDK_TARGET_BITMAP = 5,
22   GDK_TARGET_COLORMAP = 7,
23   GDK_TARGET_DRAWABLE = 17,
24   GDK_TARGET_PIXMAP = 20,
25   GDK_TARGET_STRING = 31
26 } GdkTarget;
27
28 typedef enum
29 {
30   GDK_SELECTION_TYPE_ATOM = 4,
31   GDK_SELECTION_TYPE_BITMAP = 5,
32   GDK_SELECTION_TYPE_COLORMAP = 7,
33   GDK_SELECTION_TYPE_DRAWABLE = 17,
34   GDK_SELECTION_TYPE_INTEGER = 19,
35   GDK_SELECTION_TYPE_PIXMAP = 20,
36   GDK_SELECTION_TYPE_WINDOW = 33,
37   GDK_SELECTION_TYPE_STRING = 31
38 } GdkSelectionType;
39
40 /* Selections
41  */
42 gboolean   gdk_selection_owner_set (GdkWindow    *owner,
43                                     GdkAtom       selection,
44                                     guint32       time,
45                                     gint          send_event);
46 GdkWindow* gdk_selection_owner_get (GdkAtom       selection);
47 void       gdk_selection_convert   (GdkWindow    *requestor,
48                                     GdkAtom       selection,
49                                     GdkAtom       target,
50                                     guint32       time);
51 gboolean   gdk_selection_property_get (GdkWindow  *requestor,
52                                        guchar    **data,
53                                        GdkAtom    *prop_type,
54                                        gint       *prop_format);
55 void       gdk_selection_send_notify (guint32       requestor,
56                                       GdkAtom       selection,
57                                       GdkAtom       target,
58                                       GdkAtom       property,
59                                       guint32       time);
60
61 #ifdef __cplusplus
62 }
63 #endif /* __cplusplus */
64
65 #endif /* __GDK_SELECTION_H__ */