gstvideo.navigation_mixin

Module for [Navigation] interface mixin

Templates 2

tmplNavigationT()

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.

Functions
void sendCommand(gstvideo.types.NavigationCommand command)

Sends the indicated command to the navigation interface.

Parameters

commandThe command to issue
void sendEvent(gst.structure.Structure structure)
void sendEventSimple(gst.event.Event event)

Sends an event to the navigation interface.

Parameters

eventThe event to send
void sendKeyEvent(string event, string key)
void sendMouseEvent(string event, int button, double x, double y)

Sends a mouse event to the navigation interface. Mouse event coordinates are sent relative to the display space of the related output area. This is usually the size in pixels of the window associated with the element implementing the #GstNavigation interface.

Parameters

eventThe type of mouse event, as a text string. Recognised values are "mouse-button-press", "mouse-button-release" and "mouse-move".
buttonThe button number of the button being pressed or released. Pass 0 for mouse-move events.
xThe x coordinate of the mouse event.
yThe y coordinate of the mouse event.
void sendMouseScrollEvent(double x, double y, double deltaX, double deltaY)

Sends a mouse scroll event to the navigation interface. Mouse event coordinates are sent relative to the display space of the related output area. This is usually the size in pixels of the window associated with the element implementing the #GstNavigation interface.

Parameters

xThe x coordinate of the mouse event.
yThe y coordinate of the mouse event.
deltaXThe delta_x coordinate of the mouse event.
deltaYThe delta_y coordinate of the mouse event.
tmplNavigationGidBuilderT()