package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module GlibSource

Interface to GLib functions (GTK4 / GLib 2.66+)

This module provides access to GLib functionality used by GTK4:

  • Main event loop
  • Timeout and idle callbacks
  • Character set conversion (UTF-8)
  • String utilities
Sourcetype unichar = int

Unicode character (UTF-32 code point)

Sourcetype unistring = unichar array

Array of Unicode characters

Sourceexception GError of string

Exception raised for GLib errors

Main Event Loop

Sourcemodule Main : sig ... end

The Main Event Loop

Sourceval int_of_priority : [< `HIGH | `DEFAULT | `HIGH_IDLE | `DEFAULT_IDLE | `LOW ] -> int

Priority levels for timeouts and idle callbacks

Convert priority variant to integer value

Timeout Callbacks

Sourcemodule Timeout : sig ... end

Timeout callbacks - functions called after a specified time

Idle Callbacks

Sourcemodule Idle : sig ... end

Idle callbacks - functions called when the main loop is idle

Character Set Conversion

Sourcemodule Convert : sig ... end

Character Set Conversion

UTF-8 String Utilities

Sourcemodule Utf8 : sig ... end

UTF-8 String Utilities

Application and Program Names

Sourceval get_prgname : unit -> string option

Get the name of the program. This is typically argv0. Returns None if the program name has not been set.

Sourceval set_prgname : string -> unit

Set the name of the program. This name should not be localized.

Sourceval get_application_name : unit -> string option

Get the human-readable application name for display in the UI. Returns None if the application name has not been set.

Sourceval set_application_name : string -> unit

Set a human-readable name for the application. This name should be localized if possible and is intended for display to the user.