From: Jihoon Kim Date: Tue, 18 Oct 2016 00:19:01 +0000 (+0900) Subject: Use #ifdef not #if X-Git-Tag: accepted/tizen/common/20161018.175456~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F42%2F92642%2F2;p=platform%2Fcore%2Fuifw%2Fisf.git Use #ifdef not #if Change-Id: I9ea8521824fa9ce770c0dc99af7fc5ac6474e581 Signed-off-by: Jihoon Kim --- diff --git a/ism/extras/efl_panel/isf_panel_efl.cpp b/ism/extras/efl_panel/isf_panel_efl.cpp index 07bcecc..8593585 100644 --- a/ism/extras/efl_panel/isf_panel_efl.cpp +++ b/ism/extras/efl_panel/isf_panel_efl.cpp @@ -44,18 +44,18 @@ #include "scim_private.h" #include "scim.h" #include "scim_stl_map.h" -#if HAVE_ECOREX +#ifdef HAVE_ECOREX #include #endif -#if HAVE_X +#ifdef HAVE_X #include #include #endif -#if HAVE_ECOREWL +#ifdef HAVE_ECOREWL #include #endif #include -#if HAVE_VCONF +#ifdef HAVE_VCONF #include #include #endif @@ -64,17 +64,17 @@ #include #include #endif -#if HAVE_TTS +#ifdef HAVE_TTS #include #endif #include -#if HAVE_FEEDBACK +#ifdef HAVE_FEEDBACK #include #endif -#if HAVE_BLUETOOTH +#ifdef HAVE_BLUETOOTH #include #endif -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO #include #include #endif @@ -160,12 +160,12 @@ typedef std::vector < std::pair > VectorPairStringUint32; ///////////////////////////////////////////////////////////////////////////// static Evas_Object *efl_create_window (const char *strWinName, const char *strEffect); -#if HAVE_ECOREX +#ifdef HAVE_ECOREX static void efl_set_transient_for_app_window (Ecore_X_Window window); #endif static int efl_get_app_window_angle (void); static int efl_get_ise_window_angle (void); -#if HAVE_ECOREX +#ifdef HAVE_ECOREX static int efl_get_quickpanel_window_angle (void); #endif @@ -251,7 +251,7 @@ static void slot_send_remote_input_message (const String &msg, bool static void slot_recv_remote_surrounding_text (int cursor, const String &text); #endif -#if HAVE_ECOREX +#ifdef HAVE_ECOREX static Eina_Bool efl_create_control_window (void); static Ecore_X_Window efl_get_app_window (void); static Ecore_X_Window efl_get_quickpanel_window (void); @@ -409,20 +409,20 @@ static clock_t _clock_start; static Ecore_Timer *_check_size_timer = NULL; static Ecore_Timer *_longpress_timer = NULL; static Ecore_Timer *_destroy_timer = NULL; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX static Ecore_Timer *_off_prepare_done_timer = NULL; #endif static Ecore_Timer *_candidate_hide_timer = NULL; static Ecore_Timer *_ise_hide_timer = NULL; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX static Ecore_X_Window _ise_window = 0; static Ecore_X_Window _app_window = 0; static Ecore_X_Window _control_window = 0; static Ecore_X_Window _input_win = 0; #endif -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO static package_manager_h pkgmgr = NULL; static VectorPairStringUint32 g_pkgids_to_be_uninstalled; static Ecore_Timer *g_release_uninstalled_ime_info_timer = NULL; @@ -453,11 +453,11 @@ static NotificationData hwkbd_module_noti = {"Input detected f static NotificationData ise_selector_module_noti = {"Select input method", NULL, ISF_ISE_SELECTOR_ICON_FILE, "", 0}; #endif -#if HAVE_TTS +#ifdef HAVE_TTS static tts_h _tts = NULL; #endif -#if HAVE_FEEDBACK +#ifdef HAVE_FEEDBACK static bool feedback_initialized = false; #endif @@ -469,7 +469,7 @@ static Remote_Input* remote_input_impl = NULL; static bool launch_remote_input = false; #endif -#if HAVE_ECOREX +#ifdef HAVE_ECOREX static Ecore_Event_Handler *_candidate_show_handler = NULL; #endif @@ -503,7 +503,7 @@ static struct GeometryCache _ise_reported_geometry = {0, 0, {0, 0, 0, 0 static struct GeometryCache _portrait_recent_ise_geometry = {0, 0, {0, 0, 0, 0}}; static struct GeometryCache _landscape_recent_ise_geometry = {0, 0, {0, 0, 0, 0}}; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX static void get_input_window (void) { int win_ret = -1; @@ -933,7 +933,7 @@ static struct rectinfo get_ise_geometry () struct rectinfo info = {0, 0, 0, 0}; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX int w = 0, h = 0; Ecore_X_Window gnb_win = efl_get_global_navigation_window (); if (gnb_win > 0) @@ -943,7 +943,7 @@ static struct rectinfo get_ise_geometry () int win_w = _screen_width, win_h = _screen_height; int angle = (_ise_angle == -1) ? efl_get_app_window_angle () : _ise_angle; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /* The height of global navigation bar */ int gnb_height = h; @@ -965,7 +965,7 @@ static struct rectinfo get_ise_geometry () } } else { /* READ ISE's SIZE HINT HERE */ -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /* int pos_x, pos_y, width, height; if (ecore_x_e_window_rotation_geometry_get (_ise_window, angle, @@ -1023,7 +1023,7 @@ static struct rectinfo get_ise_geometry () return info; } -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /** * @brief Set keyboard geometry for autoscroll. * This includes the ISE geometry together with candidate window @@ -1173,7 +1173,7 @@ static void _initialize_ime_info (void) } } -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO /** * @brief Insert or update ime_info data with pkgid. * @@ -1816,7 +1816,7 @@ static bool set_active_ise (const String &uuid, bool launch_ise) _config->reload (); _info_manager->reload_config (); -#if HAVE_VCONF +#ifdef HAVE_VCONF vconf_set_str (VCONFKEY_ISF_ACTIVE_KEYBOARD_UUID, uuid.c_str ()); #endif } @@ -1922,7 +1922,7 @@ static void ui_candidate_window_resize (int new_width, int new_height) (_ise_height > 0 && (_candidate_height - height) > _ise_height) || ((_candidate_angle == 90 || _candidate_angle == 270) && (_ise_width < _screen_height)) || ((_candidate_angle == 0 || _candidate_angle == 180) && (_ise_width > _screen_width ))) { -#if HAVE_ECOREX +#ifdef HAVE_ECOREX set_keyboard_geometry_atom_info (_app_window, get_ise_geometry ()); #endif _info_manager->update_input_panel_event (ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, 0); @@ -1957,7 +1957,7 @@ static void ui_candidate_window_resize (int new_width, int new_height) LOGD ("window_rotation_geometry_set (_candidate_window), port (%d, %d), land (%d, %d)\n", port_width, port_height, land_width, land_height); -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /* ecore_x_e_window_rotation_geometry_set (elm_win_xwindow_get (_candidate_window), 0, 0, 0, port_width, port_height); @@ -1993,7 +1993,7 @@ static void ui_candidate_window_adjust (void) int x = 0, y = 0, width = 0, height = 0; /* Get candidate window size */ -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /* if (_candidate_angle == 90 || _candidate_angle == 270) { ecore_x_e_window_rotation_geometry_get (elm_win_xwindow_get (_candidate_window), _candidate_angle, @@ -2240,7 +2240,7 @@ static Eina_Bool ui_candidate_destroy_timeout (void *data) return ECORE_CALLBACK_CANCEL; } -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /** * @brief Callback function for off_prepare_done. * @@ -2319,7 +2319,7 @@ static Eina_Bool candidate_hide_timer (void *data) return ECORE_CALLBACK_CANCEL; } -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /** * @brief Delete candidate show handler. * @@ -2419,7 +2419,7 @@ static void ui_candidate_show (bool bSetVirtualKbd) _candidate_state = WINDOW_STATE_WILL_SHOW; } -#if HAVE_ECOREX +#ifdef HAVE_ECOREX if (_info_manager->get_current_toolbar_mode () == TOOLBAR_KEYBOARD_MODE) { /* WMSYNC, #3 Clear the existing application's conformant area and set transient_for */ // Unset conformant area @@ -2463,7 +2463,7 @@ static void ui_candidate_show (bool bSetVirtualKbd) } if (_candidate_state != WINDOW_STATE_SHOW) { -#if HAVE_ECOREX +#ifdef HAVE_ECOREX if (_candidate_show_handler) { LOGD ("Was still waiting for CANDIDATE_WINDOW_SHOW....\n"); } else { @@ -2527,7 +2527,7 @@ static void ui_candidate_hide (bool bForce, bool bSetVirtualKbd, bool will_hide) if (_candidate_mode == FIXED_CANDIDATE_WINDOW) { _info_manager->update_input_panel_event (ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, 0); /* FIXME : should check if bSetVirtualKbd flag is really needed in this case */ -#if HAVE_ECOREX +#ifdef HAVE_ECOREX if (_ise_state == WINDOW_STATE_SHOW) { set_keyboard_geometry_atom_info (_app_window, get_ise_geometry ()); } else { @@ -2682,7 +2682,7 @@ static void ui_mouse_button_pressed_cb (void *data, Evas *e, Evas_Object *button if (_click_object == ISF_EFL_CANDIDATE_0 || _click_object == ISF_EFL_CANDIDATE_ITEMS) { int index = GPOINTER_TO_INT (data) >> 8; -#if HAVE_FEEDBACK +#ifdef HAVE_FEEDBACK if (feedback_initialized) { int feedback_result = 0; bool sound_feedback = _config->read (SCIM_GLOBAL_CONFIG_PANEL_SOUND_FEEDBACK, false); @@ -2785,7 +2785,7 @@ static void ui_mouse_moved_cb (void *data, Evas *e, Evas_Object *button, void *e } } -#if HAVE_TTS +#ifdef HAVE_TTS /** * @brief Open TTS device. * @@ -2958,7 +2958,7 @@ static void ui_candidate_scroller_stop_cb (void *data, Evas_Object *obj, void *e _wait_stop_event = false; } -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /** * @brief Mouse over (find focus object and play text by TTS) when screen reader is enabled. * @@ -2979,7 +2979,7 @@ static void ui_mouse_over (int mouse_x, int mouse_y) /* FIXME: Should consider emoji case */ String mbs = utf8_wcstombs (g_isf_candidate_table.get_candidate_in_current_page (i)); SCIM_DEBUG_MAIN (3) << __FUNCTION__ << " play candidate string: " << mbs << "\n"; -#if HAVE_TTS +#ifdef HAVE_TTS ui_play_tts (mbs.c_str ()); #endif _candidate_tts_focus_index = i; @@ -3005,7 +3005,7 @@ static void ui_mouse_over (int mouse_x, int mouse_y) ui_tts_focus_rect_show (x, y, width, height); } } -#if HAVE_TTS +#ifdef HAVE_TTS if (strTts.length () > 0) ui_play_tts (strTts.c_str ()); #endif @@ -3138,7 +3138,7 @@ static void ui_create_native_candidate_window (void) _candidate_width = _candidate_port_width; _candidate_height = _candidate_port_height_min; } -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /* ecore_x_e_window_rotation_geometry_set (elm_win_xwindow_get (_candidate_window), 0, 0, 0, _candidate_port_width, _candidate_port_height_min); @@ -3285,7 +3285,7 @@ static void ui_create_candidate_window (void) ui_create_native_candidate_window (); -#if HAVE_ECOREX +#ifdef HAVE_ECOREX unsigned int set = 1; ecore_x_window_prop_card32_set (elm_win_xwindow_get (_candidate_window), @@ -3436,7 +3436,7 @@ static void ui_settle_candidate_window (void) /* Get candidate window position */ ecore_evas_geometry_get (ecore_evas_ecore_evas_get (evas_object_evas_get (_candidate_window)), &x, &y, &width, &height); -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /* int pos_x = 0, pos_y = 0; if (_candidate_angle == 90 || _candidate_angle == 270) @@ -3578,7 +3578,7 @@ static void set_soft_candidate_geometry (int x, int y, int width, int height) _soft_candidate_width = width; _soft_candidate_height = height; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX set_keyboard_geometry_atom_info (_app_window, get_ise_geometry()); #endif _info_manager->update_input_panel_event (ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, 0); @@ -3588,7 +3588,7 @@ static void set_soft_candidate_geometry (int x, int y, int width, int height) ////////////////////////////////////////////////////////////////////// // End of Candidate Functions ////////////////////////////////////////////////////////////////////// -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /** * @brief Set transient for app window. * @@ -3639,7 +3639,7 @@ static int efl_get_window_rotate_angle (Ecore_X_Window win) static int efl_get_app_window_angle () { SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n"; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX return efl_get_window_rotate_angle (efl_get_app_window ()); #else //FIXME: @@ -3657,7 +3657,7 @@ static int efl_get_app_window_angle () static int efl_get_ise_window_angle () { SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n"; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX return efl_get_window_rotate_angle (_ise_window); #else //FIXME: @@ -3665,7 +3665,7 @@ static int efl_get_ise_window_angle () #endif } -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /** * @brief Get angle of quickpanel window. * @@ -3687,7 +3687,7 @@ static int efl_get_quickpanel_window_angle () static void efl_set_showing_effect_for_app_window (Evas_Object *win, const char* strEffect) { SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n"; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX ecore_x_icccm_name_class_set (elm_win_xwindow_get (static_cast(win)), strEffect, "ISF"); #endif } @@ -3718,7 +3718,7 @@ static Evas_Object *efl_create_window (const char *strWinName, const char *strEf return win; } -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /** * @brief Create elementary control window. * @@ -3896,7 +3896,7 @@ static void efl_get_screen_resolution (int &width, int &height) static Evas_Coord scr_w = 0, scr_h = 0; if (scr_w == 0 || scr_h == 0) { -#if HAVE_ECOREX +#ifdef HAVE_ECOREX uint w = 0, h = 0; if (efl_get_default_zone_geometry_info (ecore_x_window_root_first_get (), NULL, NULL, &w, &h)) { scr_w = w; @@ -4031,7 +4031,7 @@ static void hide_ise () _updated_hide_state_geometry = false; } _ise_angle = -1; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX ecore_x_event_mask_unset (_app_window, ECORE_X_EVENT_MASK_WINDOW_FOCUS_CHANGE); #endif if (_candidate_window) { @@ -4125,7 +4125,7 @@ static bool update_ise_list (std::vector &list) } } -#if HAVE_VCONF +#ifdef HAVE_VCONF char *lang_str = vconf_get_str (VCONFKEY_LANGSET); if (lang_str) { if (_ime_info.size () > 0 && _ime_info[0].display_lang.compare(lang_str) == 0) @@ -4136,7 +4136,7 @@ static bool update_ise_list (std::vector &list) } -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO if (!pkgmgr) { int ret = package_manager_create (&pkgmgr); if (ret == PACKAGE_MANAGER_ERROR_NONE) { @@ -4384,7 +4384,7 @@ static void slot_update_ise_geometry (int x, int y, int width, int height) _ise_reported_geometry.geometry.width = width; _ise_reported_geometry.geometry.height = height; if (_ise_state == WINDOW_STATE_SHOW) { -#if HAVE_ECOREX +#ifdef HAVE_ECOREX set_keyboard_geometry_atom_info (_app_window, _ise_reported_geometry.geometry); #endif _info_manager->update_input_panel_event (ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, 0); @@ -4476,7 +4476,7 @@ static void slot_show_candidate_table (void) if (_candidate_window == NULL) ui_create_candidate_window (); -#if HAVE_ECOREX +#ifdef HAVE_ECOREX if (_candidate_state == WINDOW_STATE_SHOW && (_candidate_area_1_visible || _candidate_area_2_visible)) { efl_set_transient_for_app_window (elm_win_xwindow_get (_candidate_window)); @@ -4493,7 +4493,7 @@ static void slot_show_candidate_table (void) ui_settle_candidate_window (); ui_candidate_delete_destroy_timer (); -#if HAVE_FEEDBACK +#ifdef HAVE_FEEDBACK int feedback_result = feedback_initialize (); if (FEEDBACK_ERROR_NONE == feedback_result) { @@ -4588,7 +4588,7 @@ static void slot_hide_candidate_table (void) ui_settle_candidate_window (); } -#if HAVE_FEEDBACK +#ifdef HAVE_FEEDBACK int feedback_result = feedback_deinitialize (); if (FEEDBACK_ERROR_NONE == feedback_result) @@ -5264,7 +5264,7 @@ static void slot_set_active_ise (const String &uuid, bool changeDefault) bool invalid = false; -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO /* When changing the active (default) keyboard, initialize ime_info DB if appid is invalid. This may be necessary if IME packages are changed while panel process is terminated. */ pkgmgrinfo_appinfo_h handle = NULL; @@ -5415,7 +5415,7 @@ static void slot_set_enable_helper_ise_info (const String &appid, bool is_enable } } -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO /** * @brief Finds appid with specific category * @@ -5454,7 +5454,7 @@ static void slot_show_helper_ise_list (void) int ret; app_control_h app_control; char *app_id = NULL; -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO pkgmgrinfo_appinfo_filter_h handle; if (ime_list_app.length() < 1) { @@ -5524,7 +5524,7 @@ static void slot_show_helper_ise_selector (void) int ret; app_control_h app_control; char *app_id = NULL; -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO pkgmgrinfo_appinfo_filter_h handle; if (ime_selector_app.length() < 1) { @@ -5805,7 +5805,7 @@ static void slot_accept_connection (int fd) { SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n"; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX get_input_window (); #endif } @@ -5835,7 +5835,7 @@ static void slot_exit (void) static void slot_register_helper_properties (int id, const PropertyList &props) { SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n"; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /* WMSYNC, #2 Receiving X window ID from ISE */ /* FIXME : We should add an API to set window id of ISE */ Property prop = props[0]; @@ -5901,7 +5901,7 @@ static void slot_show_ise (void) LOGD ("slot_show_ise ()\n"); delete_ise_hide_timer (); -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /* WMSYNC, #3 Clear the existing application's conformant area and set transient_for */ // Unset conformant area Ecore_X_Window current_app_window = efl_get_app_window (); @@ -5972,7 +5972,7 @@ static void slot_hide_ise (void) static void slot_will_hide_ack (void) { SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n"; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /* WMSYNC, #8 Let the Window Manager to actually hide keyboard window */ // WILL_HIDE_REQUEST_DONE Ack to WM Ecore_X_Window root_window = ecore_x_window_root_get (_control_window); @@ -6000,7 +6000,7 @@ static void slot_will_hide_ack (void) static void slot_candidate_will_hide_ack (void) { SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n"; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX LOGD ("candidate_will_hide_ack\n"); if (_candidate_state == WINDOW_STATE_WILL_HIDE) { candidate_window_hide (); @@ -6150,7 +6150,7 @@ static void slot_run_helper (const String &uuid, const String &config, const Str String strDisplay = display; String scim_helper_path; -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO char *execpath = NULL; int ret; pkgmgrinfo_appinfo_h appinfo_handle; @@ -6223,7 +6223,7 @@ static void signalhandler (int sig) elm_exit (); } -#if HAVE_VCONF +#ifdef HAVE_VCONF static void update_ise_locale () { char *lang_str = vconf_get_str (VCONFKEY_LANGSET); @@ -6236,7 +6236,7 @@ static void update_ise_locale () set_language_and_locale (); bool need_to_init_db = false; -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO int ret = 0; bool exist = false; char *label = NULL; @@ -6298,7 +6298,7 @@ static void set_language_and_locale (void) { SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n"; -#if HAVE_VCONF +#ifdef HAVE_VCONF char *lang_str = vconf_get_str (VCONFKEY_LANGSET); if (lang_str) { @@ -6378,7 +6378,7 @@ static void change_keyboard_mode (TOOLBAR_MODE_T mode) unsigned int val = 0; #endif -#if HAVE_VCONF +#ifdef HAVE_VCONF int input_detect = false; #endif @@ -6437,7 +6437,7 @@ static void change_keyboard_mode (TOOLBAR_MODE_T mode) _info_manager->stop_helper (helper_uuid); _soft_keyboard_launched = false; } -#if HAVE_ECOREX +#ifdef HAVE_ECOREX ecore_x_event_mask_set (efl_get_quickpanel_window (), ECORE_X_EVENT_MASK_WINDOW_PROPERTY); #endif @@ -6451,7 +6451,7 @@ static void change_keyboard_mode (TOOLBAR_MODE_T mode) create_notification (&hwkbd_module_noti); #endif -#if HAVE_VCONF +#ifdef HAVE_VCONF vconf_get_bool (VCONFKEY_ISF_HW_KEYBOARD_INPUT_DETECTED, &input_detect); if (!input_detect) { @@ -6488,7 +6488,7 @@ static void change_keyboard_mode (TOOLBAR_MODE_T mode) delete_notification (&hwkbd_module_noti); #endif -#if HAVE_VCONF +#ifdef HAVE_VCONF vconf_get_bool (VCONFKEY_ISF_HW_KEYBOARD_INPUT_DETECTED, &input_detect); if (input_detect) { @@ -6503,7 +6503,7 @@ static void change_keyboard_mode (TOOLBAR_MODE_T mode) _config->reload (); } -#if HAVE_BLUETOOTH +#ifdef HAVE_BLUETOOTH /** * @brief Callback function for the connection state of Bluetooth Keyboard * @@ -6565,7 +6565,7 @@ static void show_ime_selector_notification () } #endif -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /** * @brief Callback function for ECORE_X_EVENT_WINDOW_PROPERTY. * @@ -6615,7 +6615,7 @@ static Eina_Bool x_event_window_property_cb (void *data, int ev_type, void *even _info_manager->update_input_panel_event ( ECORE_IMF_INPUT_PANEL_STATE_EVENT, ECORE_IMF_INPUT_PANEL_STATE_SHOW); -#if HAVE_VCONF +#ifdef HAVE_VCONF vconf_set_int (VCONFKEY_ISF_INPUT_PANEL_STATE, VCONFKEY_ISF_INPUT_PANEL_STATE_SHOW); #endif @@ -6657,7 +6657,7 @@ static Eina_Bool x_event_window_property_cb (void *data, int ev_type, void *even ui_settle_candidate_window (); } -#if HAVE_VCONF +#ifdef HAVE_VCONF vconf_set_int (VCONFKEY_ISF_INPUT_PANEL_STATE, VCONFKEY_ISF_INPUT_PANEL_STATE_HIDE); #endif @@ -6910,7 +6910,7 @@ static Eina_Bool x_event_client_message_cb (void *data, int type, void *event) ui_tts_focus_rect_hide (); } -#if HAVE_TTS +#ifdef HAVE_TTS if (strTts.length () > 0) ui_play_tts (strTts.c_str ()); #endif @@ -6932,7 +6932,7 @@ static Eina_Bool x_event_client_message_cb (void *data, int type, void *event) Eina_Bool check_focus_out_by_popup_win () { Eina_Bool ret = EINA_FALSE; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX Ecore_X_Window focus_win = ecore_x_window_focus_get (); Ecore_X_Window_Type win_type = ECORE_X_WINDOW_TYPE_UNKNOWN; @@ -6949,7 +6949,7 @@ Eina_Bool check_focus_out_by_popup_win () return ret; } -#if HAVE_ECOREX +#ifdef HAVE_ECOREX /** * @brief Callback function for focus out event of application window * @@ -7059,7 +7059,7 @@ int main (int argc, char *argv []) String display_name = String (); char buf[256] = {0}; -#if HAVE_ECOREX +#ifdef HAVE_ECOREX Ecore_Event_Handler *xclient_message_handler = NULL; Ecore_Event_Handler *xwindow_property_handler = NULL; Ecore_Event_Handler *xwindow_focus_out_handler = NULL; @@ -7255,7 +7255,7 @@ int main (int argc, char *argv []) /* Connect the configuration reload signal. */ _config_connection = _config->signal_connect_reload (slot (config_reload_cb)); -#if HAVE_ECOREX +#ifdef HAVE_ECOREX if (!efl_create_control_window ()) { LOGW ("Failed to create control window\n"); goto cleanup; @@ -7282,7 +7282,7 @@ int main (int argc, char *argv []) set_language_and_locale (); -#if HAVE_VCONF +#ifdef HAVE_VCONF /* Add callback function for input language and display language */ vconf_notify_key_changed (VCONFKEY_LANGSET, display_language_changed_cb, NULL); vconf_notify_key_changed (VCONFKEY_ISF_HW_KEYBOARD_INPUT_DETECTED, keyboard_mode_changed_cb, NULL); @@ -7323,13 +7323,13 @@ int main (int argc, char *argv []) } catch (scim::Exception & e) { std::cerr << e.what () << "\n"; } -#if HAVE_ECOREX +#ifdef HAVE_ECOREX xclient_message_handler = ecore_event_handler_add (ECORE_X_EVENT_CLIENT_MESSAGE, x_event_client_message_cb, NULL); xwindow_property_handler = ecore_event_handler_add (ECORE_X_EVENT_WINDOW_PROPERTY, x_event_window_property_cb, NULL); xwindow_focus_out_handler = ecore_event_handler_add (ECORE_X_EVENT_WINDOW_FOCUS_OUT, x_event_window_focus_out_cb, NULL); #endif -#if HAVE_BLUETOOTH +#ifdef HAVE_BLUETOOTH /* Register the callback function of Bluetooth connection */ ret = bt_initialize (); if (ret != BT_ERROR_NONE) @@ -7382,7 +7382,7 @@ int main (int argc, char *argv []) _config->flush (); ret = 0; -#if HAVE_BLUETOOTH +#ifdef HAVE_BLUETOOTH /* deinitialize the callback function of Bluetooth connection */ ret = bt_hid_host_deinitialize (); if (ret != BT_ERROR_NONE) @@ -7393,7 +7393,7 @@ int main (int argc, char *argv []) LOGW ("bt_deinitialize failed: %d\n", ret); #endif -#if HAVE_ECOREX +#ifdef HAVE_ECOREX if (xclient_message_handler) { ecore_event_handler_del (xclient_message_handler); xclient_message_handler = NULL; @@ -7410,7 +7410,7 @@ int main (int argc, char *argv []) } #endif -#if HAVE_VCONF +#ifdef HAVE_VCONF /* Remove callback function for input language and display language */ vconf_ignore_key_changed (VCONFKEY_LANGSET, display_language_changed_cb); vconf_ignore_key_changed (VCONFKEY_ISF_HW_KEYBOARD_INPUT_DETECTED, keyboard_mode_changed_cb); @@ -7421,14 +7421,14 @@ cleanup: ui_candidate_delete_check_size_timer (); ui_candidate_delete_longpress_timer (); ui_candidate_delete_destroy_timer (); -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO if (pkgmgr) { package_manager_destroy (pkgmgr); pkgmgr = NULL; } #endif -#if HAVE_TTS +#ifdef HAVE_TTS ui_close_tts (); #endif diff --git a/ism/extras/efl_panel/isf_panel_utility.cpp b/ism/extras/efl_panel/isf_panel_utility.cpp index f78e61f..73d2464 100644 --- a/ism/extras/efl_panel/isf_panel_utility.cpp +++ b/ism/extras/efl_panel/isf_panel_utility.cpp @@ -40,7 +40,7 @@ #include "isf_panel_efl.h" #include "isf_panel_utility.h" #include "isf_query_utility.h" -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO #include #endif #include "isf_pkg.h" diff --git a/ism/extras/kbd_mode_changer/main.cpp b/ism/extras/kbd_mode_changer/main.cpp index ea9ea36..e5050e6 100644 --- a/ism/extras/kbd_mode_changer/main.cpp +++ b/ism/extras/kbd_mode_changer/main.cpp @@ -24,7 +24,7 @@ #include "scim_private.h" #include "scim_visibility.h" -#if HAVE_VCONF +#ifdef HAVE_VCONF #include #endif #include "main.h" @@ -42,7 +42,7 @@ static void app_control (app_control_h app_control, void *user_data) LOGD ("isf_extra_hwkbd_module start\n"); /* Toggle input mode */ -#if HAVE_VCONF +#ifdef HAVE_VCONF int val = 1; if (vconf_get_bool (VCONFKEY_ISF_HW_KEYBOARD_INPUT_DETECTED, &val) != 0) LOGW ("Failed to get vconf key\n"); diff --git a/ism/modules/frontend/scim_socket_frontend.cpp b/ism/modules/frontend/scim_socket_frontend.cpp index 2e152e7..fb9c47d 100644 --- a/ism/modules/frontend/scim_socket_frontend.cpp +++ b/ism/modules/frontend/scim_socket_frontend.cpp @@ -69,7 +69,7 @@ #include #include #include -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO #include #endif #include "isf_debug.h" @@ -285,7 +285,7 @@ void SocketFrontEnd::run_helper (const Socket &client) } ISF_SAVE_LOG ("uuid(%s), config(%s), display(%s)\n", uuid.c_str (), config.c_str (), display.c_str ()); -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO char *execpath = NULL; int ret; pkgmgrinfo_appinfo_h appinfo_handle; diff --git a/ism/modules/panelagent/wayland/isf_wsc_control_ui.cpp b/ism/modules/panelagent/wayland/isf_wsc_control_ui.cpp index 72e9f0e..e9e9dc0 100644 --- a/ism/modules/panelagent/wayland/isf_wsc_control_ui.cpp +++ b/ism/modules/panelagent/wayland/isf_wsc_control_ui.cpp @@ -183,7 +183,7 @@ void isf_wsc_context_input_panel_show (WSCContextISF* wsc_ctx) caps_mode_check (wsc_ctx, EINA_TRUE, EINA_TRUE); -#if HAVE_VCONF +#ifdef HAVE_VCONF vconf_set_int (VCONFKEY_ISF_INPUT_PANEL_STATE, VCONFKEY_ISF_INPUT_PANEL_STATE_SHOW); #endif } @@ -193,7 +193,7 @@ void isf_wsc_context_input_panel_hide (WSCContextISF *ctx) int context_id = _get_context_id (ctx); _isf_wsc_context_input_panel_hide (get_panel_client_id (), context_id); -#if HAVE_VCONF +#ifdef HAVE_VCONF vconf_set_int (VCONFKEY_ISF_INPUT_PANEL_STATE, VCONFKEY_ISF_INPUT_PANEL_STATE_HIDE); #endif } diff --git a/ism/src/isf_pkg.cpp b/ism/src/isf_pkg.cpp index 9f1a059..deb7f96 100644 --- a/ism/src/isf_pkg.cpp +++ b/ism/src/isf_pkg.cpp @@ -30,7 +30,7 @@ #include #include "scim_private.h" #include "scim.h" -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO #include #endif #include @@ -48,7 +48,7 @@ using namespace scim; -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO /** * @brief Read data from ime category manifest and insert initial db * @@ -270,7 +270,7 @@ int isf_pkg_ime_app_list_cb (const pkgmgrinfo_appinfo_h handle, void *user_data) */ void isf_pkg_reload_ime_info_db(void) { -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO pkgmgrinfo_appinfo_filter_h handle; int ret = pkgmgrinfo_appinfo_filter_create (&handle); if (ret == PMINFO_R_OK) { diff --git a/ism/src/isf_pkg.h b/ism/src/isf_pkg.h index 011d770..2b3efe7 100644 --- a/ism/src/isf_pkg.h +++ b/ism/src/isf_pkg.h @@ -25,11 +25,11 @@ #ifndef __ISF_PKG_H__ #define __ISF_PKG_H__ -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO #include #endif -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO int isf_pkg_ime_app_list_cb (const pkgmgrinfo_appinfo_h handle, void *user_data); #endif void isf_pkg_reload_ime_info_db(void); diff --git a/ism/src/scim_helper.cpp b/ism/src/scim_helper.cpp index e05e04f..1962a2d 100644 --- a/ism/src/scim_helper.cpp +++ b/ism/src/scim_helper.cpp @@ -57,7 +57,7 @@ #include #include "isf_debug.h" #include "isf_message_queue.h" -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO #include #endif // HAVE_PKGMGR_INFO @@ -2280,7 +2280,7 @@ HelperAgent::set_keyboard_ise_by_uuid (const String &uuid) const return; } -#if HAVE_PKGMGR_INFO +#ifdef HAVE_PKGMGR_INFO int ret = 0; char *pkgid = NULL; pkgmgrinfo_appinfo_h handle;