backends: Add function to apply pressure sensitivity to tablet tools

A bezier curve is created out of the 2 control points in settings, so
the pressure is made to follow the stablished curve between 0 and 1.
This commit is contained in:
Carlos Garnacho
2016-06-22 15:58:33 +02:00
parent 7e267e9b01
commit f9552bb9c0
2 changed files with 89 additions and 0 deletions

View File

@@ -110,6 +110,11 @@ GDesktopStylusButtonAction meta_input_settings_get_stylus_button_action (MetaInp
ClutterInputDeviceTool *tool,
ClutterInputDevice *current_device,
guint button);
gdouble meta_input_settings_translate_tablet_tool_pressure (MetaInputSettings *input_settings,
ClutterInputDeviceTool *tool,
ClutterInputDevice *current_tablet,
gdouble pressure);
#ifdef HAVE_LIBWACOM
WacomDevice * meta_input_settings_get_tablet_wacom_device (MetaInputSettings *settings,
ClutterInputDevice *device);