acme
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages Concepts
_app_impl1.h
1#include "_app_common_impl.h"
2
3//#error "not two use it"
4//#ifdef CORE_LEVEL
5//extern "C"
6//CLASS_DECL_ACME int_bool defer_core_init();
7//extern "C"
8//CLASS_DECL_ACME int_bool defer_core_term();
9//
10//#endif
11
12#ifdef ACID
13
14::platform::application * get_acid_app();
15
16#endif
17
18#ifdef LINUX
19
20
21const char * br_init_get_symbol();
22
23void apex_application_run(const ::scoped_string & scopedstrAppName, const ::scoped_string & scopedstrProgName);
24
25
26
27#include <sys/types.h>
28
29#include <sys/stat.h>
30
31#include <fcntl.h>
32
33extern const char * g_psz_br_init_symbol_app;
34
35#ifndef LINUX_COMMAND_LINE
36
37#define GET_COMMAND_LINE(ARGC, ARGV) linux_get_command_line(ARGC, ARGV)
38
39#endif
40
41//class string;
42
43char * linux_get_command_line(int argc, char ** argv); // malloc/strdup equivalent return
44
45#endif // LINUX
46
47
48#ifdef UNIVERSAL_WINDOWS
49
50//#include "acme/_.h"
51//
52//#undef CoreApplication
53//
54
55
56
57[MTAThread]
58int main(Array < String ^ > ^ refstra)
59{
60
61 class acme_acme acme;
62
63 ap(acme_main_data) pmaindata = __allocate acme_main_data(refstra);
64
65#ifdef MAIN_STRING
66
67 pmaindata->m_strCommandLine = MAIN_STRING;
68
69#endif
70
71 return (int)acme_acme(pmaindata);
72
73}
74
75#else
76
77
78
79
80int impl_main(int argc, char * argv[]);
81
82int main(int argc, char * argv[])
83{
84
85 int iResult = impl_main(argc, argv);
86
87 return iResult;
88
89}
90
91int acme_main(int argc, char * argv[], char * pszCommandLine, bool bConsole, bool bDraw2d);
92
93#ifdef NO_DRAW2D
94
95#undef USE_DRAW2D
96
97#endif
98
99
100#include "_main_impl.h"
101
102
103#ifdef WINDOWS
104
105int windows_main(HINSTANCE hinstance, HINSTANCE hPrevInstance, char * pCmdLine, int nCmdShow);
106
107int WINAPI _tWinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance, char * pCmdLine, int nCmdShow)
108{
109
110 return windows_main(hinstance, hPrevInstance, pCmdLine, nCmdShow);
111
112}
113//{
114//
115//#ifdef MAIN_DEFERRED_RUN
116//
117// __main_deferred_run = MAIN_DEFERRED_RUN;
118//
119//#endif
120//
121// if(__main_deferred_run)
122// {
123//
124// int iExitCode = (*__main_deferred_run)(hinstance, hPrevInstance, pCmdLine, nCmdShow);
125//
126//
127// if(iExitCode >= 0)
128// {
129//
130// return iExitCode;
131//
132// }
133//
134// }
135//
136//#ifdef CORE_LEVEL
137// defer_core_init();
138//#endif
139//
140// int iRet = -1;
141//
142// {
143//
144// ::pointer<class acme_acme> pacme;
145//
146// ::pointer<class acme_main_data> pmaindata;
147//
148// {
149//
150// //KEEP(thread_flag_prevent_create_thread);
151//
152//
153// pacme = __allocate class acme_acme ();
154//
155// pmaindata = __allocate acme_main_data(hinstance, hPrevInstance, pCmdLine, nCmdShow);
156//
157//#ifdef MAIN_RUNNER0
158//
159// pmaindata->m_mainrunnera[0] = MAIN_RUNNER0;
160//
161//#endif
162//
163//#ifdef APPID
164//
165// pmaindata->m_XstrAppId = APPID;
166//
167//#endif
168//
169// }
170//
171//#ifdef ACID
172//
173// return acme_acme(pmaindata, &get_acid_app);
174//
175//#else
176//
177// iRet = acme_acme(pmaindata);
178//
179//#endif
180// }
181//
182//#ifdef CORE_LEVEL
183// defer_core_term();
184//#endif
185//
186// return iRet;
187
188//}
189
190
191
192#endif
193
194
195#endif
196
197
198
199#ifdef WINDOWS
200
201
202
203#include "openssl/applink.c"
204
205
206
207#endif
208
209
210//#define APP_PRELUDE_LEVEL(prefix) \
211//extern "C" \
212//::platform::application * prefix##_get_new_app(::particle * pparticle); \
213//prelude acmeprelude(&prefix##_get_new_app);
214//
215//
216//#define LIBRARY_PRELUDE(prefix) \
217//extern "C" \
218//::acme::library * prefix##_get_new_library(::particle * pparticle); \
219//prelude acmeprelude(&prefix##_get_new_library);
220
221
222#if defined(LINUX) && !defined(LINUX_COMMAND_LINE)
223
224char * linux_get_command_line(int argc, char ** argv)
225{
226
227 string str = string(argv[0]) + (" : app=" MAINAPPID);
228
229 return strdup(str);
230
231}
232
233#endif
234
Definition aaa_acme.h:15
Definition application.h:63
#include "aura/graphics/image/context.h"
Definition aaaa__defer.h:32