navigation: Rename parse_state to parse_modifier_state

`parse_state` sounds a bit weird and `parse_modifier_state` is clearer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2087>
This commit is contained in:
Thibault Saunier 2022-03-31 23:41:41 +02:00 committed by GStreamer Marge Bot
parent 8492dd4255
commit b358897a3b
3 changed files with 8 additions and 6 deletions

View File

@ -1443,7 +1443,7 @@ gst_navigation_event_set_coordinates (GstEvent * event, gdouble x, gdouble y)
/** /**
* gst_navigation_event_parse_state: * gst_navigation_event_parse_modifier_state:
* @event: The #GstEvent to modify. * @event: The #GstEvent to modify.
* @state: a bit-mask representing the state of the modifier keys (e.g. Control, * @state: a bit-mask representing the state of the modifier keys (e.g. Control,
* Shift and Alt). * Shift and Alt).
@ -1454,7 +1454,7 @@ gst_navigation_event_set_coordinates (GstEvent * event, gdouble x, gdouble y)
* Since: 1.22 * Since: 1.22
*/ */
gboolean gboolean
gst_navigation_event_parse_state (GstEvent * event, gst_navigation_event_parse_modifier_state (GstEvent * event,
GstNavigationModifierType * state) GstNavigationModifierType * state)
{ {
GstNavigationEventType e_type; GstNavigationEventType e_type;

View File

@ -560,8 +560,8 @@ void gst_navigation_send_event_simple (GstNavigation *navigation,
GstEvent *event); GstEvent *event);
GST_VIDEO_API GST_VIDEO_API
gboolean gst_navigation_event_parse_state (GstEvent *event, gboolean gst_navigation_event_parse_modifier_state (GstEvent *event,
GstNavigationModifierType *state); GstNavigationModifierType *state);
G_END_DECLS G_END_DECLS

View File

@ -130,7 +130,8 @@ gst_navigationtest_src_event (GstBaseTransform * trans, GstEvent * event)
&navtest->mousey); &navtest->mousey);
GST_DEBUG ("received mouse-move event at %f,%f", navtest->mousex, GST_DEBUG ("received mouse-move event at %f,%f", navtest->mousex,
navtest->mousey); navtest->mousey);
gst_navigation_event_parse_state (event, &navtest->modifiers); gst_navigation_event_parse_modifier_state (event,
&navtest->modifiers);
break; break;
} }
case GST_NAVIGATION_EVENT_MOUSE_BUTTON_PRESS:{ case GST_NAVIGATION_EVENT_MOUSE_BUTTON_PRESS:{
@ -176,7 +177,8 @@ gst_navigationtest_src_event (GstBaseTransform * trans, GstEvent * event)
case GST_NAVIGATION_EVENT_KEY_RELEASE:{ case GST_NAVIGATION_EVENT_KEY_RELEASE:{
const char *name; const char *name;
gst_navigation_event_parse_state (event, &navtest->modifiers); gst_navigation_event_parse_modifier_state (event,
&navtest->modifiers);
gst_navigation_event_parse_key_event (event, &name); gst_navigation_event_parse_key_event (event, &name);
GST_DEBUG ("received %s event for key \"%s\"", GST_DEBUG ("received %s event for key \"%s\"",
type == GST_NAVIGATION_EVENT_KEY_PRESS ? "key-press" : type == GST_NAVIGATION_EVENT_KEY_PRESS ? "key-press" :