Commit 230ce9bf authored by Carlos Garnacho's avatar Carlos Garnacho
Browse files

gdk: Remove gdk_device_get_axes()

Besides the implicit x/y assumptions, devices don't have axes. Those
are actually provided by the GdkDeviceTool driving the device, and
different tools may have different axes.

It does not make sense to offer this API that can change beneath
someone's feet, we now have gdk_device_tool_get_axes() which is static
to the tool.
parent 2736633a
......@@ -362,7 +362,6 @@ gdk_device_get_device_type
gdk_device_get_display
gdk_device_get_has_cursor
gdk_device_get_n_axes
gdk_device_get_axes
gdk_device_get_seat
gdk_device_get_num_touches
gdk_device_get_device_tool
......
......@@ -95,7 +95,6 @@ enum {
PROP_PRODUCT_ID,
PROP_SEAT,
PROP_NUM_TOUCHES,
PROP_AXES,
PROP_TOOL,
PROP_DIRECTION,
PROP_HAS_BIDI_LAYOUTS,
......@@ -265,17 +264,6 @@ gdk_device_class_init (GdkDeviceClass *klass)
0,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
/**
* GdkDevice:axes:
*
* The axes currently available for this device.
*/
device_props[PROP_AXES] =
g_param_spec_flags ("axes",
P_("Axes"),
P_("Axes"),
GDK_TYPE_AXIS_FLAGS, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
device_props[PROP_TOOL] =
g_param_spec_object ("tool",
......@@ -502,9 +490,6 @@ gdk_device_get_property (GObject *object,
case PROP_NUM_TOUCHES:
g_value_set_uint (value, device->num_touches);
break;
case PROP_AXES:
g_value_set_flags (value, device->axis_flags);
break;
case PROP_TOOL:
g_value_set_object (value, device->last_tool);
break;
......@@ -954,10 +939,7 @@ _gdk_device_reset_axes (GdkDevice *device)
for (i = device->axes->len - 1; i >= 0; i--)
g_array_remove_index (device->axes, i);
device->axis_flags = 0;
g_object_notify_by_pspec (G_OBJECT (device), device_props[PROP_N_AXES]);
g_object_notify_by_pspec (G_OBJECT (device), device_props[PROP_AXES]);
}
guint
......@@ -996,10 +978,7 @@ _gdk_device_add_axis (GdkDevice *device,
device->axes = g_array_append_val (device->axes, axis_info);
pos = device->axes->len - 1;
device->axis_flags |= (1 << use);
g_object_notify_by_pspec (G_OBJECT (device), device_props[PROP_N_AXES]);
g_object_notify_by_pspec (G_OBJECT (device), device_props[PROP_AXES]);
return pos;
}
......@@ -1343,20 +1322,6 @@ gdk_device_get_seat (GdkDevice *device)
return device->seat;
}
/**
* gdk_device_get_axes:
* @device: a #GdkDevice
*
* Returns the axes currently available on the device.
**/
GdkAxisFlags
gdk_device_get_axes (GdkDevice *device)
{
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
return device->axis_flags;
}
void
gdk_device_update_tool (GdkDevice *device,
GdkDeviceTool *tool)
......
......@@ -142,9 +142,6 @@ const char *gdk_device_get_product_id (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
GdkSeat *gdk_device_get_seat (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
GdkAxisFlags gdk_device_get_axes (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
guint gdk_device_get_num_touches (GdkDevice *device);
......
......@@ -39,7 +39,6 @@ struct _GdkDevice
char *name;
GdkInputSource source;
gboolean has_cursor;
GdkAxisFlags axis_flags;
GdkDeviceType type;
GdkDisplay *display;
/* The paired logical device for logical devices,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment