comparison src/video/qtopia/SDL_QPEApp.cc @ 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 376665398b25
children 4da1ee79c9af
comparison
equal deleted inserted replaced
1661:281d3f4870e5 1662:782fd950bd46
31 31
32 /* Flag to tell whether or not the Be application is active or not */ 32 /* Flag to tell whether or not the Be application is active or not */
33 int SDL_QPEAppActive = 0; 33 int SDL_QPEAppActive = 0;
34 static QPEApplication *app; 34 static QPEApplication *app;
35 35
36 int SDL_InitQPEApp() { 36 int
37 if(SDL_QPEAppActive <= 0) { 37 SDL_InitQPEApp ()
38 if(!qApp) { 38 {
39 int argc = 1; 39 if (SDL_QPEAppActive <= 0) {
40 char *argv[] = { { "SDLApp" } }; 40 if (!qApp) {
41 app = new QPEApplication(argc, argv); 41 int argc = 1;
42 QWidget dummy; 42 char *argv[] = { {"SDLApp"} };
43 app->showMainWidget(&dummy); 43 app = new QPEApplication (argc, argv);
44 } else { 44 QWidget dummy;
45 app = (QPEApplication*)qApp; 45 app->showMainWidget (&dummy);
46 } else {
47 app = (QPEApplication *) qApp;
48 }
49 SDL_QPEAppActive++;
46 } 50 }
47 SDL_QPEAppActive++; 51 return 0;
48 }
49 return 0;
50 } 52 }
51 53
52 /* Quit the QPE Application, if there's nothing left to do */ 54 /* Quit the QPE Application, if there's nothing left to do */
53 void SDL_QuitQPEApp(void) 55 void
56 SDL_QuitQPEApp (void)
54 { 57 {
55 /* Decrement the application reference count */ 58 /* Decrement the application reference count */
56 SDL_QPEAppActive--; 59 SDL_QPEAppActive--;
57 /* If the reference count reached zero, clean up the app */ 60 /* If the reference count reached zero, clean up the app */
58 if ( SDL_QPEAppActive == 0 && app) { 61 if (SDL_QPEAppActive == 0 && app) {
59 delete app; 62 delete app;
60 app = 0; 63 app = 0;
61 qApp = 0; 64 qApp = 0;
62 } 65 }
63 } 66 }
67
68 /* vi: set ts=4 sw=4 expandtab: */