org.gnome.gdk

## Class Cursor

- Object
- - org.freedesktop.bindings.Pointer
  - - org.gnome.glib.Boxed
    - - org.gnome.gdk.Cursor

-     public final class Cursor
      extends Boxed

  That which indicateth where your mouse is pointing!

  A Cursor object must be bound to a underlying Window before [changing it] will actually cause what the user sees to change; see `setCursor()` on the Window here in `org.gnome.gdk`.

  Quite frequently you want to change the Cursor for the entire application (in a manner reminiscent of modal behaviour). This is trickier than it should be, but you've got a couple possibilities. You can either

  - maintain a list of all the significant `[org.gnome.gtk]` Windows being displayed by your application and then call `getWindow().setCursor(BLAH)` on each of them, or you can
  - use `getToplevels()` on `[org.gnome.gdk]` Window and then similarly just call `setCursor(BLAH)` as you iterate over the returned set.
  The first option is a bit more cumbersome, but many people find themselves maintaining a list of "major" Windows for other purposes, so it can serve.

  Almost inevitably the Cursor your want is `BUSY` which is the spinning "busy" pointer. You can revert to "normal" by setting `NORMAL` directly (which is the default cursor you spend most of your time looking at), or by passing `null` to `setCursor()`.

  Note that different theme engines (let alone different Linux vendors) tend to screw with the default pointer icons set quite a bit, so you may find that pointers appear very different for users on different distributions.

  Our implementation of Cursor assumes you want to manipulate `GdkCursors` on the "default" `GdkDisplay`. Where else would you be working?

  Since:
    4.0.6
  Author:
    Andrew Cowie

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Cursor` | `BUSY` The spinning cursor showing that the application is busy (and unable to be responsive to user input).
    `static Cursor` | `LINK` A pointer indicating that a hyperlink can be clicked and followed.
    `static Cursor` | `NORMAL` The normal left-hand pointer.
    `static Cursor` | `TEXT` The vertical bar pointer used in text entry Widgets such as Entry and TextView.
    `static Cursor` | `WORKING` A pointer that also has a busy spinner.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Cursor(CursorType type)` Create a new Cursor with the specified CursorType.

  - ### Method Summary

    - ### Methods inherited from class org.freedesktop.bindings.Pointer

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### BUSY

          public static final Cursor BUSY

      The spinning cursor showing that the application is busy (and unable to be responsive to user input).

      This is type `WATCH`.

      Since:
        4.0.14

    - #### LINK

          public static final Cursor LINK

      A pointer indicating that a hyperlink can be clicked and followed. Not used for Buttons.

      This is type `HAND2`.

      Since:
        4.0.14

    - #### NORMAL

          public static final Cursor NORMAL

      The normal left-hand pointer.

      This is a type `LEFT_PTR`.

      Since:
        4.0.14

    - #### TEXT

          public static final Cursor TEXT

      The vertical bar pointer used in text entry Widgets such as Entry and TextView.

      This is type `XTERM`.

      Since:
        4.0.14

    - #### WORKING

          public static final Cursor WORKING

      A pointer that also has a busy spinner. This is used to indicate that the application is working, but that the user can still carry out actions.

      This is `"left_ptr_watch"` from the cursor theme.

      Since:
        4.0.14

  - ### Constructor Detail

    - #### Cursor

          public Cursor(CursorType type)

      Create a new Cursor with the specified CursorType.
      Since:
        4.0.6