From 98fc3cf2108790200aa12635bc46e3cb3cb0139a Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 21 Mar 2025 10:40:00 +0100 Subject: all: move generated modules into gi:: namespace Signed-off-by: Drew DeVault --- bindings/gi/glib/types.ha | 10 ++++++++++ bindings/gi/gobject/types.ha | 13 +++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 bindings/gi/glib/types.ha create mode 100644 bindings/gi/gobject/types.ha (limited to 'bindings/gi') diff --git a/bindings/gi/glib/types.ha b/bindings/gi/glib/types.ha new file mode 100644 index 0000000..2492c4e --- /dev/null +++ b/bindings/gi/glib/types.ha @@ -0,0 +1,10 @@ +export type Type = size; + +// Boolean type used by GLib and related libraries, equivalent to gboolean in C. +export type boolean = uint; + +// True value of [[boolean]]. +export def TRUE: boolean = 1; + +// False value of [[boolean]]. +export def FALSE: boolean = 0; diff --git a/bindings/gi/gobject/types.ha b/bindings/gi/gobject/types.ha new file mode 100644 index 0000000..570fe30 --- /dev/null +++ b/bindings/gi/gobject/types.ha @@ -0,0 +1,13 @@ +use types::c; + +export type ValueUnion = union { + v_int: int, + v_uint: uint, + v_long: c::long, + v_ulong: c::ulong, + v_int64: i64, + v_uint64: u64, + v_float: f32, + v_double: f64, + v_pointer: *opaque, +}; -- cgit 1.3.0-6-gf8a5