Add _gdk_device_get_axis_info

This is needed for the win32 master/slave handling code.
This commit is contained in:
Alexander Larsson 2012-04-03 10:54:25 +02:00
parent 2697ac5770
commit ddd24761fd
2 changed files with 30 additions and 0 deletions

View File

@ -1369,6 +1369,29 @@ _gdk_device_add_axis (GdkDevice *device,
return pos;
}
void
_gdk_device_get_axis_info (GdkDevice *device,
guint index_,
GdkAtom *label_atom,
GdkAxisUse *use,
gdouble *min_value,
gdouble *max_value,
gdouble *resolution)
{
GdkAxisInfo *info;
g_return_if_fail (GDK_IS_DEVICE (device));
g_return_if_fail (index_ < device->axes->len);
info = &g_array_index (device->axes, GdkAxisInfo, index_);
*label_atom = info->label;
*use = info->use;
*min_value = info->min_value;
*max_value = info->max_value;
*resolution = info->resolution;
}
void
_gdk_device_set_keys (GdkDevice *device,
guint num_keys)

View File

@ -121,6 +121,13 @@ guint _gdk_device_add_axis (GdkDevice *device,
gdouble min_value,
gdouble max_value,
gdouble resolution);
void _gdk_device_get_axis_info (GdkDevice *device,
guint index,
GdkAtom *label_atom,
GdkAxisUse *use,
gdouble *min_value,
gdouble *max_value,
gdouble *resolution);
void _gdk_device_set_keys (GdkDevice *device,
guint num_keys);