1.1 --- a/src/display.h Tue Jan 01 05:08:38 2008 +0000
1.2 +++ b/src/display.h Sat Jan 26 03:44:22 2008 +0000
1.4 uint16_t (*resolve_keysym)( const gchar *keysym );
1.7 + * Given a native system keycode, convert it to a dreamcast keyboard code.
1.9 + uint16_t (*convert_to_dckeysym)( uint16_t keycode );
1.12 * Create a render target with the given width and height.
1.14 render_buffer_t (*create_render_buffer)( uint32_t width, uint32_t height );
1.15 @@ -180,12 +185,38 @@
1.17 typedef void (*input_key_callback_t)( void *data, uint32_t value, gboolean isKeyDown );
1.20 + * Callback to receive mouse input events
1.21 + * @param data pointer passed in at the time the hook was registered
1.22 + * @param buttons bitmask of button states, where bit 0 is button 0 (left), bit 1 is button
1.23 + * 1 (middle), bit 2 is button 2 (right) and so forth.
1.24 + * @param x Horizontal movement since the last invocation (in relative mode) or window position
1.25 + * (in absolute mode).
1.26 + * @param y Vertical movement since the last invocation (in relative mode) or window position
1.27 + * (in absolute mode).
1.29 +typedef void (*input_mouse_callback_t)( void *data, uint32_t buttons, int32_t x, int32_t y );
1.31 gboolean input_register_key( const gchar *keysym, input_key_callback_t callback,
1.32 void *data, uint32_t value );
1.34 void input_unregister_key( const gchar *keysym, input_key_callback_t callback,
1.35 void *data, uint32_t value );
1.38 + * Register a hook to receive all input events
1.40 +gboolean input_register_hook( input_key_callback_t callback, void *data );
1.41 +void input_unregister_hook( input_key_callback_t callback, void *data );
1.44 + * Register a mouse event hook.
1.45 + * @param relative TRUE if the caller wants relative mouse movement, FALSE for
1.46 + * absolute mouse positioning. It's not generally possible to receive both at the same time.
1.48 +gboolean input_register_mouse_hook( gboolean relative, input_mouse_callback_t callback, void *data );
1.49 +void input_unregister_mouse_hook( input_mouse_callback_t callback, void *data );
1.51 gboolean input_is_key_valid( const gchar *keysym );
1.53 gboolean input_is_key_registered( const gchar *keysym );
1.56 void input_event_keyup( uint16_t keycode );
1.58 +void input_event_mouse( uint32_t buttons, int32_t x_axis, int32_t y_axis );
1.60 +uint16_t input_keycode_to_dckeysym( uint16_t keycode );