package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Video/index.html

Module Wrappers.Video

type t = [ `video | `widget | `initially_unowned | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new Video

val new_for_file : Ocgtk_gio.Gio.Wrappers.File.t option -> t

Create a new Video

val new_for_filename : string option -> t

Create a new Video

val new_for_media_stream : [ `media_stream | `object_ ] Gobject.obj option -> t

Create a new Video

val new_for_resource : string option -> t

Create a new Video

val set_resource : t -> string option -> unit

Makes @self play the resource at the given @resource_path.

This is a utility function that calls method@Gtk.Video.set_file.

val set_media_stream : t -> [ `media_stream | `object_ ] Gobject.obj option -> unit

Sets the media stream to be played back.

@self will take full control of managing the media stream. If you want to manage a media stream yourself, consider using a class@Gtk.Picture for display.

If you want to display a file, consider using method@Gtk.Video.set_file instead.

val set_loop : t -> bool -> unit

Sets whether new files loaded by @self should be set to loop.

val set_graphics_offload : t -> Gtk_enums.graphicsoffloadenabled -> unit

Sets whether to enable graphics offload.

See class@Gtk.GraphicsOffload for more information on graphics offload.

val set_filename : t -> string option -> unit

Makes @self play the given @filename.

This is a utility function that calls gtk_video_set_file(),

val set_file : t -> Ocgtk_gio.Gio.Wrappers.File.t option -> unit

Makes @self play the given @file.

val set_autoplay : t -> bool -> unit

Sets whether @self automatically starts playback when it becomes visible or when a new file gets loaded.

val get_media_stream : t -> [ `media_stream | `object_ ] Gobject.obj option

Gets the media stream managed by @self or %NULL if none.

val get_loop : t -> bool

Returns %TRUE if videos have been set to loop.

val get_graphics_offload : t -> Gtk_enums.graphicsoffloadenabled

Returns whether graphics offload is enabled.

See class@Gtk.GraphicsOffload for more information on graphics offload.

val get_file : t -> Ocgtk_gio.Gio.Wrappers.File.t option

Gets the file played by @self or %NULL if not playing back a file.

val get_autoplay : t -> bool

Returns %TRUE if videos have been set to loop.