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