introspection: Drop Unix and Win32 prefixes from platform specific APIs

So now introspection users will have to call `GLibUnix.open_pipe()`
rather than `GLibUnix.unix_open_pipe()` — or
`GLibWin32.check_windows_version()` rather than
`GLibWin32.win32_check_windows_version()`.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3037
This commit is contained in:
Philip Withnall 2024-02-08 23:58:26 +00:00
parent 2b4bfadfb7
commit 4314944e56
4 changed files with 50 additions and 38 deletions

View File

@ -13,23 +13,23 @@ file or the `GioUnix-2.0` GIR namespace when using it.
There are three main classes: There are three main classes:
* [struct@GioUnix.UnixMountEntry] * [struct@GioUnix.MountEntry]
* [struct@GioUnix.UnixMountPoint] * [struct@GioUnix.MountPoint]
* [class@GioUnix.UnixMountMonitor] * [class@GioUnix.MountMonitor]
Various helper functions for querying mounts: Various helper functions for querying mounts:
* [func@GioUnix.unix_mount_points_get] * [func@GioUnix.mount_points_get]
* [func@GioUnix.UnixMountPoint.at] * [func@GioUnix.MountPoint.at]
* [func@GioUnix.unix_mounts_get] * [func@GioUnix.mounts_get]
* [func@GioUnix.unix_mount_at] * [func@GioUnix.mount_at]
* [func@GioUnix.unix_mount_for] * [func@GioUnix.mount_for]
* [func@GioUnix.unix_mounts_changed_since] * [func@GioUnix.mounts_changed_since]
* [func@GioUnix.unix_mount_points_changed_since] * [func@GioUnix.mount_points_changed_since]
And several helper functions for checking the type of a mount or path: And several helper functions for checking the type of a mount or path:
* [func@GioUnix.unix_is_mount_path_system_internal] * [func@GioUnix.is_mount_path_system_internal]
* [func@GioUnix.unix_is_system_fs_type] * [func@GioUnix.is_system_fs_type]
* [func@GioUnix.unix_is_system_device_path] * [func@GioUnix.is_system_device_path]

View File

@ -14,12 +14,12 @@ To use these functions, you must explicitly include the
## File Descriptors ## File Descriptors
* [func@GLibUnix.unix_open_pipe] * [func@GLibUnix.open_pipe]
* [func@GLibUnix.unix_set_fd_nonblocking] * [func@GLibUnix.set_fd_nonblocking]
## Pipes ## Pipes
The [struct@GLibUnix.UnixPipe] structure can be used to conveniently open and The [struct@GLibUnix.Pipe] structure can be used to conveniently open and
manipulate a Unix pipe. manipulate a Unix pipe.
<!-- FIXME: https://gitlab.gnome.org/GNOME/gi-docgen/-/issues/173 --> <!-- FIXME: https://gitlab.gnome.org/GNOME/gi-docgen/-/issues/173 -->
@ -33,16 +33,16 @@ The methods for it are all static inline for efficiency. They are:
## Signals ## Signals
* [func@GLibUnix.unix_signal_add] * [func@GLibUnix.signal_add]
* [func@GLibUnix.unix_signal_add_full] * [func@GLibUnix.signal_add_full]
* [func@GLibUnix.unix_signal_source_new] * [func@GLibUnix.signal_source_new]
## Polling ## Polling
* [func@GLibUnix.unix_fd_add] * [func@GLibUnix.fd_add]
* [func@GLibUnix.unix_fd_add_full] * [func@GLibUnix.fd_add_full]
* [func@GLibUnix.unix_fd_source_new] * [func@GLibUnix.fd_source_new]
## User Database ## User Database
* [func@GLibUnix.unix_get_passwd_entry] * [func@GLibUnix.get_passwd_entry]

View File

@ -8,19 +8,19 @@ These functions provide some level of Unix emulation on the
Windows platform. If your application really needs the POSIX Windows platform. If your application really needs the POSIX
APIs, we suggest you try the [Cygwin project](https://cygwin.com/). APIs, we suggest you try the [Cygwin project](https://cygwin.com/).
* [type@GLibWin32.Win32OSType] * [type@GLibWin32.OSType]
* [func@GLibWin32.win32_check_windows_version] * [func@GLibWin32.check_windows_version]
* [func@GLibWin32.win32_get_command_line] * [func@GLibWin32.get_command_line]
* [func@GLibWin32.win32_error_message] * [func@GLibWin32.error_message]
* [func@GLibWin32.win32_getlocale] * [func@GLibWin32.getlocale]
* [func@GLibWin32.win32_get_package_installation_directory] * [func@GLibWin32.get_package_installation_directory]
* [func@GLibWin32.win32_get_package_installation_directory_of_module] * [func@GLibWin32.get_package_installation_directory_of_module]
* [func@GLibWin32.win32_get_package_installation_subdirectory] * [func@GLibWin32.get_package_installation_subdirectory]
* [func@GLibWin32.win32_get_windows_version] * [func@GLibWin32.get_windows_version]
* [func@GLibWin32.win32_locale_filename_from_utf8] * [func@GLibWin32.locale_filename_from_utf8]
* [func@GLibWin32.WIN32_HAVE_WIDECHAR_API] * [func@GLibWin32.HAVE_WIDECHAR_API]
* [func@GLibWin32.WIN32_IS_NT_BASED] * [func@GLibWin32.IS_NT_BASED]
## Deprecated API ## Deprecated API
* [func@GLibWin32.WIN32_DLLMAIN_FOR_DLL_NAME] * [func@GLib.WIN32_DLLMAIN_FOR_DLL_NAME]

View File

@ -71,6 +71,8 @@ if host_system == 'windows'
'-DGLIB_COMPILATION', '-DGLIB_COMPILATION',
'-DGETTEXT_PACKAGE="dummy"', '-DGETTEXT_PACKAGE="dummy"',
'--symbol-prefix=glib', '--symbol-prefix=glib',
'--symbol-prefix=g_win32',
'--identifier-prefix=GWin32',
'--library-path=' + meson.current_build_dir(), '--library-path=' + meson.current_build_dir(),
'--library=gobject-2.0', '--library=gobject-2.0',
], ],
@ -97,6 +99,8 @@ else
'-DGLIB_COMPILATION', '-DGLIB_COMPILATION',
'-DGETTEXT_PACKAGE="dummy"', '-DGETTEXT_PACKAGE="dummy"',
'--symbol-prefix=glib', '--symbol-prefix=glib',
'--symbol-prefix=g_unix',
'--identifier-prefix=GUnix',
'--library-path=' + meson.current_build_dir(), '--library-path=' + meson.current_build_dir(),
'--library=gobject-2.0', '--library=gobject-2.0',
'--c-include=glib-unix.h', '--c-include=glib-unix.h',
@ -216,7 +220,11 @@ if host_system == 'windows'
libgmodule_dep, libgmodule_dep,
], ],
env: gi_gen_env_variables, env: gi_gen_env_variables,
extra_args: gir_args + gio_gir_args + [ '--pkg=gio-win32-2.0' ] + gio_win32_gir_c_includes, extra_args: gir_args + gio_gir_args + gio_win32_gir_c_includes + [
'--pkg=gio-win32-2.0',
'--symbol-prefix=g_win32',
'--identifier-prefix=GWin32'
],
) )
else else
gio_unix_gir_c_includes = [] gio_unix_gir_c_includes = []
@ -240,7 +248,11 @@ else
libgmodule_dep, libgmodule_dep,
], ],
env: gi_gen_env_variables, env: gi_gen_env_variables,
extra_args: gir_args + gio_gir_args + [ '--pkg=gio-unix-2.0' ] + gio_unix_gir_c_includes, extra_args: gir_args + gio_gir_args + gio_unix_gir_c_includes + [
'--pkg=gio-unix-2.0',
'--symbol-prefix=g_unix',
'--identifier-prefix=GUnix'
],
) )
endif endif