summaryrefslogtreecommitdiffstats
path: root/test cases/vala/11 generated vapi/libbar
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
commit7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch)
tree4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/vala/11 generated vapi/libbar
parentInitial commit. (diff)
downloadmeson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz
meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/vala/11 generated vapi/libbar')
-rw-r--r--test cases/vala/11 generated vapi/libbar/bar.c29
-rw-r--r--test cases/vala/11 generated vapi/libbar/bar.h9
-rw-r--r--test cases/vala/11 generated vapi/libbar/meson.build32
3 files changed, 70 insertions, 0 deletions
diff --git a/test cases/vala/11 generated vapi/libbar/bar.c b/test cases/vala/11 generated vapi/libbar/bar.c
new file mode 100644
index 0000000..3037141
--- /dev/null
+++ b/test cases/vala/11 generated vapi/libbar/bar.c
@@ -0,0 +1,29 @@
+#include "bar.h"
+#include "foo.h"
+
+struct _BarBar
+{
+ GObject parent_instance;
+};
+
+G_DEFINE_TYPE (BarBar, bar_bar, G_TYPE_OBJECT)
+
+static void
+bar_bar_class_init (BarBarClass *klass)
+{
+}
+
+static void
+bar_bar_init (BarBar *self)
+{
+}
+
+/**
+ * bar_bar_return_success:
+ *
+ * Returns 0
+ */
+int bar_bar_return_success(void)
+{
+ return foo_foo_return_success();
+}
diff --git a/test cases/vala/11 generated vapi/libbar/bar.h b/test cases/vala/11 generated vapi/libbar/bar.h
new file mode 100644
index 0000000..4ca7270
--- /dev/null
+++ b/test cases/vala/11 generated vapi/libbar/bar.h
@@ -0,0 +1,9 @@
+#include <glib-object.h>
+
+#pragma once
+
+#define BAR_TYPE_BAR (bar_bar_get_type())
+
+G_DECLARE_FINAL_TYPE (BarBar, bar_bar, BAR, BAR, GObject)
+
+int bar_bar_return_success(void);
diff --git a/test cases/vala/11 generated vapi/libbar/meson.build b/test cases/vala/11 generated vapi/libbar/meson.build
new file mode 100644
index 0000000..0bf7d5c
--- /dev/null
+++ b/test cases/vala/11 generated vapi/libbar/meson.build
@@ -0,0 +1,32 @@
+libbar_sources = [
+ 'bar.c',
+ 'bar.h',
+]
+
+libbar_deps = [
+ dependency('gobject-2.0'),
+ libfoo_dep,
+]
+
+libbar = shared_library('bar', libbar_sources,
+ dependencies: libbar_deps,
+ install: true,
+)
+
+libbar_api_ver = '1.0'
+
+libbar_gir = gnome.generate_gir(libbar,
+ sources: libbar_sources,
+ namespace: 'Bar',
+ nsversion: libbar_api_ver,
+ symbol_prefix: 'bar',
+ extra_args: [
+ '--c-include=bar.h',
+ ],
+)
+
+libbar_vapi = gnome.generate_vapi('bar-' + libbar_api_ver,
+ sources: libbar_gir[0],
+ packages: libfoo_vapi,
+ install: true,
+)