]> Pileus Git - ~andy/gtk/blob - gdk/gdkdndprivate.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gdk / gdkdndprivate.h
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 2010, Red Hat, Inc
3  *
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.
8  *
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.
13  *
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/>.
16  */
17
18 #ifndef __GDK_DND_PRIVATE_H__
19 #define __GDK_DND_PRIVATE_H__
20
21 #include "gdkdnd.h"
22
23 G_BEGIN_DECLS
24
25
26 #define GDK_DRAG_CONTEXT_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DRAG_CONTEXT, GdkDragContextClass))
27 #define GDK_IS_DRAG_CONTEXT_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DRAG_CONTEXT))
28 #define GDK_DRAG_CONTEXT_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DRAG_CONTEXT, GdkDragContextClass))
29
30 typedef struct _GdkDragContextClass GdkDragContextClass;
31
32
33 struct _GdkDragContextClass {
34   GObjectClass parent_class;
35
36   GdkWindow * (*find_window)   (GdkDragContext  *context,
37                                 GdkWindow       *drag_window,
38                                 GdkScreen       *screen,
39                                 gint             x_root,
40                                 gint             y_root,
41                                 GdkDragProtocol *protocol);
42   GdkAtom     (*get_selection) (GdkDragContext  *context);
43   gboolean    (*drag_motion)   (GdkDragContext  *context,
44                                 GdkWindow       *dest_window,
45                                 GdkDragProtocol  protocol,
46                                 gint             root_x,
47                                 gint             root_y,
48                                 GdkDragAction    suggested_action,
49                                 GdkDragAction    possible_actions,
50                                 guint32          time_);
51   void        (*drag_status)   (GdkDragContext  *context,
52                                 GdkDragAction    action,
53                                 guint32          time_);
54   void        (*drag_abort)    (GdkDragContext  *context,
55                                 guint32          time_);
56   void        (*drag_drop)     (GdkDragContext  *context,
57                                 guint32          time_);
58   void        (*drop_reply)    (GdkDragContext  *context,
59                                 gboolean         accept,
60                                 guint32          time_);
61   void        (*drop_finish)   (GdkDragContext  *context,
62                                 gboolean         success,
63                                 guint32          time_);
64   gboolean    (*drop_status)   (GdkDragContext  *context);
65 };
66
67 struct _GdkDragContext {
68   GObject parent_instance;
69
70   /*< private >*/
71   GdkDragProtocol protocol;
72
73   gboolean is_source;
74   GdkWindow *source_window;
75   GdkWindow *dest_window;
76
77   GList *targets;
78   GdkDragAction actions;
79   GdkDragAction suggested_action;
80   GdkDragAction action;
81
82   guint32 start_time;
83
84   GdkDevice *device;
85 };
86
87 G_END_DECLS
88
89 #endif