1 /* 2 * xfdesktop - xfce4's desktop manager 3 * 4 * Copyright (c) 2006 Brian Tarricone, <bjt23@cornell.edu> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU Library General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software Foundation, 18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 19 */ 20 21 #ifndef __XFDESKTOP_ICON_VIEW_MANAGER_H__ 22 #define __XFDESKTOP_ICON_VIEW_MANAGER_H__ 23 24 #include <glib-object.h> 25 #include <gtk/gtk.h> 26 27 #include "xfdesktop-icon.h" 28 29 G_BEGIN_DECLS 30 31 #define XFDESKTOP_TYPE_ICON_VIEW_MANAGER (xfdesktop_icon_view_manager_get_type()) 32 #define XFDESKTOP_ICON_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), XFDESKTOP_TYPE_ICON_VIEW_MANAGER, XfdesktopIconViewManager)) 33 #define XFDESKTOP_IS_ICON_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), XFDESKTOP_TYPE_ICON_VIEW_MANAGER)) 34 #define XFDESKTOP_ICON_VIEW_MANAGER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), XFDESKTOP_TYPE_ICON_VIEW_MANAGER, XfdesktopIconViewManagerIface)) 35 36 typedef struct _XfdesktopIconViewManagerIface XfdesktopIconViewManagerIface; 37 typedef struct _XfdesktopIconViewManager XfdesktopIconViewManager; /* dummy */ 38 39 /* fwd decl - meh */ 40 struct _XfdesktopIconView; 41 42 struct _XfdesktopIconViewManagerIface 43 { 44 GTypeInterface g_iface; 45 46 /*< virtual functions >*/ 47 gboolean (*manager_init)(XfdesktopIconViewManager *manager, 48 struct _XfdesktopIconView *icon_view); 49 void (*manager_fini)(XfdesktopIconViewManager *manager); 50 51 gboolean (*drag_drop)(XfdesktopIconViewManager *manager, 52 XfdesktopIcon *drop_icon, 53 GdkDragContext *context, 54 gint16 row, 55 gint16 col, 56 guint time_); 57 void (*drag_data_received)(XfdesktopIconViewManager *manager, 58 XfdesktopIcon *drop_icon, 59 GdkDragContext *context, 60 gint16 row, 61 gint16 col, 62 GtkSelectionData *data, 63 guint info, 64 guint time_); 65 void (*drag_data_get)(XfdesktopIconViewManager *manager, 66 GList *drag_icons, 67 GdkDragContext *context, 68 GtkSelectionData *data, 69 guint info, 70 guint time_); 71 GdkDragAction (*propose_drop_action)(XfdesktopIconViewManager *manager, 72 XfdesktopIcon *drop_icon, 73 GdkDragAction action, 74 GdkDragContext *context, 75 GtkSelectionData *data, 76 guint info); 77 }; 78 79 GType xfdesktop_icon_view_manager_get_type(void) G_GNUC_CONST; 80 81 /* virtual function accessors */ 82 83 gboolean xfdesktop_icon_view_manager_init(XfdesktopIconViewManager *manager, 84 struct _XfdesktopIconView *icon_view); 85 void xfdesktop_icon_view_manager_fini(XfdesktopIconViewManager *manager); 86 87 gboolean xfdesktop_icon_view_manager_drag_drop(XfdesktopIconViewManager *manager, 88 XfdesktopIcon *drop_icon, 89 GdkDragContext *context, 90 gint16 row, 91 gint16 col, 92 guint time_); 93 void xfdesktop_icon_view_manager_drag_data_received(XfdesktopIconViewManager *manager, 94 XfdesktopIcon *drop_icon, 95 GdkDragContext *context, 96 gint16 row, 97 gint16 col, 98 GtkSelectionData *data, 99 guint info, 100 guint time_); 101 void xfdesktop_icon_view_manager_drag_data_get(XfdesktopIconViewManager *manager, 102 GList *drag_icons, 103 GdkDragContext *context, 104 GtkSelectionData *data, 105 guint info, 106 guint time_); 107 GdkDragAction xfdesktop_icon_view_manager_propose_drop_action(XfdesktopIconViewManager *manager, 108 XfdesktopIcon *drop_icon, 109 GdkDragAction action, 110 GdkDragContext *context, 111 GtkSelectionData *data, 112 guint info); 113 114 115 116 G_END_DECLS 117 118 #endif /* __XFDESKTOP_ICON_VIEW_MANAGER_H__ */ 119