EAPI void elm_entry_background_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a);
EAPI void elm_entry_ellipsis_set(Evas_Object *obj, Eina_Bool ellipsis);
- EAPI void elm_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool on);
+ EAPI void elm_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool autocap);
+ EAPI void elm_entry_autoperiod_set(Evas_Object *obj, Eina_Bool autoperiod);
EAPI void elm_entry_autoenable_returnkey_set(Evas_Object *obj, Eina_Bool on);
EAPI void elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled);
EAPI void elm_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout);
EAPI void elm_scrolled_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled);
EAPI void elm_scrolled_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout);
EAPI Ecore_IMF_Context *elm_scrolled_entry_imf_context_get(Evas_Object *obj);
- EAPI void elm_scrolled_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool on);
+ EAPI void elm_scrolled_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool autocap);
+ EAPI void elm_scrolled_entry_autoperiod_set(Evas_Object *obj, Eina_Bool autoperiod);
EAPI Evas_Object *elm_conformant_add(Evas_Object *parent);
EAPI void elm_conformant_content_set(Evas_Object *obj, Evas_Object *content);
* @ingroup Scrolled_Entry
*/
EAPI void
-elm_scrolled_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool on)
+elm_scrolled_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool autocap)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd || !wd->entry) return;
- elm_entry_autocapitalization_set(wd->entry, on);
+ elm_entry_autocapitalization_set(wd->entry, autocap);
+}
+
+/**
+ * Set whether scrolled entry should support auto period
+ *
+ * @param obj The entry object
+ * @param on If true, scrolled entry suports auto period.
+ *
+ * @ingroup Scrolled_Entry
+ */
+EAPI void
+elm_scrolled_entry_autoperiod_set(Evas_Object *obj, Eina_Bool autoperiod)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd || !wd->entry) return;
+
+ elm_entry_autoperiod_set(wd->entry, autoperiod);
}
"ENLIGHTENMENT_THEME",
"ENLIGHTENMENT_PROFILE",
"ENLIGHTENMENT_CONFIG",
- "ENLIGHTENMENT_INPUT_PANEL"
+ "ENLIGHTENMENT_INPUT_PANEL",
+ "ENLIGHTENMENT_AUTOCAPITAL",
+ "ENLIGHTENMENT_AUTOPERIOD",
};
#define ATOM_E_SCALE 0
#define ATOM_E_FINGER_SIZE 1
#define ATOM_E_PROFILE 3
#define ATOM_E_CONFIG 4
#define ATOM_E_INPUT_PANEL 5
+#define ATOM_E_AUTOCAPITAL 6
+#define ATOM_E_AUTOPERIOD 7
static Eina_Bool _prop_config_get(void);
static Eina_Bool _prop_change(void *data __UNUSED__, int ev_type __UNUSED__, void *ev);
}
}
}
- else if (((_atom_config > 0) && (event->atom == _atom_config)) ||
- (event->atom == _atom[ATOM_E_CONFIG]))
- {
- _prop_config_get();
- }
else if (event->atom == _atom[ATOM_E_INPUT_PANEL])
{
unsigned int val = 0;
{
edje_input_panel_enabled_set(val);
}
- }
+ }
+ else if (event->atom == _atom[ATOM_E_AUTOCAPITAL])
+ {
+ unsigned int val = 0;
+
+ if (ecore_x_window_prop_card32_get(event->win,
+ event->atom,
+ &val, 1) > 0)
+ {
+ edje_autocapitalization_set(val);
+ }
+ }
+ else if (event->atom == _atom[ATOM_E_AUTOPERIOD])
+ {
+ unsigned int val = 0;
+
+ if (ecore_x_window_prop_card32_get(event->win,
+ event->atom,
+ &val, 1) > 0)
+ {
+ edje_autoperiod_set(val);
+ }
+ }
+ else if (((_atom_config > 0) && (event->atom == _atom_config)) ||
+ (event->atom == _atom[ATOM_E_CONFIG]))
+ {
+ _prop_config_get();
+ }
}
+
return ECORE_CALLBACK_PASS_ON;
}
#endif
s = getenv("ELM_INPUT_PANEL");
if (s) _elm_config->input_panel_enable = atoi(s);
+
+ s = getenv("ELM_AUTOCAPITAL");
+ if (s) _elm_config->autocapital = atoi(s);
+
+ s = getenv("ELM_AUTOPERIOD");
+ if (s) _elm_config->autoperiod = atoi(s);
}
void
if (changed) _prop_config_get();
}
}
- if (!getenv("ELM_INPUT_PANEL"))
- {
- if (ecore_x_window_prop_card32_get(_root_1st,
- _atom[ATOM_E_INPUT_PANEL],
- &val, 1) > 0)
- {
- if (val > 0)
- {
- _elm_config->input_panel_enable = val;
- }
- }
- }
-
+ if (!getenv("ELM_INPUT_PANEL"))
+ {
+ if (ecore_x_window_prop_card32_get(_root_1st,
+ _atom[ATOM_E_INPUT_PANEL],
+ &val, 1) > 0)
+ {
+ if (val > 0)
+ {
+ _elm_config->input_panel_enable = val;
+ }
+ }
+ }
+ if (!getenv("ELM_AUTOCAPITAL"))
+ {
+ if (ecore_x_window_prop_card32_get(_root_1st,
+ _atom[ATOM_E_AUTOCAPITAL],
+ &val, 1) > 0)
+ {
+ if (val > 0)
+ {
+ _elm_config->autocapital = val;
+ }
+ }
+ }
+ if (!getenv("ELM_AUTOPERIOD"))
+ {
+ if (ecore_x_window_prop_card32_get(_root_1st,
+ _atom[ATOM_E_AUTOPERIOD],
+ &val, 1) > 0)
+ {
+ if (val > 0)
+ {
+ _elm_config->autoperiod = val;
+ }
+ }
+ }
#endif
}
}
}
_desc_shutdown();
}
+
+/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
Eina_Bool input_panel_enable : 1;
Eina_Bool autocapitalize : 1;
Elm_Input_Panel_Layout input_panel_layout;
+ Eina_Bool autoperiod : 1;
};
struct _Elm_Entry_Item_Provider
eina_stringshare_del(t);
edje_object_scale_set(wd->ent, elm_widget_scale_get(obj) * _elm_config->scale);
edje_object_part_text_autocapitalization_set(wd->ent, "elm.text", wd->autocapitalize);
+// edje_object_part_text_autoperiod_set(wd->ent, "elm.text", wd->autoperiod);
edje_object_part_text_input_panel_enabled_set(wd->ent, "elm.text", wd->input_panel_enable);
ic = edje_object_part_text_imf_context_get(wd->ent, "elm.text");
t = eina_stringshare_add(elm_entry_entry_get(obj));
_elm_theme_object_set(obj, wd->ent, "entry", _getbase(obj), elm_widget_style_get(obj));
elm_entry_entry_set(obj, t);
+ edje_object_part_text_autocapitalization_set(wd->ent, "elm.text", wd->autocapitalize);
+// edje_object_part_text_autoperiod_set(wd->ent, "elm.text", wd->autoperiod);
ic = elm_entry_imf_context_get(obj);
if (ic)
{
* @ingroup Entry
*/
EAPI void
-elm_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool on)
+elm_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool autocap)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (wd->password)
wd->autocapitalize = EINA_FALSE;
else
- wd->autocapitalize = on;
+ wd->autocapitalize = autocap;
edje_object_part_text_autocapitalization_set(wd->ent, "elm.text", wd->autocapitalize);
}
/**
+ * Set whether entry should support auto period
+ *
+ * @param obj The entry object
+ * @param on If true, entry suports auto period.
+ *
+ * @ingroup Entry
+ */
+EAPI void
+elm_entry_autoperiod_set(Evas_Object *obj, Eina_Bool autoperiod)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+
+ if (wd->password)
+ wd->autoperiod = EINA_FALSE;
+ else
+ wd->autoperiod = autoperiod;
+
+// edje_object_part_text_autoperiod_set(wd->ent, "elm.text", wd->autoperiod);
+}
+
+/**
* Set the font size on the entry object
*
* @param obj The entry object
const char *theme;
const char *modules;
int input_panel_enable;
+ int autocapital;
+ int autoperiod;
};
typedef struct _Elm_Module Elm_Module;