mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Mir 14.04 headers available that allow scroll + touch events.
This commit is contained in:
parent
dd27ebed6f
commit
2540214e06
@ -122,7 +122,6 @@ HandleMouseMotion(SDL_Window* sdl_window, int x, int y)
|
||||
SDL_SendMouseMotion(sdl_window, 0, 0, x, y);
|
||||
}
|
||||
|
||||
#if 0 /* !!! FIXME: needs a newer set of dev headers than Ubuntu 13.10 is shipping atm. */
|
||||
static void
|
||||
HandleTouchPress(int device_id, int source_id, SDL_bool down, float x, float y, float pressure)
|
||||
{
|
||||
@ -182,7 +181,6 @@ HandleTouchEvent(MirMotionEvent const motion, int cord_index, SDL_Window* sdl_wi
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
HandleMouseEvent(MirMotionEvent const motion, int cord_index, SDL_Window* sdl_window)
|
||||
@ -207,13 +205,11 @@ HandleMouseEvent(MirMotionEvent const motion, int cord_index, SDL_Window* sdl_wi
|
||||
case mir_motion_action_outside:
|
||||
SDL_SetMouseFocus(NULL);
|
||||
break;
|
||||
#if 0 /* !!! FIXME: needs a newer set of dev headers than Ubuntu 13.10 is shipping atm. */
|
||||
case mir_motion_action_scroll:
|
||||
HandleMouseScroll(sdl_window,
|
||||
motion.pointer_coordinates[cord_index].hscroll,
|
||||
motion.pointer_coordinates[cord_index].vscroll);
|
||||
break;
|
||||
#endif
|
||||
case mir_motion_action_cancel:
|
||||
case mir_motion_action_hover_enter:
|
||||
case mir_motion_action_hover_exit:
|
||||
@ -228,16 +224,12 @@ HandleMotionEvent(MirMotionEvent const motion, SDL_Window* sdl_window)
|
||||
{
|
||||
int cord_index;
|
||||
for (cord_index = 0; cord_index < motion.pointer_count; cord_index++) {
|
||||
#if 0 /* !!! FIXME: needs a newer set of dev headers than Ubuntu 13.10 is shipping atm. */
|
||||
if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_mouse) {
|
||||
HandleMouseEvent(motion, cord_index, sdl_window);
|
||||
}
|
||||
else if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_finger) {
|
||||
HandleTouchEvent(motion, cord_index, sdl_window);
|
||||
}
|
||||
#else
|
||||
HandleMouseEvent(motion, cord_index, sdl_window);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,6 @@ MIR_Available()
|
||||
/* !!! FIXME: try to make a MirConnection here. */
|
||||
available = 1;
|
||||
SDL_MIR_UnloadSymbols();
|
||||
|
||||
}
|
||||
|
||||
return available;
|
||||
|
Loading…
Reference in New Issue
Block a user