comparison dwt/internal/gtk/c/gdkpixbuf.d @ 11:5f725d09c076

Added dynamic loader from gtkd with cleanup and modifications. Tango only support. No OS.d tie-in yet.
author John Reimer<terminal.node@gmail.com>
date Sat, 05 Jan 2008 15:13:44 -0800
parents
children
comparison
equal deleted inserted replaced
10:63c023465156 11:5f725d09c076
1 /******************************************************************************
2
3 This file is part of gtkD.
4
5 gtkD is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 gtkD is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with gtkD; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
19 ******************************************************************************/
20
21 module dwt.internal.gtk.c.gdkpixbuf;
22
23 private import dwt.internal.gtk.c.gdkpixbuftypes;
24 private import dwt.internal.gtk.runtime.Loader;
25
26 /******************************************************************************
27
28 ******************************************************************************/
29
30 private Linker gdkpixbufLinker;
31
32 /******************************************************************************
33
34 ******************************************************************************/
35
36 static this()
37 {
38 gdkpixbufLinker = new Linker( getLibraryPath ~ importLibs[LIBRARY.GDKPIXBUF] );
39 gdkpixbufLinker.link( gdkpixbufLinks );
40 }
41
42 /******************************************************************************
43
44 ******************************************************************************/
45
46 static ~this()
47 {
48 delete gdkpixbufLinker;
49 }
50
51 /******************************************************************************
52
53 ******************************************************************************/
54
55 extern(C)
56 {
57 // gdkpixbuf.Pixdata
58
59 gpointer function(GdkPixdata* pixdata, GdkPixbuf* pixbuf, gboolean useRle)gdk_pixdata_from_pixbuf;
60 GdkPixbuf* function(GdkPixdata* pixdata, gboolean copyPixels, GError** error)gdk_pixbuf_from_pixdata;
61 guint8* function(GdkPixdata* pixdata, guint* streamLengthP)gdk_pixdata_serialize;
62 gboolean function(GdkPixdata* pixdata, guint streamLength, guint8* stream, GError** error)gdk_pixdata_deserialize;
63 GString* function(GdkPixdata* pixdata, gchar* name, GdkPixdataDumpType dumpType)gdk_pixdata_to_csource;
64
65 // gdkpixbuf.PixbufAnimation
66
67 GdkPixbufAnimation* function(char* filename, GError** error)gdk_pixbuf_animation_new_from_file;
68 GdkPixbufAnimation* function(GdkPixbufAnimation* animation)gdk_pixbuf_animation_ref;
69 void function(GdkPixbufAnimation* animation)gdk_pixbuf_animation_unref;
70 int function(GdkPixbufAnimation* animation)gdk_pixbuf_animation_get_width;
71 int function(GdkPixbufAnimation* animation)gdk_pixbuf_animation_get_height;
72 GdkPixbufAnimationIter* function(GdkPixbufAnimation* animation, GTimeVal* startTime)gdk_pixbuf_animation_get_iter;
73 gboolean function(GdkPixbufAnimation* animation)gdk_pixbuf_animation_is_static_image;
74 GdkPixbuf* function(GdkPixbufAnimation* animation)gdk_pixbuf_animation_get_static_image;
75 gboolean function(GdkPixbufAnimationIter* iter, GTimeVal* currentTime)gdk_pixbuf_animation_iter_advance;
76 int function(GdkPixbufAnimationIter* iter)gdk_pixbuf_animation_iter_get_delay_time;
77 gboolean function(GdkPixbufAnimationIter* iter)gdk_pixbuf_animation_iter_on_currently_loading_frame;
78 GdkPixbuf* function(GdkPixbufAnimationIter* iter)gdk_pixbuf_animation_iter_get_pixbuf;
79 GdkPixbufSimpleAnim* function(gint width, gint height, gfloat rate)gdk_pixbuf_simple_anim_new;
80 void function(GdkPixbufSimpleAnim* animation, GdkPixbuf* pixbuf)gdk_pixbuf_simple_anim_add_frame;
81
82 // gdkpixbuf.PixbufLoader
83
84 GdkPixbufLoader* function()gdk_pixbuf_loader_new;
85 GdkPixbufLoader* function(char* imageType, GError** error)gdk_pixbuf_loader_new_with_type;
86 GdkPixbufLoader* function(char* mimeType, GError** error)gdk_pixbuf_loader_new_with_mime_type;
87 GdkPixbufFormat* function(GdkPixbufLoader* loader)gdk_pixbuf_loader_get_format;
88 gboolean function(GdkPixbufLoader* loader, guchar* buf, gsize count, GError** error)gdk_pixbuf_loader_write;
89 void function(GdkPixbufLoader* loader, int width, int height)gdk_pixbuf_loader_set_size;
90 GdkPixbuf* function(GdkPixbufLoader* loader)gdk_pixbuf_loader_get_pixbuf;
91 GdkPixbufAnimation* function(GdkPixbufLoader* loader)gdk_pixbuf_loader_get_animation;
92 gboolean function(GdkPixbufLoader* loader, GError** error)gdk_pixbuf_loader_close;
93
94 // gdkpixbuf.PixbufFormat
95
96 gboolean function(GdkPixbuf* pixbuf, gchar* key, gchar* value)gdk_pixbuf_set_option;
97 GSList* function()gdk_pixbuf_get_formats;
98 gchar* function(GdkPixbufFormat* format)gdk_pixbuf_format_get_name;
99 gchar* function(GdkPixbufFormat* format)gdk_pixbuf_format_get_description;
100 gchar** function(GdkPixbufFormat* format)gdk_pixbuf_format_get_mime_types;
101 gchar** function(GdkPixbufFormat* format)gdk_pixbuf_format_get_extensions;
102 gboolean function(GdkPixbufFormat* format)gdk_pixbuf_format_is_writable;
103 gboolean function(GdkPixbufFormat* format)gdk_pixbuf_format_is_scalable;
104 gboolean function(GdkPixbufFormat* format)gdk_pixbuf_format_is_disabled;
105 void function(GdkPixbufFormat* format, gboolean disabled)gdk_pixbuf_format_set_disabled;
106 gchar* function(GdkPixbufFormat* format)gdk_pixbuf_format_get_license;
107 GdkPixbufFormat* function(gchar* filename, gint* width, gint* height)gdk_pixbuf_get_file_info;
108 }
109
110 /******************************************************************************
111
112 ******************************************************************************/
113
114 Symbol[] gdkpixbufLinks =
115 [
116
117 { "gdk_pixdata_from_pixbuf", cast(void**)& gdk_pixdata_from_pixbuf},
118 { "gdk_pixbuf_from_pixdata", cast(void**)& gdk_pixbuf_from_pixdata},
119 { "gdk_pixdata_serialize", cast(void**)& gdk_pixdata_serialize},
120 { "gdk_pixdata_deserialize", cast(void**)& gdk_pixdata_deserialize},
121 { "gdk_pixdata_to_csource", cast(void**)& gdk_pixdata_to_csource},
122 { "gdk_pixbuf_animation_new_from_file", cast(void**)& gdk_pixbuf_animation_new_from_file},
123 { "gdk_pixbuf_animation_ref", cast(void**)& gdk_pixbuf_animation_ref},
124 { "gdk_pixbuf_animation_unref", cast(void**)& gdk_pixbuf_animation_unref},
125 { "gdk_pixbuf_animation_get_width", cast(void**)& gdk_pixbuf_animation_get_width},
126 { "gdk_pixbuf_animation_get_height", cast(void**)& gdk_pixbuf_animation_get_height},
127 { "gdk_pixbuf_animation_get_iter", cast(void**)& gdk_pixbuf_animation_get_iter},
128 { "gdk_pixbuf_animation_is_static_image", cast(void**)& gdk_pixbuf_animation_is_static_image},
129 { "gdk_pixbuf_animation_get_static_image", cast(void**)& gdk_pixbuf_animation_get_static_image},
130 { "gdk_pixbuf_animation_iter_advance", cast(void**)& gdk_pixbuf_animation_iter_advance},
131 { "gdk_pixbuf_animation_iter_get_delay_time", cast(void**)& gdk_pixbuf_animation_iter_get_delay_time},
132 { "gdk_pixbuf_animation_iter_on_currently_loading_frame", cast(void**)& gdk_pixbuf_animation_iter_on_currently_loading_frame},
133 { "gdk_pixbuf_animation_iter_get_pixbuf", cast(void**)& gdk_pixbuf_animation_iter_get_pixbuf},
134 { "gdk_pixbuf_simple_anim_new", cast(void**)& gdk_pixbuf_simple_anim_new},
135 { "gdk_pixbuf_simple_anim_add_frame", cast(void**)& gdk_pixbuf_simple_anim_add_frame},
136 { "gdk_pixbuf_loader_new", cast(void**)& gdk_pixbuf_loader_new},
137 { "gdk_pixbuf_loader_new_with_type", cast(void**)& gdk_pixbuf_loader_new_with_type},
138 { "gdk_pixbuf_loader_new_with_mime_type", cast(void**)& gdk_pixbuf_loader_new_with_mime_type},
139 { "gdk_pixbuf_loader_get_format", cast(void**)& gdk_pixbuf_loader_get_format},
140 { "gdk_pixbuf_loader_write", cast(void**)& gdk_pixbuf_loader_write},
141 { "gdk_pixbuf_loader_set_size", cast(void**)& gdk_pixbuf_loader_set_size},
142 { "gdk_pixbuf_loader_get_pixbuf", cast(void**)& gdk_pixbuf_loader_get_pixbuf},
143 { "gdk_pixbuf_loader_get_animation", cast(void**)& gdk_pixbuf_loader_get_animation},
144 { "gdk_pixbuf_loader_close", cast(void**)& gdk_pixbuf_loader_close},
145 { "gdk_pixbuf_set_option", cast(void**)& gdk_pixbuf_set_option},
146 { "gdk_pixbuf_get_formats", cast(void**)& gdk_pixbuf_get_formats},
147 { "gdk_pixbuf_format_get_name", cast(void**)& gdk_pixbuf_format_get_name},
148 { "gdk_pixbuf_format_get_description", cast(void**)& gdk_pixbuf_format_get_description},
149 { "gdk_pixbuf_format_get_mime_types", cast(void**)& gdk_pixbuf_format_get_mime_types},
150 { "gdk_pixbuf_format_get_extensions", cast(void**)& gdk_pixbuf_format_get_extensions},
151 { "gdk_pixbuf_format_is_writable", cast(void**)& gdk_pixbuf_format_is_writable},
152 { "gdk_pixbuf_format_is_scalable", cast(void**)& gdk_pixbuf_format_is_scalable},
153 { "gdk_pixbuf_format_is_disabled", cast(void**)& gdk_pixbuf_format_is_disabled},
154 { "gdk_pixbuf_format_set_disabled", cast(void**)& gdk_pixbuf_format_set_disabled},
155 { "gdk_pixbuf_format_get_license", cast(void**)& gdk_pixbuf_format_get_license},
156 { "gdk_pixbuf_get_file_info", cast(void**)& gdk_pixbuf_get_file_info},
157
158 ];