PhQueryCursor()

Collect cursor information

Synopsis:

int PhQueryCursor( unsigned short ig,
                   PhCursorInfo_t *buf );

Arguments:

ig
The input group which contains the cursor you want to query. Set to 0 to query any input group.
buf
A pointer to a PhCursorInfo_t structure that the function puts cursor information into.

Library:

ph

Description:

This function collects information about the cursor for input group ig and places this information in the provided structure buf.

To determine the current input group, call PhInputGroup(), passing to it the current event, if any.

The PhCursorInfo_t structure is defined in <photon/PhT.h> and contains at least:

PhPoint_t pos
Last position, in absolute coordinates.
PhRid_t region
Region that currently contains the cursor.
PhRid_t ig_region
Region representing the input group.
PgColor_t color
Cursor color.
PhPoint_t last_press
Location of last Ph_EV_BUT_PRESS event.
unsigned long msec
msec of last press.
PhPoint_t steady
Last steady base point.
PhRid_t dragger
Region currently dragging.
PhRect_t drag_boundary
A PhRect_t structure that defines the area to which to restrict dragging.
PhRid_t phantom_rid
Region ID to deliver phantom to.
unsigned short type
Cursor type (from cursor font).
unsigned short ig
Input group number.
unsigned short button_state
Flags that indicate which pointer buttons changed their state:
unsigned char click_count
The number of button clicks.
unsigned long key_mods
Flags indicating which modifier keys are currently held down.

Returns:

0
Successful completion.
-1
An error occurred.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgColor_t, PhMoveCursorAbs(), PhMoveCursorRel(), PhPoint_t, PhRect_t