aboutsummaryrefslogtreecommitdiffstats
path: root/android/skin/window.c
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2010-05-25 18:16:10 -0700
committerDavid 'Digit' Turner <digit@android.com>2010-05-25 18:45:33 -0700
commit34f2974ce7ec7c71beb47b5daf9089d5c8c40c79 (patch)
tree0a8291f99ace9a1c770ddd701c08dc581609825d /android/skin/window.c
parent3bca7734dc4b3a9e1e24964183d9765780dee4ea (diff)
downloadexternal_qemu-34f2974ce7ec7c71beb47b5daf9089d5c8c40c79.zip
external_qemu-34f2974ce7ec7c71beb47b5daf9089d5c8c40c79.tar.gz
external_qemu-34f2974ce7ec7c71beb47b5daf9089d5c8c40c79.tar.bz2
Add small user-event abstraction interface.
Preparation for future UI frontend/backend separation. This is done to ensure that the code under android/skin/ does not depend on any QEMU-specific header. We achieve this by adding a new abstract header "user-events.h" and one QEMU-specific implementations for the functions defined here. This also modifies console.h and vl-android.c to make them closer to upstream (by removing Android-specific changes). + fix Makefile.android to always build SDL from sources in standalone mode. Change-Id: I0d152741e7bb2c9cd283f5c35bd054385c7c1eb3
Diffstat (limited to 'android/skin/window.c')
-rw-r--r--android/skin/window.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/android/skin/window.c b/android/skin/window.c
index 24baaa6..4765bba 100644
--- a/android/skin/window.c
+++ b/android/skin/window.c
@@ -17,7 +17,7 @@
#include "android/utils/system.h"
#include "android/hw-sensors.h"
#include <SDL_syswm.h>
-#include "qemu-common.h"
+#include "user-events.h"
#include <math.h>
#include "framebuffer.h"
@@ -855,7 +855,7 @@ add_finger_event(unsigned x, unsigned y, unsigned state)
/* NOTE: the 0 is used in hw/goldfish_events.c to differentiate
* between a touch-screen and a trackball event
*/
- kbd_mouse_event(x, y, 0, state);
+ user_event_mouse(x, y, 0, state);
}
static void
@@ -984,7 +984,7 @@ skin_window_move_mouse( SkinWindow* window,
static void
skin_window_trackball_press( SkinWindow* window, int down )
{
- send_key_event( BTN_MOUSE, down );
+ user_event_key( BTN_MOUSE, down );
}
static void
@@ -1221,7 +1221,7 @@ skin_window_reset_internal ( SkinWindow* window, SkinLayout* slayout )
skin_window_redraw( window, NULL );
if (slayout->event_type != 0) {
- kbd_generic_event( slayout->event_type, slayout->event_code, slayout->event_value );
+ user_event_generic( slayout->event_type, slayout->event_code, slayout->event_value );
/* XXX: hack, replace by better code here */
if (slayout->event_value != 0)
android_sensors_set_coarse_orientation( ANDROID_COARSE_PORTRAIT );
@@ -1457,7 +1457,7 @@ skin_window_process_event( SkinWindow* window, SDL_Event* ev )
skin_window_redraw( window, &button->rect );
window->button.pressed = button;
if(button->keycode) {
- send_key_event(button->keycode, 1);
+ user_event_key(button->keycode, 1);
}
}
}
@@ -1477,7 +1477,7 @@ skin_window_process_event( SkinWindow* window, SDL_Event* ev )
button->down = 0;
skin_window_redraw( window, &button->rect );
if(button->keycode) {
- send_key_event(button->keycode, 0);
+ user_event_key(button->keycode, 0);
}
window->button.pressed = NULL;
window->button.hover = NULL;