gtk.gdk.Cursor
gtk.gdk.Cursor — standard and pixmap cursors
Constructor
gtk.gdk.Cursor(cursor_type)
|
cursor_type : | the standard cursor to
create |
Returns : | a new gtk.gdk.Cursor |
Creates the new gtk.gdk.Cursor from
a builtin cursor specified by cursor_type. To make
the cursor invisible, see the description of the gtk.gdk.Cursor() constructor that
creates a cursor from a pixmap below.
gtk.gdk.Cursor(display, cursor_type)
|
Note
This constructor is available in PyGTK 2.4 and above.
Creates the new gtk.gdk.Cursor for
the gtk.gdk.Display
specified by display from a builtin cursor specified
by cursor_type. To make the cursor invisible, see the
description of the gtk.gdk.Cursor() constructor that
creates a cursor from a pixmap below.
gtk.gdk.Cursor(display, pixbuf, x, y)
|
Note
This constructor is available in PyGTK 2.4 and above.
Creates a new gtk.gdk.Cursor for
the gtk.gdk.Display
specified by display using the gtk.gdk.Pixbuf
specified by source as the icon image. The "hotspot"
of the cursor will be located as the position specified by
x and y. To make the cursor
invisible, see the description of the gtk.gdk.Cursor() constructor that
creates a cursor from a pixmap below
gtk.gdk.Cursor(source, mask, fg, bg, x, y)
|
Creates a new gtk.gdk.Cursor
using:
- the gtk.gdk.Pixmap
specified by source as the icon image
- the gtk.gdk.Pixmap
specified by mask to mask
source (must be the same size as source)
- the gtk.gdk.Color
specified by fg as the foreground color of the
cursor
- the gtk.gdk.Color
specified by bg as the background color of the
cursor
- the horizontal offset of the cursor "hot spot" specified
by x
- the vertical offset of the cursor "hot spot" specified
by y
To make the cursor invisible, create a cursor from an empty
gtk.gdk.Pixmap
as follows:
pixmap = gtk.gdk.Pixmap(None, 1, 1, 1)
color = gtk.gdk.Color()
cursor = gtk.gdk.Cursor(pixmap, pixmap, color, color, 0, 0)
|
Methods
gtk.gdk.Cursor.get_display
Note
This method is available in PyGTK 2.2 and above.
The get_display() method returns the
gtk.gdk.Display on
which the cursor is defined.