File: src-Add-support-for-GioUnix-GioWin32-split.patch

package info (click to toggle)
glib-d 2.4.3-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 408 kB
  • sloc: makefile: 15; sh: 6
file content (260 lines) | stat: -rw-r--r-- 9,608 bytes parent folder | download
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
Date: Mon, 15 Sep 2025 21:58:43 +0200
Subject: src: Add support for GioUnix / GioWin32 split

Since GLib 2.80 GioUnix and GioWin32 had been moved out from Gio typelib
and gir files, so we need to reflect this in the D bindings.

And since 2.86.0 the split was finalized, so we need to adapt to that

Origin: https://github.com/gtkd-developers/GlibD/commit/be666daa09048a3
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1115332
---
 src/APILookup.txt         |   1 +
 src/APILookupGio.txt      | 106 ++++++++++++++++++++++++----------------------
 src/APILookupGioUnix.txt  |  58 +++++++++++++++++++++++++
 src/APILookupGioWin32.txt |  29 +++++++++++++
 4 files changed, 144 insertions(+), 50 deletions(-)
 create mode 100644 src/APILookupGioUnix.txt
 create mode 100644 src/APILookupGioWin32.txt

diff --git a/src/APILookup.txt b/src/APILookup.txt
index 0022444..627dae7 100644
--- a/src/APILookup.txt
+++ b/src/APILookup.txt
@@ -51,3 +51,4 @@ copy: gtkd
 lookup: APILookupGLib.txt
 lookup: APILookupGObject.txt
 lookup: APILookupGio.txt
+lookup: APILookupGioUnix.txt
diff --git a/src/APILookupGio.txt b/src/APILookupGio.txt
index d0a989f..cdbfbef 100644
--- a/src/APILookupGio.txt
+++ b/src/APILookupGio.txt
@@ -292,31 +292,33 @@ code: start
 code: end
 
 version !Windows: start
-	struct: DesktopAppInfo
-	noCode: new_from_filename
-	code: start
-		/**
-		* Creates a new #GDesktopAppInfo.
-		*
-		* Params:
-		*     filename = the path of a desktop file, in the GLib filename encoding
-		*
-		* Return: a new #GDesktopAppInfo or %NULL on error.
-		*
-		* Throws: ConstructionException GTK+ fails to create the object.
-		*/
-		public static DesktopAppInfo createFromFilename(string filename)
-		{
-			auto p = g_desktop_app_info_new_from_filename(Str.toStringz(filename));
-
-			if(p is null)
+	version <2.86: start
+		struct: DesktopAppInfo
+		noCode: new_from_filename
+		code: start
+			/**
+			* Creates a new #GDesktopAppInfo.
+			*
+			* Params:
+			*     filename = the path of a desktop file, in the GLib filename encoding
+			*
+			* Return: a new #GDesktopAppInfo or %NULL on error.
+			*
+			* Throws: ConstructionException GTK+ fails to create the object.
+			*/
+			public static DesktopAppInfo createFromFilename(string filename)
 			{
-				throw new ConstructionException("null returned by g_desktop_app_info_new_from_filename");
-			}
+				auto p = g_desktop_app_info_new_from_filename(Str.toStringz(filename));
 
-			return new DesktopAppInfo(p, true);
-		}
-	code: end
+				if(p is null)
+				{
+					throw new ConstructionException("null returned by g_desktop_app_info_new_from_filename");
+				}
+
+				return new DesktopAppInfo(p, true);
+			}
+		code: end
+	version: end
 version: end
 
 struct: FileAttributeInfoList
@@ -415,8 +417,10 @@ array: set_value value length
 array: set_value_full value length
 
 version !Windows: start
-	struct: UnixMountEntry
-	class: UnixMountEntry
+	version <2.86: start
+		struct: UnixMountEntry
+		class: UnixMountEntry
+	version: end
 
 	struct: UnixSocketAddress
 	noCode: new_abstract
@@ -545,30 +549,32 @@ move: simple_async_report_gerror_in_idle SimpleAsyncResult
 move: simple_async_report_take_gerror_in_idle SimpleAsyncResult
 
 version !Windows: start
-	move: unix_is_mount_path_system_internal UnixMountEntry is_mount_path_system_internal
-	move: unix_mount_at UnixMountEntry at
-	move: unix_mount_compare UnixMountEntry compare
-	move: unix_mount_free UnixMountEntry free
-	move: unix_mount_get_device_path UnixMountEntry get_device_path
-	move: unix_mount_get_fs_type UnixMountEntry get_fs_type
-	move: unix_mount_get_mount_path UnixMountEntry get_mount_path
-	move: unix_mount_guess_can_eject UnixMountEntry guess_can_eject
-	move: unix_mount_guess_icon UnixMountEntry guess_icon
-	move: unix_mount_guess_name UnixMountEntry guess_name
-	move: unix_mount_guess_should_display UnixMountEntry guess_should_display
-	move: unix_mount_guess_symbolic_icon UnixMountEntry guess_symbolic_icon
-	move: unix_mount_is_readonly UnixMountEntry is_readonly
-	move: unix_mount_is_system_internal UnixMountEntry is_system_internal
-	move: unix_mount_points_changed_since UnixMountEntry points_changed_since
-	move: unix_mount_points_get UnixMountEntry mount_points_get
-	move: unix_mounts_changed_since UnixMountEntry mounts_changed_since
-	move: unix_mounts_get UnixMountEntry mounts_get
-
-	version 2.54: start
-		move: unix_mount_copy UnixMountEntry copy
-		move: unix_mount_for UnixMountEntry mount_for
+	version <2.86: start
+		move: unix_is_mount_path_system_internal UnixMountEntry is_mount_path_system_internal
+		move: unix_mount_at UnixMountEntry at
+		move: unix_mount_compare UnixMountEntry compare
+		move: unix_mount_free UnixMountEntry free
+		move: unix_mount_get_device_path UnixMountEntry get_device_path
+		move: unix_mount_get_fs_type UnixMountEntry get_fs_type
+		move: unix_mount_get_mount_path UnixMountEntry get_mount_path
+		move: unix_mount_guess_can_eject UnixMountEntry guess_can_eject
+		move: unix_mount_guess_icon UnixMountEntry guess_icon
+		move: unix_mount_guess_name UnixMountEntry guess_name
+		move: unix_mount_guess_should_display UnixMountEntry guess_should_display
+		move: unix_mount_guess_symbolic_icon UnixMountEntry guess_symbolic_icon
+		move: unix_mount_is_readonly UnixMountEntry is_readonly
+		move: unix_mount_is_system_internal UnixMountEntry is_system_internal
+		move: unix_mount_points_changed_since UnixMountEntry points_changed_since
+		move: unix_mount_points_get UnixMountEntry mount_points_get
+		move: unix_mounts_changed_since UnixMountEntry mounts_changed_since
+		move: unix_mounts_get UnixMountEntry mounts_get
+
+		version 2.54: start
+			move: unix_mount_copy UnixMountEntry copy
+			move: unix_mount_for UnixMountEntry mount_for
+		version: end
+
+		version 2.58: move: unix_mount_get_options UnixMountEntry get_options
+		version 2.60: move: unix_mount_get_root_path UnixMountEntry get_root_path
 	version: end
-
-	version 2.58: move: unix_mount_get_options UnixMountEntry get_options
-	version 2.60: move: unix_mount_get_root_path UnixMountEntry get_root_path
 version: end
diff --git a/src/APILookupGioUnix.txt b/src/APILookupGioUnix.txt
new file mode 100644
index 0000000..e9214f6
--- /dev/null
+++ b/src/APILookupGioUnix.txt
@@ -0,0 +1,58 @@
+# This file is part of gtkD.
+#
+# gtkD is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# gtkD is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with gtkD; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+
+#############################################
+### Definitions for wrapping Gtk+ ###########
+#############################################
+
+# must start with wrap
+wrap: gio_unix
+
+version !Windows: start
+    version 2.86: start
+        file: GioUnix-2.0.gir
+
+        struct: MountEntry
+        class: MountEntry
+
+        struct: DesktopAppInfo
+        noCode: new_from_filename
+        code: start
+            /**
+            * Creates a new #GDesktopAppInfo.
+            *
+            * Params:
+            *     filename = the path of a desktop file, in the GLib filename encoding
+            *
+            * Return: a new #GDesktopAppInfo or %NULL on error.
+            *
+            * Throws: ConstructionException GTK+ fails to create the object.
+            */
+            public static DesktopAppInfo createFromFilename(string filename)
+            {
+                auto p = g_desktop_app_info_new_from_filename(Str.toStringz(filename));
+
+                if(p is null)
+                {
+                    throw new ConstructionException("null returned by g_desktop_app_info_new_from_filename");
+                }
+
+                return new DesktopAppInfo(p, true);
+            }
+        code: end
+    version: end
+version: end
diff --git a/src/APILookupGioWin32.txt b/src/APILookupGioWin32.txt
new file mode 100644
index 0000000..b890806
--- /dev/null
+++ b/src/APILookupGioWin32.txt
@@ -0,0 +1,29 @@
+# This file is part of gtkD.
+#
+# gtkD is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# gtkD is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with gtkD; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+
+#############################################
+### Definitions for wrapping Gtk+ ###########
+#############################################
+
+# must start with wrap
+wrap: gio_win32
+
+version Windows: start
+    version 2.86: start
+        file: GioWin32-2.0.gir
+    version: end
+version: end