Search
lxdream.org :: lxdream/src/display.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/display.h
changeset 839:51f1c4195790
prev805:b355f7b3ff2e
next849:bbe26d798fc2
author nkeynes
date Tue Sep 02 03:34:00 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change Implement absolute positioning mouse mode when not grabbed
enable/disable grab on dreamcast start/stop where it's requested
by the controllers
file annotate diff log raw
1.1 --- a/src/display.h Thu Aug 07 23:53:17 2008 +0000
1.2 +++ b/src/display.h Tue Sep 02 03:34:00 2008 +0000
1.3 @@ -224,8 +224,10 @@
1.4 * (in absolute mode).
1.5 * @param y Vertical movement since the last invocation (in relative mode) or window position
1.6 * (in absolute mode).
1.7 + * @param absolute If TRUE, x and y are the current window coordinates
1.8 + * of the mouse cursor. Otherwise, x and y are deltas from the previous mouse position.
1.9 */
1.10 -typedef void (*input_mouse_callback_t)( void *data, uint32_t buttons, int32_t x, int32_t y );
1.11 +typedef void (*input_mouse_callback_t)( void *data, uint32_t buttons, int32_t x, int32_t y, gboolean absolute );
1.12
1.13 gboolean input_register_key( const gchar *keysym, input_key_callback_t callback,
1.14 void *data, uint32_t value );
1.15 @@ -323,7 +325,16 @@
1.16
1.17 void input_event_keyup( input_driver_t input, uint16_t keycode, uint32_t pressure );
1.18
1.19 -void input_event_mouse( uint32_t buttons, int32_t x_axis, int32_t y_axis );
1.20 +/**
1.21 + * Receive an input mouse event. Normally these should be absolute events when
1.22 + * the mouse is not grabbed, and relative when it is.
1.23 + * @param buttons a bitmask of buttons currently held now (bit 0 = button 1, bit 1 = button 2, etc)
1.24 + * @param x_axis The relative or absolute position of the mouse cursor on the X axis
1.25 + * @param y_axis The relative or absolute position of the mouse cursor on the Y axis
1.26 + * @param absolute If TRUE, x_axis and y_axis are the current window coordinates
1.27 + * of the mouse cursor. Otherwise, x_axis and y_axis are deltas from the previous mouse position.
1.28 + */
1.29 +void input_event_mouse( uint32_t buttons, int32_t x_axis, int32_t y_axis, gboolean absolute );
1.30
1.31 /**
1.32 * Given a keycode and the originating input driver, return the corresponding
.