grab_pointer/9
     grab_pointer(+Window,
             +OwnerEvents, +EventsMask, +PointerMode,
             +KeyboardMode,
             +WindowConfine, +Cursor, +Time,
             -GrabStatus)
     

This predicate actively grabs control of the pointer and generates enter_notify and leave_notify events as appropriate.

Window is the ProXL window to which events will be reported while the grab is in effect.

OwnerEvents is one of:


true
If pointer events should be reported normally.
false
If pointer events should be reported only to the the grab window.

EventsMask is an integer bitmask specifying the events that are selected and should be reported to the client. The valid event mask names are:

The predicate event_list_mask/2 is useful to translate between event mask names and integer bitmasks.

PointerMode controls further processing of pointer events:


async
Pointer event processing continues normally.
sync
The state of the pointer, as seen by applications, appears to freeze. No further pointer events are generated until the grabbing client calls allow_events/[1,2,3] or the pointer grab is released.

KeyboardMode controls further processing of keyboard events:


async
Keyboard event processing continues normally.
sync
The state of the keyboard, as seen by applications, appears to freeze. No further keyboard events are generated until the grabbing client calls allow_events/[1,2,3] or the keyboard grab is released.

WindowConfine is the ProXL window to which the pointer will be confined while the grab is in effect, or the atom none.

Cursor is the ProXL cursor to be displayed during the grab, or the atom none.

Time is a timestamp in milliseconds (from an event) or the atom current_time.

GrabStatus is unified by grab_pointer/9 with one of:


success
If the grab was successful.
already_grabbed
If the attempt is unsuccessful because the pointer is already actively grabbed by some other client.
invalid_time
If the attempt is unsuccessful because the specified Time is earlier than the last-pointer-grab time, or later than the current server time.
not_viewable
If the attempt is unsuccessful because either of the grabbing Window or the WindowConfine is not viewable.
frozen
If the attempt is unsuccessful because the pointer is frozen by an active grab of another client.