Module: mousegrabber

awesome mousegrabber API.

Info:

Static module functions

mousegrabber.run (func, cursor) Grab the mouse pointer and list motions, calling callback function at each motion.
mousegrabber.stop () Stop grabbing the mouse pointer.
mousegrabber.isrunning () -> boolean Check if mousegrabber is running.


Static module functions

mousegrabber.run (func, cursor)
Grab the mouse pointer and list motions, calling callback function at each motion. The callback function must return a boolean value: true to continue grabbing, false to stop. The function is called with one argument: a table containing modifiers pointer coordinates.

The list of valid cursors is:

num_glyphs
arrow
based_arrow_down
based_arrow_up
boat
bogosity
bottom_left_corner
bottom_right_corner
bottom_side
bottom_tee
box_spiral
center_ptr
circle
clock
coffee_mug
cross
crosshair
cross_reverse
cursor
diamond_cross
dotbox
dot
double_arrow
draft_large
draft_small
draped_box
exchange
fleur
gobbler
gumby
hand
hand
heart
icon
iron_cross
leftbutton
left_ptr
left_side
left_tee
ll_angle
lr_angle
man
middlebutton
mouse
pencil
pirate
plus
question_arrow
rightbutton
right_ptr
right_side
right_tee
rtl_logo
sailboat
sb_down_arrow
sb_h_double_arrow
sb_left_arrow
sb_right_arrow
sb_up_arrow
sb_v_double_arrow
shuttle
sizing
spider
spraycan
star
target
tcross
top_left_arrow
top_left_corner
top_right_corner
top_side
top_tee
trek
ul_angle
umbrella
ur_angle
watch
xterm

Parameters:

  • func A callback function as described above.
  • cursor The name of a X cursor to use while grabbing.
mousegrabber.stop ()
Stop grabbing the mouse pointer.
mousegrabber.isrunning () -> boolean
Check if mousegrabber is running.

Returns:

    boolean True if running, false otherwise.
generated by LDoc 1.4.6 Last updated 2030-01-01 00:00:00