Mercurial > sdl-ios-xcode
annotate include/SDL_main.h @ 3966:c0de2aac0a8c SDL-1.2
Added patch note for subversion revision 3076
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 15 Jun 2007 11:43:14 +0000 |
parents | 3c45c578d480 |
children | 782fd950bd46 c121d94672cb a1b03ba2fcd0 |
rev | line source |
---|---|
0 | 1 /* |
2 SDL - Simple DirectMedia Layer | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1145
diff
changeset
|
3 Copyright (C) 1997-2006 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 |
0 | 28 /* Redefine main() on Win32 and MacOS so that it is called by winmain.c */ |
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__)) || \ |
1402
d910939febfa
Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents:
1356
diff
changeset
|
32 defined(__MACOS__) || defined(__MACOSX__) || \ |
453
a6fa62b1be09
Updated for embedded Visual C++ 4.0
Sam Lantinga <slouken@libsdl.org>
parents:
371
diff
changeset
|
33 defined(__SYMBIAN32__) || defined(QWS) |
0 | 34 |
35 #ifdef __cplusplus | |
36 #define C_LINKAGE "C" | |
37 #else | |
38 #define C_LINKAGE | |
39 #endif /* __cplusplus */ | |
40 | |
41 /* The application's main() function must be called with C linkage, | |
42 and should be declared like this: | |
43 #ifdef __cplusplus | |
44 extern "C" | |
45 #endif | |
46 int main(int argc, char *argv[]) | |
47 { | |
48 } | |
49 */ | |
50 #define main SDL_main | |
51 | |
52 /* The prototype for the application's main() function */ | |
53 extern C_LINKAGE int SDL_main(int argc, char *argv[]); | |
54 | |
55 | |
56 /* 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
|
57 #ifdef __WIN32__ |
1356
67114343400d
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
58 |
0 | 59 #include "begin_code.h" |
60 #ifdef __cplusplus | |
61 extern "C" { | |
62 #endif | |
63 | |
64 /* This should be called from your WinMain() function, if any */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
65 extern DECLSPEC void SDLCALL SDL_SetModuleHandle(void *hInst); |
145
29a638dc26db
Applied David MacCormack's patch to fix SDL_WINDOWID on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
47
diff
changeset
|
66 /* This can also be called, but is no longer necessary */ |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
67 extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst); |
1145
d31afac94eff
Patch from Martin Lange (mala-sdl at hotmail.com) to unregister SDL's win32
Ryan C. Gordon <icculus@icculus.org>
parents:
769
diff
changeset
|
68 /* This can also be called, but is no longer necessary (SDL_Quit calls it) */ |
1466
3c45c578d480
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
69 extern DECLSPEC void SDLCALL SDL_UnregisterApp(void); |
0 | 70 #ifdef __cplusplus |
71 } | |
72 #endif | |
73 #include "close_code.h" | |
74 #endif | |
75 | |
76 /* From the SDL library code -- needed for registering QuickDraw on MacOS */ | |
1402
d910939febfa
Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents:
1356
diff
changeset
|
77 #if defined(__MACOS__) |
1356
67114343400d
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
78 |
0 | 79 #include "begin_code.h" |
80 #ifdef __cplusplus | |
81 extern "C" { | |
82 #endif | |
83 | |
84 /* Forward declaration so we don't need to include QuickDraw.h */ | |
85 struct QDGlobals; | |
86 | |
87 /* This should be called from your main() function, if any */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
88 extern DECLSPEC void SDLCALL SDL_InitQuickDraw(struct QDGlobals *the_qd); |
0 | 89 |
90 #ifdef __cplusplus | |
91 } | |
92 #endif | |
93 #include "close_code.h" | |
94 #endif | |
95 | |
96 #endif /* Need to redefine main()? */ | |
97 | |
98 #endif /* _SDL_main_h */ |