src/video/nanox/SDL_nxmouse.c
author Sam Lantinga <slouken@libsdl.org>
Sun, 07 Dec 2008 22:37:40 +0000
changeset 2853 6258fa7cd300
parent 1895 c121d94672cb
child 2859 99210400e8b9
permissions -rw-r--r--
Fixed picking blit function when RLE fails
slouken@30
     1
/*
slouken@30
     2
    SDL - Simple DirectMedia Layer
slouken@769
     3
    Copyright (C) 1997-2004 Sam Lantinga
slouken@30
     4
    Copyright (C) 2001  Hsieh-Fu Tsai
slouken@30
     5
slouken@30
     6
    This library is free software; you can redistribute it and/or
slouken@30
     7
    modify it under the terms of the GNU Library General Public
slouken@30
     8
    License as published by the Free Software Foundation; either
slouken@30
     9
    version 2 of the License, or (at your option) any later version.
slouken@30
    10
slouken@30
    11
    This library is distributed in the hope that it will be useful,
slouken@30
    12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@30
    13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@30
    14
    Library General Public License for more details.
slouken@30
    15
slouken@30
    16
    You should have received a copy of the GNU Library General Public
slouken@30
    17
    License along with this library; if not, write to the Free
slouken@30
    18
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
slouken@30
    19
slouken@30
    20
    Sam Lantinga
slouken@252
    21
    slouken@libsdl.org
slouken@30
    22
    
slouken@30
    23
    Hsieh-Fu Tsai
slouken@30
    24
    clare@setabox.com
slouken@30
    25
*/
slouken@1402
    26
#include "SDL_config.h"
slouken@30
    27
slouken@1361
    28
#include "../../events/SDL_events_c.h"
slouken@30
    29
slouken@30
    30
#include "SDL_nxmouse_c.h"
slouken@30
    31
slouken@30
    32
// The implementation dependent data for the window manager cursor
slouken@1895
    33
struct WMcursor
slouken@1895
    34
{
slouken@1895
    35
    int unused;
slouken@1895
    36
};
slouken@30
    37
slouken@1895
    38
WMcursor *
slouken@1895
    39
NX_CreateWMCursor(_THIS,
slouken@1895
    40
                  Uint8 * data, Uint8 * mask, int w, int h, int hot_x,
slouken@1895
    41
                  int hot_y)
slouken@30
    42
{
slouken@1895
    43
    WMcursor *cursor;
slouken@30
    44
slouken@1895
    45
    Dprintf("enter NX_CreateWMCursor\n");
slouken@30
    46
slouken@1895
    47
    cursor = (WMcursor *) SDL_malloc(sizeof(WMcursor));
slouken@30
    48
    if (cursor == NULL) {
slouken@1895
    49
        SDL_OutOfMemory();
slouken@1895
    50
        return NULL;
slouken@30
    51
    }
slouken@30
    52
slouken@1895
    53
    Dprintf("leave NX_CreateWMCursor\n");
slouken@1895
    54
    return cursor;
slouken@30
    55
}
slouken@30
    56
slouken@1895
    57
void
slouken@1895
    58
NX_FreeWMCursor(_THIS, WMcursor * cursor)
slouken@30
    59
{
slouken@1895
    60
    Dprintf("NX_FreeWMCursor\n");
slouken@1895
    61
    SDL_free(cursor);
slouken@1895
    62
    return;
slouken@30
    63
}
slouken@30
    64
slouken@1895
    65
void
slouken@1895
    66
NX_WarpWMCursor(_THIS, Uint16 x, Uint16 y)
slouken@30
    67
{
slouken@1895
    68
    GR_WINDOW_INFO info;
slouken@30
    69
slouken@1895
    70
    Dprintf("enter NX_WarpWMCursor\n");
slouken@1895
    71
    SDL_Lock_EventThread();
slouken@30
    72
slouken@1895
    73
    GrGetWindowInfo(SDL_Window, &info);
slouken@1895
    74
    GrMoveCursor(info.x + x, info.y + y);
slouken@1895
    75
slouken@1895
    76
    SDL_Unlock_EventThread();
slouken@1895
    77
    Dprintf("leave NX_WarpWMCursor\n");
slouken@30
    78
}
slouken@30
    79
slouken@1895
    80
int
slouken@1895
    81
NX_ShowWMCursor(_THIS, WMcursor * cursor)
slouken@30
    82
{
slouken@1895
    83
    Dprintf("NX_ShowWMCursor\n");
slouken@1895
    84
    return 1;
slouken@30
    85
}
slouken@1895
    86
slouken@1895
    87
/* vi: set ts=4 sw=4 expandtab: */