mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
device: Use a double for translate_axis() argument
While XI1 has axis data in events exposed as integers, XI2 uses double precision floating point values.
This commit is contained in:
parent
f54044f7e4
commit
50e52f550a
@ -163,7 +163,7 @@ void _clutter_input_device_select_stage_events (ClutterInputDev
|
||||
|
||||
gboolean _clutter_input_device_translate_axis (ClutterInputDevice *device,
|
||||
guint index_,
|
||||
gint value,
|
||||
gdouble value,
|
||||
gdouble *axis_value);
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -915,10 +915,25 @@ _clutter_input_device_add_axis (ClutterInputDevice *device,
|
||||
return pos;
|
||||
}
|
||||
|
||||
/*< private >
|
||||
* clutter_input_translate_axis:
|
||||
* @device: a #ClutterInputDevice
|
||||
* @index_: the index of the axis
|
||||
* @gint: the absolute value of the axis
|
||||
* @axis_value: (out): the translated value of the axis
|
||||
*
|
||||
* Performs a conversion from the absolute value of the axis
|
||||
* to a relative value.
|
||||
*
|
||||
* The axis at @index_ must not be %CLUTTER_INPUT_AXIS_X or
|
||||
* %CLUTTER_INPUT_AXIS_Y.
|
||||
*
|
||||
* Return value: %TRUE if the conversion was successful
|
||||
*/
|
||||
gboolean
|
||||
_clutter_input_device_translate_axis (ClutterInputDevice *device,
|
||||
guint index_,
|
||||
gint value,
|
||||
gdouble value,
|
||||
gdouble *axis_value)
|
||||
{
|
||||
ClutterAxisInfo *info;
|
||||
|
Loading…
Reference in New Issue
Block a user