include/SDL_main.h
changeset 7191 75360622e65f
parent 6885 700f1b25f77f
child 7281 cd5516b9263d
equal deleted inserted replaced
7190:11612d544fcd 7191:75360622e65f
    24 
    24 
    25 #include "SDL_stdinc.h"
    25 #include "SDL_stdinc.h"
    26 
    26 
    27 /**
    27 /**
    28  *  \file SDL_main.h
    28  *  \file SDL_main.h
    29  *  
    29  *
    30  *  Redefine main() on some platforms so that it is called by SDL.
    30  *  Redefine main() on some platforms so that it is called by SDL.
    31  */
    31  */
    32 
    32 
    33 #if defined(__WIN32__) || defined(__IPHONEOS__) || defined(__ANDROID__)
    33 #if defined(__WIN32__) || defined(__IPHONEOS__) || defined(__ANDROID__)
    34 #ifndef SDL_MAIN_HANDLED
    34 #ifndef SDL_MAIN_HANDLED
    35 #define SDL_MAIN_NEEDED
    35 #define SDL_MAIN_NEEDED
    36 #endif
    36 #endif
    37 #endif
    37 #endif
    38 
    38 
    39 #ifdef __cplusplus
    39 #ifdef __cplusplus
    40 #define C_LINKAGE	"C"
    40 #define C_LINKAGE   "C"
    41 #else
    41 #else
    42 #define C_LINKAGE
    42 #define C_LINKAGE
    43 #endif /* __cplusplus */
    43 #endif /* __cplusplus */
    44 
    44 
    45 /**
    45 /**
    56  *  }
    56  *  }
    57  *  \endcode
    57  *  \endcode
    58  */
    58  */
    59 
    59 
    60 #ifdef SDL_MAIN_NEEDED
    60 #ifdef SDL_MAIN_NEEDED
    61 #define main	SDL_main
    61 #define main    SDL_main
    62 #endif
    62 #endif
    63 
    63 
    64 /**
    64 /**
    65  *  The prototype for the application's main() function
    65  *  The prototype for the application's main() function
    66  */
    66  */
    67 extern C_LINKAGE int SDL_main(int argc, char *argv[]);
    67 extern C_LINKAGE int SDL_main(int argc, char *argv[]);
    68 
    68 
    69 
    69 
    70 #include "begin_code.h"
    70 #include "begin_code.h"
    71 #ifdef __cplusplus
    71 #ifdef __cplusplus
    72 /* *INDENT-OFF* */
       
    73 extern "C" {
    72 extern "C" {
    74 /* *INDENT-ON* */
       
    75 #endif
    73 #endif
    76 
    74 
    77 #ifdef __WIN32__
    75 #ifdef __WIN32__
    78 
    76 
    79 /**
    77 /**
    85 
    83 
    86 #endif /* __WIN32__ */
    84 #endif /* __WIN32__ */
    87 
    85 
    88 
    86 
    89 #ifdef __cplusplus
    87 #ifdef __cplusplus
    90 /* *INDENT-OFF* */
       
    91 }
    88 }
    92 /* *INDENT-ON* */
       
    93 #endif
    89 #endif
    94 #include "close_code.h"
    90 #include "close_code.h"
    95 
    91 
    96 #endif /* _SDL_main_h */
    92 #endif /* _SDL_main_h */
    97 
    93