aboutsummaryrefslogtreecommitdiffstats
path: root/community/libxfce4util/vala.patch
blob: 700b1052ca57b021038bd40e8d53da3ae8e9e482 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From bd9b419cafa3e9f854a27efb94090c0c69c2ab52 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 16 Oct 2018 19:31:15 +0200
Subject: [PATCH] Fix vala binding

Fix the XfceRc vala binding by adding custom vala code.
---
 libxfce4util/Makefile.am                  |  2 +-
 libxfce4util/libxfce4util-1.0-custom.vala | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100644 libxfce4util/libxfce4util-1.0-custom.vala

diff --git a/libxfce4util/Makefile.am b/libxfce4util/Makefile.am
index e7dff26..2b317e6 100644
--- a/libxfce4util/Makefile.am
+++ b/libxfce4util/Makefile.am
@@ -164,7 +164,7 @@ VAPIGEN_GIRDIRS = $(prefix)/share/gir-1.0
 
 ## libxfce4util_1_0_vapi_DEPS = libxfce4util-1.0
 libxfce4util_1_0_vapi_METADATADIRS = $(srcdir)
-libxfce4util_1_0_vapi_FILES = libxfce4util-1.0.gir
+libxfce4util_1_0_vapi_FILES = libxfce4util-1.0.gir libxfce4util-1.0-custom.vala
 
 vapidir = $(datadir)/vala/vapi
 vapi_DATA = $(VAPIGEN_VAPIS)
diff --git a/libxfce4util/libxfce4util-1.0-custom.vala b/libxfce4util/libxfce4util-1.0-custom.vala
new file mode 100644
index 0000000..9ef6bea
--- /dev/null
+++ b/libxfce4util/libxfce4util-1.0-custom.vala
@@ -0,0 +1,11 @@
+namespace Xfce {
+
+	[Compact]
+	[CCode (cheader_filename = "libxfce4util/libxfce4util.h", free_function = "xfce_rc_close")]
+	public class Rc {
+		[CCode (has_construct_function = false, cname = "xfce_rc_simple_open")]
+		public Rc (string filename, bool readonly);
+		[CCode (has_construct_function = false, cname = "xfce_rc_config_open")]
+		public Rc.from_resource (Xfce.ResourceType type, string resource, bool readonly);
+	}
+}
-- 
2.19.1

diff --git a/libxfce4util/Makefile.in b/libxfce4util/Makefile.in
index d22907e..c329aa3 100644
--- a/libxfce4util/Makefile.in
+++ b/libxfce4util/Makefile.in
@@ -707,7 +707,7 @@ EXTRA_DIST = abicheck.sh libxfce4util.symbols libxfce4util-alias.h \
 @ENABLE_VAPIGEN_TRUE@VAPIGEN_VAPIS = libxfce4util-1.0.vapi
 @ENABLE_VAPIGEN_TRUE@VAPIGEN_GIRDIRS = $(prefix)/share/gir-1.0
 @ENABLE_VAPIGEN_TRUE@libxfce4util_1_0_vapi_METADATADIRS = $(srcdir)
-@ENABLE_VAPIGEN_TRUE@libxfce4util_1_0_vapi_FILES = libxfce4util-1.0.gir
+@ENABLE_VAPIGEN_TRUE@libxfce4util_1_0_vapi_FILES = libxfce4util-1.0.gir libxfce4util-1.0-custom.vala
 @ENABLE_VAPIGEN_TRUE@vapidir = $(datadir)/vala/vapi
 @ENABLE_VAPIGEN_TRUE@vapi_DATA = $(VAPIGEN_VAPIS)
 @HAVE_GNUC_VISIBILITY_TRUE@TESTS = abicheck.sh