File: gimp.h

package info (click to toggle)
gimp 3.0.4-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 210,076 kB
  • sloc: ansic: 842,287; lisp: 10,761; python: 10,318; cpp: 7,238; perl: 4,355; sh: 1,043; xml: 963; yacc: 609; lex: 348; javascript: 150; makefile: 43
file content (208 lines) | stat: -rw-r--r-- 7,588 bytes parent folder | download
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
/* LIBGIMP - The GIMP Library
 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
 *
 * gimp.h
 *
 * This library is free software: you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library.  If not, see
 * <https://www.gnu.org/licenses/>.
 */

#ifndef __GIMP_H__
#define __GIMP_H__

#include <cairo.h>
#include <glib-object.h>
#include <gegl.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <pango/pango.h>

#include <libgimpbase/gimpbase.h>
#include <libgimpcolor/gimpcolor.h>
#include <libgimpconfig/gimpconfig.h>
#include <libgimpmath/gimpmath.h>

#define __GIMP_H_INSIDE__

#include <libgimp/gimpenums.h>
#include <libgimp/gimptypes.h>

#include <libgimp/gimpbatchprocedure.h>
#include <libgimp/gimpbrush.h>
#include <libgimp/gimpchannel.h>
#include <libgimp/gimpdisplay.h>
#include <libgimp/gimpdrawable.h>
#include <libgimp/gimpdrawablefilter.h>
#include <libgimp/gimpdrawablefilterconfig.h>
#include <libgimp/gimpexportoptions.h>
#include <libgimp/gimpexportprocedure.h>
#include <libgimp/gimpfont.h>
#include <libgimp/gimpgimprc.h>
#include <libgimp/gimpgradient.h>
#include <libgimp/gimpgrouplayer.h>
#include <libgimp/gimpimage.h>
#include <libgimp/gimpimagecolorprofile.h>
#include <libgimp/gimpimagemetadata.h>
#include <libgimp/gimpimageprocedure.h>
#include <libgimp/gimpitem.h>
#include <libgimp/gimplayer.h>
#include <libgimp/gimplayermask.h>
#include <libgimp/gimploadprocedure.h>
#include <libgimp/gimppalette.h>
#include <libgimp/gimpparamspecs.h>
#include <libgimp/gimppath.h>
#include <libgimp/gimppattern.h>
#include <libgimp/gimppdb.h>
#include <libgimp/gimpplugin.h>
#include <libgimp/gimpprocedureconfig.h>
#include <libgimp/gimpprocedure-params.h>
#include <libgimp/gimpprogress.h>
#include <libgimp/gimpresource.h>
#include <libgimp/gimpselection.h>
#include <libgimp/gimptextlayer.h>
#include <libgimp/gimpthumbnailprocedure.h>
#include <libgimp/gimpvectorloadprocedure.h>

#include <libgimp/gimp_pdb_headers.h>

#undef __GIMP_H_INSIDE__

#ifdef G_OS_WIN32
#include <stdlib.h> /* For __argc and __argv */
#endif

G_BEGIN_DECLS


/**
 * GIMP_MAIN:
 * @plug_in_type: The #GType of the plug-in's #GimpPlugIn subclass
 *
 * A macro that expands to the appropriate main() function for the
 * platform being compiled for.
 *
 * To use this macro, simply place a line that contains just the code:
 *
 * ```C
 * GIMP_MAIN (MY_TYPE_PLUG_IN)
 * ```
 *
 * at the toplevel of your file. No semicolon should be used.
 *
 * Non-C plug-ins won't have this function and should use
 * [func@Gimp.main] instead.
 *
 * Since: 3.0
 **/

#ifdef G_OS_WIN32

/* Define WinMain() because plug-ins are built as GUI applications. Also
 * define a main() in case some plug-in still is built as a console
 * application.
 */
#  ifdef __GNUC__
#    ifndef _stdcall
#      define _stdcall __attribute__((stdcall))
#    endif
#  endif

#  define GIMP_MAIN(plug_in_type)                       \
   struct HINSTANCE__;                                  \
                                                        \
   int _stdcall                                         \
   WinMain (struct HINSTANCE__ *hInstance,              \
            struct HINSTANCE__ *hPrevInstance,          \
            char *lpszCmdLine,                          \
            int   nCmdShow);                            \
                                                        \
   int _stdcall                                         \
   WinMain (struct HINSTANCE__ *hInstance,              \
            struct HINSTANCE__ *hPrevInstance,          \
            char *lpszCmdLine,                          \
            int   nCmdShow)                             \
   {                                                    \
     return gimp_main (plug_in_type,                    \
                       __argc, __argv);                 \
   }                                                    \
                                                        \
   int                                                  \
   main (int argc, char *argv[])                        \
   {                                                    \
     /* Use __argc and __argv here, too, as they work   \
      * better with mingw-w64.                          \
      */                                                \
     return gimp_main (plug_in_type,                    \
                       __argc, __argv);                 \
   }
#else
#  define GIMP_MAIN(plug_in_type)                       \
   int                                                  \
   main (int argc, char *argv[])                        \
   {                                                    \
     return gimp_main (plug_in_type,                    \
                       argc, argv);                     \
   }
#endif


/* The main procedure that must be called with the plug-in's
 * GimpPlugIn subclass type and the 'argc' and 'argv' that are passed
 * to "main".
 */
gint                gimp_main                 (GType  plug_in_type,
                                               gint   argc,
                                               gchar *argv[]);

/* Return the GimpPlugIn singleton of this plug-in process
 */
GimpPlugIn        * gimp_get_plug_in          (void);

/* Return the GimpPDB singleton of this plug-in process
 */
GimpPDB           * gimp_get_pdb              (void);

/* Forcefully causes the gimp library to exit and
 * close down its connection to main gimp application.
 */
void                gimp_quit                 (void) G_GNUC_NORETURN;

/* Return various constants given by the GIMP core at plug-in config time.
 */
guint               gimp_tile_width           (void) G_GNUC_CONST;
guint               gimp_tile_height          (void) G_GNUC_CONST;
gboolean            gimp_show_help_button     (void) G_GNUC_CONST;
gboolean            gimp_export_color_profile (void) G_GNUC_CONST;
gboolean            gimp_export_comment       (void) G_GNUC_CONST;
gboolean            gimp_export_exif          (void) G_GNUC_CONST;
gboolean            gimp_export_xmp           (void) G_GNUC_CONST;
gboolean            gimp_export_iptc          (void) G_GNUC_CONST;
gboolean            gimp_export_thumbnail     (void) G_GNUC_CONST;
gint                gimp_get_num_processors   (void) G_GNUC_CONST;
GimpCheckSize       gimp_check_size           (void) G_GNUC_CONST;
GimpCheckType       gimp_check_type           (void) G_GNUC_CONST;
const GeglColor   * gimp_check_custom_color1  (void) G_GNUC_CONST;
const GeglColor   * gimp_check_custom_color2  (void) G_GNUC_CONST;
GimpDisplay       * gimp_default_display      (void) G_GNUC_CONST;
const gchar       * gimp_wm_class             (void) G_GNUC_CONST;
const gchar       * gimp_display_name         (void) G_GNUC_CONST;
gint                gimp_monitor_number       (void) G_GNUC_CONST;
guint32             gimp_user_time            (void) G_GNUC_CONST;
const gchar       * gimp_icon_theme_dir       (void) G_GNUC_CONST;

const gchar       * gimp_get_progname         (void) G_GNUC_CONST;


G_END_DECLS

#endif /* __GIMP_H__ */