Libraries:Gtk:Gdk:Pixmap
Types
T
Inherits from:Constants
Nil : T
Functions
ColormapCreateFromXpm(drawable @ Gtk.Gdk.Drawable.T, colormap @ Gtk.Gdk.Colormap.T, mask @ Std.Object.T, transparent_color @ Gtk.Gdk.Color.T, filename @ Std.String.T) : Gtk.Gdk.Pixmap.T
Warning
ColormapCreateFromXpm has been deprecated since version 2.22 and should not be used in newly-written code. Use a Gtk.Gdk.Pixbuf.T instead. You can use gdk_pixbuf_new_from_file() to create it. If you must use a pixmap, use gdk_pixmap_new() to create it and Cairo to draw the pixbuf onto it.
ColormapCreateFromXpmD(drawable @ Gtk.Gdk.Drawable.T, colormap @ Gtk.Gdk.Colormap.T, mask @ Std.Object.T, transparent_color @ Gtk.Gdk.Color.T, data @ Agg.List.T) : Gtk.Gdk.Pixmap.T
Warning
ColormapCreateFromXpmD has been deprecated since version 2.22 and should not be used in newly-written code. Use a Gtk.Gdk.Pixbuf.T instead. You can use gdk_pixbuf_new_from_xpm_data() to create it. If you must use a pixmap, use gdk_pixmap_new() to create it and Cairo to draw the pixbuf onto it.
CreateFromData(drawable @ Gtk.Gdk.Drawable.T, data @ Std.String.T, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, depth @ Std.Integer.SmallT, fg @ Gtk.Gdk.Color.T, bg @ Gtk.Gdk.Color.T) : Gtk.Gdk.Pixmap.T
Warning
CreateFromData has been deprecated since version 2.22 and should not be used in newly-written code. If you must replicate the functionality of this function, create a pixmap using gdk_pixmap_new(), Gtk.Cairo.Cairo.Paint it with the background color and then create a Cairo image surface as pointed out in the docs to Gtk.Gdk.Bitmap.CreateFromData and use this surface with Gtk.Cairo.Cairo.MaskSurface to paint the foreground color.
CreateFromXpm(drawable @ Gtk.Gdk.Drawable.T, mask @ Std.Object.T, transparent_color @ Gtk.Gdk.Color.T, filename @ Std.String.T) : Gtk.Gdk.Pixmap.T
Warning
CreateFromXpm has been deprecated since version 2.22 and should not be used in newly-written code. Use a Gtk.Gdk.Pixbuf.T instead. You can use gdk_pixbuf_new_from_file() to create it. If you must use a pixmap, use gdk_pixmap_new() to create it and Cairo to draw the pixbuf onto it.
CreateFromXpmD(drawable @ Gtk.Gdk.Drawable.T, mask @ Std.Object.T, transparent_color @ Gtk.Gdk.Color.T, data @ Agg.List.T) : Gtk.Gdk.Pixmap.T
Warning
CreateFromXpmD has been deprecated since version 2.22 and should not be used in newly-written code. Use a Gtk.Gdk.Pixbuf.T instead. You can use gdk_pixbuf_new_from_xpm_data() to create it. If you must use a pixmap, use gdk_pixmap_new() to create it and Cairo to draw the pixbuf onto it.
ForeignNew(anid @ Std.Integer.SmallT) : Gtk.Gdk.Pixmap.T
Wraps a native window for the default display in a T. This may fail if the pixmap has been destroyed.
For example in the X backend, a native pixmap handle is an Xlib XID.
anid | a native pixmap handle. |
Returns | the newly-created T wrapper for the native pixmap or NULL if the pixmap has been destroyed. |
ForeignNewForDisplay(display @ Gtk.Gdk.Display.T, anid @ Std.Integer.SmallT) : Gtk.Gdk.Pixmap.T
Wraps a native pixmap in a T. This may fail if the pixmap has been destroyed.
For example in the X backend, a native pixmap handle is an Xlib XID.
display | The Gtk.Gdk.Display.T where anid is located. |
anid | a native pixmap handle. |
Returns | the newly-created T wrapper for the native pixmap or NULL if the pixmap has been destroyed. |
ForeignNewForScreen(screen @ Gtk.Gdk.Screen.T, anid @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, depth @ Std.Integer.SmallT) : Gtk.Gdk.Pixmap.T
Wraps a native pixmap in a T. This may fail if the pixmap has been destroyed.
For example in the X backend, a native pixmap handle is an Xlib XID.
This function is an alternative to ForeignNewForDisplay for cases where the dimensions of the pixmap are known. For the X backend, this avoids a roundtrip to the server.
screen | a Gtk.Gdk.Screen.T |
anid | a native pixmap handle |
width | the width of the pixmap identified by anid |
height | the height of the pixmap identified by anid |
depth | the depth of the pixmap identified by anid |
Returns | the newly-created T wrapper for the native pixmap or NULL if the pixmap has been destroyed. |
GetType() : Gtk.GObject.Type.T
Lookup(anid @ Std.Integer.SmallT) : Gtk.Gdk.Pixmap.T
Looks up the T that wraps the given native pixmap handle.
For example in the X backend, a native pixmap handle is an Xlib XID.
LookupForDisplay(display @ Gtk.Gdk.Display.T, anid @ Std.Integer.SmallT) : Gtk.Gdk.Pixmap.T
Looks up the T that wraps the given native pixmap handle.
For example in the X backend, a native pixmap handle is an Xlib XID.
display | the Gtk.Gdk.Display.T associated with anid |
anid | a native pixmap handle. |
Returns | the T wrapper for the native pixmap, or NULL if there is none. |
New(drawable @ Gtk.Gdk.Drawable.T, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, depth @ Std.Integer.SmallT) : Gtk.Gdk.Pixmap.T
Create a new pixmap with a given size and depth.
Please use Gtk.Gdk.Window.CreateSimilarSurface instead of this function if you're not forced to use a T. It is intended as the replacement function for this function in GTK 3.
drawable | A Gtk.Gdk.Drawable.T, used to determine default values for the new pixmap. Can be NULL if depth is specified, |
width | The width of the new pixmap in pixels. |
height | The height of the new pixmap in pixels. |
depth | The depth (number of bits per pixel) of the new pixmap. If -1, and drawable is not NULL, the depth of the new pixmap will be equal to that of drawable. |
Returns | the T |
Methods
:GetSize(self @ T, width @ Std.Object.T, height @ Std.Object.T) : Std.Object.T
This function is purely to make it possible to query the size of pixmaps even when compiling without deprecated symbols and you must use pixmaps. It is identical to Gtk.Gdk.Drawable.GetSize, but for pixmaps.
pixmap | a T |
width | location to store pixmap's width, or NULL. [out][allow-none] |
height | location to store pixmap's height, or NULL. [out][allow-none] |