The Navigation interface is used for creating and injecting navigation related events such as mouse button presses, cursor motion and key
presses.
The associated library also provides methods for parsing received events, and for sending and receiving navigation related bus events.
One main usecase is DVD menu navigation.
The main parts of the API are:
* The GstNavigation interface, implemented by elements which provide an application with the ability to create and inject navigation
events into the pipeline. * GstNavigation event handling API. GstNavigation events are created in response to calls on a GstNavigation
interface implementation, and sent in the pipeline. Upstream elements can use the navigation event API functions to parse the contents
of received messages.
* GstNavigation message handling API. GstNavigation messages may be sent on the message bus to inform applications of navigation related
changes in the pipeline, such as the mouse moving over a clickable region, or the set of available angles changing.
The GstNavigation message functions provide functions for creating and parsing custom bus messages for signaling GstNavigation changes.
- public static bool event_get_coordinates (Event event, out double x, out double y)
Try to retrieve x and y coordinates of a
Navigation event.
- public static NavigationEventType event_get_type (Event event)
- public static Event event_new_command (NavigationCommand command)
Create a new navigation event given navigation command.
- public static Event event_new_key_press (string key, NavigationModifierType state)
Create a new navigation event for the given key press.
- public static Event event_new_key_release (string key, NavigationModifierType state)
Create a new navigation event for the given key release.
- public static Event event_new_mouse_button_press (int button, double x, double y, NavigationModifierType state)
Create a new navigation event for the given key mouse button press.
- public static Event event_new_mouse_button_release (int button, double x, double y, NavigationModifierType state)
Create a new navigation event for the given key mouse button release.
- public static Event event_new_mouse_move (double x, double y, NavigationModifierType state)
Create a new navigation event for the new mouse location.
- public static Event event_new_mouse_scroll (double x, double y, double delta_x, double delta_y, NavigationModifierType state)
Create a new navigation event for the mouse scroll.
- public static Event event_new_touch_cancel (NavigationModifierType state)
Create a new navigation event signalling that all currently active
touch points are cancelled and should be discarded.
- public static Event event_new_touch_down (uint identifier, double x, double y, double pressure, NavigationModifierType state)
Create a new navigation event for an added touch point.
- public static Event event_new_touch_frame (NavigationModifierType state)
Create a new navigation event signalling the end of a touch frame.
- public static Event event_new_touch_motion (uint identifier, double x, double y, double pressure, NavigationModifierType state)
Create a new navigation event for a moved touch point.
- public static Event event_new_touch_up (uint identifier, double x, double y, NavigationModifierType state)
Create a new navigation event for a removed touch point.
- public static bool event_parse_command (Event event, out NavigationCommand command)
Inspect a Navigation command event and
retrieve the enum value of the associated command.
- public static bool event_parse_key_event (Event event, out unowned string key)
Note: Modifier keys (as defined in
NavigationModifierType) [press](GST_NAVIGATION_EVENT_KEY_PRESS) and [
release](GST_NAVIGATION_KEY_PRESS) events are generated even if those states are present on all other related events
- public static bool event_parse_modifier_state (Event event, NavigationModifierType state)
- public static bool event_parse_mouse_button_event (Event event, out int button, out double x, out double y)
Retrieve the details of either a Navigation
mouse button press event or a mouse button release event.
- public static bool event_parse_mouse_move_event (Event event, out double x, out double y)
Inspect a Navigation mouse movement
event and extract the coordinates of the event.
- public static bool event_parse_mouse_scroll_event (Event event, out double x, out double y, out double delta_x, out double delta_y)
Inspect a Navigation mouse scroll event
and extract the coordinates of the event.
- public static bool event_parse_touch_event (Event event, out uint identifier, out double x, out double y, out double pressure)
Retrieve the details of a Navigation
touch-down or touch-motion event.
- public static bool event_parse_touch_up_event (Event event, out uint identifier, out double x, out double y)
Retrieve the details of a Navigation
touch-up event.
- public static bool event_set_coordinates (Event event, double x, double y)
Try to set x and y coordinates on a Navigation
event.
- public static NavigationMessageType message_get_type (Message message)
Check a bus message to see if it is a
Navigation event, and return the NavigationMessageType
identifying the type of the message if so.
- public static Message message_new_angles_changed (Object src, uint cur_angle, uint n_angles)
Creates a new Navigation message with
type ANGLES_CHANGED for notifying an application
that the current angle, or current number of angles available in a multiangle video has changed.
- public static Message message_new_commands_changed (Object src)
- public static Message message_new_event (Object src, Event event)
Creates a new Navigation message with
type EVENT.
- public static Message message_new_mouse_over (Object src, bool active)
Creates a new Navigation message with
type MOUSE_OVER.
- public static bool message_parse_angles_changed (Message message, out uint cur_angle, out uint n_angles)
Parse a Navigation message of type
GST_NAVIGATION_MESSAGE_ANGLES_CHANGED and extract the cur_angle and n_angles parameters.
- public static bool message_parse_event (Message message, out Event event)
Parse a Navigation message of type
EVENT and extract contained
Event.
- public static bool message_parse_mouse_over (Message message, out bool active)
Parse a Navigation message of type
MOUSE_OVER and extract the active/inactive flag.
- public static NavigationQueryType query_get_type (Query query)
- public static Query query_new_angles ()
Create a new Navigation angles query.
- public static Query query_new_commands ()
Create a new Navigation commands query.
- public static bool query_parse_angles (Query query, out uint cur_angle, out uint n_angles)
Parse the current angle number in the
Navigation angles query into the Signal pointed to
by the cur_angle variable, and the number of available angles into the
Signal pointed to by the n_angles variable.
- public static bool query_parse_commands_length (Query query, out uint n_cmds)
Parse the number of commands in the Navigation
commands query.
- public static bool query_parse_commands_nth (Query query, uint nth, out NavigationCommand cmd)
Parse the Navigation command query and
retrieve the nth command from it into cmd.
- public static void query_set_angles (Query query, uint cur_angle, uint n_angles)
Set the Navigation angles query result
field in query.
- public static void query_set_commandsv (Query query, NavigationCommand[] cmds)
Set the Navigation command query result
fields in query.