1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 3 /* 4 * GThumb 5 * 6 * Copyright (C) 2009 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_VIEWER_PAGE_H 23 #define GTH_IMAGE_VIEWER_PAGE_H 24 25 #include <gthumb.h> 26 27 G_BEGIN_DECLS 28 29 #define GTH_TYPE_IMAGE_VIEWER_PAGE (gth_image_viewer_page_get_type ()) 30 #define GTH_IMAGE_VIEWER_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTH_TYPE_IMAGE_VIEWER_PAGE, GthImageViewerPage)) 31 #define GTH_IMAGE_VIEWER_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTH_TYPE_IMAGE_VIEWER_PAGE, GthImageViewerPageClass)) 32 #define GTH_IS_IMAGE_VIEWER_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTH_TYPE_IMAGE_VIEWER_PAGE)) 33 #define GTH_IS_IMAGE_VIEWER_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTH_TYPE_IMAGE_VIEWER_PAGE)) 34 #define GTH_IMAGE_VIEWER_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTH_TYPE_IMAGE_VIEWER_PAGE, GthImageViewerPageClass)) 35 36 typedef struct _GthImageViewerPage GthImageViewerPage; 37 typedef struct _GthImageViewerPageClass GthImageViewerPageClass; 38 typedef struct _GthImageViewerPagePrivate GthImageViewerPagePrivate; 39 40 struct _GthImageViewerPage { 41 GObject parent_instance; 42 GthImageViewerPagePrivate * priv; 43 }; 44 45 struct _GthImageViewerPageClass { 46 GObjectClass parent_class; 47 }; 48 49 GType gth_image_viewer_page_get_type (void); 50 GtkWidget * gth_image_viewer_page_get_image_viewer (GthImageViewerPage *page); 51 GdkPixbuf * gth_image_viewer_page_get_pixbuf (GthImageViewerPage *page); 52 void gth_image_viewer_page_set_pixbuf (GthImageViewerPage *page, 53 GdkPixbuf *pixbuf, 54 gboolean add_to_history); 55 cairo_surface_t * gth_image_viewer_page_get_current_image (GthImageViewerPage *page); 56 cairo_surface_t * gth_image_viewer_page_get_modified_image (GthImageViewerPage *page); 57 void gth_image_viewer_page_set_image (GthImageViewerPage *page, 58 cairo_surface_t *image, 59 gboolean add_to_history); 60 void gth_image_viewer_page_undo (GthImageViewerPage *page); 61 void gth_image_viewer_page_redo (GthImageViewerPage *page); 62 GthImageHistory * gth_image_viewer_page_get_history (GthImageViewerPage *self); 63 void gth_image_viewer_page_reset (GthImageViewerPage *self); 64 void gth_image_viewer_page_reset_viewer_tool (GthImageViewerPage *self); 65 gboolean gth_image_viewer_page_get_is_modified (GthImageViewerPage *self); 66 void gth_image_viewer_page_copy_image (GthImageViewerPage *self); 67 void gth_image_viewer_page_paste_image (GthImageViewerPage *self); 68 void gth_image_viewer_page_get_original (GthImageViewerPage *self, 69 GCancellable *cancellable, 70 GAsyncReadyCallback ready_callback, 71 gpointer user_data); 72 gboolean gth_image_viewer_page_get_original_finish (GthImageViewerPage *self, 73 GAsyncResult *result, 74 cairo_surface_t **image, 75 GError **error); 76 GthTask * gth_original_image_task_new (GthImageViewerPage *self); 77 cairo_surface_t * gth_original_image_task_get_image (GthTask *task); 78 void gth_image_viewer_page_apply_icc_profile (GthImageViewerPage *self, 79 gboolean apply); 80 81 G_END_DECLS 82 83 #endif /* GTH_IMAGE_VIEWER_PAGE_H */ 84