]> Pileus Git - ~andy/gtk/blob - gtk/gtkselectionprivate.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gtkselectionprivate.h
1 /* GTK - The GIMP Toolkit
2  *
3  * Copyright (C) 2010 Javier Jardón
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17  */
18
19
20 /* The contents of a selection are returned in a GtkSelectionData
21  * structure. selection/target identify the request.  type specifies
22  * the type of the return; if length < 0, and the data should be
23  * ignored. This structure has object semantics - no fields should be
24  * modified directly, they should not be created directly, and
25  * pointers to them should not be stored beyond the duration of a
26  * callback. (If the last is changed, we'll need to add reference
27  * counting.) The time field gives the timestamp at which the data was
28  * sent.
29  */
30
31 #ifndef __GTK_SELECTIONPRIVATE_H__
32 #define __GTK_SELECTIONPRIVATE_H__
33
34 #include "gtkselection.h"
35
36 G_BEGIN_DECLS
37
38 struct _GtkSelectionData
39 {
40   GdkAtom       selection;
41   GdkAtom       target;
42   GdkAtom       type;
43   gint          format;
44   guchar       *data;
45   gint          length;
46   GdkDisplay   *display;
47 };
48
49 struct _GtkTargetList
50 {
51   GList *list;
52   guint ref_count;
53  };
54
55 typedef struct _GtkTargetPair GtkTargetPair;
56 struct _GtkTargetPair
57 {
58   GdkAtom   target;
59   guint     flags;
60   guint     info;
61 };
62
63
64 gboolean _gtk_selection_clear           (GtkWidget         *widget,
65                                          GdkEventSelection *event);
66 gboolean _gtk_selection_request         (GtkWidget         *widget,
67                                          GdkEventSelection *event);
68 gboolean _gtk_selection_incr_event      (GdkWindow         *window,
69                                          GdkEventProperty  *event);
70 gboolean _gtk_selection_notify          (GtkWidget         *widget,
71                                          GdkEventSelection *event);
72 gboolean _gtk_selection_property_notify (GtkWidget         *widget,
73                                          GdkEventProperty  *event);
74
75 G_END_DECLS
76
77 #endif /* __GTK_SELECTIONPRIVATE_H__ */