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/pt/ptappaddhotkeyhandler.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/pt/ptappaddhotkeyhandler.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/pt/ptappaddhotkeyhandler.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/pt/ptappaddhotkeyhandler.html on line 8
Add a hotkey callback to an application's callback list
void PtAppAddHotkeyHandler(
unsigned key_sym_cap,
unsigned key_mods,
short flags,
void *data,
int (*event_f)(void *,PtCallbackInfo_t *));
- key_sym_cap
- The key cap or key sym (depending on flags) to
match.
- key_mods
- The key modifiers to match.
- flags
- Can contain:
- Pt_HOTKEY_SYM
- Interpret key_sym_cap as a key sym; the default
is to interpret it as a key cap.
- Pt_HOTKEY_IGNORE_MODS
- Ignore the key_mods argument. This flag is typically
used where you want both upper- and lowercase letters to be accepted
as hot keys.
- Pt_HOTKEY_CHAINED
- The key event can be handled by more than one application callback.
By default, the key event is consumed by the first handler that
handles it, and no other handlers are invoked.
- data
- A pointer to data you want passed as the first argument to
the hotkey handler event_f.
- event_f
- A pointer to the hotkey handler you want to add.
ph
This function adds a key event handler to the application's
Pt_CB_HOTKEY callback list. The application invokes the last-added handler
on this list whenever a key event type that matches key_sym_cap and
key_mods intersects with the application .
Note the following:
- Key caps, key mods, and key syms are defined in <photon/PkKeydef.h>.
- Key mods are prefixed with Pk_KM_.
- Key caps and key syms are prefixed with only Pk_.
For more information, see the
Manipulating Resources
in Application Code chapter of the Photon Programmer's Guide.
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
PtAppGetResources(),
PtAppGetResource(),
PtAppRemoveCallback(),
PtAppRemoveHotkeyHandler()
PtAppSetResource(),
PtAppSetResources(),
PtSetArg().
“Event
handlers” in the Managing Widgets in Application Code 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/pt/ptappaddhotkeyhandler.html on line 139
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/pt/ptappaddhotkeyhandler.html on line 139