Ardour  9.0-pre0-582-g084a23a80d
gtkimage.h
Go to the documentation of this file.
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19 
20 /*
21  * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22  * file for a list of people on the GTK+ Team. See the ChangeLog
23  * files for a list of changes. These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25  */
26 
27 #ifndef __GTK_IMAGE_H__
28 #define __GTK_IMAGE_H__
29 
30 
31 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
32 #error "Only <gtk/gtk.h> can be included directly."
33 #endif
34 
35 #include <gio/gio.h>
36 #include <gtk/gtkmisc.h>
37 
38 
39 G_BEGIN_DECLS
40 
41 #define GTK_TYPE_IMAGE (gtk_image_get_type ())
42 #define GTK_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_IMAGE, GtkImage))
43 #define GTK_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMAGE, GtkImageClass))
44 #define GTK_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_IMAGE))
45 #define GTK_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMAGE))
46 #define GTK_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_IMAGE, GtkImageClass))
47 
48 
49 typedef struct _GtkImage GtkImage;
50 typedef struct _GtkImageClass GtkImageClass;
51 
60 
62 {
64 };
65 
67 {
69 };
70 
72 {
73  GdkPixbuf *pixbuf;
74 };
75 
77 {
78  gchar *stock_id;
79 };
80 
82 {
84 };
85 
87 {
88  GdkPixbufAnimation *anim;
89  GdkPixbufAnimationIter *iter;
91 };
92 
94 {
95  gchar *icon_name;
96  GdkPixbuf *pixbuf;
98 };
99 
101 {
102  GIcon *icon;
103  GdkPixbuf *pixbuf;
105 };
106 
129 typedef enum
130 {
141 
148 struct _GtkImage
149 {
151 
152  GtkImageType GSEAL (storage_type);
153 
154  union
155  {
164  } GSEAL (data);
165 
166  /* Only used with GTK_IMAGE_PIXMAP, GTK_IMAGE_IMAGE */
167  GdkBitmap *GSEAL (mask);
168 
169  /* Only used with GTK_IMAGE_STOCK, GTK_IMAGE_ICON_SET, GTK_IMAGE_ICON_NAME */
170  GtkIconSize GSEAL (icon_size);
171 };
172 
174 {
176 
177  /* Padding for future expansion */
178  void (*_gtk_reserved1) (void);
179  void (*_gtk_reserved2) (void);
180  void (*_gtk_reserved3) (void);
181  void (*_gtk_reserved4) (void);
182 };
183 
184 #ifdef G_OS_WIN32
185 /* Reserve old names for DLL ABI backward compatibility */
186 #define gtk_image_new_from_file gtk_image_new_from_file_utf8
187 #define gtk_image_set_from_file gtk_image_set_from_file_utf8
188 #endif
189 
190 GType gtk_image_get_type (void) G_GNUC_CONST;
191 
194  GdkBitmap *mask);
196  GdkBitmap *mask);
197 GtkWidget* gtk_image_new_from_file (const gchar *filename);
199 GtkWidget* gtk_image_new_from_stock (const gchar *stock_id,
200  GtkIconSize size);
202  GtkIconSize size);
203 GtkWidget* gtk_image_new_from_animation (GdkPixbufAnimation *animation);
204 GtkWidget* gtk_image_new_from_icon_name (const gchar *icon_name,
205  GtkIconSize size);
207  GtkIconSize size);
208 
211  GdkPixmap *pixmap,
212  GdkBitmap *mask);
214  GdkImage *gdk_image,
215  GdkBitmap *mask);
217  const gchar *filename);
219  GdkPixbuf *pixbuf);
221  const gchar *stock_id,
222  GtkIconSize size);
225  GtkIconSize size);
227  GdkPixbufAnimation *animation);
229  const gchar *icon_name,
230  GtkIconSize size);
232  GIcon *icon,
233  GtkIconSize size);
235  gint pixel_size);
236 
238 
240  GdkPixmap **pixmap,
241  GdkBitmap **mask);
243  GdkImage **gdk_image,
244  GdkBitmap **mask);
247  gchar **stock_id,
248  GtkIconSize *size);
251  GtkIconSize *size);
252 GdkPixbufAnimation* gtk_image_get_animation (GtkImage *image);
254  const gchar **icon_name,
255  GtkIconSize *size);
257  GIcon **gicon,
258  GtkIconSize *size);
260 
261 #ifndef GTK_DISABLE_DEPRECATED
262 /* These three are deprecated */
263 
265  GdkImage *val,
266  GdkBitmap *mask);
268  GdkImage **val,
269  GdkBitmap **mask);
270 #endif /* GTK_DISABLE_DEPRECATED */
271 
272 G_END_DECLS
273 
274 #endif /* __GTK_IMAGE_H__ */
GtkIconSize
Definition: gtkenums.h:143
void gtk_image_get_gicon(GtkImage *image, GIcon **gicon, GtkIconSize *size)
gint gtk_image_get_pixel_size(GtkImage *image)
GtkWidget * gtk_image_new_from_pixmap(GdkPixmap *pixmap, GdkBitmap *mask)
GtkImageGIconData gicon
Definition: gtkimage.h:7
GtkImageType gtk_image_get_storage_type(GtkImage *image)
void gtk_image_set_from_animation(GtkImage *image, GdkPixbufAnimation *animation)
GtkWidget * gtk_image_new_from_animation(GdkPixbufAnimation *animation)
GtkWidget * gtk_image_new_from_icon_set(GtkIconSet *icon_set, GtkIconSize size)
GtkWidget * gtk_image_new_from_icon_name(const gchar *icon_name, GtkIconSize size)
GdkPixbufAnimation * gtk_image_get_animation(GtkImage *image)
void gtk_image_clear(GtkImage *image)
GtkImagePixmapData pixmap
Definition: gtkimage.h:0
void gtk_image_set_from_pixbuf(GtkImage *image, GdkPixbuf *pixbuf)
void gtk_image_get_image(GtkImage *image, GdkImage **gdk_image, GdkBitmap **mask)
void gtk_image_get_stock(GtkImage *image, gchar **stock_id, GtkIconSize *size)
GtkImageImageData image
Definition: gtkimage.h:1
GdkPixbuf * gtk_image_get_pixbuf(GtkImage *image)
void gtk_image_set_from_icon_name(GtkImage *image, const gchar *icon_name, GtkIconSize size)
GtkWidget * gtk_image_new_from_file(const gchar *filename)
void gtk_image_get_pixmap(GtkImage *image, GdkPixmap **pixmap, GdkBitmap **mask)
GtkImageIconSetData icon_set
Definition: gtkimage.h:4
void gtk_image_set_pixel_size(GtkImage *image, gint pixel_size)
void gtk_image_set(GtkImage *image, GdkImage *val, GdkBitmap *mask)
void gtk_image_set_from_image(GtkImage *image, GdkImage *gdk_image, GdkBitmap *mask)
void gtk_image_set_from_gicon(GtkImage *image, GIcon *icon, GtkIconSize size)
void gtk_image_set_from_pixmap(GtkImage *image, GdkPixmap *pixmap, GdkBitmap *mask)
void gtk_image_get_icon_set(GtkImage *image, GtkIconSet **icon_set, GtkIconSize *size)
GtkWidget * gtk_image_new_from_image(GdkImage *image, GdkBitmap *mask)
GType gtk_image_get_type(void) G_GNUC_CONST
GtkWidget * gtk_image_new(void)
GtkWidget * gtk_image_new_from_stock(const gchar *stock_id, GtkIconSize size)
GtkImageType
Definition: gtkimage.h:130
@ GTK_IMAGE_ANIMATION
Definition: gtkimage.h:137
@ GTK_IMAGE_ICON_NAME
Definition: gtkimage.h:138
@ GTK_IMAGE_PIXMAP
Definition: gtkimage.h:132
@ GTK_IMAGE_GICON
Definition: gtkimage.h:139
@ GTK_IMAGE_EMPTY
Definition: gtkimage.h:131
@ GTK_IMAGE_STOCK
Definition: gtkimage.h:135
@ GTK_IMAGE_IMAGE
Definition: gtkimage.h:133
@ GTK_IMAGE_PIXBUF
Definition: gtkimage.h:134
@ GTK_IMAGE_ICON_SET
Definition: gtkimage.h:136
GtkImagePixbufData pixbuf
Definition: gtkimage.h:2
void gtk_image_set_from_file(GtkImage *image, const gchar *filename)
void gtk_image_get_icon_name(GtkImage *image, const gchar **icon_name, GtkIconSize *size)
void gtk_image_set_from_stock(GtkImage *image, const gchar *stock_id, GtkIconSize size)
GtkWidget * gtk_image_new_from_gicon(GIcon *icon, GtkIconSize size)
void gtk_image_get(GtkImage *image, GdkImage **val, GdkBitmap **mask)
GtkWidget * gtk_image_new_from_pixbuf(GdkPixbuf *pixbuf)
void gtk_image_set_from_icon_set(GtkImage *image, GtkIconSet *icon_set, GtkIconSize size)
struct _GtkIconSet GtkIconSet
Definition: gtkstyle.h:58
void pixel_size(const std::string &str, const Pango::FontDescription &font, int &width, int &height)
GdkPixbufAnimationIter * iter
Definition: gtkimage.h:89
GdkPixbufAnimation * anim
Definition: gtkimage.h:88
void(* _gtk_reserved3)(void)
Definition: gtkimage.h:180
void(* _gtk_reserved4)(void)
Definition: gtkimage.h:181
void(* _gtk_reserved2)(void)
Definition: gtkimage.h:179
GtkMiscClass parent_class
Definition: gtkimage.h:175
void(* _gtk_reserved1)(void)
Definition: gtkimage.h:178
guint theme_change_id
Definition: gtkimage.h:104
GdkPixbuf * pixbuf
Definition: gtkimage.h:103
GdkPixbuf * pixbuf
Definition: gtkimage.h:96
GtkIconSet * icon_set
Definition: gtkimage.h:83
GdkImage * image
Definition: gtkimage.h:68
GdkPixbuf * pixbuf
Definition: gtkimage.h:73
GdkPixmap * pixmap
Definition: gtkimage.h:63
gchar * stock_id
Definition: gtkimage.h:78
GtkImagePixbufData pixbuf
Definition: gtkimage.h:158
GdkBitmap * GSEAL(mask)
GtkImageGIconData gicon
Definition: gtkimage.h:163
GtkImagePixmapData pixmap
Definition: gtkimage.h:156
GtkIconSize GSEAL(icon_size)
GtkImageIconNameData name
Definition: gtkimage.h:162
GtkImageIconSetData icon_set
Definition: gtkimage.h:160
GtkMisc misc
Definition: gtkimage.h:150
GtkImageStockData stock
Definition: gtkimage.h:159
GtkImageAnimationData anim
Definition: gtkimage.h:161
GtkImageType GSEAL(storage_type)
GtkImageImageData image
Definition: gtkimage.h:157