W Wrapl, The Programming Language





Nil : T


GetType() : Gtk.GObject.Type.T

New() : Gtk.Gtk.IconSet.T

Creates a new T. A T represents a single icon in various sizes and widget states. It can provide a Gtk.Gdk.Pixbuf.T for a given size and state on request, and automatically caches some of the rendered Gtk.Gdk.Pixbuf.T objects.

Normally you would use Gtk.Gtk.Widget.RenderIcon instead of using T directly. The one case where you'd use T is to create application-specific icon sets to place in a Gtk.Gtk.IconFactory.T.

Returns a new T

NewFromPixbuf(pixbuf @ Gtk.Gdk.Pixbuf.T) : Gtk.Gtk.IconSet.T

Creates a new T with pixbuf as the default/fallback source image. If you don't add any additional Gtk.Gtk.IconSource.T to the icon set, all variants of the icon will be created from pixbuf, using scaling, pixelation, etc. as required to adjust the icon size or make the icon look insensitive/prelighted.

pixbuf a Gtk.Gdk.Pixbuf.T
Returns a new T


:"="(_ @ T, _ @ T)

:AddSource(self @ T, source @ Gtk.Gtk.IconSource.T) : Std.Object.T

Icon sets have a list of Gtk.Gtk.IconSource.T, which they use as base icons for rendering icons in different states and sizes. Icons are scaled, made to look insensitive, etc. in RenderIcon, but T needs base images to work with. The base images and when to use them are described by a Gtk.Gtk.IconSource.T.

This function copies source, so you can reuse the same source immediately without affecting the icon set.

An example of when you'd use this function: a web browser's "Back to Previous Page" icon might point in a different direction in Hebrew and in English; it might look different when insensitive; and it might change size depending on toolbar mode (small/large icons). So a single icon set would contain all those variants of the icon, and you might add a separate source for each one.

You should nearly always add a "default" icon source with all fields wildcarded, which will be used as a fallback if no more specific source matches. T always prefers more specific icon sources to more generic icon sources. The order in which you add the sources to the icon set does not matter.

gtk_icon_set_new_from_pixbuf() creates a new icon set with a default icon source based on the given pixbuf.

icon_set a T
source a Gtk.Gtk.IconSource.T

:Copy(self @ T) : Gtk.Gtk.IconSet.T

Copies icon_set by value.

icon_set a T
Returns a new T identical to the first.

:GetSizes(self @ T, sizes @ Std.Object.T, n_sizes @ Std.Object.T) : Std.Object.T

Obtains a list of icon sizes this icon set can render. The returned array must be freed with g_free().

icon_set a T
sizes return location for array of sizes. [array length=n_sizes][out][type int]
n_sizes location to store number of elements in returned array

:Ref(self @ T) : Gtk.Gtk.IconSet.T

Increments the reference count on icon_set.

icon_set a T.
Returns icon_set.

:RenderIcon(self @ T, style @ Gtk.Gtk.Style.T, direction @ Gtk.Gtk.TextDirection.T, state @ Gtk.Gtk.StateType.T, size @ Gtk.Gtk.IconSize.T, widget @ Gtk.Gtk.Widget.T, detail @ Std.String.T) : Gtk.Gdk.Pixbuf.T

Renders an icon using Gtk.Gtk.Style.RenderIcon. In most cases, Gtk.Gtk.Widget.RenderIcon is better, since it automatically provides most of the arguments from the current widget settings. This function never returns NULL; if the icon can't be rendered (perhaps because an image file fails to load), a default "missing image" icon will be returned instead.

icon_set a T
style a Gtk.Gtk.Style.T associated with widget, or NULL. [allow-none]
direction text direction
state widget state
size icon size. A size of (GtkIconSize)-1 means render at the size of the source and don't scale. [type int]
widget widget that will display the icon, or NULL. The only use that is typically made of this is to determine the appropriate Gtk.Gdk.Screen.T. [allow-none]
detail detail to pass to the theme engine, or NULL. Note that passing a detail of anything but NULL will disable caching. [allow-none]
Returns a Gtk.Gdk.Pixbuf.T to be displayed. [transfer full]

:Unref(self @ T) : Std.Object.T

Decrements the reference count on icon_set, and frees memory if the reference count reaches 0.

icon_set a T

:"~="(_ @ T, _ @ T)