diff options
| author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2025-09-01 12:25:36 +0200 |
|---|---|---|
| committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2025-09-01 12:25:36 +0200 |
| commit | f716e013b080929b9709540901060b0eda4dc4f2 (patch) | |
| tree | c2c34ab1de7beb7a956120085d7aad59c8f4b864 /src/keyboard-x11.c | |
| parent | 5059bcbe5e6000dd7b6700deb3b652a6b306d5f2 (diff) | |
| parent | 5134db80dc74456224e9fd0bc7fbe743580696ba (diff) | |
| download | ayatana-indicator-keyboard-f716e013b080929b9709540901060b0eda4dc4f2.tar.gz ayatana-indicator-keyboard-f716e013b080929b9709540901060b0eda4dc4f2.tar.bz2 ayatana-indicator-keyboard-f716e013b080929b9709540901060b0eda4dc4f2.zip | |
Merge branch 'sunweaver-pr/separate-sections-for-osk'
Attributes GH PR #81: https://github.com/AyatanaIndicators/ayatana-indicator-keyboard/pull/81
Diffstat (limited to 'src/keyboard-x11.c')
| -rw-r--r-- | src/keyboard-x11.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/keyboard-x11.c b/src/keyboard-x11.c index 27dfb97c..75dabd6d 100644 --- a/src/keyboard-x11.c +++ b/src/keyboard-x11.c @@ -42,6 +42,7 @@ struct _KeyboardPrivate GHashTable *lLayouts; Display *pDisplay; guint nLayout; + guint nLayoutOSK; gint nXkbEventType; XklConfigRec *pConfigRec; GSList *lLayoutRec; @@ -369,7 +370,7 @@ void keyboard_AddSource(Keyboard *pKeyboard) } } -guint keyboard_GetNumLayouts(Keyboard *pKeyboard) +guint keyboard_GetNumLayouts(Keyboard *pKeyboard, gboolean bOSK) { guint nLayouts = 0; @@ -385,12 +386,12 @@ guint keyboard_GetNumLayouts(Keyboard *pKeyboard) return nLayouts; } -guint keyboard_GetLayoutIndex (Keyboard *pKeyboard) +guint keyboard_GetLayoutIndex (Keyboard *pKeyboard, gboolean bOSK) { 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 +443,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 +573,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); |
