gstvideo.navigation_mixin
Module for [Navigation] interface mixin
Templates 2
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.
Sends the indicated command to the navigation interface.
Parameters
command | The command to issue |
Sends an event to the navigation interface.
Parameters
event | The event to send |
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
event | The type of mouse event, as a text string. Recognised values are "mouse-button-press", "mouse-button-release" and "mouse-move". |
button | The button number of the button being pressed or released. Pass 0 for mouse-move events. |
x | The x coordinate of the mouse event. |
y | The y coordinate of the mouse event. |
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
x | The x coordinate of the mouse event. |
y | The y coordinate of the mouse event. |
deltaX | The delta_x coordinate of the mouse event. |
deltaY | The delta_y coordinate of the mouse event. |