Collect cursor information
int PhQueryCursor( unsigned short ig,
PhCursorInfo_t *buf );
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:
- If you have the event that triggered the clipboard operation, use its
input group
(e.g. cbinfo->event->input_group)
if it's nonzero.
- If that fails, get the value of the PHIG environment
variable. If this value is nonzero, use it.
- If neither of the above if nonzero, specify an input group of 1.
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:
- Ph_BUTTON_SELECT
- Ph_BUTTON_MENU
- Ph_BUTTON_ADJUST
- unsigned char click_count
- The number of button clicks.
- unsigned long key_mods
- Flags indicating which modifier keys are currently held down.
- 0
- Successful completion.
- -1
- An error occurred.
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
PhMoveCursorAbs(),
PhMoveCursorRel()