#ifdef HAVE_ELEMENTARY_X
static Ecore_Event_Handler *_prop_change_handler = NULL;
static Ecore_X_Window _root_1st = 0;
-#define ATOM_COUNT 22
+#define ATOM_COUNT 23
static Ecore_X_Atom _atom[ATOM_COUNT];
static Ecore_X_Atom _atom_config = 0;
static const char *_atom_names[ATOM_COUNT] =
"ENLIGHTENMENT_THUMBSCROLL_MOMENTUM_THRESHOLD",
"ENLIGHTENMENT_THUMBSCROLL_FRICTION",
"ENLIGHTENMENT_THUMBSCROLL_BORDER_FRICTION",
+ "ENLIGHTENMENT_THUMBSCROLL_SENSITIVITY_FRICTION",
"ENLIGHTENMENT_THUMBSCROLL_PAGE_SCROLL_FRICTION",
"ENLIGHTENMENT_THUMBSCROLL_BRING_IN_SCROLL_FRICTION",
"ENLIGHTENMENT_THUMBSCROLL_ZOOM_FRICTION",
- "ENLIGHTENMENT_INPUT_PANEL",
- "ENLIGHTENMENT_AUTOCAPITAL_ALLOW",
- "ENLIGHTENMENT_AUTOPERIOD_ALLOW",
"ENLIGHTENMENT_CONFIG"
};
#define ATOM_E_SCALE 0
#define ATOM_E_THUMBSCROLL_MOMENTUM_THRESHOLD 15
#define ATOM_E_THUMBSCROLL_FRICTION 16
#define ATOM_E_THUMBSCROLL_BORDER_FRICTION 17
-#define ATOM_E_THUMBSCROLL_PAGE_SCROLL_FRICTION 18
-#define ATOM_E_THUMBSCROLL_BRING_IN_SCROLL_FRICTION 19
-#define ATOM_E_THUMBSCROLL_ZOOM_FRICTION 20
-#define ATOM_E_CONFIG 21
-#define ATOM_E_INPUT_PANEL 22
-#define ATOM_E_AUTOCAPITAL_ALLOW 23
-#define ATOM_E_AUTOPERIOD_ALLOW 24
+#define ATOM_E_THUMBSCROLL_SENSITIVITY_FRICTION 18
+#define ATOM_E_THUMBSCROLL_PAGE_SCROLL_FRICTION 19
+#define ATOM_E_THUMBSCROLL_BRING_IN_SCROLL_FRICTION 20
+#define ATOM_E_THUMBSCROLL_ZOOM_FRICTION 21
+#define ATOM_E_CONFIG 22
static Eina_Bool _prop_config_get(void);
static Eina_Bool _prop_change(void *data __UNUSED__,
(double)val / 1000.0;
}
}
- else if (event->atom == _atom[ATOM_E_THUMBSCROLL_PAGE_SCROLL_FRICTION])
+ else if (event->atom == _atom[ATOM_E_THUMBSCROLL_SENSITIVITY_FRICTION])
{
unsigned int val = 1000;
event->atom,
&val, 1) > 0)
{
- _elm_config->page_scroll_friction =
+ _elm_config->thumbscroll_sensitivity_friction =
(double)val / 1000.0;
}
}
- else if (event->atom ==
- _atom[ATOM_E_THUMBSCROLL_BRING_IN_SCROLL_FRICTION])
+ else if (event->atom == _atom[ATOM_E_THUMBSCROLL_PAGE_SCROLL_FRICTION])
{
unsigned int val = 1000;
event->atom,
&val, 1) > 0)
{
- _elm_config->bring_in_scroll_friction =
+ _elm_config->page_scroll_friction =
(double)val / 1000.0;
}
}
else if (event->atom ==
- _atom[ATOM_E_THUMBSCROLL_ZOOM_FRICTION])
+ _atom[ATOM_E_THUMBSCROLL_BRING_IN_SCROLL_FRICTION])
{
unsigned int val = 1000;
event->atom,
&val, 1) > 0)
{
- _elm_config->zoom_friction = (double)val / 1000.0;
- }
- }
- else if (event->atom == _atom[ATOM_E_INPUT_PANEL])
- {
- unsigned int val = 0;
-
- if (ecore_x_window_prop_card32_get(event->win,
- event->atom,
- &val, 1) > 0)
- {
- int input_panel_enable;
-
- input_panel_enable = _elm_config->input_panel_enable;
- _elm_config->input_panel_enable = val;
- if (input_panel_enable != _elm_config->input_panel_enable)
- {
- edje_input_panel_enabled_set(_elm_config->input_panel_enable);
- }
- }
- }
- else if (event->atom == _atom[ATOM_E_AUTOCAPITAL_ALLOW])
- {
- unsigned int val = 0;
-
- if (ecore_x_window_prop_card32_get(event->win,
- event->atom,
- &val, 1) > 0)
- {
- int autocapital_allow;
-
- autocapital_allow = _elm_config->autocapital_allow;
- _elm_config->autocapital_allow = val;
- if (autocapital_allow != _elm_config->autocapital_allow)
- {
- edje_autocapitalization_allow_set(_elm_config->autocapital_allow);
- }
+ _elm_config->bring_in_scroll_friction =
+ (double)val / 1000.0;
}
}
- else if (event->atom == _atom[ATOM_E_AUTOPERIOD_ALLOW])
+ else if (event->atom ==
+ _atom[ATOM_E_THUMBSCROLL_ZOOM_FRICTION])
{
- unsigned int val = 0;
+ unsigned int val = 1000;
if (ecore_x_window_prop_card32_get(event->win,
event->atom,
&val, 1) > 0)
{
- int autoperiod_allow;
-
- autoperiod_allow = _elm_config->autoperiod_allow;
- _elm_config->autoperiod_allow = val;
- if (autoperiod_allow != _elm_config->autoperiod_allow)
- {
- edje_autoperiod_allow_set(_elm_config->autoperiod_allow);
- }
+ _elm_config->zoom_friction = (double)val / 1000.0;
}
}
else if (((_atom_config > 0) && (event->atom == _atom_config)) ||
ELM_CONFIG_VAL(D, T, thumbscroll_friction, T_DOUBLE);
ELM_CONFIG_VAL(D, T, thumbscroll_bounce_friction, T_DOUBLE);
ELM_CONFIG_VAL(D, T, thumbscroll_border_friction, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, thumbscroll_sensitivity_friction, T_DOUBLE);
ELM_CONFIG_VAL(D, T, page_scroll_friction, T_DOUBLE);
ELM_CONFIG_VAL(D, T, bring_in_scroll_friction, T_DOUBLE);
ELM_CONFIG_VAL(D, T, zoom_friction, T_DOUBLE);
ELM_CONFIG_VAL(D, T, longpress_timeout, T_DOUBLE);
ELM_CONFIG_VAL(D, T, effect_enable, T_UCHAR);
ELM_CONFIG_VAL(D, T, desktop_entry, T_UCHAR);
- ELM_CONFIG_VAL(D, T, input_panel_enable, T_INT);
ELM_CONFIG_VAL(D, T, password_show_last, T_UCHAR);
ELM_CONFIG_VAL(D, T, password_show_last_timeout, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, glayer_zoom_finger_factor, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, glayer_zoom_wheel_factor, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, glayer_zoom_distance_tolerance, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, glayer_rotate_angular_tolerance, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, glayer_line_min_length, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, glayer_line_distance_tolerance, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, glayer_line_angular_tolerance, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, glayer_flick_time_limit_ms, T_INT);
+ ELM_CONFIG_VAL(D, T, glayer_long_tap_start_timeout, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, access_mode, T_INT);
+ ELM_CONFIG_VAL(D, T, glayer_continues_enable, T_UCHAR);
#undef T
#undef D
#undef T_INT
continue;
}
}
- return flist;
-
eina_iterator_free(file_it);
+ return flist;
list_free:
EINA_LIST_FREE(flist, dir)
edje_password_show_last_set(_elm_config->password_show_last);
edje_password_show_last_timeout_set(_elm_config->password_show_last_timeout);
if (_elm_config->modules) _elm_module_parse(_elm_config->modules);
- edje_input_panel_enabled_set(_elm_config->input_panel_enable);
- edje_autocapitalization_allow_set(_elm_config->autocapital_allow);
- edje_autoperiod_allow_set(_elm_config->autoperiod_allow);
- if (_elm_config->modules) _elm_module_parse(_elm_config->modules);
}
static Eina_Bool
_elm_config->bring_in_scroll_friction = 0.5;
_elm_config->zoom_friction = 0.5;
_elm_config->thumbscroll_border_friction = 0.5;
+ _elm_config->thumbscroll_sensitivity_friction = 0.25; // magic number! just trial and error shows this makes it behave "nicer" and not run off at high speed all the time
_elm_config->scroll_smooth_time_interval = 0.008;
_elm_config->scroll_smooth_amount = 1.0;
_elm_config->scroll_smooth_history_weight = 0.3;
_elm_config->is_mirrored = EINA_FALSE; /* Read sys value in env_get() */
_elm_config->password_show_last = EINA_FALSE;
_elm_config->password_show_last_timeout = 2.0;
+ _elm_config->glayer_zoom_finger_factor = 1.0;
+ _elm_config->glayer_zoom_wheel_factor = 0.05;
+ _elm_config->glayer_zoom_distance_tolerance = 1.0; /* 1 times elm_finger_size_get() */
+ _elm_config->glayer_rotate_angular_tolerance = 0.034906585; /* Represents 2 DEG */
+ _elm_config->glayer_line_min_length = 1.0; /* 1 times elm_finger_size_get() */
+ _elm_config->glayer_line_distance_tolerance = 3.0; /* 3 times elm_finger_size_get() */
+ _elm_config->glayer_line_angular_tolerance = 0.34906585; /* Represents 20 DEG */
+ _elm_config->glayer_flick_time_limit_ms = 60; /* 60 ms to finish flick */
+ _elm_config->glayer_long_tap_start_timeout = 1.2; /* 1.2 second to start long-tap */
+ _elm_config->glayer_continues_enable = EINA_TRUE; /* Continue gestures default */
}
static const char *
_elm_config->thumbscroll_border_friction = friction;
}
+ s = getenv("ELM_THUMBSCROLL_SENSITIVITY_FRICTION");
+ if (s)
+ {
+ friction = atof(s);
+ if (friction < 0.1)
+ friction = 0.1;
+
+ if (friction > 1.0)
+ friction = 1.0;
+
+ _elm_config->thumbscroll_sensitivity_friction = friction;
+ }
s = getenv("ELM_SCROLL_SMOOTH_TIME_INTERVAL");
if (s) _elm_config->scroll_smooth_time_interval = atof(s);
s = getenv("ELM_SCROLL_SMOOTH_AMOUNT");
s = getenv("ELM_ICON_SIZE");
if (s) _elm_config->icon_size = atoi(s);
- s = getenv("ELM_INPUT_PANEL");
- if (s) _elm_config->input_panel_enable = atoi(s);
-
s = getenv("ELM_LONGPRESS_TIMEOUT");
if (s) _elm_config->longpress_timeout = atof(s);
if (_elm_config->longpress_timeout < 0.0)
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;
- edje_input_panel_enabled_set(_elm_config->input_panel_enable);
- }
- }
- }
- if (ecore_x_window_prop_card32_get(_root_1st,
- _atom[ATOM_E_AUTOCAPITAL_ALLOW],
- &val, 1) > 0)
- {
- if (val > 0)
- {
- _elm_config->autocapital_allow = val;
- edje_autocapitalization_allow_set(_elm_config->autocapital_allow);
- }
- }
- if (ecore_x_window_prop_card32_get(_root_1st,
- _atom[ATOM_E_AUTOPERIOD_ALLOW],
- &val, 1) > 0)
- {
- if (val > 0)
- {
- _elm_config->autoperiod_allow = val;
- edje_autoperiod_allow_set(_elm_config->autoperiod_allow);
- }
- }
#endif
}
_config_sub_apply();