Tizen Native API  7.0
SDL Tizen

SDL is for Vulkan applications in Tizen.

Required Header

#include <SDL.h> #include <app.h>

Overview

In Tizen, SDL can use OpenGL ES or Vulkan APIs directly.

Remarks :

Related Features

This API is related with the following features:

It is recommended to design feature related codes in your application for reliability.

You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.

To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.

More details on featuring your application can be found from Feature Element.

Functions

int SDLCALL SDL_tizen_app_init (int argc, char *argv[])
 Initializes the application main loop.
SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions (SDL_Window *window, unsigned *count, char **names)
 Gets Vulkan instance extension names.
SDL_bool SDLCALL SDL_Vulkan_CreateSurface (SDL_Window *window, SDL_vulkanInstance instance, SDL_vulkanSurface *surface)
 Creates Vulkan surface.

Defines

#define SDL_HINT_TIZEN_INDICATOR_OPACITY   "SDL_TIZEN_INDICATOR_OPACITY"
 Sets opacity of Tizen-specific indicator.

Define Documentation

#define SDL_HINT_TIZEN_INDICATOR_OPACITY   "SDL_TIZEN_INDICATOR_OPACITY"

Sets opacity of Tizen-specific indicator.

The variable can be one of "#opaque" - Opacifies the indicator "#translucent" - Be translucent the indicator "#transparent" - Transparentizes the indicator (this is the default) "#bg_transparent" - Transparentizes the indicator background

Since :
4.0

Enumeration Type Documentation

The types of events that can be delivered.

Since :
3.0
Enumerator:
SDL_FIRSTEVENT 

Unused (do not remove)

SDL_QUIT 

User-requested quit

SDL_APP_TERMINATING 

The application is being terminated by the OS

SDL_APP_LOWMEMORY 

The application is low on memory, free memory if possible.

SDL_APP_WILLENTERBACKGROUND 

The application is about to enter the background

SDL_APP_DIDENTERBACKGROUND 

The application did enter the background and may not get CPU for some time

SDL_APP_WILLENTERFOREGROUND 

The application is about to enter the foreground

SDL_APP_DIDENTERFOREGROUND 

The application is now interactive

SDL_APP_CONTROL 

The application is launching with some arguments.

SDL_APP_LOWBATTERY 

The application is low on battery, reduce power consumption if possible.

SDL_APP_LANGUAGE_CHANGED 

The application receives this event, when displayed language is changed by system.

SDL_APP_REGION_CHANGED 

The application will receive this event, when displayed language is changed by system.

SDL_WINDOWEVENT 

Window state change

SDL_SYSWMEVENT 

System specific event

SDL_ROTATEEVENT 

Orientation change

SDL_KEYDOWN 

Key pressed

SDL_KEYUP 

Key released

SDL_TEXTEDITING 

Keyboard text editing (composition)

SDL_TEXTINPUT 

Keyboard text input

SDL_KEYMAPCHANGED 

Keymap changed due to a system event such as an input language or keyboard layout change.

SDL_MOUSEMOTION 

Mouse moved

SDL_MOUSEBUTTONDOWN 

Mouse button pressed

SDL_MOUSEBUTTONUP 

Mouse button released

SDL_MOUSEWHEEL 

Mouse wheel motion

SDL_JOYAXISMOTION 

Joystick axis motion

SDL_JOYBALLMOTION 

Joystick trackball motion

SDL_JOYHATMOTION 

Joystick hat position change

SDL_JOYBUTTONDOWN 

Joystick button pressed

SDL_JOYBUTTONUP 

Joystick button released

SDL_JOYDEVICEADDED 

A new joystick has been inserted into the system

SDL_JOYDEVICEREMOVED 

An opened joystick has been removed

SDL_CONTROLLERAXISMOTION 

Game controller axis motion

SDL_CONTROLLERBUTTONDOWN 

Game controller button pressed

SDL_CONTROLLERBUTTONUP 

Game controller button released

SDL_CONTROLLERDEVICEADDED 

A new Game controller has been inserted into the system

SDL_CONTROLLERDEVICEREMOVED 

An opened Game controller has been removed

SDL_CONTROLLERDEVICEREMAPPED 

The controller mapping was updated

SDL_FINGERDOWN 

User has touched input device

SDL_FINGERUP 

User stopped touching input device

SDL_FINGERMOTION 

User is dragging finger on input device

SDL_DOLLARGESTURE 

User made a dollar gesture.

SDL_DOLLARRECORD 

When recording a gesture with SDL_RecordGesture, the user made a dollar gesture that was recorded.

SDL_MULTIGESTURE 

Multiple finger gesture event

SDL_CLIPBOARDUPDATE 

The clipboard changed

SDL_DROPFILE 

The system requests a file open

SDL_AUDIODEVICEADDED 

A new audio device is available

SDL_AUDIODEVICEREMOVED 

An audio device has been removed.

SDL_RENDER_TARGETS_RESET 

The render targets have been reset and their contents need to be updated

SDL_RENDER_DEVICE_RESET 

The device has been reset and all textures need to be recreated

SDL_USEREVENT 

Events SDL_USEREVENT through SDL_LASTEVENT are for your use, and should be allocated with SDL_RegisterEvents()

SDL_LASTEVENT 

This last event is only for bounding internal arrays

enum SDL_GLattr

OpenGL configuration attributes .*.

Since :
4.0
Enumerator:
SDL_GL_RED_SIZE 

the minimum number of bits for the red channel of the color buffer; defaults to 3

SDL_GL_GREEN_SIZE 

the minimum number of bits for the green channel of the color buffer; defaults to 3

SDL_GL_BLUE_SIZE 

the minimum number of bits for the blue channel of the color buffer; defaults to 2

SDL_GL_ALPHA_SIZE 

the minimum number of bits for the alpha channel of the color buffer; defaults to 0

SDL_GL_BUFFER_SIZE 

the minimum number of bits for frame buffer size; defaults to 0

SDL_GL_DOUBLEBUFFER 

whether the output is single or double buffered; defaults to double buffering on

SDL_GL_DEPTH_SIZE 

the minimum number of bits in the depth buffer; defaults to 16

SDL_GL_STENCIL_SIZE 

the minimum number of bits in the stencil buffer; defaults to 0

SDL_GL_ACCUM_RED_SIZE 

the minimum number of bits for the red channel of the accumulation buffer; defaults to 0

SDL_GL_ACCUM_GREEN_SIZE 

the minimum number of bits for the green channel of the accumulation buffer; defaults to 0

SDL_GL_ACCUM_BLUE_SIZE 

the minimum number of bits for the blue channel of the accumulation buffer; defaults to 0

SDL_GL_ACCUM_ALPHA_SIZE 

the minimum number of bits for the alpha channel of the accumulation buffer; defaults to 0

SDL_GL_STEREO 

whether the output is stereo 3D; defaults to off

SDL_GL_MULTISAMPLEBUFFERS 

the number of buffers used for multisample anti-aliasing; defaults to 0

SDL_GL_MULTISAMPLESAMPLES 

the number of samples used around the current pixel used for multisample anti-aliasing; defaults to 0

SDL_GL_ACCELERATED_VISUAL 

set to 1 to require hardware acceleration, set to 0 to force software rendering; defaults to allow either

SDL_GL_RETAINED_BACKING 

not used (deprecated)

SDL_GL_CONTEXT_MAJOR_VERSION 

OpenGL context major version

SDL_GL_CONTEXT_MINOR_VERSION 

OpenGL context minor version

SDL_GL_CONTEXT_EGL 

not used (deprecated)

SDL_GL_CONTEXT_FLAGS 

some combination of 0 or more of elements of the SDL_GLcontextFlag enumeration; defaults to 0

SDL_GL_CONTEXT_PROFILE_MASK 

type of GL context (Core, Compatibility, ES). See SDL_GLprofile; default value depends on platform

SDL_GL_SHARE_WITH_CURRENT_CONTEXT 

OpenGL context sharing; defaults to 0

SDL_GL_FRAMEBUFFER_SRGB_CAPABLE 

requests sRGB capable visual; defaults to 0 (>= SDL 2.0.1)

SDL_GL_CONTEXT_RELEASE_BEHAVIOR 

sets context the release behavior; defaults to 1 (>= SDL 2.0.4)

SDL_GL_CONTEXT_PRIORITY 

allows an GL Context to be created with a priority hint

Allows an GL Context to be created with a priority hint.

Since :
4.0
Enumerator:
SDL_GL_CONTEXT_PRIORITY_NONE 

Default priority

SDL_GL_CONTEXT_PRIORITY_HIGH 

Request the context is created with high priority

SDL_GL_CONTEXT_PRIORITY_MEDIUM 

Request the context is created with medium priority

SDL_GL_CONTEXT_PRIORITY_LOW 

Request the context is created with low priority

These are the various supported windowing subsystems.

Since :
4.0
Enumerator:
SDL_SYSWM_TIZEN 

Tizen-specific Window management system


Function Documentation

int SDLCALL SDL_tizen_app_init ( int  argc,
char *  argv[] 
)

Initializes the application main loop.

Since :
4.0
Parameters:
[in]argcThe argument count
[in]argvThe argument vector
Returns:
This returns 0 on success, otherwise a negative error value.
Return values:
APP_ERROR_NONESuccessful
APP_ERROR_INVALID_PARAMETERInvalid parameter
APP_ERROR_INVALID_CONTEXTThe application is illegally launched, not launched by the launch system
APP_ERROR_ALREADY_RUNNINGThe main loop already starts
SDL_bool SDLCALL SDL_Vulkan_CreateSurface ( SDL_Window *  window,
SDL_vulkanInstance  instance,
SDL_vulkanSurface *  surface 
)

Creates Vulkan surface.

Since :
3.0
Parameters:
[in]windowThe window to associate with Vulkan
[in]instanceThe instance to associate with surface
[out]surfacepoints to a SDL_vulkanSurface handle in which the created surface object is returned.
Returns:
This returns SDL_TRUE on success, SDL_FALSE on error
SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions ( SDL_Window *  window,
unsigned *  count,
char **  names 
)

Gets Vulkan instance extension names.

Since :
3.0
Parameters:
[in]windowThe window to associate with Vulkan
[out]countPointer to an integer related to the number of extension names available or queried
[out]namesPointer to extension names in which the resulting extension names are returned
Returns:
This returns SDL_TRUE on success, SDL_FALSE on error