From 214fab624dcd9ece17205d2584caa2c13c3fa95f Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 10 Nov 2016 11:20:50 +0900 Subject: [PATCH] Fix build warning Change-Id: Ib1f611c5e8043df2fbd4c54dfee37a517e6dfdfc Signed-off-by: Jihoon Kim --- scl/gwes/efl/sclevents-efl.cpp | 40 +++++++++++++++++++++------------------- scl/gwes/efl/sclevents-efl.h | 5 ++++- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/scl/gwes/efl/sclevents-efl.cpp b/scl/gwes/efl/sclevents-efl.cpp index a850a9e..96f6b8b 100644 --- a/scl/gwes/efl/sclevents-efl.cpp +++ b/scl/gwes/efl/sclevents-efl.cpp @@ -52,7 +52,7 @@ typedef enum _Gesture { ONE_FINGER_HOVER = 0, ONE_FINGER_SINGLE_TAP = 15, ONE_FINGER_DOUBLE_TAP = 16 -}Gesture; +} Gesture; typedef struct { @@ -62,19 +62,21 @@ typedef struct } Gesture_Info; #endif -sclboolean mouse_pressed = FALSE; /* Checks whether mouse is pressed or not */ -sclwindow pressed_window = SCLWINDOW_INVALID; +static sclboolean mouse_pressed = FALSE; /* Checks whether mouse is pressed or not */ +static sclwindow pressed_window = SCLWINDOW_INVALID; #define MIN_XY_DIFF 14 -Eina_Bool mouse_press(void *data, int type, void *event_info); -Eina_Bool mouse_move(void *data, int type, void *event_info); -Eina_Bool mouse_release(void *data, int type, void *event_info); +static Eina_Bool mouse_press(void *data, int type, void *event_info); +static Eina_Bool mouse_move(void *data, int type, void *event_info); +static Eina_Bool mouse_release(void *data, int type, void *event_info); -Eina_Bool client_message_cb(void *data, int type, void *event); +#ifndef WAYLAND +static Eina_Bool client_message_cb(void *data, int type, void *event); +#endif #ifdef HANDLE_KEY_EVENTS -Eina_Bool key_pressed(void *data, int type, void *event_info); +static Eina_Bool key_pressed(void *data, int type, void *event_info); #endif static sclboolean get_window_rect(const sclwindow window, SclRectangle *rect) @@ -165,7 +167,9 @@ CSCLEventsImplEfl::CSCLEventsImplEfl() m_mouse_move_handler = NULL; m_mouse_up_handler = NULL; +#ifndef WAYLAND m_xclient_msg_handler = NULL; +#endif m_key_pressed_handler = NULL; } @@ -226,7 +230,7 @@ static void gesture_cb(void *data, const Eldbus_Message *msg) free(info); } -void gestures_tracker_register() +static void gestures_tracker_register() { Eldbus_Object *obj; Eldbus_Proxy *proxy; @@ -248,7 +252,7 @@ void gestures_tracker_register() return; } -void gestures_tracker_unregister() +static void gestures_tracker_unregister() { if (eldbus_conn) { eldbus_connection_unref(eldbus_conn); @@ -294,8 +298,6 @@ void CSCLEventsImplEfl::fini() m_mouse_move_handler = NULL; if (m_mouse_up_handler) ecore_event_handler_del(m_mouse_up_handler); m_mouse_up_handler = NULL; - if (m_xclient_msg_handler) ecore_event_handler_del(m_xclient_msg_handler); - m_xclient_msg_handler = NULL; #ifdef HANDLE_KEY_EVENTS if (m_key_pressed_handler) ecore_event_handler_del(m_key_pressed_handler); #endif @@ -344,7 +346,7 @@ SclPoint get_rotated_local_coords(sclint x, sclint y, SCLRotation rotation, SclR } //void mouse_press (void *data, Evas *e, Evas_Object *object, void *event_info) -Eina_Bool mouse_press(void *data, int type, void *event_info) +static Eina_Bool mouse_press(void *data, int type, void *event_info) { SCL_DEBUG(); #ifdef WAYLAND @@ -546,7 +548,7 @@ Eina_Bool mouse_press(void *data, int type, void *event_info) } //void mouse_release (void *data, Evas *e, Evas_Object *object, void *event_info) -Eina_Bool mouse_release(void *data, int type, void *event_info) +static Eina_Bool mouse_release(void *data, int type, void *event_info) { SCL_DEBUG(); @@ -693,7 +695,7 @@ Eina_Bool mouse_release(void *data, int type, void *event_info) } #ifdef HANDLE_KEY_EVENTS -Eina_Bool key_pressed(void *data, int type, void *event_info) +static Eina_Bool key_pressed(void *data, int type, void *event_info) { LOGD("=-=-=-=- key_pressed \n"); CSCLController *controller = CSCLController::get_instance(); @@ -783,7 +785,7 @@ Eina_Bool key_pressed(void *data, int type, void *event_info) #endif /*HANDLE_KEY_EVENTS*/ //int mouse_move (void *data, Evas *e, Evas_Object *object, void *event_info) -Eina_Bool mouse_move(void *data, int type, void *event_info) +static Eina_Bool mouse_move(void *data, int type, void *event_info) { SCL_DEBUG(); @@ -965,10 +967,10 @@ CSCLEventsImplEfl::connect_window_events(const sclwindow wnd, const sclint evt) evas_object_event_callback_add((Evas_Object*)wnd, EVAS_CALLBACK_MOUSE_MOVE, mouse_move, NULL);*/ } -Eina_Bool +#ifndef WAYLAND +static Eina_Bool client_message_cb(void *data, int type, void *event) { -#ifndef WAYLAND Ecore_X_Event_Client_Message *ev = (Ecore_X_Event_Client_Message *)event; if (ev->message_type == ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL) { CSCLWindows *windows = CSCLWindows::get_instance(); @@ -996,9 +998,9 @@ client_message_cb(void *data, int type, void *event) } } } -#endif return ECORE_CALLBACK_PASS_ON; } +#endif Eina_Bool timer_event(void *data) { diff --git a/scl/gwes/efl/sclevents-efl.h b/scl/gwes/efl/sclevents-efl.h index 081c1ab..4bd7a2d 100644 --- a/scl/gwes/efl/sclevents-efl.h +++ b/scl/gwes/efl/sclevents-efl.h @@ -49,8 +49,11 @@ private: Ecore_Event_Handler *m_mouse_down_handler; Ecore_Event_Handler *m_mouse_move_handler; Ecore_Event_Handler *m_mouse_up_handler; - Ecore_Event_Handler *m_xclient_msg_handler; Ecore_Event_Handler *m_key_pressed_handler; + +#ifndef WAYLAND + Ecore_Event_Handler *m_xclient_msg_handler; +#endif }; } /* End of scl namespace */ #endif -- 2.7.4