x - input - separate touchpad and mouse settings

you can have different accel for mouse vs touchpad and different
natrual scrolling settings etc. this splits that up.
This commit is contained in:
Carsten Haitzler 2020-11-15 23:54:21 +00:00
parent 0bf06c5e1e
commit 3793619dae
7 changed files with 262 additions and 136 deletions

View File

@ -139,12 +139,15 @@ group "E_Config" struct {
value "mouse_hand" int: 1;
value "mouse_accel" double: 0.0;
value "mouse_accel_threshold" int: 4;
value "touch_tap_to_click" uchar: 0;
value "mouse_natural_scroll" uchar: 0;
value "mouse_emulate_middle_button" uchar: 1;
value "touch_accel" double: 0.0;
value "touch_natural_scroll" uchar: 0;
value "touch_emulate_middle_button" uchar: 1;
value "touch_tap_to_click" uchar: 0;
value "touch_clickpad" uchar: 1;
value "touch_scrolling_2finger" uchar: 1;
value "touch_scrolling_edge" uchar: 1;
value "touch_scrolling_edge" uchar: 0;
value "touch_scrolling_circular" uchar: 0;
value "touch_scrolling_horiz" uchar: 1;
value "touch_palm_detect" uchar: 1;

View File

@ -137,12 +137,15 @@ group "E_Config" struct {
value "mouse_hand" int: 1;
value "mouse_accel" double: 0.0;
value "mouse_accel_threshold" int: 4;
value "touch_tap_to_click" uchar: 0;
value "mouse_natural_scroll" uchar: 0;
value "mouse_emulate_middle_button" uchar: 1;
value "touch_accel" double: 0.0;
value "touch_natural_scroll" uchar: 0;
value "touch_emulate_middle_button" uchar: 1;
value "touch_tap_to_click" uchar: 0;
value "touch_clickpad" uchar: 1;
value "touch_scrolling_2finger" uchar: 1;
value "touch_scrolling_edge" uchar: 1;
value "touch_scrolling_edge" uchar: 0;
value "touch_scrolling_circular" uchar: 0;
value "touch_scrolling_horiz" uchar: 1;
value "touch_palm_detect" uchar: 1;

View File

@ -137,12 +137,15 @@ group "E_Config" struct {
value "mouse_hand" int: 1;
value "mouse_accel" double: 0.0;
value "mouse_accel_threshold" int: 4;
value "touch_tap_to_click" uchar: 0;
value "mouse_natural_scroll" uchar: 0;
value "mouse_emulate_middle_button" uchar: 1;
value "touch_accel" double: 0.0;
value "touch_natural_scroll" uchar: 0;
value "touch_emulate_middle_button" uchar: 1;
value "touch_tap_to_click" uchar: 0;
value "touch_clickpad" uchar: 1;
value "touch_scrolling_2finger" uchar: 1;
value "touch_scrolling_edge" uchar: 1;
value "touch_scrolling_edge" uchar: 0;
value "touch_scrolling_circular" uchar: 0;
value "touch_scrolling_horiz" uchar: 1;
value "touch_palm_detect" uchar: 1;

View File

@ -2,8 +2,14 @@
#define E_COMP_X
#include "e.h"
typedef enum
{
DEVICE_FLAG_NONE,
DEVICE_FLAG_TOUCHPAD
} Device_Flags;
static void
_handle_dev_prop(int dev_slot, const char *dev, const char *prop)
_handle_dev_prop(int dev_slot, const char *dev, const char *prop, Device_Flags dev_flags)
{
int num, size;
Ecore_X_Atom fmt;
@ -12,12 +18,16 @@ _handle_dev_prop(int dev_slot, const char *dev, const char *prop)
// libinput devices
if (!strcmp(prop, "libinput Middle Emulation Enabled"))
{
unsigned char cfval = 0;
unsigned char *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if ((val) && (size == 8) && (num == 1) &&
(e_config->mouse_emulate_middle_button) != (val[0]))
if (dev_flags == DEVICE_FLAG_TOUCHPAD)
cfval = e_config->touch_emulate_middle_button;
else
cfval = e_config->mouse_emulate_middle_button;
if ((val) && (size == 8) && (num == 1) && (cfval != val[0]))
{
val[0] = e_config->mouse_emulate_middle_button;
val[0] = cfval;
printf("DEV: change [%s] [%s] -> %i\n", dev, prop, val[0]);
ecore_x_input_device_property_set
(dev_slot, prop, val, num, fmt, size);
@ -26,12 +36,16 @@ _handle_dev_prop(int dev_slot, const char *dev, const char *prop)
}
else if (!strcmp(prop, "libinput Accel Speed"))
{
float cfval = 0.0;
float *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if ((val) && (size == 32) && (num == 1) &&
(fabs(e_config->mouse_accel - val[0]) >= 0.01))
if (dev_flags == DEVICE_FLAG_TOUCHPAD)
cfval = e_config->touch_accel;
else
cfval = e_config->mouse_accel;
if ((val) && (size == 32) && (num == 1) && (fabs(cfval - val[0]) >= 0.01))
{
val[0] = e_config->mouse_accel;
val[0] = cfval;
printf("DEV: change [%s] [%s] -> %1.3f\n", dev, prop, val[0]);
ecore_x_input_device_property_set
(dev_slot, prop, val, num, fmt, size);
@ -40,61 +54,88 @@ _handle_dev_prop(int dev_slot, const char *dev, const char *prop)
}
else if (!strcmp(prop, "libinput Tapping Enabled"))
{
unsigned char *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if ((val) && (size == 8) && (num == 1) &&
(e_config->touch_tap_to_click) != (val[0]))
if (dev_flags == DEVICE_FLAG_TOUCHPAD)
{
val[0] = e_config->touch_tap_to_click;
printf("DEV: change [%s] [%s] -> %i\n", dev, prop, val[0]);
ecore_x_input_device_property_set
(dev_slot, prop, val, num, fmt, size);
unsigned char *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if ((val) && (size == 8) && (num == 1) &&
(e_config->touch_tap_to_click != val[0]))
{
val[0] = e_config->touch_tap_to_click;
printf("DEV: change [%s] [%s] -> %i\n", dev, prop, val[0]);
ecore_x_input_device_property_set
(dev_slot, prop, val, num, fmt, size);
}
free(val);
}
free(val);
}
// else if (!strcmp(prop, "libinput Tapping Button Mapping Enabled"))
// {
// // 1 bool, 0 = LRM, 1 = LMR
// }
else if (!strcmp(prop, "libinput Horizontal Scrolling Enabled"))
else if ((!strcmp(prop, "libinput Horizontal Scrolling Enabled")) ||
(!strcmp(prop, "libinput Horizontal Scroll Enabled")))
{
unsigned char *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if ((val) && (size == 8) && (num == 1) &&
(e_config->touch_scrolling_horiz) != (val[0]))
if (dev_flags == DEVICE_FLAG_TOUCHPAD)
{
val[0] = e_config->touch_scrolling_horiz;
printf("DEV: change [%s] [%s] -> %i\n", dev, prop, val[0]);
ecore_x_input_device_property_set
(dev_slot, prop, val, num, fmt, size);
unsigned char *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if ((val) && (size == 8) && (num == 1) &&
(e_config->touch_scrolling_horiz != val[0]))
{
val[0] = e_config->touch_scrolling_horiz;
printf("DEV: change [%s] [%s] -> %i\n", dev, prop, val[0]);
ecore_x_input_device_property_set
(dev_slot, prop, val, num, fmt, size);
}
free(val);
}
free(val);
}
else if (!strcmp(prop, "libinput Scroll Method Enabled"))
{
// 3 bool, 2 finger, edge, button
unsigned char *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if ((val) && (size == 8) && (num >= 3) &&
((e_config->touch_scrolling_2finger != val[0]) ||
(e_config->touch_scrolling_edge != val[1])))
if (dev_flags == DEVICE_FLAG_TOUCHPAD)
{
val[0] = e_config->touch_scrolling_2finger;
val[1] = e_config->touch_scrolling_edge;
printf("DEV: change [%s] [%s] -> %i %i %i\n", dev, prop, val[0], val[1], val[2]);
ecore_x_input_device_property_set
(dev_slot, prop, val, num, fmt, size);
// 3 bool, 2 finger, edge, button
unsigned char *val0 = ecore_x_input_device_property_get
(dev_slot, "libinput Scroll Methods Available", &num, &fmt, &size);
if ((val0) && (size == 8) && (num >= 3))
{
unsigned char *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if ((val) && (size == 8) && (num >= 3))
{
unsigned char cf_2finger = 0, cf_edge = 0;
if (val0[0]) cf_2finger = e_config->touch_scrolling_2finger;
else cf_2finger = val[0];
if (val0[1]) cf_edge = e_config->touch_scrolling_edge;
else cf_edge = val[1];
if ((cf_2finger != val[0]) || (cf_edge != val[1]))
{
val[0] = cf_2finger;
val[1] = cf_edge;
printf("DEV: change [%s] [%s] -> %i %i %i\n", dev, prop, val[0], val[1], val[2]);
ecore_x_input_device_property_set
(dev_slot, prop, val, num, fmt, size);
}
}
free(val);
}
free(val0);
}
free(val);
}
else if (!strcmp(prop, "libinput Natural Scrolling Enabled"))
{
unsigned char cfval = 0;
unsigned char *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if ((val) && (size == 8) && (num == 1) &&
(e_config->mouse_natural_scroll) != (val[0]))
if (dev_flags == DEVICE_FLAG_TOUCHPAD)
cfval = e_config->touch_natural_scroll;
else
cfval = e_config->mouse_natural_scroll;
if ((val) && (size == 8) && (num == 1) && (cfval != val[0]))
{
val[0] = e_config->mouse_natural_scroll;
val[0] = cfval;
printf("DEV: change [%s] [%s] -> %i\n", dev, prop, val[0]);
ecore_x_input_device_property_set
(dev_slot, prop, val, num, fmt, size);
@ -120,7 +161,7 @@ _handle_dev_prop(int dev_slot, const char *dev, const char *prop)
unsigned int *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if ((val) && (size == 32) && (num == 1) &&
(e_config->mouse_emulate_middle_button && (val[0] != 50)))
(e_config->touch_emulate_middle_button && (val[0] != 50)))
{
val[0] = 50;
printf("DEV: change [%s] [%s] -> %i\n", dev, prop, val[0]);
@ -136,7 +177,7 @@ _handle_dev_prop(int dev_slot, const char *dev, const char *prop)
// 4 val float min, max, accel, unused
chval[0] = 1.0;
chval[1] = 1.75;
chval[2] = 0.15 + (e_config->mouse_accel * 0.15);
chval[2] = 0.15 + (e_config->touch_accel * 0.15);
float *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if ((val) && (size == 32) && (num == 4) &&
@ -289,8 +330,8 @@ _handle_dev_prop(int dev_slot, const char *dev, const char *prop)
int *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if ((val) && (size == 32) && (num == 2) &&
(((e_config->mouse_natural_scroll && ((val[0] > 0) || (val[1] > 0)))) ||
((!e_config->mouse_natural_scroll && ((val[0] < 0) || (val[1] < 0))))))
(((e_config->touch_natural_scroll && ((val[0] > 0) || (val[1] > 0)))) ||
((!e_config->touch_natural_scroll && ((val[0] < 0) || (val[1] < 0))))))
{
if (e_config->mouse_natural_scroll)
{
@ -360,12 +401,38 @@ e_comp_x_devices_config_apply(void)
const char *name;
char **props;
int num_props, j;
Device_Flags dev_flags = 0;
name = ecore_x_input_device_name_get(i);
// printf("DEV: DEV=%i: [%s]\n", i, name);
props = ecore_x_input_device_properties_list(i, &num_props);
if (props)
{
int num, size;
Ecore_X_Atom fmt;
unsigned char *val;
// figure out device flags - for now is it a mouse or touchpad
val = ecore_x_input_device_property_get
(i, "libinput Scroll Methods Available", &num, &fmt, &size);
if ((val) && (size == 8) && (num >= 3))
{
if ((!val[2]) && (val[0] || val[1]))
{
dev_flags = DEVICE_FLAG_TOUCHPAD;
}
}
if (!val)
{
val = ecore_x_input_device_property_get
(i, "Synaptics Move Speed", &num, &fmt, &size);
if ((val) && (size == 32) && (num == 4))
{
dev_flags = DEVICE_FLAG_TOUCHPAD;
}
}
free(val);
for (j = 0; j < num_props; j++)
{
// printf("DEV: PROP=%i: [%s]\n", j, props[j]);
@ -375,7 +442,7 @@ e_comp_x_devices_config_apply(void)
driver_libinput = EINA_TRUE;
else if ((!driver_synaptics) && (!strncmp(props[j], "Synaptics ", 10)))
driver_synaptics = EINA_TRUE;
_handle_dev_prop(i, name, props[j]);
_handle_dev_prop(i, name, props[j], dev_flags);
}
ecore_x_input_device_properties_free(props, num_props);
}

View File

@ -833,12 +833,16 @@ _e_config_edd_init(Eina_Bool old)
E_CONFIG_VAL(D, T, clientlist_max_caption_len, INT);
E_CONFIG_VAL(D, T, mouse_hand, INT);
E_CONFIG_VAL(D, T, mouse_accel, DOUBLE);
E_CONFIG_VAL(D, T, mouse_accel_threshold, INT);
E_CONFIG_VAL(D, T, touch_tap_to_click, UCHAR);
E_CONFIG_VAL(D, T, mouse_natural_scroll, UCHAR);
E_CONFIG_VAL(D, T, mouse_emulate_middle_button, UCHAR);
E_CONFIG_VAL(D, T, touch_accel, DOUBLE);
E_CONFIG_VAL(D, T, touch_natural_scroll, UCHAR);
E_CONFIG_VAL(D, T, touch_emulate_middle_button, UCHAR);
E_CONFIG_VAL(D, T, touch_tap_to_click, UCHAR);
E_CONFIG_VAL(D, T, touch_clickpad, UCHAR);
E_CONFIG_VAL(D, T, touch_scrolling_2finger, UCHAR);
E_CONFIG_VAL(D, T, touch_scrolling_edge, UCHAR);
@ -1786,11 +1790,12 @@ e_config_load(void)
CONFIG_VERSION_CHECK(33)
{
CONFIG_VERSION_UPDATE_INFO(33);
e_config->touch_clickpad = 1;
e_config->mouse_emulate_middle_button = 1;
e_config->touch_scrolling_horiz = 1;
e_config->touch_emulate_middle_button = 1;
e_config->touch_clickpad = 1;
e_config->touch_scrolling_2finger = 1;
e_config->touch_scrolling_edge = 1;
e_config->touch_scrolling_edge = 0;
e_config->touch_scrolling_horiz = 1;
e_config->touch_palm_detect = 1;
e_config_save_queue();
}

View File

@ -244,10 +244,13 @@ struct _E_Config
int mouse_hand; //GUI
double mouse_accel; // GUI
int mouse_accel_threshold; // GUI
unsigned char touch_tap_to_click; // GUI
unsigned char mouse_natural_scroll; // GUI
unsigned char mouse_emulate_middle_button; // GUI
double touch_accel; // GUI
unsigned char touch_natural_scroll; // GUI
unsigned char touch_emulate_middle_button; // GUI
unsigned char touch_tap_to_click; // GUI
unsigned char touch_clickpad; // GUI
unsigned char touch_scrolling_2finger; // GUI
unsigned char touch_scrolling_edge; // GUI

View File

@ -21,18 +21,22 @@ struct _E_Config_Dialog_Data
} gui;
int mouse_hand;
double accel;
double threshold;
int emulate_middle_button;
int natural_scroll;
int tap_to_click;
int clickpad;
int scrolling_2finger;
int scrolling_edge;
int scrolling_circular;
int scrolling_horiz;
int palm_detect;
double mouse_accel;
double mouse_accel_threshold;
int mouse_natural_scroll;
int mouse_emulate_middle_button;
double touch_accel;
int touch_natural_scroll;
int touch_emulate_middle_button;
int touch_tap_to_click;
int touch_clickpad;
int touch_scrolling_2finger;
int touch_scrolling_edge;
int touch_scrolling_circular;
int touch_scrolling_horiz;
int touch_palm_detect;
};
E_Config_Dialog *
@ -67,17 +71,22 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata->cursor_size = e_config->cursor_size;
cfdata->mouse_hand = e_config->mouse_hand;
cfdata->accel = e_config->mouse_accel;
cfdata->threshold = e_config->mouse_accel_threshold;
cfdata->tap_to_click = e_config->touch_tap_to_click;
cfdata->emulate_middle_button = e_config->mouse_emulate_middle_button;
cfdata->natural_scroll = e_config->mouse_natural_scroll;
cfdata->clickpad = e_config->touch_clickpad;
cfdata->scrolling_2finger = e_config->touch_scrolling_2finger;
cfdata->scrolling_edge = e_config->touch_scrolling_edge;
cfdata->scrolling_circular = e_config->touch_scrolling_circular;
cfdata->scrolling_horiz = e_config->touch_scrolling_horiz;
cfdata->palm_detect = e_config->touch_palm_detect;
cfdata->mouse_accel = e_config->mouse_accel;
cfdata->mouse_accel_threshold = e_config->mouse_accel_threshold;
cfdata->mouse_natural_scroll = e_config->mouse_natural_scroll;
cfdata->mouse_emulate_middle_button = e_config->mouse_emulate_middle_button;
cfdata->touch_accel = e_config->touch_accel;
cfdata->touch_natural_scroll = e_config->touch_natural_scroll;
cfdata->touch_emulate_middle_button = e_config->touch_emulate_middle_button;
cfdata->touch_tap_to_click = e_config->touch_tap_to_click;
cfdata->touch_clickpad = e_config->touch_clickpad;
cfdata->touch_scrolling_2finger = e_config->touch_scrolling_2finger;
cfdata->touch_scrolling_edge = e_config->touch_scrolling_edge;
cfdata->touch_scrolling_circular = e_config->touch_scrolling_circular;
cfdata->touch_scrolling_horiz = e_config->touch_scrolling_horiz;
cfdata->touch_palm_detect = e_config->touch_palm_detect;
}
static void *
@ -87,7 +96,6 @@ _create_data(E_Config_Dialog *cfd)
cfdata = E_NEW(E_Config_Dialog_Data, 1);
cfdata->cfd = cfd;
_fill_data(cfdata);
return cfdata;
}
@ -100,17 +108,20 @@ _basic_check_changed(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfd
(cfdata->use_e_cursor == e_config->use_e_cursor) &&
(cfdata->cursor_size == e_config->cursor_size) &&
(cfdata->mouse_hand == e_config->mouse_hand) &&
(cfdata->tap_to_click == e_config->touch_tap_to_click) &&
(cfdata->emulate_middle_button == e_config->mouse_emulate_middle_button) &&
(cfdata->natural_scroll == e_config->mouse_natural_scroll) &&
(cfdata->clickpad == e_config->touch_clickpad) &&
(cfdata->scrolling_2finger == e_config->touch_scrolling_2finger) &&
(cfdata->scrolling_edge == e_config->touch_scrolling_edge) &&
(cfdata->scrolling_circular == e_config->touch_scrolling_circular) &&
(cfdata->scrolling_horiz == e_config->touch_scrolling_horiz) &&
(cfdata->palm_detect == e_config->touch_palm_detect) &&
EINA_DBL_EQ(cfdata->accel, e_config->mouse_accel) &&
EINA_DBL_EQ(cfdata->threshold, e_config->mouse_accel_threshold));
EINA_DBL_EQ(cfdata->mouse_accel, e_config->mouse_accel) &&
EINA_DBL_EQ(cfdata->mouse_accel_threshold, e_config->mouse_accel_threshold) &&
(cfdata->mouse_natural_scroll == e_config->mouse_natural_scroll) &&
(cfdata->mouse_emulate_middle_button == e_config->mouse_emulate_middle_button) &&
EINA_DBL_EQ(cfdata->touch_accel, e_config->touch_accel) &&
(cfdata->touch_natural_scroll == e_config->touch_natural_scroll) &&
(cfdata->touch_emulate_middle_button == e_config->touch_emulate_middle_button) &&
(cfdata->touch_tap_to_click == e_config->touch_tap_to_click) &&
(cfdata->touch_clickpad == e_config->touch_clickpad) &&
(cfdata->touch_scrolling_2finger == e_config->touch_scrolling_2finger) &&
(cfdata->touch_scrolling_edge == e_config->touch_scrolling_edge) &&
(cfdata->touch_scrolling_circular == e_config->touch_scrolling_circular) &&
(cfdata->touch_scrolling_horiz == e_config->touch_scrolling_horiz) &&
(cfdata->touch_palm_detect == e_config->touch_palm_detect));
}
static void
@ -130,17 +141,23 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata
e_config->cursor_size = cfdata->cursor_size;
e_config->mouse_hand = cfdata->mouse_hand;
e_config->mouse_accel = cfdata->accel;
e_config->mouse_accel_threshold = cfdata->threshold;
e_config->touch_tap_to_click = cfdata->tap_to_click;
e_config->mouse_emulate_middle_button = cfdata->emulate_middle_button;
e_config->mouse_natural_scroll = cfdata->natural_scroll;
e_config->touch_clickpad = cfdata->clickpad;
e_config->touch_scrolling_2finger = cfdata->scrolling_2finger;
e_config->touch_scrolling_edge = cfdata->scrolling_edge;
e_config->touch_scrolling_circular = cfdata->scrolling_circular;
e_config->touch_scrolling_horiz = cfdata->scrolling_horiz;
e_config->touch_palm_detect = cfdata->palm_detect;
e_config->mouse_accel = cfdata->mouse_accel;
e_config->mouse_accel_threshold = cfdata->mouse_accel_threshold;
e_config->mouse_natural_scroll = cfdata->mouse_natural_scroll;
e_config->mouse_emulate_middle_button = cfdata->mouse_emulate_middle_button;
e_config->touch_accel = cfdata->touch_accel;
e_config->touch_natural_scroll = cfdata->touch_natural_scroll;
e_config->touch_emulate_middle_button = cfdata->touch_emulate_middle_button;
e_config->touch_tap_to_click = cfdata->touch_tap_to_click;
e_config->touch_clickpad = cfdata->touch_clickpad;
e_config->touch_scrolling_2finger = cfdata->touch_scrolling_2finger;
e_config->touch_scrolling_edge = cfdata->touch_scrolling_edge;
e_config->touch_scrolling_circular = cfdata->touch_scrolling_circular;
e_config->touch_scrolling_horiz = cfdata->touch_scrolling_horiz;
e_config->touch_palm_detect = cfdata->touch_palm_detect;
e_config_save_queue();
/* Apply the above settings */
@ -158,7 +175,6 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata
}
e_mouse_update();
return 1;
}
@ -220,6 +236,8 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
e_widget_framelist_object_append(of, ob);
cfdata->gui.idle_cursor = ob;
e_widget_list_object_append(ol, of, 1, 0, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Cursor"), ol,
1, 0, 1, 0, 0.5, 0.0);
@ -236,60 +254,84 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 1, 1);
e_widget_list_object_append(ol, of, 1, 0, 0.5);
of = e_widget_framelist_add(evas, _("Mouse Acceleration"), 0);
ob = e_widget_label_add(evas, _("Acceleration"));
e_widget_framelist_object_append(of, ob);
of = e_widget_framelist_add(evas, _("Acceleration"), 0);
ob = e_widget_slider_add(evas, 1, 0, _("%1.1f"), -1.0, 1.0, 0.1, 0,
&(cfdata->accel), NULL, 100);
&(cfdata->mouse_accel), NULL, 100);
e_widget_framelist_object_append(of, ob);
ob = e_widget_label_add(evas, _("Threshold"));
e_widget_framelist_object_append(of, ob);
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f"), 0.0, 10.0, 1.0, 0,
&(cfdata->threshold), NULL, 100);
&(cfdata->mouse_accel_threshold), NULL, 100);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(ol, of, 1, 0, 0.5);
of = e_widget_framelist_add(evas, _("Clicks"), 0);
of = e_widget_framelist_add(evas, _("Buttons"), 0);
oc = e_widget_check_add(evas, _("Tap to click"), &(cfdata->tap_to_click));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("Middle mouse button emulation"), &(cfdata->emulate_middle_button));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("Clickpad"), &(cfdata->clickpad));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("Palm detect"), &(cfdata->palm_detect));
oc = e_widget_check_add(evas, _("Middle mouse button emulation"), &(cfdata->mouse_emulate_middle_button));
e_widget_framelist_object_append(of, oc);
e_widget_list_object_append(ol, of, 1, 0, 0.5);
of = e_widget_framelist_add(evas, _("Scrolling"), 0);
oc = e_widget_check_add(evas, _("Natural scrolling"), &(cfdata->natural_scroll));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("Horizontal scrolling"), &(cfdata->scrolling_horiz));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("Edge scrolling"), &(cfdata->scrolling_edge));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("2 finger scrolling"), &(cfdata->scrolling_2finger));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("Circular scrolling"), &(cfdata->scrolling_circular));
oc = e_widget_check_add(evas, _("Natural scrolling"), &(cfdata->mouse_natural_scroll));
e_widget_framelist_object_append(of, oc);
e_widget_list_object_append(ol, of, 1, 0, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Mouse"), ol,
1, 0, 1, 0, 0.5, 0.0);
ol = e_widget_list_add(evas, 0, 0);
of = e_widget_framelist_add(evas, _("Acceleration"), 0);
ob = e_widget_slider_add(evas, 1, 0, _("%1.1f"), -1.0, 1.0, 0.1, 0,
&(cfdata->touch_accel), NULL, 100);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(ol, of, 1, 0, 0.5);
of = e_widget_framelist_add(evas, _("Buttons"), 0);
oc = e_widget_check_add(evas, _("Tap to click"), &(cfdata->touch_tap_to_click));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("Middle mouse button emulation"), &(cfdata->touch_emulate_middle_button));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("Clickpad"), &(cfdata->touch_clickpad));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("Palm detect"), &(cfdata->touch_palm_detect));
e_widget_framelist_object_append(of, oc);
e_widget_list_object_append(ol, of, 1, 0, 0.5);
of = e_widget_framelist_add(evas, _("Scrolling"), 0);
oc = e_widget_check_add(evas, _("Natural scrolling"), &(cfdata->touch_natural_scroll));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("Horizontal scrolling"), &(cfdata->touch_scrolling_horiz));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("Edge scrolling"), &(cfdata->touch_scrolling_edge));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("2 finger scrolling"), &(cfdata->touch_scrolling_2finger));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("Circular scrolling"), &(cfdata->touch_scrolling_circular));
e_widget_framelist_object_append(of, oc);
e_widget_list_object_append(ol, of, 1, 0, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Touchpad"), ol,
1, 0, 1, 0, 0.5, 0.0);
e_widget_toolbook_page_show(otb, 0);
return otb;
}