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 "gdkdrag.h" |
22 | |
23 | G_BEGIN_DECLS |
24 | |
25 | |
26 | #define GDK_DRAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DRAG, GdkDragClass)) |
27 | #define GDK_IS_DRAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DRAG)) |
28 | #define GDK_DRAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DRAG, GdkDragClass)) |
29 | |
30 | typedef struct _GdkDragClass GdkDragClass; |
31 | |
32 | |
33 | struct _GdkDragClass { |
34 | GObjectClass parent_class; |
35 | |
36 | GdkSurface* (*get_drag_surface) (GdkDrag *drag); |
37 | void (*set_hotspot) (GdkDrag *drag, |
38 | int hot_x, |
39 | int hot_y); |
40 | void (*drop_done) (GdkDrag *drag, |
41 | gboolean success); |
42 | |
43 | void (*set_cursor) (GdkDrag *drag, |
44 | GdkCursor *cursor); |
45 | void (*cancel) (GdkDrag *drag, |
46 | GdkDragCancelReason reason); |
47 | void (*drop_performed) (GdkDrag *drag, |
48 | guint32 time); |
49 | void (*dnd_finished) (GdkDrag *drag); |
50 | |
51 | gboolean (*handle_event) (GdkDrag *drag, |
52 | GdkEvent *event); |
53 | }; |
54 | |
55 | struct _GdkDrag { |
56 | GObject parent_instance; |
57 | }; |
58 | |
59 | void gdk_drag_set_cursor (GdkDrag *drag, |
60 | GdkCursor *cursor); |
61 | void gdk_drag_set_actions (GdkDrag *drag, |
62 | GdkDragAction actions); |
63 | void gdk_drag_set_selected_action (GdkDrag *drag, |
64 | GdkDragAction action); |
65 | |
66 | void gdk_drag_cancel (GdkDrag *drag, |
67 | GdkDragCancelReason reason); |
68 | gboolean gdk_drag_handle_source_event (GdkEvent *event); |
69 | GdkCursor * gdk_drag_get_cursor (GdkDrag *drag, |
70 | GdkDragAction action); |
71 | |
72 | void gdk_drag_write_async (GdkDrag *drag, |
73 | const char *mime_type, |
74 | GOutputStream *stream, |
75 | int io_priority, |
76 | GCancellable *cancellable, |
77 | GAsyncReadyCallback callback, |
78 | gpointer user_data); |
79 | gboolean gdk_drag_write_finish (GdkDrag *drag, |
80 | GAsyncResult *result, |
81 | GError **error); |
82 | |
83 | |
84 | G_END_DECLS |
85 | |
86 | #endif |
87 | |