mirror of
https://github.com/tauri-apps/gir-files.git
synced 2026-01-31 00:45:15 +01:00
284 lines
15 KiB
XML
284 lines
15 KiB
XML
<?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>
|