device: Allow enabling/disabling non-master devices
Slave and floating devices should always be disabled, and not deliver events to the scene. It is up to the user to enable non-master devices and handle events coming from them. ClutterInputDevice gets a new :enabled property, defaulting to FALSE; when a device manager creates a new device it has to set it to TRUE if the :device-mode property is set to CLUTTER_INPUT_MODE_MASTER. The main event queue entry point, _clutter_event_push(), will automatically discard events coming from disabled devices.
This commit is contained in:
@ -138,6 +138,9 @@ ClutterStage * clutter_input_device_get_pointer_stage (ClutterInputDev
|
||||
G_CONST_RETURN gchar * clutter_input_device_get_device_name (ClutterInputDevice *device);
|
||||
ClutterInputMode clutter_input_device_get_device_mode (ClutterInputDevice *device);
|
||||
gboolean clutter_input_device_get_has_cursor (ClutterInputDevice *device);
|
||||
void clutter_input_device_set_enabled (ClutterInputDevice *device,
|
||||
gboolean enabled);
|
||||
gboolean clutter_input_device_get_enabled (ClutterInputDevice *device);
|
||||
|
||||
guint clutter_input_device_get_n_axes (ClutterInputDevice *device);
|
||||
ClutterInputAxis clutter_input_device_get_axis (ClutterInputDevice *device,
|
||||
|
Reference in New Issue
Block a user