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_DISPLAY_H__
19 #define __GIMP_DISPLAY_H__
20 
21 
22 #include "core/gimpobject.h"
23 
24 
25 #define GIMP_TYPE_DISPLAY            (gimp_display_get_type ())
26 #define GIMP_DISPLAY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DISPLAY, GimpDisplay))
27 #define GIMP_DISPLAY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DISPLAY, GimpDisplayClass))
28 #define GIMP_IS_DISPLAY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_DISPLAY))
29 #define GIMP_IS_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_DISPLAY))
30 #define GIMP_DISPLAY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_DISPLAY, GimpDisplayClass))
31 
32 
33 typedef struct _GimpDisplayClass GimpDisplayClass;
34 
35 struct _GimpDisplay
36 {
37   GimpObject         parent_instance;
38 
39   Gimp              *gimp;
40   GimpDisplayConfig *config;
41 
42 };
43 
44 struct _GimpDisplayClass
45 {
46   GimpObjectClass  parent_class;
47 };
48 
49 
50 GType              gimp_display_get_type        (void) G_GNUC_CONST;
51 
52 GimpDisplay      * gimp_display_new             (Gimp              *gimp,
53                                                  GimpImage         *image,
54                                                  GimpUnit           unit,
55                                                  gdouble            scale,
56                                                  GimpUIManager     *popup_manager,
57                                                  GimpDialogFactory *dialog_factory,
58                                                  GdkScreen         *screen,
59                                                  gint               monitor);
60 void               gimp_display_delete          (GimpDisplay       *display);
61 void               gimp_display_close           (GimpDisplay       *display);
62 
63 gint               gimp_display_get_ID          (GimpDisplay       *display);
64 GimpDisplay      * gimp_display_get_by_ID       (Gimp              *gimp,
65                                                  gint               ID);
66 
67 gchar            * gimp_display_get_action_name (GimpDisplay       *display);
68 
69 Gimp             * gimp_display_get_gimp        (GimpDisplay       *display);
70 
71 GimpImage        * gimp_display_get_image       (GimpDisplay       *display);
72 void               gimp_display_set_image       (GimpDisplay       *display,
73                                                  GimpImage         *image);
74 
75 gint               gimp_display_get_instance    (GimpDisplay       *display);
76 
77 GimpDisplayShell * gimp_display_get_shell       (GimpDisplay       *display);
78 
79 void               gimp_display_empty           (GimpDisplay       *display);
80 void               gimp_display_fill            (GimpDisplay       *display,
81                                                  GimpImage         *image,
82                                                  GimpUnit           unit,
83                                                  gdouble            scale);
84 
85 void               gimp_display_update_bounding_box
86                                                 (GimpDisplay       *display);
87 
88 void               gimp_display_update_area     (GimpDisplay       *display,
89                                                  gboolean           now,
90                                                  gint               x,
91                                                  gint               y,
92                                                  gint               w,
93                                                  gint               h);
94 
95 void               gimp_display_flush           (GimpDisplay       *display);
96 void               gimp_display_flush_now       (GimpDisplay       *display);
97 
98 
99 #endif /*  __GIMP_DISPLAY_H__  */
100