GobjectSourceGObject type system and object model for GTK4
Type for GObject instances. The type parameter provides type safety.
GType identifier — opaque; use Type.equal to compare, Type.to_int for formatting
GValue container for generic values
GClosure for signal callbacks
same a b is true iff a and b wrap the same underlying GObject pointer. Two extractions of the same GObject (e.g. successive Gobject.Value.get_object calls in a signal callback) allocate distinct OCaml custom blocks, so Stdlib.(==) always returns false. Use same when the intent is identity comparison.
Stdlib.(=), Stdlib.compare, and Hashtbl.hash also operate on pointer identity for obj values (the custom block installs a pointer-compare / pointer-hash); same is the explicit form.