filename | src/display.h |
changeset | 1010:a506a2f66180 |
prev | 863:a5e5310061e2 |
next | 1072:d82e04e6d497 |
author | nkeynes |
date | Sun Jun 28 12:08:16 2009 +0000 (14 years ago) |
permissions | -rw-r--r-- |
last change | Fix creating first VMU (failed to add to list) Fix device-changed causing second device-changed to fire |
file | annotate | diff | log | raw |
1.1 --- a/src/display.h Sun Sep 28 01:09:51 2008 +00001.2 +++ b/src/display.h Sun Jun 28 12:08:16 2009 +00001.3 @@ -227,6 +227,9 @@1.5 #define MAX_MOUSE_BUTTONS 321.7 +/* Pressure is 0..127 (allowing a joystick to be defined as two half-axes of 7- bits each) */1.8 +#define MAX_PRESSURE 0x7F1.9 +1.10 typedef void (*input_key_callback_t)( void *data, uint32_t value, uint32_t pressure, gboolean isKeyDown );1.12 /**1.13 @@ -337,9 +340,18 @@1.14 */1.15 void display_set_focused( gboolean has_focus );1.17 +/**1.18 + * Fire a keydown event on the specified device1.19 + * @param input The input device source generating the event, or NULL for the1.20 + * default GUI device1.21 + * @param keycode The device-specific keycode1.22 + * @param pressure The pressure of the key (0 to 127), where 0 is unpressed and1.23 + * 127 is maximum pressure. Devices without pressure sensitivity should1.24 + * always use MAX_PRESSURE (127)1.25 + */1.26 void input_event_keydown( input_driver_t input, uint16_t keycode, uint32_t pressure );1.28 -void input_event_keyup( input_driver_t input, uint16_t keycode, uint32_t pressure );1.29 +void input_event_keyup( input_driver_t input, uint16_t keycode );1.31 /**1.32 * Receive an input mouse down event. Normally these should be absolute events when
.