]>
Commit | Line | Data |
---|---|---|
ffecfa5a | 1 | ///////////////////////////////////////////////////////////////////////////// |
e2731512 | 2 | // Name: src/palmos/main.cpp |
ffecfa5a | 3 | // Purpose: wxEnter for Palm OS |
e2731512 | 4 | // Author: William Osborne - minimal working wxPalmOS port |
ffecfa5a JS |
5 | // Modified by: |
6 | // Created: 10/07/04 | |
e2731512 | 7 | // RCS-ID: $Id$ |
ffecfa5a JS |
8 | // Copyright: (c) William Osborne |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | // ============================================================================ | |
13 | // declarations | |
14 | // ============================================================================ | |
15 | ||
16 | // ---------------------------------------------------------------------------- | |
17 | // headers | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
ffecfa5a JS |
20 | // For compilers that support precompilation, includes "wx.h". |
21 | #include "wx/wxprec.h" | |
22 | ||
23 | #ifdef __BORLANDC__ | |
24 | #pragma hdrstop | |
25 | #endif | |
26 | ||
d5da0ce7 WS |
27 | #ifndef WX_PRECOMP |
28 | #include "wx/event.h" | |
670f9935 | 29 | #include "wx/app.h" |
d5da0ce7 WS |
30 | #endif //WX_PRECOMP |
31 | ||
ffecfa5a JS |
32 | #include "wx/cmdline.h" |
33 | ||
34 | #if wxUSE_GUI | |
35 | ||
36 | // ============================================================================ | |
37 | // implementation: various entry points | |
38 | // ============================================================================ | |
39 | ||
40 | // ---------------------------------------------------------------------------- | |
41 | // Platform-specific wxEntry | |
42 | // ---------------------------------------------------------------------------- | |
43 | ||
44 | int wxEntry() | |
45 | { | |
e2731512 | 46 | /* There is no command line in PalmOS. For now generate a fake arument |
ffecfa5a JS |
47 | * list. Later this may be changed to reflect the application launch code |
48 | */ | |
49 | wxArrayString args; | |
50 | int argc = args.GetCount(); | |
ffecfa5a JS |
51 | // +1 here for the terminating NULL |
52 | wxChar **argv = new wxChar *[argc + 1]; | |
53 | for ( int i = 0; i < argc; i++ ) | |
54 | { | |
e2fc40b4 VZ |
55 | //argv[i] = wxStrdup(args[i]); |
56 | argv[i] = wxStrdup(wxConvLibc.cMB2WX(args[i])); | |
ffecfa5a JS |
57 | } |
58 | ||
59 | // argv[] must be NULL-terminated | |
60 | argv[argc] = NULL; | |
e2731512 | 61 | |
ffecfa5a JS |
62 | return wxEntry(argc, argv); |
63 | } | |
64 | ||
65 | #endif // wxUSE_GUI |