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.gdk/Ocgtk_gdk/Gdk/Wrappers/Dmabuf_formats/index.html

Module Wrappers.Dmabuf_formats

type t = [ `dmabuf_formats ] Gobject.obj

The `GdkDmabufFormats` struct provides information about supported DMA buffer formats.

You can query whether a given format is supported with method@Gdk.DmabufFormats.contains and you can iterate over the list of all supported formats with method@Gdk.DmabufFormats.get_n_formats and method@Gdk.DmabufFormats.get_format.

The list of supported formats is sorted by preference, with the best formats coming first.

The list may contains (format, modifier) pairs where the modifier is `DMA_FORMAT_MOD_INVALID`, indicating that **_implicit modifiers_** may be used with this format.

See class@Gdk.DmabufTextureBuilder for more information about DMA buffers.

Note that DMA buffers only exist on Linux.

val ref : t -> t

Increases the reference count of @formats.

val get_n_formats : t -> Gsize.t

Returns the number of formats that the @formats object contains.

Note that DMA buffers are a Linux concept, so on other platforms, method@Gdk.DmabufFormats.get_n_formats will always return zero.

val get_format : t -> Gsize.t -> UInt32.t * UInt64.t

Gets the fourcc code and modifier for a format that is contained in @formats.

val equal : t -> t option -> bool

Returns whether @formats1 and @formats2 contain the same dmabuf formats, in the same order.

val contains : t -> UInt32.t -> UInt64.t -> bool

Returns whether a given format is contained in @formats.

val get_type : unit -> Gobject.Type.t