1 2 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 3 4 /* 5 * GThumb 6 * 7 * Copyright (C) 2009 Free Software Foundation, Inc. 8 * 9 * This program is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License as published by 11 * the Free Software Foundation; either version 2 of the License, or 12 * (at your option) any later version. 13 * 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. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this program. If not, see <http://www.gnu.org/licenses/>. 21 */ 22 23 #ifndef GTH_IMAGE_DRAGGER_H 24 #define GTH_IMAGE_DRAGGER_H 25 26 #include <glib.h> 27 #include <glib-object.h> 28 #include "gth-image-viewer.h" 29 30 G_BEGIN_DECLS 31 32 #define GTH_TYPE_IMAGE_DRAGGER (gth_image_dragger_get_type ()) 33 #define GTH_IMAGE_DRAGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTH_TYPE_IMAGE_DRAGGER, GthImageDragger)) 34 #define GTH_IMAGE_DRAGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTH_TYPE_IMAGE_DRAGGER, GthImageDraggerClass)) 35 #define GTH_IS_IMAGE_DRAGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTH_TYPE_IMAGE_DRAGGER)) 36 #define GTH_IS_IMAGE_DRAGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTH_TYPE_IMAGE_DRAGGER)) 37 #define GTH_IMAGE_DRAGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTH_TYPE_IMAGE_DRAGGER, GthImageDraggerClass)) 38 39 typedef struct _GthImageDragger GthImageDragger; 40 typedef struct _GthImageDraggerClass GthImageDraggerClass; 41 typedef struct _GthImageDraggerPrivate GthImageDraggerPrivate; 42 43 struct _GthImageDragger 44 { 45 GObject __parent; 46 GthImageDraggerPrivate *priv; 47 }; 48 49 struct _GthImageDraggerClass 50 { 51 GObjectClass __parent_class; 52 }; 53 54 GType gth_image_dragger_get_type (void); 55 GthImageViewerTool * gth_image_dragger_new (gboolean show_frame); 56 void gth_image_dragger_enable_drag_source (GthImageDragger *self, 57 GdkModifierType start_button_mask, 58 const GtkTargetEntry *targets, 59 int n_targets, 60 GdkDragAction actions); 61 void gth_image_dragger_disable_drag_source (GthImageDragger *self); 62 63 G_END_DECLS 64 65 #endif /* GTH_IMAGE_DRAGGER_H */ 66