2 Simple DirectMedia Layer
3 Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
4 Copyright 2015 Samsung Electronics co., Ltd. All Rights Reserved.
6 This software is provided 'as-is', without any express or implied
7 warranty. In no event will the authors be held liable for any damages
8 arising from the use of this software.
10 Permission is granted to anyone to use this software for any purpose,
11 including commercial applications, and to alter it and redistribute it
12 freely, subject to the following restrictions:
14 1. The origin of this software must not be misrepresented; you must not
15 claim that you wrote the original software. If you use this software
16 in a product, an acknowledgment in the product documentation would be
17 appreciated but is not required.
18 2. Altered source versions must be plainly marked as such, and must not be
19 misrepresented as being the original software.
20 3. This notice may not be removed or altered from any source distribution.
22 #include "../../SDL_internal.h"
24 #ifndef _SDL_tizenwindow_h
25 #define _SDL_tizenwindow_h
27 #include "../SDL_sysvideo.h"
29 #include "SDL_syswm.h"
31 #include "SDL_tizenvideo.h"
32 #include <Ecore_Input.h>
33 #include <wayland-egl.h>
35 typedef struct Tizen_PreRotation_Data{
36 void *prerotation_dll_handle;
37 int (*wl_egl_window_get_capabilities) (struct wl_egl_window *egl_window);
38 void (*wl_egl_window_set_rotation) (struct wl_egl_window *egl_window, int rotation);
39 } Tizen_Prerotation_Data;
43 Ecore_Wl_Window *window;
44 struct wl_surface *surface;
45 struct wl_egl_window *egl_window;
47 EGLSurface egl_surface;
49 int rotation_supported;
50 int received_rotation;
54 int support_pre_rotation;
55 SDL_bool isLoaded_pre_rotation;
56 Tizen_Prerotation_Data * tizen_pre_rotation_data;
60 enum tizen_wl_egl_window_capability {
61 TIZEN_WL_EGL_WINDOW_CAPABILITY_NONE = 0,
62 TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED = (1 << 0),
63 TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_UNSUPPORTED = (1 << 1),
64 TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_UNKNOWN = (1 << 2),
69 TIZEN_ROTATION_90 = 90,
70 TIZEN_ROTATION_180 = 180,
71 TIZEN_ROTATION_270 = 270
72 } tizen_wl_egl_window_rotation;
74 extern SDL_Window* Tizen_FindWindow(_THIS, Ecore_Wl_Window *ewin);
75 extern void Tizen_SetWindowTitle(_THIS, SDL_Window * window);
76 extern void Tizen_ShowWindow(_THIS, SDL_Window *window);
77 extern void Tizen_HideWindow(_THIS, SDL_Window *window);
78 extern void Tizen_RaiseWindow(_THIS, SDL_Window *window);
80 extern void Tizen_SetWindowFullscreen(_THIS, SDL_Window *window,
81 SDL_VideoDisplay *_display,
83 extern int Tizen_CreateWindow(_THIS, SDL_Window *window);
84 extern void Tizen_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered);
86 extern void Tizen_SetWindowSize(_THIS, SDL_Window *window);
87 extern void Tizen_GetWindowSize(_THIS, SDL_Window *window, int *w, int *h);
88 extern void Tizen_DestroyWindow(_THIS, SDL_Window *window);
90 extern SDL_bool Tizen_GetWindowWMInfo(_THIS, SDL_Window *window, SDL_SysWMinfo *info);
91 extern int Tizen_SetWindowHitTest(SDL_Window *window, SDL_bool enabled);
92 extern void Tizen_SetWindowPosition(_THIS, SDL_Window * window);
94 extern int Tizen_InitWindow(_THIS);
95 extern void Tizen_DeinitWindow(_THIS);
97 extern void Tizen_pre_rotation_set(SDL_WindowData *_this, int rotation);
98 extern void Tizen_rotate_update(SDL_Window *window);
100 extern int _tizen_init_ecore_ipc();
101 extern void _tizen_ecore_ipc_client_send(int major, int minor, int ref, int ref_to);
111 extern void SDL_ExecuteIndicatorProcess();
113 #endif /* _SDL_tizenwindow_h */
115 /* vi: set ts=4 sw=4 expandtab: */