gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Gdk.Cursor

Contents

- Types
- Enums
- Constructors
- Methods

Description

Cursors | Standard and pixmap cursors.

Synopsis

- 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 :: GlibString string => Display -> string -> IO (Maybe Cursor)
- cursorNewForDisplay :: Display -> CursorType -> IO Cursor
- cursorGetDisplay :: Cursor -> IO Display
- cursorGetImage :: Cursor -> IO (Maybe Pixbuf)

# Types

newtype Cursor Source #

Constructors

Cursor (ForeignPtr Cursor) |

# Enums

data CursorType Source #

Cursor types.

Constructors

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 |

#### Instances

Instances details

Bounded CursorType Source # |
Instance details Defined in Graphics.UI.Gtk.Gdk.Cursor Methods minBound :: CursorType Source # maxBound :: CursorType Source #
Enum CursorType Source # |

Instance details

Defined in Graphics.UI.Gtk.Gdk.Cursor

Methods

succ :: CursorType -> CursorType Source #

pred :: CursorType -> CursorType Source #

toEnum :: Int -> CursorType Source #

fromEnum :: CursorType -> Int Source #

enumFrom :: CursorType -> [CursorType] Source #

enumFromThen :: CursorType -> CursorType -> [CursorType] Source #

enumFromTo :: CursorType -> CursorType -> [CursorType] Source #

enumFromThenTo :: CursorType -> CursorType -> CursorType -> [CursorType] Source #

Show CursorType Source # |
Instance details Defined in Graphics.UI.Gtk.Gdk.Cursor Methods showsPrec :: Int -> CursorType -> ShowS Source # show :: CursorType -> String Source # showList :: [CursorType] -> ShowS Source #
Eq CursorType Source # |
Instance details Defined in Graphics.UI.Gtk.Gdk.Cursor Methods (==) :: CursorType -> CursorType -> Bool Source # (/=) :: CursorType -> CursorType -> Bool Source #

# Constructors

cursorNew Source #

Arguments

:: CursorType | `cursorType` cursor to create
-> IO Cursor | return a new `Cursor`

Creates a new cursor from the set of builtin cursors for the default display. See `cursorNewForDisplay`. To make the cursor invisible, use `BlankCursor`.

# Methods

cursorNewFromPixbuf Source #

Arguments

:: Display | `display` the `Display` for which the cursor will be created
-> Pixbuf | `pixbuf` the `Pixbuf` containing the cursor image
-> Int | `x` the horizontal offset of the `hotspot` of the cursor.
-> Int | `y` the vertical offset of the `hotspot` of the cursor.
-> IO Cursor | return a new `Cursor`.

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 sufficiently new version of the X Render extension.

cursorNewFromName Source #

Arguments

:: GlibString string |
=> Display | `display` the `Display` for which the cursor will be created
-> string | `name` the name of the cursor
-> IO (Maybe Cursor) | return a new `Cursor`, or `Nothing` if there is no cursor with the given name

Creates a new cursor by looking up name in the current cursor theme.

cursorNewForDisplay Source #

Arguments

:: Display | `display` the `Display` for which the cursor will be created
-> CursorType | `cursorType` cursor to create
-> IO Cursor | return a new `Cursor`

Creates a new cursor from the set of builtin cursors.

cursorGetDisplay Source #

Arguments

:: Cursor | `cursor` `Cursor`
-> IO Display | return the `Display` associated to cursor

Returns the display on which the GdkCursor is defined.

cursorGetImage Source #

Arguments

:: Cursor | `cursor` `Cursor`
-> IO (Maybe Pixbuf) | a `Pixbuf` representing cursor, or `Nothing`

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.