summaryrefslogtreecommitdiffstats
path: root/app/core/gimp-gui.h
blob: 49f27618474f4a5bcc94aee86ee91ffa5045aa5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
/* GIMP - The GNU Image Manipulation Program
 * Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

#ifndef __GIMP_GUI_H__
#define __GIMP_GUI_H__


typedef struct _GimpGui GimpGui;

struct _GimpGui
{
  void           (* ungrab)                 (Gimp                *gimp);

  void           (* threads_enter)          (Gimp                *gimp);
  void           (* threads_leave)          (Gimp                *gimp);

  void           (* set_busy)               (Gimp                *gimp);
  void           (* unset_busy)             (Gimp                *gimp);

  void           (* show_message)           (Gimp                *gimp,
                                             GObject             *handler,
                                             GimpMessageSeverity  severity,
                                             const gchar         *domain,
                                             const gchar         *message);
  void           (* help)                   (Gimp                *gimp,
                                             GimpProgress        *progress,
                                             const gchar         *help_domain,
                                             const gchar         *help_id);

  gboolean       (* wait)                   (Gimp                *gimp,
                                             GimpWaitable        *waitable,
                                             const gchar         *message);

  const gchar  * (* get_program_class)      (Gimp                *gimp);
  gchar        * (* get_display_name)       (Gimp                *gimp,
                                             gint                 display_ID,
                                             GObject            **screen,
                                             gint                *monitor);
  guint32        (* get_user_time)          (Gimp                *gimp);

  GFile        * (* get_theme_dir)          (Gimp                *gimp);
  GFile        * (* get_icon_theme_dir)     (Gimp                *gimp);

  GimpObject   * (* get_window_strategy)    (Gimp                *gimp);
  GimpObject   * (* get_empty_display)      (Gimp                *gimp);
  GimpObject   * (* display_get_by_id)      (Gimp                *gimp,
                                             gint                 ID);
  gint           (* display_get_id)         (GimpObject          *display);
  guint32        (* display_get_window_id)  (GimpObject          *display);
  GimpObject   * (* display_create)         (Gimp                *gimp,
                                             GimpImage           *image,
                                             GimpUnit             unit,
                                             gdouble              scale,
                                             GObject             *screen,
                                             gint                 monitor);
  void           (* display_delete)         (GimpObject          *display);
  void           (* displays_reconnect)     (Gimp                *gimp,
                                             GimpImage           *old_image,
                                             GimpImage           *new_image);

  GimpProgress * (* progress_new)           (Gimp                *gimp,
                                             GimpObject          *display);
  void           (* progress_free)          (Gimp                *gimp,
                                             GimpProgress        *progress);

  gboolean       (* pdb_dialog_new)         (Gimp                *gimp,
                                             GimpContext         *context,
                                             GimpProgress        *progress,
                                             GimpContainer       *container,
                                             const gchar         *title,
                                             const gchar         *callback_name,
                                             const gchar         *object_name,
                                             va_list              args);
  gboolean       (* pdb_dialog_set)         (Gimp                *gimp,
                                             GimpContainer       *container,
                                             const gchar         *callback_name,
                                             const gchar         *object_name,
                                             va_list              args);
  gboolean       (* pdb_dialog_close)       (Gimp                *gimp,
                                             GimpContainer       *container,
                                             const gchar         *callback_name);
  gboolean       (* recent_list_add_file)   (Gimp                *gimp,
                                             GFile               *file,
                                             const gchar         *mime_type);
  void           (* recent_list_load)       (Gimp                *gimp);

  GMountOperation
               * (* get_mount_operation)    (Gimp                *gimp,
                                             GimpProgress        *progress);

  GimpColorProfilePolicy
                 (* query_profile_policy)   (Gimp                *gimp,
                                             GimpImage           *image,
                                             GimpContext         *context,
                                             GimpColorProfile   **dest_profile,
                                             GimpColorRenderingIntent *intent,
                                             gboolean            *bpc,
                                             gboolean            *dont_ask);
};


void           gimp_gui_init               (Gimp                *gimp);

void           gimp_gui_ungrab             (Gimp                *gimp);

void           gimp_threads_enter          (Gimp                *gimp);
void           gimp_threads_leave          (Gimp                *gimp);

GimpObject   * gimp_get_window_strategy    (Gimp                *gimp);
GimpObject   * gimp_get_empty_display      (Gimp                *gimp);
GimpObject   * gimp_get_display_by_ID      (Gimp                *gimp,
                                            gint                 ID);
gint           gimp_get_display_ID         (Gimp                *gimp,
                                            GimpObject          *display);
guint32        gimp_get_display_window_id  (Gimp                *gimp,
                                            GimpObject          *display);
GimpObject   * gimp_create_display         (Gimp                *gimp,
                                            GimpImage           *image,
                                            GimpUnit             unit,
                                            gdouble              scale,
                                            GObject             *screen,
                                            gint                 monitor);
void           gimp_delete_display         (Gimp                *gimp,
                                            GimpObject          *display);
void           gimp_reconnect_displays     (Gimp                *gimp,
                                            GimpImage           *old_image,
                                            GimpImage           *new_image);

void           gimp_set_busy               (Gimp                *gimp);
void           gimp_set_busy_until_idle    (Gimp                *gimp);
void           gimp_unset_busy             (Gimp                *gimp);

void           gimp_show_message           (Gimp                *gimp,
                                            GObject             *handler,
                                            GimpMessageSeverity  severity,
                                            const gchar         *domain,
                                            const gchar         *message);
void           gimp_help                   (Gimp                *gimp,
                                            GimpProgress        *progress,
                                            const gchar         *help_domain,
                                            const gchar         *help_id);

void           gimp_wait                   (Gimp                *gimp,
                                            GimpWaitable        *waitable,
                                            const gchar         *format,
                                            ...) G_GNUC_PRINTF (3, 4);

GimpProgress * gimp_new_progress           (Gimp                *gimp,
                                            GimpObject          *display);
void           gimp_free_progress          (Gimp                *gimp,
                                            GimpProgress        *progress);

const gchar  * gimp_get_program_class      (Gimp                *gimp);
gchar        * gimp_get_display_name       (Gimp                *gimp,
                                            gint                 display_ID,
                                            GObject            **screen,
                                            gint                *monitor);
guint32        gimp_get_user_time          (Gimp                *gimp);
GFile        * gimp_get_theme_dir          (Gimp                *gimp);
GFile        * gimp_get_icon_theme_dir     (Gimp                *gimp);

gboolean       gimp_pdb_dialog_new         (Gimp                *gimp,
                                            GimpContext         *context,
                                            GimpProgress        *progress,
                                            GimpContainer       *container,
                                            const gchar         *title,
                                            const gchar         *callback_name,
                                            const gchar         *object_name,
                                            ...) G_GNUC_NULL_TERMINATED;
gboolean       gimp_pdb_dialog_set         (Gimp                *gimp,
                                            GimpContainer       *container,
                                            const gchar         *callback_name,
                                            const gchar         *object_name,
                                            ...) G_GNUC_NULL_TERMINATED;
gboolean       gimp_pdb_dialog_close       (Gimp                *gimp,
                                            GimpContainer       *container,
                                            const gchar         *callback_name);
gboolean       gimp_recent_list_add_file   (Gimp                *gimp,
                                            GFile               *file,
                                            const gchar         *mime_type);
void           gimp_recent_list_load       (Gimp                *gimp);

GMountOperation
             * gimp_get_mount_operation    (Gimp                *gimp,
                                            GimpProgress        *progress);

GimpColorProfilePolicy
               gimp_query_profile_policy   (Gimp                *gimp,
                                            GimpImage           *image,
                                            GimpContext         *context,
                                            GimpColorProfile   **dest_profile,
                                            GimpColorRenderingIntent *intent,
                                            gboolean            *bpc,
                                            gboolean            *dont_ask);


#endif  /* __GIMP_GUI_H__ */