@img/sharp-libvips-dev 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/cplusplus/VConnection.cpp +54 -54
- package/cplusplus/VError.cpp +20 -18
- package/cplusplus/VImage.cpp +636 -589
- package/cplusplus/VInterpolate.cpp +22 -22
- package/cplusplus/VRegion.cpp +4 -4
- package/cplusplus/vips-operators.cpp +2326 -2301
- package/include/aom/aom_codec.h +10 -6
- package/include/aom/aom_decoder.h +1 -1
- package/include/aom/aom_encoder.h +9 -2
- package/include/aom/aomcx.h +72 -3
- package/include/cairo/cairo-ft.h +1 -1
- package/include/cairo/cairo-gobject.h +8 -0
- package/include/cairo/cairo-svg.h +3 -3
- package/include/cairo/cairo-version.h +2 -2
- package/include/cairo/cairo.h +91 -24
- package/include/glib-2.0/glib/gmacros.h +1 -1
- package/include/glib-2.0/glib/gtestutils.h +1 -1
- package/include/glib-2.0/gobject/gtype.h +7 -7
- package/include/harfbuzz/hb-version.h +2 -2
- package/include/hwy/aligned_allocator.h +211 -0
- package/include/hwy/base.h +1517 -0
- package/include/hwy/cache_control.h +108 -0
- package/include/hwy/detect_compiler_arch.h +281 -0
- package/include/hwy/detect_targets.h +644 -0
- package/include/hwy/foreach_target.h +340 -0
- package/include/hwy/highway.h +435 -0
- package/include/hwy/highway_export.h +74 -0
- package/include/hwy/nanobenchmark.h +171 -0
- package/include/hwy/ops/arm_neon-inl.h +8913 -0
- package/include/hwy/ops/arm_sve-inl.h +5105 -0
- package/include/hwy/ops/emu128-inl.h +2811 -0
- package/include/hwy/ops/generic_ops-inl.h +4745 -0
- package/include/hwy/ops/ppc_vsx-inl.h +5716 -0
- package/include/hwy/ops/rvv-inl.h +5070 -0
- package/include/hwy/ops/scalar-inl.h +1995 -0
- package/include/hwy/ops/set_macros-inl.h +578 -0
- package/include/hwy/ops/shared-inl.h +539 -0
- package/include/hwy/ops/tuple-inl.h +125 -0
- package/include/hwy/ops/wasm_128-inl.h +5917 -0
- package/include/hwy/ops/x86_128-inl.h +11173 -0
- package/include/hwy/ops/x86_256-inl.h +7529 -0
- package/include/hwy/ops/x86_512-inl.h +6849 -0
- package/include/hwy/per_target.h +44 -0
- package/include/hwy/print-inl.h +62 -0
- package/include/hwy/print.h +75 -0
- package/include/hwy/robust_statistics.h +148 -0
- package/include/hwy/targets.h +338 -0
- package/include/hwy/timer-inl.h +200 -0
- package/include/hwy/timer.h +55 -0
- package/include/jconfig.h +2 -2
- package/include/jpeglib.h +3 -2
- package/include/libheif/heif.h +461 -384
- package/include/libheif/heif_cxx.h +4 -1
- package/include/libheif/heif_plugin.h +1 -1
- package/include/libheif/heif_properties.h +138 -0
- package/include/libheif/heif_regions.h +866 -0
- package/include/libheif/heif_version.h +3 -3
- package/include/libpng16/pnglibconf.h +1 -1
- package/include/pnglibconf.h +1 -1
- package/include/vips/VConnection8.h +43 -49
- package/include/vips/VError8.h +27 -24
- package/include/vips/VImage8.h +4861 -4597
- package/include/vips/VInterpolate8.h +24 -27
- package/include/vips/VRegion8.h +32 -33
- package/include/vips/arithmetic.h +169 -169
- package/include/vips/basic.h +33 -33
- package/include/vips/buf.h +56 -54
- package/include/vips/colour.h +95 -95
- package/include/vips/connection.h +190 -193
- package/include/vips/conversion.h +91 -91
- package/include/vips/convolution.h +36 -30
- package/include/vips/create.h +63 -63
- package/include/vips/dbuf.h +35 -37
- package/include/vips/debug.h +65 -33
- package/include/vips/draw.h +41 -41
- package/include/vips/enumtypes.h +54 -51
- package/include/vips/error.h +63 -63
- package/include/vips/foreign.h +263 -223
- package/include/vips/format.h +48 -48
- package/include/vips/freqfilt.h +22 -22
- package/include/vips/gate.h +55 -47
- package/include/vips/generate.h +34 -34
- package/include/vips/header.h +111 -101
- package/include/vips/histogram.h +28 -28
- package/include/vips/image.h +213 -213
- package/include/vips/interpolate.h +40 -41
- package/include/vips/memory.h +61 -52
- package/include/vips/morphology.h +24 -24
- package/include/vips/mosaicing.h +32 -33
- package/include/vips/object.h +371 -357
- package/include/vips/operation.h +68 -67
- package/include/vips/private.h +76 -76
- package/include/vips/rect.h +26 -26
- package/include/vips/region.h +92 -92
- package/include/vips/resample.h +38 -38
- package/include/vips/sbuf.h +53 -54
- package/include/vips/semaphore.h +24 -24
- package/include/vips/thread.h +30 -27
- package/include/vips/threadpool.h +48 -49
- package/include/vips/transform.h +39 -39
- package/include/vips/type.h +90 -85
- package/include/vips/util.h +274 -229
- package/include/vips/vector.h +24 -144
- package/include/vips/version.h +9 -9
- package/include/vips/vips.h +41 -40
- package/include/zlib.h +23 -19
- package/package.json +1 -1
- package/versions.json +9 -9
package/include/vips/object.h
CHANGED
|
@@ -3,28 +3,28 @@
|
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Copyright (C) 1991-2003 The National Gallery
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
This library is free software; you can redistribute it and/or
|
|
9
|
+
modify it under the terms of the GNU Lesser General Public
|
|
10
|
+
License as published by the Free Software Foundation; either
|
|
11
|
+
version 2.1 of the License, or (at your option) any later version.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
This library is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
16
|
+
Lesser General Public License for more details.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
You should have received a copy of the GNU Lesser General Public
|
|
19
|
+
License along with this library; if not, write to the Free Software
|
|
20
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
21
|
+
02110-1301 USA
|
|
22
22
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
/*
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
|
28
28
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
@@ -43,15 +43,18 @@ extern "C" {
|
|
|
43
43
|
/* Handy!
|
|
44
44
|
*/
|
|
45
45
|
#ifdef VIPS_DEBUG
|
|
46
|
-
#define VIPS_UNREF(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
#define VIPS_UNREF(X) \
|
|
47
|
+
G_STMT_START \
|
|
48
|
+
{ \
|
|
49
|
+
if (X) { \
|
|
50
|
+
g_assert(G_OBJECT(X)->ref_count > 0); \
|
|
51
|
+
g_object_unref(X); \
|
|
52
|
+
(X) = 0; \
|
|
53
|
+
} \
|
|
51
54
|
} \
|
|
52
|
-
|
|
55
|
+
G_STMT_END
|
|
53
56
|
#else /*!VIPS_DEBUG*/
|
|
54
|
-
#define VIPS_UNREF(
|
|
57
|
+
#define VIPS_UNREF(X) VIPS_FREEF(g_object_unref, (X))
|
|
55
58
|
#endif /*VIPS_DEBUG*/
|
|
56
59
|
|
|
57
60
|
typedef struct _VipsObject VipsObject;
|
|
@@ -69,188 +72,199 @@ typedef enum /*< flags >*/ {
|
|
|
69
72
|
VIPS_ARGUMENT_INPUT = 16,
|
|
70
73
|
VIPS_ARGUMENT_OUTPUT = 32,
|
|
71
74
|
VIPS_ARGUMENT_DEPRECATED = 64,
|
|
72
|
-
VIPS_ARGUMENT_MODIFY = 128
|
|
75
|
+
VIPS_ARGUMENT_MODIFY = 128,
|
|
76
|
+
VIPS_ARGUMENT_NON_HASHABLE = 256
|
|
73
77
|
} VipsArgumentFlags;
|
|
74
78
|
|
|
75
79
|
/* Useful flag combinations. User-visible ones are:
|
|
76
|
-
|
|
77
|
-
VIPS_ARGUMENT_REQUIRED_INPUT Eg. the "left" argument for an add operation
|
|
78
|
-
|
|
79
|
-
VIPS_ARGUMENT_OPTIONAL_INPUT Eg. the "caption" for an object
|
|
80
|
-
|
|
81
|
-
VIPS_ARGUMENT_REQUIRED_OUTPUT Eg. the "result" of an add operation
|
|
82
|
-
|
|
83
|
-
VIPS_ARGUMENT_OPTIONAL_OUTPUT
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
*
|
|
81
|
+
* VIPS_ARGUMENT_REQUIRED_INPUT Eg. the "left" argument for an add operation
|
|
82
|
+
*
|
|
83
|
+
* VIPS_ARGUMENT_OPTIONAL_INPUT Eg. the "caption" for an object
|
|
84
|
+
*
|
|
85
|
+
* VIPS_ARGUMENT_REQUIRED_OUTPUT Eg. the "result" of an add operation
|
|
86
|
+
*
|
|
87
|
+
* VIPS_ARGUMENT_OPTIONAL_OUTPUT Eg. the x pos of the image minimum
|
|
88
|
+
*
|
|
89
|
+
* Other combinations are used internally, eg. supplying the cast-table for an
|
|
90
|
+
* arithmetic operation
|
|
88
91
|
*/
|
|
89
92
|
|
|
90
93
|
#define VIPS_ARGUMENT_REQUIRED_INPUT \
|
|
91
94
|
(VIPS_ARGUMENT_INPUT | \
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
VIPS_ARGUMENT_REQUIRED | \
|
|
96
|
+
VIPS_ARGUMENT_CONSTRUCT)
|
|
94
97
|
|
|
95
98
|
#define VIPS_ARGUMENT_OPTIONAL_INPUT \
|
|
96
99
|
(VIPS_ARGUMENT_INPUT | \
|
|
97
|
-
|
|
100
|
+
VIPS_ARGUMENT_CONSTRUCT)
|
|
98
101
|
|
|
99
102
|
#define VIPS_ARGUMENT_REQUIRED_OUTPUT \
|
|
100
103
|
(VIPS_ARGUMENT_OUTPUT | \
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
VIPS_ARGUMENT_REQUIRED | \
|
|
105
|
+
VIPS_ARGUMENT_CONSTRUCT)
|
|
103
106
|
|
|
104
107
|
#define VIPS_ARGUMENT_OPTIONAL_OUTPUT \
|
|
105
108
|
(VIPS_ARGUMENT_OUTPUT | \
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
#define VIPS_ARG_IMAGE(
|
|
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
|
-
pspec
|
|
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
|
-
pspec
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
(
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
(
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
109
|
+
VIPS_ARGUMENT_CONSTRUCT)
|
|
110
|
+
|
|
111
|
+
#define VIPS_ARG_IMAGE(CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET) \
|
|
112
|
+
{ \
|
|
113
|
+
GParamSpec *pspec; \
|
|
114
|
+
\
|
|
115
|
+
pspec = g_param_spec_object((NAME), (LONG), (DESC), \
|
|
116
|
+
VIPS_TYPE_IMAGE, \
|
|
117
|
+
(GParamFlags) (G_PARAM_READWRITE)); \
|
|
118
|
+
g_object_class_install_property(G_OBJECT_CLASS(CLASS), \
|
|
119
|
+
vips_argument_get_id(), pspec); \
|
|
120
|
+
vips_object_class_install_argument(VIPS_OBJECT_CLASS(CLASS), \
|
|
121
|
+
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET)); \
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
#define VIPS_ARG_OBJECT(CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET, TYPE) \
|
|
125
|
+
{ \
|
|
126
|
+
GParamSpec *pspec; \
|
|
127
|
+
\
|
|
128
|
+
pspec = g_param_spec_object((NAME), (LONG), (DESC), \
|
|
129
|
+
TYPE, \
|
|
130
|
+
(GParamFlags) (G_PARAM_READWRITE)); \
|
|
131
|
+
g_object_class_install_property(G_OBJECT_CLASS(CLASS), \
|
|
132
|
+
vips_argument_get_id(), pspec); \
|
|
133
|
+
vips_object_class_install_argument(VIPS_OBJECT_CLASS(CLASS), \
|
|
134
|
+
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET)); \
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
#define VIPS_ARG_INTERPOLATE(CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET) \
|
|
138
|
+
VIPS_ARG_OBJECT(CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET, VIPS_TYPE_INTERPOLATE)
|
|
139
|
+
|
|
140
|
+
#define VIPS_ARG_BOOL(CLASS, NAME, PRIORITY, LONG, DESC, \
|
|
141
|
+
FLAGS, OFFSET, VALUE) \
|
|
142
|
+
{ \
|
|
143
|
+
GParamSpec *pspec; \
|
|
144
|
+
\
|
|
145
|
+
pspec = g_param_spec_boolean((NAME), (LONG), (DESC), \
|
|
146
|
+
(VALUE), \
|
|
147
|
+
(GParamFlags) (G_PARAM_READWRITE)); \
|
|
148
|
+
g_object_class_install_property(G_OBJECT_CLASS(CLASS), \
|
|
149
|
+
vips_argument_get_id(), pspec); \
|
|
150
|
+
vips_object_class_install_argument(VIPS_OBJECT_CLASS(CLASS), \
|
|
151
|
+
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET)); \
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
#define VIPS_ARG_DOUBLE(CLASS, NAME, PRIORITY, LONG, DESC, \
|
|
155
|
+
FLAGS, OFFSET, MIN, MAX, VALUE) \
|
|
156
|
+
{ \
|
|
157
|
+
GParamSpec *pspec; \
|
|
158
|
+
\
|
|
159
|
+
pspec = g_param_spec_double((NAME), (LONG), (DESC), \
|
|
160
|
+
(MIN), (MAX), (VALUE), \
|
|
161
|
+
(GParamFlags) (G_PARAM_READWRITE)); \
|
|
162
|
+
g_object_class_install_property(G_OBJECT_CLASS(CLASS), \
|
|
163
|
+
vips_argument_get_id(), pspec); \
|
|
164
|
+
vips_object_class_install_argument(VIPS_OBJECT_CLASS(CLASS), \
|
|
165
|
+
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET)); \
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
#define VIPS_ARG_BOXED(CLASS, NAME, PRIORITY, LONG, DESC, \
|
|
169
|
+
FLAGS, OFFSET, TYPE) \
|
|
170
|
+
{ \
|
|
171
|
+
GParamSpec *pspec; \
|
|
172
|
+
\
|
|
173
|
+
pspec = g_param_spec_boxed((NAME), (LONG), (DESC), \
|
|
174
|
+
(TYPE), \
|
|
175
|
+
(GParamFlags) (G_PARAM_READWRITE)); \
|
|
176
|
+
g_object_class_install_property(G_OBJECT_CLASS(CLASS), \
|
|
177
|
+
vips_argument_get_id(), pspec); \
|
|
178
|
+
vips_object_class_install_argument(VIPS_OBJECT_CLASS(CLASS), \
|
|
179
|
+
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET)); \
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
#define VIPS_ARG_INT(CLASS, NAME, PRIORITY, LONG, DESC, \
|
|
183
|
+
FLAGS, OFFSET, MIN, MAX, VALUE) \
|
|
184
|
+
{ \
|
|
185
|
+
GParamSpec *pspec; \
|
|
186
|
+
\
|
|
187
|
+
pspec = g_param_spec_int((NAME), (LONG), (DESC), \
|
|
188
|
+
(MIN), (MAX), (VALUE), \
|
|
189
|
+
(GParamFlags) (G_PARAM_READWRITE)); \
|
|
190
|
+
g_object_class_install_property(G_OBJECT_CLASS(CLASS), \
|
|
191
|
+
vips_argument_get_id(), pspec); \
|
|
192
|
+
vips_object_class_install_argument(VIPS_OBJECT_CLASS(CLASS), \
|
|
193
|
+
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET)); \
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
#define VIPS_ARG_UINT64(CLASS, NAME, PRIORITY, LONG, DESC, \
|
|
197
|
+
FLAGS, OFFSET, MIN, MAX, VALUE) \
|
|
198
|
+
{ \
|
|
199
|
+
GParamSpec *pspec; \
|
|
200
|
+
\
|
|
201
|
+
pspec = g_param_spec_uint64((NAME), (LONG), (DESC), \
|
|
202
|
+
(MIN), (MAX), (VALUE), \
|
|
203
|
+
(GParamFlags) (G_PARAM_READWRITE)); \
|
|
204
|
+
g_object_class_install_property(G_OBJECT_CLASS(CLASS), \
|
|
205
|
+
vips_argument_get_id(), pspec); \
|
|
206
|
+
vips_object_class_install_argument(VIPS_OBJECT_CLASS(CLASS), \
|
|
207
|
+
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET)); \
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
#define VIPS_ARG_ENUM(CLASS, NAME, PRIORITY, LONG, DESC, \
|
|
211
|
+
FLAGS, OFFSET, TYPE, VALUE) \
|
|
212
|
+
{ \
|
|
213
|
+
GParamSpec *pspec; \
|
|
214
|
+
\
|
|
215
|
+
pspec = g_param_spec_enum((NAME), (LONG), (DESC), \
|
|
216
|
+
(TYPE), (VALUE), \
|
|
217
|
+
(GParamFlags) (G_PARAM_READWRITE)); \
|
|
218
|
+
g_object_class_install_property(G_OBJECT_CLASS(CLASS), \
|
|
219
|
+
vips_argument_get_id(), pspec); \
|
|
220
|
+
vips_object_class_install_argument(VIPS_OBJECT_CLASS(CLASS), \
|
|
221
|
+
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET)); \
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
#define VIPS_ARG_FLAGS(CLASS, NAME, PRIORITY, LONG, DESC, \
|
|
225
|
+
FLAGS, OFFSET, TYPE, VALUE) \
|
|
226
|
+
{ \
|
|
227
|
+
GParamSpec *pspec; \
|
|
228
|
+
\
|
|
229
|
+
pspec = g_param_spec_flags((NAME), (LONG), (DESC), \
|
|
230
|
+
(TYPE), (VALUE), \
|
|
231
|
+
(GParamFlags) (G_PARAM_READWRITE)); \
|
|
232
|
+
g_object_class_install_property(G_OBJECT_CLASS(CLASS), \
|
|
233
|
+
vips_argument_get_id(), pspec); \
|
|
234
|
+
vips_object_class_install_argument(VIPS_OBJECT_CLASS(CLASS), \
|
|
235
|
+
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET)); \
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
#define VIPS_ARG_STRING(CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET, \
|
|
239
|
+
VALUE) \
|
|
240
|
+
{ \
|
|
241
|
+
GParamSpec *pspec; \
|
|
242
|
+
\
|
|
243
|
+
pspec = g_param_spec_string((NAME), (LONG), (DESC), \
|
|
244
|
+
(VALUE), \
|
|
245
|
+
(GParamFlags) (G_PARAM_READWRITE)); \
|
|
246
|
+
g_object_class_install_property(G_OBJECT_CLASS(CLASS), \
|
|
247
|
+
vips_argument_get_id(), pspec); \
|
|
248
|
+
vips_object_class_install_argument(VIPS_OBJECT_CLASS(CLASS), \
|
|
249
|
+
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET)); \
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
#define VIPS_ARG_POINTER(CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET) \
|
|
253
|
+
{ \
|
|
254
|
+
GParamSpec *pspec; \
|
|
255
|
+
\
|
|
256
|
+
pspec = g_param_spec_pointer((NAME), (LONG), (DESC), \
|
|
257
|
+
(GParamFlags) (G_PARAM_READWRITE)); \
|
|
258
|
+
g_object_class_install_property(G_OBJECT_CLASS(CLASS), \
|
|
259
|
+
vips_argument_get_id(), pspec); \
|
|
260
|
+
vips_object_class_install_argument(VIPS_OBJECT_CLASS(CLASS), \
|
|
261
|
+
pspec, (VipsArgumentFlags) (FLAGS), (PRIORITY), (OFFSET)); \
|
|
262
|
+
}
|
|
249
263
|
|
|
250
264
|
/* Keep one of these for every argument.
|
|
251
265
|
*/
|
|
252
266
|
typedef struct _VipsArgument {
|
|
253
|
-
GParamSpec *pspec;
|
|
267
|
+
GParamSpec *pspec; /* pspec for this argument */
|
|
254
268
|
|
|
255
269
|
/* More stuff, see below */
|
|
256
270
|
} VipsArgument;
|
|
@@ -265,8 +279,8 @@ typedef struct _VipsArgumentClass {
|
|
|
265
279
|
VipsObjectClass *object_class;
|
|
266
280
|
|
|
267
281
|
VipsArgumentFlags flags;
|
|
268
|
-
int priority;
|
|
269
|
-
guint offset;
|
|
282
|
+
int priority; /* Order args by this */
|
|
283
|
+
guint offset; /* G_STRUCT_OFFSET of member in object */
|
|
270
284
|
} VipsArgumentClass;
|
|
271
285
|
|
|
272
286
|
/* Keep one of these in the object struct for every argument instance.
|
|
@@ -289,7 +303,7 @@ typedef struct _VipsArgumentInstance {
|
|
|
289
303
|
/* If this is an output argument, keep the id of our "close" handler
|
|
290
304
|
* here.
|
|
291
305
|
*/
|
|
292
|
-
gulong close_id;
|
|
306
|
+
gulong close_id;
|
|
293
307
|
|
|
294
308
|
/* We need to listen for "invalidate" on input images and send our own
|
|
295
309
|
* "invalidate" out. If we go, we need to disconnect.
|
|
@@ -303,136 +317,139 @@ typedef struct _VipsArgumentInstance {
|
|
|
303
317
|
typedef GHashTable VipsArgumentTable;
|
|
304
318
|
|
|
305
319
|
VIPS_API
|
|
306
|
-
int vips_argument_get_id(
|
|
307
|
-
void vips__object_set_member(
|
|
308
|
-
GObject **member, GObject *argument
|
|
309
|
-
typedef void *(*VipsArgumentMapFn)(
|
|
310
|
-
VipsArgumentClass *argument_class,
|
|
311
|
-
VipsArgumentInstance *argument_instance, void *a, void *b
|
|
320
|
+
int vips_argument_get_id(void);
|
|
321
|
+
void vips__object_set_member(VipsObject *object, GParamSpec *pspec,
|
|
322
|
+
GObject **member, GObject *argument);
|
|
323
|
+
typedef void *(*VipsArgumentMapFn)(VipsObject *object, GParamSpec *pspec,
|
|
324
|
+
VipsArgumentClass *argument_class,
|
|
325
|
+
VipsArgumentInstance *argument_instance, void *a, void *b);
|
|
312
326
|
VIPS_API
|
|
313
|
-
void *vips_argument_map(
|
|
314
|
-
VipsArgumentMapFn fn, void *a, void *b
|
|
327
|
+
void *vips_argument_map(VipsObject *object,
|
|
328
|
+
VipsArgumentMapFn fn, void *a, void *b);
|
|
315
329
|
VIPS_API
|
|
316
|
-
int vips_object_get_args(
|
|
317
|
-
const char ***names, int **flags, int *n_args
|
|
318
|
-
typedef void *(*VipsArgumentClassMapFn)(
|
|
330
|
+
int vips_object_get_args(VipsObject *object,
|
|
331
|
+
const char ***names, int **flags, int *n_args);
|
|
332
|
+
typedef void *(*VipsArgumentClassMapFn)(VipsObjectClass *object_class,
|
|
319
333
|
GParamSpec *pspec,
|
|
320
|
-
VipsArgumentClass *argument_class, void *a, void *b
|
|
334
|
+
VipsArgumentClass *argument_class, void *a, void *b);
|
|
321
335
|
VIPS_API
|
|
322
|
-
void *vips_argument_class_map(
|
|
323
|
-
VipsArgumentClassMapFn fn, void *a, void *b
|
|
336
|
+
void *vips_argument_class_map(VipsObjectClass *object_class,
|
|
337
|
+
VipsArgumentClassMapFn fn, void *a, void *b);
|
|
324
338
|
VIPS_API
|
|
325
|
-
gboolean vips_argument_class_needsstring(
|
|
339
|
+
gboolean vips_argument_class_needsstring(VipsArgumentClass *argument_class);
|
|
326
340
|
VIPS_API
|
|
327
|
-
int vips_object_get_argument(
|
|
341
|
+
int vips_object_get_argument(VipsObject *object, const char *name,
|
|
328
342
|
GParamSpec **pspec,
|
|
329
343
|
VipsArgumentClass **argument_class,
|
|
330
|
-
VipsArgumentInstance **argument_instance
|
|
344
|
+
VipsArgumentInstance **argument_instance);
|
|
331
345
|
VIPS_API
|
|
332
|
-
gboolean vips_object_argument_isset(
|
|
346
|
+
gboolean vips_object_argument_isset(VipsObject *object, const char *name);
|
|
333
347
|
VIPS_API
|
|
334
|
-
VipsArgumentFlags vips_object_get_argument_flags(
|
|
335
|
-
const char *name
|
|
348
|
+
VipsArgumentFlags vips_object_get_argument_flags(VipsObject *object,
|
|
349
|
+
const char *name);
|
|
336
350
|
VIPS_API
|
|
337
|
-
int vips_object_get_argument_priority(
|
|
351
|
+
int vips_object_get_argument_priority(VipsObject *object, const char *name);
|
|
338
352
|
|
|
339
353
|
/* We have to loop over an objects args in several places, and we can't always
|
|
340
354
|
* use vips_argument_map(), the preferred looper. Have the loop code as a
|
|
341
355
|
* macro as well for these odd cases.
|
|
342
356
|
*/
|
|
343
|
-
#define VIPS_ARGUMENT_FOR_ALL(
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
#define VIPS_ARGUMENT_FOR_ALL(OBJECT, PSPEC, ARG_CLASS, ARG_INSTANCE) \
|
|
358
|
+
{ \
|
|
359
|
+
VipsObjectClass *object_class = VIPS_OBJECT_GET_CLASS(OBJECT); \
|
|
360
|
+
GSList *p; \
|
|
361
|
+
\
|
|
362
|
+
for (p = object_class->argument_table_traverse; p; p = p->next) { \
|
|
363
|
+
VipsArgumentClass *ARG_CLASS = \
|
|
364
|
+
(VipsArgumentClass *) p->data; \
|
|
365
|
+
VipsArgument *argument = (VipsArgument *) argument_class; \
|
|
366
|
+
GParamSpec *PSPEC = argument->pspec; \
|
|
367
|
+
VipsArgumentInstance *ARG_INSTANCE G_GNUC_UNUSED = \
|
|
368
|
+
vips__argument_get_instance(argument_class, \
|
|
369
|
+
VIPS_OBJECT(OBJECT));
|
|
370
|
+
|
|
371
|
+
#define VIPS_ARGUMENT_FOR_ALL_END \
|
|
372
|
+
} \
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/* And some macros to collect args from a va list.
|
|
359
376
|
*
|
|
360
377
|
* Use something like this:
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
378
|
+
*
|
|
379
|
+
* GParamSpec *pspec;
|
|
380
|
+
* VipsArgumentClass *argument_class;
|
|
381
|
+
* VipsArgumentInstance *argument_instance;
|
|
382
|
+
*
|
|
383
|
+
* if (vips_object_get_argument(VIPS_OBJECT(operation), name,
|
|
384
|
+
* &pspec, &argument_class, &argument_instance))
|
|
385
|
+
* return -1;
|
|
386
|
+
*
|
|
387
|
+
* VIPS_ARGUMENT_COLLECT_SET(pspec, argument_class, ap);
|
|
388
|
+
*
|
|
389
|
+
* GValue value holds the value of an input argument, do
|
|
390
|
+
* something with it
|
|
391
|
+
*
|
|
392
|
+
* VIPS_ARGUMENT_COLLECT_GET(pspec, argument_class, ap);
|
|
393
|
+
*
|
|
394
|
+
* void **arg points to where to write an output argument
|
|
395
|
+
*
|
|
396
|
+
* VIPS_ARGUMENT_COLLECT_END
|
|
381
397
|
*/
|
|
382
|
-
#define VIPS_ARGUMENT_COLLECT_SET(
|
|
383
|
-
if
|
|
384
|
-
GValue value =
|
|
398
|
+
#define VIPS_ARGUMENT_COLLECT_SET(PSPEC, ARG_CLASS, AP) \
|
|
399
|
+
if ((ARG_CLASS->flags & VIPS_ARGUMENT_INPUT)) { \
|
|
400
|
+
GValue value = G_VALUE_INIT; \
|
|
385
401
|
gchar *error = NULL; \
|
|
386
|
-
|
|
387
|
-
/* Input args are given inline, eg. ("factor", 12.0)
|
|
402
|
+
\
|
|
403
|
+
/* Input args are given inline, eg. ("factor", 12.0) \
|
|
388
404
|
* and must be collected. \
|
|
389
405
|
*/ \
|
|
390
|
-
G_VALUE_COLLECT_INIT(
|
|
391
|
-
|
|
392
|
-
|
|
406
|
+
G_VALUE_COLLECT_INIT(&value, \
|
|
407
|
+
G_PARAM_SPEC_VALUE_TYPE(PSPEC), AP, 0, &error); \
|
|
408
|
+
\
|
|
393
409
|
/* Don't bother with the error message. \
|
|
394
410
|
*/ \
|
|
395
|
-
if(
|
|
396
|
-
VIPS_DEBUG_MSG(
|
|
397
|
-
g_free(
|
|
411
|
+
if (error) { \
|
|
412
|
+
VIPS_DEBUG_MSG("VIPS_OBJECT_COLLECT_SET: err\n"); \
|
|
413
|
+
g_free(error); \
|
|
398
414
|
}
|
|
399
415
|
|
|
400
|
-
#define VIPS_ARGUMENT_COLLECT_GET(
|
|
401
|
-
|
|
416
|
+
#define VIPS_ARGUMENT_COLLECT_GET(PSPEC, ARG_CLASS, AP) \
|
|
417
|
+
g_value_unset(&value); \
|
|
402
418
|
} \
|
|
403
|
-
else if
|
|
419
|
+
else if ((ARG_CLASS->flags & VIPS_ARGUMENT_OUTPUT)) \
|
|
420
|
+
{ \
|
|
404
421
|
void **arg G_GNUC_UNUSED; \
|
|
405
|
-
|
|
422
|
+
\
|
|
406
423
|
/* Output args are a pointer to where to send the \
|
|
407
424
|
* result. \
|
|
408
425
|
*/ \
|
|
409
|
-
arg = va_arg(
|
|
426
|
+
arg = va_arg(AP, void **);
|
|
410
427
|
|
|
411
428
|
#define VIPS_ARGUMENT_COLLECT_END \
|
|
412
|
-
}
|
|
429
|
+
}
|
|
413
430
|
|
|
414
431
|
#define VIPS_TYPE_OBJECT (vips_object_get_type())
|
|
415
|
-
#define VIPS_OBJECT(
|
|
416
|
-
(G_TYPE_CHECK_INSTANCE_CAST(
|
|
417
|
-
#define VIPS_OBJECT_CLASS(
|
|
418
|
-
(G_TYPE_CHECK_CLASS_CAST(
|
|
419
|
-
#define VIPS_IS_OBJECT(
|
|
420
|
-
(G_TYPE_CHECK_INSTANCE_TYPE(
|
|
421
|
-
#define VIPS_IS_OBJECT_CLASS(
|
|
422
|
-
(G_TYPE_CHECK_CLASS_TYPE(
|
|
423
|
-
#define VIPS_OBJECT_GET_CLASS(
|
|
424
|
-
(G_TYPE_INSTANCE_GET_CLASS(
|
|
432
|
+
#define VIPS_OBJECT(obj) \
|
|
433
|
+
(G_TYPE_CHECK_INSTANCE_CAST((obj), VIPS_TYPE_OBJECT, VipsObject))
|
|
434
|
+
#define VIPS_OBJECT_CLASS(klass) \
|
|
435
|
+
(G_TYPE_CHECK_CLASS_CAST((klass), VIPS_TYPE_OBJECT, VipsObjectClass))
|
|
436
|
+
#define VIPS_IS_OBJECT(obj) \
|
|
437
|
+
(G_TYPE_CHECK_INSTANCE_TYPE((obj), VIPS_TYPE_OBJECT))
|
|
438
|
+
#define VIPS_IS_OBJECT_CLASS(klass) \
|
|
439
|
+
(G_TYPE_CHECK_CLASS_TYPE((klass), VIPS_TYPE_OBJECT))
|
|
440
|
+
#define VIPS_OBJECT_GET_CLASS(obj) \
|
|
441
|
+
(G_TYPE_INSTANCE_GET_CLASS((obj), VIPS_TYPE_OBJECT, VipsObjectClass))
|
|
425
442
|
|
|
426
443
|
struct _VipsObject {
|
|
427
444
|
GObject parent_instance;
|
|
428
445
|
|
|
429
|
-
/* Set after ->build() has run
|
|
446
|
+
/* Set after ->build() has run successfully: construct is fully done
|
|
430
447
|
* and checked.
|
|
431
448
|
*/
|
|
432
449
|
gboolean constructed;
|
|
433
450
|
|
|
434
451
|
/* Set for static objects which are allocated at startup and never
|
|
435
|
-
* freed. These objects are
|
|
452
|
+
* freed. These objects are omitted from leak reports.
|
|
436
453
|
*/
|
|
437
454
|
gboolean static_object;
|
|
438
455
|
|
|
@@ -446,7 +463,7 @@ struct _VipsObject {
|
|
|
446
463
|
char *nickname;
|
|
447
464
|
char *description;
|
|
448
465
|
|
|
449
|
-
/* The pre/post/close callbacks are all fire-once.
|
|
466
|
+
/* The pre/post/close callbacks are all fire-once.
|
|
450
467
|
*/
|
|
451
468
|
gboolean preclose;
|
|
452
469
|
gboolean close;
|
|
@@ -456,7 +473,6 @@ struct _VipsObject {
|
|
|
456
473
|
* profiling.
|
|
457
474
|
*/
|
|
458
475
|
size_t local_memory;
|
|
459
|
-
|
|
460
476
|
};
|
|
461
477
|
|
|
462
478
|
struct _VipsObjectClass {
|
|
@@ -465,49 +481,49 @@ struct _VipsObjectClass {
|
|
|
465
481
|
/* Build the object ... all argument properties have been set,
|
|
466
482
|
* now build the thing.
|
|
467
483
|
*/
|
|
468
|
-
int (*build)(
|
|
484
|
+
int (*build)(VipsObject *object);
|
|
469
485
|
|
|
470
|
-
/* Just after build ... the object is fully ready for work.
|
|
486
|
+
/* Just after build ... the object is fully ready for work.
|
|
471
487
|
*/
|
|
472
|
-
int (*postbuild)(
|
|
488
|
+
int (*postbuild)(VipsObject *object, void *data);
|
|
473
489
|
|
|
474
490
|
/* Try to print something about the class, handy for help displays.
|
|
475
491
|
* Keep to one line.
|
|
476
492
|
*/
|
|
477
|
-
void (*summary_class)(
|
|
493
|
+
void (*summary_class)(struct _VipsObjectClass *cls, VipsBuf *buf);
|
|
478
494
|
|
|
479
495
|
/* Try to print a one-line summary for the object, the user can see
|
|
480
496
|
* this output via things like "header fred.tif", --vips-cache-trace,
|
|
481
|
-
* etc.
|
|
497
|
+
* etc.
|
|
482
498
|
*/
|
|
483
|
-
void (*summary)(
|
|
499
|
+
void (*summary)(VipsObject *object, VipsBuf *buf);
|
|
484
500
|
|
|
485
501
|
/* Try to print everything about the object, handy for debugging.
|
|
486
502
|
*/
|
|
487
|
-
void (*dump)(
|
|
503
|
+
void (*dump)(VipsObject *object, VipsBuf *buf);
|
|
488
504
|
|
|
489
|
-
/* Sanity-check the object. Print messages and stuff.
|
|
505
|
+
/* Sanity-check the object. Print messages and stuff.
|
|
490
506
|
* Handy for debugging.
|
|
491
507
|
*/
|
|
492
|
-
void (*sanity)(
|
|
508
|
+
void (*sanity)(VipsObject *object, VipsBuf *buf);
|
|
493
509
|
|
|
494
510
|
/* Rewind. Save and restore any stuff that needs to survive a
|
|
495
511
|
* dispose().
|
|
496
512
|
*/
|
|
497
|
-
void (*rewind)(
|
|
513
|
+
void (*rewind)(VipsObject *object);
|
|
498
514
|
|
|
499
515
|
/* Just before close, everything is still alive.
|
|
500
516
|
*/
|
|
501
|
-
void (*preclose)(
|
|
517
|
+
void (*preclose)(VipsObject *object);
|
|
502
518
|
|
|
503
519
|
/* Close, time to free stuff.
|
|
504
520
|
*/
|
|
505
|
-
void (*close)(
|
|
521
|
+
void (*close)(VipsObject *object);
|
|
506
522
|
|
|
507
523
|
/* Post-close, everything is dead, except the VipsObject pointer.
|
|
508
524
|
* Useful for eg. deleting the file associated with a temp image.
|
|
509
525
|
*/
|
|
510
|
-
void (*postclose)(
|
|
526
|
+
void (*postclose)(VipsObject *object);
|
|
511
527
|
|
|
512
528
|
/* The CLI interface. Implement these four to get CLI input and output
|
|
513
529
|
* for your object.
|
|
@@ -518,12 +534,12 @@ struct _VipsObjectClass {
|
|
|
518
534
|
*
|
|
519
535
|
* Don't call this directly, see vips_object_new_from_string().
|
|
520
536
|
*/
|
|
521
|
-
VipsObject *(*new_from_string)(
|
|
537
|
+
VipsObject *(*new_from_string)(const char *string);
|
|
522
538
|
|
|
523
539
|
/* The inverse of ^^. Given an object, output what ->new_from_string()
|
|
524
|
-
* would have been given to make that object.
|
|
540
|
+
* would have been given to make that object.
|
|
525
541
|
*/
|
|
526
|
-
void (*to_string)(
|
|
542
|
+
void (*to_string)(VipsObject *object, VipsBuf *buf);
|
|
527
543
|
|
|
528
544
|
/* Does this output arg need an arg from the command line? Image
|
|
529
545
|
* output, for example, needs a filename to write to.
|
|
@@ -534,10 +550,10 @@ struct _VipsObjectClass {
|
|
|
534
550
|
* error, setting vips_error(). string is NULL if output_needs_arg()
|
|
535
551
|
* was FALSE.
|
|
536
552
|
*/
|
|
537
|
-
int (*output_to_arg)(
|
|
553
|
+
int (*output_to_arg)(VipsObject *object, const char *string);
|
|
538
554
|
|
|
539
555
|
/* Class nickname, eg. "VipsInterpolateBicubic" has "bicubic" as a
|
|
540
|
-
* nickname. Not internationalised.
|
|
556
|
+
* nickname. Not internationalised.
|
|
541
557
|
*/
|
|
542
558
|
const char *nickname;
|
|
543
559
|
|
|
@@ -547,13 +563,13 @@ struct _VipsObjectClass {
|
|
|
547
563
|
|
|
548
564
|
/* Hash from pspec to VipsArgumentClass.
|
|
549
565
|
*
|
|
550
|
-
* This records the VipsArgumentClass for every pspec used in
|
|
566
|
+
* This records the VipsArgumentClass for every pspec used in
|
|
551
567
|
* VipsObject and any subclass (ie. everywhere), so it's huge. Don't
|
|
552
568
|
* loop over this hash! Fine for lookups though.
|
|
553
569
|
*/
|
|
554
570
|
VipsArgumentTable *argument_table;
|
|
555
571
|
|
|
556
|
-
/* A sorted (by priority) list of the VipsArgumentClass for this class
|
|
572
|
+
/* A sorted (by priority) list of the VipsArgumentClass for this class
|
|
557
573
|
* and any superclasses. This is small and specific to this class.
|
|
558
574
|
*
|
|
559
575
|
* Use the stored GType to work out when to restart the list for a
|
|
@@ -565,50 +581,50 @@ struct _VipsObjectClass {
|
|
|
565
581
|
/* This class is deprecated and therefore hidden from various UI bits.
|
|
566
582
|
*
|
|
567
583
|
* VipsOperation has a deprecated flag, use that in preference to this
|
|
568
|
-
* if you can.
|
|
584
|
+
* if you can.
|
|
569
585
|
*/
|
|
570
586
|
gboolean deprecated;
|
|
571
587
|
|
|
572
588
|
/* Reserved for future expansion.
|
|
573
589
|
*/
|
|
574
|
-
void (*_vips_reserved1)(
|
|
575
|
-
void (*_vips_reserved2)(
|
|
576
|
-
void (*_vips_reserved3)(
|
|
577
|
-
void (*_vips_reserved4)(
|
|
590
|
+
void (*_vips_reserved1)(void);
|
|
591
|
+
void (*_vips_reserved2)(void);
|
|
592
|
+
void (*_vips_reserved3)(void);
|
|
593
|
+
void (*_vips_reserved4)(void);
|
|
578
594
|
};
|
|
579
595
|
|
|
580
596
|
VIPS_API
|
|
581
|
-
gboolean vips_value_is_null(
|
|
597
|
+
gboolean vips_value_is_null(GParamSpec *psoec, const GValue *value);
|
|
582
598
|
VIPS_API
|
|
583
|
-
void vips_object_set_property(
|
|
584
|
-
guint property_id, const GValue *value, GParamSpec *pspec
|
|
599
|
+
void vips_object_set_property(GObject *gobject,
|
|
600
|
+
guint property_id, const GValue *value, GParamSpec *pspec);
|
|
585
601
|
VIPS_API
|
|
586
|
-
void vips_object_get_property(
|
|
587
|
-
guint property_id, GValue *value, GParamSpec *pspec
|
|
602
|
+
void vips_object_get_property(GObject *gobject,
|
|
603
|
+
guint property_id, GValue *value, GParamSpec *pspec);
|
|
588
604
|
|
|
589
605
|
VIPS_API
|
|
590
|
-
void vips_object_preclose(
|
|
606
|
+
void vips_object_preclose(VipsObject *object);
|
|
591
607
|
VIPS_API
|
|
592
|
-
int vips_object_build(
|
|
608
|
+
int vips_object_build(VipsObject *object);
|
|
593
609
|
|
|
594
610
|
VIPS_API
|
|
595
|
-
void vips_object_summary_class(
|
|
611
|
+
void vips_object_summary_class(VipsObjectClass *klass, VipsBuf *buf);
|
|
596
612
|
VIPS_API
|
|
597
|
-
void vips_object_summary(
|
|
613
|
+
void vips_object_summary(VipsObject *object, VipsBuf *buf);
|
|
598
614
|
VIPS_API
|
|
599
|
-
void vips_object_dump(
|
|
615
|
+
void vips_object_dump(VipsObject *object, VipsBuf *buf);
|
|
600
616
|
|
|
601
617
|
VIPS_API
|
|
602
|
-
void vips_object_print_summary_class(
|
|
618
|
+
void vips_object_print_summary_class(VipsObjectClass *klass);
|
|
603
619
|
VIPS_API
|
|
604
|
-
void vips_object_print_summary(
|
|
620
|
+
void vips_object_print_summary(VipsObject *object);
|
|
605
621
|
VIPS_API
|
|
606
|
-
void vips_object_print_dump(
|
|
622
|
+
void vips_object_print_dump(VipsObject *object);
|
|
607
623
|
VIPS_API
|
|
608
|
-
void vips_object_print_name(
|
|
624
|
+
void vips_object_print_name(VipsObject *object);
|
|
609
625
|
|
|
610
626
|
VIPS_API
|
|
611
|
-
gboolean vips_object_sanity(
|
|
627
|
+
gboolean vips_object_sanity(VipsObject *object);
|
|
612
628
|
|
|
613
629
|
/* Don't put spaces around void here, it breaks gtk-doc.
|
|
614
630
|
*/
|
|
@@ -616,91 +632,89 @@ VIPS_API
|
|
|
616
632
|
GType vips_object_get_type(void);
|
|
617
633
|
|
|
618
634
|
VIPS_API
|
|
619
|
-
void vips_object_class_install_argument(
|
|
620
|
-
GParamSpec *pspec, VipsArgumentFlags flags,
|
|
621
|
-
int priority, guint offset
|
|
635
|
+
void vips_object_class_install_argument(VipsObjectClass *cls,
|
|
636
|
+
GParamSpec *pspec, VipsArgumentFlags flags,
|
|
637
|
+
int priority, guint offset);
|
|
622
638
|
VIPS_API
|
|
623
|
-
int vips_object_set_argument_from_string(
|
|
624
|
-
const char *name, const char *value
|
|
639
|
+
int vips_object_set_argument_from_string(VipsObject *object,
|
|
640
|
+
const char *name, const char *value);
|
|
625
641
|
VIPS_API
|
|
626
|
-
gboolean vips_object_argument_needsstring(
|
|
627
|
-
const char *name
|
|
642
|
+
gboolean vips_object_argument_needsstring(VipsObject *object,
|
|
643
|
+
const char *name);
|
|
628
644
|
VIPS_API
|
|
629
|
-
int vips_object_get_argument_to_string(
|
|
630
|
-
const char *name, const char *arg
|
|
645
|
+
int vips_object_get_argument_to_string(VipsObject *object,
|
|
646
|
+
const char *name, const char *arg);
|
|
631
647
|
VIPS_API
|
|
632
|
-
int vips_object_set_required(
|
|
648
|
+
int vips_object_set_required(VipsObject *object, const char *value);
|
|
633
649
|
|
|
634
|
-
typedef void *(*VipsObjectSetArguments)(
|
|
650
|
+
typedef void *(*VipsObjectSetArguments)(VipsObject *object, void *a, void *b);
|
|
635
651
|
VIPS_API
|
|
636
|
-
VipsObject *vips_object_new(
|
|
637
|
-
VipsObjectSetArguments set, void *a, void *b
|
|
652
|
+
VipsObject *vips_object_new(GType type,
|
|
653
|
+
VipsObjectSetArguments set, void *a, void *b);
|
|
638
654
|
|
|
639
655
|
VIPS_API
|
|
640
|
-
int vips_object_set_valist(
|
|
656
|
+
int vips_object_set_valist(VipsObject *object, va_list ap);
|
|
641
657
|
VIPS_API
|
|
642
|
-
int vips_object_set(
|
|
658
|
+
int vips_object_set(VipsObject *object, ...)
|
|
643
659
|
G_GNUC_NULL_TERMINATED;
|
|
644
660
|
VIPS_API
|
|
645
|
-
int vips_object_set_from_string(
|
|
661
|
+
int vips_object_set_from_string(VipsObject *object, const char *string);
|
|
646
662
|
|
|
647
663
|
VIPS_API
|
|
648
|
-
VipsObject *vips_object_new_from_string(
|
|
649
|
-
const char *p
|
|
664
|
+
VipsObject *vips_object_new_from_string(VipsObjectClass *object_class,
|
|
665
|
+
const char *p);
|
|
650
666
|
VIPS_API
|
|
651
|
-
void vips_object_to_string(
|
|
667
|
+
void vips_object_to_string(VipsObject *object, VipsBuf *buf);
|
|
652
668
|
|
|
653
669
|
VIPS_API
|
|
654
|
-
void *vips_object_map(
|
|
670
|
+
void *vips_object_map(VipsSListMap2Fn fn, void *a, void *b);
|
|
655
671
|
|
|
656
|
-
typedef void *(*VipsTypeMapFn)(
|
|
657
|
-
typedef void *(*VipsTypeMap2Fn)(
|
|
658
|
-
typedef void *(*VipsClassMapFn)(
|
|
672
|
+
typedef void *(*VipsTypeMapFn)(GType type, void *a);
|
|
673
|
+
typedef void *(*VipsTypeMap2Fn)(GType type, void *a, void *b);
|
|
674
|
+
typedef void *(*VipsClassMapFn)(VipsObjectClass *cls, void *a);
|
|
659
675
|
VIPS_API
|
|
660
|
-
void *vips_type_map(
|
|
676
|
+
void *vips_type_map(GType base, VipsTypeMap2Fn fn, void *a, void *b);
|
|
661
677
|
VIPS_API
|
|
662
|
-
void *vips_type_map_all(
|
|
678
|
+
void *vips_type_map_all(GType base, VipsTypeMapFn fn, void *a);
|
|
663
679
|
VIPS_API
|
|
664
|
-
int vips_type_depth(
|
|
680
|
+
int vips_type_depth(GType type);
|
|
665
681
|
VIPS_API
|
|
666
|
-
GType vips_type_find(
|
|
682
|
+
GType vips_type_find(const char *basename, const char *nickname);
|
|
667
683
|
VIPS_API
|
|
668
|
-
const char *vips_nickname_find(
|
|
684
|
+
const char *vips_nickname_find(GType type);
|
|
669
685
|
|
|
670
686
|
VIPS_API
|
|
671
|
-
void *vips_class_map_all(
|
|
687
|
+
void *vips_class_map_all(GType type, VipsClassMapFn fn, void *a);
|
|
672
688
|
VIPS_API
|
|
673
|
-
const VipsObjectClass *vips_class_find(
|
|
674
|
-
const char *nickname
|
|
689
|
+
const VipsObjectClass *vips_class_find(const char *basename,
|
|
690
|
+
const char *nickname);
|
|
675
691
|
|
|
676
692
|
VIPS_API
|
|
677
|
-
VipsObject **vips_object_local_array(
|
|
693
|
+
VipsObject **vips_object_local_array(VipsObject *parent, int n);
|
|
678
694
|
|
|
679
695
|
VIPS_API
|
|
680
|
-
void vips_object_local_cb(
|
|
681
|
-
#define vips_object_local(
|
|
682
|
-
(g_signal_connect(
|
|
696
|
+
void vips_object_local_cb(VipsObject *vobject, GObject *gobject);
|
|
697
|
+
#define vips_object_local(V, G) \
|
|
698
|
+
(g_signal_connect(V, "close", G_CALLBACK(vips_object_local_cb), G))
|
|
683
699
|
|
|
684
700
|
VIPS_API
|
|
685
|
-
void vips_object_set_static(
|
|
701
|
+
void vips_object_set_static(VipsObject *object, gboolean static_object);
|
|
686
702
|
VIPS_API
|
|
687
|
-
void vips_object_print_all(
|
|
703
|
+
void vips_object_print_all(void);
|
|
688
704
|
VIPS_API
|
|
689
|
-
void vips_object_sanity_all(
|
|
705
|
+
void vips_object_sanity_all(void);
|
|
690
706
|
|
|
691
707
|
VIPS_API
|
|
692
|
-
void vips_object_rewind(
|
|
708
|
+
void vips_object_rewind(VipsObject *object);
|
|
693
709
|
|
|
694
710
|
VIPS_API
|
|
695
|
-
void vips_object_unref_outputs(
|
|
711
|
+
void vips_object_unref_outputs(VipsObject *object);
|
|
696
712
|
|
|
697
713
|
VIPS_API
|
|
698
|
-
const char *vips_object_get_description(
|
|
714
|
+
const char *vips_object_get_description(VipsObject *object);
|
|
699
715
|
|
|
700
716
|
#ifdef __cplusplus
|
|
701
717
|
}
|
|
702
718
|
#endif /*__cplusplus*/
|
|
703
719
|
|
|
704
720
|
#endif /*VIPS_OBJECT_H*/
|
|
705
|
-
|
|
706
|
-
|