Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- Overloaded methods
- eventGetType
- eventParseCommand
- eventParseKeyEvent
- eventParseMouseButtonEvent
- eventParseMouseMoveEvent
- messageGetType
- messageNewAnglesChanged
- messageNewCommandsChanged
- messageNewEvent
- messageNewMouseOver
- messageParseAnglesChanged
- messageParseEvent
- messageParseMouseOver
- queryGetType
- queryNewAngles
- queryNewCommands
- queryParseAngles
- queryParseCommandsLength
- queryParseCommandsNth
- querySetAngles
- querySetCommandsv
- sendCommand
- sendEvent
- sendKeyEvent
- sendMouseEvent
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.
Synopsis
- newtype Navigation = Navigation (ManagedPtr Navigation)
- class (ManagedPtrNewtype o, IsDescendantOf Navigation o) => IsNavigation o
- navigationEventGetType :: (HasCallStack, MonadIO m) => Event -> m NavigationEventType
- navigationEventParseCommand :: (HasCallStack, MonadIO m) => Event -> m (Bool, NavigationCommand)
- navigationEventParseKeyEvent :: (HasCallStack, MonadIO m) => Event -> m (Bool, Text)
- navigationEventParseMouseButtonEvent :: (HasCallStack, MonadIO m) => Event -> m (Bool, Int32, Double, Double)
- navigationEventParseMouseMoveEvent :: (HasCallStack, MonadIO m) => Event -> m (Bool, Double, Double)
- navigationMessageGetType :: (HasCallStack, MonadIO m) => Message -> m NavigationMessageType
- navigationMessageNewAnglesChanged :: (HasCallStack, MonadIO m, IsObject a) => a -> Word32 -> Word32 -> m Message
- navigationMessageNewCommandsChanged :: (HasCallStack, MonadIO m, IsObject a) => a -> m Message
- navigationMessageNewEvent :: (HasCallStack, MonadIO m, IsObject a) => a -> Event -> m Message
- navigationMessageNewMouseOver :: (HasCallStack, MonadIO m, IsObject a) => a -> Bool -> m Message
- navigationMessageParseAnglesChanged :: (HasCallStack, MonadIO m) => Message -> m (Bool, Word32, Word32)
- navigationMessageParseEvent :: (HasCallStack, MonadIO m) => Message -> m (Bool, Event)
- navigationMessageParseMouseOver :: (HasCallStack, MonadIO m) => Message -> m (Bool, Bool)
- navigationQueryGetType :: (HasCallStack, MonadIO m) => Query -> m NavigationQueryType
- navigationQueryNewAngles :: (HasCallStack, MonadIO m) => m Query
- navigationQueryNewCommands :: (HasCallStack, MonadIO m) => m Query
- navigationQueryParseAngles :: (HasCallStack, MonadIO m) => Query -> m (Bool, Word32, Word32)
- navigationQueryParseCommandsLength :: (HasCallStack, MonadIO m) => Query -> m (Bool, Word32)
- navigationQueryParseCommandsNth :: (HasCallStack, MonadIO m) => Query -> Word32 -> m (Bool, NavigationCommand)
- navigationQuerySetAngles :: (HasCallStack, MonadIO m) => Query -> Word32 -> Word32 -> m ()
- navigationQuerySetCommandsv :: (HasCallStack, MonadIO m) => Query -> [NavigationCommand] -> m ()
- navigationSendCommand :: (HasCallStack, MonadIO m, IsNavigation a) => a -> NavigationCommand -> m ()
- navigationSendEvent :: (HasCallStack, MonadIO m, IsNavigation a) => a -> Structure -> m ()
- navigationSendKeyEvent :: (HasCallStack, MonadIO m, IsNavigation a) => a -> Text -> Text -> m ()
- navigationSendMouseEvent :: (HasCallStack, MonadIO m, IsNavigation a) => a -> Text -> Int32 -> Double -> Double -> m ()
Exported types
class (ManagedPtrNewtype o, IsDescendantOf Navigation o) => IsNavigation o Source #
Type class for types which implement Navigation
.
Instances
Methods
Overloaded methods
eventGetType
navigationEventGetType Source #
:: (HasCallStack, MonadIO m) | |
=> Event |
|
-> m NavigationEventType |
Inspect a Event
and return the NavigationEventType
of the event, or
GST_NAVIGATION_EVENT_INVALID
if the event is not a Navigation
event.
eventParseCommand
navigationEventParseCommand Source #
:: (HasCallStack, MonadIO m) | |
=> Event |
|
-> m (Bool, NavigationCommand) | Returns: TRUE if the navigation command could be extracted, otherwise FALSE. |
Inspect a Navigation
command event and retrieve the enum value of the
associated command.
eventParseKeyEvent
navigationEventParseKeyEvent Source #
No description available in the introspection data.
eventParseMouseButtonEvent
navigationEventParseMouseButtonEvent Source #
:: (HasCallStack, MonadIO m) | |
=> Event |
|
-> m (Bool, Int32, Double, Double) | Returns: TRUE if the button number and both coordinates could be extracted, otherwise FALSE. |
Retrieve the details of either a Navigation
mouse button press event or
a mouse button release event. Determine which type the event is using
navigationEventGetType
to retrieve the NavigationEventType
.
eventParseMouseMoveEvent
navigationEventParseMouseMoveEvent Source #
:: (HasCallStack, MonadIO m) | |
=> Event |
|
-> m (Bool, Double, Double) | Returns: TRUE if both coordinates could be extracted, otherwise FALSE. |
Inspect a Navigation
mouse movement event and extract the coordinates
of the event.
messageGetType
navigationMessageGetType Source #
:: (HasCallStack, MonadIO m) | |
=> Message |
|
-> m NavigationMessageType | Returns: The type of the |
Check a bus message to see if it is a Navigation
event, and return
the NavigationMessageType
identifying the type of the message if so.
messageNewAnglesChanged
navigationMessageNewAnglesChanged Source #
:: (HasCallStack, MonadIO m, IsObject a) | |
=> a |
|
-> Word32 |
|
-> Word32 |
|
-> m Message | Returns: The new |
Creates a new Navigation
message with type
GST_NAVIGATION_MESSAGE_ANGLES_CHANGED
for notifying an application
that the current angle, or current number of angles available in a
multiangle video has changed.
messageNewCommandsChanged
navigationMessageNewCommandsChanged Source #
:: (HasCallStack, MonadIO m, IsObject a) | |
=> a |
|
-> m Message | Returns: The new |
Creates a new Navigation
message with type
GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED
messageNewEvent
navigationMessageNewEvent Source #
:: (HasCallStack, MonadIO m, IsObject a) | |
=> a |
|
-> Event |
|
-> m Message | Returns: The new |
Creates a new Navigation
message with type
GST_NAVIGATION_MESSAGE_EVENT
.
Since: 1.6
messageNewMouseOver
navigationMessageNewMouseOver Source #
:: (HasCallStack, MonadIO m, IsObject a) | |
=> a |
|
-> Bool |
|
-> m Message | Returns: The new |
Creates a new Navigation
message with type
GST_NAVIGATION_MESSAGE_MOUSE_OVER
.
messageParseAnglesChanged
navigationMessageParseAnglesChanged Source #
:: (HasCallStack, MonadIO m) | |
=> Message |
|
-> m (Bool, Word32, Word32) | Returns: |
Parse a Navigation
message of type GST_NAVIGATION_MESSAGE_ANGLES_CHANGED
and extract the curAngle
and nAngles
parameters.
messageParseEvent
navigationMessageParseEvent Source #
:: (HasCallStack, MonadIO m) | |
=> Message |
|
-> m (Bool, Event) | Returns: |
Parse a Navigation
message of type GST_NAVIGATION_MESSAGE_EVENT
and extract contained Event
. The caller must unref the event
when done
with it.
Since: 1.6
messageParseMouseOver
navigationMessageParseMouseOver Source #
:: (HasCallStack, MonadIO m) | |
=> Message |
|
-> m (Bool, Bool) | Returns: |
Parse a Navigation
message of type GST_NAVIGATION_MESSAGE_MOUSE_OVER
and extract the active/inactive flag. If the mouse over event is marked
active, it indicates that the mouse is over a clickable area.
queryGetType
navigationQueryGetType Source #
:: (HasCallStack, MonadIO m) | |
=> Query |
|
-> m NavigationQueryType | Returns: The |
Inspect a Query
and return the NavigationQueryType
associated with
it if it is a Navigation
query.
queryNewAngles
navigationQueryNewAngles Source #
:: (HasCallStack, MonadIO m) | |
=> m Query | Returns: The new query. |
Create a new Navigation
angles query. When executed, it will
query the pipeline for the set of currently available angles, which may be
greater than one in a multiangle video.
queryNewCommands
navigationQueryNewCommands Source #
:: (HasCallStack, MonadIO m) | |
=> m Query | Returns: The new query. |
Create a new Navigation
commands query. When executed, it will
query the pipeline for the set of currently available commands.
queryParseAngles
navigationQueryParseAngles Source #
:: (HasCallStack, MonadIO m) | |
=> Query |
|
-> m (Bool, Word32, Word32) | Returns: |
Parse the current angle number in the Navigation
angles query
into the
guint
pointed to by the curAngle
variable, and the number of available
angles into the guint
pointed to by the nAngles
variable.
queryParseCommandsLength
navigationQueryParseCommandsLength Source #
:: (HasCallStack, MonadIO m) | |
=> Query |
|
-> m (Bool, Word32) | Returns: |
Parse the number of commands in the Navigation
commands query
.
queryParseCommandsNth
navigationQueryParseCommandsNth Source #
:: (HasCallStack, MonadIO m) | |
=> Query |
|
-> Word32 |
|
-> m (Bool, NavigationCommand) | Returns: |
Parse the Navigation
command query and retrieve the nth
command from
it into cmd
. If the list contains less elements than nth
, cmd
will be
set to GST_NAVIGATION_COMMAND_INVALID
.
querySetAngles
navigationQuerySetAngles Source #
:: (HasCallStack, MonadIO m) | |
=> Query |
|
-> Word32 |
|
-> Word32 |
|
-> m () |
Set the Navigation
angles query result field in query
.
querySetCommandsv
navigationQuerySetCommandsv Source #
:: (HasCallStack, MonadIO m) | |
=> Query |
|
-> [NavigationCommand] |
|
-> m () |
Set the Navigation
command query result fields in query
. The number
of commands passed must be equal to nCommands
.
sendCommand
navigationSendCommand Source #
:: (HasCallStack, MonadIO m, IsNavigation a) | |
=> a |
|
-> NavigationCommand |
|
-> m () |
Sends the indicated command to the navigation interface.
sendEvent
navigationSendEvent :: (HasCallStack, MonadIO m, IsNavigation a) => a -> Structure -> m () Source #
No description available in the introspection data.
sendKeyEvent
navigationSendKeyEvent Source #
:: (HasCallStack, MonadIO m, IsNavigation a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m () |
No description available in the introspection data.
sendMouseEvent
navigationSendMouseEvent Source #
:: (HasCallStack, MonadIO m, IsNavigation a) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> Double |
|
-> Double |
|
-> m () |
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 Navigation
interface.