2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD 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
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = gtk-Themeable-Stock-Images.html
27 * outFile = IconSource
28 * strct = GtkIconSource
51 * - GdkPixbuf* -> Pixbuf
52 * - GtkSettings* -> Settings
53 * - GtkStyle* -> Style
54 * - GtkWidget* -> Widget
59 module gtk
.IconSource
;
65 import tango
.io
.Stdout
; // use the tango loging?
69 private import gtkc
.gtktypes
;
71 private import gtkc
.gtk
;
74 private import glib
.Str
;
75 private import gdk
.Pixbuf
;
76 private import gtk
.Style
;
77 private import gtk
.Widget
;
78 private import gtk
.Settings
;
85 * Browse the available stock icons in the list of stock IDs found here. You can also use
86 * the gtk-demo application for this purpose.
87 * An icon factory manages a collection of GtkIconSet; a GtkIconSet manages a
88 * set of variants of a particular icon (i.e. a GtkIconSet contains variants for
89 * different sizes and widget states). Icons in an icon factory are named by a
90 * stock ID, which is a simple string identifying the icon. Each GtkStyle has a
91 * list of GtkIconFactory derived from the current theme; those icon factories
92 * are consulted first when searching for an icon. If the theme doesn't set a
93 * particular icon, GTK+ looks for the icon in a list of default icon factories,
94 * maintained by gtk_icon_factory_add_default() and
95 * gtk_icon_factory_remove_default(). Applications with icons should add a default
96 * icon factory with their icons, which will allow themes to override the icons
97 * for the application.
98 * To display an icon, always use gtk_style_lookup_icon_set() on the widget that
99 * will display the icon, or the convenience function
100 * gtk_widget_render_icon(). These functions take the theme into account when
101 * looking up the icon to use for a given stock ID.
103 public class IconSource
106 /** the main Gtk struct */
107 protected GtkIconSource
* gtkIconSource
;
110 public GtkIconSource
* getIconSourceStruct()
112 return gtkIconSource
;
116 /** the main Gtk struct as a void* */
117 protected void* getStruct()
119 return cast(void*)gtkIconSource
;
123 * Sets our main struct and passes it to the parent class
125 public this (GtkIconSource
* gtkIconSource
)
129 if ( gtkIconSource
is null )
134 Stdout("struct gtkIconSource is null on constructor").newline
;
138 printf("struct gtkIconSource is null on constructor");
145 assert(gtkIconSource
!is null, "struct gtkIconSource is null on constructor");
147 this.gtkIconSource
= gtkIconSource
;
158 * Creates a copy of source; mostly useful for language bindings.
162 * a new GtkIconSource
164 public GtkIconSource
* sourceCopy()
166 // GtkIconSource* gtk_icon_source_copy (const GtkIconSource *source);
167 return gtk_icon_source_copy(gtkIconSource
);
171 * Frees a dynamically-allocated icon source, along with its
172 * filename, size, and pixbuf fields if those are not NULL.
176 public void sourceFree()
178 // void gtk_icon_source_free (GtkIconSource *source);
179 gtk_icon_source_free(gtkIconSource
);
183 * Adds the given icon_set to the icon factory, under the name
184 * stock_id. stock_id should be namespaced for your application,
185 * e.g. "myapp-whatever-icon". Normally applications create a
186 * GtkIconFactory, then add it to the list of default factories with
187 * gtk_icon_factory_add_default(). Then they pass the stock_id to
188 * widgets such as GtkImage to display the icon. Themes can provide
189 * an icon with the same name (such as "myapp-whatever-icon") to
190 * override your application's default icons. If an icon already
191 * existed in factory for stock_id, it is unreferenced and replaced
192 * with the new icon_set.
200 public static void factoryAdd(GtkIconFactory
* factory
, char[] stockId
, GtkIconSet
* iconSet
)
202 // void gtk_icon_factory_add (GtkIconFactory *factory, const gchar *stock_id, GtkIconSet *icon_set);
203 gtk_icon_factory_add(factory
, Str
.toStringz(stockId
), iconSet
);
207 * Adds an icon factory to the list of icon factories searched by
208 * gtk_style_lookup_icon_set(). This means that, for example,
209 * gtk_image_new_from_stock() will be able to find icons in factory.
210 * There will normally be an icon factory added for each library or
211 * application that comes with icons. The default icon factories
212 * can be overridden by themes.
216 public static void factoryAddDefault(GtkIconFactory
* factory
)
218 // void gtk_icon_factory_add_default (GtkIconFactory *factory);
219 gtk_icon_factory_add_default(factory
);
223 * Looks up stock_id in the icon factory, returning an icon set
224 * if found, otherwise NULL. For display to the user, you should
225 * use gtk_style_lookup_icon_set() on the GtkStyle for the
226 * widget that will display the icon, instead of using this
227 * function directly, so that themes are taken into account.
233 * icon set of stock_id.
235 public static GtkIconSet
* factoryLookup(GtkIconFactory
* factory
, char[] stockId
)
237 // GtkIconSet* gtk_icon_factory_lookup (GtkIconFactory *factory, const gchar *stock_id);
238 return gtk_icon_factory_lookup(factory
, Str
.toStringz(stockId
));
242 * Looks for an icon in the list of default icon factories. For
243 * display to the user, you should use gtk_style_lookup_icon_set() on
244 * the GtkStyle for the widget that will display the icon, instead of
245 * using this function directly, so that themes are taken into
250 * a GtkIconSet, or NULL
252 public static GtkIconSet
* factoryLookupDefault(char[] stockId
)
254 // GtkIconSet* gtk_icon_factory_lookup_default (const gchar *stock_id);
255 return gtk_icon_factory_lookup_default(Str
.toStringz(stockId
));
259 * Creates a new GtkIconFactory. An icon factory manages a collection
260 * of GtkIconSets; a GtkIconSet manages a set of variants of a
261 * particular icon (i.e. a GtkIconSet contains variants for different
262 * sizes and widget states). Icons in an icon factory are named by a
263 * stock ID, which is a simple string identifying the icon. Each
264 * GtkStyle has a list of GtkIconFactorys derived from the current
265 * theme; those icon factories are consulted first when searching for
266 * an icon. If the theme doesn't set a particular icon, GTK+ looks for
267 * the icon in a list of default icon factories, maintained by
268 * gtk_icon_factory_add_default() and
269 * gtk_icon_factory_remove_default(). Applications with icons should
270 * add a default icon factory with their icons, which will allow
271 * themes to override the icons for the application.
273 * a new GtkIconFactory
275 public static GtkIconFactory
* factoryNew()
277 // GtkIconFactory* gtk_icon_factory_new (void);
278 return gtk_icon_factory_new();
282 * Removes an icon factory from the list of default icon
283 * factories. Not normally used; you might use it for a library that
284 * can be unloaded or shut down.
286 * a GtkIconFactory previously added with gtk_icon_factory_add_default()
288 public static void factoryRemoveDefault(GtkIconFactory
* factory
)
290 // void gtk_icon_factory_remove_default (GtkIconFactory *factory);
291 gtk_icon_factory_remove_default(factory
);
295 * Icon sets have a list of GtkIconSource, which they use as base
296 * icons for rendering icons in different states and sizes. Icons are
297 * scaled, made to look insensitive, etc. in
298 * gtk_icon_set_render_icon(), but GtkIconSet needs base images to
299 * work with. The base images and when to use them are described by
301 * This function copies source, so you can reuse the same source immediately
302 * without affecting the icon set.
303 * An example of when you'd use this function: a web browser's "Back
304 * to Previous Page" icon might point in a different direction in
305 * Hebrew and in English; it might look different when insensitive;
306 * and it might change size depending on toolbar mode (small/large
307 * icons). So a single icon set would contain all those variants of
308 * the icon, and you might add a separate source for each one.
309 * You should nearly always add a "default" icon source with all
310 * fields wildcarded, which will be used as a fallback if no more
311 * specific source matches. GtkIconSet always prefers more specific
312 * icon sources to more generic icon sources. The order in which you
313 * add the sources to the icon set does not matter.
314 * gtk_icon_set_new_from_pixbuf() creates a new icon set with a
315 * default icon source based on the given pixbuf.
321 public static void setAddSource(GtkIconSet
* iconSet
, GtkIconSource
* source
)
323 // void gtk_icon_set_add_source (GtkIconSet *icon_set, const GtkIconSource *source);
324 gtk_icon_set_add_source(iconSet
, source
);
328 * Copies icon_set by value.
332 * a new GtkIconSet identical to the first.
334 public static GtkIconSet
* setCopy(GtkIconSet
* iconSet
)
336 // GtkIconSet* gtk_icon_set_copy (GtkIconSet *icon_set);
337 return gtk_icon_set_copy(iconSet
);
341 * Creates a new GtkIconSet. A GtkIconSet represents a single icon
342 * in various sizes and widget states. It can provide a GdkPixbuf
343 * for a given size and state on request, and automatically caches
344 * some of the rendered GdkPixbuf objects.
345 * Normally you would use gtk_widget_render_icon() instead of
346 * using GtkIconSet directly. The one case where you'd use
347 * GtkIconSet is to create application-specific icon sets to place in
352 public static GtkIconSet
* setNew()
354 // GtkIconSet* gtk_icon_set_new (void);
355 return gtk_icon_set_new();
359 * Creates a new GtkIconSet with pixbuf as the default/fallback
360 * source image. If you don't add any additional GtkIconSource to the
361 * icon set, all variants of the icon will be created from pixbuf,
362 * using scaling, pixelation, etc. as required to adjust the icon size
363 * or make the icon look insensitive/prelighted.
369 public static GtkIconSet
* setNewFromPixbuf(Pixbuf pixbuf
)
371 // GtkIconSet* gtk_icon_set_new_from_pixbuf (GdkPixbuf *pixbuf);
372 return gtk_icon_set_new_from_pixbuf((pixbuf
is null) ?
null : pixbuf
.getPixbufStruct());
376 * Increments the reference count on icon_set.
382 public static GtkIconSet
* setRef(GtkIconSet
* iconSet
)
384 // GtkIconSet* gtk_icon_set_ref (GtkIconSet *icon_set);
385 return gtk_icon_set_ref(iconSet
);
389 * Renders an icon using gtk_style_render_icon(). In most cases,
390 * gtk_widget_render_icon() is better, since it automatically provides
391 * most of the arguments from the current widget settings. This
392 * function never returns NULL; if the icon can't be rendered
393 * (perhaps because an image file fails to load), a default "missing
394 * image" icon will be returned instead.
398 * a GtkStyle associated with widget, or NULL
404 * icon size. A size of (GtkIconSize)-1
405 * means render at the size of the source and don't scale.
407 * widget that will display the icon, or NULL.
408 * The only use that is typically made of this
409 * is to determine the appropriate GdkScreen.
411 * detail to pass to the theme engine, or NULL.
412 * Note that passing a detail of anything but NULL
413 * will disable caching.
415 * a GdkPixbuf to be displayed
417 public static Pixbuf
setRenderIcon(GtkIconSet
* iconSet
, Style style
, GtkTextDirection direction
, GtkStateType state
, GtkIconSize size
, Widget widget
, char[] detail
)
419 // GdkPixbuf* gtk_icon_set_render_icon (GtkIconSet *icon_set, GtkStyle *style, GtkTextDirection direction, GtkStateType state, GtkIconSize size, GtkWidget *widget, const char *detail);
420 return new Pixbuf( gtk_icon_set_render_icon(iconSet
, (style
is null) ?
null : style
.getStyleStruct(), direction
, state
, size
, (widget
is null) ?
null : widget
.getWidgetStruct(), Str
.toStringz(detail
)) );
424 * Decrements the reference count on icon_set, and frees memory
425 * if the reference count reaches 0.
429 public static void setUnref(GtkIconSet
* iconSet
)
431 // void gtk_icon_set_unref (GtkIconSet *icon_set);
432 gtk_icon_set_unref(iconSet
);
436 * Obtains the pixel size of a semantic icon size, possibly
437 * modified by user preferences for the default GtkSettings.
438 * (See gtk_icon_size_lookup_for_settings().)
439 * Normally size would be
440 * GTK_ICON_SIZE_MENU, GTK_ICON_SIZE_BUTTON, etc. This function
441 * isn't normally needed, gtk_widget_render_icon() is the usual
442 * way to get an icon for rendering, then just look at the size of
443 * the rendered pixbuf. The rendered pixbuf may not even correspond to
444 * the width/height returned by gtk_icon_size_lookup(), because themes
445 * are free to render the pixbuf however they like, including changing
450 * location to store icon width
452 * location to store icon height
454 * TRUE if size was a valid size
456 public static int sizeLookup(GtkIconSize size
, int* width
, int* height
)
458 // gboolean gtk_icon_size_lookup (GtkIconSize size, gint *width, gint *height);
459 return gtk_icon_size_lookup(size
, width
, height
);
463 * Obtains the pixel size of a semantic icon size, possibly
464 * modified by user preferences for a particular
465 * GtkSettings. Normally size would be
466 * GTK_ICON_SIZE_MENU, GTK_ICON_SIZE_BUTTON, etc. This function
467 * isn't normally needed, gtk_widget_render_icon() is the usual
468 * way to get an icon for rendering, then just look at the size of
469 * the rendered pixbuf. The rendered pixbuf may not even correspond to
470 * the width/height returned by gtk_icon_size_lookup(), because themes
471 * are free to render the pixbuf however they like, including changing
474 * a GtkSettings object, used to determine
475 * which set of user preferences to used.
479 * location to store icon width
481 * location to store icon height
483 * TRUE if size was a valid size
486 public static int sizeLookupForSettings(Settings settings
, GtkIconSize size
, int* width
, int* height
)
488 // gboolean gtk_icon_size_lookup_for_settings (GtkSettings *settings, GtkIconSize size, gint *width, gint *height);
489 return gtk_icon_size_lookup_for_settings((settings
is null) ?
null : settings
.getSettingsStruct(), size
, width
, height
);
493 * Registers a new icon size, along the same lines as GTK_ICON_SIZE_MENU,
494 * etc. Returns the integer value for the size.
496 * name of the icon size
502 * integer value representing the size
504 public static GtkIconSize
sizeRegister(char[] name
, int width
, int height
)
506 // GtkIconSize gtk_icon_size_register (const gchar *name, gint width, gint height);
507 return gtk_icon_size_register(Str
.toStringz(name
), width
, height
);
511 * Registers alias as another name for target.
512 * So calling gtk_icon_size_from_name() with alias as argument
513 * will return target.
515 * an alias for target
517 * an existing icon size
519 public static void sizeRegisterAlias(char[] alia
, GtkIconSize target
)
521 // void gtk_icon_size_register_alias (const gchar *alias, GtkIconSize target);
522 gtk_icon_size_register_alias(Str
.toStringz(alia
), target
);
526 * Looks up the icon size associated with name.
528 * the name to look up.
530 * the icon size with the given name.
532 public static GtkIconSize
sizeFromName(char[] name
)
534 // GtkIconSize gtk_icon_size_from_name (const gchar *name);
535 return gtk_icon_size_from_name(Str
.toStringz(name
));
539 * Gets the canonical name of the given icon size. The returned string
540 * is statically allocated and should not be freed.
544 * the name of the given icon size.
546 public static char[] sizeGetName(GtkIconSize size
)
548 // const gchar* gtk_icon_size_get_name (GtkIconSize size);
549 return Str
.toString(gtk_icon_size_get_name(size
) );
553 * Obtains a list of icon sizes this icon set can render. The returned
554 * array must be freed with g_free().
558 * return location for array of sizes
560 * location to store number of elements in returned array
562 public static void setGetSizes(GtkIconSet
* iconSet
, GtkIconSize
** sizes
, int* nSizes
)
564 // void gtk_icon_set_get_sizes (GtkIconSet *icon_set, GtkIconSize **sizes, gint *n_sizes);
565 gtk_icon_set_get_sizes(iconSet
, sizes
, nSizes
);
569 * Obtains the text direction this icon source applies to. The return
570 * value is only useful/meaningful if the text direction is not
575 * text direction this source matches
577 public GtkTextDirection
sourceGetDirection()
579 // GtkTextDirection gtk_icon_source_get_direction (const GtkIconSource *source);
580 return gtk_icon_source_get_direction(gtkIconSource
);
584 * Gets the value set by gtk_icon_source_set_direction_wildcarded().
588 * TRUE if this icon source is a base for any text direction variant
590 public int sourceGetDirectionWildcarded()
592 // gboolean gtk_icon_source_get_direction_wildcarded (const GtkIconSource *source);
593 return gtk_icon_source_get_direction_wildcarded(gtkIconSource
);
597 * Retrieves the source filename, or NULL if none is set. The
598 * filename is not a copy, and should not be modified or expected to
599 * persist beyond the lifetime of the icon source.
603 * image filename. This string must not be modified
606 public char[] sourceGetFilename()
608 // const gchar* gtk_icon_source_get_filename (const GtkIconSource *source);
609 return Str
.toString(gtk_icon_source_get_filename(gtkIconSource
) );
613 * Retrieves the source pixbuf, or NULL if none is set.
614 * In addition, if a filename source is in use, this
615 * function in some cases will return the pixbuf from
616 * loaded from the filename. This is, for example, true
617 * for the GtkIconSource passed to the GtkStyle::render_icon()
618 * virtual function. The reference count on the pixbuf is
625 public Pixbuf
sourceGetPixbuf()
627 // GdkPixbuf* gtk_icon_source_get_pixbuf (const GtkIconSource *source);
628 return new Pixbuf( gtk_icon_source_get_pixbuf(gtkIconSource
) );
632 * Retrieves the source icon name, or NULL if none is set. The
633 * icon_name is not a copy, and should not be modified or expected to
634 * persist beyond the lifetime of the icon source.
638 * icon name. This string must not be modified or freed.
640 public char[] sourceGetIconName()
642 // const gchar* gtk_icon_source_get_icon_name (const GtkIconSource *source);
643 return Str
.toString(gtk_icon_source_get_icon_name(gtkIconSource
) );
647 * Obtains the icon size this source applies to. The return value
648 * is only useful/meaningful if the icon size is not wildcarded.
652 * icon size this source matches.
654 public GtkIconSize
sourceGetSize()
656 // GtkIconSize gtk_icon_source_get_size (const GtkIconSource *source);
657 return gtk_icon_source_get_size(gtkIconSource
);
661 * Gets the value set by gtk_icon_source_set_size_wildcarded().
665 * TRUE if this icon source is a base for any icon size variant
667 public int sourceGetSizeWildcarded()
669 // gboolean gtk_icon_source_get_size_wildcarded (const GtkIconSource *source);
670 return gtk_icon_source_get_size_wildcarded(gtkIconSource
);
674 * Obtains the widget state this icon source applies to. The return
675 * value is only useful/meaningful if the widget state is not
680 * widget state this source matches
682 public GtkStateType
sourceGetState()
684 // GtkStateType gtk_icon_source_get_state (const GtkIconSource *source);
685 return gtk_icon_source_get_state(gtkIconSource
);
689 * Gets the value set by gtk_icon_source_set_state_wildcarded().
693 * TRUE if this icon source is a base for any widget state variant
695 public int sourceGetStateWildcarded()
697 // gboolean gtk_icon_source_get_state_wildcarded (const GtkIconSource *source);
698 return gtk_icon_source_get_state_wildcarded(gtkIconSource
);
702 * Creates a new GtkIconSource. A GtkIconSource contains a GdkPixbuf (or
703 * image filename) that serves as the base image for one or more of the
704 * icons in a GtkIconSet, along with a specification for which icons in the
705 * icon set will be based on that pixbuf or image file. An icon set contains
706 * a set of icons that represent "the same" logical concept in different states,
707 * different global text directions, and different sizes.
708 * So for example a web browser's "Back to Previous Page" icon might
709 * point in a different direction in Hebrew and in English; it might
710 * look different when insensitive; and it might change size depending
711 * on toolbar mode (small/large icons). So a single icon set would
712 * contain all those variants of the icon. GtkIconSet contains a list
713 * of GtkIconSource from which it can derive specific icon variants in
715 * In the simplest case, GtkIconSet contains one source pixbuf from
716 * which it derives all variants. The convenience function
717 * gtk_icon_set_new_from_pixbuf() handles this case; if you only have
718 * one source pixbuf, just use that function.
719 * If you want to use a different base pixbuf for different icon
720 * variants, you create multiple icon sources, mark which variants
721 * they'll be used to create, and add them to the icon set with
722 * gtk_icon_set_add_source().
723 * By default, the icon source has all parameters wildcarded. That is,
724 * the icon source will be used as the base icon for any desired text
725 * direction, widget state, or icon size.
727 * a new GtkIconSource
729 public static GtkIconSource
* sourceNew()
731 // GtkIconSource* gtk_icon_source_new (void);
732 return gtk_icon_source_new();
736 * Sets the text direction this icon source is intended to be used
738 * Setting the text direction on an icon source makes no difference
739 * if the text direction is wildcarded. Therefore, you should usually
740 * call gtk_icon_source_set_direction_wildcarded() to un-wildcard it
741 * in addition to calling this function.
745 * text direction this source applies to
747 public void sourceSetDirection(GtkTextDirection direction
)
749 // void gtk_icon_source_set_direction (GtkIconSource *source, GtkTextDirection direction);
750 gtk_icon_source_set_direction(gtkIconSource
, direction
);
754 * If the text direction is wildcarded, this source can be used
755 * as the base image for an icon in any GtkTextDirection.
756 * If the text direction is not wildcarded, then the
757 * text direction the icon source applies to should be set
758 * with gtk_icon_source_set_direction(), and the icon source
759 * will only be used with that text direction.
760 * GtkIconSet prefers non-wildcarded sources (exact matches) over
761 * wildcarded sources, and will use an exact match when possible.
765 * TRUE to wildcard the text direction
767 public void sourceSetDirectionWildcarded(int setting
)
769 // void gtk_icon_source_set_direction_wildcarded (GtkIconSource *source, gboolean setting);
770 gtk_icon_source_set_direction_wildcarded(gtkIconSource
, setting
);
774 * Sets the name of an image file to use as a base image when creating
775 * icon variants for GtkIconSet. The filename must be absolute.
781 public void sourceSetFilename(char[] filename
)
783 // void gtk_icon_source_set_filename (GtkIconSource *source, const gchar *filename);
784 gtk_icon_source_set_filename(gtkIconSource
, Str
.toStringz(filename
));
788 * Sets a pixbuf to use as a base image when creating icon variants
793 * pixbuf to use as a source
795 public void sourceSetPixbuf(Pixbuf pixbuf
)
797 // void gtk_icon_source_set_pixbuf (GtkIconSource *source, GdkPixbuf *pixbuf);
798 gtk_icon_source_set_pixbuf(gtkIconSource
, (pixbuf
is null) ?
null : pixbuf
.getPixbufStruct());
802 * Sets the name of an icon to look up in the current icon theme
803 * to use as a base image when creating icon variants for GtkIconSet.
807 * name of icon to use
809 public void sourceSetIconName(char[] iconName
)
811 // void gtk_icon_source_set_icon_name (GtkIconSource *source, const gchar *icon_name);
812 gtk_icon_source_set_icon_name(gtkIconSource
, Str
.toStringz(iconName
));
816 * Sets the icon size this icon source is intended to be used
818 * Setting the icon size on an icon source makes no difference
819 * if the size is wildcarded. Therefore, you should usually
820 * call gtk_icon_source_set_size_wildcarded() to un-wildcard it
821 * in addition to calling this function.
825 * icon size this source applies to
827 public void sourceSetSize(GtkIconSize size
)
829 // void gtk_icon_source_set_size (GtkIconSource *source, GtkIconSize size);
830 gtk_icon_source_set_size(gtkIconSource
, size
);
834 * If the icon size is wildcarded, this source can be used as the base
835 * image for an icon of any size. If the size is not wildcarded, then
836 * the size the source applies to should be set with
837 * gtk_icon_source_set_size() and the icon source will only be used
838 * with that specific size.
839 * GtkIconSet prefers non-wildcarded sources (exact matches) over
840 * wildcarded sources, and will use an exact match when possible.
841 * GtkIconSet will normally scale wildcarded source images to produce
842 * an appropriate icon at a given size, but will not change the size
843 * of source images that match exactly.
847 * TRUE to wildcard the widget state
849 public void sourceSetSizeWildcarded(int setting
)
851 // void gtk_icon_source_set_size_wildcarded (GtkIconSource *source, gboolean setting);
852 gtk_icon_source_set_size_wildcarded(gtkIconSource
, setting
);
856 * Sets the widget state this icon source is intended to be used
858 * Setting the widget state on an icon source makes no difference
859 * if the state is wildcarded. Therefore, you should usually
860 * call gtk_icon_source_set_state_wildcarded() to un-wildcard it
861 * in addition to calling this function.
865 * widget state this source applies to
867 public void sourceSetState(GtkStateType state
)
869 // void gtk_icon_source_set_state (GtkIconSource *source, GtkStateType state);
870 gtk_icon_source_set_state(gtkIconSource
, state
);
874 * If the widget state is wildcarded, this source can be used as the
875 * base image for an icon in any GtkStateType. If the widget state
876 * is not wildcarded, then the state the source applies to should be
877 * set with gtk_icon_source_set_state() and the icon source will
878 * only be used with that specific state.
879 * GtkIconSet prefers non-wildcarded sources (exact matches) over
880 * wildcarded sources, and will use an exact match when possible.
881 * GtkIconSet will normally transform wildcarded source images to
882 * produce an appropriate icon for a given state, for example
883 * lightening an image on prelight, but will not modify source images
884 * that match exactly.
888 * TRUE to wildcard the widget state
890 public void sourceSetStateWildcarded(int setting
)
892 // void gtk_icon_source_set_state_wildcarded (GtkIconSource *source, gboolean setting);
893 gtk_icon_source_set_state_wildcarded(gtkIconSource
, setting
);