File: GtkImage.xs

package info (click to toggle)
libgtk2-perl 2:1.2499-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,668 kB
  • ctags: 594
  • sloc: perl: 22,100; ansic: 122; makefile: 17
file content (219 lines) | stat: -rw-r--r-- 5,849 bytes parent folder | download | duplicates (5)
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
/*
 * Copyright (c) 2003-2005 by the gtk2-perl team (see the file AUTHORS)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
 * Boston, MA  02111-1307  USA.
 *
 * $Id$
 */

#include "gtk2perl.h"

MODULE = Gtk2::Image	PACKAGE = Gtk2::Image	PREFIX = gtk_image_

GtkWidget*
gtk_image_new (class)
    C_ARGS:
	/*void*/

 ## GtkWidget* gtk_image_new_from_pixmap (GdkPixmap *pixmap, GdkBitmap *mask)
GtkWidget*
gtk_image_new_from_pixmap (class, pixmap, mask)
	GdkPixmap_ornull * pixmap
	GdkBitmap_ornull * mask
    C_ARGS:
	pixmap, mask

 ## GtkWidget* gtk_image_new_from_image (GdkImage *image, GdkBitmap *mask)
GtkWidget*
gtk_image_new_from_image (class, image, mask)
	GdkImage_ornull *image
	GdkBitmap_ornull *mask
    C_ARGS:
	image, mask

GtkWidget*
gtk_image_new_from_file (class, filename)
	GPerlFilename_ornull filename
    C_ARGS:
        filename

 ## GtkWidget* gtk_image_new_from_pixbuf (GdkPixbuf *pixbuf)
GtkWidget*
gtk_image_new_from_pixbuf (class, pixbuf)
	GdkPixbuf_ornull * pixbuf
    C_ARGS:
	pixbuf

GtkWidget*
gtk_image_new_from_stock (class, stock_id, size)
	const gchar *stock_id
	GtkIconSize size
    C_ARGS:
	stock_id, size
 
 ## GtkWidget* gtk_image_new_from_icon_set (GtkIconSet *icon_set, GtkIconSize size)
GtkWidget*
gtk_image_new_from_icon_set (class, icon_set, size)
	GtkIconSet *icon_set
	GtkIconSize size
    C_ARGS:
	icon_set, size

 ## GtkWidget* gtk_image_new_from_animation (GdkPixbufAnimation *animation)
GtkWidget*
gtk_image_new_from_animation (class, GdkPixbufAnimation *animation)
    C_ARGS:
	animation

 ## void gtk_image_set_from_pixmap (GtkImage *image, GdkPixmap *pixmap, GdkBitmap *mask)
void
gtk_image_set_from_pixmap (image, pixmap, mask)
	GtkImage * image
	GdkPixmap_ornull * pixmap
	GdkBitmap_ornull * mask

void
gtk_image_set_from_image (image, gdk_image, mask)
	GtkImage *image
	GdkImage_ornull *gdk_image
	GdkBitmap_ornull *mask

void
gtk_image_set_from_file (image, filename)
	GtkImage *image
	GPerlFilename_ornull filename

void
gtk_image_set_from_pixbuf (image, pixbuf)
	GtkImage *image
	GdkPixbuf_ornull *pixbuf

void
gtk_image_set_from_stock (image, stock_id, size)
	GtkImage *image
	const gchar *stock_id
	GtkIconSize size

void
gtk_image_set_from_icon_set (image, icon_set, size)
	GtkImage *image
	GtkIconSet *icon_set
	GtkIconSize size

void
gtk_image_set_from_animation (GtkImage *image, GdkPixbufAnimation *animation)

GtkImageType
gtk_image_get_storage_type (image)
	GtkImage *image

 ## void gtk_image_get_pixmap (GtkImage *image, GdkPixmap **pixmap, GdkBitmap **mask)
void
gtk_image_get_pixmap (GtkImage *image)
    PREINIT:
	GdkPixmap * pixmap = NULL;
	GdkBitmap * mask = NULL;
    PPCODE:
	gtk_image_get_pixmap (image, &pixmap, &mask);
	EXTEND (SP, 2);
	PUSHs (sv_2mortal (newSVGdkPixmap (pixmap)));
	PUSHs (sv_2mortal (newSVGdkBitmap (mask)));

 ## void gtk_image_get_image (GtkImage *image, GdkImage **gdk_image, GdkBitmap **mask)
void
gtk_image_get_image (GtkImage *image)
    PREINIT:
	GdkImage * gdk_image = NULL;
	GdkBitmap * mask = NULL;
    PPCODE:
	gtk_image_get_image (image, &gdk_image, &mask);
	EXTEND (SP, 2);
	PUSHs (sv_2mortal (newSVGdkImage (gdk_image)));
	PUSHs (sv_2mortal (newSVGdkBitmap (mask)));

GdkPixbuf*
gtk_image_get_pixbuf (image)
	GtkImage *image

=for apidoc
=for signature (stock_id, icon_size) = $image->get_stock
=cut
void
gtk_image_get_stock (image)
	GtkImage * image
    PREINIT:
	gchar        * stock_id;
	GtkIconSize    size;
    PPCODE:
	gtk_image_get_stock (image, &stock_id, &size);
	EXTEND (SP, 2);
	PUSHs (sv_2mortal (stock_id ? newSVpv (stock_id, 0) : 
				       newSVsv(&PL_sv_undef)));
	PUSHs (sv_2mortal (newSVGtkIconSize (size)));

 ## void gtk_image_get_icon_set (GtkImage *image, GtkIconSet **icon_set, GtkIconSize *size)
void
gtk_image_get_icon_set (GtkImage *image)
    PREINIT:
	GtkIconSet *icon_set = NULL;
	GtkIconSize size;
    PPCODE:
	gtk_image_get_icon_set (image, &icon_set, &size);
	EXTEND (SP, 2);
	PUSHs (sv_2mortal (newSVGtkIconSet (icon_set)));
	PUSHs (sv_2mortal (newSVGtkIconSize (size)));

GdkPixbufAnimation* gtk_image_get_animation (GtkImage *image)

# deprecated
 ## void gtk_image_get (GtkImage *image, GdkImage **val, GdkBitmap **mask)
 ##void gtk_image_set (GtkImage *image, GdkImage *val, GdkBitmap *mask)

#if GTK_CHECK_VERSION (2, 6, 0)

##  GtkWidget * gtk_image_new_from_icon_name (const gchar *icon_name, GtkIconSize size)
GtkWidget *
gtk_image_new_from_icon_name (class, icon_name, size)
	const gchar *icon_name
	GtkIconSize size
    C_ARGS:
	icon_name, size

void gtk_image_set_from_icon_name (GtkImage *image, const gchar *icon_name, GtkIconSize size)

# void gtk_image_get_icon_name (GtkImage *image, const gchar **icon_name, GtkIconSize *size)
void
gtk_image_get_icon_name (GtkImage *image)
    PREINIT:
	const gchar *icon_name = NULL;
	GtkIconSize size;
    PPCODE:
	gtk_image_get_icon_name (image, &icon_name, &size);
	EXTEND (SP, 2);
	PUSHs (sv_2mortal (newSVGChar (icon_name)));
	PUSHs (sv_2mortal (newSVGtkIconSize (size)));

void gtk_image_set_pixel_size (GtkImage *image, gint pixel_size)

gint gtk_image_get_pixel_size (GtkImage *image)

#endif

#if GTK_CHECK_VERSION (2, 8, 0)

void gtk_image_clear (GtkImage *image);

#endif