gdk_pixbuf2 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32
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.
- data/ext/gdk_pixbuf2/rbgdk-pixbuf-format.c +49 -40
- data/ext/gdk_pixbuf2/rbgdk-pixbuf-loader.c +50 -40
- data/ext/gdk_pixbuf2/rbgdk-pixbuf.c +250 -168
- data/ext/gdk_pixbuf2/rbgdk-pixbuf.h +25 -18
- data/ext/gdk_pixbuf2/rbgdk-pixbuf2conversions.h +42 -0
- data/ext/gdk_pixbuf2/rbgdk-pixbuf2private.h +35 -0
- data/ext/gdk_pixbuf2/rbgdk-pixbufanimation.c +46 -83
- data/ext/gdk_pixbuf2/rbgdk-pixbufanimationiter.c +71 -0
- data/ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c +29 -17
- data/ext/gdk_pixbuf2/rbgdk-pixdata.c +81 -77
- data/lib/1.8/gdk_pixbuf2.so +0 -0
- data/lib/1.9/gdk_pixbuf2.so +0 -0
- data/vendor/local/bin/gdk-pixbuf-csource.exe +0 -0
- data/vendor/local/bin/gdk-pixbuf-query-loaders.exe +0 -0
- data/vendor/local/bin/libgdk_pixbuf-2.0-0.dll +0 -0
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h +40 -0
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h +200 -5
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h +82 -3
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h +170 -0
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-loader.h +6 -1
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h +5 -0
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-transform.h +42 -1
- data/vendor/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache +2 -2
- data/vendor/local/lib/gdk_pixbuf-2.0.lib +0 -0
- data/vendor/local/lib/libgdk_pixbuf-2.0.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/gdk-pixbuf-2.0.pc +4 -2
- data/vendor/local/manifest/{gdk-pixbuf-dev_2.22.1-1_win32.mft → gdk-pixbuf-dev_2.24.0-1_win32.mft} +12 -13
- data/vendor/local/manifest/{gdk-pixbuf_2.22.1-1_win32.mft → gdk-pixbuf_2.24.0-1_win32.mft} +2 -1
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/GdkPixbufLoader.html +181 -150
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/annotation-glossary.html +30 -9
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-10.html +3 -3
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-12.html +4 -4
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-14.html +6 -6
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-2.html +35 -3
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-4.html +13 -9
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-6.html +6 -6
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-8.html +5 -5
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-deprecated.html +7 -7
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-full.html +251 -629
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Animations.html +644 -0
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-File-Loading.html +372 -0
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-File-saving.html +642 -0
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Image-Data-in-Memory.html +417 -0
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Inline-data.html +495 -0
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Module-Interface.html +485 -184
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html +168 -0
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/{gdk-pixbuf-scaling.html → gdk-pixbuf-Scaling.html} +296 -190
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html +617 -0
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/{gdk-pixbuf-util.html → gdk-pixbuf-Utilities.html} +83 -93
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Versioning.html +63 -26
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-csource.html +16 -16
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf-from-drawables.html +8 -8
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf-rendering.html +8 -8
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-query-loaders.html +12 -12
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf.devhelp2 +149 -128
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/index.html +18 -18
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/index.sgml +184 -154
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/license.html +3 -3
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/rn01.html +18 -18
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/rn02.html +5 -5
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/style.css +2 -1
- data/vendor/local/share/locale/af/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ang/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ar/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/as/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ast/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/az/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/be/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/be@latin/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/bg/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/bn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/bn_IN/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/br/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/bs/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ca/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ca@valencia/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/crh/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/cs/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/cy/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/dz/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/el/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/en@shaw/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/en_CA/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/en_GB/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/eo/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/et/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/eu/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/fa/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/fi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ga/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/gl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/gu/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/he/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/hi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/hr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/hu/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/hy/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ia/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/io/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/is/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ja/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ka/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/kn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ko/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ku/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/li/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/lt/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/lv/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mai/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ml/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ms/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/my/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nb/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nds/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ne/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nso/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/oc/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/or/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/pa/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ps/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/pt/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ro/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ru/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/si/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sq/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sr@ije/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sr@latin/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sv/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ta/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/te/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/th/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/tk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/tt/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ug/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/uk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/uz/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/uz@cyrillic/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/vi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/wa/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/xh/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/yi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/zh_CN/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/zh_HK/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/man/man1/gdk-pixbuf-csource.1 +2 -2
- data/vendor/local/share/man/man1/gdk-pixbuf-query-loaders.1 +2 -2
- data/vendor/local/src/dieterv/packaging/gdk-pixbuf_2.24.0-1_win32.log +956 -0
- data/vendor/local/src/dieterv/packaging/gdk-pixbuf_2.24.0-1_win32.sh +97 -0
- metadata +26 -24
- data/ChangeLog +0 -482
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-animation.html +0 -654
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-creating.html +0 -406
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-file-loading.html +0 -402
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-file-saving.html +0 -685
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html +0 -460
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-inline.html +0 -516
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-refcounting.html +0 -132
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf.devhelp +0 -175
- data/vendor/local/src/tml/packaging/gdk-pixbuf_2.22.1-1_win32.log +0 -1012
- data/vendor/local/src/tml/packaging/gdk-pixbuf_2.22.1-1_win32.sh +0 -256
@@ -1,23 +1,34 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2002,2003 Masao Mutoh
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "rbgdk-pixbuf2private.h"
|
12
23
|
|
13
24
|
#define GDK_TYPE_PIXDATA (gdk_pixdata_get_type())
|
14
|
-
#define
|
15
|
-
#define
|
25
|
+
#define RG_TARGET_NAMESPACE cPixdata
|
26
|
+
#define _SELF(s) (RVAL2GDKPIXDATA(s))
|
16
27
|
|
17
28
|
static ID id_pixdata;
|
18
29
|
|
19
30
|
/*****************************************/
|
20
|
-
GdkPixdata*
|
31
|
+
static GdkPixdata *
|
21
32
|
gdk_pixdata_copy(const GdkPixdata* src)
|
22
33
|
{
|
23
34
|
GdkPixdata* data;
|
@@ -27,8 +38,8 @@ gdk_pixdata_copy(const GdkPixdata* src)
|
|
27
38
|
return data;
|
28
39
|
}
|
29
40
|
|
30
|
-
GType
|
31
|
-
gdk_pixdata_get_type
|
41
|
+
static GType
|
42
|
+
gdk_pixdata_get_type(void)
|
32
43
|
{
|
33
44
|
static GType our_type = 0;
|
34
45
|
if (our_type == 0)
|
@@ -39,11 +50,11 @@ gdk_pixdata_get_type (void)
|
|
39
50
|
}
|
40
51
|
/*****************************************/
|
41
52
|
static VALUE
|
42
|
-
|
53
|
+
rg_s_from_pixbuf(G_GNUC_UNUSED VALUE self, VALUE pixbuf, VALUE use_rle)
|
43
54
|
{
|
44
55
|
GdkPixdata pixdata;
|
45
|
-
gpointer rle_data = gdk_pixdata_from_pixbuf(&pixdata,
|
46
|
-
VALUE ret =
|
56
|
+
gpointer rle_data = gdk_pixdata_from_pixbuf(&pixdata, RVAL2GDKPIXBUF(pixbuf), RVAL2CBOOL(use_rle));
|
57
|
+
VALUE ret = GDKPIXDATA2RVAL(&pixdata);
|
47
58
|
if (use_rle){
|
48
59
|
/* need to manage the returned value */
|
49
60
|
rb_ivar_set(ret, id_pixdata, Data_Wrap_Struct(rb_cData, NULL, g_free, rle_data));
|
@@ -52,7 +63,7 @@ pixdata_s_from_pixbuf(VALUE self, VALUE pixbuf, VALUE use_rle)
|
|
52
63
|
}
|
53
64
|
|
54
65
|
static VALUE
|
55
|
-
|
66
|
+
rg_to_pixbuf(VALUE self, VALUE copy_pixels)
|
56
67
|
{
|
57
68
|
GError* error = NULL;
|
58
69
|
GdkPixbuf* ret = gdk_pixbuf_from_pixdata(_SELF(self), RVAL2CBOOL(copy_pixels), &error);
|
@@ -62,7 +73,7 @@ pixdata_to_pixbuf(VALUE self, VALUE copy_pixels)
|
|
62
73
|
}
|
63
74
|
|
64
75
|
static VALUE
|
65
|
-
|
76
|
+
rg_serialize(VALUE self)
|
66
77
|
{
|
67
78
|
guint stream_length;
|
68
79
|
guint i;
|
@@ -75,32 +86,26 @@ pixdata_serialize(VALUE self)
|
|
75
86
|
}
|
76
87
|
|
77
88
|
static VALUE
|
78
|
-
|
89
|
+
rg_s_deserialize(VALUE self, VALUE rbstream)
|
79
90
|
{
|
80
91
|
GdkPixdata pixdata;
|
81
|
-
|
82
|
-
guint8 *
|
83
|
-
GError*
|
84
|
-
gint i, len;
|
92
|
+
long n;
|
93
|
+
guint8 *stream = RVAL2GUINT8S(rbstream, n);
|
94
|
+
GError *error = NULL;
|
85
95
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
gstream[i] = (guint8)NUM2UINT(RARRAY_PTR(stream)[i]);
|
91
|
-
}
|
92
|
-
ret = gdk_pixdata_deserialize(&pixdata, len, gstream, &error);
|
96
|
+
/* TODO: Should we really be creating a new array here? As far as I can
|
97
|
+
tell, the data is copied. */
|
98
|
+
if (!gdk_pixdata_deserialize(&pixdata, n, stream, &error))
|
99
|
+
RAISE_GERROR(error);
|
93
100
|
|
94
101
|
/* need to manage the returned value */
|
95
|
-
rb_ivar_set(
|
102
|
+
rb_ivar_set(self, id_pixdata, Data_Wrap_Struct(rb_cData, NULL, g_free, stream));
|
96
103
|
|
97
|
-
|
98
|
-
|
99
|
-
return PIXDATA2RVAL(&pixdata);
|
104
|
+
return GDKPIXDATA2RVAL(&pixdata);
|
100
105
|
}
|
101
106
|
|
102
107
|
static VALUE
|
103
|
-
|
108
|
+
rg_to_csource(VALUE self, VALUE name, VALUE dump_type)
|
104
109
|
{
|
105
110
|
GString* str = gdk_pixdata_to_csource(_SELF(self), RVAL2CSTR(name), FIX2INT(dump_type));
|
106
111
|
VALUE ret = CSTR2RVAL(str->str);
|
@@ -110,13 +115,13 @@ pixdata_to_csource(VALUE self, VALUE name, VALUE dump_type)
|
|
110
115
|
|
111
116
|
/* GdkPixdata */
|
112
117
|
static VALUE
|
113
|
-
|
118
|
+
rg_magic(VALUE self)
|
114
119
|
{
|
115
120
|
return UINT2NUM(_SELF(self)->magic);
|
116
121
|
}
|
117
122
|
|
118
123
|
static VALUE
|
119
|
-
|
124
|
+
rg_length(VALUE self)
|
120
125
|
{
|
121
126
|
gint32 length = _SELF(self)->length;
|
122
127
|
|
@@ -126,31 +131,31 @@ pixdata_length(VALUE self)
|
|
126
131
|
}
|
127
132
|
|
128
133
|
static VALUE
|
129
|
-
|
134
|
+
rg_pixdata_type(VALUE self)
|
130
135
|
{
|
131
136
|
return UINT2NUM(_SELF(self)->pixdata_type);
|
132
137
|
}
|
133
138
|
|
134
139
|
static VALUE
|
135
|
-
|
140
|
+
rg_rowstride(VALUE self)
|
136
141
|
{
|
137
142
|
return INT2NUM(_SELF(self)->rowstride);
|
138
143
|
}
|
139
144
|
|
140
145
|
static VALUE
|
141
|
-
|
146
|
+
rg_width(VALUE self)
|
142
147
|
{
|
143
148
|
return INT2NUM(_SELF(self)->width);
|
144
149
|
}
|
145
150
|
|
146
151
|
static VALUE
|
147
|
-
|
152
|
+
rg_height(VALUE self)
|
148
153
|
{
|
149
154
|
return INT2NUM(_SELF(self)->height);
|
150
155
|
}
|
151
156
|
|
152
157
|
static VALUE
|
153
|
-
|
158
|
+
rg_pixel_data(VALUE self)
|
154
159
|
{
|
155
160
|
gint i;
|
156
161
|
guint8* ret = _SELF(self)->pixel_data;
|
@@ -163,47 +168,46 @@ pixdata_pixel_data(VALUE self)
|
|
163
168
|
return ary;
|
164
169
|
}
|
165
170
|
|
166
|
-
|
167
171
|
void
|
168
172
|
Init_gdk_pixdata(VALUE mGdk)
|
169
173
|
{
|
170
|
-
VALUE
|
174
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_PIXDATA, "Pixdata", mGdk);
|
171
175
|
|
172
176
|
id_pixdata = rb_intern("pixdata");
|
173
177
|
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
rb_define_const(
|
188
|
-
rb_define_const(
|
178
|
+
RG_DEF_SMETHOD(from_pixbuf, 2);
|
179
|
+
RG_DEF_SMETHOD(deserialize, 1);
|
180
|
+
RG_DEF_METHOD(to_pixbuf, 1);
|
181
|
+
RG_DEF_METHOD(serialize, 0);
|
182
|
+
RG_DEF_METHOD(to_csource, 2);
|
183
|
+
RG_DEF_METHOD(magic, 0);
|
184
|
+
RG_DEF_METHOD(length, 0);
|
185
|
+
RG_DEF_METHOD(pixdata_type, 0);
|
186
|
+
RG_DEF_METHOD(rowstride, 0);
|
187
|
+
RG_DEF_METHOD(width, 0);
|
188
|
+
RG_DEF_METHOD(height, 0);
|
189
|
+
RG_DEF_METHOD(pixel_data, 0);
|
190
|
+
|
191
|
+
rb_define_const(RG_TARGET_NAMESPACE, "PIXBUF_MAGIC_NUMBER", INT2NUM(GDK_PIXBUF_MAGIC_NUMBER));
|
192
|
+
rb_define_const(RG_TARGET_NAMESPACE, "HEADER_LENGTH", INT2NUM(GDK_PIXDATA_HEADER_LENGTH));
|
189
193
|
|
190
194
|
/* GdkPixdataType */
|
191
|
-
rb_define_const(
|
192
|
-
rb_define_const(
|
193
|
-
rb_define_const(
|
194
|
-
rb_define_const(
|
195
|
-
rb_define_const(
|
196
|
-
rb_define_const(
|
197
|
-
rb_define_const(
|
198
|
-
rb_define_const(
|
195
|
+
rb_define_const(RG_TARGET_NAMESPACE, "COLOR_TYPE_RGB", INT2FIX(GDK_PIXDATA_COLOR_TYPE_RGB));
|
196
|
+
rb_define_const(RG_TARGET_NAMESPACE, "COLOR_TYPE_RGBA", INT2FIX(GDK_PIXDATA_COLOR_TYPE_RGBA));
|
197
|
+
rb_define_const(RG_TARGET_NAMESPACE, "COLOR_TYPE_MASK", INT2FIX(GDK_PIXDATA_COLOR_TYPE_MASK));
|
198
|
+
rb_define_const(RG_TARGET_NAMESPACE, "SAMPLE_WIDTH_8", INT2FIX(GDK_PIXDATA_SAMPLE_WIDTH_8));
|
199
|
+
rb_define_const(RG_TARGET_NAMESPACE, "SAMPLE_WIDTH_MASK", INT2FIX(GDK_PIXDATA_SAMPLE_WIDTH_MASK));
|
200
|
+
rb_define_const(RG_TARGET_NAMESPACE, "ENCODING_RAW", INT2FIX(GDK_PIXDATA_ENCODING_RAW));
|
201
|
+
rb_define_const(RG_TARGET_NAMESPACE, "ENCODING_RLE", INT2FIX(GDK_PIXDATA_ENCODING_RLE));
|
202
|
+
rb_define_const(RG_TARGET_NAMESPACE, "ENCODING_MASK", INT2FIX(GDK_PIXDATA_ENCODING_MASK));
|
199
203
|
|
200
204
|
/* GdkPixdataDumpType */
|
201
|
-
rb_define_const(
|
202
|
-
rb_define_const(
|
203
|
-
rb_define_const(
|
204
|
-
rb_define_const(
|
205
|
-
rb_define_const(
|
206
|
-
rb_define_const(
|
207
|
-
rb_define_const(
|
208
|
-
rb_define_const(
|
205
|
+
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_PIXDATA_STREAM", INT2FIX(GDK_PIXDATA_DUMP_PIXDATA_STREAM));
|
206
|
+
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_PIXDATA_STRUCT", INT2FIX(GDK_PIXDATA_DUMP_PIXDATA_STRUCT));
|
207
|
+
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_MACROS", INT2FIX(GDK_PIXDATA_DUMP_MACROS));
|
208
|
+
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_GTYPES", INT2FIX(GDK_PIXDATA_DUMP_GTYPES));
|
209
|
+
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_CTYPES", INT2FIX(GDK_PIXDATA_DUMP_CTYPES));
|
210
|
+
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_STATIC", INT2FIX(GDK_PIXDATA_DUMP_STATIC));
|
211
|
+
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_CONST", INT2FIX(GDK_PIXDATA_DUMP_CONST));
|
212
|
+
rb_define_const(RG_TARGET_NAMESPACE, "DUMP_RLE_DECODER", INT2FIX(GDK_PIXDATA_DUMP_RLE_DECODER));
|
209
213
|
}
|
data/lib/1.8/gdk_pixbuf2.so
CHANGED
Binary file
|
data/lib/1.9/gdk_pixbuf2.so
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -38,7 +38,20 @@ G_BEGIN_DECLS
|
|
38
38
|
|
39
39
|
/* Animation support */
|
40
40
|
|
41
|
+
/**
|
42
|
+
* GdkPixbufAnimation:
|
43
|
+
*
|
44
|
+
* An opaque struct representing an animation.
|
45
|
+
*/
|
41
46
|
typedef struct _GdkPixbufAnimation GdkPixbufAnimation;
|
47
|
+
|
48
|
+
|
49
|
+
/**
|
50
|
+
* GdkPixbufAnimationIter:
|
51
|
+
*
|
52
|
+
* An opaque struct representing an iterator which points to a
|
53
|
+
* certain position in an animation.
|
54
|
+
*/
|
42
55
|
typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter;
|
43
56
|
|
44
57
|
#define GDK_TYPE_PIXBUF_ANIMATION (gdk_pixbuf_animation_get_type ())
|
@@ -82,6 +95,18 @@ gboolean gdk_pixbuf_animation_iter_advance (Gd
|
|
82
95
|
|
83
96
|
|
84
97
|
|
98
|
+
/**
|
99
|
+
* GdkPixbufAnimationClass:
|
100
|
+
* @parent_class: the parent class
|
101
|
+
* @is_static_image: returns whether the given animation is just a static image.
|
102
|
+
* @get_static_image: returns a static image representing the given animation.
|
103
|
+
* @get_size: fills @width and @height with the frame size of the animation.
|
104
|
+
* @get_iter: returns an iterator for the given animation.
|
105
|
+
*
|
106
|
+
* Modules supporting animations must derive a type from
|
107
|
+
* #GdkPixbufAnimation, providing suitable implementations of the
|
108
|
+
* virtual functions.
|
109
|
+
*/
|
85
110
|
typedef struct _GdkPixbufAnimationClass GdkPixbufAnimationClass;
|
86
111
|
|
87
112
|
#define GDK_PIXBUF_ANIMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimationClass))
|
@@ -114,6 +139,21 @@ struct _GdkPixbufAnimationClass {
|
|
114
139
|
|
115
140
|
|
116
141
|
|
142
|
+
/**
|
143
|
+
* GdkPixbufAnimationIterClass:
|
144
|
+
* @parent_class: the parent class
|
145
|
+
* @get_delay_time: returns the time in milliseconds that the current frame
|
146
|
+
* should be shown.
|
147
|
+
* @get_pixbuf: returns the current frame.
|
148
|
+
* @on_currently_loading_frame: returns whether the current frame of @iter is
|
149
|
+
* being loaded.
|
150
|
+
* @advance: advances the iterator to @current_time, possibly changing the
|
151
|
+
* current frame.
|
152
|
+
*
|
153
|
+
* Modules supporting animations must derive a type from
|
154
|
+
* #GdkPixbufAnimationIter, providing suitable implementations of the
|
155
|
+
* virtual functions.
|
156
|
+
*/
|
117
157
|
typedef struct _GdkPixbufAnimationIterClass GdkPixbufAnimationIterClass;
|
118
158
|
|
119
159
|
#define GDK_PIXBUF_ANIMATION_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIterClass))
|
@@ -36,15 +36,122 @@
|
|
36
36
|
|
37
37
|
G_BEGIN_DECLS
|
38
38
|
|
39
|
-
|
39
|
+
/**
|
40
|
+
* SECTION:gdk-pixbuf
|
41
|
+
* @Short_description: Information that describes an image.
|
42
|
+
* @Title: The GdkPixbuf Structure
|
43
|
+
*
|
44
|
+
*
|
45
|
+
* The #GdkPixbuf structure contains
|
46
|
+
* information that describes an image in memory.
|
47
|
+
*
|
48
|
+
*
|
49
|
+
* <section id="image-data">
|
50
|
+
* <title>Image Data</title>
|
51
|
+
* <para>
|
52
|
+
* Image data in a pixbuf is stored in memory in uncompressed,
|
53
|
+
* packed format. Rows in the image are stored top to bottom, and
|
54
|
+
* in each row pixels are stored from left to right. There may be
|
55
|
+
* padding at the end of a row. The "rowstride" value of a pixbuf,
|
56
|
+
* as returned by gdk_pixbuf_get_rowstride(), indicates the number
|
57
|
+
* of bytes between rows.
|
58
|
+
*
|
59
|
+
*
|
60
|
+
* <example id="put-pixel">
|
61
|
+
* <title>put_pixel(<!-- -->) example</title>
|
62
|
+
* <para>
|
63
|
+
*
|
64
|
+
* The following code illustrates a simple put_pixel(<!-- -->)
|
65
|
+
* function for RGB pixbufs with 8 bits per channel with an alpha
|
66
|
+
* channel. It is not included in the gdk-pixbuf library for
|
67
|
+
* performance reasons; rather than making several function calls
|
68
|
+
* for each pixel, your own code can take shortcuts.
|
69
|
+
*
|
70
|
+
*
|
71
|
+
* <programlisting>
|
72
|
+
* static void
|
73
|
+
* put_pixel (GdkPixbuf *pixbuf, int x, int y, guchar red, guchar green, guchar blue, guchar alpha)
|
74
|
+
* {
|
75
|
+
* int width, height, rowstride, n_channels;
|
76
|
+
* guchar *pixels, *p;
|
77
|
+
*
|
78
|
+
* n_channels = gdk_pixbuf_get_n_channels (pixbuf);
|
79
|
+
*
|
80
|
+
* g_assert (gdk_pixbuf_get_colorspace (pixbuf) == GDK_COLORSPACE_RGB);
|
81
|
+
* g_assert (gdk_pixbuf_get_bits_per_sample (pixbuf) == 8);
|
82
|
+
* g_assert (gdk_pixbuf_get_has_alpha (pixbuf));
|
83
|
+
* g_assert (n_channels == 4);
|
84
|
+
*
|
85
|
+
* width = gdk_pixbuf_get_width (pixbuf);
|
86
|
+
* height = gdk_pixbuf_get_height (pixbuf);
|
87
|
+
*
|
88
|
+
* g_assert (x >= 0 && x < width);
|
89
|
+
* g_assert (y >= 0 && y < height);
|
90
|
+
*
|
91
|
+
* rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
92
|
+
* pixels = gdk_pixbuf_get_pixels (pixbuf);
|
93
|
+
*
|
94
|
+
* p = pixels + y * rowstride + x * n_channels;
|
95
|
+
* p[0] = red;
|
96
|
+
* p[1] = green;
|
97
|
+
* p[2] = blue;
|
98
|
+
* p[3] = alpha;
|
99
|
+
* }
|
100
|
+
* </programlisting>
|
101
|
+
*
|
102
|
+
* This function will not work for pixbufs with images that are
|
103
|
+
* other than 8 bits per sample or channel, but it will work for
|
104
|
+
* most of the pixbufs that GTK+ uses.
|
105
|
+
* </para>
|
106
|
+
* </example>
|
107
|
+
*
|
108
|
+
* <note>
|
109
|
+
* If you are doing memcpy() of raw pixbuf data, note that the
|
110
|
+
* last row in the pixbuf may not be as wide as the full
|
111
|
+
* rowstride, but rather just as wide as the pixel data needs to
|
112
|
+
* be. That is, it is unsafe to do <literal>memcpy (dest,
|
113
|
+
* pixels, rowstride * height)</literal> to copy a whole pixbuf.
|
114
|
+
* Use gdk_pixbuf_copy() instead, or compute the width in bytes
|
115
|
+
* of the last row as <literal>width * ((n_channels *
|
116
|
+
* bits_per_sample + 7) / 8)</literal>.
|
117
|
+
* </note>
|
118
|
+
* </para>
|
119
|
+
* </section>
|
120
|
+
*/
|
121
|
+
|
122
|
+
|
123
|
+
/**
|
124
|
+
* GdkPixbufAlphaMode:
|
125
|
+
* @GDK_PIXBUF_ALPHA_BILEVEL: A bilevel clipping mask (black and white)
|
126
|
+
* will be created and used to draw the image. Pixels below 0.5 opacity
|
127
|
+
* will be considered fully transparent, and all others will be
|
128
|
+
* considered fully opaque.
|
129
|
+
* @GDK_PIXBUF_ALPHA_FULL: For now falls back to #GDK_PIXBUF_ALPHA_BILEVEL.
|
130
|
+
* In the future it will do full alpha compositing.
|
131
|
+
*
|
132
|
+
* These values can be passed to
|
133
|
+
* gdk_pixbuf_render_to_drawable_alpha() to control how the alpha
|
134
|
+
* channel of an image should be handled. This function can create a
|
135
|
+
* bilevel clipping mask (black and white) and use it while painting
|
136
|
+
* the image. In the future, when the X Window System gets an alpha
|
137
|
+
* channel extension, it will be possible to do full alpha
|
138
|
+
* compositing onto arbitrary drawables. For now both cases fall
|
139
|
+
* back to a bilevel clipping mask.
|
140
|
+
*/
|
40
141
|
typedef enum
|
41
142
|
{
|
42
143
|
GDK_PIXBUF_ALPHA_BILEVEL,
|
43
144
|
GDK_PIXBUF_ALPHA_FULL
|
44
145
|
} GdkPixbufAlphaMode;
|
45
146
|
|
46
|
-
|
47
|
-
*
|
147
|
+
/**
|
148
|
+
* GdkColorspace:
|
149
|
+
* @GDK_COLORSPACE_RGB: Indicates a red/green/blue additive color space.
|
150
|
+
*
|
151
|
+
* This enumeration defines the color spaces that are supported by
|
152
|
+
* the &gdk-pixbuf; library. Currently only RGB is supported.
|
153
|
+
*/
|
154
|
+
/* Note that these values are encoded in inline pixbufs
|
48
155
|
* as ints, so don't reorder them
|
49
156
|
*/
|
50
157
|
typedef enum {
|
@@ -52,6 +159,16 @@ typedef enum {
|
|
52
159
|
} GdkColorspace;
|
53
160
|
|
54
161
|
/* All of these are opaque structures */
|
162
|
+
|
163
|
+
/**
|
164
|
+
* GdkPixbuf:
|
165
|
+
*
|
166
|
+
* This is the main structure in the &gdk-pixbuf; library. It is
|
167
|
+
* used to represent images. It contains information about the
|
168
|
+
* image's pixel data, its color space, bits per sample, width and
|
169
|
+
* height, and the rowstride (the number of bytes between the start of
|
170
|
+
* one row and the start of the next).
|
171
|
+
*/
|
55
172
|
typedef struct _GdkPixbuf GdkPixbuf;
|
56
173
|
|
57
174
|
#define GDK_TYPE_PIXBUF (gdk_pixbuf_get_type ())
|
@@ -59,11 +176,43 @@ typedef struct _GdkPixbuf GdkPixbuf;
|
|
59
176
|
#define GDK_IS_PIXBUF(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF))
|
60
177
|
|
61
178
|
|
62
|
-
|
179
|
+
/**
|
180
|
+
* GdkPixbufDestroyNotify:
|
181
|
+
* @pixels: The pixel array of the pixbuf that is being finalized.
|
182
|
+
* @data: User closure data.
|
183
|
+
*
|
184
|
+
* A function of this type is responsible for freeing the pixel array
|
185
|
+
* of a pixbuf. The gdk_pixbuf_new_from_data() function lets you
|
186
|
+
* pass in a pre-allocated pixel array so that a pixbuf can be
|
187
|
+
* created from it; in this case you will need to pass in a function
|
188
|
+
* of #GdkPixbufDestroyNotify so that the pixel data can be freed
|
189
|
+
* when the pixbuf is finalized.
|
190
|
+
*/
|
63
191
|
typedef void (* GdkPixbufDestroyNotify) (guchar *pixels, gpointer data);
|
64
192
|
|
193
|
+
/**
|
194
|
+
* GDK_PIXBUF_ERROR:
|
195
|
+
*
|
196
|
+
* Error domain used for pixbuf operations. Indicates that the error code
|
197
|
+
* will be in the #GdkPixbufError enumeration. See #GError for
|
198
|
+
* information on error domains and error codes.
|
199
|
+
*/
|
65
200
|
#define GDK_PIXBUF_ERROR gdk_pixbuf_error_quark ()
|
66
201
|
|
202
|
+
/**
|
203
|
+
* GdkPixbufError:
|
204
|
+
* @GDK_PIXBUF_ERROR_CORRUPT_IMAGE: An image file was broken somehow.
|
205
|
+
* @GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY: Not enough memory.
|
206
|
+
* @GDK_PIXBUF_ERROR_BAD_OPTION: A bad option was passed to a pixbuf save module.
|
207
|
+
* @GDK_PIXBUF_ERROR_UNKNOWN_TYPE: Unknown image type.
|
208
|
+
* @GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION: Don't know how to perform the
|
209
|
+
* given operation on the type of image at hand.
|
210
|
+
* @GDK_PIXBUF_ERROR_FAILED: Generic failure code, something went wrong.
|
211
|
+
*
|
212
|
+
* An error code in the #GDK_PIXBUF_ERROR domain. Many &gdk-pixbuf;
|
213
|
+
* operations can cause errors in this domain, or in the #G_FILE_ERROR
|
214
|
+
* domain.
|
215
|
+
*/
|
67
216
|
typedef enum {
|
68
217
|
/* image data hosed */
|
69
218
|
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
@@ -182,6 +331,25 @@ gboolean gdk_pixbuf_savev (GdkPixbuf *pixbuf,
|
|
182
331
|
|
183
332
|
/* Saving to a callback function */
|
184
333
|
|
334
|
+
|
335
|
+
/**
|
336
|
+
* GdkPixbufSaveFunc:
|
337
|
+
* @buf: bytes to be written.
|
338
|
+
* @count: number of bytes in @buf.
|
339
|
+
* @error: (out): A location to return an error.
|
340
|
+
* @data: (closure): user data passed to gdk_pixbuf_save_to_callback().
|
341
|
+
*
|
342
|
+
* Specifies the type of the function passed to
|
343
|
+
* gdk_pixbuf_save_to_callback(). It is called once for each block of
|
344
|
+
* bytes that is "written" by gdk_pixbuf_save_to_callback(). If
|
345
|
+
* successful it should return %TRUE. If an error occurs it should set
|
346
|
+
* @error and return %FALSE, in which case gdk_pixbuf_save_to_callback()
|
347
|
+
* will fail with the same error.
|
348
|
+
*
|
349
|
+
* Since: 2.4
|
350
|
+
* Returns: %TRUE if successful, %FALSE (with @error set) if failed.
|
351
|
+
*/
|
352
|
+
|
185
353
|
typedef gboolean (*GdkPixbufSaveFunc) (const gchar *buf,
|
186
354
|
gsize count,
|
187
355
|
GError **error,
|
@@ -223,6 +391,14 @@ GdkPixbuf *gdk_pixbuf_new_from_stream (GInputStream *stream,
|
|
223
391
|
GCancellable *cancellable,
|
224
392
|
GError **error);
|
225
393
|
|
394
|
+
void gdk_pixbuf_new_from_stream_async (GInputStream *stream,
|
395
|
+
GCancellable *cancellable,
|
396
|
+
GAsyncReadyCallback callback,
|
397
|
+
gpointer user_data);
|
398
|
+
|
399
|
+
GdkPixbuf *gdk_pixbuf_new_from_stream_finish (GAsyncResult *async_result,
|
400
|
+
GError **error);
|
401
|
+
|
226
402
|
GdkPixbuf *gdk_pixbuf_new_from_stream_at_scale (GInputStream *stream,
|
227
403
|
gint width,
|
228
404
|
gint height,
|
@@ -230,6 +406,14 @@ GdkPixbuf *gdk_pixbuf_new_from_stream_at_scale (GInputStream *stream,
|
|
230
406
|
GCancellable *cancellable,
|
231
407
|
GError **error);
|
232
408
|
|
409
|
+
void gdk_pixbuf_new_from_stream_at_scale_async (GInputStream *stream,
|
410
|
+
gint width,
|
411
|
+
gint height,
|
412
|
+
gboolean preserve_aspect_ratio,
|
413
|
+
GCancellable *cancellable,
|
414
|
+
GAsyncReadyCallback callback,
|
415
|
+
gpointer user_data);
|
416
|
+
|
233
417
|
gboolean gdk_pixbuf_save_to_stream (GdkPixbuf *pixbuf,
|
234
418
|
GOutputStream *stream,
|
235
419
|
const char *type,
|
@@ -237,6 +421,17 @@ gboolean gdk_pixbuf_save_to_stream (GdkPixbuf *pixbuf,
|
|
237
421
|
GError **error,
|
238
422
|
...);
|
239
423
|
|
424
|
+
void gdk_pixbuf_save_to_stream_async (GdkPixbuf *pixbuf,
|
425
|
+
GOutputStream *stream,
|
426
|
+
const gchar *type,
|
427
|
+
GCancellable *cancellable,
|
428
|
+
GAsyncReadyCallback callback,
|
429
|
+
gpointer user_data,
|
430
|
+
...);
|
431
|
+
|
432
|
+
gboolean gdk_pixbuf_save_to_stream_finish (GAsyncResult *async_result,
|
433
|
+
GError **error);
|
434
|
+
|
240
435
|
/* Adding an alpha channel */
|
241
436
|
GdkPixbuf *gdk_pixbuf_add_alpha (const GdkPixbuf *pixbuf, gboolean substitute_color,
|
242
437
|
guchar r, guchar g, guchar b);
|
@@ -257,7 +452,7 @@ void gdk_pixbuf_saturate_and_pixelate (const GdkPixbuf *src,
|
|
257
452
|
/* Transform an image to agree with its embedded orientation option / tag */
|
258
453
|
GdkPixbuf *gdk_pixbuf_apply_embedded_orientation (GdkPixbuf *src);
|
259
454
|
|
260
|
-
|
455
|
+
const gchar * gdk_pixbuf_get_option (GdkPixbuf *pixbuf,
|
261
456
|
const gchar *key);
|
262
457
|
|
263
458
|
|