package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Cursor

type t = [ `cursor | `object_ ] Gobject.obj
val new_from_name : string -> t option -> t

Create a new Cursor

val new_from_texture : [ `texture | `object_ ] Gobject.obj -> int -> int -> t option -> t

Create a new Cursor

val get_texture : t -> [ `texture | `object_ ] Gobject.obj option

Returns the texture for the cursor.

If the cursor is a named cursor, %NULL will be returned.

val get_name : t -> string option

Returns the name of the cursor.

If the cursor is not a named cursor, %NULL will be returned.

val get_hotspot_y : t -> int

Returns the vertical offset of the hotspot.

The hotspot indicates the pixel that will be directly above the cursor.

Note that named cursors may have a nonzero hotspot, but this function will only return the hotspot position for cursors created with ctor@Gdk.Cursor.new_from_texture.

val get_hotspot_x : t -> int

Returns the horizontal offset of the hotspot.

The hotspot indicates the pixel that will be directly above the cursor.

Note that named cursors may have a nonzero hotspot, but this function will only return the hotspot position for cursors created with ctor@Gdk.Cursor.new_from_texture.

val get_fallback : t -> t option

Returns the fallback for this @cursor.

The fallback will be used if this cursor is not available on a given `GdkDisplay`. 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 `GdkDisplay` it is used on does not support textured cursors.