Debian Codegraph @

src/gimp2/print_gimp.h

raw symbols SCIP
1 /*
2 *
3 * Print plug-in for the GIMP.
4 *
5 * Copyright 1997-2000 Michael Sweet ([email protected]),
6 * Robert Krawitz ([email protected]). and Steve Miller ([email protected]
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the Free
10 * Software Foundation; either version 2 of the License, or (at your option)
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 * for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 *
21 *
22 * Revision History:
23 *
24 * See ChangeLog
25 */
26
27 #ifndef __PRINT_GIMP_H__
28 #define __PRINT_GIMP_H__
29
30 #ifdef __GNUC__
31 #ifndef inline
32 #define inline __inline__
33 #endif
34 #endif
35
36 #include <gutenprint/gutenprint.h>
37 #include <gutenprintui2/gutenprintui.h>
38
39 #pragma GCC diagnostic push
40 #pragma GCC diagnostic ignored "-Wpedantic"
41 #include <libgimp/gimp.h>
42 #include <libgimp/gimpui.h>
43 #pragma GCC diagnostic pop
44
45 /* How to create an Image wrapping a Gimp drawable */
46 extern stpui_image_t *Image_GimpDrawable_new(GimpDrawable *drawable, gint32);
47
48 extern void do_gimp_install_procedure(const char *blurb, const char *help,
49 const char *auth, const char *copy,
50 const char *types, int n_args,
51 GimpParamDef *args);
52
53 /*
54 * Work around GIMP library not being const-safe. This is a very ugly
55 * hack, but the excessive warnings generated can mask more serious
56 * problems.
57 */
58
59 #define BAD_CONST_CHAR char *
60
61 #pragma GCC diagnostic push
62 #pragma GCC diagnostic ignored "-Wpointer-to-int-cast"
63 static inline gint
64 p2gint(void *p)
65 {
66 return (gint) p;
67 }
68 #pragma GCC diagnostic pop
69
70 #pragma GCC diagnostic push
71 #pragma GCC diagnostic ignored "-Wint-to-pointer-cast"
72 static inline void *
73 gint2p(int i)
74 {
75 return (gpointer) i;
76 }
77 #pragma GCC diagnostic pop
78
79 #pragma GCC diagnostic ignored "-Woverlength-strings"
80 #pragma GCC diagnostic push
81 #pragma GCC diagnostic ignored "-Wcast-qual"
82 static inline void *
83 cast_safe(const void *ptr)
84 {
85 return (void *)ptr;
86 }
87 #pragma GCC diagnostic pop
88
89 #endif /* __PRINT_GIMP_H__ */