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>
36 uint32_t id; /* Ecore wayland window id */
38 Ecore_Wl_Window *window;
39 struct wl_surface *surface;
40 struct wl_egl_window *egl_window;
41 EGLSurface egl_surface;
45 int rotation_supported;
46 int received_rotation;
48 SDL_bool support_pre_rotation;
52 enum tizen_wl_egl_window_capability {
53 TIZEN_WL_EGL_WINDOW_CAPABILITY_NONE = 0,
54 TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED = (1 << 0),
55 TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_UNSUPPORTED = (1 << 1),
56 TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_UNKNOWN = (1 << 2),
61 TIZEN_ROTATION_90 = 90,
62 TIZEN_ROTATION_180 = 180,
63 TIZEN_ROTATION_270 = 270
64 } tizen_wl_egl_window_rotation;
66 extern SDL_Window* Tizen_FindWindow(_THIS, Ecore_Wl_Window *ewin);
67 extern void Tizen_SetWindowTitle(_THIS, SDL_Window * window);
68 extern void Tizen_ShowWindow(_THIS, SDL_Window *window);
69 extern void Tizen_HideWindow(_THIS, SDL_Window *window);
70 extern void Tizen_RaiseWindow(_THIS, SDL_Window *window);
72 extern void Tizen_SetWindowFullscreen(_THIS, SDL_Window *window,
73 SDL_VideoDisplay *_display,
75 extern int Tizen_CreateWindow(_THIS, SDL_Window *window);
76 extern void Tizen_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered);
78 extern void Tizen_SetWindowSize(_THIS, SDL_Window *window);
79 extern void Tizen_GetWindowSize(_THIS, SDL_Window *window, int *w, int *h);
80 extern void Tizen_DestroyWindow(_THIS, SDL_Window *window);
82 extern SDL_bool Tizen_GetWindowWMInfo(_THIS, SDL_Window *window, SDL_SysWMinfo *info);
83 extern int Tizen_SetWindowHitTest(SDL_Window *window, SDL_bool enabled);
84 extern void Tizen_SetWindowPosition(_THIS, SDL_Window * window);
86 extern int Tizen_InitWindow(_THIS);
87 extern void Tizen_DeinitWindow(_THIS);
89 extern void Tizen_pre_rotation_set(SDL_WindowData *_this, int rotation);
90 extern void Tizen_rotate_update(SDL_Window *window);
92 extern int _tizen_init_ecore_ipc();
93 extern void _tizen_ecore_ipc_client_send(int major, int minor, int ref, int ref_to);
104 extern void Tizen_ExecuteIndicatorProcess();
106 #endif /* _SDL_tizenwindow_h */
108 /* vi: set ts=4 sw=4 expandtab: */