---
name: "SDL_AppInit_func"
section: "3type"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_AppInit_func"
---

# SDL\_AppInit\_func(3type)

Function pointer typedef for SDL\_AppInit .

## NAME

SDL\_AppInit\_func - Function pointer typedef for  **SDL\_AppInit** .

## HEADER FILE

Defined in SDL3/SDL\_init.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**typedef SDL\_AppResult (SDLCALL \*SDL\_AppInit\_func)(void \*\*appstate, int argc, char \*argv\[\]);**

## DESCRIPTION

These are used by  **SDL\_EnterAppMainCallbacks** . This mechanism operates behind the scenes for apps using the optional main callbacks. Apps that want to use this should just implement

**SDL\_AppInit**\
  directly.

## FUNCTION PARAMETERS

- *appstate*

  a place where the app can optionally store a pointer for future use.

- *argc*

  the standard ANSI C main's argc; number of elements in **argv** .

- *argv*

  the standard ANSI C main's argv; array of command line arguments.

## RETURN VALUE

Returns  **SDL\_APP\_FAILURE**\
  to terminate with an error,

**SDL\_APP\_SUCCESS**\
  to terminate with success,

**SDL\_APP\_CONTINUE**\
  to continue.

## AVAILABILITY

This datatype is available since SDL 3.2.0.
