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

Module Wrappers.Css_provider

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

Create a new CssProvider

val to_string : t -> string

Converts the @provider into a string representation in CSS format.

Using method@Gtk.CssProvider.load_from_string with the return value from this function on a new provider created with ctor@Gtk.CssProvider.new will basically create a duplicate of this @provider.

val load_named : t -> string -> string option -> unit

Loads a theme from the usual theme paths.

The actual process of finding the theme might change between releases, but it is guaranteed that this function uses the same mechanism to load the theme that GTK uses for loading its own theme.

val load_from_string : t -> string -> unit

Loads @string into @css_provider.

This clears any previously loaded information.

val load_from_resource : t -> string -> unit

Loads the data contained in the resource at @resource_path into the @css_provider.

This clears any previously loaded information.

val load_from_path : t -> string -> unit

Loads the data contained in @path into @css_provider.

This clears any previously loaded information.

val load_from_file : t -> Ocgtk_gio.Gio.Wrappers.File.t -> unit

Loads the data contained in @file into @css_provider.

This clears any previously loaded information.

val load_from_data : t -> string -> int -> unit

Loads @data into @css_provider.

This clears any previously loaded information.

val load_from_bytes : t -> Glib_bytes.t -> unit

Loads @data into @css_provider.

This clears any previously loaded information.