1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 3 /* 4 * GThumb 5 * 6 * Copyright (C) 2001-2009 The 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_IMAGE_TASK_H 23 #define GTH_IMAGE_TASK_H 24 25 #include <glib.h> 26 #include "gth-async-task.h" 27 #include "gth-image.h" 28 29 G_BEGIN_DECLS 30 31 #define GTH_TYPE_IMAGE_TASK (gth_image_task_get_type ()) 32 #define GTH_IMAGE_TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTH_TYPE_IMAGE_TASK, GthImageTask)) 33 #define GTH_IMAGE_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTH_TYPE_IMAGE_TASK, GthImageTaskClass)) 34 #define GTH_IS_IMAGE_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTH_TYPE_IMAGE_TASK)) 35 #define GTH_IS_IMAGE_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTH_TYPE_IMAGE_TASK)) 36 #define GTH_IMAGE_TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTH_TYPE_IMAGE_TASK, GthImageTaskClass)) 37 38 typedef struct _GthImageTask GthImageTask; 39 typedef struct _GthImageTaskClass GthImageTaskClass; 40 typedef struct _GthImageTaskPrivate GthImageTaskPrivate; 41 42 struct _GthImageTask { 43 GthAsyncTask __parent; 44 GthImageTaskPrivate *priv; 45 }; 46 47 struct _GthImageTaskClass { 48 GthAsyncTaskClass __parent; 49 }; 50 51 GType gth_image_task_get_type (void); 52 GthTask * gth_image_task_new (const char *description, 53 GthAsyncInitFunc before_func, 54 GthAsyncThreadFunc exec_func, 55 GthAsyncReadyFunc after_func, 56 gpointer user_data, 57 GDestroyNotify user_data_destroy_func); 58 void gth_image_task_set_source (GthImageTask *self, 59 GthImage *source); 60 void gth_image_task_set_source_surface (GthImageTask *self, 61 cairo_surface_t *surface); 62 GthImage * gth_image_task_get_source (GthImageTask *self); 63 cairo_surface_t * gth_image_task_get_source_surface (GthImageTask *self); 64 void gth_image_task_set_destination (GthImageTask *self, 65 GthImage *destination); 66 void gth_image_task_set_destination_surface (GthImageTask *self, 67 cairo_surface_t *surface); 68 GthImage * gth_image_task_get_destination (GthImageTask *self); 69 cairo_surface_t * gth_image_task_get_destination_surface (GthImageTask *self); 70 void gth_image_task_copy_source_to_destination (GthImageTask *self); 71 72 G_END_DECLS 73 74 #endif /* GTH_IMAGE_TASK_H */ 75