if test x$PKG_CONFIG != xno && \
test x$video_opengl_egl = xyes && \
test x$video_opengles_v2 = xyes; then
- if $PKG_CONFIG --exists wayland-client wayland-egl ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm ecore-ipc; then
- TIZEN_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc`
- TIZEN_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc`
+ if $PKG_CONFIG --exists wayland-client wayland-egl wayland-egl-tizen ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm ecore-ipc; then
+ TIZEN_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-egl-tizen ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc`
+ TIZEN_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-egl-tizen ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc`
video_tizen=yes
fi
fi
if test x$PKG_CONFIG != xno && \
test x$video_opengl_egl = xyes && \
test x$video_opengles_v2 = xyes; then
- if $PKG_CONFIG --exists wayland-client wayland-egl ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm ecore-ipc; then
- TIZEN_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc`
- TIZEN_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc`
+ if $PKG_CONFIG --exists wayland-client wayland-egl wayland-egl-tizen ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm ecore-ipc; then
+ TIZEN_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-egl-tizen ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc`
+ TIZEN_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-egl-tizen ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc`
video_tizen=yes
fi
fi
#include <Ecore_Ipc.h>
#include <unistd.h>
-#define LOAD_FUNC(NAME) \
-_this->tizen_rotation_data.NAME = SDL_LoadFunction(_this->tizen_rotation_data.dll_handle, #NAME); \
-if (!_this->tizen_rotation_data.NAME) \
-{ \
- SDL_LogError(SDL_LOG_CATEGORY_ASSERT, "Could not retrieve pre-rotation function " #NAME); \
- return SDL_FALSE; \
-}
-
/*SDL indicator*/
Ecore_Ipc_Server *ipc = NULL;
return 0;
}
-int
-_tizen_Rotatotion_LoadLibrary(SDL_VideoData *_this, const char *lib_path)
-{
- void *lib_dll_handle = NULL;
- char *path = NULL;
-
- if (_this->tizen_rotation_data.dll_handle
- && _this->tizen_rotation_data.wl_egl_window_set_rotation
- && _this->tizen_rotation_data.wl_egl_window_get_capabilities
- && _this->tizen_rotation_data.wl_egl_window_set_buffer_transform
- && _this->tizen_rotation_data.wl_egl_window_set_window_transform)
- return SDL_TRUE;
-
- _this->tizen_rotation_data.dll_handle = NULL;
- _this->tizen_rotation_data.wl_egl_window_set_rotation = NULL;
- _this->tizen_rotation_data.wl_egl_window_get_capabilities = NULL;
-
- _this->tizen_rotation_data.wl_egl_window_set_buffer_transform = NULL;
- _this->tizen_rotation_data.wl_egl_window_set_window_transform = NULL;
-
- if (!lib_path)
- lib_dll_handle = SDL_LoadObject(lib_path);
-
- if (!lib_dll_handle) {
- path = "libwayland-egl.so.1";
- lib_dll_handle = SDL_LoadObject(path);
- }
-
- _this->tizen_rotation_data.dll_handle = lib_dll_handle;
-
- if (lib_dll_handle == NULL)
- return SDL_FALSE;
-
- LOAD_FUNC(wl_egl_window_set_rotation);
- LOAD_FUNC(wl_egl_window_get_capabilities);
-
- LOAD_FUNC(wl_egl_window_set_buffer_transform);
- LOAD_FUNC(wl_egl_window_set_window_transform);
-
- return SDL_TRUE;
-}
-
SDL_bool
Tizen_GetWindowWMInfo(_THIS, SDL_Window *window, SDL_SysWMinfo *info)
{
{
if(wind->support_pre_rotation)
{
- if(_this->tizen_rotation_data.wl_egl_window_set_rotation)
- _this->tizen_rotation_data.wl_egl_window_set_rotation(wind->egl_window, 360 - rotation);
- if(_this->tizen_rotation_data.wl_egl_window_set_buffer_transform)
- _this->tizen_rotation_data.wl_egl_window_set_buffer_transform(wind->egl_window, _tizen_get_rotation_idx(rotation));
- if(_this->tizen_rotation_data.wl_egl_window_set_window_transform)
- _this->tizen_rotation_data.wl_egl_window_set_window_transform(wind->egl_window, _tizen_get_rotation_idx(wind->rotation));
+ wl_egl_window_tizen_set_rotation(wind->egl_window, 360 - rotation);
+ wl_egl_window_tizen_set_buffer_transform(wind->egl_window, _tizen_get_rotation_idx(rotation));
+ wl_egl_window_tizen_set_window_transform(wind->egl_window, _tizen_get_rotation_idx(wind->rotation));
}
else
{
- wl_egl_window_resize(wind->egl_window, window_w, window_h, 0, 0);
- if(_this->tizen_rotation_data.wl_egl_window_set_buffer_transform)
- _this->tizen_rotation_data.wl_egl_window_set_buffer_transform(wind->egl_window, _tizen_get_rotation_idx((360 - wind->rotation)));
- if(_this->tizen_rotation_data.wl_egl_window_set_window_transform)
- _this->tizen_rotation_data.wl_egl_window_set_window_transform(wind->egl_window, _tizen_get_rotation_idx(0));
+ wl_egl_window_resize(wind->egl_window, window_w, window_h, 0, 0);
+ wl_egl_window_tizen_set_buffer_transform(wind->egl_window, _tizen_get_rotation_idx((360 - wind->rotation)));
+ wl_egl_window_tizen_set_window_transform(wind->egl_window, _tizen_get_rotation_idx(0));
}
}
#endif
//Support PreRotation
wind->support_pre_rotation = 0;
- if (_tizen_Rotatotion_LoadLibrary(data, "libwayland-egl.so.1")) {
- if (data->tizen_rotation_data.wl_egl_window_get_capabilities(wind->egl_window) == TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED ) {
- wind->support_pre_rotation = 1;
- }
+ if (wl_egl_window_tizen_get_capabilities(wind->egl_window) == WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_SUPPORTED ) {
+ wind->support_pre_rotation = 1;
}
else
{
wl_egl_window_resize(wind->egl_window, window->w, window->h, 0, 0);
}
+
}
#endif
#include "SDL_tizenvideo.h"
#include <Ecore_Input.h>
#include <wayland-egl.h>
+#include <wayland-egl-tizen.h>
typedef struct {
uint32_t g_res_id; /* Wayland window resource id */
} SDL_WindowData;
-enum tizen_wl_egl_window_capability {
- TIZEN_WL_EGL_WINDOW_CAPABILITY_NONE = 0,
- TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED = (1 << 0),
- TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_UNSUPPORTED = (1 << 1),
- TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_UNKNOWN = (1 << 2),
-};
-
-typedef enum {
- TIZEN_ROTATION_0 = 0,
- TIZEN_ROTATION_90 = 90,
- TIZEN_ROTATION_180 = 180,
- TIZEN_ROTATION_270 = 270
-} tizen_wl_egl_window_rotation;
-
enum tizen_rotation_received_type {
TIZEN_ROTATION_RECEIVED_NONE = 0,
TIZEN_ROTATION_RECEIVED_SCREEN_ROTATION = 1,