W Wrapl, The Programming Language

Libraries:Gtk:Gtk:IconInfo

Types

T

Constants

Nil : T

Functions

GetType() : Gtk.GObject.Type.T



NewForPixbuf(icon_theme @ Gtk.Gtk.IconTheme.T, pixbuf @ Gtk.Gdk.Pixbuf.T) : Gtk.Gtk.IconInfo.T

Creates a T for a Gtk.Gdk.Pixbuf.T.

icon_theme a Gtk.Gtk.IconTheme.T
pixbuf the pixbuf to wrap in a T
Returns a T


Methods

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

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

Make a copy of a T.

icon_info a T
Returns the new GtkIconInfo


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

Free a T and associated information

icon_info a T


:GetAttachPoints(self @ T, points @ Std.Object.T, n_points @ Std.Object.T) : Std.Symbol.T

Fetches the set of attach points for an icon. An attach point is a location in the icon that can be used as anchor points for attaching emblems or overlays to the icon.

icon_info a T
points (array length=n_points) (out): location to store pointer to an array of points, or NULL free the array of points with g_free(). [allow-none]
n_points location to store the number of points in points, or NULL. [allow-none]
Returns TRUE if there are any attach points for the icon.


:GetBaseSize(self @ T) : Std.Integer.SmallT

Gets the base size for the icon. The base size is a size for the icon that was specified by the icon theme creator. This may be different than the actual size of image; an example of this is small emblem icons that can be attached to a larger icon. These icons will be given the same base size as the larger icons to which they are attached.

icon_info a T
Returns the base size, or 0, if no base size is known for the icon.


:GetBuiltinPixbuf(self @ T) : Gtk.Gdk.Pixbuf.T

Gets the built-in image for this icon, if any. To allow GTK+ to use built in icon images, you must pass the Gtk.Gtk.IconLookupFlags.UseBuiltin to Gtk.Gtk.IconTheme.LookupIcon.

icon_info a T structure
Returns the built-in image pixbuf, or NULL. No extra reference is added to the returned pixbuf, so if you want to keep it around, you must use g_object_ref(). The returned image must not be modified. [transfer none]


:GetDisplayName(self @ T) : Std.String.T

Gets the display name for an icon. A display name is a string to be used in place of the icon name in a user visible context like a list of icons.

icon_info a T
Returns the display name for the icon or NULL, if the icon doesn't have a specified display name. This value is owned icon_info and must not be modified or free.


:GetEmbeddedRect(self @ T, rectangle @ Gtk.Gdk.Rectangle.T) : Std.Symbol.T

Gets the coordinates of a rectangle within the icon that can be used for display of information such as a preview of the contents of a text file. See SetRawCoordinates for further information about the coordinate system.

icon_info a T
rectangle Gtk.Gdk.Rectangle.T in which to store embedded rectangle coordinates; coordinates are only stored when this function returns TRUE. [out]
Returns TRUE if the icon has an embedded rectangle


:GetFilename(self @ T) : Std.String.T



:LoadIcon(self @ T, error @ Std.Object.T) : Gtk.Gdk.Pixbuf.T

Renders an icon previously looked up in an icon theme using Gtk.Gtk.IconTheme.LookupIcon; the size will be based on the size passed to Gtk.Gtk.IconTheme.LookupIcon. Note that the resulting pixbuf may not be exactly this size; an icon theme may have icons that differ slightly from their nominal sizes, and in addition GTK+ will avoid scaling icons that it considers sufficiently close to the requested size or for which the source image would have to be scaled up too far. (This maintains sharpness.). This behaviour can be changed by passing the Gtk.Gtk.IconLookupFlags.ForceSize flag when obtaining the T. If this flag has been specified, the pixbuf returned by this function will be scaled to the exact size.

icon_info a T structure from Gtk.Gtk.IconTheme.LookupIcon
error location to store error information on failure, or NULL. [allow-none]
Returns the rendered icon; this may be a newly created icon or a new reference to an internal icon, so you must not modify the icon. Use g_object_unref() to release your reference to the icon. [transfer full]


:SetRawCoordinates(self @ T, raw_coordinates @ Std.Symbol.T) : Std.Object.T

Sets whether the coordinates returned by GetEmbeddedRect and GetAttachPoints should be returned in their original form as specified in the icon theme, instead of scaled appropriately for the pixbuf returned by LoadIcon.

Raw coordinates are somewhat strange; they are specified to be with respect to the unscaled pixmap for PNG and XPM icons, but for SVG icons, they are in a 1000x1000 coordinate space that is scaled to the final size of the icon. You can determine if the icon is an SVG icon by using GetFilename, and seeing if it is non-NULL and ends in '.svg'.

This function is provided primarily to allow compatibility wrappers for older API's, and is not expected to be useful for applications.

icon_info a T
raw_coordinates whether the coordinates of embedded rectangles and attached points should be returned in their original (unscaled) form.


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