-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
GdkPixdata-2.0.gir
283 lines (275 loc) · 15.1 KB
/
GdkPixdata-2.0.gir
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
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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0" version="1.2">
<include name="GdkPixbuf" version="2.0"/>
<package name="gdk-pixbuf-2.0"/>
<c:include name="gdk-pixbuf/gdk-pixdata.h"/>
<namespace name="GdkPixdata" version="2.0" shared-library="libgdk_pixbuf-2.0.so.0" c:identifier-prefixes="Gdk" c:symbol-prefixes="gdk">
<constant name="PIXBUF_MAGIC_NUMBER" value="1197763408" c:type="GDK_PIXBUF_MAGIC_NUMBER">
<doc xml:space="preserve">Magic number for #GdkPixdata structures.</doc>
<type name="gint" c:type="gint"/>
</constant>
<constant name="PIXDATA_HEADER_LENGTH" value="24" c:type="GDK_PIXDATA_HEADER_LENGTH" deprecated="1" deprecated-version="2.32">
<doc xml:space="preserve">The length of a #GdkPixdata structure without the @pixel_data pointer.</doc>
<type name="gint" c:type="gint"/>
</constant>
<record name="Pixdata" c:type="GdkPixdata" deprecated="1" deprecated-version="2.32">
<doc xml:space="preserve">A pixel buffer suitable for serialization and streaming.
Using `GdkPixdata`, images can be compiled into an application,
making it unnecessary to refer to external image files at runtime.
`GdkPixbuf` includes a utility named `gdk-pixbuf-csource`, which
can be used to convert image files into `GdkPixdata` structures suitable
for inclusion in C sources. To convert the `GdkPixdata` structures back
into a `GdkPixbuf`, use `gdk_pixbuf_from_pixdata()`.</doc>
<doc-deprecated xml:space="preserve">`GdkPixdata` should not be used any more. `GResource`
should be used to save the original compressed images inside the
program's binary</doc-deprecated>
<field name="magic" writable="1">
<doc xml:space="preserve">magic number. A valid `GdkPixdata` structure must have
`GDK_PIXBUF_MAGIC_NUMBER` here</doc>
<type name="guint32" c:type="guint32"/>
</field>
<field name="length" writable="1">
<doc xml:space="preserve">less than 1 to disable length checks, otherwise
`GDK_PIXDATA_HEADER_LENGTH` plus the length of `pixel_data`</doc>
<type name="gint32" c:type="gint32"/>
</field>
<field name="pixdata_type" writable="1">
<doc xml:space="preserve">information about colorspace, sample width and
encoding, in a `GdkPixdataType`</doc>
<type name="guint32" c:type="guint32"/>
</field>
<field name="rowstride" writable="1">
<doc xml:space="preserve">Distance in bytes between rows</doc>
<type name="guint32" c:type="guint32"/>
</field>
<field name="width" writable="1">
<doc xml:space="preserve">Width of the image in pixels</doc>
<type name="guint32" c:type="guint32"/>
</field>
<field name="height" writable="1">
<doc xml:space="preserve">Height of the image in pixels</doc>
<type name="guint32" c:type="guint32"/>
</field>
<field name="pixel_data" writable="1">
<doc xml:space="preserve">`width` x `height`
pixels, encoded according to `pixdata_type` and `rowstride`</doc>
<array zero-terminated="0" c:type="guint8*">
<type name="guint8"/>
</array>
</field>
<method name="deserialize" c:identifier="gdk_pixdata_deserialize" deprecated="1" deprecated-version="2.32" throws="1">
<doc xml:space="preserve">Deserializes (reconstruct) a #GdkPixdata structure from a byte stream.
The byte stream consists of a straightforward writeout of the
`GdkPixdata` fields in network byte order, plus the `pixel_data`
bytes the structure points to.
The `pixdata` contents are reconstructed byte by byte and are checked
for validity.
This function may fail with `GDK_PIXBUF_ERROR_CORRUPT_IMAGE`
or `GDK_PIXBUF_ERROR_UNKNOWN_TYPE`.</doc>
<doc-deprecated xml:space="preserve">Use `GResource` instead.</doc-deprecated>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Upon successful deserialization `TRUE` is returned,
`FALSE` otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="pixdata" transfer-ownership="none">
<doc xml:space="preserve">a #GdkPixdata structure to be filled in.</doc>
<type name="Pixdata" c:type="GdkPixdata*"/>
</instance-parameter>
<parameter name="stream_length" transfer-ownership="none">
<doc xml:space="preserve">length of the stream used for deserialization.</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="stream" transfer-ownership="none">
<doc xml:space="preserve">stream of bytes containing a
serialized #GdkPixdata structure.</doc>
<array length="0" zero-terminated="0" c:type="const guint8*">
<type name="guint8" c:type="guint8"/>
</array>
</parameter>
</parameters>
</method>
<method name="from_pixbuf" c:identifier="gdk_pixdata_from_pixbuf" introspectable="0" deprecated="1" deprecated-version="2.32">
<doc xml:space="preserve">Converts a `GdkPixbuf` to a `GdkPixdata`.
If `use_rle` is `TRUE`, the pixel data is run-length encoded into
newly-allocated memory and a pointer to that memory is returned.</doc>
<doc-deprecated xml:space="preserve">Use #GResource instead.</doc-deprecated>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">If `use_rle` is
`TRUE`, a pointer to the newly-allocated memory for the run-length
encoded pixel data, otherwise `NULL`.</doc>
<array zero-terminated="0" c:type="gpointer">
<type name="guint8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="pixdata" transfer-ownership="none">
<doc xml:space="preserve">a `GdkPixdata` to fill.</doc>
<type name="Pixdata" c:type="GdkPixdata*"/>
</instance-parameter>
<parameter name="pixbuf" transfer-ownership="none">
<doc xml:space="preserve">the data to fill `pixdata` with.</doc>
<type name="GdkPixbuf.Pixbuf" c:type="const GdkPixbuf*"/>
</parameter>
<parameter name="use_rle" transfer-ownership="none">
<doc xml:space="preserve">whether to use run-length encoding for the pixel data.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="serialize" c:identifier="gdk_pixdata_serialize" deprecated="1" deprecated-version="2.32">
<doc xml:space="preserve">Serializes a #GdkPixdata structure into a byte stream.
The byte stream consists of a straightforward writeout of the
#GdkPixdata fields in network byte order, plus the @pixel_data
bytes the structure points to.</doc>
<doc-deprecated xml:space="preserve">Use #GResource instead.</doc-deprecated>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A
newly-allocated string containing the serialized #GdkPixdata
structure.</doc>
<array length="0" zero-terminated="0" c:type="guint8*">
<type name="guint8" c:type="guint8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="pixdata" transfer-ownership="none">
<doc xml:space="preserve">a valid #GdkPixdata structure to serialize.</doc>
<type name="Pixdata" c:type="const GdkPixdata*"/>
</instance-parameter>
<parameter name="stream_length_p" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store the resulting stream length in.</doc>
<type name="guint" c:type="guint*"/>
</parameter>
</parameters>
</method>
<method name="to_csource" c:identifier="gdk_pixdata_to_csource" deprecated="1" deprecated-version="2.32">
<doc xml:space="preserve">Generates C source code suitable for compiling images directly
into programs.
GdkPixbuf ships with a program called `gdk-pixbuf-csource`, which offers
a command line interface to this function.</doc>
<doc-deprecated xml:space="preserve">Use #GResource instead.</doc-deprecated>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly-allocated string buffer containing
the C source form of `pixdata`.</doc>
<type name="GLib.String" c:type="GString*"/>
</return-value>
<parameters>
<instance-parameter name="pixdata" transfer-ownership="none">
<doc xml:space="preserve">a `GdkPixdata` to convert to C source</doc>
<type name="Pixdata" c:type="GdkPixdata*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">used for naming generated data structures or macros</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="dump_type" transfer-ownership="none">
<doc xml:space="preserve">the kind of C source to be generated</doc>
<type name="PixdataDumpType" c:type="GdkPixdataDumpType"/>
</parameter>
</parameters>
</method>
</record>
<bitfield name="PixdataDumpType" deprecated="1" deprecated-version="2.32" c:type="GdkPixdataDumpType">
<doc xml:space="preserve">An enumeration which is used by gdk_pixdata_to_csource() to
determine the form of C source to be generated. The three values
@GDK_PIXDATA_DUMP_PIXDATA_STREAM, @GDK_PIXDATA_DUMP_PIXDATA_STRUCT
and @GDK_PIXDATA_DUMP_MACROS are mutually exclusive, as are
@GDK_PIXBUF_DUMP_GTYPES and @GDK_PIXBUF_DUMP_CTYPES. The remaining
elements are optional flags that can be freely added.</doc>
<member name="pixdata_stream" value="0" c:identifier="GDK_PIXDATA_DUMP_PIXDATA_STREAM">
<doc xml:space="preserve">Generate pixbuf data stream (a single
string containing a serialized #GdkPixdata structure in network byte
order).</doc>
</member>
<member name="pixdata_struct" value="1" c:identifier="GDK_PIXDATA_DUMP_PIXDATA_STRUCT">
<doc xml:space="preserve">Generate #GdkPixdata structure (needs
the #GdkPixdata structure definition from gdk-pixdata.h).</doc>
</member>
<member name="macros" value="2" c:identifier="GDK_PIXDATA_DUMP_MACROS">
<doc xml:space="preserve">Generate <function>*_ROWSTRIDE</function>,
<function>*_WIDTH</function>, <function>*_HEIGHT</function>,
<function>*_BYTES_PER_PIXEL</function> and
<function>*_RLE_PIXEL_DATA</function> or <function>*_PIXEL_DATA</function>
macro definitions for the image.</doc>
</member>
<member name="gtypes" value="0" c:identifier="GDK_PIXDATA_DUMP_GTYPES">
<doc xml:space="preserve">Generate GLib data types instead of
standard C data types.</doc>
</member>
<member name="ctypes" value="256" c:identifier="GDK_PIXDATA_DUMP_CTYPES">
<doc xml:space="preserve">Generate standard C data types instead of
GLib data types.</doc>
</member>
<member name="static" value="512" c:identifier="GDK_PIXDATA_DUMP_STATIC">
<doc xml:space="preserve">Generate static symbols.</doc>
</member>
<member name="const" value="1024" c:identifier="GDK_PIXDATA_DUMP_CONST">
<doc xml:space="preserve">Generate const symbols.</doc>
</member>
<member name="rle_decoder" value="65536" c:identifier="GDK_PIXDATA_DUMP_RLE_DECODER">
<doc xml:space="preserve">Provide a <function>*_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp)</function>
macro definition to decode run-length encoded image data.</doc>
</member>
</bitfield>
<bitfield name="PixdataType" deprecated="1" deprecated-version="2.32" c:type="GdkPixdataType">
<doc xml:space="preserve">An enumeration containing three sets of flags for a #GdkPixdata struct:
one for the used colorspace, one for the width of the samples and one
for the encoding of the pixel data.</doc>
<member name="color_type_rgb" value="1" c:identifier="GDK_PIXDATA_COLOR_TYPE_RGB">
<doc xml:space="preserve">each pixel has red, green and blue samples.</doc>
</member>
<member name="color_type_rgba" value="2" c:identifier="GDK_PIXDATA_COLOR_TYPE_RGBA">
<doc xml:space="preserve">each pixel has red, green and blue samples
and an alpha value.</doc>
</member>
<member name="color_type_mask" value="255" c:identifier="GDK_PIXDATA_COLOR_TYPE_MASK">
<doc xml:space="preserve">mask for the colortype flags of the enum.</doc>
</member>
<member name="sample_width_8" value="65536" c:identifier="GDK_PIXDATA_SAMPLE_WIDTH_8">
<doc xml:space="preserve">each sample has 8 bits.</doc>
</member>
<member name="sample_width_mask" value="983040" c:identifier="GDK_PIXDATA_SAMPLE_WIDTH_MASK">
<doc xml:space="preserve">mask for the sample width flags of the enum.</doc>
</member>
<member name="encoding_raw" value="16777216" c:identifier="GDK_PIXDATA_ENCODING_RAW">
<doc xml:space="preserve">the pixel data is in raw form.</doc>
</member>
<member name="encoding_rle" value="33554432" c:identifier="GDK_PIXDATA_ENCODING_RLE">
<doc xml:space="preserve">the pixel data is run-length encoded. Runs may
be up to 127 bytes long; their length is stored in a single byte
preceding the pixel data for the run. If a run is constant, its length
byte has the high bit set and the pixel data consists of a single pixel
which must be repeated.</doc>
</member>
<member name="encoding_mask" value="251658240" c:identifier="GDK_PIXDATA_ENCODING_MASK">
<doc xml:space="preserve">mask for the encoding flags of the enum.</doc>
</member>
</bitfield>
<function name="pixbuf_from_pixdata" c:identifier="gdk_pixbuf_from_pixdata" deprecated="1" deprecated-version="2.32" throws="1">
<doc xml:space="preserve">Converts a `GdkPixdata` to a `GdkPixbuf`.
If `copy_pixels` is `TRUE` or if the pixel data is run-length-encoded,
the pixel data is copied into newly-allocated memory; otherwise it is
reused.</doc>
<doc-deprecated xml:space="preserve">Use `GResource` instead.</doc-deprecated>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new pixbuf</doc>
<type name="GdkPixbuf.Pixbuf" c:type="GdkPixbuf*"/>
</return-value>
<parameters>
<parameter name="pixdata" transfer-ownership="none">
<doc xml:space="preserve">a #GdkPixdata to convert into a `GdkPixbuf`.</doc>
<type name="Pixdata" c:type="const GdkPixdata*"/>
</parameter>
<parameter name="copy_pixels" transfer-ownership="none">
<doc xml:space="preserve">whether to copy raw pixel data; run-length encoded
pixel data is always copied.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</function>
</namespace>
</repository>