258 lines
7.1 KiB
Diff
258 lines
7.1 KiB
Diff
From 77a6a304ad6b4d7febe12b3c92da4a00feb1a84e Mon Sep 17 00:00:00 2001
|
|
From: Ray Strode <rstrode@redhat.com>
|
|
Date: Thu, 24 Aug 2023 17:43:00 -0400
|
|
Subject: [PATCH 3/4] meson: Add codegen for localed
|
|
|
|
We're going to need to be querying localed for input source information.
|
|
|
|
This commit paves the way for that by generating proxy glue code for
|
|
talking to localed.
|
|
---
|
|
libgnome-desktop/meson.build | 8 +++++
|
|
libgnome-desktop/org.freedesktop.locale1.xml | 38 ++++++++++++++++++++
|
|
2 files changed, 46 insertions(+)
|
|
create mode 100644 libgnome-desktop/org.freedesktop.locale1.xml
|
|
|
|
diff --git a/libgnome-desktop/meson.build b/libgnome-desktop/meson.build
|
|
index d41e0cc0..164fd2ff 100644
|
|
--- a/libgnome-desktop/meson.build
|
|
+++ b/libgnome-desktop/meson.build
|
|
@@ -28,60 +28,66 @@ conf.set('HAVE_USELOCALE', cc.has_function('uselocale'))
|
|
conf.set('HAVE_XLOCALE', cc.has_header('xlocale.h'))
|
|
|
|
configure_file(
|
|
output: 'config.h',
|
|
configuration: conf,
|
|
)
|
|
|
|
version_conf = configuration_data()
|
|
version_array = meson.project_version().split('.')
|
|
version_conf.set('GNOME_PLATFORM', version_array[0])
|
|
|
|
gnome_desktop_header_file = configure_file(
|
|
input: 'gnome-desktop-version.h.in',
|
|
output: 'gnome-desktop-version.h',
|
|
configuration: version_conf,
|
|
)
|
|
|
|
dbus_xrandr_built_sources = gnome.gdbus_codegen('meta-dbus-xrandr',
|
|
'xrandr.xml',
|
|
namespace: 'MetaDBus',
|
|
interface_prefix: 'org.gnome.Mutter'
|
|
)
|
|
|
|
dbus_idle_built_sources = gnome.gdbus_codegen('meta-dbus-idle-monitor',
|
|
'idle-monitor.xml',
|
|
namespace: 'MetaDBus',
|
|
interface_prefix: 'org.gnome.Mutter',
|
|
object_manager: true
|
|
)
|
|
|
|
+dbus_localed_built_sources = gnome.gdbus_codegen('sd-locale1',
|
|
+ 'org.freedesktop.locale1.xml',
|
|
+ namespace: 'SdDBus',
|
|
+ interface_prefix: 'org.freedesktop',
|
|
+)
|
|
+
|
|
non_latin_input_sources = custom_target('generate_non_latin_input_sources_header',
|
|
output : 'non-latin-input-sources.h',
|
|
command : [python3, files ('generate-non-latin-input-sources.py')]
|
|
)
|
|
|
|
base_ldflags = []
|
|
base_symbol_map = '-Wl,--version-script=@0@'.format(meson.current_source_dir() / 'base-symbol.map')
|
|
if cc.has_link_argument(base_symbol_map)
|
|
base_ldflags += base_symbol_map
|
|
endif
|
|
|
|
### gnome-desktop-base
|
|
libgnome_desktop_base_sources = [
|
|
'gnome-desktop-version.c',
|
|
'gnome-desktop-thumbnail.c',
|
|
'gnome-idle-monitor.c',
|
|
'gnome-languages.c',
|
|
'gnome-pnp-ids.c',
|
|
'gnome-systemd.c',
|
|
'gnome-wall-clock.c',
|
|
'gnome-xkb-info.c',
|
|
]
|
|
|
|
libgnome_desktop_base_private_sources = [
|
|
'gnome-datetime-source.c',
|
|
'gnome-desktop-thumbnail-script.c',
|
|
'gnome-gettext-portable.c',
|
|
]
|
|
|
|
libgnome_desktop_base_headers = [
|
|
@@ -95,60 +101,61 @@ libgnome_desktop_base_headers = [
|
|
'gnome-xkb-info.h',
|
|
]
|
|
|
|
if get_option('build_gtk4')
|
|
install_headers(libgnome_desktop_base_headers,
|
|
subdir: 'gnome-desktop-4.0/libgnome-desktop'
|
|
)
|
|
|
|
base_deps = [
|
|
gdk_pixbuf_dep,
|
|
glib_dep,
|
|
gio_dep,
|
|
gio_unix_dep,
|
|
libsystemd_dep,
|
|
schemas_dep,
|
|
xkb_config_dep,
|
|
xkbregistry_dep,
|
|
iso_codes_dep,
|
|
udev_dep,
|
|
seccomp_dep,
|
|
m_dep,
|
|
rt_dep,
|
|
]
|
|
|
|
libgnome_desktop_base = library('gnome-desktop-4',
|
|
sources: [
|
|
non_latin_input_sources,
|
|
libgnome_desktop_base_sources,
|
|
libgnome_desktop_base_private_sources,
|
|
dbus_idle_built_sources,
|
|
+ dbus_localed_built_sources,
|
|
],
|
|
dependencies: base_deps,
|
|
soversion: soversion,
|
|
version: libversion,
|
|
c_args: libargs,
|
|
link_args: base_ldflags,
|
|
install: true,
|
|
include_directories: [
|
|
include_directories('.'),
|
|
include_directories('..'),
|
|
],
|
|
)
|
|
|
|
if get_option('introspection')
|
|
libgnome_desktop_base_gir = gnome.generate_gir(libgnome_desktop_base,
|
|
sources: [libgnome_desktop_base_headers, libgnome_desktop_base_sources],
|
|
export_packages: 'gnome-desktop-4',
|
|
namespace: 'GnomeDesktop',
|
|
nsversion: '4.0',
|
|
includes: ['GObject-2.0', 'Gio-2.0', 'GDesktopEnums-3.0', 'GdkPixbuf-2.0'],
|
|
extra_args: ['-DGNOME_DESKTOP_USE_UNSTABLE_API', '--quiet', '--warn-all'],
|
|
identifier_prefix: 'Gnome',
|
|
symbol_prefix: 'gnome',
|
|
install: true,
|
|
)
|
|
endif
|
|
|
|
pkg.generate(
|
|
libgnome_desktop_base,
|
|
requires: ['gsettings-desktop-schemas'],
|
|
@@ -172,60 +179,61 @@ if get_option('build_gtk4')
|
|
)
|
|
|
|
subdir('gnome-bg')
|
|
subdir('gnome-rr')
|
|
endif
|
|
|
|
### Legacy ###
|
|
if get_option('legacy_library')
|
|
introspection_sources = [
|
|
'gnome-desktop-version.c',
|
|
'gnome-desktop-thumbnail.c',
|
|
'gnome-bg.c',
|
|
'gnome-bg-slide-show.c',
|
|
'gnome-bg-crossfade.c',
|
|
'gnome-rr.c',
|
|
'gnome-rr-config.c',
|
|
'gnome-rr-output-info.c',
|
|
'gnome-systemd.c',
|
|
'gnome-pnp-ids.c',
|
|
'gnome-wall-clock.c',
|
|
'gnome-xkb-info.c',
|
|
'gnome-idle-monitor.c',
|
|
'gnome-languages.c',
|
|
]
|
|
|
|
libgnome_desktop_sources = [
|
|
non_latin_input_sources,
|
|
introspection_sources,
|
|
dbus_xrandr_built_sources,
|
|
dbus_idle_built_sources,
|
|
+ dbus_localed_built_sources,
|
|
'gnome-datetime-source.c',
|
|
'gnome-desktop-thumbnail-script.c',
|
|
'gnome-gettext-portable.c',
|
|
]
|
|
|
|
libgnome_desktop_headers = [
|
|
gnome_desktop_header_file,
|
|
'gnome-bg.h',
|
|
'gnome-bg-crossfade.h',
|
|
'gnome-bg-slide-show.h',
|
|
'gnome-desktop-thumbnail.h',
|
|
'gnome-rr.h',
|
|
'gnome-rr-config.h',
|
|
'gnome-systemd.h',
|
|
'gnome-pnp-ids.h',
|
|
'gnome-wall-clock.h',
|
|
'gnome-xkb-info.h',
|
|
'gnome-idle-monitor.h',
|
|
'gnome-languages.h',
|
|
]
|
|
|
|
install_headers(libgnome_desktop_headers,
|
|
subdir: 'gnome-desktop-3.0/libgnome-desktop'
|
|
)
|
|
|
|
gnome_desktop_deps = [
|
|
gdk_pixbuf_dep,
|
|
gtk3_dep,
|
|
glib_dep,
|
|
gio_dep,
|
|
diff --git a/libgnome-desktop/org.freedesktop.locale1.xml b/libgnome-desktop/org.freedesktop.locale1.xml
|
|
new file mode 100644
|
|
index 00000000..bc23d3a1
|
|
--- /dev/null
|
|
+++ b/libgnome-desktop/org.freedesktop.locale1.xml
|
|
@@ -0,0 +1,38 @@
|
|
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
|
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
|
+<node>
|
|
+ <interface name="org.freedesktop.locale1">
|
|
+ <property name="Locale" type="as" access="read">
|
|
+ </property>
|
|
+ <property name="X11Layout" type="s" access="read">
|
|
+ </property>
|
|
+ <property name="X11Model" type="s" access="read">
|
|
+ </property>
|
|
+ <property name="X11Variant" type="s" access="read">
|
|
+ </property>
|
|
+ <property name="X11Options" type="s" access="read">
|
|
+ </property>
|
|
+ <property name="VConsoleKeymap" type="s" access="read">
|
|
+ </property>
|
|
+ <property name="VConsoleKeymapToggle" type="s" access="read">
|
|
+ </property>
|
|
+ <method name="SetLocale">
|
|
+ <arg type="as" direction="in"/>
|
|
+ <arg type="b" direction="in"/>
|
|
+ </method>
|
|
+ <method name="SetVConsoleKeyboard">
|
|
+ <arg type="s" direction="in"/>
|
|
+ <arg type="s" direction="in"/>
|
|
+ <arg type="b" direction="in"/>
|
|
+ <arg type="b" direction="in"/>
|
|
+ </method>
|
|
+ <method name="SetX11Keyboard">
|
|
+ <arg type="s" direction="in"/>
|
|
+ <arg type="s" direction="in"/>
|
|
+ <arg type="s" direction="in"/>
|
|
+ <arg type="s" direction="in"/>
|
|
+ <arg type="b" direction="in"/>
|
|
+ <arg type="b" direction="in"/>
|
|
+ </method>
|
|
+ </interface>
|
|
+</node>
|
|
--
|
|
2.41.0.rc2
|
|
|