Mercurial > sdl-ios-xcode
diff src/video/nanox/SDL_nxmouse.c @ 1895:c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 10 Jul 2006 21:04:37 +0000 |
parents | d910939febfa |
children | 99210400e8b9 |
line wrap: on
line diff
--- a/src/video/nanox/SDL_nxmouse.c Thu Jul 06 18:01:37 2006 +0000 +++ b/src/video/nanox/SDL_nxmouse.c Mon Jul 10 21:04:37 2006 +0000 @@ -30,50 +30,58 @@ #include "SDL_nxmouse_c.h" // The implementation dependent data for the window manager cursor -struct WMcursor { - int unused ; -} ; - -WMcursor * NX_CreateWMCursor (_THIS, - Uint8 * data, Uint8 * mask, int w, int h, int hot_x, int hot_y) +struct WMcursor { - WMcursor * cursor ; - - Dprintf ("enter NX_CreateWMCursor\n") ; + int unused; +}; - cursor = (WMcursor *) SDL_malloc (sizeof (WMcursor)) ; +WMcursor * +NX_CreateWMCursor(_THIS, + Uint8 * data, Uint8 * mask, int w, int h, int hot_x, + int hot_y) +{ + WMcursor *cursor; + + Dprintf("enter NX_CreateWMCursor\n"); + + cursor = (WMcursor *) SDL_malloc(sizeof(WMcursor)); if (cursor == NULL) { - SDL_OutOfMemory () ; - return NULL ; + SDL_OutOfMemory(); + return NULL; } - Dprintf ("leave NX_CreateWMCursor\n") ; - return cursor ; + Dprintf("leave NX_CreateWMCursor\n"); + return cursor; } -void NX_FreeWMCursor (_THIS, WMcursor * cursor) +void +NX_FreeWMCursor(_THIS, WMcursor * cursor) { - Dprintf ("NX_FreeWMCursor\n") ; - SDL_free (cursor) ; - return ; + Dprintf("NX_FreeWMCursor\n"); + SDL_free(cursor); + return; } -void NX_WarpWMCursor(_THIS, Uint16 x, Uint16 y) +void +NX_WarpWMCursor(_THIS, Uint16 x, Uint16 y) { - GR_WINDOW_INFO info ; + GR_WINDOW_INFO info; - Dprintf ("enter NX_WarpWMCursor\n") ; - SDL_Lock_EventThread () ; - - GrGetWindowInfo (SDL_Window, & info) ; - GrMoveCursor (info.x + x, info.y + y) ; + Dprintf("enter NX_WarpWMCursor\n"); + SDL_Lock_EventThread(); - SDL_Unlock_EventThread () ; - Dprintf ("leave NX_WarpWMCursor\n") ; + GrGetWindowInfo(SDL_Window, &info); + GrMoveCursor(info.x + x, info.y + y); + + SDL_Unlock_EventThread(); + Dprintf("leave NX_WarpWMCursor\n"); } -int NX_ShowWMCursor (_THIS, WMcursor * cursor) +int +NX_ShowWMCursor(_THIS, WMcursor * cursor) { - Dprintf ("NX_ShowWMCursor\n") ; - return 1 ; + Dprintf("NX_ShowWMCursor\n"); + return 1; } + +/* vi: set ts=4 sw=4 expandtab: */