Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ph/phpointerevent_t.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ph/phpointerevent_t.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ph/phpointerevent_t.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ph/phpointerevent_t.html on line 8
Data associated with a pointer event
typedef struct Ph_ev_ptr_data {
PhPoint_t pos;
unsigned short buttons;
unsigned short button_state;
unsigned char click_count;
unsigned char flags;
short z;
unsigned long key_mods;
unsigned long zero;
} PhPointerEvent_t;
The PhPointerEvent_t structure holds the data associated with
all pointer events:
For more information, see
PhEvent_t.
The members of PhPointerEvent_t include:
- pos
- The untranslated, absolute position of the current pointer focus.
As a rule, you should use the event's rectangle set to determine coordinate
positions.
However, for situations that demand absolute coordinates (for
example, calibrating a touchscreen), you can use pos.
- buttons
- Indicates which buttons the user pressed or released, depending on the
event.
This is a combination of:
- Ph_BUTTON_SELECT—normally the left button.
Because a pointing device might provide only this button, you should
design most applications such that the user has the option
to use this button to perform any task.
- Ph_BUTTON_MENU—normally the right button.
It can be used to invoke menus when
they're available.
- Ph_BUTTON_ADJUST—normally the middle button
on a three-button pointer.
Its use is currently unspecified.
- button_state
- The current state of all the buttons (i.e. which buttons are pressed).
This is a combination of the same bits as buttons.
- click_count
- The number of clicks (for example, a value of 2 indicates a double-click).
See the Ph_EV_RELEASE_ENDCLICK subtype for
Ph_EV_BUT_RELEASE.
- flags
- Indicates that the z field is valid.
- z
- Can be used with touchscreens to indicate touch pressure.
- key_mods
- The modifier keys that are currently pressed.
This is a combination of:
- Pk_KM_Shift
- Pk_KM_Ctrl
- Pk_KM_Alt
- Pk_KM_AltGr
- Pk_KM_Shl3
- Pk_KM_Mod6
- Pk_KM_Mod7
- Pk_KM_Mod8
- Pk_KM_Shift_Lock
- Pk_KM_Ctrl_Lock
- Pk_KM_Alt_Lock
- Pk_KM_AltGr_Lock
- Pk_KM_Shl3_Lock
- Pk_KM_Mod6_Lock
- Pk_KM_Mod7_Lock
- Pk_KM_Mod8_Lock
- Pk_KM_Caps_Lock
- Pk_KM_Num_Lock
- Pk_KM_Scroll_Lock
If the Shift key is pressed, the Shift modifier
is on; if it's released, the Shift modifier is off.
Because some keys occur twice on the keyboard, a key
release doesn't guarantee that the corresponding modifier
is off — the matching key may still be pressed.
Photon
PhEvent_t,
PhKeyEvent_t
Events chapter of the
Photon Programmer's Guide
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ph/phpointerevent_t.html on line 255
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ph/phpointerevent_t.html on line 255