Module: AMS::Cursor

Defined in:
Documentation/ams/cursor.rb

Overview

Note:

Windows only!

The Cursor namespace contains functions that are subjected to Windows cursor.

Since:

  • 2.0.0

Class Method Summary collapse

Class Method Details

.clear_clipBoolean

Unclip cursor.

Returns:

  • (Boolean)

    success

Since:

  • 2.0.0


68
69
# File 'Documentation/ams/cursor.rb', line 68

def clear_clip
end

.clip_to_main_windowBoolean

Clip cursor to main window.

Returns:

  • (Boolean)

    success

Since:

  • 2.0.0


58
59
# File 'Documentation/ams/cursor.rb', line 58

def clip_to_main_window
end

.clip_to_viewportBoolean

Clip cursor to view window.

Returns:

  • (Boolean)

    success

Since:

  • 2.0.0


63
64
# File 'Documentation/ams/cursor.rb', line 63

def clip_to_viewport
end

.get_clip_rect(mode = 1) ⇒ Array<Fixnum>

Get upper-left and lower-right coordinates of the cursor clip rectangle.

Parameters:

  • mode (Fixnum) (defaults to: 1)
    1. Retrieve coordinates relative to screen origin.

    2. Retrieve coordinates relative to the viewport origin.

Returns:

  • (Array<Fixnum>)

    [x1,y1, x2,y2]

Since:

  • 2.0.0


41
42
# File 'Documentation/ams/cursor.rb', line 41

def get_clip_rect(mode = 1)
end

.get_pos(mode = 1) ⇒ Array<Fixnum>

Get cursor position.

Parameters:

  • mode (Fixnum) (defaults to: 1)
    1. Retrieve coordinates relative to screen origin.

    2. Retrieve coordinates relative to the viewport origin.

Returns:

  • (Array<Fixnum>)

    [x,y]

Since:

  • 2.0.0


23
24
# File 'Documentation/ams/cursor.rb', line 23

def get_pos(mode = 1)
end

.is_main_window_target?Boolean

Determine whether cursor is pointing at the main window.

Returns:

  • (Boolean)

Since:

  • 2.0.0


73
74
# File 'Documentation/ams/cursor.rb', line 73

def is_main_window_target?
end

.is_viewport_target?Boolean

Determine whether cursor is within the view client area.

Returns:

  • (Boolean)

Since:

  • 2.0.0


78
79
# File 'Documentation/ams/cursor.rb', line 78

def is_viewport_target?
end

.is_visible?Boolean

Determine whether cursor is visible.

Returns:

  • (Boolean)

Since:

  • 2.0.0


15
16
# File 'Documentation/ams/cursor.rb', line 15

def is_visible?
end

.set_clip_rect(x1, y1, x2, y2, mode = 1) ⇒ Boolean

Set upper-left and lower-right coordinates of the cursor clip rectangle.

Parameters:

  • x1 (Fixnum)

    X coordinate of the upper-left corner of the rect.

  • y1 (Fixnum)

    Y coordinate of the upper-left corner of the rect.

  • x2 (Fixnum)

    X coordinate of the lower-right corner of the rect.

  • y2 (Fixnum)

    Y coordinate of the lower-right corner of the rect.

  • mode (Fixnum) (defaults to: 1)
    1. Given coordinates are relative to screen origin.

    2. Given coordinates are relative to the viewport origin.

Returns:

  • (Boolean)

    success

Since:

  • 2.0.0


53
54
# File 'Documentation/ams/cursor.rb', line 53

def set_clip_rect(x1, y1, x2, y2, mode = 1)
end

.set_pos(x, y, mode = 1) ⇒ Boolean

Set cursor position.

Parameters:

  • x (Fixnum)
  • y (Fixnum)
  • mode (Fixnum) (defaults to: 1)
    1. Given coordinates are relative to screen origin.

    2. Given coordinates are relative to the viewport origin.

Returns:

  • (Boolean)

    success

Since:

  • 2.0.0


33
34
# File 'Documentation/ams/cursor.rb', line 33

def set_pos(x, y, mode = 1)
end

.show(state) ⇒ Boolean

Show/hide cursor.

Parameters:

  • state (Boolean)

Returns:

  • (Boolean)

    Whether cursor visibility state was changed.

Since:

  • 2.0.0


10
11
# File 'Documentation/ams/cursor.rb', line 10

def show(state)
end