Portability | portable (depends on GHC) |
---|---|
Stability | provisional |
Maintainer | gtk2hs-users@lists.sourceforge.net |
Safe Haskell | None |
Graphics.UI.Gtk.Gdk.Cursor
Contents
Description
Cursors | Standard and pixmap cursors.
- newtype Cursor = Cursor (ForeignPtr Cursor)
- data CursorType
- = XCursor
- | Arrow
- | BasedArrowDown
- | BasedArrowUp
- | Boat
- | Bogosity
- | BottomLeftCorner
- | BottomRightCorner
- | BottomSide
- | BottomTee
- | BoxSpiral
- | CenterPtr
- | Circle
- | Clock
- | CoffeeMug
- | Cross
- | CrossReverse
- | Crosshair
- | DiamondCross
- | Dot
- | Dotbox
- | DoubleArrow
- | DraftLarge
- | DraftSmall
- | DrapedBox
- | Exchange
- | Fleur
- | Gobbler
- | Gumby
- | Hand1
- | Hand2
- | Heart
- | Icon
- | IronCross
- | LeftPtr
- | LeftSide
- | LeftTee
- | Leftbutton
- | LlAngle
- | LrAngle
- | Man
- | Middlebutton
- | Mouse
- | Pencil
- | Pirate
- | Plus
- | QuestionArrow
- | RightPtr
- | RightSide
- | RightTee
- | Rightbutton
- | RtlLogo
- | Sailboat
- | SbDownArrow
- | SbHDoubleArrow
- | SbLeftArrow
- | SbRightArrow
- | SbUpArrow
- | SbVDoubleArrow
- | Shuttle
- | Sizing
- | Spider
- | Spraycan
- | Star
- | Target
- | Tcross
- | TopLeftArrow
- | TopLeftCorner
- | TopRightCorner
- | TopSide
- | TopTee
- | Trek
- | UlAngle
- | Umbrella
- | UrAngle
- | Watch
- | Xterm
- | LastCursor
- | BlankCursor
- | CursorIsPixmap
- cursorNew :: CursorType -> IO Cursor
- cursorNewFromPixbuf :: Display -> Pixbuf -> Int -> Int -> IO Cursor
- cursorNewFromName :: Display -> String -> IO (Maybe Cursor)
- cursorNewForDisplay :: Display -> CursorType -> IO Cursor
- cursorGetDisplay :: Cursor -> IO Display
- cursorGetImage :: Cursor -> IO (Maybe Pixbuf)
Types
Constructors
Cursor (ForeignPtr Cursor) |
Enums
data CursorType Source
Cursor types.
Constructors
Instances
Constructors
Arguments
:: CursorType |
|
-> IO Cursor | return a new |
Creates a new cursor from the set of builtin cursors for the default display.
See cursorNewForDisplay
.
To make the cursor invisible, use BlankCursor
.
Methods
Arguments
:: Display |
|
-> Pixbuf |
|
-> Int |
|
-> Int |
|
-> IO Cursor | return a new |
Creates a new cursor from a pixbuf.
Not all GDK backends support RGBA cursors. If they are not supported, a monochrome approximation will be displayed.
The functions displaySupportsCursorAlpha
and displaySupportsCursorColor
can be used to determine whether RGBA cursors are supported;
displayGetDefaultCursorSize
and displayGetMaximalCursorSize
give information about cursor sizes.
On the X backend, support for RGBA cursors requires a sufficently new version of the X Render extension.
Arguments
:: Display |
|
-> String |
|
-> IO (Maybe Cursor) | return a new |
Creates a new cursor by looking up name in the current cursor theme.
Arguments
:: Display |
|
-> CursorType |
|
-> IO Cursor | return a new |
Creates a new cursor from the set of builtin cursors.
Returns the display on which the GdkCursor is defined.
Returns a Pixbuf
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, Nothing
is returned.