Eina_Bool vkbd_state;
};
-struct _menu_item {
- const char *name;
- void (*func)(void *data, Evas_Object *obj, void *event_info);
-};
-
// Utility functions
Evas_Object *create_ef (Evas_Object *parent, const char *label, const char *guide_text, Evas_Object **entry = NULL);
void add_layout_to_naviframe (void *data, Evas_Object *lay_in, const char *title);
#include "isf_demo_efl.h"
#include "isf_autocapital_efl.h"
+struct _menu_item {
+ const char *name;
+ const char *guide_text;
+ Elm_Autocapital_Type autocap;
+ Eina_Bool caps_lock_mode;
+};
+
+static struct _menu_item _menu_its[] = {
+ { N_("NONE type"), N_("click to enter"), ELM_AUTOCAPITAL_TYPE_NONE, EINA_FALSE },
+ { N_("WORD type"), N_("click to enter"), ELM_AUTOCAPITAL_TYPE_WORD, EINA_FALSE },
+ { N_("SENTENCE type"), N_("click to enter"), ELM_AUTOCAPITAL_TYPE_SENTENCE, EINA_FALSE },
+ { N_("ALLCHARACTER type"), N_("click to enter"), ELM_AUTOCAPITAL_TYPE_ALLCHARACTER, EINA_FALSE },
+ { N_("NONE type - CAPS LOCK"), N_("click to enter"), ELM_AUTOCAPITAL_TYPE_NONE, EINA_TRUE },
+ { N_("WORD type - CAPS LOCK"), N_("click to enter"), ELM_AUTOCAPITAL_TYPE_WORD, EINA_TRUE },
+ { N_("SENTENCE type - CAPS LOCK"), N_("click to enter"), ELM_AUTOCAPITAL_TYPE_SENTENCE, EINA_TRUE },
+ { N_("ALLCHARACTER type - CAPS LOCK"), N_("click to enter"), ELM_AUTOCAPITAL_TYPE_ALLCHARACTER, EINA_TRUE },
+
+ /* do not delete below */
+ { NULL, NULL, ELM_AUTOCAPITAL_TYPE_NONE, EINA_FALSE }
+};
+
static Evas_Object *_create_ef_layout (Evas_Object *parent, const char *label, const char *guide_text, Elm_Autocapital_Type autocap, Eina_Bool caps_lock_mode)
{
Evas_Object *en;
struct appdata *ad = (struct appdata *)data;
Evas_Object *bx = NULL;
Evas_Object *ef = NULL;
-
Evas_Object *parent = ad->naviframe;
+ int idx = 0;
bx = elm_box_add (parent);
evas_object_size_hint_weight_set (bx, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set (bx, EVAS_HINT_FILL, 0.0);
evas_object_show (bx);
- /* NONE type */
- ef = _create_ef_layout (parent, _("NONE type"), _("click to enter"), ELM_AUTOCAPITAL_TYPE_NONE, EINA_FALSE);
- elm_box_pack_end (bx, ef);
-
- /* WORD type */
- ef = _create_ef_layout (parent, _("WORD type"), _("click to enter"), ELM_AUTOCAPITAL_TYPE_WORD, EINA_FALSE);
- elm_box_pack_end (bx, ef);
-
- /* Sentence type */
- ef = _create_ef_layout (parent, _("SENTENCE type"), _("click to enter"), ELM_AUTOCAPITAL_TYPE_SENTENCE, EINA_FALSE);
- elm_box_pack_end (bx, ef);
-
- /* ALLCHARACTER type */
- ef = _create_ef_layout (parent, _("ALLCHARACTER type"), _("click to enter"), ELM_AUTOCAPITAL_TYPE_ALLCHARACTER, EINA_FALSE);
- elm_box_pack_end (bx, ef);
-
- /* Caps lock mode ON */
-
- /* NONE type */
- ef = _create_ef_layout (parent, _("NONE type - CAPS LOCK"), _("click to enter"), ELM_AUTOCAPITAL_TYPE_NONE, EINA_TRUE);
- elm_box_pack_end (bx, ef);
-
- /* WORD type */
- ef = _create_ef_layout (parent, _("WORD type - CAPS LOCK"), _("click to enter"), ELM_AUTOCAPITAL_TYPE_WORD, EINA_TRUE);
- elm_box_pack_end (bx, ef);
-
- /* Sentence type */
- ef = _create_ef_layout (parent, _("SENTENCE type - CAPS LOCK"), _("click to enter"), ELM_AUTOCAPITAL_TYPE_SENTENCE, EINA_TRUE);
- elm_box_pack_end (bx, ef);
-
- /* ALLCHARACTER type */
- ef = _create_ef_layout (parent, _("ALLCHARACTER type - CAPS LOCK"), _("click to enter"), ELM_AUTOCAPITAL_TYPE_ALLCHARACTER, EINA_TRUE);
- elm_box_pack_end (bx, ef);
+ while (_menu_its[idx].name != NULL) {
+ ef = _create_ef_layout (parent, _menu_its[idx].name, _menu_its[idx].guide_text, _menu_its[idx].autocap, _menu_its[idx].caps_lock_mode);
+ elm_box_pack_end (bx, ef);
+ ++idx;
+ }
return bx;
}
static void isfsetting_bt (void *data, Evas_Object *obj, void *event_info);
+struct _menu_item {
+ const char *name;
+ void (*func)(void *data, Evas_Object *obj, void *event_info);
+};
+
static struct _menu_item isf_demo_menu_its[] = {
{ "ISF Layout", ise_layout_bt },
{ "ISF Autocapital", ise_autocapital_bt },
static void test_is_ime_enabled (void *data, Evas_Object *obj, void *event_info);
static void test_get_recent_ise_geometry_get (void *data, Evas_Object *obj, void *event_info);
+struct _menu_item {
+ const char *name;
+ void (*func)(void *data, Evas_Object *obj, void *event_info);
+};
+
static struct _menu_item imcontrol_menu_its[] = {
{ "PANEL GEOMETRY GET", test_input_panel_geometry_get },
{ "INPUT PANEL SHOW", test_input_panel_show },
#include "isf_demo_efl.h"
#include "isf_imdata_set_efl.h"
+struct _menu_item {
+ const char *name;
+ const char *guide_text;
+ const char *imdata;
+};
+
+static struct _menu_item _menu_its[] = {
+ { N_("ko_KR"), N_("Korean Layout"), "LANG:ko_KR" },
+ { N_("en_US"), N_("English layout"), "LANG:en_US" },
+ { N_("Disable Emoticon"), N_("Disable Emoticon"), "action=disable_emoticons" },
+
+ /* do not delete below */
+ { NULL, NULL, NULL }
+};
static Evas_Object *_create_ef_layout (Evas_Object *parent, const char *label, const char *guide_text, const char *imdata)
{
struct appdata *ad = (struct appdata *)data;
Evas_Object *bx = NULL;
Evas_Object *ef = NULL;
-
Evas_Object *parent = ad->naviframe;
- const char *imdata_ko = "LANG:ko_KR";
- const char *imdata_en = "LANG:en_US";
- const char *imdata_disable_emoticon = "action=disable_emoticons";
+ int idx = 0;
bx = elm_box_add (parent);
evas_object_size_hint_weight_set (bx, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set (bx, EVAS_HINT_FILL, 0.0);
evas_object_show (bx);
- ef = _create_ef_layout (parent, _("ko_KR"), _("Korean Layout"), imdata_ko);
- elm_box_pack_end (bx, ef);
-
- ef = _create_ef_layout (parent, _("en_US"), _("English layout"), imdata_en);
- elm_box_pack_end (bx, ef);
-
- ef = _create_ef_layout (parent, _("Disable Emoticon"), _("Disable Emoticon"), imdata_disable_emoticon);
- elm_box_pack_end (bx, ef);
+ while (_menu_its[idx].name != NULL) {
+ ef = _create_ef_layout (parent, _menu_its[idx].name, _menu_its[idx].guide_text, _menu_its[idx].imdata);
+ elm_box_pack_end (bx, ef);
+ ++idx;
+ }
return bx;
}
#include "isf_demo_efl.h"
#include "isf_input_hint_efl.h"
+struct _menu_item {
+ const char *name;
+ const char *guide_text;
+ Elm_Input_Hints input_hint;
+};
+
+static struct _menu_item _menu_its[] = {
+ { N_("NONE"), N_("click to enter"), ELM_INPUT_HINT_NONE },
+ { N_("Auto complete"), N_("click to enter"), ELM_INPUT_HINT_AUTO_COMPLETE },
+ { N_("Sensitive data"), N_("click to enter"), ELM_INPUT_HINT_SENSITIVE_DATA },
+
+ /* do not delete below */
+ { NULL, NULL, ELM_INPUT_HINT_NONE }
+};
+
static Evas_Object *_create_ef_layout (Evas_Object *parent, const char *label, const char *guide_text, Elm_Input_Hints input_hint)
{
Evas_Object *en;
struct appdata *ad = (struct appdata *)data;
Evas_Object *bx = NULL;
Evas_Object *ef = NULL;
-
Evas_Object *parent = ad->naviframe;
+ int idx = 0;
bx = elm_box_add (parent);
evas_object_size_hint_weight_set (bx, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set (bx, EVAS_HINT_FILL, 0.0);
evas_object_show (bx);
- /* NONE */
- ef = _create_ef_layout (parent, _("NONE"), _("click to enter"), ELM_INPUT_HINT_NONE);
- elm_box_pack_end (bx, ef);
-
- /* Auto complete */
- ef = _create_ef_layout (parent, _("Auto complete"), _("click to enter"), ELM_INPUT_HINT_AUTO_COMPLETE);
- elm_box_pack_end (bx, ef);
-
- /* Sensitive data */
- ef = _create_ef_layout (parent, _("Sensitive data"), _("click to enter"), ELM_INPUT_HINT_SENSITIVE_DATA);
- elm_box_pack_end (bx, ef);
+ while (_menu_its[idx].name != NULL) {
+ ef = _create_ef_layout (parent, _menu_its[idx].name, _menu_its[idx].guide_text, _menu_its[idx].input_hint);
+ elm_box_pack_end (bx, ef);
+ ++idx;
+ }
return bx;
}
#include <Ecore_X.h>
#endif
+struct _menu_item {
+ const char *name;
+ const char *guide_text;
+ Elm_Input_Panel_Layout layout;
+ int layout_variation;
+};
+
+static struct _menu_item _menu_its[] = {
+ { N_("NORMAL LAYOUT"), N_("click to enter TEXT"), ELM_INPUT_PANEL_LAYOUT_NORMAL, 0 },
+ { N_("NUMBER LAYOUT"), N_("click to enter NUMBER"), ELM_INPUT_PANEL_LAYOUT_NUMBER, 0 },
+ { N_("EMAIL LAYOUT"), N_("click to enter EMAIL"), ELM_INPUT_PANEL_LAYOUT_EMAIL, 0 },
+ { N_("URL LAYOUT"), N_("click to enter URL"), ELM_INPUT_PANEL_LAYOUT_URL, 0 },
+ { N_("PHONENUMBER LAYOUT"), N_("click to enter PHONENUMBER"), ELM_INPUT_PANEL_LAYOUT_PHONENUMBER, 0 },
+ { N_("IP LAYOUT"), N_("click to enter IP"), ELM_INPUT_PANEL_LAYOUT_IP, 0 },
+ { N_("MONTH LAYOUT"), N_("click to enter MONTH"), ELM_INPUT_PANEL_LAYOUT_MONTH, 0 },
+ { N_("NUMBERONLY LAYOUT"), N_("click to enter NUMBERONLY"), ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_NORMAL },
+ { N_("NUMBERONLY - SIGNED"), N_("click to enter NUMBERONLY WITH SIGNED"), ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_SIGNED },
+ { N_("NUMBERONLY - DECIMAL"), N_("click to enter NUMBERONLY WITH DECIMAL"), ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_DECIMAL },
+ { N_("NUMBERONLY - SIGNED AND DECIMAL"), N_("click to enter NUMBERONLY WITH SIGNED AND DECIMAL"), ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_SIGNED_AND_DECIMAL },
+ { N_("DATETIME LAYOUT"), N_("click to enter DATETIME"), ELM_INPUT_PANEL_LAYOUT_DATETIME, 0},
+ { N_("PASSWORD LAYOUT"), N_("click to enter PASSWORD"), ELM_INPUT_PANEL_LAYOUT_PASSWORD, 0},
+ { N_("PASSWORD NUMBERONLY LAYOUT"), N_("click to enter PASSWORD NUMBERONLY"), ELM_INPUT_PANEL_LAYOUT_PASSWORD, ELM_INPUT_PANEL_LAYOUT_PASSWORD_VARIATION_NUMBERONLY },
+ { N_("Emoticon LAYOUT"), N_("click to enter Emoticon"), ELM_INPUT_PANEL_LAYOUT_EMOTICON, 0},
+ { N_("TERMINAL LAYOUT"), N_("click to enter TERMINAL"), ELM_INPUT_PANEL_LAYOUT_TERMINAL, 0},
+
+ /* do not delete below */
+ { NULL, NULL, ELM_INPUT_PANEL_LAYOUT_NORMAL, 0 }
+};
+
#ifndef WAYLAND
static Ecore_Event_Handler *prop_handler = NULL;
Evas_Object *bx = NULL;
Evas_Object *ef = NULL;
Evas_Object *parent = ad->naviframe;
+ int idx = 0;
bx = elm_box_add (parent);
evas_object_size_hint_weight_set (bx, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set (bx, EVAS_HINT_FILL, 0.0);
evas_object_show (bx);
- /* Normal Layout */
- ef = _create_ef_layout (parent, _("NORMAL LAYOUT"), _("click to enter TEXT"), ELM_INPUT_PANEL_LAYOUT_NORMAL);
- elm_box_pack_end (bx, ef);
-
- /* Number Layout */
- ef = _create_ef_layout (parent, _("NUMBER LAYOUT"), _("click to enter NUMBER"), ELM_INPUT_PANEL_LAYOUT_NUMBER);
- elm_box_pack_end (bx, ef);
-
- /* Email Layout */
- ef = _create_ef_layout (parent, _("EMAIL LAYOUT"), _("click to enter EMAIL"), ELM_INPUT_PANEL_LAYOUT_EMAIL);
- elm_box_pack_end (bx, ef);
-
- /* URL Layout */
- ef = _create_ef_layout (parent, _("URL LAYOUT"), _("click to enter URL"), ELM_INPUT_PANEL_LAYOUT_URL);
- elm_box_pack_end (bx, ef);
-
- /* Phonenumber Layout */
- ef = _create_ef_layout (parent, _("PHONENUMBER LAYOUT"), _("click to enter PHONENUMBER"), ELM_INPUT_PANEL_LAYOUT_PHONENUMBER);
- elm_box_pack_end (bx, ef);
-
- /* IP Layout */
- ef = _create_ef_layout (parent, _("IP LAYOUT"), _("click to enter IP"), ELM_INPUT_PANEL_LAYOUT_IP);
- elm_box_pack_end (bx, ef);
-
- /* Month Layout */
- ef = _create_ef_layout (parent, _("MONTH LAYOUT"), _("click to enter MONTH"), ELM_INPUT_PANEL_LAYOUT_MONTH);
- elm_box_pack_end (bx, ef);
-
- /* Number Only Layout */
- ef = _create_ef_layout (parent, _("NUMBERONLY LAYOUT"), _("click to enter NUMBERONLY"), ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_NORMAL);
- elm_box_pack_end (bx, ef);
-
- /* Number Only with signed Layout */
- ef = _create_ef_layout (parent, _("NUMBERONLY - SIGNED"), _("click to enter NUMBERONLY WITH SIGNED"), ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_SIGNED);
- elm_box_pack_end (bx, ef);
-
- /* Number Only with decimal Layout */
- ef = _create_ef_layout (parent, _("NUMBERONLY - DECIMAL"), _("click to enter NUMBERONLY WITH DECIMAL"), ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_DECIMAL);
- elm_box_pack_end (bx, ef);
-
- /* Number Only with signed and decimal Layout */
- ef = _create_ef_layout (parent, _("NUMBERONLY - SIGNED AND DECIMAL"), _("click to enter NUMBERONLY WITH SIGNED AND DECIMAL"), ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_SIGNED_AND_DECIMAL);
- elm_box_pack_end (bx, ef);
-
- /* Datetime Layout */
- ef = _create_ef_layout (parent, _("DATETIME LAYOUT"), _("click to enter DATETIME"), ELM_INPUT_PANEL_LAYOUT_DATETIME);
- elm_box_pack_end (bx, ef);
-
- /* Password Layout */
- ef = _create_ef_layout (parent, _("PASSWORD LAYOUT"), _("click to enter PASSWORD"), ELM_INPUT_PANEL_LAYOUT_PASSWORD);
- elm_box_pack_end (bx, ef);
-
- /* Password numberonly Layout */
- ef = _create_ef_layout (parent, _("PASSWORD NUMBERONLY LAYOUT"), _("click to enter PASSWORD NUMBERONLY"), ELM_INPUT_PANEL_LAYOUT_PASSWORD, ELM_INPUT_PANEL_LAYOUT_PASSWORD_VARIATION_NUMBERONLY);
- elm_box_pack_end (bx, ef);
-
- /* Emoticon Layout */
- ef = _create_ef_layout (parent, _("Emoticon LAYOUT"), _("click to enter Emoticon"), ELM_INPUT_PANEL_LAYOUT_EMOTICON);
- elm_box_pack_end (bx, ef);
-
- /* Terminal Layout */
- ef = _create_ef_layout (parent, _("TERMINAL LAYOUT"), _("click to enter TERMINAL"), ELM_INPUT_PANEL_LAYOUT_TERMINAL);
- elm_box_pack_end (bx, ef);
+ while (_menu_its[idx].name != NULL) {
+ ef = _create_ef_layout (parent, _menu_its[idx].name, _menu_its[idx].guide_text, _menu_its[idx].layout, _menu_its[idx].layout_variation);
+ elm_box_pack_end (bx, ef);
+ ++idx;
+ }
#ifndef WAYLAND
/* create back key event generation button */
#include "isf_demo_efl.h"
#include "isf_return_key_type_efl.h"
+struct _menu_item {
+ const char *name;
+ const char *guide_text;
+ Elm_Input_Panel_Return_Key_Type return_key_type;
+};
+
+static struct _menu_item _menu_its[] = {
+ { N_("DEFAULT"), N_("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT },
+ { N_("DEFAULT"), N_("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT },
+ { N_("DONE"), N_("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE },
+ { N_("GO"), N_("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_GO },
+ { N_("JOIN"), N_("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_JOIN },
+ { N_("LOGIN"), N_("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN },
+ { N_("NEXT"), N_("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_NEXT },
+ { N_("SEARCH"), N_("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH },
+ { N_("SEND"), N_("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEND },
+ { N_("SIGNIN"), N_("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN },
+
+ /* do not delete below */
+ { NULL, NULL, ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT }
+};
static Evas_Object *_create_ef_layout (Evas_Object *parent, const char *label, const char *guide_text, Elm_Input_Panel_Return_Key_Type type)
{
struct appdata *ad = (struct appdata *)data;
Evas_Object *bx = NULL;
Evas_Object *ef = NULL;
+ int idx = 0;
Evas_Object *parent = ad->naviframe;
evas_object_size_hint_align_set (bx, EVAS_HINT_FILL, 0.0);
evas_object_show (bx);
- /* DEFAULT */
- ef = _create_ef_layout (parent, _("DEFAULT"), _("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT);
- elm_box_pack_end (bx, ef);
-
- /* DONE */
- ef = _create_ef_layout (parent, _("DONE"), _("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
- elm_box_pack_end (bx, ef);
-
- /* GO */
- ef = _create_ef_layout (parent, _("GO"), _("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_GO);
- elm_box_pack_end (bx, ef);
-
- /* JOIN */
- ef = _create_ef_layout (parent, _("JOIN"), _("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_JOIN);
- elm_box_pack_end (bx, ef);
-
- /* LOGIN */
- ef = _create_ef_layout (parent, _("LOGIN"), _("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN);
- elm_box_pack_end (bx, ef);
-
- /* NEXT */
- ef = _create_ef_layout (parent, _("NEXT"), _("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_NEXT);
- elm_box_pack_end (bx, ef);
-
- /* SEARCH */
- ef = _create_ef_layout (parent, _("SEARCH"), _("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH);
- elm_box_pack_end (bx, ef);
-
- /* SEND */
- ef = _create_ef_layout (parent, _("SEND"), _("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEND);
- elm_box_pack_end (bx, ef);
-
- /* SIGNIN */
- ef = _create_ef_layout (parent, _("SIGNIN"), _("click to enter"), ELM_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN);
- elm_box_pack_end (bx, ef);
+ while (_menu_its[idx].name != NULL) {
+ ef = _create_ef_layout (parent, _menu_its[idx].name, _menu_its[idx].guide_text, _menu_its[idx].return_key_type);
+ elm_box_pack_end (bx, ef);
+ ++idx;
+ }
return bx;
}