summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-05 16:07:59 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-05 16:07:59 +0000
commit1108fc893b21b52e4885cff41949c107f3908f3e (patch)
tree6f3245d34d5289829b0340fca8635721199c4f11 /src
parentde7dc1c2cc5dd4f76901dc11323ec7eee26240a1 (diff)
efl/edje: improve HAVE_ECORE_IMF conditional handling.
I wonder if we should still support no Ecore_IMF, can we make it mandatory as it's always built with single-tree? SVN revision: 82279
Diffstat (limited to 'src')
-rw-r--r--src/lib/edje/edje_entry.c95
1 files changed, 55 insertions, 40 deletions
diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index fe29d2354e..67be8b3618 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -2882,6 +2882,7 @@ _edje_entry_select_abort(Edje_Real_Part *rp)
2882void * 2882void *
2883_edje_entry_imf_context_get(Edje_Real_Part *rp) 2883_edje_entry_imf_context_get(Edje_Real_Part *rp)
2884{ 2884{
2885#ifdef HAVE_ECORE_IMF
2885 Entry *en; 2886 Entry *en;
2886 2887
2887 if ((rp->type != EDJE_RP_TYPE_TEXT) || 2888 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
@@ -2889,16 +2890,17 @@ _edje_entry_imf_context_get(Edje_Real_Part *rp)
2889 en = rp->typedata.text->entry_data; 2890 en = rp->typedata.text->entry_data;
2890 if (!en) return NULL; 2891 if (!en) return NULL;
2891 2892
2892#ifdef HAVE_ECORE_IMF
2893 return en->imf_context; 2893 return en->imf_context;
2894#else 2894#else
2895 return NULL; 2895 return NULL;
2896 (void)rp;
2896#endif 2897#endif
2897} 2898}
2898 2899
2899void 2900void
2900_edje_entry_autocapital_type_set(Edje_Real_Part *rp, Edje_Text_Autocapital_Type autocapital_type) 2901_edje_entry_autocapital_type_set(Edje_Real_Part *rp, Edje_Text_Autocapital_Type autocapital_type)
2901{ 2902{
2903#ifdef HAVE_ECORE_IMF
2902 Entry *en; 2904 Entry *en;
2903 2905
2904 if ((rp->type != EDJE_RP_TYPE_TEXT) || 2906 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
@@ -2909,15 +2911,18 @@ _edje_entry_autocapital_type_set(Edje_Real_Part *rp, Edje_Text_Autocapital_Type
2909 if (rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) 2911 if (rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD)
2910 autocapital_type = EDJE_TEXT_AUTOCAPITAL_TYPE_NONE; 2912 autocapital_type = EDJE_TEXT_AUTOCAPITAL_TYPE_NONE;
2911 2913
2912#ifdef HAVE_ECORE_IMF
2913 if (en->imf_context) 2914 if (en->imf_context)
2914 ecore_imf_context_autocapital_type_set(en->imf_context, autocapital_type); 2915 ecore_imf_context_autocapital_type_set(en->imf_context, autocapital_type);
2916#else
2917 (void)rp;
2918 (void)autocapital_type;
2915#endif 2919#endif
2916} 2920}
2917 2921
2918Edje_Text_Autocapital_Type 2922Edje_Text_Autocapital_Type
2919_edje_entry_autocapital_type_get(Edje_Real_Part *rp) 2923_edje_entry_autocapital_type_get(Edje_Real_Part *rp)
2920{ 2924{
2925#ifdef HAVE_ECORE_IMF
2921 Entry *en; 2926 Entry *en;
2922 2927
2923 if ((rp->type != EDJE_RP_TYPE_TEXT) || 2928 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
@@ -2925,12 +2930,13 @@ _edje_entry_autocapital_type_get(Edje_Real_Part *rp)
2925 en = rp->typedata.text->entry_data; 2930 en = rp->typedata.text->entry_data;
2926 if (!en) return EDJE_TEXT_AUTOCAPITAL_TYPE_NONE; 2931 if (!en) return EDJE_TEXT_AUTOCAPITAL_TYPE_NONE;
2927 2932
2928#ifdef HAVE_ECORE_IMF
2929 if (en->imf_context) 2933 if (en->imf_context)
2930 return ecore_imf_context_autocapital_type_get(en->imf_context); 2934 return ecore_imf_context_autocapital_type_get(en->imf_context);
2931#endif
2932
2933 return EDJE_TEXT_AUTOCAPITAL_TYPE_NONE; 2935 return EDJE_TEXT_AUTOCAPITAL_TYPE_NONE;
2936#else
2937 return EDJE_TEXT_AUTOCAPITAL_TYPE_NONE;
2938 (void)rp;
2939#endif
2934} 2940}
2935 2941
2936void 2942void
@@ -2992,30 +2998,34 @@ _edje_entry_input_panel_enabled_get(Edje_Real_Part *rp)
2992void 2998void
2993_edje_entry_input_panel_show(Edje_Real_Part *rp) 2999_edje_entry_input_panel_show(Edje_Real_Part *rp)
2994{ 3000{
3001#ifdef HAVE_ECORE_IMF
2995 Entry *en; 3002 Entry *en;
2996 3003
2997 if ((rp->type != EDJE_RP_TYPE_TEXT) || 3004 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
2998 (!rp->typedata.text)) return; 3005 (!rp->typedata.text)) return;
2999 en = rp->typedata.text->entry_data; 3006 en = rp->typedata.text->entry_data;
3000 if (!en) return; 3007 if (!en) return;
3001#ifdef HAVE_ECORE_IMF
3002 if (en->imf_context) 3008 if (en->imf_context)
3003 ecore_imf_context_input_panel_show(en->imf_context); 3009 ecore_imf_context_input_panel_show(en->imf_context);
3010#else
3011 (void)rp;
3004#endif 3012#endif
3005} 3013}
3006 3014
3007void 3015void
3008_edje_entry_input_panel_hide(Edje_Real_Part *rp) 3016_edje_entry_input_panel_hide(Edje_Real_Part *rp)
3009{ 3017{
3018#ifdef HAVE_ECORE_IMF
3010 Entry *en; 3019 Entry *en;
3011 3020
3012 if ((rp->type != EDJE_RP_TYPE_TEXT) || 3021 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
3013 (!rp->typedata.text)) return; 3022 (!rp->typedata.text)) return;
3014 en = rp->typedata.text->entry_data; 3023 en = rp->typedata.text->entry_data;
3015 if (!en) return; 3024 if (!en) return;
3016#ifdef HAVE_ECORE_IMF
3017 if (en->imf_context) 3025 if (en->imf_context)
3018 ecore_imf_context_input_panel_hide(en->imf_context); 3026 ecore_imf_context_input_panel_hide(en->imf_context);
3027#else
3028 (void)rp;
3019#endif 3029#endif
3020} 3030}
3021 3031
@@ -3047,116 +3057,116 @@ _edje_entry_input_panel_language_get(Edje_Real_Part *rp)
3047 return en->input_panel_lang; 3057 return en->input_panel_lang;
3048} 3058}
3049 3059
3050#ifdef HAVE_ECORE_IMF
3051void 3060void
3052_edje_entry_input_panel_imdata_set(Edje_Real_Part *rp, const void *data, int len) 3061_edje_entry_input_panel_imdata_set(Edje_Real_Part *rp, const void *data, int len)
3053#else
3054void
3055_edje_entry_input_panel_imdata_set(Edje_Real_Part *rp, const void *data EINA_UNUSED, int len EINA_UNUSED)
3056#endif
3057{ 3062{
3063#ifdef HAVE_ECORE_IMF
3058 Entry *en; 3064 Entry *en;
3059 3065
3060 if ((rp->type != EDJE_RP_TYPE_TEXT) || 3066 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
3061 (!rp->typedata.text)) return; 3067 (!rp->typedata.text)) return;
3062 en = rp->typedata.text->entry_data; 3068 en = rp->typedata.text->entry_data;
3063 if (!en) return; 3069 if (!en) return;
3064#ifdef HAVE_ECORE_IMF
3065 if (en->imf_context) 3070 if (en->imf_context)
3066 ecore_imf_context_input_panel_imdata_set(en->imf_context, data, len); 3071 ecore_imf_context_input_panel_imdata_set(en->imf_context, data, len);
3072#else
3073 (void)rp;
3074 (void)data;
3075 (void)len;
3067#endif 3076#endif
3068} 3077}
3069 3078
3070#ifdef HAVE_ECORE_IMF
3071void 3079void
3072_edje_entry_input_panel_imdata_get(Edje_Real_Part *rp, void *data, int *len) 3080_edje_entry_input_panel_imdata_get(Edje_Real_Part *rp, void *data, int *len)
3073#else
3074void
3075_edje_entry_input_panel_imdata_get(Edje_Real_Part *rp, void *data EINA_UNUSED, int *len EINA_UNUSED)
3076#endif
3077{ 3081{
3082#ifdef HAVE_ECORE_IMF
3078 Entry *en; 3083 Entry *en;
3079 3084
3080 if ((rp->type != EDJE_RP_TYPE_TEXT) || 3085 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
3081 (!rp->typedata.text)) return; 3086 (!rp->typedata.text)) return;
3082 en = rp->typedata.text->entry_data; 3087 en = rp->typedata.text->entry_data;
3083 if (!en) return; 3088 if (!en) return;
3084#ifdef HAVE_ECORE_IMF
3085 if (en->imf_context) 3089 if (en->imf_context)
3086 ecore_imf_context_input_panel_imdata_get(en->imf_context, data, len); 3090 ecore_imf_context_input_panel_imdata_get(en->imf_context, data, len);
3091#else
3092 (void)rp;
3093 (void)data;
3094 (void)len;
3087#endif 3095#endif
3088} 3096}
3089 3097
3090#ifdef HAVE_ECORE_IMF
3091void 3098void
3092_edje_entry_input_panel_return_key_type_set(Edje_Real_Part *rp, Edje_Input_Panel_Return_Key_Type return_key_type) 3099_edje_entry_input_panel_return_key_type_set(Edje_Real_Part *rp, Edje_Input_Panel_Return_Key_Type return_key_type)
3093#else
3094void
3095_edje_entry_input_panel_return_key_type_set(Edje_Real_Part *rp, Edje_Input_Panel_Return_Key_Type return_key_type EINA_UNUSED)
3096#endif
3097{ 3100{
3101#ifdef HAVE_ECORE_IMF
3098 Entry *en; 3102 Entry *en;
3099 3103
3100 if ((rp->type != EDJE_RP_TYPE_TEXT) || 3104 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
3101 (!rp->typedata.text)) return; 3105 (!rp->typedata.text)) return;
3102 en = rp->typedata.text->entry_data; 3106 en = rp->typedata.text->entry_data;
3103 if (!en) return; 3107 if (!en) return;
3104#ifdef HAVE_ECORE_IMF
3105 if (en->imf_context) 3108 if (en->imf_context)
3106 ecore_imf_context_input_panel_return_key_type_set(en->imf_context, return_key_type); 3109 ecore_imf_context_input_panel_return_key_type_set(en->imf_context, return_key_type);
3110#else
3111 (void)rp;
3112 (void)return_key_type;
3107#endif 3113#endif
3108} 3114}
3109 3115
3110Edje_Input_Panel_Return_Key_Type 3116Edje_Input_Panel_Return_Key_Type
3111_edje_entry_input_panel_return_key_type_get(Edje_Real_Part *rp) 3117_edje_entry_input_panel_return_key_type_get(Edje_Real_Part *rp)
3112{ 3118{
3119#ifdef HAVE_ECORE_IMF
3113 Entry *en; 3120 Entry *en;
3114 3121
3115 if ((rp->type != EDJE_RP_TYPE_TEXT) || 3122 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
3116 (!rp->typedata.text)) return EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT; 3123 (!rp->typedata.text)) return EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
3117 en = rp->typedata.text->entry_data; 3124 en = rp->typedata.text->entry_data;
3118 if (!en) return EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT; 3125 if (!en) return EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
3119#ifdef HAVE_ECORE_IMF
3120 if (en->imf_context) 3126 if (en->imf_context)
3121 return ecore_imf_context_input_panel_return_key_type_get(en->imf_context); 3127 return ecore_imf_context_input_panel_return_key_type_get(en->imf_context);
3122#endif
3123 return EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT; 3128 return EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
3129#else
3130 return EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
3131 (void)rp;
3132#endif
3124} 3133}
3125 3134
3126#ifdef HAVE_ECORE_IMF
3127void 3135void
3128_edje_entry_input_panel_return_key_disabled_set(Edje_Real_Part *rp, Eina_Bool disabled) 3136_edje_entry_input_panel_return_key_disabled_set(Edje_Real_Part *rp, Eina_Bool disabled)
3129#else
3130void
3131_edje_entry_input_panel_return_key_disabled_set(Edje_Real_Part *rp, Eina_Bool disabled EINA_UNUSED)
3132#endif
3133{ 3137{
3138#ifdef HAVE_ECORE_IMF
3134 Entry *en; 3139 Entry *en;
3135 3140
3136 if ((rp->type != EDJE_RP_TYPE_TEXT) || 3141 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
3137 (!rp->typedata.text)) return; 3142 (!rp->typedata.text)) return;
3138 en = rp->typedata.text->entry_data; 3143 en = rp->typedata.text->entry_data;
3139 if (!en) return; 3144 if (!en) return;
3140#ifdef HAVE_ECORE_IMF
3141 if (en->imf_context) 3145 if (en->imf_context)
3142 ecore_imf_context_input_panel_return_key_disabled_set(en->imf_context, disabled); 3146 ecore_imf_context_input_panel_return_key_disabled_set(en->imf_context, disabled);
3147#else
3148 (void)rp;
3149 (void)disabled;
3143#endif 3150#endif
3144} 3151}
3145 3152
3146Eina_Bool 3153Eina_Bool
3147_edje_entry_input_panel_return_key_disabled_get(Edje_Real_Part *rp) 3154_edje_entry_input_panel_return_key_disabled_get(Edje_Real_Part *rp)
3148{ 3155{
3156#ifdef HAVE_ECORE_IMF
3149 Entry *en; 3157 Entry *en;
3150 3158
3151 if ((rp->type != EDJE_RP_TYPE_TEXT) || 3159 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
3152 (!rp->typedata.text)) return EINA_FALSE; 3160 (!rp->typedata.text)) return EINA_FALSE;
3153 en = rp->typedata.text->entry_data; 3161 en = rp->typedata.text->entry_data;
3154 if (!en) return EINA_FALSE; 3162 if (!en) return EINA_FALSE;
3155#ifdef HAVE_ECORE_IMF
3156 if (en->imf_context) 3163 if (en->imf_context)
3157 return ecore_imf_context_input_panel_return_key_disabled_get(en->imf_context); 3164 return ecore_imf_context_input_panel_return_key_disabled_get(en->imf_context);
3158#endif
3159 return EINA_FALSE; 3165 return EINA_FALSE;
3166#else
3167 return EINA_FALSE;
3168 (void)rp;
3169#endif
3160} 3170}
3161 3171
3162static Evas_Textblock_Cursor * 3172static Evas_Textblock_Cursor *
@@ -3519,16 +3529,17 @@ _edje_entry_cursor_pos_get(Edje_Real_Part *rp, Edje_Cursor cur)
3519void 3529void
3520_edje_entry_input_panel_layout_set(Edje_Real_Part *rp, Edje_Input_Panel_Layout layout) 3530_edje_entry_input_panel_layout_set(Edje_Real_Part *rp, Edje_Input_Panel_Layout layout)
3521{ 3531{
3532#ifdef HAVE_ECORE_IMF
3522 Entry *en; 3533 Entry *en;
3523 3534
3524 if ((rp->type != EDJE_RP_TYPE_TEXT) || 3535 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
3525 (!rp->typedata.text)) return; 3536 (!rp->typedata.text)) return;
3526 en = rp->typedata.text->entry_data; 3537 en = rp->typedata.text->entry_data;
3527 if (!en) return; 3538 if (!en) return;
3528#ifdef HAVE_ECORE_IMF
3529 if (en->imf_context) 3539 if (en->imf_context)
3530 ecore_imf_context_input_panel_layout_set(en->imf_context, layout); 3540 ecore_imf_context_input_panel_layout_set(en->imf_context, layout);
3531#else 3541#else
3542 (void) rp;
3532 (void) layout; 3543 (void) layout;
3533#endif 3544#endif
3534} 3545}
@@ -3536,32 +3547,36 @@ _edje_entry_input_panel_layout_set(Edje_Real_Part *rp, Edje_Input_Panel_Layout l
3536Edje_Input_Panel_Layout 3547Edje_Input_Panel_Layout
3537_edje_entry_input_panel_layout_get(Edje_Real_Part *rp) 3548_edje_entry_input_panel_layout_get(Edje_Real_Part *rp)
3538{ 3549{
3550#ifdef HAVE_ECORE_IMF
3539 Entry *en; 3551 Entry *en;
3540 3552
3541 if ((rp->type != EDJE_RP_TYPE_TEXT) || 3553 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
3542 (!rp->typedata.text)) return EDJE_INPUT_PANEL_LAYOUT_INVALID; 3554 (!rp->typedata.text)) return EDJE_INPUT_PANEL_LAYOUT_INVALID;
3543 en = rp->typedata.text->entry_data; 3555 en = rp->typedata.text->entry_data;
3544 if (!en) return EDJE_INPUT_PANEL_LAYOUT_INVALID; 3556 if (!en) return EDJE_INPUT_PANEL_LAYOUT_INVALID;
3545#ifdef HAVE_ECORE_IMF
3546 if (en->imf_context) 3557 if (en->imf_context)
3547 return ecore_imf_context_input_panel_layout_get(en->imf_context); 3558 return ecore_imf_context_input_panel_layout_get(en->imf_context);
3548#endif
3549
3550 return EDJE_INPUT_PANEL_LAYOUT_INVALID; 3559 return EDJE_INPUT_PANEL_LAYOUT_INVALID;
3560#else
3561 return EDJE_INPUT_PANEL_LAYOUT_INVALID;
3562 (void)rp;
3563#endif
3551} 3564}
3552 3565
3553void 3566void
3554_edje_entry_imf_context_reset(Edje_Real_Part *rp) 3567_edje_entry_imf_context_reset(Edje_Real_Part *rp)
3555{ 3568{
3569#ifdef HAVE_ECORE_IMF
3556 Entry *en; 3570 Entry *en;
3557 3571
3558 if ((rp->type != EDJE_RP_TYPE_TEXT) || 3572 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
3559 (!rp->typedata.text)) return; 3573 (!rp->typedata.text)) return;
3560 en = rp->typedata.text->entry_data; 3574 en = rp->typedata.text->entry_data;
3561 if (!en) return; 3575 if (!en) return;
3562#ifdef HAVE_ECORE_IMF
3563 if (en->imf_context) 3576 if (en->imf_context)
3564 ecore_imf_context_reset(en->imf_context); 3577 ecore_imf_context_reset(en->imf_context);
3578#else
3579 (void)rp;
3565#endif 3580#endif
3566} 3581}
3567 3582