[SDL_Tizen] fix build warnings 55/82555/3
authorDaeKwang Ryu <dkdk.ryu@samsung.com>
Thu, 4 Aug 2016 05:45:15 +0000 (14:45 +0900)
committerDaekwang Ryu <dkdk.ryu@samsung.com>
Tue, 9 Aug 2016 02:19:38 +0000 (19:19 -0700)
Change-Id: Ib1772dd1701e935dab7b550e397acdfbc5550530

src/core/tizen/SDL_tizen.c
src/video/tizen/SDL_tizenkeyboard.c
src/video/tizen/SDL_tizenkeyboard.h
src/video/tizen/SDL_tizenmouse.c
src/video/tizen/SDL_tizenmouse.h
src/video/tizen/SDL_tizenwindow.c

index 6e69ac3..4beaec1 100644 (file)
@@ -26,6 +26,7 @@
 #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>
@@ -101,7 +102,7 @@ _tizen_app_orient_changed(app_event_info_h event_info, void *user_data)
     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;
 
index 4c00916..8352111 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "SDL_tizenkeyboard.h"
 #include "SDL_log.h"
+#include "../../events/SDL_keyboard_c.h"
 
 /*
     Tizen Keyboard
@@ -91,7 +92,8 @@ void
 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)
@@ -147,7 +149,7 @@ SDL_bool
 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);
 }
index 8f39bc5..8eb63ec 100644 (file)
@@ -40,6 +40,7 @@ struct _TizenKeyboard
 
 static TizenKeyboard keyboard;
 
+extern void Tizen_InitKeyboard(_THIS);
 extern void Tizen_FiniKeyboard(void);
 
 extern void Tizen_StartTextInput(_THIS);
index f0ad5cc..84bfaf5 100755 (executable)
 */
 
 #include "../../SDL_internal.h"
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
 #include "../../events/SDL_mouse_c.h"
 
 #include "SDL_tizenmouse.h"
@@ -28,6 +33,8 @@
 
 #include <sys/mman.h>
 #include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
 
 
 typedef struct {
@@ -84,8 +91,8 @@ static const struct wl_buffer_listener mouse_buffer_listener = {
 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;
@@ -186,7 +193,7 @@ Tizen_FreeCursor(SDL_Cursor *cursor)
     free (cursor->driverdata);
     SDL_free(cursor);
 }
-
+/*
 static int
 Tizen_ShowCursor(SDL_Cursor *cursor)
 {
@@ -204,7 +211,7 @@ Tizen_ShowCursor(SDL_Cursor *cursor)
 
     return 0;
 }
-
+*/
 void
 Tizen_InitMouse(void)
 {
index 45d20db..6cd8e84 100755 (executable)
@@ -28,6 +28,9 @@
 
 #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);
index c6298ee..5bfd29e 100644 (file)
@@ -35,6 +35,7 @@
 #include "SDL_tizenmouse.h"
 #include "SDL_tizenevents_c.h"
 #include "SDL_log.h"
+#include "../../events/SDL_mouse_c.h"
 
 #include <wayland-egl.h>
 
@@ -170,13 +171,13 @@ __tizen_cb_window_visibility_change(void *data, int type, void *event)
     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,