1 /* GIMP - The GNU Image Manipulation Program 2 * Copyright (C) 1995 Spencer Kimball and Peter Mattis 3 * 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <https://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef __GIMP_PROJECTION_H__ 19 #define __GIMP_PROJECTION_H__ 20 21 22 #include "gimpobject.h" 23 24 25 #define GIMP_TYPE_PROJECTION (gimp_projection_get_type ()) 26 #define GIMP_PROJECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PROJECTION, GimpProjection)) 27 #define GIMP_PROJECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PROJECTION, GimpProjectionClass)) 28 #define GIMP_IS_PROJECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PROJECTION)) 29 #define GIMP_IS_PROJECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PROJECTION)) 30 #define GIMP_PROJECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PROJECTION, GimpProjectionClass)) 31 32 33 typedef struct _GimpProjectionPrivate GimpProjectionPrivate; 34 typedef struct _GimpProjectionClass GimpProjectionClass; 35 36 struct _GimpProjection 37 { 38 GimpObject parent_instance; 39 40 GimpProjectionPrivate *priv; 41 }; 42 43 struct _GimpProjectionClass 44 { 45 GimpObjectClass parent_class; 46 47 void (* update) (GimpProjection *proj, 48 gboolean now, 49 gint x, 50 gint y, 51 gint width, 52 gint height); 53 }; 54 55 56 GType gimp_projection_get_type (void) G_GNUC_CONST; 57 58 GimpProjection * gimp_projection_new (GimpProjectable *projectable); 59 60 void gimp_projection_set_priority (GimpProjection *projection, 61 gint priority); 62 gint gimp_projection_get_priority (GimpProjection *projection); 63 64 void gimp_projection_set_priority_rect (GimpProjection *proj, 65 gint x, 66 gint y, 67 gint width, 68 gint height); 69 70 void gimp_projection_stop_rendering (GimpProjection *proj); 71 72 void gimp_projection_flush (GimpProjection *proj); 73 void gimp_projection_flush_now (GimpProjection *proj, 74 gboolean direct); 75 void gimp_projection_finish_draw (GimpProjection *proj); 76 77 gint64 gimp_projection_estimate_memsize (GimpImageBaseType type, 78 GimpComponentType component_type, 79 gint width, 80 gint height); 81 82 83 #endif /* __GIMP_PROJECTION_H__ */ 84