Mercurial > sdl-ios-xcode
annotate include/SDL_main.h @ 3254:1a8c9a6752e5
Upgraded solution to Visual Studio 2008 and added 64-bit target
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 06 Sep 2009 04:40:29 +0000 |
parents | 99210400e8b9 |
children | d3baf5ac4e37 |
rev | line source |
---|---|
0 | 1 /* |
2 SDL - Simple DirectMedia Layer | |
2859 | 3 Copyright (C) 1997-2009 Sam Lantinga |
0 | 4 |
5 This library is free software; you can redistribute it and/or | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1145
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
0 | 7 License as published by the Free Software Foundation; either |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1145
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
0 | 9 |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1145
diff
changeset
|
13 Lesser General Public License for more details. |
0 | 14 |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1145
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1145
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1145
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
0 | 18 |
19 Sam Lantinga | |
251
b8688cfdc232
Updated the headers with the correct e-mail address
Sam Lantinga <slouken@libsdl.org>
parents:
173
diff
changeset
|
20 slouken@libsdl.org |
0 | 21 */ |
22 | |
23 #ifndef _SDL_main_h | |
24 #define _SDL_main_h | |
25 | |
1356
67114343400d
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
26 #include "SDL_stdinc.h" |
67114343400d
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
27 |
1931
103c6fec2a60
The Mac OS X Cocoa video driver is under construction...
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset
|
28 /* Redefine main() on some platforms so that it is called by SDL */ |
0 | 29 |
1402
d910939febfa
Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents:
1356
diff
changeset
|
30 #if defined(__WIN32__) || \ |
453
a6fa62b1be09
Updated for embedded Visual C++ 4.0
Sam Lantinga <slouken@libsdl.org>
parents:
371
diff
changeset
|
31 (defined(__MWERKS__) && !defined(__BEOS__)) || \ |
2765
f55c87ae336b
Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
2707
diff
changeset
|
32 defined(__SYMBIAN32__) || defined(__IPHONEOS__) |
0 | 33 |
34 #ifdef __cplusplus | |
35 #define C_LINKAGE "C" | |
36 #else | |
37 #define C_LINKAGE | |
38 #endif /* __cplusplus */ | |
39 | |
40 /* The application's main() function must be called with C linkage, | |
41 and should be declared like this: | |
42 #ifdef __cplusplus | |
43 extern "C" | |
44 #endif | |
45 int main(int argc, char *argv[]) | |
46 { | |
47 } | |
48 */ | |
49 #define main SDL_main | |
50 | |
51 /* The prototype for the application's main() function */ | |
52 extern C_LINKAGE int SDL_main(int argc, char *argv[]); | |
53 | |
54 | |
55 /* From the SDL library code -- needed for registering the app on Win32 */ | |
1402
d910939febfa
Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents:
1356
diff
changeset
|
56 #ifdef __WIN32__ |
1356
67114343400d
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
57 |
0 | 58 #include "begin_code.h" |
59 #ifdef __cplusplus | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1466
diff
changeset
|
60 /* *INDENT-OFF* */ |
0 | 61 extern "C" { |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1466
diff
changeset
|
62 /* *INDENT-ON* */ |
0 | 63 #endif |
64 | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1466
diff
changeset
|
65 /* This can be called to set the application class at startup */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1466
diff
changeset
|
66 extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1466
diff
changeset
|
67 void *hInst); |
1466
3c45c578d480
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
68 extern DECLSPEC void SDLCALL SDL_UnregisterApp(void); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1466
diff
changeset
|
69 |
0 | 70 #ifdef __cplusplus |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1466
diff
changeset
|
71 /* *INDENT-OFF* */ |
0 | 72 } |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1466
diff
changeset
|
73 /* *INDENT-ON* */ |
0 | 74 #endif |
75 #include "close_code.h" | |
76 #endif | |
77 | |
78 #endif /* Need to redefine main()? */ | |
79 | |
80 #endif /* _SDL_main_h */ | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1466
diff
changeset
|
81 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1466
diff
changeset
|
82 /* vi: set ts=4 sw=4 expandtab: */ |