Path: blob/main/system/include/SDL/SDL_main.h
6169 views
/*1Simple DirectMedia Layer2Copyright (C) 1997-2011 Sam Lantinga <[email protected]>34This software is provided 'as-is', without any express or implied5warranty. In no event will the authors be held liable for any damages6arising from the use of this software.78Permission is granted to anyone to use this software for any purpose,9including commercial applications, and to alter it and redistribute it10freely, subject to the following restrictions:11121. The origin of this software must not be misrepresented; you must not13claim that you wrote the original software. If you use this software14in a product, an acknowledgment in the product documentation would be15appreciated but is not required.162. Altered source versions must be plainly marked as such, and must not be17misrepresented as being the original software.183. This notice may not be removed or altered from any source distribution.19*/2021#ifndef _SDL_main_h22#define _SDL_main_h2324#include "SDL_stdinc.h"2526/**27* \file SDL_main.h28*29* Redefine main() on some platforms so that it is called by SDL.30*/3132#if defined(__WIN32__) || defined(__IPHONEOS__) || defined(__ANDROID__)33#ifndef SDL_MAIN_HANDLED34#define SDL_MAIN_NEEDED35#endif36#endif3738#ifdef __cplusplus39#define C_LINKAGE "C"40#else41#define C_LINKAGE42#endif /* __cplusplus */4344/**45* \file SDL_main.h46*47* The application's main() function must be called with C linkage,48* and should be declared like this:49* \code50* #ifdef __cplusplus51* extern "C"52* #endif53* int main(int argc, char *argv[])54* {55* }56* \endcode57*/5859#ifdef SDL_MAIN_NEEDED60#define main SDL_main61#endif6263/**64* The prototype for the application's main() function65*/66extern C_LINKAGE int SDL_main(int argc, char *argv[]);676869#include "begin_code.h"70#ifdef __cplusplus71/* *INDENT-OFF* */72extern "C" {73/* *INDENT-ON* */74#endif7576#ifdef __WIN32__7778/**79* This can be called to set the application class at startup80*/81extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style,82void *hInst);83extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);8485#endif /* __WIN32__ */868788#ifdef __cplusplus89/* *INDENT-OFF* */90}91/* *INDENT-ON* */92#endif93#include "close_code.h"9495#endif /* _SDL_main_h */9697/* vi: set ts=4 sw=4 expandtab: */9899100