This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch main
in repository ego.

View the commit online.

commit f121ca3bb6f03de5c44309a855f9c97a959382ca
Author: [email protected] <[email protected]>
AuthorDate: Thu Mar 26 21:21:05 2026 -0600

    feat(eet): bootstrap package with types, cgo preamble, and auto-init
---
 eet/eet.go   | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 eet/types.go | 19 +++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/eet/eet.go b/eet/eet.go
new file mode 100644
index 0000000..5dfe5e0
--- /dev/null
+++ b/eet/eet.go
@@ -0,0 +1,55 @@
+package eet
+
+/*
+#cgo pkg-config: eet
+
+#include <Eet.h>
+#include <Eina.h>
+
+// Eina_List callbacks for Eet_Data_Descriptor_Class.
+// Signatures use void* to match Eet_Descriptor_List_*_Callback typedefs.
+static void *_ego_eet_list_next(void *l) {
+    return (void *)eina_list_next((Eina_List *)l);
+}
+static void *_ego_eet_list_append(void *l, void *d) {
+    return (void *)eina_list_append((Eina_List *)l, d);
+}
+static void *_ego_eet_list_data(void *l) {
+    return eina_list_data_get((const Eina_List *)l);
+}
+static void *_ego_eet_list_free(void *l) {
+    eina_list_free((Eina_List *)l);
+    return NULL;
+}
+
+// Eina_Hash callbacks for Eet_Data_Descriptor_Class.
+// Signatures use void* to match Eet_Descriptor_Hash_*_Callback typedefs.
+static void *_ego_eet_hash_add(void *h, const char *k, void *d) {
+    Eina_Hash *hash = (Eina_Hash *)h;
+    if (!hash) hash = eina_hash_string_superfast_new(NULL);
+    eina_hash_add(hash, k, d);
+    return (void *)hash;
+}
+static void _ego_eet_hash_free(void *h) {
+    if (h) eina_hash_free((Eina_Hash *)h);
+}
+*/
+import "C"
+
+// Mode constants sourced from C enum Eet_File_Mode.
+const (
+	ModeRead      = Mode(C.EET_FILE_MODE_READ)
+	ModeWrite     = Mode(C.EET_FILE_MODE_WRITE)
+	ModeReadWrite = Mode(C.EET_FILE_MODE_READ_WRITE)
+)
+
+// Compression constants sourced from C enum Eet_Compression.
+const (
+	CompressNone      = Compression(C.EET_COMPRESSION_NONE)
+	CompressDefault   = Compression(C.EET_COMPRESSION_DEFAULT)
+	CompressSuperfast = Compression(C.EET_COMPRESSION_SUPERFAST)
+)
+
+func init() {
+	C.eet_init()
+}
diff --git a/eet/types.go b/eet/types.go
new file mode 100644
index 0000000..32ff3c4
--- /dev/null
+++ b/eet/types.go
@@ -0,0 +1,19 @@
+// Package eet provides Go bindings for the EFL EET serialization library.
+package eet
+
+import "errors"
+
+// Mode specifies how an EET file is opened.
+type Mode int
+
+// Compression specifies the compression level for EET writes.
+type Compression int
+
+var (
+	ErrBadFile     = errors.New("eet: bad or corrupt file")
+	ErrNotFound    = errors.New("eet: key not found")
+	ErrReadOnly    = errors.New("eet: file not writable")
+	ErrEncode      = errors.New("eet: encoding failed")
+	ErrDecode      = errors.New("eet: decoding failed")
+	ErrUnsupported = errors.New("eet: unsupported field type")
+)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to