Mercurial > sdl-ios-xcode
comparison src/video/nanox/SDL_nxwm.c @ 1662:782fd950bd46 SDL-1.3
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
WARNING: None of the video drivers have been updated for the new API yet! The API is still under design and very fluid.
The code is now run through a consistent indent format:
indent -i4 -nut -nsc -br -ce
The headers are being converted to automatically generate doxygen documentation.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 28 May 2006 13:04:16 +0000 |
parents | d910939febfa |
children | 4da1ee79c9af |
comparison
equal
deleted
inserted
replaced
1661:281d3f4870e5 | 1662:782fd950bd46 |
---|---|
28 #include "SDL_syswm.h" | 28 #include "SDL_syswm.h" |
29 #include "../../events/SDL_events_c.h" | 29 #include "../../events/SDL_events_c.h" |
30 | 30 |
31 #include "SDL_nxwm_c.h" | 31 #include "SDL_nxwm_c.h" |
32 | 32 |
33 void NX_SetCaption (_THIS, const char * title, const char * icon) | 33 void |
34 NX_SetCaption (_THIS, const char *title, const char *icon) | |
34 { | 35 { |
35 Dprintf ("enter NX_SetCaption\n") ; | 36 Dprintf ("enter NX_SetCaption\n"); |
36 | 37 |
37 // Lock the event thread, in multi-threading environments | 38 // Lock the event thread, in multi-threading environments |
38 SDL_Lock_EventThread () ; | 39 SDL_Lock_EventThread (); |
39 | 40 |
40 if (SDL_Window) | 41 if (SDL_Window) |
41 GrSetWindowTitle (SDL_Window, title) ; | 42 GrSetWindowTitle (SDL_Window, title); |
42 | 43 |
43 SDL_Unlock_EventThread () ; | 44 SDL_Unlock_EventThread (); |
44 Dprintf ("leave NX_SetCaption\n") ; | 45 Dprintf ("leave NX_SetCaption\n"); |
45 } | 46 } |
46 | 47 |
47 int NX_GetWMInfo (_THIS, SDL_SysWMinfo * info) | 48 int |
49 NX_GetWMInfo (_THIS, SDL_SysWMinfo * info) | |
48 { | 50 { |
49 Dprintf ("enter NX_GetWMInfo\n") ; | 51 Dprintf ("enter NX_GetWMInfo\n"); |
50 | 52 |
51 if (info -> version.major <= SDL_MAJOR_VERSION) { | 53 if (info->version.major <= SDL_MAJOR_VERSION) { |
52 info -> window = SDL_Window ; | 54 info->window = SDL_Window; |
53 return 1 ; | 55 return 1; |
54 } else { | 56 } else { |
55 SDL_SetError("Application not compiled with SDL %d.%d\n", | 57 SDL_SetError ("Application not compiled with SDL %d.%d\n", |
56 SDL_MAJOR_VERSION, SDL_MINOR_VERSION) ; | 58 SDL_MAJOR_VERSION, SDL_MINOR_VERSION); |
57 return -1 ; | 59 return -1; |
58 } | 60 } |
59 | 61 |
60 Dprintf ("leave NX_GetWMInfo\n") ; | 62 Dprintf ("leave NX_GetWMInfo\n"); |
61 } | 63 } |
64 | |
65 /* vi: set ts=4 sw=4 expandtab: */ |