clutter: Drop "state full" event getter and setter
The full decomposed modifier state is pretty much unused, relying in keymap signals/properties to track latched modifiers state instead. The events can be simplified without having this information, and if it were ever needed in the future, it would be nicer that it had a dedicated struct and didn't increase the number of arguments in ClutterEvent constructors. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
This commit is contained in:
parent
562c5532c4
commit
322b40ad39
@ -173,14 +173,6 @@ void _clutter_event_set_platform_data (ClutterEvent *eve
|
||||
CLUTTER_EXPORT
|
||||
gpointer _clutter_event_get_platform_data (const ClutterEvent *event);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_event_set_state_full (ClutterEvent *event,
|
||||
ClutterModifierType button_state,
|
||||
ClutterModifierType base_state,
|
||||
ClutterModifierType latched_state,
|
||||
ClutterModifierType locked_state,
|
||||
ClutterModifierType effective_state);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_event_push (const ClutterEvent *event,
|
||||
gboolean do_copy);
|
||||
|
@ -257,61 +257,6 @@ clutter_event_set_state (ClutterEvent *event,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_event_set_state_full (ClutterEvent *event,
|
||||
ClutterModifierType button_state,
|
||||
ClutterModifierType base_state,
|
||||
ClutterModifierType latched_state,
|
||||
ClutterModifierType locked_state,
|
||||
ClutterModifierType effective_state)
|
||||
{
|
||||
ClutterEventPrivate *private = (ClutterEventPrivate*) event;
|
||||
|
||||
private->button_state = button_state;
|
||||
private->base_state = base_state;
|
||||
private->latched_state = latched_state;
|
||||
private->locked_state = locked_state;
|
||||
|
||||
clutter_event_set_state (event, effective_state);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_event_get_state_full:
|
||||
* @event: a #ClutterEvent
|
||||
* @button_state: (out) (allow-none): the pressed buttons as a mask
|
||||
* @base_state: (out) (allow-none): the regular pressed modifier keys
|
||||
* @latched_state: (out) (allow-none): the latched modifier keys (currently released but still valid for one key press/release)
|
||||
* @locked_state: (out) (allow-none): the locked modifier keys (valid until the lock key is pressed and released again)
|
||||
* @effective_state: (out) (allow-none): the logical OR of all the state bits above
|
||||
*
|
||||
* Retrieves the decomposition of the keyboard state into button, base,
|
||||
* latched, locked and effective. This can be used to transmit to other
|
||||
* applications, for example when implementing a wayland compositor.
|
||||
*/
|
||||
void
|
||||
clutter_event_get_state_full (const ClutterEvent *event,
|
||||
ClutterModifierType *button_state,
|
||||
ClutterModifierType *base_state,
|
||||
ClutterModifierType *latched_state,
|
||||
ClutterModifierType *locked_state,
|
||||
ClutterModifierType *effective_state)
|
||||
{
|
||||
const ClutterEventPrivate *private = (const ClutterEventPrivate*) event;
|
||||
|
||||
g_return_if_fail (event != NULL);
|
||||
|
||||
if (button_state)
|
||||
*button_state = private->button_state;
|
||||
if (base_state)
|
||||
*base_state = private->base_state;
|
||||
if (latched_state)
|
||||
*latched_state = private->latched_state;
|
||||
if (locked_state)
|
||||
*locked_state = private->locked_state;
|
||||
if (effective_state)
|
||||
*effective_state = clutter_event_get_state (event);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_event_get_coords:
|
||||
* @event: a #ClutterEvent
|
||||
|
@ -633,13 +633,6 @@ void clutter_event_set_state (ClutterEvent
|
||||
CLUTTER_EXPORT
|
||||
ClutterModifierType clutter_event_get_state (const ClutterEvent *event);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_event_get_state_full (const ClutterEvent *event,
|
||||
ClutterModifierType *button_state,
|
||||
ClutterModifierType *base_state,
|
||||
ClutterModifierType *latched_state,
|
||||
ClutterModifierType *locked_state,
|
||||
ClutterModifierType *effective_state);
|
||||
CLUTTER_EXPORT
|
||||
void clutter_event_set_device (ClutterEvent *event,
|
||||
ClutterInputDevice *device);
|
||||
CLUTTER_EXPORT
|
||||
|
Loading…
Reference in New Issue
Block a user