comparison src/main/qtopia/SDL_qtopia_main.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 623b453a3219
children 4da1ee79c9af
comparison
equal deleted inserted replaced
1661:281d3f4870e5 1662:782fd950bd46
14 14
15 // Workaround for OPIE to remove taskbar icon. Also fixes 15 // Workaround for OPIE to remove taskbar icon. Also fixes
16 // some issues in Qtopia where there are left-over qcop files in /tmp/. 16 // some issues in Qtopia where there are left-over qcop files in /tmp/.
17 // I'm guessing this will also clean up the taskbar in the Sharp version 17 // I'm guessing this will also clean up the taskbar in the Sharp version
18 // of Qtopia. 18 // of Qtopia.
19 static inline void cleanupQCop() { 19 static inline void
20 QString appname(qApp->argv()[0]); 20 cleanupQCop ()
21 int slash = appname.findRev("/"); 21 {
22 if(slash != -1) { appname = appname.mid(slash+1); } 22 QString appname (qApp->argv ()[0]);
23 QString cmd = QPEApplication::qpeDir() + "bin/qcop QPE/System 'closing(QString)' '"+appname+"'"; 23 int slash = appname.findRev ("/");
24 system(cmd.latin1()); 24 if (slash != -1) {
25 cmd = "/tmp/qcop-msg-"+appname; 25 appname = appname.mid (slash + 1);
26 unlink(cmd.latin1()); 26 }
27 QString cmd =
28 QPEApplication::qpeDir () +
29 "bin/qcop QPE/System 'closing(QString)' '" + appname + "'";
30 system (cmd.latin1 ());
31 cmd = "/tmp/qcop-msg-" + appname;
32 unlink (cmd.latin1 ());
27 } 33 }
28 34
29 static QPEApplication *app; 35 static QPEApplication *app;
30 #endif 36 #endif
31 37
32 extern int SDL_main(int argc, char *argv[]); 38 extern int SDL_main (int argc, char *argv[]);
33 39
34 int main(int argc, char *argv[]) 40 int
41 main (int argc, char *argv[])
35 { 42 {
36 #ifdef QWS 43 #ifdef QWS
37 // This initializes the Qtopia application. It needs to be done here 44 // This initializes the Qtopia application. It needs to be done here
38 // because it parses command line options. 45 // because it parses command line options.
39 app = new QPEApplication(argc, argv); 46 app = new QPEApplication (argc, argv);
40 QWidget dummy; 47 QWidget dummy;
41 app->showMainWidget(&dummy); 48 app->showMainWidget (&dummy);
42 atexit(cleanupQCop); 49 atexit (cleanupQCop);
43 #endif 50 #endif
44 // Exit here because if return is used, the application 51 // Exit here because if return is used, the application
45 // doesn't seem to quit correctly. 52 // doesn't seem to quit correctly.
46 exit(SDL_main(argc, argv)); 53 exit (SDL_main (argc, argv));
47 } 54 }
55
56 /* vi: set ts=4 sw=4 expandtab: */