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

Module Wrappers.Clipboard

type t = [ `clipboard | `object_ ] Gobject.obj
val store_finish : t -> Ocgtk_gio.Gio.Wrappers.Async_result.t -> (bool, GError.t) result

Finishes an asynchronous clipboard store.

See method@Gdk.Clipboard.store_async.

val set_value : t -> Gobject.Value.t -> unit

Sets the @clipboard to contain the given @value.

val set_content : t -> [ `content_provider | `object_ ] Gobject.obj option -> bool

Sets a new content provider on @clipboard.

The clipboard will claim the `GdkDisplay`'s resources and advertise these new contents to other applications.

In the rare case of a failure, this function will return %FALSE. The clipboard will then continue reporting its old contents and ignore @provider.

If the contents are read by either an external application or the @clipboard's read functions, @clipboard will select the best format to transfer the contents and then request that format from @provider.

Finishes an asynchronous clipboard read.

See method@Gdk.Clipboard.read_value_async.

val read_texture_finish : t -> Ocgtk_gio.Gio.Wrappers.Async_result.t -> ([ `texture | `object_ ] Gobject.obj option, GError.t) result

Finishes an asynchronous clipboard read.

See method@Gdk.Clipboard.read_texture_async.

val read_text_finish : t -> Ocgtk_gio.Gio.Wrappers.Async_result.t -> (string option, GError.t) result

Finishes an asynchronous clipboard read.

See method@Gdk.Clipboard.read_text_async.

val is_local : t -> bool

Returns if the clipboard is local.

A clipboard is considered local if it was last claimed by the running application.

Note that method@Gdk.Clipboard.get_content may return %NULL even on a local clipboard. In this case the clipboard is empty.

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

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

val get_display : t -> [ `display | `object_ ] Gobject.obj

Gets the `GdkDisplay` that the clipboard was created for.

val get_content : t -> [ `content_provider | `object_ ] Gobject.obj option

Returns the `GdkContentProvider` currently set on @clipboard.

If the @clipboard is empty or its contents are not owned by the current process, %NULL will be returned.

val get_local : t -> bool

Get property: local

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