1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 3 /* 4 * GThumb 5 * 6 * Copyright (C) 2011 Free Software Foundation, Inc. 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #ifndef GTH_PREVIEW_TOOL_H 23 #define GTH_PREVIEW_TOOL_H 24 25 #include <glib.h> 26 #include <glib-object.h> 27 #include <gthumb.h> 28 29 G_BEGIN_DECLS 30 31 #define GTH_TYPE_PREVIEW_TOOL (gth_preview_tool_get_type ()) 32 #define GTH_PREVIEW_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTH_TYPE_PREVIEW_TOOL, GthPreviewTool)) 33 #define GTH_PREVIEW_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTH_TYPE_PREVIEW_TOOL, GthPreviewToolClass)) 34 #define GTH_IS_PREVIEW_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTH_TYPE_PREVIEW_TOOL)) 35 #define GTH_IS_PREVIEW_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTH_TYPE_PREVIEW_TOOL)) 36 #define GTH_PREVIEW_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTH_TYPE_PREVIEW_TOOL, GthPreviewToolClass)) 37 38 typedef struct _GthPreviewTool GthPreviewTool; 39 typedef struct _GthPreviewToolClass GthPreviewToolClass; 40 typedef struct _GthPreviewToolPrivate GthPreviewToolPrivate; 41 42 struct _GthPreviewTool 43 { 44 GObject __parent; 45 GthPreviewToolPrivate *priv; 46 }; 47 48 struct _GthPreviewToolClass 49 { 50 GObjectClass __parent_class; 51 }; 52 53 GType gth_preview_tool_get_type (void); 54 GthImageViewerTool * gth_preview_tool_new (void); 55 void gth_preview_tool_set_image (GthPreviewTool *self, 56 cairo_surface_t *image); 57 cairo_surface_t * gth_preview_tool_get_image (GthPreviewTool *self); 58 59 G_END_DECLS 60 61 #endif /* GTH_PREVIEW_TOOL_H */ 62