src/video/wayland/SDL_waylandmouse.c
changeset 8104 2e4f1bd21196
parent 8062 4fc5f66d63cc
child 8116 f7c2f71251e5
     1.1 --- a/src/video/wayland/SDL_waylandmouse.c	Wed Jan 08 14:53:08 2014 -0500
     1.2 +++ b/src/video/wayland/SDL_waylandmouse.c	Thu Jan 09 13:56:21 2014 -0300
     1.3 @@ -31,14 +31,17 @@
     1.4  #include <stdlib.h>
     1.5  #include <limits.h>
     1.6  
     1.7 +#include "../../SDL_internal.h"
     1.8  #include "../SDL_sysvideo.h"
     1.9  
    1.10 -#include "SDL_config.h"
    1.11  #include "SDL_mouse.h"
    1.12  #include "../../events/SDL_mouse_c.h"
    1.13  #include "SDL_waylandvideo.h"
    1.14  #include "SDL_waylandevents_c.h"
    1.15  
    1.16 +#include "SDL_waylanddyn.h"
    1.17 +#include "wayland-cursor.h"
    1.18 +
    1.19  #include "SDL_assert.h"
    1.20  
    1.21  #if SDL_VIDEO_DRIVER_WAYLAND
    1.22 @@ -210,7 +213,7 @@
    1.23          data->buffer = NULL;
    1.24          data->surface = wl_compositor_create_surface(d->compositor);
    1.25          wl_surface_attach(data->surface,
    1.26 -                          wl_cursor_image_get_buffer(wlcursor->images[0]),
    1.27 +                          WAYLAND_wl_cursor_image_get_buffer(wlcursor->images[0]),
    1.28                            0,
    1.29                            0);
    1.30          wl_surface_damage(data->surface,
    1.31 @@ -236,7 +239,7 @@
    1.32      SDL_VideoData *data = device->driverdata;
    1.33  
    1.34      return CreateCursorFromWlCursor (data,
    1.35 -                                     wl_cursor_theme_get_cursor(data->cursor_theme,
    1.36 +                                     WAYLAND_wl_cursor_theme_get_cursor(data->cursor_theme,
    1.37                                                                  "left_ptr"));
    1.38  }
    1.39  
    1.40 @@ -254,40 +257,40 @@
    1.41          SDL_assert(0);
    1.42          return NULL;
    1.43      case SDL_SYSTEM_CURSOR_ARROW:
    1.44 -        cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "left_ptr");
    1.45 +        cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "left_ptr");
    1.46          break;
    1.47      case SDL_SYSTEM_CURSOR_IBEAM:
    1.48 -        cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "xterm");
    1.49 +        cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "xterm");
    1.50          break;
    1.51      case SDL_SYSTEM_CURSOR_WAIT:
    1.52 -        cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "wait");
    1.53 +        cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "wait");
    1.54          break;
    1.55      case SDL_SYSTEM_CURSOR_CROSSHAIR:
    1.56 -        cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
    1.57 +        cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
    1.58          break;
    1.59      case SDL_SYSTEM_CURSOR_WAITARROW:
    1.60 -        cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "wait");
    1.61 +        cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "wait");
    1.62          break;
    1.63      case SDL_SYSTEM_CURSOR_SIZENWSE:
    1.64 -        cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
    1.65 +        cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
    1.66          break;
    1.67      case SDL_SYSTEM_CURSOR_SIZENESW:
    1.68 -        cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
    1.69 +        cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
    1.70          break;
    1.71      case SDL_SYSTEM_CURSOR_SIZEWE:
    1.72 -        cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
    1.73 +        cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
    1.74          break;
    1.75      case SDL_SYSTEM_CURSOR_SIZENS:
    1.76 -        cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
    1.77 +        cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
    1.78          break;
    1.79      case SDL_SYSTEM_CURSOR_SIZEALL:
    1.80 -        cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
    1.81 +        cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
    1.82          break;
    1.83      case SDL_SYSTEM_CURSOR_NO:
    1.84 -        cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "xterm");
    1.85 +        cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "xterm");
    1.86          break;
    1.87      case SDL_SYSTEM_CURSOR_HAND:
    1.88 -        cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
    1.89 +        cursor = WAYLAND_wl_cursor_theme_get_cursor(d->cursor_theme, "hand1");
    1.90          break;
    1.91      }
    1.92