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/Content_provider/index.html

Module Wrappers.Content_provider

type t = [ `content_provider | `object_ ] Gobject.obj
val new_for_bytes : string -> Glib_bytes.t -> t

Create a new ContentProvider

val new_for_value : Gobject.Value.t -> t

Create a new ContentProvider

val new_union : t array option -> Gsize.t -> t

Create a new ContentProvider

val write_mime_type_finish : t -> Ocgtk_gio.Gio.Wrappers.Async_result.t -> (bool, GError.t) result

Finishes an asynchronous write operation.

See method@Gdk.ContentProvider.write_mime_type_async.

val ref_storable_formats : t -> [ `content_formats ] Gobject.obj

Gets the formats that the provider suggests other applications to store the data in.

An example of such an application would be a clipboard manager.

This can be assumed to be a subset of method@Gdk.ContentProvider.ref_formats.

val ref_formats : t -> [ `content_formats ] Gobject.obj

Gets the formats that the provider can provide its current contents in.

val get_value : t -> (bool * Gobject.Value.t, GError.t) result

Gets the contents of @provider stored in @value.

The @value will have been initialized to the `GType` the value should be provided in. This given `GType` does not need to be listed in the formats returned by method@Gdk.ContentProvider.ref_formats. However, if the given `GType` is not supported, this operation can fail and `G_IO_ERROR_NOT_SUPPORTED` will be reported.

val content_changed : t -> unit

Emits the ::content-changed signal.

val get_formats : t -> [ `content_formats ] Gobject.obj

Get property: formats

val get_storable_formats : t -> [ `content_formats ] Gobject.obj

Get property: storable-formats

val on_content_changed : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id