1 /* LIBGIMP - The GIMP Library 2 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball 3 * 4 * gimpdrawablepreview.h 5 * 6 * This library is free software: you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 3 of the License, or (at your option) any later version. 10 * 11 * This library 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 GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library. If not, see 18 * <https://www.gnu.org/licenses/>. 19 */ 20 21 #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) 22 #error "Only <libgimp/gimpui.h> can be included directly." 23 #endif 24 25 #ifndef __GIMP_DRAWABLE_PREVIEW_H__ 26 #define __GIMP_DRAWABLE_PREVIEW_H__ 27 28 G_BEGIN_DECLS 29 30 31 /* For information look into the C source or the html documentation */ 32 33 34 #define GIMP_TYPE_DRAWABLE_PREVIEW (gimp_drawable_preview_get_type ()) 35 #define GIMP_DRAWABLE_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DRAWABLE_PREVIEW, GimpDrawablePreview)) 36 #define GIMP_DRAWABLE_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DRAWABLE_PREVIEW, GimpDrawablePreviewClass)) 37 #define GIMP_IS_DRAWABLE_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_DRAWABLE_PREVIEW)) 38 #define GIMP_IS_DRAWABLE_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_DRAWABLE_PREVIEW)) 39 #define GIMP_DRAWABLE_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_DRAWABLE_PREVIEW, GimpDrawablePreviewClass)) 40 41 42 typedef struct _GimpDrawablePreviewClass GimpDrawablePreviewClass; 43 44 struct _GimpDrawablePreview 45 { 46 GimpScrolledPreview parent_instance; 47 48 GimpDrawable *drawable; 49 }; 50 51 struct _GimpDrawablePreviewClass 52 { 53 GimpScrolledPreviewClass parent_class; 54 55 /* Padding for future expansion */ 56 void (* _gimp_reserved1) (void); 57 void (* _gimp_reserved2) (void); 58 void (* _gimp_reserved3) (void); 59 void (* _gimp_reserved4) (void); 60 }; 61 62 63 GType gimp_drawable_preview_get_type (void) G_GNUC_CONST; 64 65 GtkWidget * gimp_drawable_preview_new_from_drawable_id (gint32 drawable_ID); 66 gint32 gimp_drawable_preview_get_drawable_id (GimpDrawablePreview *preview); 67 68 GIMP_DEPRECATED_FOR(gimp_drawable_preview_new_from_drawable_id) 69 GtkWidget * gimp_drawable_preview_new (GimpDrawable *drawable, 70 gboolean *toggle); 71 GIMP_DEPRECATED_FOR(gimp_drawable_preview_get_drawable_id) 72 GimpDrawable * gimp_drawable_preview_get_drawable (GimpDrawablePreview *preview); 73 74 GIMP_DEPRECATED_FOR(gimp_preview_draw_buffer) 75 void gimp_drawable_preview_draw_region (GimpDrawablePreview *preview, 76 const GimpPixelRgn *region); 77 78 /* for internal use only */ 79 G_GNUC_INTERNAL void _gimp_drawable_preview_area_draw_thumb (GimpPreviewArea *area, 80 gint32 drawable_ID, 81 gint width, 82 gint height); 83 G_GNUC_INTERNAL gboolean _gimp_drawable_preview_get_bounds (gint32 drawable_ID, 84 gint *xmin, 85 gint *ymin, 86 gint *xmax, 87 gint *ymax); 88 89 90 G_END_DECLS 91 92 #endif /* __GIMP_DRAWABLE_PREVIEW_H__ */ 93 94