gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.MediaControls

Contents

- Exported types
- Methods
  - getMediaStream
  - new
  - setMediaStream
- Properties
  - mediaStream

Description

Shows controls for video playback.

<picture> <source srcset="media-controls-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example GtkMediaControls" src="media-controls.png"> </picture>

Usually, `GtkMediaControls` is used as part of `Video`.

Synopsis

- newtype MediaControls = MediaControls (ManagedPtr MediaControls)
- class (GObject o, IsDescendantOf MediaControls o) => IsMediaControls o
- toMediaControls :: (MonadIO m, IsMediaControls o) => o -> m MediaControls
- mediaControlsGetMediaStream :: (HasCallStack, MonadIO m, IsMediaControls a) => a -> m (Maybe MediaStream)
- mediaControlsNew :: (HasCallStack, MonadIO m, IsMediaStream a) => Maybe a -> m MediaControls
- mediaControlsSetMediaStream :: (HasCallStack, MonadIO m, IsMediaControls a, IsMediaStream b) => a -> Maybe b -> m ()
- clearMediaControlsMediaStream :: (MonadIO m, IsMediaControls o) => o -> m ()
- constructMediaControlsMediaStream :: (IsMediaControls o, MonadIO m, IsMediaStream a) => a -> m (GValueConstruct o)
- getMediaControlsMediaStream :: (MonadIO m, IsMediaControls o) => o -> m (Maybe MediaStream)
- setMediaControlsMediaStream :: (MonadIO m, IsMediaControls o, IsMediaStream a) => o -> a -> m ()

# Exported types

newtype MediaControls Source #

Memory-managed wrapper type.

Constructors

MediaControls (ManagedPtr MediaControls) |

#### Instances

Instances details

Eq MediaControls Source # |
Instance details Defined in GI.Gtk.Objects.MediaControls Methods (==) :: MediaControls -> MediaControls -> Bool Source # (/=) :: MediaControls -> MediaControls -> Bool Source #
GObject MediaControls Source # |
Instance details Defined in GI.Gtk.Objects.MediaControls
ManagedPtrNewtype MediaControls Source # |
Instance details Defined in GI.Gtk.Objects.MediaControls Methods toManagedPtr :: MediaControls -> ManagedPtr MediaControls Source #
TypedObject MediaControls Source # |
Instance details Defined in GI.Gtk.Objects.MediaControls Methods glibType :: IO GType Source #
HasParentTypes MediaControls Source # |
Instance details Defined in GI.Gtk.Objects.MediaControls
IsGValue (Maybe MediaControls) Source # | Convert `MediaControls` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.MediaControls Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe MediaControls -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe MediaControls) Source #
type ParentTypes MediaControls Source # |
Instance details Defined in GI.Gtk.Objects.MediaControls type ParentTypes MediaControls = '[Widget, Object, Accessible, Buildable, ConstraintTarget]

class (GObject o, IsDescendantOf MediaControls o) => IsMediaControls o Source #

Type class for types which can be safely cast to `MediaControls`, for instance with `toMediaControls`.

#### Instances

Instances details

(GObject o, IsDescendantOf MediaControls o) => IsMediaControls o Source # |
Instance details Defined in GI.Gtk.Objects.MediaControls

toMediaControls :: (MonadIO m, IsMediaControls o) => o -> m MediaControls Source #

Cast to `MediaControls`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updatePlatformState, updateProperty, updateRelation, updateState, watchClosure.

#### Getters

getAccessibleId, getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getLimitEvents, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMediaStream, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

#### Setters

setAccessibleParent, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMediaStream, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.

## getMediaStream

mediaControlsGetMediaStream Source #

Arguments

:: (HasCallStack, MonadIO m, IsMediaControls a) |
=> a | `controls`: a `GtkMediaControls`
-> m (Maybe MediaStream) | Returns: The media stream managed by `controls`

Gets the media stream managed by `controls` or `Nothing` if none.

## new

mediaControlsNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsMediaStream a) |
=> Maybe a | `stream`: a `GtkMediaStream` to manage
-> m MediaControls | Returns: a new `GtkMediaControls`

Creates a new `GtkMediaControls` managing the `stream` passed to it.

## setMediaStream

mediaControlsSetMediaStream Source #

Arguments

:: (HasCallStack, MonadIO m, IsMediaControls a, IsMediaStream b) |
=> a | `controls`: a `GtkMediaControls` widget
-> Maybe b | `stream`: a `GtkMediaStream`
-> m () |

Sets the stream that is controlled by `controls`.

# Properties

## mediaStream

The media-stream managed by this object or `Nothing` if none.

clearMediaControlsMediaStream :: (MonadIO m, IsMediaControls o) => o -> m () Source #

Set the value of the “`media-stream`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #mediaStream

constructMediaControlsMediaStream :: (IsMediaControls o, MonadIO m, IsMediaStream a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`media-stream`” property. This is rarely needed directly, but it is used by `new`.

getMediaControlsMediaStream :: (MonadIO m, IsMediaControls o) => o -> m (Maybe MediaStream) Source #

Get the value of the “`media-stream`” property. When overloading is enabled, this is equivalent to

    get mediaControls #mediaStream

setMediaControlsMediaStream :: (MonadIO m, IsMediaControls o, IsMediaStream a) => o -> a -> m () Source #

Set the value of the “`media-stream`” property. When overloading is enabled, this is equivalent to

    set mediaControls [ #mediaStream := value ]