VideoRef
public struct VideoRef : VideoProtocol, GWeakCapturing
GtkVideo is a widget to show a GtkMediaStream with media controls.

The controls are available separately as [classGtk.MediaControls].
If you just want to display a video without controls, you can treat it
like any other paintable and for example put it into a [classGtk.Picture].
GtkVideo aims to cover use cases such as previews, embedded animations,
etc. It supports autoplay, looping, and simple media controls. It does
not have support for video overlays, multichannel audio, device
selection, or input. If you are writing a full-fledged video player,
you may want to use the [classGdk.Paintable] API and a media framework
such as Gstreamer directly.
The VideoRef type acts as a lightweight Swift reference to an underlying GtkVideo instance.
It exposes methods that can operate on this data type through VideoProtocol conformance.
Use VideoRef only as an unowned reference to an existing GtkVideo instance.
-
Untyped pointer to the underlying `GtkVideo` instance.For type-safe access, use the generated, typed pointer
video_ptrproperty instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GtkVideo>) -
Designated initialiser from a constant pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GtkVideo>) -
Conditional initialiser from an optional pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GtkVideo>?) -
Conditional initialiser from an optional, non-mutable pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GtkVideo>?) -
Conditional initialiser from an optional
gpointerDeclaration
Swift
@inlinable init!(gpointer g: gpointer?) -
Conditional initialiser from an optional, non-mutable
gconstpointerDeclaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?) -
Reference intialiser for a related type that implements
VideoProtocolDeclaration
Swift
@inlinable init<T>(_ other: T) where T : VideoProtocol -
This factory is syntactic sugar for setting weak pointers wrapped in
GWeak<T>Declaration
Swift
@inlinable static func unowned<T>(_ other: T) -> VideoRef where T : VideoProtocol -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
VideoProtocol.Declaration
Swift
@inlinable init<T>(cPointer: UnsafeMutablePointer<T>) -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
VideoProtocol.Declaration
Swift
@inlinable init<T>(constPointer: UnsafePointer<T>) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
VideoProtocol.Declaration
Swift
@inlinable init(mutating raw: UnsafeRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
VideoProtocol.Declaration
Swift
@inlinable init(raw: UnsafeMutableRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
VideoProtocol.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer) -
Creates a new empty
GtkVideo.Declaration
Swift
@inlinable init() -
Creates a
GtkVideoto play back the givenfile.Declaration
Swift
@inlinable init<FileT>(file: FileT?) where FileT : FileProtocol -
Creates a
GtkVideoto play back the givenfilename.This is a utility function that calls [ctor
Gtk.Video.new_for_file], See that function for details.Declaration
Swift
@inlinable init(filename: UnsafePointer<CChar>? = nil) -
Creates a
GtkVideoto play back the givenstream.Declaration
Swift
@inlinable init<MediaStreamT>(mediaStream stream: MediaStreamT?) where MediaStreamT : MediaStreamProtocol -
Creates a
GtkVideoto play back the resource at the givenresource_path.This is a utility function that calls [ctor
Gtk.Video.new_for_file].Declaration
Swift
@inlinable init(resource resourcePath: UnsafePointer<CChar>? = nil) -
Creates a
GtkVideoto play back the givenfile.Declaration
Swift
@inlinable static func newFor<FileT>(file: FileT?) -> WidgetRef! where FileT : FileProtocol -
Creates a
GtkVideoto play back the givenfilename.This is a utility function that calls [ctor
Gtk.Video.new_for_file], See that function for details.Declaration
Swift
@inlinable static func newFor(filename: UnsafePointer<CChar>? = nil) -> WidgetRef! -
Creates a
GtkVideoto play back the givenstream.Declaration
Swift
@inlinable static func newForMedia<MediaStreamT>(mediaStream stream: MediaStreamT?) -> WidgetRef! where MediaStreamT : MediaStreamProtocol -
Creates a
GtkVideoto play back the resource at the givenresource_path.This is a utility function that calls [ctor
Gtk.Video.new_for_file].Declaration
Swift
@inlinable static func newFor(resource resourcePath: UnsafePointer<CChar>? = nil) -> WidgetRef!
View on GitHub
Install in Dash
VideoRef Structure Reference