]> www.fi.muni.cz Git - evince.git/blob - cut-n-paste/toolbar-editor/eggtreemultidnd.h
Updated from the libegg, see bug #559432 for details.
[evince.git] / cut-n-paste / toolbar-editor / eggtreemultidnd.h
1 /* eggtreednd.h
2  * Copyright (C) 2001  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 Library 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  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library 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 __EGG_TREE_MULTI_DND_H__
21 #define __EGG_TREE_MULTI_DND_H__
22
23 #include <gtk/gtk.h>
24
25 G_BEGIN_DECLS
26
27 #define EGG_TYPE_TREE_MULTI_DRAG_SOURCE            (egg_tree_multi_drag_source_get_type ())
28 #define EGG_TREE_MULTI_DRAG_SOURCE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TREE_MULTI_DRAG_SOURCE, EggTreeMultiDragSource))
29 #define EGG_IS_TREE_MULTI_DRAG_SOURCE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TREE_MULTI_DRAG_SOURCE))
30 #define EGG_TREE_MULTI_DRAG_SOURCE_GET_IFACE(obj)  (G_TYPE_INSTANCE_GET_INTERFACE ((obj), EGG_TYPE_TREE_MULTI_DRAG_SOURCE, EggTreeMultiDragSourceIface))
31
32 typedef struct _EggTreeMultiDragSource      EggTreeMultiDragSource; /* Dummy typedef */
33 typedef struct _EggTreeMultiDragSourceIface EggTreeMultiDragSourceIface;
34
35 struct _EggTreeMultiDragSourceIface
36 {
37   GTypeInterface g_iface;
38
39   /* VTable - not signals */
40   gboolean     (* row_draggable)        (EggTreeMultiDragSource   *drag_source,
41                                          GList                    *path_list);
42
43   gboolean     (* drag_data_get)        (EggTreeMultiDragSource   *drag_source,
44                                          GList                    *path_list,
45                                          GtkSelectionData         *selection_data);
46
47   gboolean     (* drag_data_delete)     (EggTreeMultiDragSource *drag_source,
48                                          GList                  *path_list);
49 };
50
51 GType    egg_tree_multi_drag_source_get_type         (void) G_GNUC_CONST;
52
53 /* Returns whether the given row can be dragged */
54 gboolean egg_tree_multi_drag_source_row_draggable    (EggTreeMultiDragSource *drag_source,
55                                                       GList                  *path_list);
56
57 /* Deletes the given row, or returns FALSE if it can't */
58 gboolean egg_tree_multi_drag_source_drag_data_delete (EggTreeMultiDragSource *drag_source,
59                                                       GList                  *path_list);
60
61
62 /* Fills in selection_data with type selection_data->target based on the row
63  * denoted by path, returns TRUE if it does anything
64  */
65 gboolean egg_tree_multi_drag_source_drag_data_get    (EggTreeMultiDragSource *drag_source,
66                                                       GList                  *path_list,
67                                                       GtkSelectionData       *selection_data);
68 void     egg_tree_multi_drag_add_drag_support        (GtkTreeView            *tree_view);
69
70
71
72 G_END_DECLS
73
74 #endif /* __EGG_TREE_MULTI_DND_H__ */