Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fefebf7f6e | |||
| 21c3a74019 | |||
| 47a483da2a | |||
| 0c179560b3 | |||
| 6e7c0e6f67 | |||
| 0e83697b61 | |||
| 66c3926eb2 | |||
| 1856e7023d | |||
| 976f0a6e37 | |||
| 4d24af4e1a | |||
| 422d06d582 | |||
| 4890c86b4e | |||
| 658df98e18 | |||
| 6f7252ec7c |
44
Cargo.lock
generated
44
Cargo.lock
generated
@ -59,9 +59,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.0.65"
|
version = "1.0.66"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "95752358c8f7552394baf48cd82695b345628ad3f170d607de3ca03b8dacca15"
|
checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
@ -76,9 +76,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dtoa"
|
name = "dtoa"
|
||||||
version = "0.4.6"
|
version = "0.4.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b"
|
checksum = "88d7ed2934d741c6b37e33e3832298e8850b53fd2d2bea03873375596c7cea4e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fragile"
|
name = "fragile"
|
||||||
@ -265,15 +265,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.80"
|
version = "0.2.82"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614"
|
checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linked-hash-map"
|
name = "linked-hash-map"
|
||||||
version = "0.5.3"
|
version = "0.5.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a"
|
checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "maplit"
|
name = "maplit"
|
||||||
@ -335,9 +335,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.7"
|
version = "1.0.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
|
checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
@ -353,9 +353,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex-syntax"
|
name = "regex-syntax"
|
||||||
version = "0.6.21"
|
version = "0.6.22"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189"
|
checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rs"
|
name = "rs"
|
||||||
@ -380,18 +380,18 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.117"
|
version = "1.0.118"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a"
|
checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.117"
|
version = "1.0.118"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e"
|
checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -400,9 +400,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_yaml"
|
name = "serde_yaml"
|
||||||
version = "0.8.14"
|
version = "0.8.15"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f7baae0a99f1a324984bcdc5f0718384c1f69775f1c7eec8b859b71b443e3fd7"
|
checksum = "971be8f6e4d4a47163b405a3df70d14359186f9ab0f3a3ec37df144ca1ce089f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dtoa",
|
"dtoa",
|
||||||
"linked-hash-map",
|
"linked-hash-map",
|
||||||
@ -412,9 +412,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "1.0.48"
|
version = "1.0.58"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac"
|
checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -476,9 +476,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "yaml-rust"
|
name = "yaml-rust"
|
||||||
version = "0.4.4"
|
version = "0.4.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "39f0c922f1a334134dc2f7a8b67dc5d25f0735263feec974345ff706bcf20b0d"
|
checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"linked-hash-map",
|
"linked-hash-map",
|
||||||
]
|
]
|
||||||
|
|||||||
78
data/keyboards/ir.yaml
Normal file
78
data/keyboards/ir.yaml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
---
|
||||||
|
outlines:
|
||||||
|
default: { width: 35.33, height: 52 }
|
||||||
|
altline: { width: 52.67, height: 52 }
|
||||||
|
wide: { width: 62, height: 52 }
|
||||||
|
spaceline: { width: 142, height: 52 }
|
||||||
|
special: { width: 44, height: 52 }
|
||||||
|
|
||||||
|
views:
|
||||||
|
base:
|
||||||
|
- "ض ص ق ف غ ع ه خ ح ج"
|
||||||
|
- "ش س ی ب ل ا ت ن م ک"
|
||||||
|
- "Shift_L ظ ط ز ر ذ د و BackSpace"
|
||||||
|
- "show_numbers preferences space period Return"
|
||||||
|
upper:
|
||||||
|
- "پ { } [ ] ّ َ ِ ُ چ"
|
||||||
|
- "ؤ ئ ي إ أ آ ة » « گ"
|
||||||
|
- "Shift_L ك ٓ ژ ء > < ؟ BackSpace"
|
||||||
|
- "show_numbers preferences space period Return"
|
||||||
|
numbers:
|
||||||
|
- "۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ ۰"
|
||||||
|
- "@ # ﷼ % & - _ + ( )"
|
||||||
|
- "show_symbols , \" ' colon ؛ ! ? BackSpace"
|
||||||
|
- "show_letters preferences space period Return"
|
||||||
|
symbols:
|
||||||
|
- "~ ` | · √ π τ ÷ × ¶"
|
||||||
|
- "© ® £ € ¥ ^ ° * { }"
|
||||||
|
- "show_numbers_from_symbols \\ / < > = [ ] BackSpace"
|
||||||
|
- "show_letters preferences space period Return"
|
||||||
|
|
||||||
|
buttons:
|
||||||
|
Shift_L:
|
||||||
|
action:
|
||||||
|
locking:
|
||||||
|
lock_view: "upper"
|
||||||
|
unlock_view: "base"
|
||||||
|
outline: "altline"
|
||||||
|
icon: "key-shift"
|
||||||
|
BackSpace:
|
||||||
|
outline: "altline"
|
||||||
|
icon: "edit-clear-symbolic"
|
||||||
|
action: erase
|
||||||
|
preferences:
|
||||||
|
action: show_prefs
|
||||||
|
outline: "special"
|
||||||
|
icon: "keyboard-mode-symbolic"
|
||||||
|
show_numbers:
|
||||||
|
action:
|
||||||
|
set_view: "numbers"
|
||||||
|
outline: "wide"
|
||||||
|
label: "123"
|
||||||
|
show_numbers_from_symbols:
|
||||||
|
action:
|
||||||
|
set_view: "numbers"
|
||||||
|
outline: "altline"
|
||||||
|
label: "123"
|
||||||
|
show_letters:
|
||||||
|
action:
|
||||||
|
set_view: "base"
|
||||||
|
outline: "wide"
|
||||||
|
label: "ABC"
|
||||||
|
show_symbols:
|
||||||
|
action:
|
||||||
|
set_view: "symbols"
|
||||||
|
outline: "altline"
|
||||||
|
label: "*/="
|
||||||
|
period:
|
||||||
|
outline: "special"
|
||||||
|
text: "."
|
||||||
|
space:
|
||||||
|
outline: "spaceline"
|
||||||
|
text: " "
|
||||||
|
Return:
|
||||||
|
outline: "wide"
|
||||||
|
icon: "key-enter"
|
||||||
|
keysym: "Return"
|
||||||
|
colon:
|
||||||
|
text: ":"
|
||||||
78
data/keyboards/ir_wide.yaml
Normal file
78
data/keyboards/ir_wide.yaml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
---
|
||||||
|
outlines:
|
||||||
|
default: { width: 54, height: 42 }
|
||||||
|
altline: { width: 81, height: 42 }
|
||||||
|
wide: { width: 108, height: 42 }
|
||||||
|
spaceline: { width: 216, height: 42 }
|
||||||
|
special: { width: 54, height: 42 }
|
||||||
|
|
||||||
|
views:
|
||||||
|
base:
|
||||||
|
- "ض ص ق ف غ ع ه خ ح ج"
|
||||||
|
- "ش س ی ب ل ا ت ن م ک"
|
||||||
|
- "Shift_L ظ ط ز ر ذ د و BackSpace"
|
||||||
|
- "show_numbers preferences space period Return"
|
||||||
|
upper:
|
||||||
|
- "پ { } [ ] ّ َ ِ ُ چ"
|
||||||
|
- "ؤ ئ ي إ أ آ ة » « گ"
|
||||||
|
- "Shift_L ك ٓ ژ ء > < ؟ BackSpace"
|
||||||
|
- "show_numbers preferences space period Return"
|
||||||
|
numbers:
|
||||||
|
- "۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ ۰"
|
||||||
|
- "@ # ﷼ % & - _ + ( )"
|
||||||
|
- "show_symbols , \" ' colon ؛ ! ? BackSpace"
|
||||||
|
- "show_letters preferences space period Return"
|
||||||
|
symbols:
|
||||||
|
- "~ ` | · √ π τ ÷ × ¶"
|
||||||
|
- "© ® £ € ¥ ^ ° * { }"
|
||||||
|
- "show_numbers_from_symbols \\ / < > = [ ] BackSpace"
|
||||||
|
- "show_letters preferences space period Return"
|
||||||
|
|
||||||
|
buttons:
|
||||||
|
Shift_L:
|
||||||
|
action:
|
||||||
|
locking:
|
||||||
|
lock_view: "upper"
|
||||||
|
unlock_view: "base"
|
||||||
|
outline: "altline"
|
||||||
|
icon: "key-shift"
|
||||||
|
BackSpace:
|
||||||
|
outline: "altline"
|
||||||
|
icon: "edit-clear-symbolic"
|
||||||
|
action: "erase"
|
||||||
|
preferences:
|
||||||
|
action: "show_prefs"
|
||||||
|
outline: "special"
|
||||||
|
icon: "keyboard-mode-symbolic"
|
||||||
|
show_numbers:
|
||||||
|
action:
|
||||||
|
set_view: "numbers"
|
||||||
|
outline: "wide"
|
||||||
|
label: "123"
|
||||||
|
show_numbers_from_symbols:
|
||||||
|
action:
|
||||||
|
set_view: "numbers"
|
||||||
|
outline: "altline"
|
||||||
|
label: "123"
|
||||||
|
show_letters:
|
||||||
|
action:
|
||||||
|
set_view: "base"
|
||||||
|
outline: "wide"
|
||||||
|
label: "ABC"
|
||||||
|
show_symbols:
|
||||||
|
action:
|
||||||
|
set_view: "symbols"
|
||||||
|
outline: "altline"
|
||||||
|
label: "*/="
|
||||||
|
".":
|
||||||
|
outline: "special"
|
||||||
|
text: "."
|
||||||
|
space:
|
||||||
|
outline: "spaceline"
|
||||||
|
text: " "
|
||||||
|
Return:
|
||||||
|
outline: "wide"
|
||||||
|
icon: "key-enter"
|
||||||
|
keysym: "Return"
|
||||||
|
colon:
|
||||||
|
text: ":"
|
||||||
2
data/langs/fa-IR.txt
Normal file
2
data/langs/fa-IR.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
emoji ایموجی
|
||||||
|
terminal ترمینال
|
||||||
60
debian/changelog
vendored
60
debian/changelog
vendored
@ -1,3 +1,63 @@
|
|||||||
|
squeekboard (1.12.0pureos0~amber0) amber-phone; urgency=medium
|
||||||
|
|
||||||
|
[ Dorota Czaplejewicz ]
|
||||||
|
* docs: Correct Cargo update instructions
|
||||||
|
* visibility: Centralize keyboard panel visibility policy and handling
|
||||||
|
* build: Fix release
|
||||||
|
* tests: Prefer the env var for finding test layouts
|
||||||
|
* tests: Explicitly pass source directory to tests
|
||||||
|
* debian: Build reproducibly
|
||||||
|
* tests: Allow legacy mode to have much longer tests.
|
||||||
|
* build: Enable unused warnings in C
|
||||||
|
* build: Enable wformat to remove warnings about missing wformat
|
||||||
|
* build: Fail on any C warnings when strict
|
||||||
|
* data: Made data flow in fallback clearer
|
||||||
|
* data: Flattened layout fallback function
|
||||||
|
* layouts: Use base as fallback for alternative layouts
|
||||||
|
* layouts: Simplify the main flow of source list
|
||||||
|
* tests: Add some description to the list of tested layouts
|
||||||
|
* layout_names: Unmess the list of builtin layouts
|
||||||
|
* dbus: Reset hints if text input missing
|
||||||
|
* visibility: Stop calling GTK functions from the visibility manager
|
||||||
|
|
||||||
|
[ Wannaphong Phatthiyaphaibun ]
|
||||||
|
* Add thai keyboard
|
||||||
|
* Update resources.rs
|
||||||
|
* Update meson.build
|
||||||
|
* escape " on thai keyboard
|
||||||
|
|
||||||
|
[ clonex10100 ]
|
||||||
|
* Added US Colemak Keyboard Layout
|
||||||
|
|
||||||
|
[ Henry-Nicolas Tourneur ]
|
||||||
|
* d/rules: fix an FTBFS on mips64el with GOT > 64kb
|
||||||
|
* d/rules: export RUSTFLAGS only on architecture that needs it
|
||||||
|
* d/rules: export RUSTFLAGS only on architecture that needs it
|
||||||
|
|
||||||
|
[ Jiří Stránský ]
|
||||||
|
* Add Czech keyboard layouts
|
||||||
|
|
||||||
|
[ Stefan Grotz ]
|
||||||
|
* Esperanto keyboard
|
||||||
|
|
||||||
|
[ Vladimir ]
|
||||||
|
* Bulgarian language keyboard layout
|
||||||
|
|
||||||
|
[ Vladimir Stoilov ]
|
||||||
|
* bulgarian add translation and to needed lists
|
||||||
|
* Fix bulgarian layout size
|
||||||
|
|
||||||
|
[ Andreas Rönnquist ]
|
||||||
|
* no: Use wide button switching between numbers, symbols and base
|
||||||
|
|
||||||
|
[ jranaraki ]
|
||||||
|
* Farsi/Persian keyboard layout
|
||||||
|
* Farsi/Persian keyboard layout
|
||||||
|
* Added requirements to resources.rs and meson.build
|
||||||
|
* Updated the layout to provide more convenient and faster typing experience
|
||||||
|
|
||||||
|
-- Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Sun, 10 Jan 2021 09:43:42 +0000
|
||||||
|
|
||||||
squeekboard (1.11.1) amber-phone; urgency=medium
|
squeekboard (1.11.1) amber-phone; urgency=medium
|
||||||
|
|
||||||
[ Mark Müller ]
|
[ Mark Müller ]
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
project(
|
project(
|
||||||
'squeekboard',
|
'squeekboard',
|
||||||
'c', 'rust',
|
'c', 'rust',
|
||||||
version: '1.10.0',
|
version: '1.12.0',
|
||||||
license: 'GPLv3',
|
license: 'GPLv3',
|
||||||
meson_version: '>=0.51.0',
|
meson_version: '>=0.51.0',
|
||||||
default_options: [
|
default_options: [
|
||||||
|
|||||||
@ -59,7 +59,7 @@ handle_set_visible(SmPuriOSK0 *object, GDBusMethodInvocation *invocation,
|
|||||||
|
|
||||||
if (service->context) {
|
if (service->context) {
|
||||||
if (arg_visible) {
|
if (arg_visible) {
|
||||||
server_context_service_show_keyboard (service->context);
|
server_context_service_force_show_keyboard (service->context);
|
||||||
} else {
|
} else {
|
||||||
server_context_service_hide_keyboard (service->context);
|
server_context_service_hide_keyboard (service->context);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,41 +10,70 @@ use std::iter::FromIterator;
|
|||||||
// TODO: keep a list of what is a language layout,
|
// TODO: keep a list of what is a language layout,
|
||||||
// and what a convenience layout. "_wide" is not a layout,
|
// and what a convenience layout. "_wide" is not a layout,
|
||||||
// neither is "number"
|
// neither is "number"
|
||||||
|
/// List of builtin layouts
|
||||||
const KEYBOARDS: &[(*const str, *const str)] = &[
|
const KEYBOARDS: &[(*const str, *const str)] = &[
|
||||||
// layouts: us must be left as first, as it is the,
|
// layouts: us must be left as first, as it is the,
|
||||||
// fallback layout. The others should be alphabetical.
|
// fallback layout.
|
||||||
("us", include_str!("../data/keyboards/us.yaml")),
|
("us", include_str!("../data/keyboards/us.yaml")),
|
||||||
("us+colemak", include_str!("../data/keyboards/us+colemak.yaml")),
|
|
||||||
("us_wide", include_str!("../data/keyboards/us_wide.yaml")),
|
("us_wide", include_str!("../data/keyboards/us_wide.yaml")),
|
||||||
("br", include_str!("../data/keyboards/br.yaml")),
|
|
||||||
("de", include_str!("../data/keyboards/de.yaml")),
|
// Language layouts: keep alphabetical.
|
||||||
("be", include_str!("../data/keyboards/be.yaml")),
|
("be", include_str!("../data/keyboards/be.yaml")),
|
||||||
("be_wide", include_str!("../data/keyboards/be_wide.yaml")),
|
("be_wide", include_str!("../data/keyboards/be_wide.yaml")),
|
||||||
|
|
||||||
|
("bg", include_str!("../data/keyboards/bg.yaml")),
|
||||||
|
|
||||||
|
("br", include_str!("../data/keyboards/br.yaml")),
|
||||||
|
|
||||||
|
("de", include_str!("../data/keyboards/de.yaml")),
|
||||||
("de_wide", include_str!("../data/keyboards/de_wide.yaml")),
|
("de_wide", include_str!("../data/keyboards/de_wide.yaml")),
|
||||||
|
|
||||||
("cz", include_str!("../data/keyboards/cz.yaml")),
|
("cz", include_str!("../data/keyboards/cz.yaml")),
|
||||||
("cz_wide", include_str!("../data/keyboards/cz_wide.yaml")),
|
("cz_wide", include_str!("../data/keyboards/cz_wide.yaml")),
|
||||||
|
|
||||||
("cz+qwerty", include_str!("../data/keyboards/cz+qwerty.yaml")),
|
("cz+qwerty", include_str!("../data/keyboards/cz+qwerty.yaml")),
|
||||||
("cz+qwerty_wide", include_str!("../data/keyboards/cz+qwerty_wide.yaml")),
|
("cz+qwerty_wide", include_str!("../data/keyboards/cz+qwerty_wide.yaml")),
|
||||||
|
|
||||||
("dk", include_str!("../data/keyboards/dk.yaml")),
|
("dk", include_str!("../data/keyboards/dk.yaml")),
|
||||||
|
|
||||||
("epo", include_str!("../data/keyboards/epo.yaml")),
|
("epo", include_str!("../data/keyboards/epo.yaml")),
|
||||||
|
|
||||||
("es", include_str!("../data/keyboards/es.yaml")),
|
("es", include_str!("../data/keyboards/es.yaml")),
|
||||||
|
|
||||||
("fi", include_str!("../data/keyboards/fi.yaml")),
|
("fi", include_str!("../data/keyboards/fi.yaml")),
|
||||||
|
|
||||||
("fr", include_str!("../data/keyboards/fr.yaml")),
|
("fr", include_str!("../data/keyboards/fr.yaml")),
|
||||||
("fr_wide", include_str!("../data/keyboards/fr_wide.yaml")),
|
("fr_wide", include_str!("../data/keyboards/fr_wide.yaml")),
|
||||||
("it+fur", include_str!("../data/keyboards/it+fur.yaml")),
|
|
||||||
("gr", include_str!("../data/keyboards/gr.yaml")),
|
("gr", include_str!("../data/keyboards/gr.yaml")),
|
||||||
|
|
||||||
|
("ir", include_str!("../data/keyboards/ir.yaml")),
|
||||||
|
("ir_wide", include_str!("../data/keyboards/ir_wide.yaml")),
|
||||||
|
|
||||||
("it", include_str!("../data/keyboards/it.yaml")),
|
("it", include_str!("../data/keyboards/it.yaml")),
|
||||||
|
("it+fur", include_str!("../data/keyboards/it+fur.yaml")),
|
||||||
|
|
||||||
("jp+kana", include_str!("../data/keyboards/jp+kana.yaml")),
|
("jp+kana", include_str!("../data/keyboards/jp+kana.yaml")),
|
||||||
("jp+kana_wide", include_str!("../data/keyboards/jp+kana_wide.yaml")),
|
("jp+kana_wide", include_str!("../data/keyboards/jp+kana_wide.yaml")),
|
||||||
|
|
||||||
("no", include_str!("../data/keyboards/no.yaml")),
|
("no", include_str!("../data/keyboards/no.yaml")),
|
||||||
("number", include_str!("../data/keyboards/number.yaml")),
|
|
||||||
("pl", include_str!("../data/keyboards/pl.yaml")),
|
("pl", include_str!("../data/keyboards/pl.yaml")),
|
||||||
("pl_wide", include_str!("../data/keyboards/pl_wide.yaml")),
|
("pl_wide", include_str!("../data/keyboards/pl_wide.yaml")),
|
||||||
|
|
||||||
("ru", include_str!("../data/keyboards/ru.yaml")),
|
("ru", include_str!("../data/keyboards/ru.yaml")),
|
||||||
|
|
||||||
("se", include_str!("../data/keyboards/se.yaml")),
|
("se", include_str!("../data/keyboards/se.yaml")),
|
||||||
|
|
||||||
("th", include_str!("../data/keyboards/th.yaml")),
|
("th", include_str!("../data/keyboards/th.yaml")),
|
||||||
|
|
||||||
("ua", include_str!("../data/keyboards/ua.yaml")),
|
("ua", include_str!("../data/keyboards/ua.yaml")),
|
||||||
("bg", include_str!("../data/keyboards/bg.yaml")),
|
|
||||||
|
("us+colemak", include_str!("../data/keyboards/us+colemak.yaml")),
|
||||||
|
|
||||||
|
// Others
|
||||||
|
("number", include_str!("../data/keyboards/number.yaml")),
|
||||||
|
|
||||||
// layout+overlay
|
// layout+overlay
|
||||||
("terminal", include_str!("../data/keyboards/terminal.yaml")),
|
("terminal", include_str!("../data/keyboards/terminal.yaml")),
|
||||||
("terminal_wide", include_str!("../data/keyboards/terminal_wide.yaml")),
|
("terminal_wide", include_str!("../data/keyboards/terminal_wide.yaml")),
|
||||||
|
|||||||
@ -239,6 +239,13 @@ server_context_service_real_show_keyboard (ServerContextService *self)
|
|||||||
gtk_widget_show (GTK_WIDGET(self->window));
|
gtk_widget_show (GTK_WIDGET(self->window));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
show_keyboard_source_func(ServerContextService *context)
|
||||||
|
{
|
||||||
|
server_context_service_real_show_keyboard(context);
|
||||||
|
return G_SOURCE_REMOVE;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
server_context_service_real_hide_keyboard (ServerContextService *self)
|
server_context_service_real_hide_keyboard (ServerContextService *self)
|
||||||
{
|
{
|
||||||
@ -246,6 +253,13 @@ server_context_service_real_hide_keyboard (ServerContextService *self)
|
|||||||
self->visible = FALSE;
|
self->visible = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
hide_keyboard_source_func(ServerContextService *context)
|
||||||
|
{
|
||||||
|
server_context_service_real_hide_keyboard(context);
|
||||||
|
return G_SOURCE_REMOVE;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
on_hide (ServerContextService *self)
|
on_hide (ServerContextService *self)
|
||||||
{
|
{
|
||||||
@ -255,7 +269,7 @@ on_hide (ServerContextService *self)
|
|||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
server_context_service_show_keyboard (ServerContextService *self)
|
server_context_service_show_keyboard (ServerContextService *self)
|
||||||
{
|
{
|
||||||
g_return_if_fail (SERVER_IS_CONTEXT_SERVICE(self));
|
g_return_if_fail (SERVER_IS_CONTEXT_SERVICE(self));
|
||||||
@ -266,17 +280,30 @@ server_context_service_show_keyboard (ServerContextService *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!self->visible) {
|
if (!self->visible) {
|
||||||
server_context_service_real_show_keyboard (self);
|
g_idle_add((GSourceFunc)show_keyboard_source_func, self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
server_context_service_force_show_keyboard (ServerContextService *self)
|
||||||
|
{
|
||||||
|
if (!submission_hint_available(self->submission)) {
|
||||||
|
eekboard_context_service_set_hint_purpose(
|
||||||
|
self->state,
|
||||||
|
ZWP_TEXT_INPUT_V3_CONTENT_HINT_NONE,
|
||||||
|
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NORMAL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
server_context_service_show_keyboard(self);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
server_context_service_hide_keyboard (ServerContextService *self)
|
server_context_service_hide_keyboard (ServerContextService *self)
|
||||||
{
|
{
|
||||||
g_return_if_fail (SERVER_IS_CONTEXT_SERVICE(self));
|
g_return_if_fail (SERVER_IS_CONTEXT_SERVICE(self));
|
||||||
|
|
||||||
if (self->visible) {
|
if (self->visible) {
|
||||||
server_context_service_real_hide_keyboard (self);
|
g_idle_add((GSourceFunc)hide_keyboard_source_func, self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ G_DECLARE_FINAL_TYPE (ServerContextService, server_context_service, SERVER, CONT
|
|||||||
|
|
||||||
ServerContextService *server_context_service_new(EekboardContextService *self, struct submission *submission, struct squeek_layout_state *layout, struct ui_manager *uiman, struct vis_manager *visman);
|
ServerContextService *server_context_service_new(EekboardContextService *self, struct submission *submission, struct squeek_layout_state *layout, struct ui_manager *uiman, struct vis_manager *visman);
|
||||||
enum squeek_arrangement_kind server_context_service_get_layout_type(ServerContextService *);
|
enum squeek_arrangement_kind server_context_service_get_layout_type(ServerContextService *);
|
||||||
void server_context_service_show_keyboard (ServerContextService *self);
|
void server_context_service_force_show_keyboard (ServerContextService *self);
|
||||||
void server_context_service_hide_keyboard (ServerContextService *self);
|
void server_context_service_hide_keyboard (ServerContextService *self);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* SERVER_CONTEXT_SERVICE_H */
|
#endif /* SERVER_CONTEXT_SERVICE_H */
|
||||||
|
|||||||
@ -17,6 +17,7 @@ struct submission* get_submission(struct zwp_input_method_manager_v2 *immanager,
|
|||||||
|
|
||||||
// Defined in Rust
|
// Defined in Rust
|
||||||
struct submission* submission_new(struct zwp_input_method_v2 *im, struct zwp_virtual_keyboard_v1 *vk, EekboardContextService *state, struct vis_manager *vis_manager);
|
struct submission* submission_new(struct zwp_input_method_v2 *im, struct zwp_virtual_keyboard_v1 *vk, EekboardContextService *state, struct vis_manager *vis_manager);
|
||||||
|
uint8_t submission_hint_available(struct submission *self);
|
||||||
void submission_set_ui(struct submission *self, ServerContextService *ui_context);
|
void submission_set_ui(struct submission *self, ServerContextService *ui_context);
|
||||||
void submission_use_layout(struct submission *self, struct squeek_layout *layout, uint32_t time);
|
void submission_use_layout(struct submission *self, struct squeek_layout *layout, uint32_t time);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -93,6 +93,18 @@ pub mod c {
|
|||||||
let layout = unsafe { &*layout };
|
let layout = unsafe { &*layout };
|
||||||
submission.use_layout(layout, Timestamp(time));
|
submission.use_layout(layout, Timestamp(time));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[no_mangle]
|
||||||
|
pub extern "C"
|
||||||
|
fn submission_hint_available(submission: *mut Submission) -> u8 {
|
||||||
|
if submission.is_null() {
|
||||||
|
panic!("Null submission pointer");
|
||||||
|
}
|
||||||
|
let submission: &mut Submission = unsafe { &mut *submission };
|
||||||
|
let active = submission.imservice.as_ref()
|
||||||
|
.map(|imservice| imservice.is_active());
|
||||||
|
(Some(true) == active) as u8
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
|
|||||||
@ -46,12 +46,21 @@ endforeach
|
|||||||
|
|
||||||
# The layout test is in the examples directory
|
# The layout test is in the examples directory
|
||||||
# due to the way Cargo builds executables
|
# due to the way Cargo builds executables
|
||||||
# and the need to call it manually
|
# and the need to call it manually.
|
||||||
|
|
||||||
|
# This is the list of tested builtin layouts.
|
||||||
|
# Please keep each block alphabetical!
|
||||||
|
# Please keep shapes (with _) on the same line,
|
||||||
|
# variants (with +) on separate lines.
|
||||||
foreach layout : [
|
foreach layout : [
|
||||||
'us', 'us+colemak', 'us_wide',
|
# This is the fallback layout,
|
||||||
'br',
|
# so stays first to make sure it never goes missing.
|
||||||
|
'us', 'us_wide',
|
||||||
|
|
||||||
|
# Block: Languages
|
||||||
'be', 'be_wide',
|
'be', 'be_wide',
|
||||||
'bg',
|
'bg',
|
||||||
|
'br',
|
||||||
'cz', 'cz_wide',
|
'cz', 'cz_wide',
|
||||||
'cz+qwerty', 'cz+qwerty_wide',
|
'cz+qwerty', 'cz+qwerty_wide',
|
||||||
'de', 'de_wide',
|
'de', 'de_wide',
|
||||||
@ -60,20 +69,23 @@ foreach layout : [
|
|||||||
'es',
|
'es',
|
||||||
'fi',
|
'fi',
|
||||||
'fr', 'fr_wide',
|
'fr', 'fr_wide',
|
||||||
'it+fur',
|
|
||||||
'gr',
|
'gr',
|
||||||
|
'ir',
|
||||||
'it',
|
'it',
|
||||||
|
'it+fur',
|
||||||
'jp+kana','jp+kana_wide',
|
'jp+kana','jp+kana_wide',
|
||||||
'no',
|
'no',
|
||||||
'number',
|
|
||||||
'pl', 'pl_wide',
|
'pl', 'pl_wide',
|
||||||
'ru',
|
'ru',
|
||||||
'se',
|
'se',
|
||||||
'ua',
|
|
||||||
'th',
|
'th',
|
||||||
'terminal', 'terminal_wide',
|
'ua',
|
||||||
|
'us+colemak',
|
||||||
|
|
||||||
|
# Block: Not languages.
|
||||||
'emoji',
|
'emoji',
|
||||||
|
'number',
|
||||||
|
'terminal', 'terminal_wide',
|
||||||
]
|
]
|
||||||
extra = []
|
extra = []
|
||||||
if layout == 'emoji'
|
if layout == 'emoji'
|
||||||
|
|||||||
Reference in New Issue
Block a user