W Wrapl, The Programming Language

Libraries:Gtk:Gtk:Icon

Functions

SizeFromName(name @ Std.String.T) : Gtk.Gtk.IconSize.T

Looks up the icon size associated with name.

name the name to look up.
Returns the icon size with the given name.


SizeGetName(size @ Gtk.Gtk.IconSize.T) : Std.String.T

Gets the canonical name of the given icon size. The returned string is statically allocated and should not be freed.

size a Gtk.Gtk.IconSize.T. [type int]
Returns the name of the given icon size.


SizeLookup(size @ Gtk.Gtk.IconSize.T, width @ Std.Object.T, height @ Std.Object.T) : Std.Symbol.T

Obtains the pixel size of a semantic icon size, possibly modified by user preferences for the default Gtk.Gtk.Settings.T. (See SizeLookupForSettings.) Normally size would be GTK_ICON_SIZE_MENU, GTK_ICON_SIZE_BUTTON, etc. This function isn't normally needed, Gtk.Gtk.Widget.RenderIcon is the usual way to get an icon for rendering, then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned by SizeLookup, because themes are free to render the pixbuf however they like, including changing the usual size.

size an icon size. [type int]
width location to store icon width. [out]
height location to store icon height. [out]
Returns TRUE if size was a valid size


SizeLookupForSettings(settings @ Gtk.Gtk.Settings.T, size @ Gtk.Gtk.IconSize.T, width @ Std.Object.T, height @ Std.Object.T) : Std.Symbol.T

Obtains the pixel size of a semantic icon size, possibly modified by user preferences for a particular Gtk.Gtk.Settings.T. Normally size would be GTK_ICON_SIZE_MENU, GTK_ICON_SIZE_BUTTON, etc. This function isn't normally needed, Gtk.Gtk.Widget.RenderIcon is the usual way to get an icon for rendering, then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned by SizeLookup, because themes are free to render the pixbuf however they like, including changing the usual size.

settings a Gtk.Gtk.Settings.T object, used to determine which set of user preferences to used.
size an icon size. [type int]
width location to store icon width. [out]
height location to store icon height. [out]
Returns TRUE if size was a valid size


SizeRegister(name @ Std.String.T, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Gtk.Gtk.IconSize.T

Registers a new icon size, along the same lines as GTK_ICON_SIZE_MENU, etc. Returns the integer value for the size.

name name of the icon size
width the icon width
height the icon height
Returns integer value representing the size. [type int]


SizeRegisterAlias(alias @ Std.String.T, target @ Gtk.Gtk.IconSize.T) : Std.Object.T

Registers alias as another name for target. So calling SizeFromName with alias as argument will return target.

alias an alias for target
target an existing icon size. [type int]