abc14dce23bb987fdc0f555eda2a11fc0d7d3d80
[platform/upstream/SDL.git] / src / video / tizen / SDL_tizenwindow.h
1 /*
2   Simple DirectMedia Layer
3   Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
4   Copyright 2015 Samsung Electronics co., Ltd. All Rights Reserved.
5
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.
9
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:
13
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.
21 */
22 #include <Ecore_Input.h>
23
24 #include "../../SDL_internal.h"
25
26 #ifndef _SDL_tizenwindow_h
27 #define _SDL_tizenwindow_h
28
29 #include "../SDL_sysvideo.h"
30 #include "SDL_syswm.h"
31
32 #include "SDL_tizenvideo.h"
33
34 typedef struct {
35     uint32_t id;
36     Ecore_Wl_Window *window;
37     struct wl_surface *surface;
38     struct wl_shell_surface *shell_surface;
39     struct wl_egl_window *egl_window;
40     EGLSurface egl_surface;
41     int rotation;
42     int rotation_supported;
43     int received_rotation;
44     void *indicator_timer;
45
46     SDL_bool indicator_show;
47     Uint32 last_indicator_showtime;
48
49     int support_pre_rotation;
50
51 } SDL_WindowData;
52
53
54 extern SDL_Window* Tizen_FindWindow(_THIS, Ecore_Wl_Window *ewin);
55 extern void Tizen_ShowWindow(_THIS, SDL_Window *window);
56 extern void Tizen_SetWindowFullscreen(_THIS, SDL_Window *window,
57                                       SDL_VideoDisplay *_display,
58                                       SDL_bool fullscreen);
59 extern int Tizen_CreateWindow(_THIS, SDL_Window *window);
60 extern void Tizen_SetWindowSize(_THIS, SDL_Window *window);
61 extern void Tizen_GetWindowSize(_THIS, SDL_Window *window, int *w, int *h);
62 extern void Tizen_DestroyWindow(_THIS, SDL_Window *window);
63
64 extern SDL_bool Tizen_GetWindowWMInfo(_THIS, SDL_Window *window, SDL_SysWMinfo *info);
65 extern int Tizen_SetWindowHitTest(SDL_Window *window, SDL_bool enabled);
66 extern void Tizen_SetWindowPosition(_THIS, SDL_Window * window);
67
68 extern int Tizen_InitWindow(_THIS);
69 extern void Tizen_DeinitWindow(_THIS);
70
71 #endif /* _SDL_tizenwindow_h */
72
73 /* vi: set ts=4 sw=4 expandtab: */