| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte | 
|---|---|
| License | LGPL-2.1 | 
| Maintainer | Iñaki García Etxebarria | 
| Safe Haskell | None | 
| Language | Haskell2010 | 
GI.Gdk.Objects.Cursor
Description
A Cursor represents a cursor. Its contents are private.
Synopsis
- newtype Cursor = Cursor (ManagedPtr Cursor)
 - class (GObject o, IsDescendantOf Cursor o) => IsCursor o
 - toCursor :: (MonadIO m, IsCursor o) => o -> m Cursor
 - noCursor :: Maybe Cursor
 - cursorGetCursorType :: (HasCallStack, MonadIO m, IsCursor a) => a -> m CursorType
 - cursorGetDisplay :: (HasCallStack, MonadIO m, IsCursor a) => a -> m Display
 - cursorGetImage :: (HasCallStack, MonadIO m, IsCursor a) => a -> m (Maybe Pixbuf)
 - cursorGetSurface :: (HasCallStack, MonadIO m, IsCursor a) => a -> m (Maybe Surface, Double, Double)
 - cursorNew :: (HasCallStack, MonadIO m) => CursorType -> m Cursor
 - cursorNewForDisplay :: (HasCallStack, MonadIO m, IsDisplay a) => a -> CursorType -> m Cursor
 - cursorNewFromName :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Text -> m (Maybe Cursor)
 - cursorNewFromPixbuf :: (HasCallStack, MonadIO m, IsDisplay a, IsPixbuf b) => a -> b -> Int32 -> Int32 -> m Cursor
 - cursorNewFromSurface :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Surface -> Double -> Double -> m Cursor
 - cursorRef :: (HasCallStack, MonadIO m, IsCursor a) => a -> m Cursor
 - cursorUnref :: (HasCallStack, MonadIO m, IsCursor a) => a -> m ()
 - constructCursorCursorType :: IsCursor o => CursorType -> IO (GValueConstruct o)
 - getCursorCursorType :: (MonadIO m, IsCursor o) => o -> m CursorType
 - constructCursorDisplay :: (IsCursor o, IsDisplay a) => a -> IO (GValueConstruct o)
 - getCursorDisplay :: (MonadIO m, IsCursor o) => o -> m Display
 
Exported types
Memory-managed wrapper type.
Constructors
| Cursor (ManagedPtr Cursor) | 
Instances
| Eq Cursor Source # | |
| GObject Cursor Source # | |
Defined in GI.Gdk.Objects.Cursor Methods gobjectType :: IO GType #  | |
| IsGValue Cursor Source # | Convert   | 
| HasParentTypes Cursor Source # | |
Defined in GI.Gdk.Objects.Cursor  | |
| type ParentTypes Cursor Source # | |
Defined in GI.Gdk.Objects.Cursor  | |
class (GObject o, IsDescendantOf Cursor o) => IsCursor o Source #
Instances
| (GObject o, IsDescendantOf Cursor o) => IsCursor o Source # | |
Defined in GI.Gdk.Objects.Cursor  | |
Methods
Overloaded methods
getCursorType
Arguments
| :: (HasCallStack, MonadIO m, IsCursor a) | |
| => a | 
  | 
| -> m CursorType | Returns: a   | 
Returns the cursor type for this cursor.
Since: 2.22
getDisplay
Arguments
| :: (HasCallStack, MonadIO m, IsCursor a) | |
| => a | 
  | 
| -> m Display | Returns: the   | 
Returns the display on which the Cursor is defined.
Since: 2.2
getImage
getSurface
Arguments
| :: (HasCallStack, MonadIO m, IsCursor a) | |
| => a | 
  | 
| -> m (Maybe Surface, Double, Double) | 
Returns a cairo image surface 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.
Since: 3.10
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => CursorType | 
  | 
| -> m Cursor | Returns: a new   | 
Deprecated: (Since version 3.16)Use cursorNewForDisplay instead.
Creates a new cursor from the set of builtin cursors for the default display.
 See cursorNewForDisplay.
To make the cursor invisible, use CursorTypeBlankCursor.
newForDisplay
Arguments
| :: (HasCallStack, MonadIO m, IsDisplay a) | |
| => a | 
  | 
| -> CursorType | 
  | 
| -> m Cursor | Returns: a new   | 
Creates a new cursor from the set of builtin cursors.
Since: 2.2
newFromName
Arguments
| :: (HasCallStack, MonadIO m, IsDisplay a) | |
| => a | 
  | 
| -> Text | 
  | 
| -> m (Maybe Cursor) | Returns: a new   | 
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"
Since: 2.8
newFromPixbuf
Arguments
| :: (HasCallStack, MonadIO m, IsDisplay a, IsPixbuf b) | |
| => a | 
  | 
| -> b | 
  | 
| -> Int32 | 
  | 
| -> Int32 | 
  | 
| -> m Cursor | Returns: 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.
If x or y are -1, the pixbuf must have
 options named “x_hot” and “y_hot”, resp., containing
 integer values between 0 and the width resp. height of
 the pixbuf. (Since: 3.0)
On the X backend, support for RGBA cursors requires a sufficently new version of the X Render extension.
Since: 2.4
newFromSurface
Arguments
| :: (HasCallStack, MonadIO m, IsDisplay a) | |
| => a | 
  | 
| -> Surface | 
  | 
| -> Double | 
  | 
| -> Double | 
  | 
| -> m Cursor | Returns: a new   | 
Creates a new cursor from a cairo image surface.
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.
Since: 3.10
ref
Arguments
| :: (HasCallStack, MonadIO m, IsCursor a) | |
| => a | 
  | 
| -> m Cursor | Returns: Same   | 
Deprecated: (Since version 3.0)Use objectRef instead
Adds a reference to cursor.
unref
Arguments
| :: (HasCallStack, MonadIO m, IsCursor a) | |
| => a | 
  | 
| -> m () | 
Deprecated: (Since version 3.0)Use objectUnref instead
Removes a reference from cursor, deallocating the cursor
 if no references remain.
Properties
cursorType
No description available in the introspection data.
constructCursorCursorType :: IsCursor o => CursorType -> IO (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “cursor-type” property. This is rarely needed directly, but it is used by new.
getCursorCursorType :: (MonadIO m, IsCursor o) => o -> m CursorType Source #
Get the value of the “cursor-type” property.
 When overloading is enabled, this is equivalent to
get cursor #cursorType
display
No description available in the introspection data.
constructCursorDisplay :: (IsCursor o, IsDisplay a) => a -> IO (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “display” property. This is rarely needed directly, but it is used by new.
getCursorDisplay :: (MonadIO m, IsCursor o) => o -> m Display Source #
Get the value of the “display” property.
 When overloading is enabled, this is equivalent to
get cursor #display