src/video/mir/SDL_mirmouse.c
author bschaefer
Sun, 21 Feb 2016 15:19:35 -0800
changeset 10089 25fda20d0173
parent 9998 f67cf37e9cd4
child 10091 9fccd3acad30
permissions -rw-r--r--
Fix API/ABI breakage in Mir 0.13/0.14.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
/*
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
  Simple DirectMedia Layer
9998
f67cf37e9cd4 Updated copyright to 2016
Sam Lantinga <slouken@libsdl.org>
parents: 9807
diff changeset
     3
  Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
  This software is provided 'as-is', without any express or implied
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
  warranty.  In no event will the authors be held liable for any damages
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
  arising from the use of this software.
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9
  Permission is granted to anyone to use this software for any purpose,
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    10
  including commercial applications, and to alter it and redistribute it
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
  freely, subject to the following restrictions:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    12
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    13
  1. The origin of this software must not be misrepresented; you must not
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    14
     claim that you wrote the original software. If you use this software
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    15
     in a product, an acknowledgment in the product documentation would be
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    16
     appreciated but is not required.
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    17
  2. Altered source versions must be plainly marked as such, and must not be
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    18
     misrepresented as being the original software.
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19
  3. This notice may not be removed or altered from any source distribution.
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    20
*/
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    21
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    22
/*
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    23
  Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    24
*/
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    25
8154
ea6b25de67b6 Cleaned up headers and footers on Mir code.
Ryan C. Gordon <icculus@icculus.org>
parents: 8153
diff changeset
    26
#include "../../SDL_internal.h"
ea6b25de67b6 Cleaned up headers and footers on Mir code.
Ryan C. Gordon <icculus@icculus.org>
parents: 8153
diff changeset
    27
ea6b25de67b6 Cleaned up headers and footers on Mir code.
Ryan C. Gordon <icculus@icculus.org>
parents: 8153
diff changeset
    28
#if SDL_VIDEO_DRIVER_MIR
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    29
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    30
#include "../../events/SDL_mouse_c.h"
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    31
#include "../SDL_sysvideo.h"
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    32
#include "SDL_assert.h"
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    33
8159
427e8fdf6f69 Hooked up dynamic loading for Mir.
Ryan C. Gordon <icculus@icculus.org>
parents: 8157
diff changeset
    34
#include "SDL_mirdyn.h"
427e8fdf6f69 Hooked up dynamic loading for Mir.
Ryan C. Gordon <icculus@icculus.org>
parents: 8157
diff changeset
    35
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    36
#include "SDL_mirvideo.h"
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    37
#include "SDL_mirmouse.h"
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    38
#include "SDL_mirwindow.h"
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    39
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    40
typedef struct
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    41
{
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    42
    MirCursorConfiguration* conf;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    43
    MirBufferStream*        stream;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    44
} MIR_Cursor;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    45
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    46
static SDL_Cursor*
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    47
MIR_CreateDefaultCursor()
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    48
{
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    49
    SDL_Cursor* cursor;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    50
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    51
    cursor = SDL_calloc(1, sizeof(SDL_Cursor));
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    52
    if (cursor) {
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    53
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    54
        MIR_Cursor* mir_cursor = SDL_calloc(1, sizeof(MIR_Cursor));
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    55
        if (mir_cursor) {
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    56
            mir_cursor->conf   = NULL;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    57
            mir_cursor->stream = NULL;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    58
            cursor->driverdata = mir_cursor;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    59
        }
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    60
        else {
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    61
            SDL_OutOfMemory();
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    62
        }
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    63
    }
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    64
    else {
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    65
        SDL_OutOfMemory();
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    66
    }
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    67
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    68
    return cursor;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    69
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    70
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    71
static void
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    72
CopySurfacePixelsToMirStream(SDL_Surface* surface, MirBufferStream* stream)
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    73
{
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    74
    char* dest, *pixels;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    75
    int i, s_w, s_h, r_stride, p_stride, bytes_per_pixel, bytes_per_row;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    76
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    77
    MirGraphicsRegion region;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    78
    MIR_mir_buffer_stream_get_graphics_region(stream, &region);
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    79
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    80
    s_w = surface->w;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    81
    s_h = surface->h;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    82
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    83
    bytes_per_pixel = surface->format->BytesPerPixel;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    84
    bytes_per_row   = bytes_per_pixel * s_w;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    85
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    86
    dest = region.vaddr;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    87
    pixels = (char*)surface->pixels;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    88
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    89
    r_stride = region.stride;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    90
    p_stride = surface->pitch;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    91
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    92
    for (i = 0; i < s_h; i++)
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    93
    {
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    94
        memcpy(dest, pixels, bytes_per_row);
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    95
        dest   += r_stride;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    96
        pixels += p_stride;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    97
    }
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    98
}
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
    99
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   100
static SDL_Cursor*
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   101
MIR_CreateCursor(SDL_Surface* surface, int hot_x, int hot_y)
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   102
{
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   103
    MirCursorConfiguration* conf;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   104
    MirBufferStream*        stream;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   105
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   106
    int s_w = surface->w;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   107
    int s_h = surface->h;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   108
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   109
    MIR_Data* mir_data     = (MIR_Data*)SDL_GetVideoDevice()->driverdata;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   110
    SDL_Cursor* cursor     = MIR_CreateDefaultCursor();
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   111
    MIR_Cursor* mir_cursor = (MIR_Cursor*)cursor->driverdata;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   112
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   113
    stream = MIR_mir_connection_create_buffer_stream_sync(mir_data->connection,
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   114
                                                          s_w, s_h, mir_data->pixel_format,
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   115
                                                          mir_buffer_usage_software);
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   116
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   117
    conf = MIR_mir_cursor_configuration_from_buffer_stream(stream, hot_x, hot_y);
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   118
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   119
    CopySurfacePixelsToMirStream(surface, stream);
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   120
    MIR_mir_buffer_stream_swap_buffers_sync(stream);
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   121
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   122
    mir_cursor->conf   = conf;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   123
    mir_cursor->stream = stream;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   124
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   125
    return cursor;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   126
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   127
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   128
static SDL_Cursor*
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   129
MIR_CreateSystemCursor(SDL_SystemCursor id)
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   130
{
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   131
    char const* cursor_name = NULL;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   132
    MirCursorConfiguration* conf;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   133
    SDL_Cursor* cursor = MIR_CreateDefaultCursor();
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   134
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   135
    switch(id) {
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   136
        case SDL_SYSTEM_CURSOR_ARROW:
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   137
            cursor_name = MIR_mir_arrow_cursor_name;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   138
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   139
        case SDL_SYSTEM_CURSOR_IBEAM:
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   140
            cursor_name = MIR_mir_caret_cursor_name;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   141
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   142
        case SDL_SYSTEM_CURSOR_WAIT:
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   143
            cursor_name = MIR_mir_busy_cursor_name;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   144
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   145
        case SDL_SYSTEM_CURSOR_CROSSHAIR:
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   146
            /* Unsupported */
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   147
            cursor_name = MIR_mir_arrow_cursor_name;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   148
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   149
        case SDL_SYSTEM_CURSOR_WAITARROW:
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   150
            cursor_name = MIR_mir_busy_cursor_name;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   151
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   152
        case SDL_SYSTEM_CURSOR_SIZENWSE:
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   153
            cursor_name = MIR_mir_omnidirectional_resize_cursor_name;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   154
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   155
        case SDL_SYSTEM_CURSOR_SIZENESW:
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   156
            cursor_name = MIR_mir_omnidirectional_resize_cursor_name;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   157
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   158
        case SDL_SYSTEM_CURSOR_SIZEWE:
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   159
            cursor_name = MIR_mir_horizontal_resize_cursor_name;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   160
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   161
        case SDL_SYSTEM_CURSOR_SIZENS:
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   162
            cursor_name = MIR_mir_vertical_resize_cursor_name;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   163
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   164
        case SDL_SYSTEM_CURSOR_SIZEALL:
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   165
            cursor_name = MIR_mir_omnidirectional_resize_cursor_name;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   166
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   167
        case SDL_SYSTEM_CURSOR_NO:
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   168
            /* Unsupported */
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   169
            cursor_name = MIR_mir_closed_hand_cursor_name;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   170
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   171
        case SDL_SYSTEM_CURSOR_HAND:
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   172
            cursor_name = MIR_mir_open_hand_cursor_name;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   173
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   174
        default:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   175
            SDL_assert(0);
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   176
            return NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   177
    }
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   178
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   179
    conf = MIR_mir_cursor_configuration_from_name(cursor_name);
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   180
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   181
    cursor->driverdata = conf;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   182
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   183
    return cursor;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   184
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   185
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   186
static void
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   187
MIR_FreeCursor(SDL_Cursor* cursor)
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   188
{
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   189
    if (cursor) {
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   190
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   191
        if (cursor->driverdata) {
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   192
            MIR_Cursor* mir_cursor = (MIR_Cursor*)cursor->driverdata;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   193
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   194
            if (mir_cursor->conf)
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   195
                MIR_mir_cursor_configuration_destroy(mir_cursor->conf);
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   196
            if (mir_cursor->stream)
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   197
                MIR_mir_buffer_stream_release_sync(mir_cursor->stream);
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   198
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   199
            SDL_free(mir_cursor);
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   200
        }
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   201
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   202
        SDL_free(cursor);
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   203
    }
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   204
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   205
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   206
static int
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   207
MIR_ShowCursor(SDL_Cursor* cursor)
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   208
{
10089
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   209
    MIR_Data* mir_data      = (MIR_Data*)SDL_GetVideoDevice()->driverdata;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   210
    MIR_Window* mir_window  = mir_data->current_window;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   211
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   212
    if (cursor && cursor->driverdata) {
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   213
        if (mir_window && MIR_mir_surface_is_valid(mir_window->surface)) {
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   214
            MIR_Cursor* mir_cursor = (MIR_Cursor*)cursor->driverdata;
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   215
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   216
            if (mir_cursor->conf) {
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   217
                MIR_mir_wait_for(MIR_mir_surface_configure_cursor(mir_window->surface, mir_cursor->conf));
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   218
            }
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   219
        }
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   220
    }
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   221
    else if(mir_window && MIR_mir_surface_is_valid(mir_window->surface)) {
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   222
        MIR_mir_wait_for(MIR_mir_surface_configure_cursor(mir_window->surface, NULL));
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   223
    }
25fda20d0173 Fix API/ABI breakage in Mir 0.13/0.14.
bschaefer
parents: 9998
diff changeset
   224
    
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   225
    return 0;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   226
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   227
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   228
static void
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   229
MIR_WarpMouse(SDL_Window* window, int x, int y)
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   230
{
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   231
    SDL_Unsupported();
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   232
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   233
9807
57b448735f48 SDL_WarpMouseGlobal() should return non-void.
Ryan C. Gordon <icculus@icculus.org>
parents: 9619
diff changeset
   234
static int
8815
c6d0a457f3b2 Added an API function to warp the mouse cursor in global screen space: SDL_WarpMouseGlobal()
Sam Lantinga <slouken@libsdl.org>
parents: 8159
diff changeset
   235
MIR_WarpMouseGlobal(int x, int y)
c6d0a457f3b2 Added an API function to warp the mouse cursor in global screen space: SDL_WarpMouseGlobal()
Sam Lantinga <slouken@libsdl.org>
parents: 8159
diff changeset
   236
{
9807
57b448735f48 SDL_WarpMouseGlobal() should return non-void.
Ryan C. Gordon <icculus@icculus.org>
parents: 9619
diff changeset
   237
    return SDL_Unsupported();
8815
c6d0a457f3b2 Added an API function to warp the mouse cursor in global screen space: SDL_WarpMouseGlobal()
Sam Lantinga <slouken@libsdl.org>
parents: 8159
diff changeset
   238
}
c6d0a457f3b2 Added an API function to warp the mouse cursor in global screen space: SDL_WarpMouseGlobal()
Sam Lantinga <slouken@libsdl.org>
parents: 8159
diff changeset
   239
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   240
static int
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   241
MIR_SetRelativeMouseMode(SDL_bool enabled)
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   242
{
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   243
    return SDL_Unsupported();
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   244
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   245
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   246
/* TODO Actually implement the cursor, need to wait for mir support */
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   247
void
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   248
MIR_InitMouse()
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   249
{
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   250
    SDL_Mouse* mouse = SDL_GetMouse();
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   251
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   252
    mouse->CreateCursor         = MIR_CreateCursor;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   253
    mouse->ShowCursor           = MIR_ShowCursor;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   254
    mouse->FreeCursor           = MIR_FreeCursor;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   255
    mouse->WarpMouse            = MIR_WarpMouse;
8815
c6d0a457f3b2 Added an API function to warp the mouse cursor in global screen space: SDL_WarpMouseGlobal()
Sam Lantinga <slouken@libsdl.org>
parents: 8159
diff changeset
   256
    mouse->WarpMouseGlobal      = MIR_WarpMouseGlobal;
8153
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   257
    mouse->CreateSystemCursor   = MIR_CreateSystemCursor;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   258
    mouse->SetRelativeMouseMode = MIR_SetRelativeMouseMode;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   259
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   260
    SDL_SetDefaultCursor(MIR_CreateDefaultCursor());
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   261
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   262
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   263
void
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   264
MIR_FiniMouse()
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   265
{
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   266
    SDL_Mouse* mouse = SDL_GetMouse();
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   267
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   268
    MIR_FreeCursor(mouse->def_cursor);
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   269
    mouse->def_cursor = NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   270
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   271
    mouse->CreateCursor         = NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   272
    mouse->ShowCursor           = NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   273
    mouse->FreeCursor           = NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   274
    mouse->WarpMouse            = NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   275
    mouse->CreateSystemCursor   = NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   276
    mouse->SetRelativeMouseMode = NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   277
}
8154
ea6b25de67b6 Cleaned up headers and footers on Mir code.
Ryan C. Gordon <icculus@icculus.org>
parents: 8153
diff changeset
   278
ea6b25de67b6 Cleaned up headers and footers on Mir code.
Ryan C. Gordon <icculus@icculus.org>
parents: 8153
diff changeset
   279
#endif /* SDL_VIDEO_DRIVER_MIR */
ea6b25de67b6 Cleaned up headers and footers on Mir code.
Ryan C. Gordon <icculus@icculus.org>
parents: 8153
diff changeset
   280
ea6b25de67b6 Cleaned up headers and footers on Mir code.
Ryan C. Gordon <icculus@icculus.org>
parents: 8153
diff changeset
   281
/* vi: set ts=4 sw=4 expandtab: */
ea6b25de67b6 Cleaned up headers and footers on Mir code.
Ryan C. Gordon <icculus@icculus.org>
parents: 8153
diff changeset
   282