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

Module Wrappers.Css_section

type t = [ `css_section ] Gobject.obj

Defines a part of a CSS document.

Because sections are nested into one another, you can use method@CssSection.get_parent to get the containing region.

val new_ : Ocgtk_gio.Gio.Wrappers.File.t option -> [ `css_location ] Gobject.obj -> [ `css_location ] Gobject.obj -> t

Create a new CssSection

val to_string : t -> string

Prints the section into a human-readable text form using method@Gtk.CssSection.print.

val ref : t -> t

Increments the reference count on `section`.

val get_start_location : t -> [ `css_location ] Gobject.obj

Returns the location in the CSS document where this section starts.

val get_parent : t -> t option

Gets the parent section for the given `section`.

The parent section is the section that contains this `section`. A special case are sections of type `GTK_CSS_SECTION_DOCUMEN`T. Their parent will either be `NULL` if they are the original CSS document that was loaded by method@Gtk.CssProvider.load_from_file or a section of type `GTK_CSS_SECTION_IMPORT` if it was loaded with an `@import` rule from a different file.

val get_file : t -> Ocgtk_gio.Gio.Wrappers.File.t option

Gets the file that @section was parsed from.

If no such file exists, for example because the CSS was loaded via method@Gtk.CssProvider.load_from_data, then `NULL` is returned.

val get_end_location : t -> [ `css_location ] Gobject.obj

Returns the location in the CSS document where this section ends.

val get_type : unit -> Gobject.Type.t