comparison 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
comparison
equal deleted inserted replaced
1894:c69cee13dd76 1895:c121d94672cb
28 #include "../../events/SDL_events_c.h" 28 #include "../../events/SDL_events_c.h"
29 29
30 #include "SDL_nxmouse_c.h" 30 #include "SDL_nxmouse_c.h"
31 31
32 // The implementation dependent data for the window manager cursor 32 // The implementation dependent data for the window manager cursor
33 struct WMcursor { 33 struct WMcursor
34 int unused ; 34 {
35 } ; 35 int unused;
36 };
36 37
37 WMcursor * NX_CreateWMCursor (_THIS, 38 WMcursor *
38 Uint8 * data, Uint8 * mask, int w, int h, int hot_x, int hot_y) 39 NX_CreateWMCursor(_THIS,
40 Uint8 * data, Uint8 * mask, int w, int h, int hot_x,
41 int hot_y)
39 { 42 {
40 WMcursor * cursor ; 43 WMcursor *cursor;
41 44
42 Dprintf ("enter NX_CreateWMCursor\n") ; 45 Dprintf("enter NX_CreateWMCursor\n");
43 46
44 cursor = (WMcursor *) SDL_malloc (sizeof (WMcursor)) ; 47 cursor = (WMcursor *) SDL_malloc(sizeof(WMcursor));
45 if (cursor == NULL) { 48 if (cursor == NULL) {
46 SDL_OutOfMemory () ; 49 SDL_OutOfMemory();
47 return NULL ; 50 return NULL;
48 } 51 }
49 52
50 Dprintf ("leave NX_CreateWMCursor\n") ; 53 Dprintf("leave NX_CreateWMCursor\n");
51 return cursor ; 54 return cursor;
52 } 55 }
53 56
54 void NX_FreeWMCursor (_THIS, WMcursor * cursor) 57 void
58 NX_FreeWMCursor(_THIS, WMcursor * cursor)
55 { 59 {
56 Dprintf ("NX_FreeWMCursor\n") ; 60 Dprintf("NX_FreeWMCursor\n");
57 SDL_free (cursor) ; 61 SDL_free(cursor);
58 return ; 62 return;
59 } 63 }
60 64
61 void NX_WarpWMCursor(_THIS, Uint16 x, Uint16 y) 65 void
66 NX_WarpWMCursor(_THIS, Uint16 x, Uint16 y)
62 { 67 {
63 GR_WINDOW_INFO info ; 68 GR_WINDOW_INFO info;
64 69
65 Dprintf ("enter NX_WarpWMCursor\n") ; 70 Dprintf("enter NX_WarpWMCursor\n");
66 SDL_Lock_EventThread () ; 71 SDL_Lock_EventThread();
67
68 GrGetWindowInfo (SDL_Window, & info) ;
69 GrMoveCursor (info.x + x, info.y + y) ;
70 72
71 SDL_Unlock_EventThread () ; 73 GrGetWindowInfo(SDL_Window, &info);
72 Dprintf ("leave NX_WarpWMCursor\n") ; 74 GrMoveCursor(info.x + x, info.y + y);
75
76 SDL_Unlock_EventThread();
77 Dprintf("leave NX_WarpWMCursor\n");
73 } 78 }
74 79
75 int NX_ShowWMCursor (_THIS, WMcursor * cursor) 80 int
81 NX_ShowWMCursor(_THIS, WMcursor * cursor)
76 { 82 {
77 Dprintf ("NX_ShowWMCursor\n") ; 83 Dprintf("NX_ShowWMCursor\n");
78 return 1 ; 84 return 1;
79 } 85 }
86
87 /* vi: set ts=4 sw=4 expandtab: */