src/video/mir/SDL_mirmouse.c
author Ryan C. Gordon <icculus@icculus.org>
Sun, 02 Feb 2014 23:54:10 -0500
changeset 8154 ea6b25de67b6
parent 8153 3e43c73ac79b
child 8157 f5d262613ed2
permissions -rw-r--r--
Cleaned up headers and footers on Mir code.
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
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
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 "SDL_mirmouse.h"
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    31
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    32
#include "../../events/SDL_mouse_c.h"
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    33
#include "SDL_assert.h"
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    34
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    35
static SDL_Cursor*
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    36
MIR_CreateDefaultCursor()
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    37
{
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    38
    SDL_Cursor* cursor;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    39
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    40
    cursor = SDL_calloc(1, sizeof(SDL_Cursor));
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    41
    if (cursor) {
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    42
    }
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    43
    else {
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    44
        SDL_OutOfMemory();
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    45
    }
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    46
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    47
    return cursor;
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
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    50
static SDL_Cursor*
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    51
MIR_CreateCursor(SDL_Surface* sruface, int hot_x, int hot_y)
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    52
{
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    53
    return MIR_CreateDefaultCursor();
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    54
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    55
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    56
static SDL_Cursor*
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    57
MIR_CreateSystemCursor(SDL_SystemCursor id)
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    58
{
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    59
    switch(id) {
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    60
        case SDL_SYSTEM_CURSOR_ARROW:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    61
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    62
        case SDL_SYSTEM_CURSOR_IBEAM:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    63
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    64
        case SDL_SYSTEM_CURSOR_WAIT:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    65
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    66
        case SDL_SYSTEM_CURSOR_CROSSHAIR:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    67
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    68
        case SDL_SYSTEM_CURSOR_WAITARROW:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    69
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    70
        case SDL_SYSTEM_CURSOR_SIZENWSE:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    71
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    72
        case SDL_SYSTEM_CURSOR_SIZENESW:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    73
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    74
        case SDL_SYSTEM_CURSOR_SIZEWE:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    75
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    76
        case SDL_SYSTEM_CURSOR_SIZENS:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    77
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    78
        case SDL_SYSTEM_CURSOR_SIZEALL:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    79
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    80
        case SDL_SYSTEM_CURSOR_NO:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    81
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    82
        case SDL_SYSTEM_CURSOR_HAND:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    83
            break;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    84
        default:
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    85
            SDL_assert(0);
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    86
            return NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    87
    }
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    88
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    89
    return MIR_CreateDefaultCursor();
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    90
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    91
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    92
static void
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    93
MIR_FreeCursor(SDL_Cursor* cursor)
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    94
{
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    95
    if (cursor)
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    96
      SDL_free(cursor);
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    97
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    98
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    99
static int
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   100
MIR_ShowCursor(SDL_Cursor* cursor)
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   101
{
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   102
    return 0;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   103
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   104
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   105
static void
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   106
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
   107
{
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   108
    SDL_Unsupported();
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   109
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   110
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   111
static int
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   112
MIR_SetRelativeMouseMode(SDL_bool enabled)
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   113
{
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   114
    return SDL_Unsupported();
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   115
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   116
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   117
/* 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
   118
void
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   119
MIR_InitMouse()
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   120
{
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   121
    SDL_Mouse* mouse = SDL_GetMouse();
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   122
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   123
    mouse->CreateCursor         = MIR_CreateCursor;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   124
    mouse->ShowCursor           = MIR_ShowCursor;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   125
    mouse->FreeCursor           = MIR_FreeCursor;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   126
    mouse->WarpMouse            = MIR_WarpMouse;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   127
    mouse->CreateSystemCursor   = MIR_CreateSystemCursor;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   128
    mouse->SetRelativeMouseMode = MIR_SetRelativeMouseMode;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   129
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   130
    SDL_SetDefaultCursor(MIR_CreateDefaultCursor());
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   131
}
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   132
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   133
void
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   134
MIR_FiniMouse()
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   135
{
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   136
    SDL_Mouse* mouse = SDL_GetMouse();
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   137
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   138
    MIR_FreeCursor(mouse->def_cursor);
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   139
    mouse->def_cursor = NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   140
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   141
    mouse->CreateCursor         = NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   142
    mouse->ShowCursor           = NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   143
    mouse->FreeCursor           = NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   144
    mouse->WarpMouse            = NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   145
    mouse->CreateSystemCursor   = NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   146
    mouse->SetRelativeMouseMode = NULL;
3e43c73ac79b Added Mir video target (thanks, Brandon!).
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   147
}
8154
ea6b25de67b6 Cleaned up headers and footers on Mir code.
Ryan C. Gordon <icculus@icculus.org>
parents: 8153
diff changeset
   148
ea6b25de67b6 Cleaned up headers and footers on Mir code.
Ryan C. Gordon <icculus@icculus.org>
parents: 8153
diff changeset
   149
#endif /* SDL_VIDEO_DRIVER_MIR */
ea6b25de67b6 Cleaned up headers and footers on Mir code.
Ryan C. Gordon <icculus@icculus.org>
parents: 8153
diff changeset
   150
ea6b25de67b6 Cleaned up headers and footers on Mir code.
Ryan C. Gordon <icculus@icculus.org>
parents: 8153
diff changeset
   151
/* 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
   152