Search
lxdream.org :: lxdream/src/display.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/display.h
changeset 1010:a506a2f66180
prev863:a5e5310061e2
next1072:d82e04e6d497
author nkeynes
date Sun Apr 12 02:04:27 2009 +0000 (11 years ago)
permissions -rw-r--r--
last change Fix analogue joystick input
file annotate diff log raw
1.1 --- a/src/display.h Sun Sep 28 01:09:51 2008 +0000
1.2 +++ b/src/display.h Sun Apr 12 02:04:27 2009 +0000
1.3 @@ -227,6 +227,9 @@
1.4
1.5 #define MAX_MOUSE_BUTTONS 32
1.6
1.7 +/* Pressure is 0..127 (allowing a joystick to be defined as two half-axes of 7- bits each) */
1.8 +#define MAX_PRESSURE 0x7F
1.9 +
1.10 typedef void (*input_key_callback_t)( void *data, uint32_t value, uint32_t pressure, gboolean isKeyDown );
1.11
1.12 /**
1.13 @@ -337,9 +340,18 @@
1.14 */
1.15 void display_set_focused( gboolean has_focus );
1.16
1.17 +/**
1.18 + * Fire a keydown event on the specified device
1.19 + * @param input The input device source generating the event, or NULL for the
1.20 + * default GUI device
1.21 + * @param keycode The device-specific keycode
1.22 + * @param pressure The pressure of the key (0 to 127), where 0 is unpressed and
1.23 + * 127 is maximum pressure. Devices without pressure sensitivity should
1.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.27
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.30
1.31 /**
1.32 * Receive an input mouse down event. Normally these should be absolute events when
.