1 | /* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */ |
2 | /* GTK - The GIMP Toolkit |
3 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
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 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 | * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS |
21 | * file for a list of people on the GTK+ Team. See the ChangeLog |
22 | * files for a list of changes. These files are distributed with |
23 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. |
24 | */ |
25 | |
26 | #ifndef __GTK_DRAG_SOURCE_H__ |
27 | #define __GTK_DRAG_SOURCE_H__ |
28 | |
29 | |
30 | #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) |
31 | #error "Only <gtk/gtk.h> can be included directly." |
32 | #endif |
33 | |
34 | #include <gtk/gtkwidget.h> |
35 | |
36 | |
37 | G_BEGIN_DECLS |
38 | |
39 | #define GTK_TYPE_DRAG_SOURCE (gtk_drag_source_get_type ()) |
40 | #define GTK_DRAG_SOURCE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_DRAG_SOURCE, GtkDragSource)) |
41 | #define GTK_DRAG_SOURCE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTK_TYPE_DRAG_SOURCE, GtkDragSourceClass)) |
42 | #define GTK_IS_DRAG_SOURCE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_DRAG_SOURCE)) |
43 | #define GTK_IS_DRAG_SOURCE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_DRAG_SOURCE)) |
44 | #define GTK_DRAG_SOURCE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_DRAG_SOURCE, GtkDragSourceClass)) |
45 | |
46 | typedef struct _GtkDragSource GtkDragSource; |
47 | typedef struct _GtkDragSourceClass GtkDragSourceClass; |
48 | |
49 | GDK_AVAILABLE_IN_ALL |
50 | GType gtk_drag_source_get_type (void) G_GNUC_CONST; |
51 | |
52 | GDK_AVAILABLE_IN_ALL |
53 | GtkDragSource *gtk_drag_source_new (void); |
54 | |
55 | GDK_AVAILABLE_IN_ALL |
56 | void gtk_drag_source_set_content (GtkDragSource *source, |
57 | GdkContentProvider *content); |
58 | GDK_AVAILABLE_IN_ALL |
59 | GdkContentProvider *gtk_drag_source_get_content (GtkDragSource *source); |
60 | |
61 | GDK_AVAILABLE_IN_ALL |
62 | void gtk_drag_source_set_actions (GtkDragSource *source, |
63 | GdkDragAction actions); |
64 | GDK_AVAILABLE_IN_ALL |
65 | GdkDragAction gtk_drag_source_get_actions (GtkDragSource *source); |
66 | |
67 | GDK_AVAILABLE_IN_ALL |
68 | void gtk_drag_source_set_icon (GtkDragSource *source, |
69 | GdkPaintable *paintable, |
70 | int hot_x, |
71 | int hot_y); |
72 | GDK_AVAILABLE_IN_ALL |
73 | void gtk_drag_source_drag_cancel (GtkDragSource *source); |
74 | |
75 | GDK_AVAILABLE_IN_ALL |
76 | GdkDrag * gtk_drag_source_get_drag (GtkDragSource *source); |
77 | |
78 | GDK_AVAILABLE_IN_ALL |
79 | gboolean gtk_drag_check_threshold (GtkWidget *widget, |
80 | int start_x, |
81 | int start_y, |
82 | int current_x, |
83 | int current_y); |
84 | |
85 | |
86 | G_END_DECLS |
87 | |
88 | #endif /* __GTK_DRAG_SOURCE_H__ */ |
89 | |