[demo] add password mode test case 40/40040/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Thu, 28 May 2015 05:35:31 +0000 (14:35 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 28 May 2015 05:35:31 +0000 (14:35 +0900)
Change-Id: I5bd12fa2cb5628e06d14aca68bdd2908d0cc933a

ism/demos/Makefile.am
ism/demos/include/isf_password_mode_efl.h [new file with mode: 0644]
ism/demos/isf_demo_efl.cpp
ism/demos/isf_password_mode_efl.cpp [new file with mode: 0644]

index e7a07fb..c963006 100644 (file)
@@ -39,7 +39,8 @@ isf_demo_efl_SOURCES  = isf_demo_efl.cpp \
                         isf_focus_movement_efl.cpp \
                         isf_language_efl.cpp \
                         isf_ondemand_efl.cpp \
-                        isf_input_hint_efl.cpp
+                        isf_input_hint_efl.cpp \
+                        isf_password_mode_efl.cpp
 
 isf_demo_efl_CXXFLAGS = @EFL_CFLAGS@ \
                         @ECOREX_CFLAGS@ \
diff --git a/ism/demos/include/isf_password_mode_efl.h b/ism/demos/include/isf_password_mode_efl.h
new file mode 100644 (file)
index 0000000..9ebd21f
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * ISF(Input Service Framework)
+ *
+ * ISF is based on SCIM 1.4.7 and extended for supporting more mobile fitable.
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Contact: Jihoon Kim <jihoon48.kim@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef __ISE_PASSWORD_MODE_H
+#define __ISE_PASSWORD_MODE_H
+
+#include <Elementary.h>
+
+void ise_password_mode_bt (void *data, Evas_Object *obj, void *event_info);
+
+#endif /* __ISE_PASSWORD_MODE_H */
+
+/*
+vi:ts=4:ai:nowrap:expandtab
+*/
index a6e58bd..7c6e2ee 100644 (file)
@@ -45,6 +45,7 @@
 #include "isf_language_efl.h"
 #include "isf_ondemand_efl.h"
 #include "isf_input_hint_efl.h"
+#include "isf_password_mode_efl.h"
 
 #if HAVE_UIGADGET
 #include <ui-gadget.h>
@@ -60,6 +61,7 @@ static struct _menu_item isf_demo_menu_its[] = {
     { "ISF Return Key Type", ise_return_key_type_bt },
     { "ISF Return Key Disable", ise_return_key_disable_bt },
     { "ISF Input hint", ise_input_hint_bt },
+    { "ISF Password Mode", ise_password_mode_bt },
     { "ISF IM Data", ise_imdata_set_bt },
     { "ISF ondemand", ise_ondemand_bt },
     { "ISF Focus Movement", isf_focus_movement_bt },
diff --git a/ism/demos/isf_password_mode_efl.cpp b/ism/demos/isf_password_mode_efl.cpp
new file mode 100644 (file)
index 0000000..60f25aa
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * ISF(Input Service Framework)
+ *
+ * ISF is based on SCIM 1.4.7 and extended for supporting more mobile fitable.
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Contact: Jihoon Kim <jihoon48.kim@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "isf_demo_efl.h"
+#include "isf_password_mode_efl.h"
+
+static Evas_Object *_create_ef_layout (Evas_Object *parent, const char *label, const char *guide_text, Eina_Bool mode)
+{
+    Evas_Object *en;
+    Evas_Object *ef = create_ef (parent, label, guide_text, &en);
+    if (!ef || !en) return NULL;
+
+    elm_entry_password_set (en, mode);
+
+    return ef;
+}
+
+static Evas_Object * create_inner_layout (void *data)
+{
+    struct appdata *ad = (struct appdata *)data;
+    Evas_Object *bx = NULL;
+    Evas_Object *ef = NULL;
+
+    Evas_Object *parent = ad->naviframe;
+
+    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);
+
+    /* Password mode : TRUE */
+    ef = _create_ef_layout (parent, _("Password mode : TRUE"), _("click to enter"), EINA_TRUE);
+    elm_box_pack_end (bx, ef);
+
+    /* Password mode : FALSE */
+    ef = _create_ef_layout (parent, _("Password mode : FALSE"), _("click to enter"), EINA_FALSE);
+    elm_box_pack_end (bx, ef);
+
+    return bx;
+}
+
+void ise_password_mode_bt (void *data, Evas_Object *obj, void *event_info)
+{
+    Evas_Object *lay_inner = create_inner_layout (data);
+    add_layout_to_naviframe (data, lay_inner, _("Password mode"));
+}
+
+/*
+vi:ts=4:ai:nowrap:expandtab
+*/