Index

Package: Cursor

Description

package Gdk.Cursor is
This package provides the capability to create predefined mouse cursors as well as user defined ones.

Binding from C File version 1.3.6

<testgtk>create_cursors.adb</testgtk>

Types

Gdk_Cursor

type Gdk_Cursor is new Gdk.C_Proxy;

Gdk_Cursor_Type

type Gdk_Cursor_Type is
     (X_Cursor,
      Arrow,
      Based_Arrow_Down,
      Based_Arrow_Up,
      Boat,
      Bogosity,
      Bottom_Left_Corner,
      Bottom_Right_Corner,
      Bottom_Side,
      Bottom_Tee,
      Box_Spiral,
      Center_Ptr,
      Circle,
      Clock,
      Coffee_Mug,
      Cross,
      Cross_Reverse,
      Crosshair,
      Diamond_Cross,
      Dot,
      Dotbox,
      Double_Arrow,
      Draft_Large,
      Draft_Small,
      Draped_Box,
      Exchange,
      Fleur,
      Gobbler,
      Gumby,
      Hand1,
      Hand2,
      Heart,
      Icon,
      Iron_Cross,
      Left_Ptr,
      Left_Side,
      Left_Tee,
      Leftbutton,
      Ll_Angle,
      Lr_Angle,
      Man,
      Middlebutton,
      Mouse,
      Pencil,
      Pirate,
      Plus,
      Question_Arrow,
      Right_Ptr,
      Right_Side,
      Right_Tee,
      Rightbutton,
      Rtl_Logo,
      Sailboat,
      Sb_Down_Arrow,
      Sb_H_Double_Arrow,
      Sb_Left_Arrow,
      Sb_Right_Arrow,
      Sb_Up_Arrow,
      Sb_V_Double_Arrow,
      Shuttle,
      Sizing,
      Spider,
      Spraycan,
      Star,
      Target,
      Tcross,
      Top_Left_Arrow,
      Top_Left_Corner,
      Top_Right_Corner,
      Top_Side,
      Top_Tee,
      Trek,
      Ul_Angle,
      Umbrella,
      Ur_Angle,
      Watch,
      Xterm);

Constants & Global variables

Null_Cursor (Gdk_Cursor)

Null_Cursor : constant Gdk_Cursor;

Subprograms & Entries

Gdk_New

procedure Gdk_New 
(Widget: out Gdk_Cursor;
Cursor_Type: Gdk_Cursor_Type);
Create a new standard cursor.

Gdk_New

procedure Gdk_New 
(Widget: out Gdk_Cursor;
Source: Gdk.Gdk_Pixmap;
Mask: Gdk.Gdk_Pixmap;
Fg: Gdk.Color.Gdk_Color;
Bg: Gdk.Color.Gdk_Color;
X: Glib.Gint;
Y: Glib.Gint);
Create a new cursor from a given pixmap and mask. See also Gdk.Pixbuf.Gdk_New_From_Pixbuf. Both the pixmap and mask must have a depth of 1 (i.e. each pixel has only 2 values - on or off). The standard cursor size is 16 by 16 pixels. - Source is the pixmap specifying the cursor. - Mask is the pixmap specifying the mask, which must be the same size as source. - Fg is the foreground color, used for the bits in the source which are enabled. The color does not have to be allocated first. - Bg is the background color, used for the bits in the source which are disabled. The color does not have to be allocated first. - X is the horizontal offset of the 'hotspot' of the cursor. - Y is the vertical offset of the 'hotspot' of the cursor.

Gdk_New

procedure Gdk_New 
(Cursor: out Gdk_Cursor;
Name: String);
Create a cursor from a name

Destroy

procedure Destroy 
(Cursor: Gdk_Cursor);
Destroy Destroy a cursor, freeing any resources allocated for it. Deprecated, use Unref instead.

Ref

procedure Ref 
(Cursor: Gdk_Cursor);
Increment the reference counting for the cursor.

Unref

procedure Unref 
(Cursor: Gdk_Cursor);
Decrement the reference counting for the cursor. When this reaches 0, the cursor is destroyed.