diff --git a/clutter/clutter/clutter-device-manager-private.h b/clutter/clutter/clutter-device-manager-private.h index 12d4effa6..bafc02497 100644 --- a/clutter/clutter/clutter-device-manager-private.h +++ b/clutter/clutter/clutter-device-manager-private.h @@ -131,6 +131,7 @@ struct _ClutterInputDevice gchar *vendor_id; gchar *product_id; + gchar *node_path; GPtrArray *tools; diff --git a/clutter/clutter/clutter-input-device.c b/clutter/clutter/clutter-input-device.c index b782d0bd3..6021c8e2f 100644 --- a/clutter/clutter/clutter-input-device.c +++ b/clutter/clutter/clutter-input-device.c @@ -73,6 +73,7 @@ enum PROP_N_STRIPS, PROP_N_RINGS, PROP_N_MODE_GROUPS, + PROP_DEVICE_NODE, PROP_LAST }; @@ -211,6 +212,10 @@ clutter_input_device_set_property (GObject *gobject, self->n_mode_groups = g_value_get_int (value); break; + case PROP_DEVICE_NODE: + self->node_path = g_value_dup_string (value); + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); break; @@ -283,6 +288,10 @@ clutter_input_device_get_property (GObject *gobject, g_value_set_int (value, self->n_mode_groups); break; + case PROP_DEVICE_NODE: + g_value_set_string (value, self->node_path); + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); break; @@ -481,6 +490,13 @@ clutter_input_device_class_init (ClutterInputDeviceClass *klass) 0, G_MAXINT, 0, CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); + obj_props[PROP_DEVICE_NODE] = + g_param_spec_string ("device-node", + P_("Device node path"), + P_("Device node path"), + NULL, + CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); + gobject_class->dispose = clutter_input_device_dispose; gobject_class->set_property = clutter_input_device_set_property; gobject_class->get_property = clutter_input_device_get_property; @@ -2141,3 +2157,11 @@ clutter_input_device_get_n_mode_groups (ClutterInputDevice *device) return device->n_mode_groups; } + +const gchar * +clutter_input_device_get_device_node (ClutterInputDevice *device) +{ + g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), NULL); + + return device->node_path; +} diff --git a/clutter/clutter/clutter-input-device.h b/clutter/clutter/clutter-input-device.h index 959dce0db..9b55d3529 100644 --- a/clutter/clutter/clutter-input-device.h +++ b/clutter/clutter/clutter-input-device.h @@ -147,6 +147,9 @@ gint clutter_input_device_get_n_strips (ClutterInputDev CLUTTER_AVAILABLE_IN_ALL gint clutter_input_device_get_n_mode_groups (ClutterInputDevice *device); +CLUTTER_AVAILABLE_IN_ALL +const gchar * clutter_input_device_get_device_node (ClutterInputDevice *device); + G_END_DECLS #endif /* __CLUTTER_INPUT_DEVICE_H__ */