gi-gdk-4.0.2: Gdk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Objects.Cursor

Description

A Cursor represents a cursor. Its contents are private.

Cursors are immutable objects, so they can not change after they have been constructed.

Synopsis

Exported types

newtype Cursor Source #

Memory-managed wrapper type.

Constructors

Cursor (ManagedPtr Cursor) 

Instances

Instances details
Eq Cursor Source # 
Instance details

Defined in GI.Gdk.Objects.Cursor

Methods

(==) :: Cursor -> Cursor -> Bool #

(/=) :: Cursor -> Cursor -> Bool #

IsGValue Cursor Source #

Convert Cursor to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gdk.Objects.Cursor

ManagedPtrNewtype Cursor Source # 
Instance details

Defined in GI.Gdk.Objects.Cursor

TypedObject Cursor Source # 
Instance details

Defined in GI.Gdk.Objects.Cursor

Methods

glibType :: IO GType #

GObject Cursor Source # 
Instance details

Defined in GI.Gdk.Objects.Cursor

HasParentTypes Cursor Source # 
Instance details

Defined in GI.Gdk.Objects.Cursor

type ParentTypes Cursor Source # 
Instance details

Defined in GI.Gdk.Objects.Cursor

type ParentTypes Cursor = '[Object]

class (GObject o, IsDescendantOf Cursor o) => IsCursor o Source #

Type class for types which can be safely cast to Cursor, for instance with toCursor.

Instances

Instances details
(GObject o, IsDescendantOf Cursor o) => IsCursor o Source # 
Instance details

Defined in GI.Gdk.Objects.Cursor

toCursor :: (MonadIO m, IsCursor o) => o -> m Cursor Source #

Cast to Cursor, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

getFallback

cursorGetFallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsCursor a) 
=> a

cursor: a Cursor.

-> m (Maybe Cursor)

Returns: the fallback of the cursor or Nothing to use the default cursor as fallback.

Returns the fallback for this cursor. The fallback will be used if this cursor is not available on a given Display.

For named cursors, this can happen when using nonstandard names or when using an incomplete cursor theme. For textured cursors, this can happen when the texture is too large or when the Display it is used on does not support textured cursors.

getHotspotX

cursorGetHotspotX Source #

Arguments

:: (HasCallStack, MonadIO m, IsCursor a) 
=> a

cursor: a Cursor.

-> m Int32

Returns: the horizontal offset of the hotspot or 0 for named cursors

Returns the horizontal offset of the hotspot. The hotspot indicates the pixel that will be directly above the cursor.

getHotspotY

cursorGetHotspotY Source #

Arguments

:: (HasCallStack, MonadIO m, IsCursor a) 
=> a

cursor: a Cursor.

-> m Int32

Returns: the vertical offset of the hotspot or 0 for named cursors

Returns the vertical offset of the hotspot. The hotspot indicates the pixel that will be directly above the cursor.

getName

cursorGetName Source #

Arguments

:: (HasCallStack, MonadIO m, IsCursor a) 
=> a

cursor: a Cursor.

-> m (Maybe Text)

Returns: the name of the cursor or Nothing if it is not a named cursor

Returns the name of the cursor. If the cursor is not a named cursor, Nothing will be returned and the GdkCursor[texture](#g:signal:texture) property will be set.

getTexture

cursorGetTexture Source #

Arguments

:: (HasCallStack, MonadIO m, IsCursor a) 
=> a

cursor: a Cursor.

-> m (Maybe Texture)

Returns: the texture for cursor or Nothing if it is a named cursor

Returns the texture for the cursor. If the cursor is a named cursor, Nothing will be returned and the GdkCursor[name](#g:signal:name) property will be set.

newFromName

cursorNewFromName Source #

Arguments

:: (HasCallStack, MonadIO m, IsCursor a) 
=> Text

name: the name of the cursor

-> Maybe a

fallback: Nothing or the Cursor to fall back to when this one cannot be supported

-> m (Maybe Cursor)

Returns: 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.

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"

newFromTexture

cursorNewFromTexture Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a, IsCursor b) 
=> a

texture: the texture providing the pixel data

-> Int32

hotspotX: the horizontal offset of the “hotspot” of the cursor

-> Int32

hotspotY: the vertical offset of the “hotspot” of the cursor

-> Maybe b

fallback: Nothing or the Cursor to fall back to when this one cannot be supported

-> m Cursor

Returns: a new Cursor.

Creates a new cursor from a Texture.

Properties

fallback

No description available in the introspection data.

constructCursorFallback :: (IsCursor o, MonadIO m, IsCursor a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “fallback” property. This is rarely needed directly, but it is used by new.

getCursorFallback :: (MonadIO m, IsCursor o) => o -> m (Maybe Cursor) Source #

Get the value of the “fallback” property. When overloading is enabled, this is equivalent to

get cursor #fallback

hotspotX

No description available in the introspection data.

constructCursorHotspotX :: (IsCursor o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “hotspot-x” property. This is rarely needed directly, but it is used by new.

getCursorHotspotX :: (MonadIO m, IsCursor o) => o -> m Int32 Source #

Get the value of the “hotspot-x” property. When overloading is enabled, this is equivalent to

get cursor #hotspotX

hotspotY

No description available in the introspection data.

constructCursorHotspotY :: (IsCursor o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “hotspot-y” property. This is rarely needed directly, but it is used by new.

getCursorHotspotY :: (MonadIO m, IsCursor o) => o -> m Int32 Source #

Get the value of the “hotspot-y” property. When overloading is enabled, this is equivalent to

get cursor #hotspotY

name

No description available in the introspection data.

constructCursorName :: (IsCursor o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “name” property. This is rarely needed directly, but it is used by new.

getCursorName :: (MonadIO m, IsCursor o) => o -> m (Maybe Text) Source #

Get the value of the “name” property. When overloading is enabled, this is equivalent to

get cursor #name

texture

No description available in the introspection data.

constructCursorTexture :: (IsCursor o, MonadIO m, IsTexture a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “texture” property. This is rarely needed directly, but it is used by new.

getCursorTexture :: (MonadIO m, IsCursor o) => o -> m (Maybe Texture) Source #

Get the value of the “texture” property. When overloading is enabled, this is equivalent to

get cursor #texture