From 5bc7a34eb998ab876c0ef0810fbfedb5add71171 Mon Sep 17 00:00:00 2001 From: "huiyu.eun" Date: Wed, 19 Jul 2017 10:48:43 +0900 Subject: [PATCH] [SDL_Tizen] Modify SDL-Tizen docs [ACR-1017] Add new SDL APIs Change-Id: Ie47f8263eebb510395578d7a0657eeaed59f457a Signed-off-by: huiyu.eun --- doc/sdl-tizen_docs.h | 126 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 120 insertions(+), 6 deletions(-) diff --git a/doc/sdl-tizen_docs.h b/doc/sdl-tizen_docs.h index f8378ee..d6307b9 100644 --- a/doc/sdl-tizen_docs.h +++ b/doc/sdl-tizen_docs.h @@ -5,20 +5,48 @@ * * @section CAPI_SDL_TIZEN_MODULE_HEADER Required Header * \#include + * \#include * * @section CAPI_SDL_TIZEN_MODULE_OVERVIEW Overview - * In Tizen, SDL can use Vulkan APIs directly. + * In Tizen, SDL can use OpenGL ES or Vulkan APIs directly. * * Remarks :\n * - 5 event types are added for Tizen application framework.\n * @remarks #SDL_APP_CONTROL\n * #SDL_APP_LOWBATTERY\n * #SDL_APP_LANGUAGE_CHANGED\n + * #SDL_APP_REGION_CHANGED\n * #SDL_ROTATEEVENT\n + * - 2 enumerations are added for OpenGL ES extension.\n + * @remarks #SDL_GL_CONTEXT_PRIORITY\n + * #SDL_GLcontextPriorityLevel\n + * - 2 type and hint are added for Tizen-specific window and indicator management.\n + * @remarks #SDL_SYSWM_TIZEN\n + * #SDL_HINT_TIZEN_INDICATOR_OPACITY\n + * - 1 function is added for Initialization SDL_tizen application.\n + * @remarks # SDL_tizen_app_init\n * - 2 functions are added for Vulkan.\n * @remarks #SDL_Vulkan_GetInstanceExtensions\n * #SDL_Vulkan_CreateSurface - */ + * + * @section CAPI_SDL_TIZEN_MODULE_FEATURE Related Features + * This API is related with the following features:\n + * - http://tizen.org/feature/opengles.version.1_1\n + * - http://tizen.org/feature/opengles.version.2_0\n + * - http://tizen.org/feature/opengles.version.3_0\n + * - http://tizen.org/feature/opengles.version.3_1\n + * - http://tizen.org/feature/opengles.version.3_2\n + * - http://tizen.org/feature/vulkan.version.1_0\n + * + * It is recommended to design feature related codes in your application for reliability.\n + * + * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n + * + * 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.\n + * + * More details on featuring your application can be found from Feature Element. + * +*/ /** * @addtogroup CAPI_SDL_TIZEN_MODULE @@ -27,6 +55,7 @@ /** * @brief The types of events that can be delivered. +.* @since_tizen 3.0 */ typedef enum { @@ -153,13 +182,97 @@ typedef enum } SDL_EventType; /** - * @brief Gets Vulkan instance extension names + * @brief OpenGL configuration attributes +.* @since_tizen 4.0 + */ +typedef enum +{ + 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 */ +} SDL_GLattr; + +/** + * @brief Allows an GL Context to be created with a priority hint + * @since_tizen 4.0 + */ +typedef enum +{ + SDL_GL_CONTEXT_PRIORITY_NONE = 0x0000,/**< Default priority */ + SDL_GL_CONTEXT_PRIORITY_HIGH = 0x0001,/**< Request the context is created with high priority */ + SDL_GL_CONTEXT_PRIORITY_MEDIUM = 0x0002,/**< Request the context is created with medium priority */ + SDL_GL_CONTEXT_PRIORITY_LOW = 0x0003/**< Request the context is created with low priority */ +} SDL_GLcontextPriorityLevel; + +/** + * @brief These are the various supported windowing subsystems + * @since_tizen 4.0 + */ +typedef enum +{ + SDL_SYSWM_TIZEN /**< Tizen-specific Window management system */ +} SDL_SYSWM_TYPE; + +/** + * @brief Set opacity of Tizen-specific indicator. + * + * @details 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_tizen 4.0 + */ +#define SDL_HINT_TIZEN_INDICATOR_OPACITY "SDL_TIZEN_INDICATOR_OPACITY" + +/** + * @brief Initializes the application main loop. + * + * @since_tizen 4.0 + * + * @param[in] argc The argument count + * @param[in] argv The argument vector + * + * @return This returns 0 on success, otherwise a negative error value. + * @retval #APP_ERROR_NONE Successful + * @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #APP_ERROR_INVALID_CONTEXT The application is illegally launched, not launched by the launch system + * @retval #APP_ERROR_ALREADY_RUNNING The main loop already starts + */ +extern DECLSPEC int SDLCALL SDL_tizen_app_init(int argc, char *argv[]); + +/** + * @brief Gets Vulkan instance extension names. * * @since_tizen 3.0 * * @param[in] window The window to associate with Vulkan - * @param[in] count Pointer to an integer related to the number of extension names available or queried - * @param[in] names Pointer to extension names in which the resulting extension names are returned + * @param[out] count Pointer to an integer related to the number of extension names available or queried + * @param[out] names Pointer to extension names in which the resulting extension names are returned * * @return This returns SDL_TRUE on success, SDL_FALSE on error */ @@ -172,12 +285,13 @@ extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(SDL_Window* wi * * @param[in] window The window to associate with Vulkan * @param[in] instance The instance to associate with surface - * @param[in] surface points to a SDL_vulkanSurface handle in which the created surface object is returned. + * @param[out] surface points to a SDL_vulkanSurface handle in which the created surface object is returned. * * @return This returns SDL_TRUE on success, SDL_FALSE on error */ extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window* window, SDL_vulkanInstance instance, SDL_vulkanSurface* surface); + /** * @} */ -- 2.7.4