From 3d84aa264c55f0cc355ba767c03c064664ec8217 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 3 Jun 2025 14:10:52 +0100 Subject: [PATCH] docs: Stop hiding the Unix-like APIs which are in Gio-2.0.gir There are four `Unix.+` classes in `Gio-2.0.gir` which need to be exposed in the `Gio-2.0.gir` docs because they are actually now cross-platform (which is a move which has caused a lot of pain). Change the code which filters out the rest of the `Unix.+` classes to ignore these ones. The rest of the classes continue to be documented via `GioUnix-2.0.gir`. Changing the regexs for this involved a fun use of negative lookahead. See https://gitlab.gnome.org/GNOME/glib/-/issues/3697#note_2459405 Signed-off-by: Philip Withnall Helps: #3697 --- docs/reference/gio/gio.toml.in | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/reference/gio/gio.toml.in b/docs/reference/gio/gio.toml.in index afedaa197..865b38405 100644 --- a/docs/reference/gio/gio.toml.in +++ b/docs/reference/gio/gio.toml.in @@ -79,20 +79,27 @@ content_images = [ # We have to hide the GioUnix and GioWin32 symbols from the documentation — they # have to be present in the GIR files (until we next break API), but their # documentation is split out to gio-{unix,win32}.toml. +# +# There are four exceptions, which are ‘Unix’ APIs which are legitimately in +# the main Gio library as they can now be used on Windows: +# - GUnixConnection +# - GUnixCredentialsMessage +# - GUnixFDList +# - GUnixSocketAddress [[object]] -pattern = "Unix[A-Z].+" +pattern = "Unix(?!Connection|CredentialsMessage|FDList|SocketAddress).+" hidden = true [[object]] -pattern = "unix_.+" +pattern = "unix_(?!connection|credentials_message|fd_list|socket_address).+" hidden = true [[struct]] -pattern = "Unix[A-Z].+" +pattern = "Unix(?!Connection|CredentialsMessage|FDList|SocketAddress).+" hidden = true [[function]] -pattern = "unix_.+" +pattern = "unix_(?!connection|credentials_message|fd_list|socket_address).+" hidden = true [[object]]