Function SDL_EnterAppMainCallbacks

pub unsafe extern "C" fn SDL_EnterAppMainCallbacks(
    argc: i32,
    argv: *mut *mut i8,
    appinit: Option<unsafe extern "C" fn(_: *mut *mut c_void, _: i32, _: *mut *mut i8) -> SDL_AppResult>,
    appiter: Option<unsafe extern "C" fn(_: *mut c_void) -> SDL_AppResult>,
    appevent: Option<unsafe extern "C" fn(_: *mut c_void, _: *mut SDL_Event) -> SDL_AppResult>,
    appquit: Option<unsafe extern "C" fn(_: *mut c_void, _: SDL_AppResult)>,
) -> i32
Available on crate feature dep_sdl3 only.
Expand description

An entry point for SDL’s use in SDL_MAIN_USE_CALLBACKS.

Generally, you should not call this function directly. This only exists to hand off work into SDL as soon as possible, where it has a lot more control and functionality available, and make the inline code in SDL_main.h as small as possible.

Not all platforms use this, it’s actual use is hidden in a magic header-only library, and you should not call this directly unless you really know what you’re doing.

§Parameters

  • argc: standard Unix main argc.
  • argv: standard Unix main argv.
  • appinit: the application’s SDL_AppInit function.
  • appiter: the application’s SDL_AppIterate function.
  • appevent: the application’s SDL_AppEvent function.
  • appquit: the application’s SDL_AppQuit function.

§Return value

Returns standard Unix main return value.

§Thread safety

It is not safe to call this anywhere except as the only function call in SDL_main.

§Availability

This function is available since SDL 3.2.0.