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

Module UInt64Source

Unsigned 64-bit integer type for GLib guint64 values.

Backed by int64 internally — values above Int64.max_int are stored as negative int64 bit patterns, which round-trip correctly through GTK/GLib C calls via Int64_val / caml_copy_int64.

The type is kept abstract to prevent callers from accidentally using Int64.compare or other signed operations, which give wrong results for values ≥ 2^63. Use compare and equal for comparisons.

Sourcetype t
Sourceval zero : t
Sourceval one : t
Sourceval max_int : t
Sourceval of_int : int -> t
Sourceval to_int : t -> int
Sourceval add : t -> t -> t
Sourceval sub : t -> t -> t
Sourceval mul : t -> t -> t
Sourceval of_string : string -> t

Parse a decimal (or 0x/0o/0b prefixed) unsigned integer.

Sourceval to_string : t -> string

Format as an unsigned decimal string.

Sourceval equal : t -> t -> bool

Equality.

Sourceval compare : t -> t -> int

Unsigned comparison. Returns a negative int, zero, or positive int if the first argument is less than, equal to, or greater than the second, interpreted as unsigned 64-bit values.