[Previous] [Contents] [Index] [Next]

PhQueryCursor()

Collect cursor information

Synopsis:

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

Description:

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

You can determine the current input group as follows:

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
Area to restrict dragging to.
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:

PhMoveCursorAbs(), PhMoveCursorRel()


[Previous] [Contents] [Index] [Next]