From a89e4b27680fa0941b209054e8687241033a1dce Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Tue, 20 May 2025 20:26:51 +0200 Subject: [PATCH] add resource object ptr to notebook type --- application/types.c | 1 + application/types.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/application/types.c b/application/types.c index c3f39d9..34fcf19 100644 --- a/application/types.c +++ b/application/types.c @@ -76,6 +76,7 @@ void register_types() { dbuClassAdd(notebook_class, Notebook, repository_id); dbuClassAdd(notebook_class, Notebook, type); dbuClassAdd(notebook_class, Notebook, position); + dbuClassAddObj(notebook_class, "resource_id", offsetof(Notebook, resource), resource_class); repository_class = dbuRegisterClass(ctx, "repositories", Repository, repository_id); dbuClassAdd(repository_class, Repository, name); diff --git a/application/types.h b/application/types.h index 993dbdf..c83f6d0 100644 --- a/application/types.h +++ b/application/types.h @@ -107,6 +107,8 @@ struct Notebook { int64_t repository_id; int type; int position; + + Resource *resource; }; struct Note { -- 2.43.5