aboutsummaryrefslogtreecommitdiff
path: root/src/keyboard-x11.c
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2025-06-17 16:08:25 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2025-09-01 12:24:46 +0200
commit9c26d5983e94e7d70a77359c0b8ceeeb926085b1 (patch)
treef9d0174257578b2499c085dcf112ed9ce5744351 /src/keyboard-x11.c
parent3f5664fdd9d6c68c15d7be45b7083720815795e8 (diff)
downloadayatana-indicator-keyboard-9c26d5983e94e7d70a77359c0b8ceeeb926085b1.tar.gz
ayatana-indicator-keyboard-9c26d5983e94e7d70a77359c0b8ceeeb926085b1.tar.bz2
ayatana-indicator-keyboard-9c26d5983e94e7d70a77359c0b8ceeeb926085b1.zip
Separate layout and settings for hardware and on-screen keyboards
Refurbished by Mike Gabriel, avoiding white-space changes, variable renamings and internal code block moves. Fixes: https://salsa.debian.org/ubports-team/lomiri-system-settings/-/issues/20
Diffstat (limited to 'src/keyboard-x11.c')
-rw-r--r--src/keyboard-x11.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/keyboard-x11.c b/src/keyboard-x11.c
index 27dfb97c..89e78517 100644
--- a/src/keyboard-x11.c
+++ b/src/keyboard-x11.c
@@ -369,7 +369,7 @@ void keyboard_AddSource(Keyboard *pKeyboard)
}
}
-guint keyboard_GetNumLayouts(Keyboard *pKeyboard)
+guint keyboard_GetNumLayouts(Keyboard *pKeyboard, gboolean bOSK)
{
guint nLayouts = 0;
@@ -390,7 +390,7 @@ guint keyboard_GetLayoutIndex (Keyboard *pKeyboard)
return pKeyboard->pPrivate->nLayout;
}
-void keyboard_GetLayout(Keyboard *pKeyboard, gint nLayout, gchar **pLanguage, gchar **pDescription, gchar **pId)
+void keyboard_GetLayout(Keyboard *pKeyboard, gboolean bOSK, gint nLayout, gchar **pLanguage, gchar **pDescription, gchar **pId)
{
if (nLayout == -1)
{
@@ -442,7 +442,7 @@ void keyboard_GetLayout(Keyboard *pKeyboard, gint nLayout, gchar **pLanguage, gc
}
}
-void keyboard_SetLayout(Keyboard *pKeyboard, gint nLayout)
+void keyboard_SetLayout(Keyboard *pKeyboard, gint nLayout, gboolean bOSK)
{
if (isGreeter() == FALSE)
{
@@ -572,6 +572,16 @@ static void onUserChanged (GDBusConnection *pConnection, const gchar *sSender, c
}
}
+gboolean keyboard_hasHardwareKeyboard (Keyboard *self)
+{
+ return TRUE;
+}
+
+gboolean keyboard_hasSoftwareKeyboard (Keyboard *self)
+{
+ return FALSE;
+}
+
static void keyboard_init(Keyboard *self)
{
self->pPrivate = keyboard_get_instance_private(self);