Update copyright message
[nautilus-actions.git] / src / nact / egg-tree-multi-dnd.h
blob6f42f313de08c78c1afb8512b21063b346fa2f2b
1 /*
2 * Nautilus Actions
3 * A Nautilus extension which offers configurable context menu actions.
5 * Copyright (C) 2005 The GNOME Foundation
6 * Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
7 * Copyright (C) 2009, 2010, 2011 Pierre Wieser and others (see AUTHORS)
9 * This Program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * This Program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public
20 * License along with this Library; see the file COPYING. If not,
21 * write to the Free Software Foundation, Inc., 59 Temple Place,
22 * Suite 330, Boston, MA 02111-1307, USA.
24 * Authors:
25 * Frederic Ruaudel <grumz@grumz.net>
26 * Rodrigo Moya <rodrigo@gnome-db.org>
27 * Pierre Wieser <pwieser@trychlos.org>
28 * ... and many others (see AUTHORS)
31 /* eggtreednd.h
32 * Copyright (C) 2001 Red Hat, Inc.
34 * This library is free software; you can redistribute it and/or
35 * modify it under the terms of the GNU Library General Public
36 * License as published by the Free Software Foundation; either
37 * version 2 of the License, or (at your option) any later version.
39 * This library is distributed in the hope that it will be useful,
40 * but WITHOUT ANY WARRANTY; without even the implied warranty of
41 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
42 * Library General Public License for more details.
44 * You should have received a copy of the GNU Library General Public
45 * License along with this library; if not, write to the
46 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
47 * Boston, MA 02111-1307, USA.
49 * Adapted by Pierre Wieser for the needs of Nautilus Actions
52 #ifndef __EGG_TREE_MULTI_DND_H__
53 #define __EGG_TREE_MULTI_DND_H__
55 #include <gtk/gtk.h>
57 G_BEGIN_DECLS
59 #define EGG_TYPE_TREE_MULTI_DRAG_SOURCE ( egg_tree_multi_drag_source_get_type())
60 #define EGG_TREE_MULTI_DRAG_SOURCE( object ) ( G_TYPE_CHECK_INSTANCE_CAST(( object ), EGG_TYPE_TREE_MULTI_DRAG_SOURCE, EggTreeMultiDragSource ))
61 #define EGG_IS_TREE_MULTI_DRAG_SOURCE( object ) ( G_TYPE_CHECK_INSTANCE_TYPE(( object ), EGG_TYPE_TREE_MULTI_DRAG_SOURCE ))
62 #define EGG_TREE_MULTI_DRAG_SOURCE_GET_IFACE( object ) ( G_TYPE_INSTANCE_GET_INTERFACE(( object ), EGG_TYPE_TREE_MULTI_DRAG_SOURCE, EggTreeMultiDragSourceIface ))
64 typedef struct EggTreeMultiDragSource EggTreeMultiDragSource;
65 typedef struct EggTreeMultiDragSourceIface EggTreeMultiDragSourceIface;
67 struct EggTreeMultiDragSourceIface
69 GTypeInterface g_iface;
71 /* vtable - not signals */
72 gboolean ( *row_draggable ) ( EggTreeMultiDragSource *drag_source, GList *path_list );
73 gboolean ( *drag_data_get ) ( EggTreeMultiDragSource *drag_source, GdkDragContext *context, GtkSelectionData *selection_data, GList *path_list, guint info );
74 gboolean ( *drag_data_delete )( EggTreeMultiDragSource *drag_source, GList *path_list );
75 GtkTargetList * ( *get_target_list ) ( EggTreeMultiDragSource *drag_source );
76 void ( *free_target_list )( EggTreeMultiDragSource *drag_source, GtkTargetList *list );
77 GdkDragAction ( *get_drag_actions )( EggTreeMultiDragSource *drag_source );
80 GType egg_tree_multi_drag_source_get_type( void ) G_GNUC_CONST;
82 /* initialize drag support on the treeview */
83 void egg_tree_multi_drag_add_drag_support( EggTreeMultiDragSource *drag_source, GtkTreeView *tree_view );
85 /* returns whether the given row can be dragged */
86 gboolean egg_tree_multi_drag_source_row_draggable( EggTreeMultiDragSource *drag_source, GList *path_list );
88 /* Fills in selection_data with type selection_data->target based on the row
89 * denoted by path, returns TRUE if it does anything
91 gboolean egg_tree_multi_drag_source_drag_data_get( EggTreeMultiDragSource *drag_source, GdkDragContext *context, GtkSelectionData *selection_data, GList *path_list, guint info );
93 /* deletes the given row, or returns FALSE if it can't */
94 gboolean egg_tree_multi_drag_source_drag_data_delete( EggTreeMultiDragSource *drag_source, GList *path_list );
96 G_END_DECLS
98 #endif /* __EGG_TREE_MULTI_DND_H__ */