#include "SDL_tizen.h"
#include "SDL_log.h"
#include "SDL_events.h"
+#include "../../events/SDL_events_c.h"
#include <app_internal.h>
#include <app_extension.h>
#include <system_settings.h>
SDL_Event event;
SDL_memset(&event, 0, sizeof(event));
event.type = SDL_ROTATEEVENT;
- event.user.code = NULL;
+ event.user.code = 0;
event.window.data1 = (void*)orientation;
event.user.data2 = -1;
#include "SDL_tizenkeyboard.h"
#include "SDL_log.h"
+#include "../../events/SDL_keyboard_c.h"
/*
Tizen Keyboard
Tizen_StartTextInput(_THIS)
{
if (!_this) {
- return SDL_SetError("Video subsystem must be initialized");
+ SDL_SetError("Video subsystem must be initialized");
+ return;
}
if(keyboard.imf_context == NULL)
Tizen_IsScreenKeyboardShown(_THIS, SDL_Window * window)
{
if (!keyboard.imf_context)
- return;
+ return SDL_FALSE;
//EAPI Ecore_IMF_Input_Panel_State ecore_imf_context_input_panel_state_get (Ecore_IMF_Context *ctx)
return ecore_imf_context_input_panel_state_get(keyboard.imf_context);
}
static TizenKeyboard keyboard;
+extern void Tizen_InitKeyboard(_THIS);
extern void Tizen_FiniKeyboard(void);
extern void Tizen_StartTextInput(_THIS);
*/
#include "../../SDL_internal.h"
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#include "../../events/SDL_mouse_c.h"
#include "SDL_tizenmouse.h"
#include <sys/mman.h>
#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
typedef struct {
static int
create_buffer_from_shm(Tizen_CursorData *d, int width, int height, uint32_t format)
{
- SDL_VideoDevice *vd = SDL_GetVideoDevice();
- SDL_VideoData *data = (SDL_VideoData *) vd->driverdata;
+ //SDL_VideoDevice *vd = SDL_GetVideoDevice();
+ //SDL_VideoData *data = (SDL_VideoData *) vd->driverdata;
struct wl_shm_pool *shm_pool;
int stride = width * 4;
free (cursor->driverdata);
SDL_free(cursor);
}
-
+/*
static int
Tizen_ShowCursor(SDL_Cursor *cursor)
{
return 0;
}
-
+*/
void
Tizen_InitMouse(void)
{
#include "SDL_assert.h"
+extern void Tizen_InitMouse(void);
+extern void Tizen_FiniMouse(void);
+
extern Eina_Bool __tizen_cb_event_mouseup_change(void *data, int type, void *event);
extern Eina_Bool __tizen_cb_event_mousedown_change(void *data, int type, void *event);
extern Eina_Bool __tizen_cb_event_mousemove_change(void *data, int type, void *event);
#include "SDL_tizenmouse.h"
#include "SDL_tizenevents_c.h"
#include "SDL_log.h"
+#include "../../events/SDL_mouse_c.h"
#include <wayland-egl.h>
return ECORE_CALLBACK_PASS_ON;
}
-int
+int
Tizen_InitWindow(_THIS)
{
SDL_VideoData *data = _this->driverdata;
data->windows = eina_hash_int32_new(NULL);
-
+
ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_VISIBILITY_CHANGE,
__tizen_cb_window_visibility_change, _this);
ecore_event_handler_add(ECORE_EVENT_KEY_UP,