package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gdk/Ocgtk_gdk/Gdk/Wrappers/Texture_downloader/index.html
Module Wrappers.Texture_downloader
type t = [ `texture_downloader ] Gobject.objThe `GdkTextureDownloader` is used to download the contents of a class@Gdk.Texture.
It is intended to be created as a short-term object for a single download, but can be used for multiple downloads of different textures or with different settings.
`GdkTextureDownloader` can be used to convert data between different formats. Create a `GdkTexture` for the existing format and then download it in a different format.
val new_ : [ `texture | `object_ ] Gobject.obj -> tCreate a new TextureDownloader
val set_texture : t -> [ `texture | `object_ ] Gobject.obj -> unitChanges the texture the downloader will download.
val set_format : t -> Gdk_enums.memoryformat -> unitSets the format the downloader will download.
By default, GDK_MEMORY_DEFAULT is set.
val get_texture : t -> [ `texture | `object_ ] Gobject.objGets the texture that the downloader will download.
val get_format : t -> Gdk_enums.memoryformatGets the format that the data will be downloaded in.
val download_bytes : t -> Glib_bytes.t * Gsize.tDownloads the given texture pixels into a `GBytes`. The rowstride will be stored in the stride value.
This function will abort if it tries to download a large texture and fails to allocate memory. If you think that may happen, you should handle memory allocation yourself and use method@Gdk.TextureDownloader.download_into once allocation succeeded.
val get_type : unit -> Gobject.Type.t