]> Pileus Git - ~andy/gtk/blob - gdk/gdkdndprivate.h
wayland: Only set x, y, and modifiers if the pointers are non-NULL
[~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, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __GDK_DND_PRIVATE_H__
21 #define __GDK_DND_PRIVATE_H__
22
23 #include "gdkdnd.h"
24
25 G_BEGIN_DECLS
26
27
28 #define GDK_DRAG_CONTEXT_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DRAG_CONTEXT, GdkDragContextClass))
29 #define GDK_IS_DRAG_CONTEXT_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DRAG_CONTEXT))
30 #define GDK_DRAG_CONTEXT_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DRAG_CONTEXT, GdkDragContextClass))
31
32 typedef struct _GdkDragContextClass GdkDragContextClass;
33
34
35 struct _GdkDragContextClass {
36   GObjectClass parent_class;
37
38   GdkWindow * (*find_window)   (GdkDragContext  *context,
39                                 GdkWindow       *drag_window,
40                                 GdkScreen       *screen,
41                                 gint             x_root,
42                                 gint             y_root,
43                                 GdkDragProtocol *protocol);
44   GdkAtom     (*get_selection) (GdkDragContext  *context);
45   gboolean    (*drag_motion)   (GdkDragContext  *context,
46                                 GdkWindow       *dest_window,
47                                 GdkDragProtocol  protocol,
48                                 gint             root_x,
49                                 gint             root_y,
50                                 GdkDragAction    suggested_action,
51                                 GdkDragAction    possible_actions,
52                                 guint32          time_);
53   void        (*drag_status)   (GdkDragContext  *context,
54                                 GdkDragAction    action,
55                                 guint32          time_);
56   void        (*drag_abort)    (GdkDragContext  *context,
57                                 guint32          time_);
58   void        (*drag_drop)     (GdkDragContext  *context,
59                                 guint32          time_);
60   void        (*drop_reply)    (GdkDragContext  *context,
61                                 gboolean         accept,
62                                 guint32          time_);
63   void        (*drop_finish)   (GdkDragContext  *context,
64                                 gboolean         success,
65                                 guint32          time_);
66   gboolean    (*drop_status)   (GdkDragContext  *context);
67 };
68
69 struct _GdkDragContext {
70   GObject parent_instance;
71
72   /*< private >*/
73   GdkDragProtocol protocol;
74
75   gboolean is_source;
76   GdkWindow *source_window;
77   GdkWindow *dest_window;
78
79   GList *targets;
80   GdkDragAction actions;
81   GdkDragAction suggested_action;
82   GdkDragAction action;
83
84   guint32 start_time;
85
86   GdkDevice *device;
87 };
88
89 G_END_DECLS
90
91 #endif