A Gdk.Gdk_Cursor represents a cursor. Its contents are private.
Cursor_Type_Property : constant Glib.Properties.Property_Boxed;
Type: Cursor_Type
Display_Property : constant Glib.Properties.Property_Boxed;
Type: Display
function Gdk_Cursor_New (Cursor_Type : Gdk_Cursor_Type) return Gdk_Cursor
Creates a new cursor from the set of builtin cursors for the default display. See gdk_cursor_new_for_display. To make the cursor invisible, use Gdk.Blank_Cursor.
cursor to create
function Gdk_Cursor_New_For_Display
(Display : not null access Gdk.Display.Gdk_Display_Record'Class;
Cursor_Type : Gdk_Cursor_Type) return Gdk_Cursor
Creates a new cursor from the set of builtin cursors. Since: gtk+ 2.2
the Gdk.Display.Gdk_Display for which the cursor will be created
cursor to create
function Gdk_Cursor_New_From_Name
(Display : not null access Gdk.Display.Gdk_Display_Record'Class;
Name : UTF8_String) return Gdk_Cursor
Creates a new cursor by looking up Name in the current cursor theme. A recommended set of cursor names that will work across different platforms can be found in the CSS specification: - "none" -
"default" -
"help" -
"pointer" -
"context-menu" -
"progress" -
"wait" -
"cell" -
"crosshair" -
"text" -
"vertical-text" -
"alias" -
"copy" -
"no-drop" -
"move" -
"not-allowed" -
"grab" -
"grabbing" -
"all-scroll" -
"col-resize" -
"row-resize" -
"n-resize" -
"e-resize" -
"s-resize" -
"w-resize" -
"ne-resize" -
"nw-resize" -
"sw-resize" -
"se-resize" -
"ew-resize" -
"ns-resize" -
"nesw-resize" -
"nwse-resize" -
"zoom-in" -
"zoom-out" Since: gtk+ 2.8
the Gdk.Display.Gdk_Display for which the cursor will be created
the name of the cursor
function Gdk_Cursor_New_From_Surface
(Display : not null access Gdk.Display.Gdk_Display_Record'Class;
Surface : Cairo.Cairo_Surface;
X : Gdouble;
Y : Gdouble) return Gdk_Cursor
Creates a new cursor from a cairo image surface. Not all GDK backends support RGBA cursors. If they are not supported, a monochrome approximation will be displayed. The functions Gdk.Display.Supports_Cursor_Alpha and Gdk.Display.Supports_Cursor_Color can be used to determine whether RGBA cursors are supported; Gdk.Display.Get_Default_Cursor_Size and Gdk.Display.Get_Maximal_Cursor_Size give information about cursor sizes. On the X backend, support for RGBA cursors requires a sufficently new version of the X Render extension. Since: gtk+ 3.10
the Gdk.Display.Gdk_Display for which the cursor will be created
the cairo image surface containing the cursor pixel data
the horizontal offset of the "hotspot" of the cursor
the vertical offset of the "hotspot" of the cursor
type Gdk_Cursor_Type is (
Blank_Cursor,
Cursor_Is_Pixmap,
X_Cursor,
Arrow,
Based_Arrow_Down,
Based_Arrow_Up,
Boat,
Bogosity,
…,
Last_Cursor);
Predefined cursors.
Note that these IDs are directly taken from the X cursor font, and many of these cursors are either not useful, or are not available on other platforms.
The recommended way to create cursors is to use gdk_cursor_new_from_name.
package Gdk_Cursor_Type_Properties is
new Generic_Internal_Discrete_Property (Gdk_Cursor_Type);
procedure Gdk_New (Self : out Gdk_Cursor; Cursor_Type : Gdk_Cursor_Type)
Creates a new cursor from the set of builtin cursors for the default display. See gdk_cursor_new_for_display. To make the cursor invisible, use Gdk.Blank_Cursor.
cursor to create
procedure Gdk_New_For_Display
(Self : out Gdk_Cursor;
Display : not null access Gdk.Display.Gdk_Display_Record'Class;
Cursor_Type : Gdk_Cursor_Type)
Creates a new cursor from the set of builtin cursors. Since: gtk+ 2.2
the Gdk.Display.Gdk_Display for which the cursor will be created
cursor to create
procedure Gdk_New_From_Name
(Self : out Gdk_Cursor;
Display : not null access Gdk.Display.Gdk_Display_Record'Class;
Name : UTF8_String)
Creates a new cursor by looking up Name in the current cursor theme. A recommended set of cursor names that will work across different platforms can be found in the CSS specification: - "none" -
"default" -
"help" -
"pointer" -
"context-menu" -
"progress" -
"wait" -
"cell" -
"crosshair" -
"text" -
"vertical-text" -
"alias" -
"copy" -
"no-drop" -
"move" -
"not-allowed" -
"grab" -
"grabbing" -
"all-scroll" -
"col-resize" -
"row-resize" -
"n-resize" -
"e-resize" -
"s-resize" -
"w-resize" -
"ne-resize" -
"nw-resize" -
"sw-resize" -
"se-resize" -
"ew-resize" -
"ns-resize" -
"nesw-resize" -
"nwse-resize" -
"zoom-in" -
"zoom-out" Since: gtk+ 2.8
the Gdk.Display.Gdk_Display for which the cursor will be created
the name of the cursor
procedure Gdk_New_From_Surface
(Self : out Gdk_Cursor;
Display : not null access Gdk.Display.Gdk_Display_Record'Class;
Surface : Cairo.Cairo_Surface;
X : Gdouble;
Y : Gdouble)
Creates a new cursor from a cairo image surface. Not all GDK backends support RGBA cursors. If they are not supported, a monochrome approximation will be displayed. The functions Gdk.Display.Supports_Cursor_Alpha and Gdk.Display.Supports_Cursor_Color can be used to determine whether RGBA cursors are supported; Gdk.Display.Get_Default_Cursor_Size and Gdk.Display.Get_Maximal_Cursor_Size give information about cursor sizes. On the X backend, support for RGBA cursors requires a sufficently new version of the X Render extension. Since: gtk+ 3.10
the Gdk.Display.Gdk_Display for which the cursor will be created
the cairo image surface containing the cursor pixel data
the horizontal offset of the "hotspot" of the cursor
the vertical offset of the "hotspot" of the cursor
function Get_Cursor_Type (Self : Gdk.Gdk_Cursor) return Gdk_Cursor_Type
Returns the cursor type for this cursor. Since: gtk+ 2.22
a Gdk.Cursor.Gdk_Cursor_Type
function Get_Display
(Self : Gdk.Gdk_Cursor) return Gdk.Display.Gdk_Display
Returns the display on which the Gdk.Gdk_Cursor is defined. Since: gtk+ 2.2
the Gdk.Display.Gdk_Display associated to Cursor
procedure Get_Surface
(Self : Gdk.Gdk_Cursor;
X_Hot : out Gdouble;
Y_Hot : out Gdouble;
Surface : out Cairo.Cairo_Surface)
Returns a cairo image surface with the image used to display the cursor. Note that depending on the capabilities of the windowing system and on the cursor, GDK may not be able to obtain the image data. In this case, null is returned. Since: gtk+ 3.10
Location to store the hotspot x position, or null
Location to store the hotspot y position, or null @return a cairo_surface_t representing Cursor, or null
function Get_Type return Glib.GType
type Property_Gdk_Cursor_Type is new Gdk_Cursor_Type_Properties.Property;
procedure Ref (Self : Gdk.Gdk_Cursor)
procedure Unref (Self : Gdk.Gdk_Cursor)