Compare commits
167 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a4e58aef6a | |||
| fd3ade8ac4 | |||
| decf547e41 | |||
| 870c023414 | |||
| 0d3b569553 | |||
| c7344aeb47 | |||
| 51f8217646 | |||
| a3f6349376 | |||
| bf18f05f74 | |||
| 9f4c5e2264 | |||
| dffec166fd | |||
| 3207977d7a | |||
| 0339a4a50f | |||
| 4ae78b89c6 | |||
| 0c99067b4b | |||
| ec7116053f | |||
| cc7657e78c | |||
| 70bf101812 | |||
| 12572b9de2 | |||
| 9528339e02 | |||
| 50ef4ab433 | |||
| a8fe4a492e | |||
| 0aee348e30 | |||
| 7f9baa8021 | |||
| feefe3fec2 | |||
| 94aa0fa68f | |||
| c86161d5b5 | |||
| 49fc28f0a9 | |||
| ea73a34eb8 | |||
| f8ce24fdbf | |||
| d797ee223b | |||
| 267b0745a2 | |||
| c1ceec3673 | |||
| 30141db28d | |||
| 8d0e1b4548 | |||
| e6326b9b38 | |||
| b634e2bfa4 | |||
| 590cd71f49 | |||
| 8ff72f312a | |||
| bb22d9650b | |||
| 82774d2315 | |||
| 9d83910696 | |||
| c75723b705 | |||
| af716f72da | |||
| 67e9316fe5 | |||
| b54922b021 | |||
| c0f57e7355 | |||
| a413146888 | |||
| ccc90e1677 | |||
| cb338129ca | |||
| 9e8a243439 | |||
| d3e0ee8c0d | |||
| 2e2c8ab2cb | |||
| 36474d3e9d | |||
| 111c0d157f | |||
| e6438503a5 | |||
| 58c7fe98b8 | |||
| 6867f48bf9 | |||
| 71942f7221 | |||
| c486ad1eb3 | |||
| 05e7cde8fa | |||
| 9adb593e8e | |||
| 073326f31b | |||
| dae324f86d | |||
| 2eec3372f3 | |||
| f6724c0948 | |||
| af8b688d94 | |||
| d21dba6a8f | |||
| 0e2d459d5a | |||
| 89ad302255 | |||
| 494f9442c4 | |||
| 68087a125c | |||
| 323fd7ea14 | |||
| 3167cfce9c | |||
| 8ea6f6d5c1 | |||
| 3b70116a15 | |||
| 397f5e126e | |||
| 14d7d5d4e0 | |||
| 6528879fed | |||
| 57aeeaa882 | |||
| bbceba7e9b | |||
| 5a210712f6 | |||
| bb8bba163e | |||
| 83b0d1553f | |||
| a1664630ed | |||
| 529ac89150 | |||
| 479f1befc9 | |||
| 29b30fbe22 | |||
| 1ccc663c48 | |||
| 7c43528ebf | |||
| 7f4c823c1e | |||
| d19050e06d | |||
| b5142ac765 | |||
| b456889fe9 | |||
| 3fdbcf905b | |||
| 8a2de2fdf2 | |||
| bd390894c5 | |||
| 04018a8c06 | |||
| b4cd5659cb | |||
| 59c3da0344 | |||
| c5eb41292c | |||
| c912b73c4b | |||
| 7b8ba7ab82 | |||
| dd2871b6bb | |||
| 216deecd33 | |||
| 22cc85b2e2 | |||
| 0b9350d19b | |||
| aad71116c5 | |||
| 16d6871422 | |||
| 78ff02e255 | |||
| a3f91701d0 | |||
| 697be64418 | |||
| a4b67c65ff | |||
| f040e708a4 | |||
| e6c19a1e6a | |||
| 98ecce518b | |||
| 500375dcf2 | |||
| 4e04bc306f | |||
| dfcb3ce020 | |||
| 5cf007f419 | |||
| 417fe35e91 | |||
| 3f598086b7 | |||
| dfe2c60646 | |||
| 8ec79428a9 | |||
| 3b0b8bea0d | |||
| ba00ec86a1 | |||
| f15f97d4c9 | |||
| d3eb68ed5a | |||
| 14a485deba | |||
| 236f7d4daf | |||
| f4f44a49ae | |||
| 1b72cbdfaa | |||
| ff3f7228b5 | |||
| b6ce4151bd | |||
| d49ce45de0 | |||
| a341fca43a | |||
| db6109b298 | |||
| 145d12d01a | |||
| 506df8cf15 | |||
| 21ecbb3ef3 | |||
| 29da31af20 | |||
| 23b35733cb | |||
| 55cd225c74 | |||
| e55ae67da6 | |||
| 79bc670ad0 | |||
| ebc2dd39f6 | |||
| 71768e27c0 | |||
| aaac755869 | |||
| 0430ba9213 | |||
| 0c17924c50 | |||
| 5286ff50a5 | |||
| 3ee2185714 | |||
| 7ea30819aa | |||
| 3647581cd7 | |||
| d76b385316 | |||
| 3240006516 | |||
| 2d0aa7aef1 | |||
| 4dd4c8c319 | |||
| 324438acac | |||
| a643b05f57 | |||
| 7adf325831 | |||
| b85903cb21 | |||
| 67d2f8d8e6 | |||
| 6979b6d08d | |||
| 44b9c8f869 | |||
| 6dae43b437 | |||
| 8eb1c9b4a7 |
@ -1,15 +1,13 @@
|
||||
image: debian:bullseye
|
||||
image: pureos/byzantium
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
|
||||
before_script:
|
||||
- apt-get -y update
|
||||
- apt-get -y install wget ca-certificates gnupg
|
||||
- echo "deb [trusted=yes] http://ci.puri.sm/ bullseyeci main" > /etc/apt/sources.list.d/ci.list
|
||||
- wget -O- https://ci.puri.sm/ci-repo.key | apt-key add -
|
||||
- apt-get -y update
|
||||
- apt-get -y install ca-certificates
|
||||
|
||||
build_docs:
|
||||
stage: build
|
||||
@ -25,12 +23,14 @@ build_docs:
|
||||
- $PKG_ONLY == "1"
|
||||
|
||||
build_meson:
|
||||
image: debian:bookworm
|
||||
stage: build
|
||||
artifacts:
|
||||
paths:
|
||||
- _build
|
||||
expire_in: 3h
|
||||
script:
|
||||
- mv debian/control-newer debian/control
|
||||
- apt-get -y build-dep .
|
||||
- meson . _build/ -Ddepdatadir=/usr/share --werror
|
||||
- ninja -C _build install
|
||||
@ -56,6 +56,7 @@ build_deb:
|
||||
- cp ../*.deb .
|
||||
|
||||
build_deb:arm64:
|
||||
image: pureos/byzantium
|
||||
tags:
|
||||
- aarch64
|
||||
stage: build
|
||||
@ -74,6 +75,45 @@ build_deb:arm64:
|
||||
- debuild -i -us -uc -b
|
||||
- cp ../*.deb .
|
||||
|
||||
build_deb:future:
|
||||
image: debian:sid
|
||||
allow_failure: true
|
||||
tags:
|
||||
- aarch64
|
||||
stage: build
|
||||
artifacts:
|
||||
paths:
|
||||
- '*.deb'
|
||||
script:
|
||||
- rm -f ../*.deb
|
||||
- mv debian/control-newer debian/control
|
||||
- apt-get -y build-dep .
|
||||
- apt-get -y install devscripts
|
||||
- REV=$(git log -1 --format=%h)
|
||||
- VER=$(dpkg-parsechangelog -SVersion)
|
||||
- DEBFULLNAME="Librem5 CI"
|
||||
- EMAIL="librem5-builds@lists.community.puri.sm"
|
||||
- dch -v"$VER+librem5ci$CI_PIPELINE_ID.$REV" "$MSG"
|
||||
- debuild -i -us -uc -b
|
||||
- cp ../*.deb .
|
||||
|
||||
build_reference:
|
||||
image: debian:bookworm
|
||||
stage: build
|
||||
needs:
|
||||
- job: build_meson
|
||||
artifacts: true
|
||||
artifacts:
|
||||
paths:
|
||||
- _build/doc
|
||||
script:
|
||||
- apt-get -y install cargo
|
||||
- cd _build
|
||||
- ../cargo.sh doc --no-deps --document-private-items
|
||||
except:
|
||||
variables:
|
||||
- $PKG_ONLY == "1"
|
||||
|
||||
test_lintian:
|
||||
stage: test
|
||||
needs:
|
||||
@ -87,11 +127,13 @@ test_lintian:
|
||||
- $PKG_ONLY == "1"
|
||||
|
||||
test:
|
||||
image: debian:bookworm
|
||||
stage: test
|
||||
needs:
|
||||
- job: build_meson
|
||||
artifacts: true
|
||||
script:
|
||||
- mv debian/control-newer debian/control
|
||||
- apt-get -y build-dep .
|
||||
- apt-get -y install clang-tidy
|
||||
- ninja -C _build test
|
||||
@ -122,3 +164,17 @@ check_release:
|
||||
except:
|
||||
variables:
|
||||
- $PKG_ONLY == "1"
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
needs:
|
||||
- build_docs
|
||||
- build_reference
|
||||
script:
|
||||
- mv _build/ public/
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
|
||||
16
Cargo.deps
16
Cargo.deps
@ -1,11 +1,17 @@
|
||||
# Dependencies which change based on build flags
|
||||
bitflags = "1.2.*"
|
||||
clap = { version = "2.33.*", default-features = false }
|
||||
regex = { version = "1.3.*", default-features = false, features = ["std", "unicode-case"] }
|
||||
zbus = "1.0.*"
|
||||
zvariant = "2.0.*"
|
||||
# Newer versions seem to confuse the version of Cargo on Debian Bullseye
|
||||
zvariant_derive = "2.0.*"
|
||||
|
||||
[dependencies.cairo-rs]
|
||||
version = "0.7.*"
|
||||
|
||||
[dependencies.cairo-sys-rs]
|
||||
version = "0.9"
|
||||
|
||||
[dependencies.gdk]
|
||||
version = "0.11.*"
|
||||
|
||||
@ -17,6 +23,14 @@ features = ["v2_44"]
|
||||
version = "0.8.*"
|
||||
features = ["v2_44"]
|
||||
|
||||
[dependencies.glib-sys]
|
||||
version = "*"
|
||||
features = ["v2_44"]
|
||||
|
||||
[dependencies.gtk]
|
||||
version = "0.7.*"
|
||||
features = ["v3_22"]
|
||||
|
||||
[dependencies.gtk-sys]
|
||||
version = "0.9"
|
||||
features = ["v3_22"]
|
||||
@ -1,22 +0,0 @@
|
||||
# Dependencies which change based on build flags
|
||||
bitflags = "1.0.*"
|
||||
clap = { version = "2.32.*", default-features = false }
|
||||
regex = { version = "1.1.*", default-features = false, features = ['use_std'] }
|
||||
|
||||
[dependencies.cairo-rs]
|
||||
version = "0.5.*"
|
||||
|
||||
[dependencies.gdk]
|
||||
version = "0.9.*"
|
||||
|
||||
[dependencies.gio]
|
||||
version = "0.5.*"
|
||||
features = ["v2_44"]
|
||||
|
||||
[dependencies.glib]
|
||||
version = "0.6.*"
|
||||
features = ["v2_44"]
|
||||
|
||||
[dependencies.gtk]
|
||||
version = "0.5.*"
|
||||
features = ["v3_22"]
|
||||
37
Cargo.deps.newer
Normal file
37
Cargo.deps.newer
Normal file
@ -0,0 +1,37 @@
|
||||
# Dependencies which change based on build flags
|
||||
# For the newer-than-Byzantium config
|
||||
bitflags = "1.3.*"
|
||||
clap = { version = "3.1.*", features=["std"], default-features = false }
|
||||
zbus = "1.9.*"
|
||||
zvariant = "2.10.*"
|
||||
# Newer versions seem to confuse the version of Cargo on Debian Bullseye
|
||||
zvariant_derive = "2.10.*"
|
||||
|
||||
[dependencies.cairo-rs]
|
||||
version = "0.14.*"
|
||||
|
||||
[dependencies.cairo-sys-rs]
|
||||
version = "0.14.*"
|
||||
|
||||
[dependencies.gdk]
|
||||
version = "0.14.*"
|
||||
|
||||
[dependencies.gio]
|
||||
version = "0.14.*"
|
||||
features = ["v2_58"]
|
||||
|
||||
[dependencies.glib]
|
||||
version = "0.14.*"
|
||||
features = ["v2_58"]
|
||||
|
||||
[dependencies.glib-sys]
|
||||
version = "0.14.*"
|
||||
features = ["v2_58"]
|
||||
|
||||
[dependencies.gtk]
|
||||
version = "0.14.*"
|
||||
features = ["v3_22"]
|
||||
|
||||
[dependencies.gtk-sys]
|
||||
version = "0.14.*"
|
||||
features = ["v3_22"]
|
||||
4
Cargo.deps.online
Normal file
4
Cargo.deps.online
Normal file
@ -0,0 +1,4 @@
|
||||
# Dependencies which are only used with online, crates.io builds.
|
||||
[patch.crates-io]
|
||||
# Dependency was yanked, but gio 0.7 needs it.
|
||||
fragile = { git = "https://source.puri.sm/dorota.czaplejewicz/fragile.git", tag = "0.3.0" }
|
||||
270
Cargo.lock
generated
270
Cargo.lock
generated
@ -30,9 +30,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.0.1"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
|
||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
@ -40,6 +40,12 @@ version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
|
||||
|
||||
[[package]]
|
||||
name = "cairo-rs"
|
||||
version = "0.7.1"
|
||||
@ -67,15 +73,27 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.72"
|
||||
version = "1.0.73"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee"
|
||||
checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "2.33.3"
|
||||
version = "2.33.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
|
||||
checksum = "826bf7bc84f9435630275cb8e802a4a0ec792b615969934bd16d42ffed10f207"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"textwrap",
|
||||
@ -83,16 +101,50 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dtoa"
|
||||
version = "0.4.8"
|
||||
name = "derivative"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0"
|
||||
checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "enumflags2"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "83c8d82922337cd23a15f88b70d8e4ef5f11da38dd7cdb55e84dd5de99695da0"
|
||||
dependencies = [
|
||||
"enumflags2_derive",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "enumflags2_derive"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "1.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf"
|
||||
dependencies = [
|
||||
"instant",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fragile"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05f8140122fa0d5dcb9fc8627cfce2b37cc1500f752636d46ea28bc26785c2f9"
|
||||
source = "git+https://source.puri.sm/dorota.czaplejewicz/fragile.git?tag=0.3.0#51048ca11824279c2114c77fef5bcb950838fc09"
|
||||
|
||||
[[package]]
|
||||
name = "gdk"
|
||||
@ -273,14 +325,23 @@ checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "1.7.0"
|
||||
version = "1.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5"
|
||||
checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"hashbrown",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "instant"
|
||||
version = "0.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
@ -289,15 +350,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.108"
|
||||
version = "0.2.126"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8521a1b57e76b1ec69af7599e75e38e7b7fad6610f037db8c79b127201b5d119"
|
||||
checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
|
||||
|
||||
[[package]]
|
||||
name = "linked-hash-map"
|
||||
version = "0.5.4"
|
||||
version = "0.5.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
|
||||
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
|
||||
|
||||
[[package]]
|
||||
name = "maplit"
|
||||
@ -315,6 +376,19 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cc",
|
||||
"cfg-if 0.1.10",
|
||||
"libc",
|
||||
"void",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pango"
|
||||
version = "0.7.0"
|
||||
@ -344,43 +418,37 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pkg-config"
|
||||
version = "0.3.22"
|
||||
version = "0.3.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f"
|
||||
checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-crate"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785"
|
||||
dependencies = [
|
||||
"toml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.32"
|
||||
version = "1.0.40"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43"
|
||||
checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.10"
|
||||
version = "1.0.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
|
||||
checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6"
|
||||
dependencies = [
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
|
||||
|
||||
[[package]]
|
||||
name = "rs"
|
||||
version = "0.1.0"
|
||||
@ -395,27 +463,53 @@ dependencies = [
|
||||
"glib-sys",
|
||||
"gtk",
|
||||
"gtk-sys",
|
||||
"indexmap",
|
||||
"maplit",
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_yaml",
|
||||
"xkbcommon",
|
||||
"zbus",
|
||||
"zvariant",
|
||||
"zvariant_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.130"
|
||||
name = "ryu"
|
||||
version = "1.0.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913"
|
||||
checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695"
|
||||
|
||||
[[package]]
|
||||
name = "scoped-tls"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.137"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.130"
|
||||
version = "1.0.137"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b"
|
||||
checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_repr"
|
||||
version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2ad84e47328a31223de7fed7a4f5087f2d6ddfe586cf3ca25b7a165bc0a5aed"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -424,25 +518,25 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_yaml"
|
||||
version = "0.8.21"
|
||||
version = "0.8.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d8c608a35705a5d3cdc9fbe403147647ff34b921f8e833e49306df898f9b20af"
|
||||
checksum = "707d15895415db6628332b737c838b88c598522e4dc70647e59b72312924aebc"
|
||||
dependencies = [
|
||||
"dtoa",
|
||||
"indexmap",
|
||||
"ryu",
|
||||
"serde",
|
||||
"yaml-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.82"
|
||||
version = "1.0.98"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59"
|
||||
checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-xid",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -454,6 +548,21 @@ dependencies = [
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.5.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.9"
|
||||
@ -461,10 +570,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.2"
|
||||
name = "void"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
|
||||
checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
@ -506,3 +615,56 @@ checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
|
||||
dependencies = [
|
||||
"linked-hash-map",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zbus"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1cb97c72cbfd5c7537ca730eeb810da7348f345ba67ab7673bcbe0d81c076427"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"derivative",
|
||||
"enumflags2",
|
||||
"fastrand",
|
||||
"nix",
|
||||
"scoped-tls",
|
||||
"serde",
|
||||
"serde_repr",
|
||||
"zbus_macros",
|
||||
"zvariant",
|
||||
"zvariant_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zbus_macros"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c0c1f2a20a4cb90922b44d3bebd232b246e52b3dd95ed5bea8aec83cde3a5a8a"
|
||||
dependencies = [
|
||||
"proc-macro-crate",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zvariant"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0bf85e67d1a3780cb1c56c80227532354f21907cba14805a773eb507b444580"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"enumflags2",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zvariant_derive"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d68726e8c12757384a8d1485080527e263dea67d91f19e97cd71b9292f22d7c5"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
1142
Cargo.lock.newer
Normal file
1142
Cargo.lock.newer
Normal file
File diff suppressed because it is too large
Load Diff
@ -17,22 +17,9 @@ name = "test_layout"
|
||||
path = "@path@/examples/test_layout.rs"
|
||||
|
||||
[features]
|
||||
gio_v0_5 = []
|
||||
gtk_v0_5 = []
|
||||
rustc_less_1_36 = []
|
||||
glib_v0_14 = []
|
||||
|
||||
# Dependencies which don't change based on build flags
|
||||
[dependencies.cairo-sys-rs]
|
||||
version = "*"
|
||||
|
||||
[dependencies.glib-sys]
|
||||
version = "*"
|
||||
features = ["v2_44"]
|
||||
|
||||
[dependencies.gtk-sys]
|
||||
version = "*"
|
||||
features = ["v3_22"]
|
||||
|
||||
[dependencies]
|
||||
maplit = "1.0.*"
|
||||
serde = { version = "1.0.*", features = ["derive"] }
|
||||
|
||||
@ -86,4 +86,4 @@ It's strongly recommended to support:
|
||||
Developing
|
||||
----------
|
||||
|
||||
See [`doc/hacking.md`](doc/hacking.md) for this copy, or the [official documentation](https://developer.puri.sm/projects/squeekboard/) for the current release.
|
||||
See [`doc/hacking.md`](doc/hacking.md) for this copy, or the [official documentation](https://world.pages.gitlab.gnome.org/Phosh/squeekboard) for the current release.
|
||||
|
||||
@ -1,6 +1,33 @@
|
||||
/* Theme independent style */
|
||||
/* Theme independent styles */
|
||||
|
||||
sq_view {
|
||||
font-family: cantarell, sans-serif;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
sq_button {
|
||||
border-radius: 4px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
sq_view.wide sq_button {
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
sq_button.latched,
|
||||
sq_button.locked {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
sq_button.action {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
sq_button.small {
|
||||
font-size: 0.5em;
|
||||
}
|
||||
|
||||
sq_view.pin sq_button {
|
||||
border-radius: 0px;
|
||||
margin: 1px 1px 1px 1px;
|
||||
}
|
||||
}
|
||||
206
data/keyboards/fr+bepo.yaml
Normal file
206
data/keyboards/fr+bepo.yaml
Normal file
@ -0,0 +1,206 @@
|
||||
---
|
||||
outlines:
|
||||
small: { width: 50, height: 30 }
|
||||
default: { width: 35.33, height: 52 }
|
||||
altline: { width: 35.33, height: 52 }
|
||||
wide: { width: 50, height: 52 }
|
||||
spaceline: { width: 150, height: 52 }
|
||||
special: { width: 35.33, height: 52 }
|
||||
|
||||
views:
|
||||
base:
|
||||
- "b é p o w v d l j z"
|
||||
- "a u i e c t s r n m"
|
||||
- "Shift_L y x k q g h f period BackSpace"
|
||||
- "show_numbers preferences space show_eschars Return"
|
||||
upper:
|
||||
- "B É P O W V D L J Z"
|
||||
- "A U I E C T S R N M"
|
||||
- "Shift_L Y X K Q G H F - BackSpace"
|
||||
- "show_numbers preferences space colon show_eschars Return"
|
||||
numbers:
|
||||
- "1 2 3 4 5 6 7 8 9 0"
|
||||
- "@ # € % & - _ + ( )"
|
||||
- "show_symbols , \" ' colon ; ! ? BackSpace"
|
||||
- "show_letters preferences space show_eschars Return"
|
||||
symbols:
|
||||
- "~ ` | · √ π τ ÷ × ¶"
|
||||
- "© ® £ $ ¥ ^ ° * { }"
|
||||
- "show_numbers_from_symbols \\ / < > = [ ] BackSpace"
|
||||
- "show_letters preferences space show_eschars Return"
|
||||
eschars:
|
||||
- "à â ç é è ê î ô ù û"
|
||||
- "À Â Ç É È Ê Î Ô Ù Û"
|
||||
- "show_numbers_from_symbols æ œ ä ë ï ö ü BackSpace"
|
||||
- "show_letters preferences space show_eschars Return"
|
||||
|
||||
buttons:
|
||||
F1:
|
||||
outline: "action"
|
||||
keysym: "F1"
|
||||
F2:
|
||||
outline: "action"
|
||||
keysym: "F2"
|
||||
F3:
|
||||
outline: "action"
|
||||
keysym: "F3"
|
||||
F4:
|
||||
outline: "action"
|
||||
keysym: "F4"
|
||||
F5:
|
||||
outline: "action"
|
||||
keysym: "F5"
|
||||
F6:
|
||||
outline: "action"
|
||||
keysym: "F6"
|
||||
F7:
|
||||
outline: "action"
|
||||
keysym: "F7"
|
||||
F8:
|
||||
outline: "action"
|
||||
keysym: "F8"
|
||||
F9:
|
||||
outline: "action"
|
||||
keysym: "F9"
|
||||
F10:
|
||||
outline: "action"
|
||||
keysym: "F10"
|
||||
F11:
|
||||
outline: "action"
|
||||
keysym: "F11"
|
||||
F12:
|
||||
outline: "action"
|
||||
keysym: "F12"
|
||||
Esc:
|
||||
outline: "action"
|
||||
keysym: "Escape"
|
||||
Tab:
|
||||
outline: "action"
|
||||
keysym: "Tab"
|
||||
Del:
|
||||
outline: "action"
|
||||
keysym: "Delete"
|
||||
Insert:
|
||||
outline: "action"
|
||||
keysym: "Insert"
|
||||
Menu:
|
||||
outline: "action"
|
||||
keysym: "Menu"
|
||||
Pause:
|
||||
outline: "action"
|
||||
keysym: "Pause"
|
||||
Break:
|
||||
outline: "action"
|
||||
keysym: "Break"
|
||||
Home:
|
||||
outline: "small"
|
||||
keysym: "Home"
|
||||
End:
|
||||
outline: "small"
|
||||
keysym: "End"
|
||||
PgUp:
|
||||
outline: "small"
|
||||
keysym: "Page_Up"
|
||||
PgDn:
|
||||
outline: "small"
|
||||
keysym: "Page_Down"
|
||||
"↑":
|
||||
outline: "small"
|
||||
keysym: "Up"
|
||||
"↓":
|
||||
outline: "small"
|
||||
keysym: "Down"
|
||||
"←":
|
||||
outline: "small"
|
||||
keysym: "Left"
|
||||
"→":
|
||||
outline: "small"
|
||||
keysym: "Right"
|
||||
Up:
|
||||
label: "↑"
|
||||
outline: "action"
|
||||
keysym: "Up"
|
||||
Left:
|
||||
label: "←"
|
||||
outline: "action"
|
||||
keysym: "Left"
|
||||
Down:
|
||||
label: "↓"
|
||||
outline: "action"
|
||||
keysym: "Down"
|
||||
Right:
|
||||
label: "→"
|
||||
outline: "action"
|
||||
keysym: "Right"
|
||||
Ctrl:
|
||||
modifier: "Control"
|
||||
outline: "small"
|
||||
label: "Ctrl"
|
||||
Alt:
|
||||
modifier: "Alt"
|
||||
outline: "small"
|
||||
label: "Alt"
|
||||
period:
|
||||
outline: "special"
|
||||
text: "."
|
||||
slash:
|
||||
outline: "special"
|
||||
text: "/"
|
||||
show_actions:
|
||||
action:
|
||||
set_view: "actions"
|
||||
outline: "special"
|
||||
label: ">_"
|
||||
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: "*/="
|
||||
show_eschars:
|
||||
action:
|
||||
locking:
|
||||
lock_view: "eschars"
|
||||
unlock_view: "base"
|
||||
outline: "altline"
|
||||
label: "âÂ"
|
||||
space:
|
||||
outline: "spaceline"
|
||||
text: " "
|
||||
Return:
|
||||
outline: "wide"
|
||||
icon: "key-enter"
|
||||
keysym: "Return"
|
||||
colon:
|
||||
text: ":"
|
||||
"\"":
|
||||
keysym: "quotedbl"
|
||||
89
data/keyboards/fr+bepo_wide.yaml
Normal file
89
data/keyboards/fr+bepo_wide.yaml
Normal file
@ -0,0 +1,89 @@
|
||||
---
|
||||
outlines:
|
||||
default: { width: 54, height: 42 }
|
||||
altline: { width: 81, height: 42 }
|
||||
wide: { width: 100, height: 42 }
|
||||
spaceline: { width: 205, height: 42 }
|
||||
special: { width: 54, height: 42 }
|
||||
|
||||
views:
|
||||
base:
|
||||
- "b é p o w v d l j z"
|
||||
- "a u i e c t s r n m"
|
||||
- "Shift_L y x k q g h f . BackSpace"
|
||||
- "show_numbers preferences space show_eschars Return"
|
||||
upper:
|
||||
- "B É P O W V D L J Z"
|
||||
- "A U I E C T S R N M"
|
||||
- "Shift_L Y X K Q G H F - BackSpace"
|
||||
- "show_numbers preferences space colon show_eschars Return"
|
||||
numbers:
|
||||
- "1 2 3 4 5 6 7 8 9 0"
|
||||
- "@ # € % & - _ + ( )"
|
||||
- "show_symbols , \" ' colon ; ! ? BackSpace"
|
||||
- "show_letters preferences space show_eschars Return"
|
||||
symbols:
|
||||
- "~ ` | · √ π τ ÷ × ¶"
|
||||
- "© ® £ $ ¥ ^ ° * { }"
|
||||
- "show_numbers_from_symbols \\ / < > = [ ] BackSpace"
|
||||
- "show_letters preferences space show_eschars Return"
|
||||
eschars:
|
||||
- "à â ç é è ê î ô ù û"
|
||||
- "À Â Ç É È Ê Î Ô Ù Û"
|
||||
- "show_numbers_from_symbols æ œ ä ë ï ö ü BackSpace"
|
||||
- "show_letters preferences space show_eschars 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: "*/="
|
||||
show_eschars:
|
||||
action:
|
||||
locking:
|
||||
lock_view: "eschars"
|
||||
unlock_view: "base"
|
||||
outline: "altline"
|
||||
label: "âÂ"
|
||||
space:
|
||||
outline: "spaceline"
|
||||
text: " "
|
||||
Return:
|
||||
outline: "wide"
|
||||
icon: "key-enter"
|
||||
keysym: "Return"
|
||||
colon:
|
||||
text: ":"
|
||||
"\"":
|
||||
keysym: "quotedbl"
|
||||
78
data/keyboards/ge.yaml
Normal file
78
data/keyboards/ge.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:
|
||||
- "1 2 3 4 5 6 7 8 9 0"
|
||||
- "! @ # $ % ^ & * ( )"
|
||||
- "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: ":"
|
||||
326
data/keyboards/gr+polytonic.yaml
Normal file
326
data/keyboards/gr+polytonic.yaml
Normal file
@ -0,0 +1,326 @@
|
||||
# Greek polytonic layout by Antonis Tsolomitis
|
||||
# University of the Aegean, Department of Mathematics, atsol@aegean.gr
|
||||
# March 2022
|
||||
#
|
||||
---
|
||||
outlines:
|
||||
default: { width: 40, height: 60 }
|
||||
altline: { width: 52.67, height: 60 }
|
||||
wide: { width: 62, height: 60 }
|
||||
extrawide: { width: 66, height: 60 }
|
||||
spaceline: { width: 140, height: 60 }
|
||||
special: { width: 44, height: 60 }
|
||||
|
||||
views:
|
||||
base:
|
||||
- "semicolon ς ε ρ τ υ θ ι ο π"
|
||||
- "α σ δ φ γ η ξ κ λ show_accents"
|
||||
- "Shift_L ζ χ ψ ω β ν μ BackSpace"
|
||||
- "show_numbers preferences space period comma Return"
|
||||
upper:
|
||||
- "colon EuroSign Ε Ρ Τ Υ Θ Ι Ο Π"
|
||||
- "Α Σ Δ Φ Γ Η Ξ Κ Λ show_accents"
|
||||
- "Shift_L Ζ Χ Ψ Ω Β Ν Μ BackSpace"
|
||||
- "show_numbers preferences space exclam period_upper Return"
|
||||
accents:
|
||||
- "show_psiliordasiaandvaria show_psiliordasiaandoxia show_psiliordasia show_bariaorperispomeni show_oxia"
|
||||
- "show_PsiliOrDasiaAndVaria show_PsiliOrDasiaAndOxia show_PsiliOrDasia show_BariaOrPerispomeni show_Oxia show_base"
|
||||
- "show_PsiliOrDasiaAndPerispomeni show_psiliordasiaandperispomeni ᾿ BackSpace"
|
||||
- "show_numbers preferences space Return"
|
||||
oxia:
|
||||
- "ά έ ή ί ϊ ΐ ό ύ ϋ ώ"
|
||||
- "show_Oxia ᾳ ᾴ ῃ ῄ ῳ ῴ show_base"
|
||||
- "Ϗ ϐ ϑ ϗ ϖ ΰ ϕ – — BackSpace"
|
||||
- "show_numbers preferences space eis_l eis_r Return"
|
||||
Oxia:
|
||||
- "Ά Έ Ή Ί Ϊ Ό Ύ Ϋ Ώ"
|
||||
- "show_oxia ᾼ ῌ ῼ show_base"
|
||||
- "Ϗ ϐ ϑ ϗ ϖ ϕ – — BackSpace"
|
||||
- "show_numbers preferences space eis_l eis_r Return"
|
||||
bariaorperispomeni:
|
||||
- "ὰ ὲ ὴ ὶ ῒ ὸ ὺ ὼ ῐ ῑ"
|
||||
- "show_BariaOrPerispomeni ᾳ ᾲ ῃ ῂ ῳ ῲ ῠ show_base"
|
||||
- "ᾶ ᾷ ῆ ῖ ῗ ῦ ῧ ῶ ῡ BackSpace"
|
||||
- "show_numbers preferences space ῇ ῷ Return"
|
||||
BariaOrPerispomeni:
|
||||
- "Ὰ Ὲ Ὴ Ὶ Ὸ Ὺ Ὼ"
|
||||
- "show_bariaorperispomeni ᾼ ῌ ῼ show_base"
|
||||
- "show_numbers preferences space BackSpace Return"
|
||||
psiliordasia:
|
||||
- "ἀ ἐ ἠ ἰ ὀ ὐ ὠ ᾀ ᾐ ᾠ"
|
||||
- "show_PsiliOrDasia ἁ ἑ ἡ ἱ ὁ ὑ ὡ show_base"
|
||||
- "ᾁ ᾑ ᾡ ῤ ῥ BackSpace"
|
||||
- "show_numbers preferences space Return"
|
||||
PsiliOrDasia:
|
||||
- "Ἀ Ἐ Ἠ Ἰ Ὀ Ὠ ᾈ ᾘ ᾨ"
|
||||
- "show_psiliordasia Ἁ Ἑ Ἡ Ἱ Ὁ Ὑ Ὡ show_base"
|
||||
- "ᾉ ᾙ ᾩ Ῥ BackSpace"
|
||||
- "show_numbers preferences space Return"
|
||||
psiliordasiaandoxia:
|
||||
- "ἄ ἔ ἤ ἴ ὄ ὔ ὤ ᾄ ᾔ ᾤ"
|
||||
- "show_PsiliOrDasiaAndOxia ἅ ἕ ἥ ἵ ὅ ὕ ὥ show_base"
|
||||
- "ᾅ ᾕ ᾥ BackSpace"
|
||||
- "show_numbers preferences space Return"
|
||||
PsiliOrDasiaAndOxia:
|
||||
- "Ἄ Ἔ Ἤ Ἴ Ὄ Ὤ ᾌ ᾜ ᾬ"
|
||||
- "show_psiliordasiaandoxia Ἅ Ἕ Ἥ Ἵ Ὅ Ὕ Ὥ show_base"
|
||||
- "ᾍ ᾝ ᾭ BackSpace"
|
||||
- "show_numbers preferences space Return"
|
||||
psiliordasiaandvaria:
|
||||
- "ἂ ἒ ἢ ἲ ὂ ὒ ὢ ᾂ ᾒ ᾢ"
|
||||
- "show_PsiliOrDasiaAndVaria ἃ ἓ ἣ ἳ ὃ ὓ ὣ show_base"
|
||||
- "ᾃ ᾓ ᾣ BackSpace"
|
||||
- "show_numbers preferences space Return"
|
||||
PsiliOrDasiaAndVaria:
|
||||
- "Ἂ Ἒ Ἢ Ἲ Ὂ Ὢ ᾊ ᾚ ᾪ"
|
||||
- "show_psiliordasiaandvaria Ἃ Ἓ Ἣ Ἳ Ὃ Ὓ Ὣ show_base"
|
||||
- "ᾋ ᾛ ᾫ BackSpace"
|
||||
- "show_numbers preferences space Return"
|
||||
psiliordasiaandperispomeni:
|
||||
- "ἆ ἦ ἶ ὖ ὦ ᾆ ᾖ ᾦ"
|
||||
- "show_PsiliOrDasiaAndPerispomeni ἇ ἧ ἷ ὗ ὧ show_base"
|
||||
- "ᾇ ᾗ ᾧ BackSpace"
|
||||
- "show_numbers preferences space Return"
|
||||
PsiliOrDasiaAndPerispomeni:
|
||||
- "Ἆ Ἦ Ἶ Ὦ ᾎ ᾞ ᾮ"
|
||||
- "show_psiliordasiaandperispomeni Ἇ Ἧ Ἷ Ὗ Ὧ show_base"
|
||||
- "ᾏ ᾟ ᾯ BackSpace"
|
||||
- "show_numbers preferences space Return"
|
||||
numbers:
|
||||
- "1 2 3 4 5 6 7 8 9 0"
|
||||
- "at numbersign dollar percent ampersand minus underscore plus parenleft parenright"
|
||||
- "show_symbols comma quotedbl quoteright colon semicolon exclam question BackSpace"
|
||||
- "show_letters preferences space period comma Return"
|
||||
symbols:
|
||||
- "asciitilde quoteleft bar U00B7 squareroot Greek_pi Greek_tau division multiply paragraph"
|
||||
- "copyright U00AE U00A3 EuroSign U00A5 asciicircum degree asterisk braceleft braceright"
|
||||
- "show_numbers backslash slash less greater equal bracketleft bracketright BackSpace"
|
||||
- "show_letters preferences space period comma 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: "altline"
|
||||
icon: "keyboard-mode-symbolic"
|
||||
show_oxia:
|
||||
action:
|
||||
set_view: "oxia"
|
||||
outline: "extrawide"
|
||||
label: "´ ΅"
|
||||
show_Oxia:
|
||||
action:
|
||||
set_view: "Oxia"
|
||||
outline: "extrawide"
|
||||
label: "´¨↑"
|
||||
show_bariaorperispomeni:
|
||||
action:
|
||||
set_view: "bariaorperispomeni"
|
||||
outline: "extrawide"
|
||||
label: "` ῀"
|
||||
show_BariaOrPerispomeni:
|
||||
action:
|
||||
set_view: "BariaOrPerispomeni"
|
||||
outline: "extrawide"
|
||||
label: "`῀↑"
|
||||
show_psiliordasia:
|
||||
action:
|
||||
set_view: "psiliordasia"
|
||||
outline: "extrawide"
|
||||
label: "᾿ ῾"
|
||||
show_PsiliOrDasia:
|
||||
action:
|
||||
set_view: "PsiliOrDasia"
|
||||
outline: "extrawide"
|
||||
label: "᾿῾↑"
|
||||
show_psiliordasiaandoxia:
|
||||
action:
|
||||
set_view: "psiliordasiaandoxia"
|
||||
outline: "extrawide"
|
||||
label: "῎ ῞"
|
||||
show_PsiliOrDasiaAndOxia:
|
||||
action:
|
||||
set_view: "PsiliOrDasiaAndOxia"
|
||||
outline: "extrawide"
|
||||
label: "῎῞↑"
|
||||
show_psiliordasiaandvaria:
|
||||
action:
|
||||
set_view: "psiliordasiaandvaria"
|
||||
outline: "extrawide"
|
||||
label: "῍ ῝"
|
||||
show_PsiliOrDasiaAndVaria:
|
||||
action:
|
||||
set_view: "PsiliOrDasiaAndVaria"
|
||||
outline: "extrawide"
|
||||
label: "῍῝↑"
|
||||
show_psiliordasiaandperispomeni:
|
||||
action:
|
||||
set_view: "psiliordasiaandperispomeni"
|
||||
outline: "extrawide"
|
||||
label: "῏ ῟"
|
||||
show_PsiliOrDasiaAndPerispomeni:
|
||||
action:
|
||||
set_view: "PsiliOrDasiaAndPerispomeni"
|
||||
outline: "extrawide"
|
||||
label: "῏῟↑"
|
||||
show_numbers:
|
||||
action:
|
||||
set_view: "numbers"
|
||||
outline: "wide"
|
||||
label: "123"
|
||||
show_letters:
|
||||
action:
|
||||
set_view: "base"
|
||||
outline: "wide"
|
||||
label: "ΑΒΓ"
|
||||
show_symbols:
|
||||
action:
|
||||
set_view: "symbols"
|
||||
outline: "altline"
|
||||
label: "*/="
|
||||
show_accents:
|
||||
action:
|
||||
locking:
|
||||
lock_view: "accents"
|
||||
unlock_view: "base"
|
||||
outline: "altline"
|
||||
label: "ᾦ"
|
||||
show_base:
|
||||
action:
|
||||
set_view: "base"
|
||||
outline: "altline"
|
||||
label: "αι"
|
||||
space:
|
||||
outline: "spaceline"
|
||||
text: " "
|
||||
Return:
|
||||
outline: "wide"
|
||||
icon: "key-enter"
|
||||
keysym: "Return"
|
||||
period:
|
||||
outline: "special"
|
||||
text: "."
|
||||
period_upper:
|
||||
outline: "special"
|
||||
text: "·"
|
||||
comma:
|
||||
outline: "special"
|
||||
text: ","
|
||||
colon:
|
||||
outline: "special"
|
||||
text: ":"
|
||||
semicolon:
|
||||
outline: "special"
|
||||
text: ";"
|
||||
exclam:
|
||||
outline: "special"
|
||||
text: "!"
|
||||
eis_l:
|
||||
outline: "special"
|
||||
text: "«"
|
||||
eis_r:
|
||||
outline: "special"
|
||||
text: "»"
|
||||
aring:
|
||||
text: "å"
|
||||
Aring:
|
||||
text: "Å"
|
||||
oslash:
|
||||
text: "ø"
|
||||
Oslash:
|
||||
text: "Ø"
|
||||
ae:
|
||||
text: "æ"
|
||||
AE:
|
||||
text: "Æ"
|
||||
asterisk:
|
||||
text: "*"
|
||||
asciitilde:
|
||||
text: "~"
|
||||
quoteleft:
|
||||
text: "`"
|
||||
bar:
|
||||
text: "|"
|
||||
U00B7:
|
||||
text: "·"
|
||||
squareroot:
|
||||
text: "√"
|
||||
Greek_pi:
|
||||
text: "π"
|
||||
division:
|
||||
text: "÷"
|
||||
multiply:
|
||||
text: "×"
|
||||
paragraph:
|
||||
text: "¶"
|
||||
Greek_tau:
|
||||
text: "τ"
|
||||
copyright:
|
||||
text: "©"
|
||||
numbersign:
|
||||
text: "#"
|
||||
U00AE:
|
||||
text: "®"
|
||||
at:
|
||||
text: "@"
|
||||
dollar:
|
||||
text: "$"
|
||||
U00A3:
|
||||
text: "£"
|
||||
percent:
|
||||
text: "%"
|
||||
EuroSign:
|
||||
outline: "special"
|
||||
text: "€"
|
||||
ampersand:
|
||||
text: "&"
|
||||
U00A5:
|
||||
text: "¥"
|
||||
minus:
|
||||
text: "-"
|
||||
asciicircum:
|
||||
text: "^"
|
||||
underscore:
|
||||
text: "_"
|
||||
degree:
|
||||
text: "°"
|
||||
plus:
|
||||
text: "+"
|
||||
equal:
|
||||
text: "="
|
||||
parenleft:
|
||||
text: "("
|
||||
parenright:
|
||||
text: ")"
|
||||
braceleft:
|
||||
text: "{"
|
||||
braceright:
|
||||
text: "}"
|
||||
backslash:
|
||||
text: "\\"
|
||||
slash:
|
||||
text: "/"
|
||||
quotedbl:
|
||||
text: "\""
|
||||
quoteright:
|
||||
text: "'"
|
||||
less:
|
||||
text: "<"
|
||||
greater:
|
||||
text: ">"
|
||||
question:
|
||||
text: "?"
|
||||
bracketleft:
|
||||
text: "["
|
||||
bracketright:
|
||||
text: "]"
|
||||
|
||||
@ -1,40 +1,41 @@
|
||||
# Greek layout created by Antonis Tsolomitis
|
||||
# Greek layout originally created by Antonis Tsolomitis
|
||||
# University of the Aegean, Department of Mathematics, atsol@aegean.gr
|
||||
# Sep 2019
|
||||
# Edited by Sotiris Papadopoulos, sotirios.papadopoulos@inserm.fr
|
||||
---
|
||||
outlines:
|
||||
default: { width: 32, height: 52 }
|
||||
altline: { width: 48.39024, height: 52 }
|
||||
wide: { width: 62, height: 52 }
|
||||
outline7: { width: 88.97561, height: 52 }
|
||||
spaceline: { width: 150.5853, height: 52 }
|
||||
default: { width: 40, height: 60 }
|
||||
altline: { width: 52.67, height: 60 }
|
||||
wide: { width: 62, height: 60 }
|
||||
spaceline: { width: 140, height: 60 }
|
||||
special: { width: 44, height: 60 }
|
||||
|
||||
views:
|
||||
base:
|
||||
- "; ς ε ρ τ υ θ ι ο π !"
|
||||
- "semicolon ς ε ρ τ υ θ ι ο π"
|
||||
- "α σ δ φ γ η ξ κ λ show_accented"
|
||||
- "Shift_L ζ χ ψ ω β ν μ , BackSpace"
|
||||
- "show_numbers preferences space period Return"
|
||||
- "Shift_L ζ χ ψ ω β ν μ BackSpace"
|
||||
- "show_numbers preferences space period comma Return"
|
||||
upper:
|
||||
- ": EuroSign Ε Ρ Τ Υ Θ Ι Ο Π"
|
||||
- "colon exclam Ε Ρ Τ Υ Θ Ι Ο Π"
|
||||
- "Α Σ Δ Φ Γ Η Ξ Κ Λ show_accented"
|
||||
- "Shift_L Ζ Χ Ψ Ω Β Ν Μ · BackSpace"
|
||||
- "show_numbers preferences space « » Return"
|
||||
- "Shift_L Ζ Χ Ψ Ω Β Ν Μ BackSpace"
|
||||
- "show_numbers preferences space period_upper apostrophe Return"
|
||||
accented:
|
||||
- "ά έ ή ί ό ύ ώ ϊ ϋ ΐ"
|
||||
- "ΰ Ά Έ Ή Ί Ό Ύ Ώ Ϊ show_base"
|
||||
- "Ϋ Ϗ ϐ ϑ ϕ ϖ ϗ – — BackSpace"
|
||||
- "show_numbers preferences space quoteleft quoteright Return"
|
||||
- "ά έ ή ί ϊ ΐ ό ύ ϋ ώ "
|
||||
- "Ά Έ Ή Ί Ϊ Ό Ύ Ϋ Ώ show_base"
|
||||
- "Ϗ ϐ ϑ ϗ ϖ ΰ ϕ – — BackSpace"
|
||||
- "show_numbers preferences space eis_l eis_r Return"
|
||||
numbers:
|
||||
- "1 2 3 4 5 6 7 8 9 0"
|
||||
- "at numbersign dollar percent ampersand minus underscore plus parenleft parenright"
|
||||
- "show_symbols comma quotedbl quoteright colon semicolon exclam question BackSpace"
|
||||
- "show_letters preferences space period Return"
|
||||
- "show_letters preferences space period comma Return"
|
||||
symbols:
|
||||
- "asciitilde quoteleft bar U00B7 squareroot Greek_pi Greek_tau division multiply paragraph"
|
||||
- "copyright U00AE U00A3 EuroSign U00A5 asciicircum degree asterisk braceleft braceright"
|
||||
- "show_numbers backslash slash less greater equal bracketleft bracketright BackSpace"
|
||||
- "show_letters preferences space period Return"
|
||||
- "show_letters preferences space period comma Return"
|
||||
buttons:
|
||||
Shift_L:
|
||||
action:
|
||||
@ -54,12 +55,12 @@ buttons:
|
||||
show_numbers:
|
||||
action:
|
||||
set_view: "numbers"
|
||||
outline: "altline"
|
||||
outline: "wide"
|
||||
label: "123"
|
||||
show_letters:
|
||||
action:
|
||||
set_view: "base"
|
||||
outline: "altline"
|
||||
outline: "wide"
|
||||
label: "ΑΒΓ"
|
||||
show_symbols:
|
||||
action:
|
||||
@ -78,16 +79,40 @@ buttons:
|
||||
set_view: "base"
|
||||
outline: "altline"
|
||||
label: "αι"
|
||||
period:
|
||||
outline: "altline"
|
||||
text: "."
|
||||
space:
|
||||
outline: spaceline
|
||||
outline: "spaceline"
|
||||
text: " "
|
||||
Return:
|
||||
outline: "wide"
|
||||
icon: "key-enter"
|
||||
keysym: "Return"
|
||||
period:
|
||||
outline: "special"
|
||||
text: "."
|
||||
period_upper:
|
||||
outline: "special"
|
||||
text: "·"
|
||||
comma:
|
||||
outline: "special"
|
||||
text: ","
|
||||
colon:
|
||||
outline: "special"
|
||||
text: ":"
|
||||
semicolon:
|
||||
outline: "special"
|
||||
text: ";"
|
||||
apostrophe:
|
||||
outline: "special"
|
||||
text: "᾿"
|
||||
exclam:
|
||||
outline: "special"
|
||||
text: "!"
|
||||
eis_l:
|
||||
outline: "special"
|
||||
text: "«"
|
||||
eis_r:
|
||||
outline: "special"
|
||||
text: "»"
|
||||
aring:
|
||||
text: "å"
|
||||
Aring:
|
||||
@ -162,8 +187,6 @@ buttons:
|
||||
text: "{"
|
||||
braceright:
|
||||
text: "}"
|
||||
comma:
|
||||
text: ","
|
||||
backslash:
|
||||
text: "\\"
|
||||
slash:
|
||||
@ -176,12 +199,6 @@ buttons:
|
||||
text: "<"
|
||||
greater:
|
||||
text: ">"
|
||||
colon:
|
||||
text: ":"
|
||||
semicolon:
|
||||
text: ";"
|
||||
exclam:
|
||||
text: "!"
|
||||
question:
|
||||
text: "?"
|
||||
bracketleft:
|
||||
|
||||
204
data/keyboards/gr_wide.yaml
Normal file
204
data/keyboards/gr_wide.yaml
Normal file
@ -0,0 +1,204 @@
|
||||
# Creaed by Sotiris Papadopoulos, sotirios.papadopoulos@inserm.fr
|
||||
---
|
||||
outlines:
|
||||
default: { width: 80, height: 60 }
|
||||
altline: { width: 110, height: 60 }
|
||||
wide: { width: 120, height: 60 }
|
||||
spaceline: { width: 250, height: 60 }
|
||||
special: { width: 75, height: 60 }
|
||||
|
||||
views:
|
||||
base:
|
||||
- "semicolon ς ε ρ τ υ θ ι ο π"
|
||||
- "α σ δ φ γ η ξ κ λ show_accented"
|
||||
- "Shift_L ζ χ ψ ω β ν μ BackSpace"
|
||||
- "show_numbers preferences space period comma Return"
|
||||
upper:
|
||||
- "colon exclam Ε Ρ Τ Υ Θ Ι Ο Π"
|
||||
- "Α Σ Δ Φ Γ Η Ξ Κ Λ show_accented"
|
||||
- "Shift_L Ζ Χ Ψ Ω Β Ν Μ BackSpace"
|
||||
- "show_numbers preferences space period_upper apostrophe Return"
|
||||
accented:
|
||||
- "ά έ ή ί ϊ ΐ ό ύ ϋ ώ "
|
||||
- "Ά Έ Ή Ί Ϊ Ό Ύ Ϋ Ώ show_base"
|
||||
- "Ϗ ϐ ϑ ϗ ΰ ϕ ϖ – — BackSpace"
|
||||
- "show_numbers preferences space eis_l eis_r Return"
|
||||
numbers:
|
||||
- "1 2 3 4 5 6 7 8 9 0"
|
||||
- "at numbersign dollar percent ampersand minus underscore plus parenleft parenright"
|
||||
- "show_symbols comma quotedbl quoteright colon semicolon exclam question BackSpace"
|
||||
- "show_letters preferences space period comma Return"
|
||||
symbols:
|
||||
- "asciitilde quoteleft bar U00B7 squareroot Greek_pi Greek_tau division multiply paragraph"
|
||||
- "copyright U00AE U00A3 EuroSign U00A5 asciicircum degree asterisk braceleft braceright"
|
||||
- "show_numbers backslash slash less greater equal bracketleft bracketright BackSpace"
|
||||
- "show_letters preferences space period comma 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_letters:
|
||||
action:
|
||||
set_view: "base"
|
||||
outline: "wide"
|
||||
label: "ΑΒΓ"
|
||||
show_symbols:
|
||||
action:
|
||||
set_view: "symbols"
|
||||
outline: "altline"
|
||||
label: "*/="
|
||||
show_accented:
|
||||
action:
|
||||
locking:
|
||||
lock_view: "accented"
|
||||
unlock_view: "base"
|
||||
outline: "altline"
|
||||
label: "άΐ"
|
||||
show_base:
|
||||
action:
|
||||
set_view: "base"
|
||||
outline: "altline"
|
||||
label: "αι"
|
||||
space:
|
||||
outline: "spaceline"
|
||||
text: " "
|
||||
Return:
|
||||
outline: "wide"
|
||||
icon: "key-enter"
|
||||
keysym: "Return"
|
||||
period:
|
||||
outline: "special"
|
||||
text: "."
|
||||
period_upper:
|
||||
outline: "special"
|
||||
text: "·"
|
||||
comma:
|
||||
outline: "special"
|
||||
text: ","
|
||||
colon:
|
||||
outline: "special"
|
||||
text: ":"
|
||||
semicolon:
|
||||
outline: "special"
|
||||
text: ";"
|
||||
apostrophe:
|
||||
outline: "special"
|
||||
text: "᾿"
|
||||
exclam:
|
||||
outline: "special"
|
||||
text: "!"
|
||||
eis_l:
|
||||
outline: "special"
|
||||
text: "«"
|
||||
eis_r:
|
||||
outline: "special"
|
||||
text: "»"
|
||||
aring:
|
||||
text: "å"
|
||||
Aring:
|
||||
text: "Å"
|
||||
oslash:
|
||||
text: "ø"
|
||||
Oslash:
|
||||
text: "Ø"
|
||||
ae:
|
||||
text: "æ"
|
||||
AE:
|
||||
text: "Æ"
|
||||
asterisk:
|
||||
text: "*"
|
||||
asciitilde:
|
||||
text: "~"
|
||||
quoteleft:
|
||||
text: "`"
|
||||
bar:
|
||||
text: "|"
|
||||
U00B7:
|
||||
text: "·"
|
||||
squareroot:
|
||||
text: "√"
|
||||
Greek_pi:
|
||||
text: "π"
|
||||
division:
|
||||
text: "÷"
|
||||
multiply:
|
||||
text: "×"
|
||||
paragraph:
|
||||
text: "¶"
|
||||
Greek_tau:
|
||||
text: "τ"
|
||||
copyright:
|
||||
text: "©"
|
||||
numbersign:
|
||||
text: "#"
|
||||
U00AE:
|
||||
text: "®"
|
||||
at:
|
||||
text: "@"
|
||||
dollar:
|
||||
text: "$"
|
||||
U00A3:
|
||||
text: "£"
|
||||
percent:
|
||||
text: "%"
|
||||
EuroSign:
|
||||
text: "€"
|
||||
ampersand:
|
||||
text: "&"
|
||||
U00A5:
|
||||
text: "¥"
|
||||
minus:
|
||||
text: "-"
|
||||
asciicircum:
|
||||
text: "^"
|
||||
underscore:
|
||||
text: "_"
|
||||
degree:
|
||||
text: "°"
|
||||
plus:
|
||||
text: "+"
|
||||
equal:
|
||||
text: "="
|
||||
parenleft:
|
||||
text: "("
|
||||
parenright:
|
||||
text: ")"
|
||||
braceleft:
|
||||
text: "{"
|
||||
braceright:
|
||||
text: "}"
|
||||
backslash:
|
||||
text: "\\"
|
||||
slash:
|
||||
text: "/"
|
||||
quotedbl:
|
||||
text: "\""
|
||||
quoteright:
|
||||
text: "'"
|
||||
less:
|
||||
text: "<"
|
||||
greater:
|
||||
text: ">"
|
||||
question:
|
||||
text: "?"
|
||||
bracketleft:
|
||||
text: "["
|
||||
bracketright:
|
||||
text: "]"
|
||||
@ -30,10 +30,10 @@ views:
|
||||
- "show_numbers \\ / < > = [ ] BackSpace"
|
||||
- "show_letters show_eschars preferences space ? . Return"
|
||||
eschars:
|
||||
- "á é í ó ú Á É Í Ó Ú"
|
||||
- "à è ì ò « » ù ! { }"
|
||||
- "show_numbers \\ / < > = [ ] BackSpace"
|
||||
- "show_letters show_eschars preferences space « » Return"
|
||||
- "è é È É ù ú Ù Ú ò ó"
|
||||
- "à á À Á ì í Ì Í Ò Ó"
|
||||
- "show_numbers “ ” « » ≈ ≠ ‽ BackSpace"
|
||||
- "show_letters show_eschars preferences space , . Return"
|
||||
|
||||
buttons:
|
||||
Shift_L:
|
||||
|
||||
89
data/keyboards/ro.yaml
Normal file
89
data/keyboards/ro.yaml
Normal file
@ -0,0 +1,89 @@
|
||||
---
|
||||
outlines:
|
||||
default: { width: 35.33, height: 52 }
|
||||
altline: { width: 52.67, height: 52 }
|
||||
wide: { width: 62, height: 52 }
|
||||
spaceline: { width: 99.67, height: 52 }
|
||||
special: { width: 44, height: 52 }
|
||||
|
||||
views:
|
||||
base:
|
||||
- "q w e r t y u i o p"
|
||||
- "a s d f g h j k l"
|
||||
- "Shift_L z x c v b n m BackSpace"
|
||||
- "show_numbers show_eschars preferences space . Return"
|
||||
upper:
|
||||
- "Q W E R T Y U I O P"
|
||||
- "A S D F G H J K L"
|
||||
- "Shift_L Z X C V B N M BackSpace"
|
||||
- "show_numbers show_eschars preferences space , Return"
|
||||
numbers:
|
||||
- "1 2 3 4 5 6 7 8 9 0"
|
||||
- "@ # € % & - _ + ( )"
|
||||
- "show_symbols , \" ' colon ; ! ? BackSpace"
|
||||
- "show_letters show_eschars preferences space . Return"
|
||||
symbols:
|
||||
- "~ ` | · √ π τ ÷ × ¶"
|
||||
- "© ® £ $ ¥ ^ ° * { }"
|
||||
- "show_numbers_from_symbols \\ / < > = [ ] BackSpace"
|
||||
- "show_letters show_eschars preferences space , Return"
|
||||
eschars:
|
||||
- "ă â î ș ț á é í ó ü"
|
||||
- "Ă Â Î Ș Ț Á É Í Ó Ü"
|
||||
- "show_numbers_from_symbols „ ” « » ― { } BackSpace"
|
||||
- "show_letters show_eschars preferences space . 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: "altline"
|
||||
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: "*/="
|
||||
show_eschars:
|
||||
action:
|
||||
locking:
|
||||
lock_view: "eschars"
|
||||
unlock_view: "base"
|
||||
outline: "altline"
|
||||
label: "ăĂ"
|
||||
space:
|
||||
outline: "spaceline"
|
||||
text: " "
|
||||
Return:
|
||||
outline: "wide"
|
||||
icon: "key-enter"
|
||||
keysym: "Return"
|
||||
colon:
|
||||
text: ":"
|
||||
"\"":
|
||||
keysym: "quotedbl"
|
||||
89
data/keyboards/ro_wide.yaml
Normal file
89
data/keyboards/ro_wide.yaml
Normal file
@ -0,0 +1,89 @@
|
||||
---
|
||||
outlines:
|
||||
default: { width: 54, height: 42 }
|
||||
altline: { width: 81, height: 42 }
|
||||
wide: { width: 108, height: 42 }
|
||||
spaceline: { width: 153, height: 42 }
|
||||
special: { width: 54, height: 42 }
|
||||
|
||||
views:
|
||||
base:
|
||||
- "q w e r t y u i o p"
|
||||
- "a s d f g h j k l"
|
||||
- "Shift_L z x c v b n m BackSpace"
|
||||
- "show_numbers show_eschars preferences space . Return"
|
||||
upper:
|
||||
- "Q W E R T Y U I O P"
|
||||
- "A S D F G H J K L"
|
||||
- "Shift_L Z X C V B N M BackSpace"
|
||||
- "show_numbers show_eschars preferences space , Return"
|
||||
numbers:
|
||||
- "1 2 3 4 5 6 7 8 9 0"
|
||||
- "@ # € % & - _ + ( )"
|
||||
- "show_symbols , \" ' colon ; ! ? BackSpace"
|
||||
- "show_letters show_eschars preferences space . Return"
|
||||
symbols:
|
||||
- "~ ` | · √ π τ ÷ × ¶"
|
||||
- "© ® £ $ ¥ ^ ° * { }"
|
||||
- "show_numbers_from_symbols \\ / < > = [ ] BackSpace"
|
||||
- "show_letters show_eschars preferences space , Return"
|
||||
eschars:
|
||||
- "ă â î ș ț á é í ó ü"
|
||||
- "Ă Â Î Ș Ț Á É Í Ó Ü"
|
||||
- "show_numbers_from_symbols „ ” « » ― { } BackSpace"
|
||||
- "show_letters show_eschars preferences space . 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: "altline"
|
||||
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: "*/="
|
||||
show_eschars:
|
||||
action:
|
||||
locking:
|
||||
lock_view: "eschars"
|
||||
unlock_view: "base"
|
||||
outline: "altline"
|
||||
label: "ăĂ"
|
||||
space:
|
||||
outline: "spaceline"
|
||||
text: " "
|
||||
Return:
|
||||
outline: "wide"
|
||||
icon: "key-enter"
|
||||
keysym: "Return"
|
||||
colon:
|
||||
text: ":"
|
||||
"\"":
|
||||
keysym: "quotedbl"
|
||||
223
data/keyboards/terminal/fr+bepo.yaml
Normal file
223
data/keyboards/terminal/fr+bepo.yaml
Normal file
@ -0,0 +1,223 @@
|
||||
---
|
||||
outlines:
|
||||
action: { width: 59, height: 46 }
|
||||
small: { width: 50, height: 22 }
|
||||
default: { width: 35.33, height: 46 }
|
||||
altline: { width: 35.33, height: 46 }
|
||||
wide: { width: 50, height: 46 }
|
||||
spaceline: { width: 110, height: 46 }
|
||||
special: { width: 35.33, height: 46 }
|
||||
|
||||
views:
|
||||
base:
|
||||
- "Ctrl Alt Tabsmall ↑ ↓ ← →"
|
||||
- "b é p o w v d l j z"
|
||||
- "a u i e c t s r n m"
|
||||
- "Shift_L y x k q g h f period BackSpace"
|
||||
- "show_numbers preferences slash space show_eschars show_actions Return"
|
||||
upper:
|
||||
- "Ctrl Alt Tabsmall PgUp PgDn Home End"
|
||||
- "B É P O W V D L J Z"
|
||||
- "A U I E C T S R N M"
|
||||
- "Shift_L Y X K Q G H F - BackSpace"
|
||||
- "show_numbers preferences space colon show_eschars show_actions Return"
|
||||
numbers:
|
||||
- "Ctrl Alt Tabsmall ↑ ↓ ← →"
|
||||
- "1 2 3 4 5 6 7 8 9 0"
|
||||
- "@ # € % & - _ + ( )"
|
||||
- "show_symbols , \" ' colon ; ! ? BackSpace"
|
||||
- "show_letters preferences space show_eschars show_actions Return"
|
||||
symbols:
|
||||
- "Ctrl Alt Tabsmall ↑ ↓ ← →"
|
||||
- "~ ` | · √ π τ ÷ × ¶"
|
||||
- "© ® £ $ ¥ ^ ° * { }"
|
||||
- "show_numbers_from_symbols \\ / < > = [ ] BackSpace"
|
||||
- "show_letters preferences space show_eschars show_actions Return"
|
||||
eschars:
|
||||
- "Ctrl Alt Tabsmall ↑ ↓ ← →"
|
||||
- "à â ç é è ê î ô ù û"
|
||||
- "À Â Ç É È Ê Î Ô Ù Û"
|
||||
- "show_numbers_from_symbols æ œ ä ë ï ö ü BackSpace"
|
||||
- "show_letters preferences space show_eschars show_actions Return"
|
||||
actions:
|
||||
- "Ctrl Alt PgUp PgDn Home End"
|
||||
- "F1 F2 F3 F4 F5 F6"
|
||||
- "F7 F8 F9 F10 F11 F12"
|
||||
- "Esc Tab Pause Insert Up Del"
|
||||
- "show_letters Menu Break Left Down Right"
|
||||
|
||||
|
||||
buttons:
|
||||
F1:
|
||||
outline: "action"
|
||||
keysym: "F1"
|
||||
F2:
|
||||
outline: "action"
|
||||
keysym: "F2"
|
||||
F3:
|
||||
outline: "action"
|
||||
keysym: "F3"
|
||||
F4:
|
||||
outline: "action"
|
||||
keysym: "F4"
|
||||
F5:
|
||||
outline: "action"
|
||||
keysym: "F5"
|
||||
F6:
|
||||
outline: "action"
|
||||
keysym: "F6"
|
||||
F7:
|
||||
outline: "action"
|
||||
keysym: "F7"
|
||||
F8:
|
||||
outline: "action"
|
||||
keysym: "F8"
|
||||
F9:
|
||||
outline: "action"
|
||||
keysym: "F9"
|
||||
F10:
|
||||
outline: "action"
|
||||
keysym: "F10"
|
||||
F11:
|
||||
outline: "action"
|
||||
keysym: "F11"
|
||||
F12:
|
||||
outline: "action"
|
||||
keysym: "F12"
|
||||
Esc:
|
||||
outline: "action"
|
||||
keysym: "Escape"
|
||||
Tab:
|
||||
outline: "action"
|
||||
keysym: "Tab"
|
||||
Tabsmall:
|
||||
outline: "small"
|
||||
keysym: "Tab"
|
||||
label: "Tab"
|
||||
Del:
|
||||
outline: "action"
|
||||
keysym: "Delete"
|
||||
Insert:
|
||||
outline: "action"
|
||||
keysym: "Insert"
|
||||
Menu:
|
||||
outline: "action"
|
||||
keysym: "Menu"
|
||||
Pause:
|
||||
outline: "action"
|
||||
keysym: "Pause"
|
||||
Break:
|
||||
outline: "action"
|
||||
keysym: "Break"
|
||||
Home:
|
||||
outline: "small"
|
||||
keysym: "Home"
|
||||
End:
|
||||
outline: "small"
|
||||
keysym: "End"
|
||||
PgUp:
|
||||
outline: "small"
|
||||
keysym: "Page_Up"
|
||||
PgDn:
|
||||
outline: "small"
|
||||
keysym: "Page_Down"
|
||||
"↑":
|
||||
outline: "small"
|
||||
keysym: "Up"
|
||||
"↓":
|
||||
outline: "small"
|
||||
keysym: "Down"
|
||||
"←":
|
||||
outline: "small"
|
||||
keysym: "Left"
|
||||
"→":
|
||||
outline: "small"
|
||||
keysym: "Right"
|
||||
Up:
|
||||
label: "↑"
|
||||
outline: "action"
|
||||
keysym: "Up"
|
||||
Left:
|
||||
label: "←"
|
||||
outline: "action"
|
||||
keysym: "Left"
|
||||
Down:
|
||||
label: "↓"
|
||||
outline: "action"
|
||||
keysym: "Down"
|
||||
Right:
|
||||
label: "→"
|
||||
outline: "action"
|
||||
keysym: "Right"
|
||||
Ctrl:
|
||||
modifier: "Control"
|
||||
outline: "small"
|
||||
label: "Ctrl"
|
||||
Alt:
|
||||
modifier: "Alt"
|
||||
outline: "small"
|
||||
label: "Alt"
|
||||
period:
|
||||
outline: "special"
|
||||
text: "."
|
||||
slash:
|
||||
outline: "special"
|
||||
text: "/"
|
||||
show_actions:
|
||||
action:
|
||||
set_view: "actions"
|
||||
outline: "special"
|
||||
label: ">_"
|
||||
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: "wide"
|
||||
label: "123"
|
||||
show_letters:
|
||||
action:
|
||||
set_view: "base"
|
||||
outline: "wide"
|
||||
label: "abc"
|
||||
show_symbols:
|
||||
action:
|
||||
set_view: "symbols"
|
||||
outline: "wide"
|
||||
label: "*/="
|
||||
show_eschars:
|
||||
action:
|
||||
locking:
|
||||
lock_view: "eschars"
|
||||
unlock_view: "base"
|
||||
outline: "altline"
|
||||
label: "âÂ"
|
||||
space:
|
||||
outline: "spaceline"
|
||||
text: " "
|
||||
Return:
|
||||
outline: "wide"
|
||||
icon: "key-enter"
|
||||
keysym: "Return"
|
||||
colon:
|
||||
text: ":"
|
||||
"\"":
|
||||
keysym: "quotedbl"
|
||||
227
data/keyboards/terminal/fr+bepo_wide.yaml
Normal file
227
data/keyboards/terminal/fr+bepo_wide.yaml
Normal file
@ -0,0 +1,227 @@
|
||||
---
|
||||
outlines:
|
||||
action: { width: 90, height: 37 }
|
||||
small: { width: 67.4, height: 22 }
|
||||
default: { width: 54, height: 37 }
|
||||
altline: { width: 81, height: 37 }
|
||||
wide: { width: 100, height: 37 }
|
||||
spaceline: { width: 110, height: 37 }
|
||||
special: { width: 54, height: 37 }
|
||||
|
||||
views:
|
||||
base:
|
||||
- "EscSmall TabSmall Ctrl Alt ↑ ↓ ← →"
|
||||
- "b é p o w v d l j z"
|
||||
- "a u i e c t s r n m"
|
||||
- "Shift_L y x k q g h f period BackSpace"
|
||||
- "show_numbers preferences space slash show_eschars show_actions Return"
|
||||
upper:
|
||||
- "EscSmall TabSmall Ctrl Alt ↑ ↓ ← →"
|
||||
- "B É P O W V D L J Z"
|
||||
- "A U I E C T S R N M"
|
||||
- "Shift_L Y X K Q G H F - BackSpace"
|
||||
- "show_numbers preferences space colon show_eschars show_actions Return"
|
||||
numbers:
|
||||
- "EscSmall TabSmall Ctrl Alt ↑ ↓ ← →"
|
||||
- "1 2 3 4 5 6 7 8 9 0"
|
||||
- "@ # € % & - _ + ( )"
|
||||
- "show_symbols , \" ' colon ; ! ? BackSpace"
|
||||
- "show_letters preferences space show_eschars show_actions Return"
|
||||
symbols:
|
||||
- "EscSmall TabSmall Ctrl Alt ↑ ↓ ← →"
|
||||
- "~ ` | · √ π τ ÷ × ¶"
|
||||
- "© ® £ $ ¥ ^ ° * { }"
|
||||
- "show_numbers_from_symbols \\ / < > = [ ] BackSpace"
|
||||
- "show_letters preferences space show_eschars show_actions Return"
|
||||
eschars:
|
||||
- "EscSmall TabSmall Ctrl Alt ↑ ↓ ← →"
|
||||
- "à â ç é è ê î ô ù û"
|
||||
- "À Â Ç É È Ê Î Ô Ù Û"
|
||||
- "show_numbers_from_symbols æ œ ä ë ï ö ü BackSpace"
|
||||
- "show_letters preferences space show_eschars show_actions Return"
|
||||
actions:
|
||||
- "EscSmall TabSmall Ctrl Alt PgUp PgDn Home End"
|
||||
- "F1 F2 F3 F4 F5 F6"
|
||||
- "F7 F8 F9 F10 F11 F12"
|
||||
- "Esc Tab Pause Insert Up Del"
|
||||
- "show_letters Menu Break Left Down Right"
|
||||
|
||||
|
||||
buttons:
|
||||
F1:
|
||||
outline: "action"
|
||||
keysym: "F1"
|
||||
F2:
|
||||
outline: "action"
|
||||
keysym: "F2"
|
||||
F3:
|
||||
outline: "action"
|
||||
keysym: "F3"
|
||||
F4:
|
||||
outline: "action"
|
||||
keysym: "F4"
|
||||
F5:
|
||||
outline: "action"
|
||||
keysym: "F5"
|
||||
F6:
|
||||
outline: "action"
|
||||
keysym: "F6"
|
||||
F7:
|
||||
outline: "action"
|
||||
keysym: "F7"
|
||||
F8:
|
||||
outline: "action"
|
||||
keysym: "F8"
|
||||
F9:
|
||||
outline: "action"
|
||||
keysym: "F9"
|
||||
F10:
|
||||
outline: "action"
|
||||
keysym: "F10"
|
||||
F11:
|
||||
outline: "action"
|
||||
keysym: "F11"
|
||||
F12:
|
||||
outline: "action"
|
||||
keysym: "F12"
|
||||
Esc:
|
||||
outline: "action"
|
||||
keysym: "Escape"
|
||||
EscSmall:
|
||||
outline: "small"
|
||||
keysym: "Escape"
|
||||
label: "Esc"
|
||||
Tab:
|
||||
outline: "action"
|
||||
keysym: "Tab"
|
||||
TabSmall:
|
||||
outline: "small"
|
||||
keysym: "Tab"
|
||||
label: "Tab"
|
||||
Del:
|
||||
outline: "action"
|
||||
keysym: "Delete"
|
||||
Insert:
|
||||
outline: "action"
|
||||
keysym: "Insert"
|
||||
Menu:
|
||||
outline: "action"
|
||||
keysym: "Menu"
|
||||
Pause:
|
||||
outline: "action"
|
||||
keysym: "Pause"
|
||||
Break:
|
||||
outline: "action"
|
||||
keysym: "Break"
|
||||
Home:
|
||||
outline: "small"
|
||||
keysym: "Home"
|
||||
End:
|
||||
outline: "small"
|
||||
keysym: "End"
|
||||
PgUp:
|
||||
outline: "small"
|
||||
keysym: "Page_Up"
|
||||
PgDn:
|
||||
outline: "small"
|
||||
keysym: "Page_Down"
|
||||
"↑":
|
||||
outline: "small"
|
||||
keysym: "Up"
|
||||
"↓":
|
||||
outline: "small"
|
||||
keysym: "Down"
|
||||
"←":
|
||||
outline: "small"
|
||||
keysym: "Left"
|
||||
"→":
|
||||
outline: "small"
|
||||
keysym: "Right"
|
||||
Up:
|
||||
label: "↑"
|
||||
outline: "action"
|
||||
keysym: "Up"
|
||||
Left:
|
||||
label: "←"
|
||||
outline: "action"
|
||||
keysym: "Left"
|
||||
Down:
|
||||
label: "↓"
|
||||
outline: "action"
|
||||
keysym: "Down"
|
||||
Right:
|
||||
label: "→"
|
||||
outline: "action"
|
||||
keysym: "Right"
|
||||
Ctrl:
|
||||
modifier: "Control"
|
||||
outline: "small"
|
||||
label: "Ctrl"
|
||||
Alt:
|
||||
modifier: "Alt"
|
||||
outline: "small"
|
||||
label: "Alt"
|
||||
period:
|
||||
outline: "special"
|
||||
text: "."
|
||||
slash:
|
||||
outline: "special"
|
||||
text: "/"
|
||||
show_actions:
|
||||
action:
|
||||
set_view: "actions"
|
||||
outline: "special"
|
||||
label: ">_"
|
||||
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: "*/="
|
||||
show_eschars:
|
||||
action:
|
||||
locking:
|
||||
lock_view: "eschars"
|
||||
unlock_view: "base"
|
||||
outline: "altline"
|
||||
label: "âÂ"
|
||||
space:
|
||||
outline: "spaceline"
|
||||
text: " "
|
||||
Return:
|
||||
outline: "wide"
|
||||
icon: "key-enter"
|
||||
keysym: "Return"
|
||||
colon:
|
||||
text: ":"
|
||||
"\"":
|
||||
keysym: "quotedbl"
|
||||
200
data/keyboards/terminal/us+dvorak.yaml
Normal file
200
data/keyboards/terminal/us+dvorak.yaml
Normal file
@ -0,0 +1,200 @@
|
||||
---
|
||||
outlines:
|
||||
default: { width: 35.33, height: 46 }
|
||||
action: { width: 59, height: 46 }
|
||||
altline: { width: 52.67, height: 46 }
|
||||
wide: { width: 59, height: 46 }
|
||||
spaceline: { width: 140, height: 46 }
|
||||
special: { width: 44, height: 46 }
|
||||
small: { width: 59, height: 22 }
|
||||
|
||||
views:
|
||||
base:
|
||||
- "Ctrl Alt ↑ ↓ ← →"
|
||||
- "Shift_L p y f g c r l BackSpace"
|
||||
- "a o e u i d h t n s"
|
||||
- ", q j k x b m w v z"
|
||||
- "show_numbers preferences space show_actions Return"
|
||||
upper:
|
||||
- "Ctrl Alt PgUp PgDn Home End"
|
||||
- "Shift_L p y f g c r l BackSpace"
|
||||
- "a o e u i d h t n s"
|
||||
- ", q j k x b m w v z"
|
||||
- "show_numbers preferences space show_actions Return"
|
||||
numbers:
|
||||
- "Ctrl Alt ↑ ↓ ← →"
|
||||
- "show_symbols , \" ' colon ; ! ? BackSpace"
|
||||
- "* # $ / & - _ + ( )"
|
||||
- "1 2 3 4 5 6 7 8 9 0"
|
||||
- "show_letters preferences space period Return"
|
||||
symbols:
|
||||
- "Ctrl Alt ↑ ↓ ← →"
|
||||
- "show_numbers_from_symbols \\ % < > = [ ] BackSpace"
|
||||
- "© ® £ € ¥ ^ ° @ { }"
|
||||
- "~ ` | · √ π τ ÷ × ¶"
|
||||
- "show_letters preferences space period Return"
|
||||
actions:
|
||||
- "Ctrl Alt PgUp PgDn Home End"
|
||||
- "F1 F2 F3 F4 F5 F6"
|
||||
- "F7 F8 F9 F10 F11 F12"
|
||||
- "Esc Tab Pause Insert Up Del"
|
||||
- "show_letters Menu Break Left Down Right"
|
||||
|
||||
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: "τ=\\"
|
||||
show_actions:
|
||||
action:
|
||||
set_view: "actions"
|
||||
outline: "altline"
|
||||
label: ">_"
|
||||
period:
|
||||
outline: "altline"
|
||||
text: "."
|
||||
space:
|
||||
outline: "spaceline"
|
||||
text: " "
|
||||
Return:
|
||||
outline: "wide"
|
||||
icon: "key-enter"
|
||||
keysym: "Return"
|
||||
colon:
|
||||
text: ":"
|
||||
F1:
|
||||
outline: "action"
|
||||
keysym: "F1"
|
||||
F2:
|
||||
outline: "action"
|
||||
keysym: "F2"
|
||||
F3:
|
||||
outline: "action"
|
||||
keysym: "F3"
|
||||
F4:
|
||||
outline: "action"
|
||||
keysym: "F4"
|
||||
F5:
|
||||
outline: "action"
|
||||
keysym: "F5"
|
||||
F6:
|
||||
outline: "action"
|
||||
keysym: "F6"
|
||||
F7:
|
||||
outline: "action"
|
||||
keysym: "F7"
|
||||
F8:
|
||||
outline: "action"
|
||||
keysym: "F8"
|
||||
F9:
|
||||
outline: "action"
|
||||
keysym: "F9"
|
||||
F10:
|
||||
outline: "action"
|
||||
keysym: "F10"
|
||||
F11:
|
||||
outline: "action"
|
||||
keysym: "F11"
|
||||
F12:
|
||||
outline: "action"
|
||||
keysym: "F12"
|
||||
Esc:
|
||||
outline: "action"
|
||||
keysym: "Escape"
|
||||
Tab:
|
||||
outline: "action"
|
||||
keysym: "Tab"
|
||||
Del:
|
||||
outline: "action"
|
||||
keysym: "Delete"
|
||||
Insert:
|
||||
outline: "action"
|
||||
keysym: "Insert"
|
||||
Menu:
|
||||
outline: "action"
|
||||
keysym: "Menu"
|
||||
Pause:
|
||||
outline: "action"
|
||||
keysym: "Pause"
|
||||
Break:
|
||||
outline: "action"
|
||||
keysym: "Break"
|
||||
Home:
|
||||
outline: "small"
|
||||
keysym: "Home"
|
||||
End:
|
||||
outline: "small"
|
||||
keysym: "End"
|
||||
PgUp:
|
||||
outline: "small"
|
||||
keysym: "Page_Up"
|
||||
PgDn:
|
||||
outline: "small"
|
||||
keysym: "Page_Down"
|
||||
"↑":
|
||||
outline: "small"
|
||||
keysym: "Up"
|
||||
"↓":
|
||||
outline: "small"
|
||||
keysym: "Down"
|
||||
"←":
|
||||
outline: "small"
|
||||
keysym: "Left"
|
||||
"→":
|
||||
outline: "small"
|
||||
keysym: "Right"
|
||||
Up:
|
||||
label: "↑"
|
||||
outline: "action"
|
||||
keysym: "Up"
|
||||
Left:
|
||||
label: "←"
|
||||
outline: "action"
|
||||
keysym: "Left"
|
||||
Down:
|
||||
label: "↓"
|
||||
outline: "action"
|
||||
keysym: "Down"
|
||||
Right:
|
||||
label: "→"
|
||||
outline: "action"
|
||||
keysym: "Right"
|
||||
Ctrl:
|
||||
modifier: "Control"
|
||||
outline: "small"
|
||||
label: "Ctrl"
|
||||
Alt:
|
||||
modifier: "Alt"
|
||||
outline: "small"
|
||||
label: "Alt"
|
||||
208
data/keyboards/terminal/us+dvorak_wide.yaml
Normal file
208
data/keyboards/terminal/us+dvorak_wide.yaml
Normal file
@ -0,0 +1,208 @@
|
||||
---
|
||||
outlines:
|
||||
default: { width: 54, height: 37 }
|
||||
action: { width: 90, height: 37 }
|
||||
altline: { width: 81, height: 37 }
|
||||
wide: { width: 90, height: 37 }
|
||||
spaceline: { width: 225, height: 37 }
|
||||
special: { width: 54, height: 37 }
|
||||
small: { width: 67.4, height: 22 }
|
||||
|
||||
views:
|
||||
base:
|
||||
- "EscSmall TabSmall Ctrl Alt ↑ ↓ ← →"
|
||||
- "Shift_L p y f g c r l BackSpace"
|
||||
- "a o e u i d h t n s"
|
||||
- ", q j k x b m w v z"
|
||||
- "show_numbers preferences space show_actions Return"
|
||||
upper:
|
||||
- "EscSmall TabSmall Ctrl Alt PgUp PgDn Home End"
|
||||
- "Shift_L p y f g c r l BackSpace"
|
||||
- "a o e u i d h t n s"
|
||||
- ", q j k x b m w v z"
|
||||
- "show_numbers preferences space show_actions Return"
|
||||
numbers:
|
||||
- "EscSmall TabSmall Ctrl Alt ↑ ↓ ← →"
|
||||
- "show_symbols , \" ' colon ; ! ? BackSpace"
|
||||
- "* # $ / & - _ + ( )"
|
||||
- "1 2 3 4 5 6 7 8 9 0"
|
||||
- "show_letters preferences space period Return"
|
||||
symbols:
|
||||
- "EscSmall TabSmall Ctrl Alt ↑ ↓ ← →"
|
||||
- "show_numbers_from_symbols \\ % < > = [ ] BackSpace"
|
||||
- "© ® £ € ¥ ^ ° @ { }"
|
||||
- "~ ` | · √ π τ ÷ × ¶"
|
||||
- "show_letters preferences space period Return"
|
||||
actions:
|
||||
- "EscSmall TabSmall Ctrl Alt PgUp PgDn Home End"
|
||||
- "F1 F2 F3 F4 F5 F6"
|
||||
- "F7 F8 F9 F10 F11 F12"
|
||||
- "Esc Tab Pause Insert Up Del"
|
||||
- "show_letters Menu Break Left Down Right"
|
||||
|
||||
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: "τ=\\"
|
||||
show_actions:
|
||||
action:
|
||||
set_view: "actions"
|
||||
outline: "altline"
|
||||
label: ">_"
|
||||
period:
|
||||
outline: "altline"
|
||||
text: "."
|
||||
space:
|
||||
outline: "spaceline"
|
||||
text: " "
|
||||
Return:
|
||||
outline: "wide"
|
||||
icon: "key-enter"
|
||||
keysym: "Return"
|
||||
colon:
|
||||
text: ":"
|
||||
F1:
|
||||
outline: "action"
|
||||
keysym: "F1"
|
||||
F2:
|
||||
outline: "action"
|
||||
keysym: "F2"
|
||||
F3:
|
||||
outline: "action"
|
||||
keysym: "F3"
|
||||
F4:
|
||||
outline: "action"
|
||||
keysym: "F4"
|
||||
F5:
|
||||
outline: "action"
|
||||
keysym: "F5"
|
||||
F6:
|
||||
outline: "action"
|
||||
keysym: "F6"
|
||||
F7:
|
||||
outline: "action"
|
||||
keysym: "F7"
|
||||
F8:
|
||||
outline: "action"
|
||||
keysym: "F8"
|
||||
F9:
|
||||
outline: "action"
|
||||
keysym: "F9"
|
||||
F10:
|
||||
outline: "action"
|
||||
keysym: "F10"
|
||||
F11:
|
||||
outline: "action"
|
||||
keysym: "F11"
|
||||
F12:
|
||||
outline: "action"
|
||||
keysym: "F12"
|
||||
Esc:
|
||||
outline: "action"
|
||||
keysym: "Escape"
|
||||
EscSmall:
|
||||
outline: "small"
|
||||
keysym: "Escape"
|
||||
label: "Esc"
|
||||
Tab:
|
||||
outline: "action"
|
||||
keysym: "Tab"
|
||||
TabSmall:
|
||||
outline: "small"
|
||||
keysym: "Tab"
|
||||
label: "Tab"
|
||||
Del:
|
||||
outline: "action"
|
||||
keysym: "Delete"
|
||||
Insert:
|
||||
outline: "action"
|
||||
keysym: "Insert"
|
||||
Menu:
|
||||
outline: "action"
|
||||
keysym: "Menu"
|
||||
Pause:
|
||||
outline: "action"
|
||||
keysym: "Pause"
|
||||
Break:
|
||||
outline: "action"
|
||||
keysym: "Break"
|
||||
Home:
|
||||
outline: "small"
|
||||
keysym: "Home"
|
||||
End:
|
||||
outline: "small"
|
||||
keysym: "End"
|
||||
PgUp:
|
||||
outline: "small"
|
||||
keysym: "Page_Up"
|
||||
PgDn:
|
||||
outline: "small"
|
||||
keysym: "Page_Down"
|
||||
"↑":
|
||||
outline: "small"
|
||||
keysym: "Up"
|
||||
"↓":
|
||||
outline: "small"
|
||||
keysym: "Down"
|
||||
"←":
|
||||
outline: "small"
|
||||
keysym: "Left"
|
||||
"→":
|
||||
outline: "small"
|
||||
keysym: "Right"
|
||||
Up:
|
||||
label: "↑"
|
||||
outline: "action"
|
||||
keysym: "Up"
|
||||
Left:
|
||||
label: "←"
|
||||
outline: "action"
|
||||
keysym: "Left"
|
||||
Down:
|
||||
label: "↓"
|
||||
outline: "action"
|
||||
keysym: "Down"
|
||||
Right:
|
||||
label: "→"
|
||||
outline: "action"
|
||||
keysym: "Right"
|
||||
Ctrl:
|
||||
modifier: "Control"
|
||||
outline: "small"
|
||||
label: "Ctrl"
|
||||
Alt:
|
||||
modifier: "Alt"
|
||||
outline: "small"
|
||||
label: "Alt"
|
||||
@ -3,7 +3,9 @@ Name=Squeekboard
|
||||
GenericName=On Screen Keyboard
|
||||
Comment=An on screen virtual keyboard
|
||||
Exec=@bindir@/squeekboard
|
||||
Icon=input-keyboard-symbolic
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
Categories=GTK;Utility;
|
||||
X-Phosh-UsesFeedback=true
|
||||
|
||||
@ -1,34 +1,22 @@
|
||||
/* Adwaita-dark style keyboard */
|
||||
sq_view {
|
||||
background-color: rgba(0, 0, 0, 255);
|
||||
color: #ffffff;
|
||||
font-family: cantarell, sans-serif;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
sq_view sq_button {
|
||||
color: #deddda;
|
||||
background: #464448;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #5e5c64;
|
||||
border-radius: 3px;
|
||||
margin: 4px 2px 4px 2px;
|
||||
}
|
||||
|
||||
sq_view.wide sq_button {
|
||||
margin: 1px 1px 1px 1px;
|
||||
}
|
||||
|
||||
sq_button:active {
|
||||
background: #747077;
|
||||
border-color: #96949d;
|
||||
}
|
||||
|
||||
sq_button.altline,
|
||||
sq_button.special,
|
||||
sq_button.wide {
|
||||
background: #2b292f;
|
||||
border-color: #3e3a44;
|
||||
}
|
||||
|
||||
sq_button.latched {
|
||||
@ -41,22 +29,12 @@ sq_button.locked {
|
||||
color: #1c71d8;
|
||||
}
|
||||
|
||||
sq_button.action {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
sq_button.small {
|
||||
font-size: 0.5em;
|
||||
}
|
||||
|
||||
#Return {
|
||||
background: #1c71d8;
|
||||
border-color: #1a5fb4;
|
||||
}
|
||||
|
||||
#Return:active {
|
||||
background: #1c71d8;
|
||||
border-color: #3584e4;
|
||||
}
|
||||
|
||||
@import url("resource:///sm/puri/squeekboard/common.css");
|
||||
|
||||
@ -1,65 +1,47 @@
|
||||
/* Keyboard style */
|
||||
sq_view {
|
||||
background-color: @theme_base_color; /*rgba(0, 0, 0, 255);*/
|
||||
color: @theme_text_color; /*#ffffff;*/
|
||||
font-family: cantarell, sans-serif;
|
||||
font-size: 25px;
|
||||
background-color: mix(@theme_base_color, @theme_fg_color, 0.1);
|
||||
box-shadow:inset 0 1px 0 0 mix(@borders, @theme_base_color, 0.8);
|
||||
}
|
||||
|
||||
sq_view sq_button {
|
||||
color: @theme_fg_color; /*#deddda;*/
|
||||
background: mix(@theme_bg_color, @theme_base_color, -0.5); /* #464448; */
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: @borders; /* #5e5c64;*/
|
||||
border-radius: 3px;
|
||||
margin: 4px 2px 4px 2px;
|
||||
sq_button {
|
||||
color: @theme_fg_color;
|
||||
background: alpha(@theme_fg_color, 0.07);
|
||||
box-shadow: 0 1px 0 0 rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
sq_view.wide sq_button {
|
||||
margin: 1px 1px 1px 1px;
|
||||
}
|
||||
|
||||
sq_button:active,
|
||||
sq_button.altline:active,
|
||||
sq_button.special:active,
|
||||
sq_button.wide:active {
|
||||
background: mix(@theme_bg_color, @theme_selected_bg_color, 0.4);/* #747077; */
|
||||
border-color: mix(@borders, @theme_selected_fg_color, 0.5);/* #96949d; */
|
||||
sq_button:active {
|
||||
background: alpha(@theme_fg_color, 0.11);
|
||||
}
|
||||
|
||||
sq_button.altline,
|
||||
sq_button.special,
|
||||
sq_button.wide {
|
||||
background: mix(@theme_bg_color, @theme_base_color, 0.5); /*#2b292f;*/
|
||||
border-color: @borders; /* #3e3a44; */
|
||||
sq_button.special {
|
||||
background: alpha(@theme_fg_color, 0.15);
|
||||
}
|
||||
|
||||
sq_button.altline:active,
|
||||
sq_button.special:active {
|
||||
background: alpha(@theme_fg_color, 0.2);
|
||||
}
|
||||
|
||||
sq_button.latched {
|
||||
background: @theme_fg_color; /*#ffffff;*/
|
||||
color: @theme_bg_color; /*#2b292f;*/
|
||||
background: alpha(@theme_fg_color, 0.2);
|
||||
color: alpha(@theme_fg_color, 0.8);
|
||||
}
|
||||
|
||||
sq_button.locked {
|
||||
background: @theme_fg_color; /*#ffffff;*/
|
||||
color: mix(@theme_selected_bg_color, @theme_bg_color, 0.4); /*#2b292f;*/
|
||||
}
|
||||
|
||||
sq_button.action {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
sq_button.small {
|
||||
font-size: 0.5em;
|
||||
background: alpha(@theme_fg_color, 0.5);
|
||||
color: @theme_base_color;
|
||||
}
|
||||
|
||||
#Return {
|
||||
background: @theme_selected_bg_color; /* #1c71d8; */
|
||||
border-color: @borders; /*#1a5fb4;*/
|
||||
background: @theme_selected_bg_color;
|
||||
color: @theme_selected_fg_color;
|
||||
}
|
||||
|
||||
#Return:active {
|
||||
background: mix(@theme_selected_bg_color, @theme_bg_color, 0.4); /*#1c71d8;*/
|
||||
border-color: @borders; /*#3584e4;*/
|
||||
background: mix(@theme_selected_bg_color, black, 0.2);
|
||||
color: mix(@theme_selected_fg_color, black, 0.2);
|
||||
}
|
||||
|
||||
@import url("resource:///sm/puri/squeekboard/common.css");
|
||||
|
||||
1
debian/cargo/config
vendored
1
debian/cargo/config
vendored
@ -9,4 +9,3 @@ replace-with = 'vendored-sources'
|
||||
|
||||
[source.vendored-sources]
|
||||
directory = '/usr/share/cargo/registry'
|
||||
|
||||
|
||||
225
debian/changelog
vendored
225
debian/changelog
vendored
@ -1,3 +1,228 @@
|
||||
squeekboard (1.20.0-1) experimental; urgency=medium
|
||||
|
||||
[ Dorota Czaplejewicz ]
|
||||
* state: Don't animate when force-hidden
|
||||
* build: Use Cargo.lock included with the repo by default
|
||||
* build: Update Cargo.lock.newer
|
||||
|
||||
[ Darren R ]
|
||||
* added US Dvorak Terminal
|
||||
|
||||
[ Efstathios Iosifidis ]
|
||||
* Add Greek translation
|
||||
|
||||
[ Goran Vidović ]
|
||||
* Add Croatian translation
|
||||
|
||||
[ Sebastian Krzyszkowiak ]
|
||||
* data: Set an icon in the desktop file
|
||||
* data: Indicate that Squeekboard provides haptic feedback
|
||||
|
||||
-- Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Sat, 03 Sep 2022 14:21:57 +0000
|
||||
|
||||
squeekboard (1.19.0-1) experimental; urgency=medium
|
||||
|
||||
[ Dorota Czaplejewicz ]
|
||||
* docs: Describe layouts
|
||||
* glib: Fix import
|
||||
* state: Record layout choice
|
||||
* doc: Describe how to control debugging mode
|
||||
* state: Include layout choice in visible outcome
|
||||
* state: Store layout override
|
||||
* state: Decide panel arrangement
|
||||
* state: Use dummy layout command
|
||||
* state: Use IM hint and purpose for layout selection
|
||||
* main: Dry-load layout in response to the layout command
|
||||
* state: Become the source of layout choice
|
||||
* cargo: Halt overzealous upgrader
|
||||
* ci: Use bookworm for online builds
|
||||
* build: Generate files before compiling sources
|
||||
* gtk: Persist panel state
|
||||
* build: Update Cargo.lock
|
||||
|
||||
[ Luke Luo ]
|
||||
* Add Chinese (China) translation
|
||||
|
||||
[ Éloi Rivard ]
|
||||
* Add French translation
|
||||
|
||||
[ Laurent Laffont ]
|
||||
* Add FR+Bépo layout
|
||||
|
||||
[ Bytez ]
|
||||
* Fixed missing characters in eschars view in italian layout.
|
||||
* Replaced foreign characters.
|
||||
|
||||
[ Aleksandr Melman ]
|
||||
* Add Russian translation
|
||||
|
||||
[ skysphr ]
|
||||
* Added Georgian layout
|
||||
|
||||
-- Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Wed, 06 Jul 2022 06:10:40 +0000
|
||||
|
||||
squeekboard (1.18.0-1) experimental; urgency=medium
|
||||
|
||||
[ Hugo Carvalho ]
|
||||
* Add Portuguese translation
|
||||
|
||||
[ Мирослав Николић ]
|
||||
* Add Serbian translation
|
||||
|
||||
[ William Wold ]
|
||||
* Do not reset pending state on zwp_input_method_v2.done
|
||||
|
||||
[ Balázs Úr ]
|
||||
* Add Hungarian translation
|
||||
|
||||
[ Emin Tufan Çetin ]
|
||||
* Add Turkish translation
|
||||
|
||||
[ Piotr Drąg ]
|
||||
* Add Polish translation
|
||||
|
||||
[ Pablo Correa Gómez ]
|
||||
* Add Spanish translation
|
||||
|
||||
[ Vittorio Monti ]
|
||||
* Add Italian translation
|
||||
|
||||
[ Dorota Czaplejewicz ]
|
||||
* build: Replace missing crates.io dependency with Purism-hosted one
|
||||
* ci: Allow failure on sid
|
||||
* build: Update clap on newer Debian
|
||||
* panel: Use scaling to set height
|
||||
* layouts: Add Greek Polytonic
|
||||
* debug: Add dbus interface to control debug prints
|
||||
* output: Store physical size
|
||||
* state: Derive panel size from physical click target size
|
||||
* Clean up size types
|
||||
* state: Add sizing unit test
|
||||
* layouts: Register gr_wide
|
||||
* CI: Build Rust code reference
|
||||
* CI: Add gitlab pages deployment
|
||||
* panel: Split away panel handling
|
||||
* cargo: Add zbus to newer Debian
|
||||
* docs: Update location
|
||||
* docs: Link to reference
|
||||
* docs: Make index more logical
|
||||
* Update Cargo lock
|
||||
|
||||
[ Sotiris Papadopoulos ]
|
||||
* Update gr.yaml to take advantage of more space per symbol. Creation of a wide variant...
|
||||
|
||||
[ Arnaud Ferraris ]
|
||||
* state: fix "wide mode" detection in portrait orientation
|
||||
* layout: allow stretching the layout by a small amount
|
||||
* layout: fix build on i386
|
||||
|
||||
[ Sungjoon Moon ]
|
||||
* Add Korean translation
|
||||
|
||||
[ Quentin PAGÈS ]
|
||||
* Add Occitan translation
|
||||
|
||||
[ Zurab Kargareteli ]
|
||||
* Add Georgian translation
|
||||
|
||||
-- Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Mon, 25 Apr 2022 13:12:36 +0000
|
||||
|
||||
squeekboard (1.17.0-1) experimental; urgency=medium
|
||||
|
||||
[ Dorota Czaplejewicz ]
|
||||
* docs: Detail the release process better
|
||||
* cleanup: Remove unused header lines
|
||||
* docstrings: Clarify the purpose of Receiver
|
||||
* wayland: Move initialization to the Rust side
|
||||
* ffi: Remove unnecessary pointers to InputMethod
|
||||
* outputs: Clean up for more Rust usage
|
||||
* outputs: Notify the state manager about changes
|
||||
* outputs: Handle removal
|
||||
* Save outputs state
|
||||
* Store preferred output
|
||||
* deps: Vendor assert_matches
|
||||
* Carry output information on visible command all the way to C
|
||||
* Don't reach for globals to choose output
|
||||
* visibility: Forward panel height information to window creation
|
||||
* outputs: Remove ui manager
|
||||
* output: Use new source of panel height information
|
||||
* panel: Apply a hard limit of 1/2 height
|
||||
* cargo: Update lockfile
|
||||
|
||||
[ Cosmin Humeniuc ]
|
||||
* Add Romanian layout
|
||||
|
||||
[ Sam Hewitt ]
|
||||
* data: Update stylesheet with upstream design
|
||||
|
||||
[ Tor ]
|
||||
* Make compatible with latest cargo deps
|
||||
|
||||
[ Luís Fernando Stürmer da Rosa ]
|
||||
* Update Brazilian Portuguese translation
|
||||
|
||||
[ Fran Dieguez ]
|
||||
* Add Galician translation
|
||||
|
||||
[ William Wold ]
|
||||
* Check if dbus handler is null before using
|
||||
|
||||
[ Yosef Or Boczko ]
|
||||
* Add Hebrew translation
|
||||
|
||||
-- Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Tue, 25 Jan 2022 11:24:04 +0000
|
||||
|
||||
squeekboard (1.16.0-1) experimental; urgency=medium
|
||||
|
||||
[ Dorota Czaplejewicz ]
|
||||
* build: Remove regex crate
|
||||
* ci: Use bookworm image
|
||||
* build: Pin transitive dependencies
|
||||
* cargo: Update Cargo.lock with pinned dependencies
|
||||
* CI: Use byzantium as the base
|
||||
* cargo: Bump dependencies
|
||||
|
||||
[ Guido Günther ]
|
||||
* po: Fix ui file name
|
||||
* entry: Mark as executable
|
||||
* entry: Only activate purpose timer when focused
|
||||
* entry: Add another input hint
|
||||
* Add entry test using GTK4
|
||||
|
||||
[ Rafael Fontenelle ]
|
||||
* Add Brazilian Portuguese translation
|
||||
|
||||
[ Yuri Chornoivan ]
|
||||
* Add Ukrainian translation
|
||||
|
||||
[ Luna Jernberg ]
|
||||
* Add Swedish Translation
|
||||
* Update sv.po
|
||||
* Update LINGUAS
|
||||
|
||||
[ Fabio Tomat ]
|
||||
* Add Friulian translation
|
||||
|
||||
[ Daniel Șerbănescu ]
|
||||
* Add Romanian translation
|
||||
|
||||
[ Matej Urbančič ]
|
||||
* Add Slovenian translation
|
||||
|
||||
[ Nathan Follens ]
|
||||
* Add Dutch translation
|
||||
|
||||
[ Jiri Grönroos ]
|
||||
* Add Finnish translation
|
||||
|
||||
[ Danial Behzadi ]
|
||||
* Add Persian translation
|
||||
|
||||
[ Jordi Mas i Hernandez ]
|
||||
* Add Catalan translation
|
||||
|
||||
-- Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Tue, 25 Jan 2022 11:24:04 +0000
|
||||
|
||||
squeekboard (1.15.0-1) experimental; urgency=medium
|
||||
|
||||
[ Khaled Eldoheiri ]
|
||||
|
||||
2
debian/control
vendored
2
debian/control
vendored
@ -20,10 +20,10 @@ Build-Depends:
|
||||
librust-gtk+v3-22-dev (>= 0.5),
|
||||
librust-gtk-sys-dev,
|
||||
librust-maplit-1-dev (>= 1.0),
|
||||
librust-regex-1-dev (>= 1.1),
|
||||
librust-serde-derive-1-dev (>= 1.0),
|
||||
librust-serde-yaml-0.8-dev (>= 0.8),
|
||||
librust-xkbcommon-0.4+wayland-dev (>= 0.4),
|
||||
librust-zbus-dev (>=1.0),
|
||||
libwayland-dev (>= 1.16),
|
||||
lsb-release,
|
||||
python3,
|
||||
|
||||
59
debian/control-newer
vendored
Normal file
59
debian/control-newer
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
Source: squeekboard
|
||||
Section: x11
|
||||
Priority: optional
|
||||
Maintainer: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm>
|
||||
Build-Depends:
|
||||
cargo,
|
||||
debhelper-compat (= 13),
|
||||
meson (>=0.51.0),
|
||||
ninja-build,
|
||||
pkg-config,
|
||||
libglib2.0-dev,
|
||||
libgnome-desktop-3-dev,
|
||||
libgtk-3-dev,
|
||||
libfeedback-dev,
|
||||
librust-bitflags-dev (>= 1.0),
|
||||
librust-clap-dev (>= 2.32),
|
||||
librust-gio+v2-58-dev,
|
||||
librust-glib+v2-58-dev,
|
||||
librust-glib-sys-dev,
|
||||
librust-gtk+v3-22-dev (>= 0.5),
|
||||
librust-gtk-sys-dev,
|
||||
librust-maplit-1-dev (>= 1.0),
|
||||
librust-serde-derive-1-dev (>= 1.0),
|
||||
librust-serde-yaml-0.8-dev (>= 0.8),
|
||||
librust-xkbcommon-0.4+wayland-dev (>= 0.4),
|
||||
librust-zbus-dev (>= 1.9),
|
||||
libwayland-dev (>= 1.16),
|
||||
lsb-release,
|
||||
python3,
|
||||
python3-ruamel.yaml,
|
||||
rustc,
|
||||
wayland-protocols (>= 1.14),
|
||||
Standards-Version: 4.1.3
|
||||
Homepage: https://source.puri.sm/Librem5/squeekboard
|
||||
|
||||
Package: squeekboard
|
||||
Architecture: linux-any
|
||||
Depends:
|
||||
# for the Adwaita-dark theme
|
||||
gnome-themes-extra-data,
|
||||
${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
Breaks:
|
||||
librem5-base (<< 24),
|
||||
Description: On-screen keyboard for Wayland
|
||||
Virtual keyboard supporting Wayland, built primarily for the Librem 5 phone.
|
||||
|
||||
Package: squeekboard-devel
|
||||
Architecture: linux-any
|
||||
Depends:
|
||||
python3,
|
||||
python3-gi,
|
||||
${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
Description: Resources for making Squeekboard layouts
|
||||
Tools for creating and testing Squeekboard layouts:
|
||||
.
|
||||
* squeekboard-entry
|
||||
* squeekboard-test-layout
|
||||
8
debian/rules
vendored
8
debian/rules
vendored
@ -25,10 +25,10 @@ export RUSTFLAGS = --remap-path-prefix=$(CURDIR)=/remap-pwd $(xgot)
|
||||
|
||||
|
||||
distrel := $(shell lsb_release --codename --short)
|
||||
ifneq (,$(filter $(distrel),buster amber))
|
||||
legacy = true
|
||||
ifneq (,$(filter $(distrel),sid))
|
||||
newer = true
|
||||
else
|
||||
legacy = false
|
||||
newer = false
|
||||
endif
|
||||
|
||||
%:
|
||||
@ -38,6 +38,6 @@ endif
|
||||
# causing Cargo to refuse to build with a crates.io copy
|
||||
override_dh_auto_configure:
|
||||
[ ! -f Cargo.lock ] || rm Cargo.lock
|
||||
dh_auto_configure -- -Dlegacy=$(legacy)
|
||||
dh_auto_configure -- -Dnewer=$(newer) -Donline=false
|
||||
|
||||
override_dh_autoreconf:
|
||||
|
||||
@ -90,6 +90,14 @@ Layouts can be selected using the GNOME Settings application.
|
||||
$ gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('xkb', 'de')]"
|
||||
```
|
||||
|
||||
### Debugging mode
|
||||
|
||||
Squeekboard prints some information on standard output by default. To get deep debugging information, it can also print all changes in (some of) its internal state. Those logs are most useful when reporting hard to catch issues, and can be enabled using the following command:
|
||||
|
||||
```
|
||||
busctl set-property --user sm.puri.SqueekDebug /sm/puri/SqueekDebug sm.puri.SqueekDebug Enabled b true
|
||||
```
|
||||
|
||||
### Environment Variables
|
||||
|
||||
Besides the environment variables supported by GTK and [GLib](https://docs.gtk.org/glib/running.html) applications
|
||||
@ -102,6 +110,17 @@ contain a comma separated list of:
|
||||
Coding
|
||||
------
|
||||
|
||||
### Reference docs
|
||||
|
||||
Reference documentation can be generated using:
|
||||
|
||||
```
|
||||
cd squeekboard_build/
|
||||
../squeekboard_source/cargo.sh doc --no-deps --document-private-items
|
||||
```
|
||||
|
||||
as well as found [online](https://world.pages.gitlab.gnome.org/Phosh/squeekboard/doc/rs/).
|
||||
|
||||
### Project structure
|
||||
|
||||
Rust modules should be split into 2 categories: libraries, and user interface. They differ in the way they do error handling.
|
||||
@ -205,6 +224,7 @@ While the file is not actually used, it's a good idea to save the config in case
|
||||
|
||||
```
|
||||
cd squeekboard-build
|
||||
.../squeekboard-source/cargo.sh update
|
||||
ninja test
|
||||
cp ./Cargo.lock .../squeekboard-source
|
||||
```
|
||||
|
||||
15
doc/index.md
15
doc/index.md
@ -1,13 +1,6 @@
|
||||
Welcome to squeekboard's documentation!
|
||||
=======================================
|
||||
|
||||
Contents
|
||||
--------
|
||||
|
||||
* [Tutorial](tutorial.md)
|
||||
* [Contributing](hacking.md)
|
||||
* [Switching views](views.md)
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
@ -18,9 +11,9 @@ Layouts
|
||||
|
||||
Squeekboard allows user-provided keyboard layouts. They can be created without recompiling the keyboard code. The [tutorial](tutorial.md) explains the process in detail.
|
||||
|
||||
Layouts are created using a text-based format, based on YAML.
|
||||
Layouts are created using a [text-based format, based on YAML](layouts.md).
|
||||
|
||||
TODO: Provide a description of the format.
|
||||
### Views
|
||||
|
||||
Squeekboard layouts are separated into *views* and use a *room metaphor* to [switch views](views.md).
|
||||
|
||||
@ -28,3 +21,7 @@ Contributions
|
||||
-------------
|
||||
|
||||
Anyone is free to modify *squeekboard*. See the [contributing document](hacking.md).
|
||||
|
||||
### Code documentation
|
||||
|
||||
To expose the structure of Squeekboard in detail, there's a [code reference](doc/rs).
|
||||
121
doc/layouts.md
Normal file
121
doc/layouts.md
Normal file
@ -0,0 +1,121 @@
|
||||
Layouts
|
||||
=====
|
||||
|
||||
Squeekboard is composed of multiple layouts, several for each language, multiplied by each hint.
|
||||
|
||||
Layouts live in the "keyboards" directory.
|
||||
|
||||
Hints
|
||||
-------
|
||||
|
||||
The currently supported hints are: default, "email", "emoji", "number', "pin", "terminal", and "url".
|
||||
|
||||
Each directory in "keyboards" is named after a hint, with the "keyboards" directory itself taking the role of default.
|
||||
|
||||
Languages/scripts
|
||||
-----------------------
|
||||
|
||||
Each hint directory contains multiple layout files. A single language will be composed of multiple files, with names starting with the same text. The language names are taken from iso639-3. An example is "gr".
|
||||
|
||||
After the language name optionally comes a "+" and an indication of the variant. For example, "it+fur".
|
||||
|
||||
Squeekboard will look for those based on the currently selected layout in Gnome Control Center.
|
||||
|
||||
Then, there's an optional part "_wide", which Squeekboard will try to use if the current display is rather wide. Example: "us+colemak_wide" or "us_wide".
|
||||
|
||||
Finally, the file name ends with ".yaml", e.g. "jp+kana_wide.yaml".
|
||||
|
||||
Together with hint information, this gives a complete path to the layout like this: "keyboards/terminal/fr_wide.yaml" or "keyboards/cz+qwerty.yaml".
|
||||
|
||||
Layout syntax
|
||||
------------------
|
||||
|
||||
The layout file follows the YAML syntax, with specific meanings given to sections.
|
||||
|
||||
### Outlines
|
||||
|
||||
The "outlines" dictionary controls the widths and heights of buttons.
|
||||
|
||||
```
|
||||
outlines:
|
||||
default: { width: 32, height: 52 }
|
||||
```
|
||||
The width and height numbers are not in pixels, but rather they are proportionally scaled to fit the panel size.
|
||||
|
||||
There may be any number of outlines, but there are some special names:
|
||||
- "default" applies to every button unless explicitly changed. It should be used for buttons that emit text
|
||||
- "altline", "wide" have own color scheme, should be used for buttons which cause view changes
|
||||
- "special" has own color scheme, to be used for confirmations like enter.
|
||||
|
||||
### Views
|
||||
|
||||
The "views" dictionary contains the actual views and positions of buttons.
|
||||
|
||||
```
|
||||
views:
|
||||
base:
|
||||
- "q w e r t y u i o p å"
|
||||
```
|
||||
|
||||
Squeekboard's layouts consist of multiple views, of which only one is visible at a time. Different views may contain different or the same buttons, more or fewer buttons, but each layout is independent. They are *not* shift levels – there is no concept of "shift" in Squeekboard. View selection is also not dependent on modifiers.
|
||||
|
||||
There is only one special view "base". Views and view switching are described in detail in the [views](views.md) document.
|
||||
|
||||
Views in Squeekboard are based on rows. The first row comes near the top of the panel, the next one below, and so on.
|
||||
|
||||
```
|
||||
- "Q W E R T Y U I O P Å"
|
||||
- "upper z x c v b n m BackSpace"
|
||||
```
|
||||
|
||||
Each row is a single string, and button names are separated by spaces. In left-to-right languages, the panel will be laid out just like the view code. CAUTION: buttons are placed on the panel left-to-right, starting from the earliest position in the string. That may not display great in your text editor when you use right-to-left characters as button names.
|
||||
|
||||
#### Button names in rows
|
||||
|
||||
Unicode characters are supported in the row string, so it's easy to use the correct name for most of them. However, the layout code is still YAML, which excludes certain characters: the space " ", the backslash "\", the double quote `"`. Those must use a replacement name.
|
||||
|
||||
Similarly, buttons that do not emit characters must have some names.
|
||||
|
||||
### Buttons
|
||||
|
||||
The buttons section describes what the button looks like and what it does.
|
||||
|
||||
```
|
||||
BackSpace:
|
||||
outline: altline
|
||||
icon: "edit-clear-symbolic"
|
||||
action: erase
|
||||
```
|
||||
|
||||
Each entry in the "buttons" dictionary describes some button already present in one of the "views" rows. In the above example, it's "BackSpace".
|
||||
|
||||
The button description can have a number of components, each optional. For details, see
|
||||
|
||||
- "outline" selects which entry from the "outlines" section to use to draw this button,
|
||||
- "label" is what should be displayed on the button, if its name is unsuitable,
|
||||
- "icon" is the name of the svg icon to use instead of a label (icons are builtin, see the "data/icons" directory),
|
||||
- "text" is the text to submit when the button is clicked – if the name of the button is not suitable,
|
||||
- "keysym" is the emulated keyboard keysym to send instead of sending text. Its use is discouraged: Squeekboard will automatically send keysyms if it detects that the receiving application does not accept text.
|
||||
- "modifier" makes the button set an emulated keyboard modifier. The use of this is discouraged, and never needed for entering text.
|
||||
- "action" sets aside the button for special actions like view switching
|
||||
|
||||
#### Action
|
||||
|
||||
```
|
||||
action:
|
||||
set_view: "numbers"
|
||||
```
|
||||
|
||||
The "action" property has multiple forms.
|
||||
|
||||
- "erase" will erase the position behind the cursor,
|
||||
- "show_preferences" will open the language selection popup,
|
||||
- "set_view" simply switches to a view,
|
||||
- "lock_view" switches to a view for a moment.
|
||||
|
||||
The two switching modes are better described in the [views](views.md) document.
|
||||
|
||||
Sources
|
||||
----------
|
||||
|
||||
The sources, where all this is documented and up to date are in "src/data/parsing.rs". The reference documentation for the `rs::data::parsing::Layout` structure is the main place to look at.
|
||||
@ -9,14 +9,12 @@ So at least I will try to start writing a short how-to here and edit this post a
|
||||
|
||||
## Creating a new layout
|
||||
|
||||
Creating a layout is easy. You don't need to recompile things, just edit and test. It's easiest to start with an existing layout.
|
||||
Creating a layout is easy. You don't need to recompile things, just edit and test. It's easiest to start with an existing layout, with the [layouts](layouts.md) documentation in hand.
|
||||
|
||||
### Get one of the existing keyboard layouts
|
||||
|
||||
* You can get one of the keyboards from the squeekboard git repository : [https://source.puri.sm/Librem5/squeekboard](https://source.puri.sm/Librem5/squeekboard)
|
||||
* The keyboard layouts are located in the subdirectory [`data/keyboards/`](https://source.puri.sm/Librem5/squeekboard/-/tree/master/data/keyboards) in the `.yaml` files
|
||||
* Take a look and try to understand them :slight_smile:
|
||||
|
||||
|
||||
### Creating the keyboard layout
|
||||
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
|
||||
#include "eekboard/eekboard-context-service.h"
|
||||
#include "src/layout.h"
|
||||
#include "src/popover.h"
|
||||
#include "src/submission.h"
|
||||
|
||||
#define LIBFEEDBACK_USE_UNSTABLE_API
|
||||
@ -48,6 +49,8 @@ typedef struct _EekGtkKeyboardPrivate
|
||||
struct render_geometry render_geometry; // mutable
|
||||
|
||||
EekboardContextService *eekboard_context; // unowned reference
|
||||
struct squeek_popover *popover; // shared reference
|
||||
struct squeek_state_manager *state_manager; // shared reference
|
||||
struct submission *submission; // unowned reference
|
||||
|
||||
struct squeek_layout_state *layout; // unowned
|
||||
@ -55,6 +58,8 @@ typedef struct _EekGtkKeyboardPrivate
|
||||
|
||||
GdkEventSequence *sequence; // unowned reference
|
||||
LfbEvent *event;
|
||||
|
||||
gulong kb_signal;
|
||||
} EekGtkKeyboardPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (EekGtkKeyboard, eek_gtk_keyboard, GTK_TYPE_DRAWING_AREA)
|
||||
@ -116,15 +121,6 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Units of virtual pixels size
|
||||
static enum squeek_arrangement_kind get_type(uint32_t width, uint32_t height) {
|
||||
(void)height;
|
||||
if (width < 540) {
|
||||
return ARRANGEMENT_KIND_BASE;
|
||||
}
|
||||
return ARRANGEMENT_KIND_WIDE;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_gtk_keyboard_real_size_allocate (GtkWidget *self,
|
||||
GtkAllocation *allocation)
|
||||
@ -132,15 +128,6 @@ eek_gtk_keyboard_real_size_allocate (GtkWidget *self,
|
||||
EekGtkKeyboard *keyboard = EEK_GTK_KEYBOARD (self);
|
||||
EekGtkKeyboardPrivate *priv =
|
||||
eek_gtk_keyboard_get_instance_private (keyboard);
|
||||
// check if the change would switch types
|
||||
enum squeek_arrangement_kind new_type = get_type(
|
||||
(uint32_t)(allocation->width - allocation->x),
|
||||
(uint32_t)(allocation->height - allocation->y));
|
||||
if (priv->layout->arrangement != new_type) {
|
||||
priv->layout->arrangement = new_type;
|
||||
uint32_t time = gdk_event_get_time(NULL);
|
||||
eekboard_context_service_use_layout(priv->eekboard_context, priv->layout, time);
|
||||
}
|
||||
|
||||
if (priv->renderer) {
|
||||
set_allocation_size (keyboard, priv->keyboard->layout,
|
||||
@ -156,6 +143,7 @@ on_event_triggered (LfbEvent *event,
|
||||
GAsyncResult *res,
|
||||
gpointer unused)
|
||||
{
|
||||
(void)unused;
|
||||
g_autoptr (GError) err = NULL;
|
||||
|
||||
if (!lfb_event_trigger_feedback_finish (event, res, &err)) {
|
||||
@ -186,7 +174,7 @@ static void drag(EekGtkKeyboard *self,
|
||||
squeek_layout_drag(eekboard_context_service_get_keyboard(priv->eekboard_context)->layout,
|
||||
priv->submission,
|
||||
x, y, priv->render_geometry.widget_to_layout, time,
|
||||
priv->eekboard_context, self);
|
||||
priv->popover, priv->state_manager, self);
|
||||
}
|
||||
|
||||
static void release(EekGtkKeyboard *self, guint32 time)
|
||||
@ -197,7 +185,7 @@ static void release(EekGtkKeyboard *self, guint32 time)
|
||||
}
|
||||
squeek_layout_release(eekboard_context_service_get_keyboard(priv->eekboard_context)->layout,
|
||||
priv->submission, priv->render_geometry.widget_to_layout, time,
|
||||
priv->eekboard_context, self);
|
||||
priv->popover, priv->state_manager, self);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -307,12 +295,19 @@ eek_gtk_keyboard_set_property (GObject *object,
|
||||
}
|
||||
}
|
||||
|
||||
// This may actually get called multiple times in a row
|
||||
// if both a parent object and its parent get destroyed
|
||||
static void
|
||||
eek_gtk_keyboard_dispose (GObject *object)
|
||||
{
|
||||
EekGtkKeyboard *self = EEK_GTK_KEYBOARD (object);
|
||||
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
|
||||
|
||||
if (priv->kb_signal != 0) {
|
||||
g_signal_handler_disconnect(priv->eekboard_context, priv->kb_signal);
|
||||
priv->kb_signal = 0;
|
||||
}
|
||||
|
||||
if (priv->renderer) {
|
||||
eek_renderer_free(priv->renderer);
|
||||
priv->renderer = NULL;
|
||||
@ -397,13 +392,15 @@ on_notify_keyboard (GObject *object,
|
||||
GtkWidget *
|
||||
eek_gtk_keyboard_new (EekboardContextService *eekservice,
|
||||
struct submission *submission,
|
||||
struct squeek_layout_state *layout)
|
||||
struct squeek_state_manager *state_manager,
|
||||
struct squeek_popover *popover)
|
||||
{
|
||||
EekGtkKeyboard *ret = EEK_GTK_KEYBOARD(g_object_new (EEK_TYPE_GTK_KEYBOARD, NULL));
|
||||
EekGtkKeyboardPrivate *priv = (EekGtkKeyboardPrivate*)eek_gtk_keyboard_get_instance_private (ret);
|
||||
priv->popover = popover;
|
||||
priv->eekboard_context = eekservice;
|
||||
priv->submission = submission;
|
||||
priv->layout = layout;
|
||||
priv->state_manager = state_manager;
|
||||
priv->renderer = NULL;
|
||||
// This should really be done on initialization.
|
||||
// Before the widget is allocated,
|
||||
@ -418,12 +415,13 @@ eek_gtk_keyboard_new (EekboardContextService *eekservice,
|
||||
.widget_to_layout = {
|
||||
.origin_x = 0,
|
||||
.origin_y = 0,
|
||||
.scale = 1,
|
||||
.scale_x = 1,
|
||||
.scale_y = 1,
|
||||
},
|
||||
};
|
||||
priv->render_geometry = initial_geometry;
|
||||
|
||||
g_signal_connect (eekservice,
|
||||
priv->kb_signal = g_signal_connect (eekservice,
|
||||
"notify::keyboard",
|
||||
G_CALLBACK(on_notify_keyboard),
|
||||
ret);
|
||||
|
||||
@ -30,6 +30,8 @@
|
||||
|
||||
#include "eek/eek-renderer.h"
|
||||
#include "eek/eek-types.h"
|
||||
#include "src/main.h"
|
||||
#include "src/popover.h"
|
||||
|
||||
struct submission;
|
||||
struct squeek_layout_state;
|
||||
@ -48,7 +50,7 @@ struct _EekGtkKeyboardClass
|
||||
gpointer pdummy[24];
|
||||
};
|
||||
|
||||
GtkWidget *eek_gtk_keyboard_new (EekboardContextService *eekservice, struct submission *submission, struct squeek_layout_state *layout);
|
||||
GtkWidget *eek_gtk_keyboard_new (EekboardContextService *eekservice, struct submission *submission, struct squeek_state_manager *state_manager, struct squeek_popover *popover);
|
||||
void eek_gtk_keyboard_emit_feedback (EekGtkKeyboard *self);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@ -219,7 +219,7 @@ eek_renderer_render_keyboard (EekRenderer *self,
|
||||
|
||||
cairo_save(cr);
|
||||
cairo_translate (cr, geometry.widget_to_layout.origin_x, geometry.widget_to_layout.origin_y);
|
||||
cairo_scale (cr, geometry.widget_to_layout.scale, geometry.widget_to_layout.scale);
|
||||
cairo_scale (cr, geometry.widget_to_layout.scale_x, geometry.widget_to_layout.scale_y);
|
||||
|
||||
squeek_draw_layout_base_view(keyboard->layout, self, cr);
|
||||
squeek_layout_draw_all_changed(keyboard->layout, self, cr, submission);
|
||||
|
||||
@ -87,7 +87,8 @@ void eek_bounds_free (EekBounds *bounds);
|
||||
struct transformation {
|
||||
gdouble origin_x;
|
||||
gdouble origin_y;
|
||||
gdouble scale;
|
||||
gdouble scale_x;
|
||||
gdouble scale_y;
|
||||
};
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@ -55,15 +55,15 @@ static guint signals[LAST_SIGNAL] = { 0, };
|
||||
*/
|
||||
struct _EekboardContextService {
|
||||
GObject parent;
|
||||
struct squeek_layout_state *layout; // Unowned
|
||||
struct squeek_state_manager *state_manager; // shared reference
|
||||
|
||||
LevelKeyboard *keyboard; // currently used keyboard
|
||||
GSettings *settings; // Owned reference
|
||||
|
||||
// Maybe TODO: it's used only for fetching layout type.
|
||||
// Maybe let UI push the type to this structure?
|
||||
ServerContextService *ui; // unowned reference
|
||||
/// Needed for keymap changes after keyboard updates
|
||||
/// Needed for keymap changes after keyboard updates.
|
||||
// TODO: can the main loop access submission to change the key maps instead?
|
||||
// This should probably land together with passing buttons through state,
|
||||
// to avoid race conditions between setting buttons and key maps.
|
||||
struct submission *submission; // unowned
|
||||
};
|
||||
|
||||
@ -126,24 +126,7 @@ settings_get_layout(GSettings *settings, char **type, char **layout)
|
||||
g_variant_unref(inputs);
|
||||
}
|
||||
|
||||
void
|
||||
eekboard_context_service_use_layout(EekboardContextService *context, struct squeek_layout_state *state, uint32_t timestamp) {
|
||||
gchar *layout_name = state->layout_name;
|
||||
gchar *overlay_name = state->overlay_name;
|
||||
|
||||
// try to get the best keyboard layout
|
||||
if (layout_name == NULL) {
|
||||
layout_name = "us";
|
||||
}
|
||||
|
||||
// overlay is "Normal" for most layouts, we will only look for "terminal" in rust code.
|
||||
// for now just avoid passing a null pointer
|
||||
if (overlay_name == NULL) {
|
||||
overlay_name = ""; // fallback to Normal
|
||||
}
|
||||
|
||||
// generic part follows
|
||||
struct squeek_layout *layout = squeek_load_layout(layout_name, state->arrangement, state->purpose, overlay_name);
|
||||
void eekboard_context_service_set_layout(EekboardContextService *context, struct squeek_layout *layout, uint32_t timestamp) {
|
||||
LevelKeyboard *keyboard = level_keyboard_new(layout);
|
||||
// set as current
|
||||
LevelKeyboard *previous_keyboard = context->keyboard;
|
||||
@ -169,17 +152,7 @@ static void eekboard_context_service_update_settings_layout(EekboardContextServi
|
||||
settings_get_layout(context->settings,
|
||||
&keyboard_type, &keyboard_layout);
|
||||
|
||||
if (g_strcmp0(context->layout->layout_name, keyboard_layout) != 0 || context->layout->overlay_name) {
|
||||
g_free(context->layout->overlay_name);
|
||||
context->layout->overlay_name = NULL;
|
||||
if (keyboard_layout) {
|
||||
g_free(context->layout->layout_name);
|
||||
context->layout->layout_name = g_strdup(keyboard_layout);
|
||||
}
|
||||
// This must actually update the UI.
|
||||
uint32_t time = gdk_event_get_time(NULL);
|
||||
eekboard_context_service_use_layout(context, context->layout, time);
|
||||
}
|
||||
squeek_state_send_layout_set(context->state_manager, keyboard_layout, keyboard_type, gdk_event_get_time(NULL));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -297,50 +270,18 @@ eekboard_context_service_get_keyboard (EekboardContextService *context)
|
||||
return context->keyboard;
|
||||
}
|
||||
|
||||
void eekboard_context_service_set_hint_purpose(EekboardContextService *context,
|
||||
uint32_t hint, uint32_t purpose)
|
||||
{
|
||||
if (context->layout->hint != hint || context->layout->purpose != purpose) {
|
||||
context->layout->hint = hint;
|
||||
context->layout->purpose = purpose;
|
||||
uint32_t time = gdk_event_get_time(NULL);
|
||||
eekboard_context_service_use_layout(context, context->layout, time);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
eekboard_context_service_set_overlay(EekboardContextService *context, const char* name) {
|
||||
if (g_strcmp0(context->layout->overlay_name, name)) {
|
||||
g_free(context->layout->overlay_name);
|
||||
context->layout->overlay_name = g_strdup(name);
|
||||
uint32_t time = gdk_event_get_time(NULL);
|
||||
eekboard_context_service_use_layout(context, context->layout, time);
|
||||
}
|
||||
}
|
||||
|
||||
const char*
|
||||
eekboard_context_service_get_overlay(EekboardContextService *context) {
|
||||
return context->layout->overlay_name;
|
||||
}
|
||||
|
||||
EekboardContextService *eekboard_context_service_new(struct squeek_layout_state *state)
|
||||
EekboardContextService *eekboard_context_service_new(struct squeek_state_manager *state_manager)
|
||||
{
|
||||
EekboardContextService *context = g_object_new (EEKBOARD_TYPE_CONTEXT_SERVICE, NULL);
|
||||
context->layout = state;
|
||||
context->state_manager = state_manager;
|
||||
eekboard_context_service_update_settings_layout(context);
|
||||
uint32_t time = gdk_event_get_time(NULL);
|
||||
eekboard_context_service_use_layout(context, context->layout, time);
|
||||
return context;
|
||||
}
|
||||
|
||||
void eekboard_context_service_set_submission(EekboardContextService *context, struct submission *submission) {
|
||||
context->submission = submission;
|
||||
if (context->submission) {
|
||||
if (context->submission && context->keyboard) {
|
||||
uint32_t time = gdk_event_get_time(NULL);
|
||||
submission_use_layout(context->submission, context->keyboard->layout, time);
|
||||
}
|
||||
}
|
||||
|
||||
void eekboard_context_service_set_ui(EekboardContextService *context, ServerContextService *ui) {
|
||||
context->ui = ui;
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
|
||||
#include "src/submission.h"
|
||||
#include "src/layout.h"
|
||||
#include "src/main.h"
|
||||
|
||||
#include "virtual-keyboard-unstable-v1-client-protocol.h"
|
||||
#include "text-input-unstable-v3-client-protocol.h"
|
||||
@ -37,19 +38,13 @@ G_BEGIN_DECLS
|
||||
|
||||
G_DECLARE_FINAL_TYPE(EekboardContextService, eekboard_context_service, EEKBOARD, CONTEXT_SERVICE, GObject)
|
||||
|
||||
EekboardContextService *eekboard_context_service_new(struct squeek_layout_state *state);
|
||||
EekboardContextService *eekboard_context_service_new(struct squeek_state_manager *state_manager);
|
||||
void eekboard_context_service_set_submission(EekboardContextService *context, struct submission *submission);
|
||||
void eekboard_context_service_set_ui(EekboardContextService *context, ServerContextService *ui);
|
||||
void eekboard_context_service_destroy (EekboardContextService *context);
|
||||
LevelKeyboard *eekboard_context_service_get_keyboard(EekboardContextService *context);
|
||||
|
||||
void eekboard_context_service_set_keymap(EekboardContextService *context,
|
||||
const LevelKeyboard *keyboard);
|
||||
|
||||
void eekboard_context_service_set_hint_purpose(EekboardContextService *context,
|
||||
uint32_t hint,
|
||||
uint32_t purpose);
|
||||
void
|
||||
eekboard_context_service_use_layout(EekboardContextService *context, struct squeek_layout_state *layout, uint32_t timestamp);
|
||||
G_END_DECLS
|
||||
#endif /* EEKBOARD_CONTEXT_SERVICE_H */
|
||||
|
||||
36
meson.build
36
meson.build
@ -1,7 +1,7 @@
|
||||
project(
|
||||
'squeekboard',
|
||||
'c', 'rust',
|
||||
version: '1.15.0',
|
||||
version: '1.20.0',
|
||||
license: 'GPLv3',
|
||||
meson_version: '>=0.51.0',
|
||||
default_options: [
|
||||
@ -96,22 +96,42 @@ cargo_toml_base = configure_file(
|
||||
configuration: path_data,
|
||||
)
|
||||
|
||||
cargo_patch = []
|
||||
|
||||
cargo_deps = files('Cargo.deps')
|
||||
|
||||
if get_option('legacy') == true
|
||||
cargo_build_flags += ['--features', 'gtk_v0_5,gio_v0_5,rustc_less_1_36']
|
||||
cargo_deps = files('Cargo.deps.legacy')
|
||||
if get_option('newer') == true
|
||||
cargo_build_flags += ['--features', 'glib_v0_14']
|
||||
cargo_deps = files('Cargo.deps.newer')
|
||||
cargo_lock = files('Cargo.lock.newer')
|
||||
else
|
||||
cargo_deps = files('Cargo.deps')
|
||||
cargo_lock = []
|
||||
if get_option('online') == true
|
||||
cargo_patch = [files('Cargo.deps.online')]
|
||||
if get_option('reset_lock') == true
|
||||
cargo_lock = files('Cargo.lock')
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
cat = find_program('cat')
|
||||
cargo_toml = custom_target(
|
||||
'Cargo.toml',
|
||||
output: 'Cargo.toml',
|
||||
command: [cat, cargo_toml_base, cargo_deps],
|
||||
command: [cat, cargo_toml_base, cargo_deps] + cargo_patch,
|
||||
capture: true,
|
||||
)
|
||||
|
||||
cargo_deps = [cargo_toml]
|
||||
if get_option('online') == true and get_option('reset_lock') == true
|
||||
cargo_lock = custom_target(
|
||||
'Cargo.lock',
|
||||
output: 'Cargo.lock',
|
||||
command: [cat, cargo_lock],
|
||||
capture: true,
|
||||
)
|
||||
cargo_deps += [cargo_lock]
|
||||
endif
|
||||
|
||||
dep_cargo = find_program('cargo')
|
||||
cargo_script = find_program('cargo.sh')
|
||||
cargo_build = find_program('cargo_build.py')
|
||||
|
||||
@ -7,10 +7,18 @@ option('tests',
|
||||
type: 'boolean', value: true,
|
||||
description: 'Whether to compile unit tests')
|
||||
|
||||
option('legacy',
|
||||
option('newer',
|
||||
type: 'boolean', value: false,
|
||||
description: 'Build with Deban Buster versions of dependencies')
|
||||
description: 'Build with dependencies newer than those of Byzantium')
|
||||
|
||||
option('online',
|
||||
type: 'boolean', value: true,
|
||||
description: 'Pull packages from the internet while building, as opposed to a local regstry.')
|
||||
|
||||
option('reset_lock',
|
||||
type: 'boolean', value: true,
|
||||
description: 'Resets Cargo.lock to the one found in the source repo. Does not affect builds with online == false.')
|
||||
|
||||
option('strict',
|
||||
type: 'boolean', value: true,
|
||||
description: 'Turn more warnings into errors')
|
||||
|
||||
27
po/LINGUAS
27
po/LINGUAS
@ -1 +1,28 @@
|
||||
ca
|
||||
de
|
||||
el
|
||||
es
|
||||
fa
|
||||
fi
|
||||
fr
|
||||
fur
|
||||
gl
|
||||
he
|
||||
hr
|
||||
hu
|
||||
it
|
||||
ka
|
||||
ko
|
||||
nl
|
||||
oc
|
||||
pl
|
||||
pt
|
||||
pt_BR
|
||||
ro
|
||||
ru
|
||||
sl
|
||||
sr
|
||||
tr
|
||||
uk
|
||||
sv
|
||||
zh_CN
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
data/popup.ui
|
||||
data/popover.ui
|
||||
data/sm.puri.Squeekboard.desktop.in.in
|
||||
|
||||
45
po/ca.po
Normal file
45
po/ca.po
Normal file
@ -0,0 +1,45 @@
|
||||
# Catalan translation for squeekboard.
|
||||
# Copyright (C) 2022 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# maite <maite.guix@gmail.com>, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-01-11 14:31+0000\n"
|
||||
"PO-Revision-Date: 2022-01-20 10:53+0100\n"
|
||||
"Last-Translator: maite guix <maite.guix@me.com>\n"
|
||||
"Language-Team: Catalan <gnome@llistes.softcatala.org>\n"
|
||||
"Language: ca\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Configuració del teclat"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Teclat virtual"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Teclat en pantalla"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Un teclat virtual en pantalla"
|
||||
46
po/el.po
Normal file
46
po/el.po
Normal file
@ -0,0 +1,46 @@
|
||||
# Greek translation for squeekboard.
|
||||
# Copyright (C) 2022 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Efstathios Iosifidis <eiosifidis@gnome.org>, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-07-11 06:54+0000\n"
|
||||
"PO-Revision-Date: 2022-07-11 23:11+0300\n"
|
||||
"Last-Translator: Efstathios Iosifidis <eiosifidis@gnome.org>\n"
|
||||
"Language-Team: Greek <gnome-el-list@gnome.org>\n"
|
||||
"Language: el\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 3.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Τερματικό"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Ρυθμίσεις πληκτρολογίου"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Πληκτρολόγιο οθόνης"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Εικονικό πληκτρολόγιο οθόνης"
|
||||
47
po/es.po
Normal file
47
po/es.po
Normal file
@ -0,0 +1,47 @@
|
||||
# Spanish translation for squeekboard.
|
||||
# Copyright (C) 2022 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
# Pablo Correa Gómez <ablocorrea@hotmail.com>, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-03-20 13:14+0000\n"
|
||||
"PO-Revision-Date: 2022-03-22 21:33+0100\n"
|
||||
"Last-Translator: Pablo Correa Gómez <ablocorrea@hotmail.com>\n"
|
||||
"Language-Team: Spanish; Castilian <gnome-es-list@gnome.org>\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
"X-Generator: Gtranslator 3.36.0\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Ajustes de teclado"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Teclado en pantala"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Un teclado virtual en pantalla"
|
||||
45
po/fa.po
Normal file
45
po/fa.po
Normal file
@ -0,0 +1,45 @@
|
||||
# Persian translation for squeekboard.
|
||||
# Copyright (C) 2022 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Danial Behzadi <dani.behzi@ubuntu.com>, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2021-12-26 15:15+0000\n"
|
||||
"PO-Revision-Date: 2022-01-11 18:01+0330\n"
|
||||
"Language-Team: Persian <fa@li.org>\n"
|
||||
"Language: fa\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Last-Translator: Danial Behzadi <dani.behzi@ubuntu.com>\n"
|
||||
"X-Generator: Poedit 3.0\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "شکلک"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "پایانه"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "تنظیمات صفحهکلید"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "اسکوییکبرد"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "صفحهکلید لمسی"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "یک صفحهٔ کلید لمسی مجازی"
|
||||
46
po/fi.po
Normal file
46
po/fi.po
Normal file
@ -0,0 +1,46 @@
|
||||
# Finnish translation for squeekboard.
|
||||
# Copyright (C) 2021 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Jiri Grönroos <jiri.gronroos@iki.fi>, 2021.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2021-12-25 13:55+0000\n"
|
||||
"PO-Revision-Date: 2021-12-26 17:15+0200\n"
|
||||
"Last-Translator: Jiri Grönroos <jiri.gronroos+l10n@iki.fi>\n"
|
||||
"Language-Team: Finnish <lokalisointi-lista@googlegroups.com>\n"
|
||||
"Language: fi\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Pääte"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Näppäimistön asetukset"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Näyttönäppäimistö"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Virtuaalinen näyttönäppäimistö"
|
||||
47
po/fr.po
Normal file
47
po/fr.po
Normal file
@ -0,0 +1,47 @@
|
||||
# French translation for squeekboard.
|
||||
# Copyright (C) 2022 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# FULL NAME <EMAIL@ADDRESS>, 2022.
|
||||
# Éloi Rivard <eloi.rivard@nubla.fr>, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-04-28 15:05+0000\n"
|
||||
"PO-Revision-Date: 2022-05-25 16:34+0200\n"
|
||||
"Last-Translator: Éloi Rivard <eloi.rivard@nubla.fr>\n"
|
||||
"Language-Team: French <gnomefr@traduc.org>\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
"X-Generator: Gtranslator 40.0\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Paramètres du clavier"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Clavier virtuel"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Un clavier virtuel affiché à l’écran"
|
||||
45
po/fur.po
Normal file
45
po/fur.po
Normal file
@ -0,0 +1,45 @@
|
||||
# Friulian translation for squeekboard.
|
||||
# Copyright (C) 2021 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Fabio Tomat <f.t.public@gmail.com>, 2021.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2021-12-22 13:33+0000\n"
|
||||
"PO-Revision-Date: 2021-12-22 15:06+0100\n"
|
||||
"Last-Translator: Fabio Tomat <f.t.public@gmail.com>\n"
|
||||
"Language-Team: Friulian <fur@li.org>\n"
|
||||
"Language: fur\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminâl"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Impostazions tastiere"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Tastiere a visôr"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Une tastiere virtuâl a visôr"
|
||||
52
po/gl.po
Normal file
52
po/gl.po
Normal file
@ -0,0 +1,52 @@
|
||||
# Galician translation for squeekboard.
|
||||
# Copyright (C) 2022 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
# Fran Diéguez <frandieguez@gnome.org>, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-02-02 17:41+0000\n"
|
||||
"PO-Revision-Date: 2022-02-04 16:18+0100\n"
|
||||
"Last-Translator: Fran Diéguez <frandieguez@gnome.org>\n"
|
||||
"Language-Team: Galician <proxecto@trasno.gal>\n"
|
||||
"Language: gl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-DL-Team: gl\n"
|
||||
"X-DL-Module: squeekboard\n"
|
||||
"X-DL-Branch: master\n"
|
||||
"X-DL-Domain: po\n"
|
||||
"X-DL-State: Translating\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
"X-Generator: Gtranslator 41.0\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoticono"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Preferencias de teclado"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Teclado en pantalla"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Un teclado en pantalla virtual"
|
||||
46
po/he.po
Normal file
46
po/he.po
Normal file
@ -0,0 +1,46 @@
|
||||
# Hebrew translation for squeekboard.
|
||||
# Copyright (C) 2022 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Yosef Or Boczko <yoseforb@gmail.com>, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-02-04 15:22+0000\n"
|
||||
"PO-Revision-Date: 2022-02-14 18:05+0200\n"
|
||||
"Last-Translator: Yosef Or Boczko <yoseforb@gmail.com>\n"
|
||||
"Language-Team: Hebrew <>\n"
|
||||
"Language: he\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Gtranslator 40.0\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "רגשון"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "מסוף"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "הגדרות מקלדת"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "מקלדת על המסך"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "מקלדת מדומה על המסך"
|
||||
47
po/hr.po
Normal file
47
po/hr.po
Normal file
@ -0,0 +1,47 @@
|
||||
# Croatian translation for squeekboard.
|
||||
# Copyright (C) 2022 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-07-11 20:12+0000\n"
|
||||
"PO-Revision-Date: 2022-08-31 09:49+0200\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Croatian <hr@li.org>\n"
|
||||
"Language: hr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 "
|
||||
"&& n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"X-Generator: Poedit 3.1.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Smajli"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Postavke tipkovnice"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Zaslonska tipkovnica"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Zaslonska virtualna tipkovnica"
|
||||
46
po/hu.po
Normal file
46
po/hu.po
Normal file
@ -0,0 +1,46 @@
|
||||
# Hungarian translation for squeekboard.
|
||||
# Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
#
|
||||
# Balázs Úr <ur.balazs at fsf dot hu>, 2022.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/issues"
|
||||
"\n"
|
||||
"POT-Creation-Date: 2022-03-12 12:04+0000\n"
|
||||
"PO-Revision-Date: 2022-03-16 01:55+0100\n"
|
||||
"Last-Translator: Balázs Úr <ur.balazs at fsf dot hu>\n"
|
||||
"Language-Team: Hungarian <gnome-hu-list at gnome dot org>\n"
|
||||
"Language: hu\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Lokalize 19.12.3\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emodzsi"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminál"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Billentyűzetbeállítások"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Képernyő-billentyűzet"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Egy virtuális képernyő-billentyűzet"
|
||||
47
po/it.po
Normal file
47
po/it.po
Normal file
@ -0,0 +1,47 @@
|
||||
# Italian translation for squeekboard.
|
||||
# Copyright (C) 2021 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Vittorio <postav@pm.me>, 2021.
|
||||
# Vittorio Monti <postav@pm.me>, 2021.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2021-12-22 19:14+0000\n"
|
||||
"PO-Revision-Date: 2021-12-22 20:37+0100\n"
|
||||
"Last-Translator: Vittorio Monti <postav@pm.me>\n"
|
||||
"Language-Team: Italian <gnome-it-list@gnome.org>\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Gtranslator 3.30.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminale"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Impostazioni tastiera"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Tastiera su schermo"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Una tastiera virtuale su schermo"
|
||||
46
po/ka.po
Normal file
46
po/ka.po
Normal file
@ -0,0 +1,46 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-02-04 15:22+0000\n"
|
||||
"PO-Revision-Date: 2022-02-08 03:15+0100\n"
|
||||
"Last-Translator: Temuri Doghonadze <temuri.doghonadze@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: ka\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "ემოჯი"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "ტერმინალი"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "კლავიატურის მორგება"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "ეკრანის კლავიატურა"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "ეკრანზე ვირტუალური კლავიატურის ჩვენება"
|
||||
46
po/ko.po
Normal file
46
po/ko.po
Normal file
@ -0,0 +1,46 @@
|
||||
# Korean translation for squeekboard.
|
||||
# Copyright (C) 2022 squeekboard'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Moon Sungjoon <sumoon@seoulsaram.org>, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-04-09 18:43+0000\n"
|
||||
"PO-Revision-Date: 2022-04-11 19:23+0900\n"
|
||||
"Last-Translator: Moon Sungjoon <sumoon@seoulsaram.org>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: ko\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "이모지"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "터미널"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "키보드 설정"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "스퀴크 보드"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "화상 키보드"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "가상 키보드"
|
||||
48
po/nl.po
Normal file
48
po/nl.po
Normal file
@ -0,0 +1,48 @@
|
||||
# Dutch translation for squeekboard.
|
||||
# Copyright (C) 2021 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Jan Jasper de Kroon <jajadekroon@gmail.com>, 2021.
|
||||
# Nathan Follens <nfollens@gnome.org>, 2021.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2021-12-23 15:18+0000\n"
|
||||
"PO-Revision-Date: 2021-12-25 14:04+0100\n"
|
||||
"Last-Translator: Nathan Follens <nfollens@gnome.org>\n"
|
||||
"Language-Team: Dutch <gnome-nl-list@gnome.org>\n"
|
||||
"Language: nl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Toetsenbordinstellingen"
|
||||
|
||||
# Dit is de naam van de applicatie
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Schermtoetsenbord"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Een virtueel schermtoetsenbord"
|
||||
45
po/oc.po
Normal file
45
po/oc.po
Normal file
@ -0,0 +1,45 @@
|
||||
# Occitan translation for squeekboard.
|
||||
# Copyright (C) 2022 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Quentin PAGÈS <pages_quentin@hotmail.com>, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-04-17 06:24+0000\n"
|
||||
"PO-Revision-Date: 2022-04-17 09:17+0200\n"
|
||||
"Last-Translator: Quentin PAGÈS\n"
|
||||
"Language-Team: Occitan <totenoc@gmail.com>\n"
|
||||
"Language: oc\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Paramètres del clavièr"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Clavièr visual"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Un clavièr virtual sus l’ecran"
|
||||
47
po/pl.po
Normal file
47
po/pl.po
Normal file
@ -0,0 +1,47 @@
|
||||
# Polish translation for squeekboard.
|
||||
# Copyright © 2022 the squeekboard authors.
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Piotr Drąg <piotrdrag@gmail.com>, 2022.
|
||||
# Aviary.pl <community-poland@mozilla.org>, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-03-19 09:34+0000\n"
|
||||
"PO-Revision-Date: 2022-03-20 14:12+0100\n"
|
||||
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
|
||||
"Language-Team: Polish <community-poland@mozilla.org>\n"
|
||||
"Language: pl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
||||
"|| n%100>=20) ? 1 : 2);\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Ustawienia klawiatury"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Klawiatura ekranowa"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Wirtualna klawiatura ekranowa"
|
||||
46
po/pt.po
Normal file
46
po/pt.po
Normal file
@ -0,0 +1,46 @@
|
||||
# Portuguese translation for squeekboard.
|
||||
# Copyright (C) 2022 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Hugo Carvalho <hugokarvalho@hotmail.com>, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-02-26 10:49+0000\n"
|
||||
"PO-Revision-Date: 2022-02-26 18:27+0000\n"
|
||||
"Last-Translator: Hugo Carvalho <hugokarvalho@hotmail.com>\n"
|
||||
"Language-Team: Portuguese <pt@li.org>\n"
|
||||
"Language: pt\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Definições do teclado"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Teclado no ecrã"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Um teclado virtual no ecrã"
|
||||
47
po/pt_BR.po
Normal file
47
po/pt_BR.po
Normal file
@ -0,0 +1,47 @@
|
||||
# Brazilian Portuguese translation for squeekboard.
|
||||
# Copyright (C) 2021 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Rafael Fontenelle <rafaelff@gnome.org>, 2021.
|
||||
# Luís Fernando Stürmer da Rosa <luisfsr@dismail.de>, 2021.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2021-12-22 12:39+0000\n"
|
||||
"PO-Revision-Date: 2022-01-30 12:34-0300\n"
|
||||
"Last-Translator: Luís Fernando Stürmer da Rosa <luisfsr@dismail.de>\n"
|
||||
"Language-Team: Brazilian Portuguese <gnome-pt_br-list@gnome.org>\n"
|
||||
"Language: pt_BR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
"X-Generator: Poedit 3.0\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Configurações do teclado"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Teclado virtual"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Um teclado virtual"
|
||||
47
po/ro.po
Normal file
47
po/ro.po
Normal file
@ -0,0 +1,47 @@
|
||||
# Romanian translation for squeekboard.
|
||||
# Copyright (C) 2021 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# libre <eposta1@pm.me>, 2021.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2021-12-22 14:45+0000\n"
|
||||
"PO-Revision-Date: 2021-12-22 20:05+0100\n"
|
||||
"Last-Translator: libre <eposta1@pm.me>\n"
|
||||
"Language-Team: Romanian <gnomero-list@lists.sourceforge.net>\n"
|
||||
"Language: ro\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
|
||||
"20)) ? 1 : 2);;\n"
|
||||
"X-Generator: Gtranslator 3.30.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Opțiuni tastatură"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Tastatură pe ecran"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "O tastatură virtuală pe ecran"
|
||||
47
po/ru.po
Normal file
47
po/ru.po
Normal file
@ -0,0 +1,47 @@
|
||||
# Russian translation for squeekboard.
|
||||
# Copyright (C) 2022 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Aleksandr Melman <Alexmelman88@gmail.com>, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-06-14 15:23+0000\n"
|
||||
"PO-Revision-Date: 2022-06-16 14:38+0300\n"
|
||||
"Last-Translator: Aleksandr Melman <Alexmelman88@gmail.com>\n"
|
||||
"Language-Team: Russian <gnome-cyr@gnome.org>\n"
|
||||
"Language: ru\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 "
|
||||
"&& n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Эмодзи"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Терминал"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Настройки клавиатуры"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Экранная клавиатура"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Виртуальная клавиатура на экране"
|
||||
49
po/sl.po
Normal file
49
po/sl.po
Normal file
@ -0,0 +1,49 @@
|
||||
# Slovenian translation for squeekboard.
|
||||
# Copyright (C) 2021 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
#
|
||||
# Matej Urbančič <mateju@src.gnome.org>, 2021.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2021-12-22 19:14+0000\n"
|
||||
"PO-Revision-Date: 2021-12-23 16:17+0100\n"
|
||||
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
|
||||
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
|
||||
"Language: sl_SI\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
|
||||
"%100==4 ? 3 : 0);\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Izrazne ikone"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Nastavitve tipkovnice"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Cvilkovnica"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Zaslonska tipkovnica"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Navidezna zaslonska tipkovnica"
|
||||
45
po/sr.po
Normal file
45
po/sr.po
Normal file
@ -0,0 +1,45 @@
|
||||
# Serbian translation for squeekboard.
|
||||
# Copyright © 2022 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2022.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-03-08 10:15+0000\n"
|
||||
"PO-Revision-Date: 2022-03-12 13:00+0200\n"
|
||||
"Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
|
||||
"Language-Team: Serbian <(nothing)>\n"
|
||||
"Language: sr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=4; plural=n==1? 3 : n%10==1 && n%100!=11 ? 0 : n"
|
||||
"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Емоџи"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Терминал"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Поставке тастатуре"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Сквик-табла"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Тастатура на екрану"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Виртуелна тастатура на екрану"
|
||||
48
po/sv.po
Normal file
48
po/sv.po
Normal file
@ -0,0 +1,48 @@
|
||||
# Swedish translations for squeekboard package.
|
||||
# Copyright (C) 2021 THE squeekboard'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Automatically generated, 2021.
|
||||
#
|
||||
# Luna Jernberg <droidbittin@gmail.com>, 2021.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2021-12-22 12:47+0000\n"
|
||||
"PO-Revision-Date: 2021-12-22 14:15+0100\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 3.0\n"
|
||||
"Last-Translator: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Language: sv\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Tangentbordsinställningar"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Skärmtangentbord"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Ett virtuellt skärmtangentbord"
|
||||
46
po/tr.po
Normal file
46
po/tr.po
Normal file
@ -0,0 +1,46 @@
|
||||
# Turkish translation for squeekboard.
|
||||
# Copyright (C) 2022 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Emin Tufan Çetin <etcetin@gmail.com>, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-03-16 00:57+0000\n"
|
||||
"PO-Revision-Date: 2022-03-19 12:33+0300\n"
|
||||
"Last-Translator: Emin Tufan Çetin <etcetin@gmail.com>\n"
|
||||
"Language-Team: Turkish <gnometurk@gnome.org>\n"
|
||||
"Language: tr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 2.4.3\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "Uçbirim"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "Klavye Ayarları"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "Ekran Klavyesi"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "Sanal ekran klavyesi"
|
||||
51
po/uk.po
Normal file
51
po/uk.po
Normal file
@ -0,0 +1,51 @@
|
||||
# Ukrainian translation for squeekboard.
|
||||
# Copyright (C) 2021 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
#
|
||||
# Yuri Chornoivan <yurchor@ukr.net>, 2021.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/issues\n"
|
||||
"POT-Creation-Date: 2021-12-22 10:36+0000\n"
|
||||
"PO-Revision-Date: 2021-12-22 14:46+0200\n"
|
||||
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
|
||||
"Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\n"
|
||||
"Language: uk\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||
"X-Generator: Lokalize 20.12.0\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr ""
|
||||
"Емодзі"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr ""
|
||||
"Термінал"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr ""
|
||||
"Параметри клавіатури"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr ""
|
||||
"Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr ""
|
||||
"Екранна клавіатура"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr ""
|
||||
"Екранна віртуальна клавіатура"
|
||||
45
po/zh_CN.po
Normal file
45
po/zh_CN.po
Normal file
@ -0,0 +1,45 @@
|
||||
# Chinese (China) translation for squeekboard.
|
||||
# Copyright (C) 2022 squeekboard's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the squeekboard package.
|
||||
# Luke Luo <2164381336@qq.com>, 2022.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: squeekboard master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/Phosh/squeekboard/"
|
||||
"issues\n"
|
||||
"POT-Creation-Date: 2022-04-21 07:28+0000\n"
|
||||
"PO-Revision-Date: 2022-04-23 20:30+0800\n"
|
||||
"Last-Translator: Luke Luo <njlyf2011@hotmail.com>\n"
|
||||
"Language-Team: Chinese (China) <i18n-zh@googlegroups.com>\n"
|
||||
"Language: zh_CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#. translators: This is a emmoji keyboard layout
|
||||
#: data/popover.ui:6
|
||||
msgid "Emoji"
|
||||
msgstr "Emoji 表情"
|
||||
|
||||
#. translators: This is a terminal keyboard layout
|
||||
#: data/popover.ui:12
|
||||
msgid "Terminal"
|
||||
msgstr "终端"
|
||||
|
||||
#: data/popover.ui:18
|
||||
msgid "Keyboard Settings"
|
||||
msgstr "键盘设置"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:3
|
||||
msgid "Squeekboard"
|
||||
msgstr "Squeekboard"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:4
|
||||
msgid "On Screen Keyboard"
|
||||
msgstr "屏幕键盘"
|
||||
|
||||
#: data/sm.puri.Squeekboard.desktop.in.in:5
|
||||
msgid "An on screen virtual keyboard"
|
||||
msgstr "一个虚拟屏幕键盘"
|
||||
23
src/actors/mod.rs
Normal file
23
src/actors/mod.rs
Normal file
@ -0,0 +1,23 @@
|
||||
/* Copyright (C) 2022 Purism SPC
|
||||
* SPDX-License-Identifier: GPL-3.0+
|
||||
*/
|
||||
|
||||
/*! Actors are parts of Squeekboard containing state independent from the main application state.
|
||||
|
||||
Because main application state is meant to be immutable,
|
||||
it cannot be referenced directly by pieces of logic
|
||||
interacting with the environment.
|
||||
|
||||
Such impure logic is split away (actor's logic)
|
||||
and combined with relevant pieces of state (actor state),
|
||||
thus preserving the purity (and sometimes simplicity) of the main state.
|
||||
|
||||
Actors can communicate with the main state by sending it messages,
|
||||
and by receiving updates from it.
|
||||
*/
|
||||
|
||||
// TODO: move crate::panel into crate::actors::panel.
|
||||
// Panel contains state and logic to protect the main state from getting flooded
|
||||
// with low-level wayland and gtk sizing events.
|
||||
|
||||
pub mod popover;
|
||||
40
src/actors/popover.rs
Normal file
40
src/actors/popover.rs
Normal file
@ -0,0 +1,40 @@
|
||||
/* Copyright (C) 2022 Purism SPC
|
||||
* SPDX-License-Identifier: GPL-3.0+
|
||||
*/
|
||||
|
||||
/*! The popover is opened directly by the GTK surface,
|
||||
without bouncing click events off the main state.
|
||||
Then it must accurately show which layout has been selected.
|
||||
It can get the system layout directly from gsettings on open,
|
||||
but it cannot get the user-selected overlay, because it's stored in state.
|
||||
|
||||
To solve this, overlay will be cached in the popover actor,
|
||||
and updated by main state every time it changes.
|
||||
*/
|
||||
|
||||
pub mod c {
|
||||
use super::*;
|
||||
use crate::util::c::Wrapped;
|
||||
/// The mutable instance of state
|
||||
pub type Actor = Wrapped<State>;
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct State {
|
||||
pub overlay: Option<String>,
|
||||
}
|
||||
|
||||
impl State {
|
||||
pub fn new() -> Self {
|
||||
Self { overlay: None }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_overlay(
|
||||
actor: &c::Actor,
|
||||
overlay: Option<String>,
|
||||
) {
|
||||
let actor = actor.clone_ref();
|
||||
let mut actor = actor.borrow_mut();
|
||||
actor.overlay = overlay;
|
||||
}
|
||||
@ -6,12 +6,30 @@
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
use crate::imservice::ContentPurpose;
|
||||
use crate::layout::ArrangementKind;
|
||||
use crate::outputs::OutputId;
|
||||
use crate::panel::PixelSize;
|
||||
|
||||
/// The keyboard should hide after this has elapsed to prevent flickering.
|
||||
pub const HIDING_TIMEOUT: Duration = Duration::from_millis(200);
|
||||
|
||||
/// Description of parameters which influence panel contents
|
||||
#[derive(PartialEq, Clone, Debug)]
|
||||
pub struct Contents {
|
||||
pub name: String,
|
||||
pub kind: ArrangementKind,
|
||||
pub overlay_name: Option<String>,
|
||||
pub purpose: ContentPurpose,
|
||||
}
|
||||
|
||||
/// The outwardly visible state of visibility
|
||||
#[derive(PartialEq, Debug, Clone)]
|
||||
pub enum Outcome {
|
||||
Visible,
|
||||
Visible {
|
||||
output: OutputId,
|
||||
height: PixelSize,
|
||||
contents: Contents,
|
||||
},
|
||||
Hidden,
|
||||
}
|
||||
|
||||
358
src/assert_matches.rs
Normal file
358
src/assert_matches.rs
Normal file
@ -0,0 +1,358 @@
|
||||
/* Taken from https://github.com/murarth/assert_matches
|
||||
*
|
||||
* git commit: 26b8b40a12823c068a829ba475d0eccc13dfc221
|
||||
*
|
||||
* assert_matches is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
|
||||
*
|
||||
Copyright (c) 2016 Murarth
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
//! Provides a macro, `assert_matches!`, which tests whether a value
|
||||
//! matches a given pattern, causing a panic if the match fails.
|
||||
//!
|
||||
//! See the macro [`assert_matches!`] documentation for more information.
|
||||
//!
|
||||
//! Also provides a debug-only counterpart, [`debug_assert_matches!`].
|
||||
//!
|
||||
//! See the macro [`debug_assert_matches!`] documentation for more information
|
||||
//! about this macro.
|
||||
//!
|
||||
//! [`assert_matches!`]: macro.assert_matches.html
|
||||
//! [`debug_assert_matches!`]: macro.debug_assert_matches.html
|
||||
|
||||
#![deny(missing_docs)]
|
||||
#![cfg_attr(not(test), no_std)]
|
||||
|
||||
/// Asserts that an expression matches a given pattern.
|
||||
///
|
||||
/// A guard expression may be supplied to add further restrictions to the
|
||||
/// expected value of the expression.
|
||||
///
|
||||
/// A `match` arm may be supplied to perform additional assertions or to yield
|
||||
/// a value from the macro invocation.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #[macro_use] extern crate assert_matches;
|
||||
///
|
||||
/// #[derive(Debug)]
|
||||
/// enum Foo {
|
||||
/// A(i32),
|
||||
/// B(&'static str),
|
||||
/// }
|
||||
///
|
||||
/// # fn main() {
|
||||
/// let a = Foo::A(1);
|
||||
///
|
||||
/// // Assert that `a` matches the pattern `Foo::A(_)`.
|
||||
/// assert_matches!(a, Foo::A(_));
|
||||
///
|
||||
/// // Assert that `a` matches the pattern and
|
||||
/// // that the contained value meets the condition `i > 0`.
|
||||
/// assert_matches!(a, Foo::A(i) if i > 0);
|
||||
///
|
||||
/// let b = Foo::B("foobar");
|
||||
///
|
||||
/// // Assert that `b` matches the pattern `Foo::B(_)`.
|
||||
/// assert_matches!(b, Foo::B(s) => {
|
||||
/// // Perform additional assertions on the variable binding `s`.
|
||||
/// assert!(s.starts_with("foo"));
|
||||
/// assert!(s.ends_with("bar"));
|
||||
/// });
|
||||
///
|
||||
/// // Assert that `b` matches the pattern and yield the string `s`.
|
||||
/// let s = assert_matches!(b, Foo::B(s) => s);
|
||||
///
|
||||
/// // Perform an assertion on the value `s`.
|
||||
/// assert_eq!(s, "foobar");
|
||||
/// # }
|
||||
/// ```
|
||||
#[macro_export]
|
||||
macro_rules! assert_matches {
|
||||
( $e:expr , $($pat:pat)|+ ) => {
|
||||
match $e {
|
||||
$($pat)|+ => (),
|
||||
ref e => panic!("assertion failed: `{:?}` does not match `{}`",
|
||||
e, stringify!($($pat)|+))
|
||||
}
|
||||
};
|
||||
( $e:expr , $($pat:pat)|+ if $cond:expr ) => {
|
||||
match $e {
|
||||
$($pat)|+ if $cond => (),
|
||||
ref e => panic!("assertion failed: `{:?}` does not match `{}`",
|
||||
e, stringify!($($pat)|+ if $cond))
|
||||
}
|
||||
};
|
||||
( $e:expr , $($pat:pat)|+ => $arm:expr ) => {
|
||||
match $e {
|
||||
$($pat)|+ => $arm,
|
||||
ref e => panic!("assertion failed: `{:?}` does not match `{}`",
|
||||
e, stringify!($($pat)|+))
|
||||
}
|
||||
};
|
||||
( $e:expr , $($pat:pat)|+ if $cond:expr => $arm:expr ) => {
|
||||
match $e {
|
||||
$($pat)|+ if $cond => $arm,
|
||||
ref e => panic!("assertion failed: `{:?}` does not match `{}`",
|
||||
e, stringify!($($pat)|+ if $cond))
|
||||
}
|
||||
};
|
||||
( $e:expr , $($pat:pat)|+ , $($arg:tt)* ) => {
|
||||
match $e {
|
||||
$($pat)|+ => (),
|
||||
ref e => panic!("assertion failed: `{:?}` does not match `{}`: {}",
|
||||
e, stringify!($($pat)|+), format_args!($($arg)*))
|
||||
}
|
||||
};
|
||||
( $e:expr , $($pat:pat)|+ if $cond:expr , $($arg:tt)* ) => {
|
||||
match $e {
|
||||
$($pat)|+ if $cond => (),
|
||||
ref e => panic!("assertion failed: `{:?}` does not match `{}`: {}",
|
||||
e, stringify!($($pat)|+ if $cond), format_args!($($arg)*))
|
||||
}
|
||||
};
|
||||
( $e:expr , $($pat:pat)|+ => $arm:expr , $($arg:tt)* ) => {
|
||||
match $e {
|
||||
$($pat)|+ => $arm,
|
||||
ref e => panic!("assertion failed: `{:?}` does not match `{}`: {}",
|
||||
e, stringify!($($pat)|+), format_args!($($arg)*))
|
||||
}
|
||||
};
|
||||
( $e:expr , $($pat:pat)|+ if $cond:expr => $arm:expr , $($arg:tt)* ) => {
|
||||
match $e {
|
||||
$($pat)|+ if $cond => $arm,
|
||||
ref e => panic!("assertion failed: `{:?}` does not match `{}`: {}",
|
||||
e, stringify!($($pat)|+ if $cond), format_args!($($arg)*))
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// Asserts that an expression matches a given pattern.
|
||||
///
|
||||
/// Unlike [`assert_matches!`], `debug_assert_matches!` statements are only enabled
|
||||
/// in non-optimized builds by default. An optimized build will omit all
|
||||
/// `debug_assert_matches!` statements unless `-C debug-assertions` is passed
|
||||
/// to the compiler.
|
||||
///
|
||||
/// See the macro [`assert_matches!`] documentation for more information.
|
||||
///
|
||||
/// [`assert_matches!`]: macro.assert_matches.html
|
||||
#[macro_export(local_inner_macros)]
|
||||
macro_rules! debug_assert_matches {
|
||||
( $($tt:tt)* ) => { {
|
||||
if _assert_matches_cfg!(debug_assertions) {
|
||||
assert_matches!($($tt)*);
|
||||
}
|
||||
} }
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
macro_rules! _assert_matches_cfg {
|
||||
( $($tt:tt)* ) => { cfg!($($tt)*) }
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use std::panic::{catch_unwind, UnwindSafe};
|
||||
|
||||
#[derive(Debug)]
|
||||
enum Foo {
|
||||
A(i32),
|
||||
B(&'static str),
|
||||
C(&'static str),
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_assert_succeed() {
|
||||
let a = Foo::A(123);
|
||||
|
||||
assert_matches!(a, Foo::A(_));
|
||||
assert_matches!(a, Foo::A(123));
|
||||
assert_matches!(a, Foo::A(i) if i == 123);
|
||||
assert_matches!(a, Foo::A(42) | Foo::A(123));
|
||||
|
||||
let b = Foo::B("foo");
|
||||
|
||||
assert_matches!(b, Foo::B(_));
|
||||
assert_matches!(b, Foo::B("foo"));
|
||||
assert_matches!(b, Foo::B(s) if s == "foo");
|
||||
assert_matches!(b, Foo::B(s) => assert_eq!(s, "foo"));
|
||||
assert_matches!(b, Foo::B(s) => { assert_eq!(s, "foo"); assert!(true) });
|
||||
assert_matches!(b, Foo::B(s) if s == "foo" => assert_eq!(s, "foo"));
|
||||
assert_matches!(b, Foo::B(s) if s == "foo" => { assert_eq!(s, "foo"); assert!(true) });
|
||||
|
||||
let c = Foo::C("foo");
|
||||
|
||||
assert_matches!(c, Foo::B(_) | Foo::C(_));
|
||||
assert_matches!(c, Foo::B("foo") | Foo::C("foo"));
|
||||
assert_matches!(c, Foo::B(s) | Foo::C(s) if s == "foo");
|
||||
assert_matches!(c, Foo::B(s) | Foo::C(s) => assert_eq!(s, "foo"));
|
||||
assert_matches!(c, Foo::B(s) | Foo::C(s) => { assert_eq!(s, "foo"); assert!(true) });
|
||||
assert_matches!(c, Foo::B(s) | Foo::C(s) if s == "foo" => assert_eq!(s, "foo"));
|
||||
assert_matches!(c, Foo::B(s) | Foo::C(s) if s == "foo" => { assert_eq!(s, "foo"); assert!(true) });
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_assert_panic_0() {
|
||||
let a = Foo::A(123);
|
||||
|
||||
assert_matches!(a, Foo::B(_));
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_assert_panic_1() {
|
||||
let b = Foo::B("foo");
|
||||
|
||||
assert_matches!(b, Foo::B("bar"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_assert_panic_2() {
|
||||
let b = Foo::B("foo");
|
||||
|
||||
assert_matches!(b, Foo::B(s) if s == "bar");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_assert_panic_3() {
|
||||
let b = Foo::B("foo");
|
||||
|
||||
assert_matches!(b, Foo::B(s) => assert_eq!(s, "bar"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_assert_panic_4() {
|
||||
let b = Foo::B("foo");
|
||||
|
||||
assert_matches!(b, Foo::B(s) if s == "bar" => assert_eq!(s, "foo"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_assert_panic_5() {
|
||||
let b = Foo::B("foo");
|
||||
|
||||
assert_matches!(b, Foo::B(s) if s == "foo" => assert_eq!(s, "bar"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_assert_panic_6() {
|
||||
let b = Foo::B("foo");
|
||||
|
||||
assert_matches!(b, Foo::B(s) if s == "foo" => { assert_eq!(s, "foo"); assert!(false) });
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_assert_no_move() {
|
||||
let b = &mut Foo::A(0);
|
||||
assert_matches!(*b, Foo::A(0));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn assert_with_message() {
|
||||
let a = Foo::A(0);
|
||||
|
||||
assert_matches!(a, Foo::A(_), "o noes");
|
||||
assert_matches!(a, Foo::A(n) if n == 0, "o noes");
|
||||
assert_matches!(a, Foo::A(n) => assert_eq!(n, 0), "o noes");
|
||||
assert_matches!(a, Foo::A(n) => { assert_eq!(n, 0); assert!(n < 1) }, "o noes");
|
||||
assert_matches!(a, Foo::A(n) if n == 0 => assert_eq!(n, 0), "o noes");
|
||||
assert_matches!(a, Foo::A(n) if n == 0 => { assert_eq!(n, 0); assert!(n < 1) }, "o noes");
|
||||
assert_matches!(a, Foo::A(_), "o noes {:?}", a);
|
||||
assert_matches!(a, Foo::A(n) if n == 0, "o noes {:?}", a);
|
||||
assert_matches!(a, Foo::A(n) => assert_eq!(n, 0), "o noes {:?}", a);
|
||||
assert_matches!(a, Foo::A(n) => { assert_eq!(n, 0); assert!(n < 1) }, "o noes {:?}", a);
|
||||
assert_matches!(a, Foo::A(_), "o noes {value:?}", value=a);
|
||||
assert_matches!(a, Foo::A(n) if n == 0, "o noes {value:?}", value=a);
|
||||
assert_matches!(a, Foo::A(n) => assert_eq!(n, 0), "o noes {value:?}", value=a);
|
||||
assert_matches!(a, Foo::A(n) => { assert_eq!(n, 0); assert!(n < 1) }, "o noes {value:?}", value=a);
|
||||
assert_matches!(a, Foo::A(n) if n == 0 => assert_eq!(n, 0), "o noes {value:?}", value=a);
|
||||
}
|
||||
|
||||
fn panic_message<F>(f: F) -> String
|
||||
where F: FnOnce() + UnwindSafe {
|
||||
let err = catch_unwind(f)
|
||||
.expect_err("function did not panic");
|
||||
|
||||
*err.downcast::<String>()
|
||||
.expect("function panicked with non-String value")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_panic_message() {
|
||||
let a = Foo::A(1);
|
||||
|
||||
// expr, pat
|
||||
assert_eq!(panic_message(|| {
|
||||
assert_matches!(a, Foo::B(_));
|
||||
}), r#"assertion failed: `A(1)` does not match `Foo::B(_)`"#);
|
||||
|
||||
// expr, pat if cond
|
||||
assert_eq!(panic_message(|| {
|
||||
assert_matches!(a, Foo::B(s) if s == "foo");
|
||||
}), r#"assertion failed: `A(1)` does not match `Foo::B(s) if s == "foo"`"#);
|
||||
|
||||
// expr, pat => arm
|
||||
assert_eq!(panic_message(|| {
|
||||
assert_matches!(a, Foo::B(_) => {});
|
||||
}), r#"assertion failed: `A(1)` does not match `Foo::B(_)`"#);
|
||||
|
||||
// expr, pat if cond => arm
|
||||
assert_eq!(panic_message(|| {
|
||||
assert_matches!(a, Foo::B(s) if s == "foo" => {});
|
||||
}), r#"assertion failed: `A(1)` does not match `Foo::B(s) if s == "foo"`"#);
|
||||
|
||||
// expr, pat, args
|
||||
assert_eq!(panic_message(|| {
|
||||
assert_matches!(a, Foo::B(_), "msg");
|
||||
}), r#"assertion failed: `A(1)` does not match `Foo::B(_)`: msg"#);
|
||||
|
||||
// expr, pat if cond, args
|
||||
assert_eq!(panic_message(|| {
|
||||
assert_matches!(a, Foo::B(s) if s == "foo", "msg");
|
||||
}), r#"assertion failed: `A(1)` does not match `Foo::B(s) if s == "foo"`: msg"#);
|
||||
|
||||
// expr, pat => arm, args
|
||||
assert_eq!(panic_message(|| {
|
||||
assert_matches!(a, Foo::B(_) => {}, "msg");
|
||||
}), r#"assertion failed: `A(1)` does not match `Foo::B(_)`: msg"#);
|
||||
|
||||
// expr, pat if cond => arm, args
|
||||
assert_eq!(panic_message(|| {
|
||||
assert_matches!(a, Foo::B(s) if s == "foo" => {}, "msg");
|
||||
}), r#"assertion failed: `A(1)` does not match `Foo::B(s) if s == "foo"`: msg"#);
|
||||
}
|
||||
}
|
||||
@ -7,64 +7,16 @@
|
||||
use std::env;
|
||||
use std::fmt;
|
||||
use std::path::PathBuf;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use super::{ Error, LoadError };
|
||||
use super::parsing;
|
||||
|
||||
use ::layout::ArrangementKind;
|
||||
use ::logging;
|
||||
use ::util::c::as_str;
|
||||
use ::xdg;
|
||||
use ::imservice::ContentPurpose;
|
||||
use crate::layout;
|
||||
use crate::layout::ArrangementKind;
|
||||
use crate::logging;
|
||||
use crate::xdg;
|
||||
use crate::imservice::ContentPurpose;
|
||||
|
||||
// traits, derives
|
||||
use ::logging::Warn;
|
||||
|
||||
|
||||
/// Gathers stuff defined in C or called by C
|
||||
pub mod c {
|
||||
use super::*;
|
||||
use std::os::raw::c_char;
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn squeek_load_layout(
|
||||
name: *const c_char, // name of the keyboard
|
||||
type_: u32, // type like Wide
|
||||
variant: u32, // purpose variant like numeric, terminal...
|
||||
overlay: *const c_char, // the overlay (looking for "terminal")
|
||||
) -> *mut ::layout::Layout {
|
||||
let type_ = match type_ {
|
||||
0 => ArrangementKind::Base,
|
||||
1 => ArrangementKind::Wide,
|
||||
_ => panic!("Bad enum value"),
|
||||
};
|
||||
|
||||
let name = as_str(&name)
|
||||
.expect("Bad layout name")
|
||||
.expect("Empty layout name");
|
||||
|
||||
let variant = ContentPurpose::try_from(variant)
|
||||
.or_print(
|
||||
logging::Problem::Warning,
|
||||
"Received invalid purpose value",
|
||||
)
|
||||
.unwrap_or(ContentPurpose::Normal);
|
||||
|
||||
let overlay_str = as_str(&overlay)
|
||||
.expect("Bad overlay name")
|
||||
.expect("Empty overlay name");
|
||||
let overlay_str = match overlay_str {
|
||||
"" => None,
|
||||
other => Some(other),
|
||||
};
|
||||
|
||||
let (kind, layout) = load_layout_data_with_fallback(&name, type_, variant, overlay_str);
|
||||
let layout = ::layout::Layout::new(layout, kind, variant);
|
||||
Box::into_raw(Box::new(layout))
|
||||
}
|
||||
}
|
||||
|
||||
const FALLBACK_LAYOUT_NAME: &str = "us";
|
||||
|
||||
@ -265,7 +217,7 @@ fn load_layout_data_with_fallback(
|
||||
kind: ArrangementKind,
|
||||
purpose: ContentPurpose,
|
||||
overlay: Option<&str>,
|
||||
) -> (ArrangementKind, ::layout::LayoutData) {
|
||||
) -> (ArrangementKind, layout::LayoutData) {
|
||||
|
||||
// Build the path to the right keyboard layout subdirectory
|
||||
let path = env::var_os("SQUEEKBOARD_KEYBOARDSDIR")
|
||||
@ -300,6 +252,17 @@ fn load_layout_data_with_fallback(
|
||||
panic!("No useful layout found!");
|
||||
}
|
||||
|
||||
pub fn load_layout(
|
||||
name: String,
|
||||
kind: ArrangementKind,
|
||||
variant: ContentPurpose,
|
||||
overlay: Option<String>,
|
||||
) -> layout::Layout {
|
||||
let overlay = overlay.as_ref().map(String::as_str);
|
||||
let (found_kind, layout)
|
||||
= load_layout_data_with_fallback(&name, kind, variant, overlay);
|
||||
layout::Layout::new(layout, found_kind, variant)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
/*! Combined module for dealing with layout files */
|
||||
|
||||
mod loading;
|
||||
pub mod loading;
|
||||
pub mod parsing;
|
||||
|
||||
use std::io;
|
||||
|
||||
71
src/debug.rs
Normal file
71
src/debug.rs
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Purism SPC
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
use std::thread;
|
||||
use zbus::{Connection, ObjectServer, dbus_interface, fdo};
|
||||
|
||||
use crate::event_loop;
|
||||
use crate::state;
|
||||
|
||||
|
||||
use std::convert::TryInto;
|
||||
|
||||
|
||||
/// Accepts commands controlling the debug mode
|
||||
struct Manager {
|
||||
sender: event_loop::driver::Threaded,
|
||||
enabled: bool,
|
||||
}
|
||||
|
||||
#[dbus_interface(name = "sm.puri.SqueekDebug")]
|
||||
impl Manager {
|
||||
#[dbus_interface(property, name = "Enabled")]
|
||||
fn get_enabled(&self) -> bool {
|
||||
self.enabled
|
||||
}
|
||||
#[dbus_interface(property, name = "Enabled")]
|
||||
fn set_enabled(&mut self, enabled: bool) {
|
||||
self.enabled = enabled;
|
||||
self.sender
|
||||
.send(state::Event::Debug(
|
||||
if enabled { Event::Enable }
|
||||
else { Event::Disable }
|
||||
))
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
fn start(mgr: Manager) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let connection = Connection::new_session()?;
|
||||
fdo::DBusProxy::new(&connection)?.request_name(
|
||||
"sm.puri.SqueekDebug",
|
||||
fdo::RequestNameFlags::ReplaceExisting.into(),
|
||||
)?;
|
||||
|
||||
let mut object_server = ObjectServer::new(&connection);
|
||||
object_server.at(&"/sm/puri/SqueekDebug".try_into()?, mgr)?;
|
||||
|
||||
loop {
|
||||
if let Err(err) = object_server.try_handle_next() {
|
||||
eprintln!("{}", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn init(sender: event_loop::driver::Threaded) {
|
||||
let mgr = Manager {
|
||||
sender,
|
||||
enabled: false,
|
||||
};
|
||||
thread::spawn(move || {
|
||||
start(mgr).unwrap();
|
||||
});
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub enum Event {
|
||||
Enable,
|
||||
Disable,
|
||||
}
|
||||
@ -10,7 +10,7 @@ use ::layout::c::{ Bounds, EekGtkKeyboard, Point };
|
||||
use ::submission::c::Submission as CSubmission;
|
||||
|
||||
use glib::translate::FromGlibPtrNone;
|
||||
use gtk::WidgetExt;
|
||||
use gtk::prelude::WidgetExt;
|
||||
|
||||
use std::collections::HashSet;
|
||||
use std::ffi::CStr;
|
||||
|
||||
@ -29,7 +29,9 @@ use std::time::Instant;
|
||||
use crate::logging::Warn;
|
||||
|
||||
|
||||
/// Type of the sender that waits for external events
|
||||
type Sender = mpsc::Sender<Event>;
|
||||
/// Type of the sender that waits for internal state changes
|
||||
type UISender = glib::Sender<Commands>;
|
||||
|
||||
/// This loop driver spawns a new thread which updates the state in a loop,
|
||||
@ -37,7 +39,9 @@ type UISender = glib::Sender<Commands>;
|
||||
/// It sends outcomes to the glib main loop using a channel.
|
||||
/// The outcomes are applied by the UI end of the channel in the `main` module.
|
||||
// This could still be reasonably tested,
|
||||
// by creating a glib::Sender and checking what messages it receives.
|
||||
/// by creating a glib::Sender and checking what messages it receives.
|
||||
// This can/should be abstracted over Event and Commands,
|
||||
// so that the C call-ins can be thrown away from here and defined near events.
|
||||
#[derive(Clone)]
|
||||
pub struct Threaded {
|
||||
thread: Sender,
|
||||
@ -106,8 +110,11 @@ mod c {
|
||||
use super::*;
|
||||
|
||||
use crate::state::Presence;
|
||||
use crate::state::LayoutChoice;
|
||||
use crate::state::visibility;
|
||||
use crate::util;
|
||||
use crate::util::c::Wrapped;
|
||||
use std::os::raw::c_char;
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
@ -138,4 +145,28 @@ mod c {
|
||||
sender.send(Event::PhysicalKeyboard(state))
|
||||
.or_warn(&mut logging::Print, logging::Problem::Warning, "Can't send to state manager");
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn squeek_state_send_layout_set(
|
||||
sender: Wrapped<Threaded>,
|
||||
name: *const c_char,
|
||||
source: *const c_char,
|
||||
// TODO: use when synthetic events are needed
|
||||
_timestamp: u32,
|
||||
) {
|
||||
let sender = sender.clone_ref();
|
||||
let sender = sender.borrow();
|
||||
let string_or_empty = |v| String::from(
|
||||
util::c::as_str(v)
|
||||
.unwrap_or(Some(""))
|
||||
.unwrap_or("")
|
||||
);
|
||||
sender
|
||||
.send(Event::LayoutChoice(LayoutChoice {
|
||||
name: string_or_empty(&name),
|
||||
source: string_or_empty(&source).into(),
|
||||
}))
|
||||
.or_warn(&mut logging::Print, logging::Problem::Warning, "Can't send to state manager");
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,8 +151,9 @@ mod test {
|
||||
use super::*;
|
||||
use crate::animation;
|
||||
use crate::imservice::{ ContentHint, ContentPurpose };
|
||||
use crate::main::PanelCommand;
|
||||
use crate::panel;
|
||||
use crate::state::{ Application, InputMethod, InputMethodDetails, Presence, visibility };
|
||||
use crate::state::test::application_with_fake_output;
|
||||
|
||||
fn imdetails_new() -> InputMethodDetails {
|
||||
InputMethodDetails {
|
||||
@ -170,17 +171,18 @@ mod test {
|
||||
im: InputMethod::Active(imdetails_new()),
|
||||
physical_keyboard: Presence::Missing,
|
||||
visibility_override: visibility::State::NotForced,
|
||||
..application_with_fake_output(start)
|
||||
};
|
||||
|
||||
let l = State::new(state, now);
|
||||
let (l, commands) = handle_event(l, InputMethod::InactiveSince(now).into(), now);
|
||||
assert_eq!(commands.panel_visibility, Some(PanelCommand::Show));
|
||||
assert_matches!(commands.panel_visibility, Some(panel::Command::Show{..}));
|
||||
assert_eq!(l.scheduled_wakeup, Some(now + animation::HIDING_TIMEOUT));
|
||||
|
||||
now += animation::HIDING_TIMEOUT;
|
||||
|
||||
let (l, commands) = handle_event(l, Event::TimeoutReached(now), now);
|
||||
assert_eq!(commands.panel_visibility, Some(PanelCommand::Hide));
|
||||
assert_eq!(commands.panel_visibility, Some(panel::Command::Hide));
|
||||
assert_eq!(l.scheduled_wakeup, None);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#include "submission.h"
|
||||
#include "input-method-unstable-v2-client-protocol.h"
|
||||
#include "virtual-keyboard-unstable-v1-client-protocol.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include "submission.h"
|
||||
|
||||
struct imservice;
|
||||
|
||||
|
||||
@ -26,21 +26,32 @@ pub mod c {
|
||||
use super::*;
|
||||
|
||||
use std::os::raw::{c_char, c_void};
|
||||
use std::ptr;
|
||||
|
||||
// The following defined in C
|
||||
|
||||
/// struct zwp_input_method_v2*
|
||||
#[repr(transparent)]
|
||||
#[derive(PartialEq, Clone, Copy)]
|
||||
pub struct InputMethod(*const c_void);
|
||||
|
||||
impl InputMethod {
|
||||
pub fn is_null(&self) -> bool {
|
||||
self.0.is_null()
|
||||
}
|
||||
pub fn null() -> Self {
|
||||
Self(ptr::null())
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
fn imservice_destroy_im(im: *mut c::InputMethod);
|
||||
fn imservice_destroy_im(im: InputMethod);
|
||||
|
||||
#[allow(improper_ctypes)] // IMService will never be dereferenced in C
|
||||
pub fn imservice_connect_listeners(im: *mut InputMethod, imservice: *const IMService);
|
||||
pub fn eek_input_method_commit_string(im: *mut InputMethod, text: *const c_char);
|
||||
pub fn eek_input_method_delete_surrounding_text(im: *mut InputMethod, before: u32, after: u32);
|
||||
pub fn eek_input_method_commit(im: *mut InputMethod, serial: u32);
|
||||
pub fn imservice_connect_listeners(im: InputMethod, imservice: *const IMService);
|
||||
pub fn eek_input_method_commit_string(im: InputMethod, text: *const c_char);
|
||||
pub fn eek_input_method_delete_surrounding_text(im: InputMethod, before: u32, after: u32);
|
||||
pub fn eek_input_method_commit(im: InputMethod, serial: u32);
|
||||
}
|
||||
|
||||
// The following defined in Rust. TODO: wrap naked pointers to Rust data inside RefCells to prevent multiple writers
|
||||
@ -49,7 +60,7 @@ pub mod c {
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn imservice_handle_input_method_activate(imservice: *mut IMService,
|
||||
im: *const InputMethod)
|
||||
im: InputMethod)
|
||||
{
|
||||
let imservice = check_imservice(imservice, im).unwrap();
|
||||
imservice.preedit_string = String::new();
|
||||
@ -62,7 +73,7 @@ pub mod c {
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn imservice_handle_input_method_deactivate(imservice: *mut IMService,
|
||||
im: *const InputMethod)
|
||||
im: InputMethod)
|
||||
{
|
||||
let imservice = check_imservice(imservice, im).unwrap();
|
||||
imservice.pending = IMProtocolState {
|
||||
@ -74,7 +85,7 @@ pub mod c {
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn imservice_handle_surrounding_text(imservice: *mut IMService,
|
||||
im: *const InputMethod,
|
||||
im: InputMethod,
|
||||
text: *const c_char, cursor: u32, _anchor: u32)
|
||||
{
|
||||
let imservice = check_imservice(imservice, im).unwrap();
|
||||
@ -90,7 +101,7 @@ pub mod c {
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn imservice_handle_content_type(imservice: *mut IMService,
|
||||
im: *const InputMethod,
|
||||
im: InputMethod,
|
||||
hint: u32, purpose: u32)
|
||||
{
|
||||
let imservice = check_imservice(imservice, im).unwrap();
|
||||
@ -118,7 +129,7 @@ pub mod c {
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn imservice_handle_text_change_cause(imservice: *mut IMService,
|
||||
im: *const InputMethod,
|
||||
im: InputMethod,
|
||||
cause: u32)
|
||||
{
|
||||
let imservice = check_imservice(imservice, im).unwrap();
|
||||
@ -138,16 +149,11 @@ pub mod c {
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn imservice_handle_done(imservice: *mut IMService,
|
||||
im: *const InputMethod)
|
||||
im: InputMethod)
|
||||
{
|
||||
let imservice = check_imservice(imservice, im).unwrap();
|
||||
|
||||
imservice.current = imservice.pending.clone();
|
||||
imservice.pending = IMProtocolState {
|
||||
active: imservice.current.active,
|
||||
..IMProtocolState::default()
|
||||
};
|
||||
|
||||
imservice.serial += Wrapping(1u32);
|
||||
imservice.send_event();
|
||||
}
|
||||
@ -156,7 +162,7 @@ pub mod c {
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn imservice_handle_unavailable(imservice: *mut IMService,
|
||||
im: *mut InputMethod)
|
||||
im: InputMethod)
|
||||
{
|
||||
let imservice = check_imservice(imservice, im).unwrap();
|
||||
unsafe { imservice_destroy_im(im); }
|
||||
@ -181,7 +187,7 @@ pub mod c {
|
||||
/// Care must be take
|
||||
/// not to exceed the lifetime of the pointer with the reference,
|
||||
/// especially not to store it.
|
||||
fn check_imservice(imservice: *mut IMService, im: *const InputMethod)
|
||||
fn check_imservice(imservice: *mut IMService, im: InputMethod)
|
||||
-> Result<&'static mut IMService, &'static str>
|
||||
{
|
||||
if imservice.is_null() {
|
||||
@ -220,7 +226,7 @@ bitflags!{
|
||||
/// use rs::imservice::ContentPurpose;
|
||||
/// assert_eq!(ContentPurpose::Alpha as u32, 1);
|
||||
/// ```
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
pub enum ContentPurpose {
|
||||
Normal = 0,
|
||||
Alpha = 1,
|
||||
@ -315,7 +321,7 @@ impl Default for IMProtocolState {
|
||||
|
||||
pub struct IMService {
|
||||
/// Owned reference (still created and destroyed in C)
|
||||
pub im: *mut c::InputMethod,
|
||||
pub im: c::InputMethod,
|
||||
sender: driver::Threaded,
|
||||
|
||||
pending: IMProtocolState,
|
||||
@ -331,7 +337,7 @@ pub enum SubmitError {
|
||||
|
||||
impl IMService {
|
||||
pub fn new(
|
||||
im: *mut c::InputMethod,
|
||||
im: c::InputMethod,
|
||||
sender: driver::Threaded,
|
||||
) -> Box<IMService> {
|
||||
// IMService will be referenced to by C,
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
#include "eek/eek-gtk-keyboard.h"
|
||||
#include "eek/eek-renderer.h"
|
||||
#include "eek/eek-types.h"
|
||||
#include "src/main.h"
|
||||
#include "src/popover.h"
|
||||
#include "src/submission.h"
|
||||
#include "virtual-keyboard-unstable-v1-client-protocol.h"
|
||||
#include "text-input-unstable-v3-client-protocol.h"
|
||||
@ -40,7 +42,8 @@ void squeek_layout_release(struct squeek_layout *layout,
|
||||
struct submission *submission,
|
||||
struct transformation widget_to_layout,
|
||||
uint32_t timestamp,
|
||||
EekboardContextService *manager,
|
||||
struct squeek_popover *popover,
|
||||
struct squeek_state_manager *state,
|
||||
EekGtkKeyboard *ui_keyboard);
|
||||
void squeek_layout_release_all_only(struct squeek_layout *layout,
|
||||
struct submission *submission,
|
||||
@ -54,7 +57,8 @@ void squeek_layout_drag(struct squeek_layout *layout,
|
||||
struct submission *submission,
|
||||
double x_widget, double y_widget,
|
||||
struct transformation widget_to_layout,
|
||||
uint32_t timestamp, EekboardContextService *manager,
|
||||
uint32_t timestamp, struct squeek_popover *popover,
|
||||
struct squeek_state_manager *state,
|
||||
EekGtkKeyboard *ui_keyboard);
|
||||
void squeek_layout_draw_all_changed(struct squeek_layout *layout, EekRenderer* renderer, cairo_t *cr, struct submission *submission);
|
||||
void squeek_draw_layout_base_view(struct squeek_layout *layout, EekRenderer* renderer, cairo_t *cr);
|
||||
|
||||
155
src/layout.rs
155
src/layout.rs
@ -18,36 +18,43 @@
|
||||
*/
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::cmp;
|
||||
use std::collections::{ HashMap, HashSet };
|
||||
use std::ffi::CString;
|
||||
use std::fmt;
|
||||
use std::rc::Rc;
|
||||
use std::vec::Vec;
|
||||
|
||||
use ::action::Action;
|
||||
use ::drawing;
|
||||
use ::keyboard::KeyState;
|
||||
use ::logging;
|
||||
use ::manager;
|
||||
use ::submission::{ Submission, SubmitData, Timestamp };
|
||||
use ::util::find_max_double;
|
||||
use crate::action::Action;
|
||||
use crate::actors;
|
||||
use crate::drawing;
|
||||
use crate::float_ord::FloatOrd;
|
||||
use crate::keyboard::KeyState;
|
||||
use crate::logging;
|
||||
use crate::popover;
|
||||
use crate::receiver;
|
||||
use crate::submission::{ Submission, SubmitData, Timestamp };
|
||||
use crate::util::find_max_double;
|
||||
|
||||
use ::imservice::ContentPurpose;
|
||||
use crate::imservice::ContentPurpose;
|
||||
|
||||
// Traits
|
||||
use std::borrow::Borrow;
|
||||
use ::logging::Warn;
|
||||
use crate::logging::Warn;
|
||||
|
||||
/// Gathers stuff defined in C or called by C
|
||||
pub mod c {
|
||||
use super::*;
|
||||
|
||||
use gtk_sys;
|
||||
use std::os::raw::c_void;
|
||||
|
||||
use crate::receiver;
|
||||
use crate::submission::c::Submission as CSubmission;
|
||||
|
||||
use gtk_sys;
|
||||
use std::ops::{ Add, Sub };
|
||||
|
||||
use std::os::raw::c_void;
|
||||
|
||||
use crate::util::CloneOwned;
|
||||
|
||||
// The following defined in C
|
||||
#[repr(transparent)]
|
||||
#[derive(Copy, Clone)]
|
||||
@ -117,28 +124,30 @@ pub mod c {
|
||||
pub struct Transformation {
|
||||
pub origin_x: f64,
|
||||
pub origin_y: f64,
|
||||
pub scale: f64,
|
||||
pub scale_x: f64,
|
||||
pub scale_y: f64,
|
||||
}
|
||||
|
||||
impl Transformation {
|
||||
/// Applies the new transformation after this one
|
||||
pub fn chain(self, next: Transformation) -> Transformation {
|
||||
Transformation {
|
||||
origin_x: self.origin_x + self.scale * next.origin_x,
|
||||
origin_y: self.origin_y + self.scale * next.origin_y,
|
||||
scale: self.scale * next.scale,
|
||||
origin_x: self.origin_x + self.scale_x * next.origin_x,
|
||||
origin_y: self.origin_y + self.scale_y * next.origin_y,
|
||||
scale_x: self.scale_x * next.scale_x,
|
||||
scale_y: self.scale_y * next.scale_y,
|
||||
}
|
||||
}
|
||||
fn forward(&self, p: Point) -> Point {
|
||||
Point {
|
||||
x: (p.x - self.origin_x) / self.scale,
|
||||
y: (p.y - self.origin_y) / self.scale,
|
||||
x: (p.x - self.origin_x) / self.scale_x,
|
||||
y: (p.y - self.origin_y) / self.scale_y,
|
||||
}
|
||||
}
|
||||
fn reverse(&self, p: Point) -> Point {
|
||||
Point {
|
||||
x: p.x * self.scale + self.origin_x,
|
||||
y: p.y * self.scale + self.origin_y,
|
||||
x: p.x * self.scale_x + self.origin_x,
|
||||
y: p.y * self.scale_y + self.origin_y,
|
||||
}
|
||||
}
|
||||
pub fn reverse_bounds(&self, b: Bounds) -> Bounds {
|
||||
@ -211,13 +220,17 @@ pub mod c {
|
||||
submission: CSubmission,
|
||||
widget_to_layout: Transformation,
|
||||
time: u32,
|
||||
manager: manager::c::Manager,
|
||||
popover: actors::popover::c::Actor,
|
||||
app_state: receiver::c::State,
|
||||
ui_keyboard: EekGtkKeyboard,
|
||||
) {
|
||||
let time = Timestamp(time);
|
||||
let layout = unsafe { &mut *layout };
|
||||
let submission = submission.clone_ref();
|
||||
let mut submission = submission.borrow_mut();
|
||||
let app_state = app_state.clone_owned();
|
||||
let popover_state = popover.clone_owned();
|
||||
|
||||
let ui_backend = UIBackend {
|
||||
widget_to_layout,
|
||||
keyboard: ui_keyboard,
|
||||
@ -232,7 +245,7 @@ pub mod c {
|
||||
&mut submission,
|
||||
Some(&ui_backend),
|
||||
time,
|
||||
Some(manager),
|
||||
Some((&popover_state, app_state.clone())),
|
||||
key,
|
||||
);
|
||||
}
|
||||
@ -311,13 +324,18 @@ pub mod c {
|
||||
x_widget: f64, y_widget: f64,
|
||||
widget_to_layout: Transformation,
|
||||
time: u32,
|
||||
manager: manager::c::Manager,
|
||||
popover: actors::popover::c::Actor,
|
||||
app_state: receiver::c::State,
|
||||
ui_keyboard: EekGtkKeyboard,
|
||||
) {
|
||||
let time = Timestamp(time);
|
||||
let layout = unsafe { &mut *layout };
|
||||
let submission = submission.clone_ref();
|
||||
let mut submission = submission.borrow_mut();
|
||||
// We only need to query state here, not update.
|
||||
// A copy is enough.
|
||||
let popover_state = popover.clone_owned();
|
||||
let app_state = app_state.clone_owned();
|
||||
let ui_backend = UIBackend {
|
||||
widget_to_layout,
|
||||
keyboard: ui_keyboard,
|
||||
@ -348,7 +366,7 @@ pub mod c {
|
||||
&mut submission,
|
||||
Some(&ui_backend),
|
||||
time,
|
||||
Some(manager),
|
||||
Some((&popover_state, app_state.clone())),
|
||||
key,
|
||||
);
|
||||
}
|
||||
@ -373,7 +391,7 @@ pub mod c {
|
||||
&mut submission,
|
||||
Some(&ui_backend),
|
||||
time,
|
||||
Some(manager),
|
||||
Some((&popover_state, app_state.clone())),
|
||||
key,
|
||||
);
|
||||
}
|
||||
@ -394,7 +412,8 @@ pub mod c {
|
||||
let transform = Transformation {
|
||||
origin_x: 10f64,
|
||||
origin_y: 11f64,
|
||||
scale: 12f64,
|
||||
scale_x: 12f64,
|
||||
scale_y: 13f64,
|
||||
};
|
||||
let point = Point { x: 1f64, y: 1f64 };
|
||||
let transformed = transform.reverse(transform.forward(point.clone()));
|
||||
@ -755,16 +774,20 @@ impl Layout {
|
||||
let size = self.calculate_size();
|
||||
let h_scale = available.width / size.width;
|
||||
let v_scale = available.height / size.height;
|
||||
let scale = if h_scale < v_scale { h_scale } else { v_scale };
|
||||
// Allow up to 5% (and a bit more) horizontal stretching for filling up available space
|
||||
let scale_x = if (h_scale / v_scale) < 1.055 { h_scale } else { v_scale };
|
||||
let scale_y = cmp::min(FloatOrd(h_scale), FloatOrd(v_scale)).0;
|
||||
let outside_margins = c::Transformation {
|
||||
origin_x: (available.width - (scale * size.width)) / 2.0,
|
||||
origin_y: (available.height - (scale * size.height)) / 2.0,
|
||||
scale: scale,
|
||||
origin_x: (available.width - (scale_x * size.width)) / 2.0,
|
||||
origin_y: (available.height - (scale_y * size.height)) / 2.0,
|
||||
scale_x: scale_x,
|
||||
scale_y: scale_y,
|
||||
};
|
||||
outside_margins.chain(c::Transformation {
|
||||
origin_x: self.margins.left,
|
||||
origin_y: self.margins.top,
|
||||
scale: 1.0,
|
||||
scale_x: 1.0,
|
||||
scale_y: 1.0,
|
||||
})
|
||||
}
|
||||
|
||||
@ -1026,7 +1049,11 @@ mod seat {
|
||||
submission: &mut Submission,
|
||||
ui: Option<&UIBackend>,
|
||||
time: Timestamp,
|
||||
manager: Option<manager::c::Manager>,
|
||||
// TODO: intermediate measure:
|
||||
// passing state conditionally because it's only used for popover.
|
||||
// Eventually, it should be used for sumitting button events,
|
||||
// and passed always.
|
||||
manager: Option<(&actors::popover::State, receiver::State)>,
|
||||
rckey: &Rc<RefCell<KeyState>>,
|
||||
) {
|
||||
let key: KeyState = {
|
||||
@ -1061,7 +1088,7 @@ mod seat {
|
||||
// only show when UI is present
|
||||
Action::ShowPreferences => if let Some(ui) = &ui {
|
||||
// only show when layout manager is available
|
||||
if let Some(manager) = manager {
|
||||
if let Some((manager, app_state)) = manager {
|
||||
let view = layout.get_current_view();
|
||||
let places = ::layout::procedures::find_key_places(
|
||||
view, &rckey,
|
||||
@ -1076,10 +1103,11 @@ mod seat {
|
||||
width: button.size.width,
|
||||
height: button.size.height,
|
||||
};
|
||||
::popover::show(
|
||||
popover::show(
|
||||
ui.keyboard,
|
||||
ui.widget_to_layout.reverse_bounds(bounds),
|
||||
manager,
|
||||
app_state,
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1471,8 +1499,63 @@ mod test {
|
||||
let transformation = layout.calculate_transformation(
|
||||
Size { width: 2.0, height: 2.0 }
|
||||
);
|
||||
assert_eq!(transformation.scale, 1.0);
|
||||
assert_eq!(transformation.scale_x, 1.0);
|
||||
assert_eq!(transformation.scale_y, 1.0);
|
||||
assert_eq!(transformation.origin_x, 0.5);
|
||||
assert_eq!(transformation.origin_y, 0.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn check_stretching() {
|
||||
// just one button
|
||||
let view = View::new(vec![
|
||||
(
|
||||
0.0,
|
||||
Row::new(vec![(
|
||||
0.0,
|
||||
Box::new(Button {
|
||||
size: Size { width: 1.0, height: 1.0 },
|
||||
..*make_button_with_state("foo".into(), make_state())
|
||||
}),
|
||||
)]),
|
||||
),
|
||||
]);
|
||||
let layout = Layout {
|
||||
current_view: String::new(),
|
||||
view_latched: LatchedState::Not,
|
||||
keymaps: Vec::new(),
|
||||
kind: ArrangementKind::Base,
|
||||
pressed_keys: HashSet::new(),
|
||||
margins: Margins {
|
||||
top: 0.0,
|
||||
left: 0.0,
|
||||
right: 0.0,
|
||||
bottom: 0.0,
|
||||
},
|
||||
views: hashmap! {
|
||||
String::new() => (c::Point { x: 0.0, y: 0.0 }, view),
|
||||
},
|
||||
purpose: ContentPurpose::Normal,
|
||||
};
|
||||
let transformation = layout.calculate_transformation(
|
||||
Size { width: 100.0, height: 100.0 }
|
||||
);
|
||||
assert_eq!(transformation.scale_x, 100.0);
|
||||
assert_eq!(transformation.scale_y, 100.0);
|
||||
let transformation = layout.calculate_transformation(
|
||||
Size { width: 95.0, height: 100.0 }
|
||||
);
|
||||
assert_eq!(transformation.scale_x, 95.0);
|
||||
assert_eq!(transformation.scale_y, 95.0);
|
||||
let transformation = layout.calculate_transformation(
|
||||
Size { width: 105.0, height: 100.0 }
|
||||
);
|
||||
assert_eq!(transformation.scale_x, 105.0);
|
||||
assert_eq!(transformation.scale_y, 100.0);
|
||||
let transformation = layout.calculate_transformation(
|
||||
Size { width: 106.0, height: 100.0 }
|
||||
);
|
||||
assert_eq!(transformation.scale_x, 100.0);
|
||||
assert_eq!(transformation.scale_y, 100.0);
|
||||
}
|
||||
}
|
||||
|
||||
12
src/lib.rs
12
src/lib.rs
@ -11,16 +11,22 @@ extern crate gtk_sys;
|
||||
#[allow(unused_imports)]
|
||||
#[macro_use] // only for tests
|
||||
extern crate maplit;
|
||||
extern crate regex;
|
||||
extern crate serde;
|
||||
extern crate xkbcommon;
|
||||
extern crate zbus;
|
||||
extern crate zvariant;
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
mod assert_matches;
|
||||
#[macro_use]
|
||||
mod logging;
|
||||
|
||||
mod action;
|
||||
mod actors;
|
||||
mod animation;
|
||||
pub mod data;
|
||||
mod debug;
|
||||
mod drawing;
|
||||
mod event_loop;
|
||||
pub mod float_ord;
|
||||
@ -29,15 +35,15 @@ mod keyboard;
|
||||
mod layout;
|
||||
mod locale;
|
||||
mod main;
|
||||
mod manager;
|
||||
mod outputs;
|
||||
mod panel;
|
||||
mod popover;
|
||||
mod receiver;
|
||||
mod resources;
|
||||
mod state;
|
||||
mod style;
|
||||
mod submission;
|
||||
pub mod tests;
|
||||
pub mod util;
|
||||
mod ui_manager;
|
||||
mod vkeyboard;
|
||||
mod xdg;
|
||||
|
||||
@ -8,6 +8,8 @@
|
||||
|
||||
#include "eek/eek-types.h"
|
||||
#include "dbus.h"
|
||||
#include "panel.h"
|
||||
#include "src/popover.h"
|
||||
|
||||
|
||||
struct receiver;
|
||||
@ -21,13 +23,16 @@ struct rsobjects {
|
||||
struct receiver *receiver;
|
||||
struct squeek_state_manager *state_manager;
|
||||
struct submission *submission;
|
||||
struct squeek_wayland *wayland;
|
||||
struct squeek_popover *popover;
|
||||
};
|
||||
|
||||
void register_ui_loop_handler(struct receiver *receiver, ServerContextService *ui, DBusHandler *dbus_handler);
|
||||
void register_ui_loop_handler(struct receiver *receiver, struct panel_manager *panel, struct squeek_popover *popover, EekboardContextService *hint_manager, DBusHandler *dbus_handler);
|
||||
|
||||
struct rsobjects squeek_rsobjects_new(struct zwp_input_method_v2 *im, struct zwp_virtual_keyboard_v1 *vk);
|
||||
struct rsobjects squeek_init(void);
|
||||
|
||||
void squeek_state_send_force_visible(struct squeek_state_manager *state);
|
||||
void squeek_state_send_force_hidden(struct squeek_state_manager *state);
|
||||
|
||||
void squeek_state_send_keyboard_present(struct squeek_state_manager *state, uint32_t keyboard_present);
|
||||
void squeek_state_send_layout_set(struct squeek_state_manager *state, char *name, char *layout, uint32_t timestamp);
|
||||
|
||||
157
src/main.rs
157
src/main.rs
@ -1,47 +1,89 @@
|
||||
/* Copyright (C) 2020 Purism SPC
|
||||
/* Copyright (C) 2020,2022 Purism SPC
|
||||
* SPDX-License-Identifier: GPL-3.0+
|
||||
*/
|
||||
|
||||
/*! Glue for the main loop. */
|
||||
|
||||
use crate::state;
|
||||
use crate::actors;
|
||||
use crate::animation;
|
||||
use crate::debug;
|
||||
use crate::data::loading;
|
||||
use crate::panel;
|
||||
use glib::{Continue, MainContext, PRIORITY_DEFAULT, Receiver};
|
||||
|
||||
|
||||
mod c {
|
||||
use super::*;
|
||||
use std::os::raw::c_void;
|
||||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
use std::time::Instant;
|
||||
|
||||
use crate::event_loop::driver;
|
||||
use crate::imservice::IMService;
|
||||
use crate::imservice::c::InputMethod;
|
||||
use crate::layout;
|
||||
use crate::outputs::Outputs;
|
||||
use crate::state;
|
||||
use crate::submission::Submission;
|
||||
use crate::util::c::Wrapped;
|
||||
use crate::vkeyboard::c::ZwpVirtualKeyboardV1;
|
||||
|
||||
/// ServerContextService*
|
||||
#[repr(transparent)]
|
||||
pub struct UIManager(*const c_void);
|
||||
|
||||
/// DbusHandler*
|
||||
#[repr(transparent)]
|
||||
pub struct DBusHandler(*const c_void);
|
||||
|
||||
/// EekboardContextService* in the role of a hint receiver
|
||||
// The clone/copy is a concession to C style of programming.
|
||||
// It would be hard to get rid of it.
|
||||
#[repr(transparent)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct HintManager(*const c_void);
|
||||
|
||||
/// Holds the Rust structures that are interesting from C.
|
||||
#[repr(C)]
|
||||
pub struct RsObjects {
|
||||
/// The handle to which Commands should be sent
|
||||
/// for processing in the main loop.
|
||||
receiver: Wrapped<Receiver<Commands>>,
|
||||
state_manager: Wrapped<driver::Threaded>,
|
||||
submission: Wrapped<Submission>,
|
||||
/// Not wrapped, because C needs to access this.
|
||||
wayland: *mut Wayland,
|
||||
popover: actors::popover::c::Actor,
|
||||
}
|
||||
|
||||
/// Corresponds to wayland.h::squeek_wayland.
|
||||
/// Fields unused by Rust are marked as generic data types.
|
||||
#[repr(C)]
|
||||
pub struct Wayland {
|
||||
layer_shell: *const c_void,
|
||||
virtual_keyboard_manager: *const c_void,
|
||||
input_method_manager: *const c_void,
|
||||
outputs: Wrapped<Outputs>,
|
||||
seat: *const c_void,
|
||||
input_method: InputMethod,
|
||||
virtual_keyboard: ZwpVirtualKeyboardV1,
|
||||
}
|
||||
|
||||
impl Wayland {
|
||||
fn new(outputs_manager: Outputs) -> Self {
|
||||
Wayland {
|
||||
layer_shell: ptr::null(),
|
||||
virtual_keyboard_manager: ptr::null(),
|
||||
input_method_manager: ptr::null(),
|
||||
outputs: Wrapped::new(outputs_manager),
|
||||
seat: ptr::null(),
|
||||
input_method: InputMethod::null(),
|
||||
virtual_keyboard: ZwpVirtualKeyboardV1::null(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
fn server_context_service_real_show_keyboard(service: *const UIManager);
|
||||
fn server_context_service_real_hide_keyboard(service: *const UIManager);
|
||||
fn server_context_service_set_hint_purpose(service: *const UIManager, hint: u32, purpose: u32);
|
||||
#[allow(improper_ctypes)]
|
||||
fn init_wayland(wayland: *mut Wayland);
|
||||
#[allow(improper_ctypes)]
|
||||
fn eekboard_context_service_set_layout(service: HintManager, layout: *const layout::Layout, timestamp: u32);
|
||||
// This should probably only get called from the gtk main loop,
|
||||
// given that dbus handler is using glib.
|
||||
fn dbus_handler_set_visible(dbus: *const DBusHandler, visible: u8);
|
||||
@ -52,19 +94,25 @@ mod c {
|
||||
/// and that leads to suffering.
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn squeek_rsobjects_new(
|
||||
im: *mut InputMethod,
|
||||
vk: ZwpVirtualKeyboardV1,
|
||||
) -> RsObjects {
|
||||
fn squeek_init() -> RsObjects {
|
||||
// Set up channels
|
||||
let (sender, receiver) = MainContext::channel(PRIORITY_DEFAULT);
|
||||
|
||||
let now = Instant::now();
|
||||
let state_manager = driver::Threaded::new(sender, state::Application::new(now));
|
||||
|
||||
let imservice = if im.is_null() {
|
||||
debug::init(state_manager.clone());
|
||||
|
||||
let outputs = Outputs::new(state_manager.clone());
|
||||
let mut wayland = Box::new(Wayland::new(outputs));
|
||||
let wayland_raw = &mut *wayland as *mut _;
|
||||
unsafe { init_wayland(wayland_raw); }
|
||||
|
||||
let vk = wayland.virtual_keyboard;
|
||||
|
||||
let imservice = if wayland.input_method.is_null() {
|
||||
None
|
||||
} else {
|
||||
Some(IMService::new(im, state_manager.clone()))
|
||||
Some(IMService::new(wayland.input_method, state_manager.clone()))
|
||||
};
|
||||
let submission = Submission::new(vk, imservice);
|
||||
|
||||
@ -72,6 +120,8 @@ mod c {
|
||||
submission: Wrapped::new(submission),
|
||||
state_manager: Wrapped::new(state_manager),
|
||||
receiver: Wrapped::new(receiver),
|
||||
wayland: Box::into_raw(wayland),
|
||||
popover: Wrapped::new(actors::popover::State::new()),
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,21 +130,31 @@ mod c {
|
||||
pub extern "C"
|
||||
fn register_ui_loop_handler(
|
||||
receiver: Wrapped<Receiver<Commands>>,
|
||||
ui_manager: *const UIManager,
|
||||
panel_manager: panel::c::PanelManager,
|
||||
popover: actors::popover::c::Actor,
|
||||
hint_manager: HintManager,
|
||||
dbus_handler: *const DBusHandler,
|
||||
) {
|
||||
let receiver = unsafe { receiver.unwrap() };
|
||||
let receiver = Rc::try_unwrap(receiver).expect("References still present");
|
||||
let receiver = receiver.into_inner();
|
||||
let panel_manager = Wrapped::new(panel::Manager::new(panel_manager));
|
||||
let ctx = MainContext::default();
|
||||
ctx.acquire();
|
||||
let _acqu = ctx.acquire();
|
||||
receiver.attach(
|
||||
Some(&ctx),
|
||||
move |msg| {
|
||||
main_loop_handle_message(msg, ui_manager, dbus_handler);
|
||||
main_loop_handle_message(
|
||||
msg,
|
||||
panel_manager.clone(),
|
||||
&popover,
|
||||
hint_manager,
|
||||
dbus_handler,
|
||||
);
|
||||
Continue(true)
|
||||
},
|
||||
);
|
||||
#[cfg(not(feature = "glib_v0_14"))]
|
||||
ctx.release();
|
||||
}
|
||||
|
||||
@ -104,46 +164,51 @@ mod c {
|
||||
/// and doesn't lend itself to testing other than integration.
|
||||
fn main_loop_handle_message(
|
||||
msg: Commands,
|
||||
ui_manager: *const UIManager,
|
||||
panel_manager: Wrapped<panel::Manager>,
|
||||
popover: &actors::popover::c::Actor,
|
||||
hint_manager: HintManager,
|
||||
dbus_handler: *const DBusHandler,
|
||||
) {
|
||||
match msg.panel_visibility {
|
||||
Some(PanelCommand::Show) => unsafe {
|
||||
server_context_service_real_show_keyboard(ui_manager);
|
||||
},
|
||||
Some(PanelCommand::Hide) => unsafe {
|
||||
server_context_service_real_hide_keyboard(ui_manager);
|
||||
},
|
||||
None => {},
|
||||
};
|
||||
|
||||
if let Some(visible) = msg.dbus_visible_set {
|
||||
unsafe { dbus_handler_set_visible(dbus_handler, visible as u8) };
|
||||
if let Some(visibility) = msg.panel_visibility {
|
||||
panel::Manager::update(panel_manager, visibility);
|
||||
}
|
||||
|
||||
if let Some(hints) = msg.layout_hint_set {
|
||||
if let Some(visible) = msg.dbus_visible_set {
|
||||
if dbus_handler != std::ptr::null() {
|
||||
unsafe { dbus_handler_set_visible(dbus_handler, visible as u8) };
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(commands::SetLayout { description }) = msg.layout_selection {
|
||||
let animation::Contents {
|
||||
name,
|
||||
kind,
|
||||
overlay_name,
|
||||
purpose,
|
||||
} = description;
|
||||
actors::popover::set_overlay(popover, overlay_name.clone());
|
||||
let layout = loading::load_layout(name, kind, purpose, overlay_name);
|
||||
let layout = Box::into_raw(Box::new(layout));
|
||||
unsafe {
|
||||
server_context_service_set_hint_purpose(
|
||||
ui_manager,
|
||||
hints.hint.bits(),
|
||||
hints.purpose.clone() as u32,
|
||||
)
|
||||
};
|
||||
eekboard_context_service_set_layout(hint_manager, layout, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
pub enum PanelCommand {
|
||||
Show,
|
||||
Hide,
|
||||
pub mod commands {
|
||||
use crate::animation;
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct SetLayout {
|
||||
pub description: animation::Contents,
|
||||
}
|
||||
}
|
||||
|
||||
/// The commands consumed by the main loop,
|
||||
/// to be sent out to external components.
|
||||
#[derive(Clone)]
|
||||
pub struct Commands {
|
||||
pub panel_visibility: Option<PanelCommand>,
|
||||
pub layout_hint_set: Option<state::InputMethodDetails>,
|
||||
pub panel_visibility: Option<panel::Command>,
|
||||
pub dbus_visible_set: Option<bool>,
|
||||
pub layout_selection: Option<commands::SetLayout>,
|
||||
}
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
/*! Procedures relating to the management of the switching of layouts */
|
||||
use ::util;
|
||||
|
||||
pub mod c {
|
||||
use std::os::raw::{c_char, c_void};
|
||||
|
||||
/// EekboardContextService*
|
||||
#[repr(transparent)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Manager(*const c_void);
|
||||
|
||||
extern "C" {
|
||||
pub fn eekboard_context_service_set_overlay(
|
||||
manager: Manager,
|
||||
name: *const c_char,
|
||||
);
|
||||
|
||||
pub fn eekboard_context_service_get_overlay(
|
||||
manager: Manager,
|
||||
) -> *const c_char;
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the overlay name.
|
||||
/// The result lifetime is "as long as the C copy lives"
|
||||
pub fn get_overlay(manager: c::Manager) -> Option<String> {
|
||||
let raw_str = unsafe {
|
||||
c::eekboard_context_service_get_overlay(manager)
|
||||
};
|
||||
// this string is generated from Rust, should never be invalid
|
||||
util::c::as_str(&raw_str).unwrap()
|
||||
.map(String::from)
|
||||
}
|
||||
@ -14,6 +14,7 @@ sources = [
|
||||
config_h,
|
||||
'dbus.c',
|
||||
'imservice.c',
|
||||
'panel.c',
|
||||
'popover.c',
|
||||
'server-context-service.c',
|
||||
'wayland.c',
|
||||
@ -24,18 +25,22 @@ sources = [
|
||||
'../eek/eek-renderer.c',
|
||||
'../eek/eek-types.c',
|
||||
'../eek/layersurface.c',
|
||||
dbus_src,
|
||||
'../eekboard/eekboard-context-service.c',
|
||||
# '../eekboard/eekboard-xklutil.c',
|
||||
squeekboard_resources,
|
||||
wl_proto_sources,
|
||||
]
|
||||
|
||||
generated_sources = declare_dependency(
|
||||
sources: [
|
||||
dbus_src,
|
||||
squeekboard_resources,
|
||||
wl_proto_sources,
|
||||
],
|
||||
)
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
|
||||
deps = [
|
||||
# dependency('glib-2.0', version: '>=2.26.0'),
|
||||
generated_sources,
|
||||
dependency('gio-2.0', version: '>=2.26.0'),
|
||||
dependency('gio-unix-2.0'),
|
||||
dependency('gnome-desktop-3.0', version: '>=3.0'),
|
||||
@ -58,7 +63,7 @@ rslibs = custom_target(
|
||||
install: false,
|
||||
console: true,
|
||||
command: [cargo_build] + ['@OUTPUT@', '--lib'] + cargo_build_flags,
|
||||
depends: cargo_toml,
|
||||
depends: cargo_deps,
|
||||
)
|
||||
|
||||
build_rstests = custom_target(
|
||||
@ -73,7 +78,7 @@ build_rstests = custom_target(
|
||||
install: false,
|
||||
console: true,
|
||||
command: [cargo_script, 'test', '--no-run'] + cargo_build_flags,
|
||||
depends: [rslibs, cargo_toml], # no point building tests if the code itself fails
|
||||
depends: [rslibs, cargo_deps], # no point building tests if the code itself fails
|
||||
)
|
||||
|
||||
test(
|
||||
@ -83,7 +88,7 @@ test(
|
||||
env: ['SOURCE_DIR=' + meson.source_root()],
|
||||
# this is a whole Carg-based test suite, let it run for a while
|
||||
timeout: 900,
|
||||
depends: [build_rstests, cargo_toml],
|
||||
depends: [build_rstests, cargo_deps],
|
||||
)
|
||||
|
||||
libsqueekboard = static_library('libsqueekboard',
|
||||
@ -100,8 +105,6 @@ libsqueekboard = static_library('libsqueekboard',
|
||||
|
||||
squeekboard = executable('squeekboard',
|
||||
'server-main.c',
|
||||
wl_proto_sources,
|
||||
squeekboard_resources,
|
||||
link_with: libsqueekboard,
|
||||
include_directories: [include_directories('..'), include_directories('../eek')],
|
||||
dependencies: deps,
|
||||
|
||||
@ -11,7 +11,8 @@ struct squeek_output_handle {
|
||||
|
||||
struct squeek_outputs *squeek_outputs_new(void);
|
||||
void squeek_outputs_free(struct squeek_outputs*);
|
||||
void squeek_outputs_register(struct squeek_outputs*, struct wl_output *output);
|
||||
void squeek_outputs_register(struct squeek_outputs*, struct wl_output *output, uint32_t id);
|
||||
struct wl_output *squeek_outputs_try_unregister(struct squeek_outputs*, uint32_t id);
|
||||
struct squeek_output_handle squeek_outputs_get_current(struct squeek_outputs*);
|
||||
int32_t squeek_outputs_get_perceptual_width(struct squeek_outputs*, struct wl_output *output);
|
||||
#endif
|
||||
|
||||
339
src/outputs.rs
339
src/outputs.rs
@ -1,7 +1,14 @@
|
||||
/* Copyright (C) 2019-2022 Purism SPC
|
||||
* SPDX-License-Identifier: GPL-3.0+
|
||||
*/
|
||||
|
||||
/*! Managing Wayland outputs */
|
||||
|
||||
use std::ops;
|
||||
use std::vec::Vec;
|
||||
use crate::event_loop;
|
||||
use ::logging;
|
||||
use crate::util::DivCeil;
|
||||
|
||||
// traits
|
||||
use ::logging::Warn;
|
||||
@ -11,15 +18,22 @@ pub mod c {
|
||||
use super::*;
|
||||
|
||||
use std::os::raw::{ c_char, c_void };
|
||||
use std::ptr;
|
||||
|
||||
use ::util::c::COpaquePtr;
|
||||
use ::util::c::{COpaquePtr, Wrapped};
|
||||
|
||||
// Defined in C
|
||||
|
||||
#[repr(transparent)]
|
||||
#[derive(Clone, PartialEq, Copy)]
|
||||
#[derive(Clone, PartialEq, Copy, Debug, Eq, Hash)]
|
||||
pub struct WlOutput(*const c_void);
|
||||
|
||||
impl WlOutput {
|
||||
fn null() -> Self {
|
||||
Self(ptr::null())
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
struct WlOutputListener<T: COpaquePtr> {
|
||||
geometry: extern fn(
|
||||
@ -63,7 +77,7 @@ pub mod c {
|
||||
}
|
||||
|
||||
/// Map to `wl_output.transform` values
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub enum Transform {
|
||||
Normal = 0,
|
||||
Rotated90 = 1,
|
||||
@ -103,33 +117,18 @@ pub mod c {
|
||||
) -> i32;
|
||||
}
|
||||
|
||||
type COutputs = ::util::c::Wrapped<Outputs>;
|
||||
|
||||
/// A stable reference to an output.
|
||||
#[derive(Clone)]
|
||||
#[repr(C)]
|
||||
pub struct OutputHandle {
|
||||
wl_output: WlOutput,
|
||||
outputs: COutputs,
|
||||
}
|
||||
|
||||
impl OutputHandle {
|
||||
// Cannot return an Output reference
|
||||
// because COutputs is too deeply wrapped
|
||||
pub fn get_state(&self) -> Option<OutputState> {
|
||||
let outputs = self.outputs.clone_ref();
|
||||
let outputs = outputs.borrow();
|
||||
find_output(&outputs, self.wl_output.clone()).map(|o| o.current.clone())
|
||||
}
|
||||
}
|
||||
/// Wrapping Outputs is required for calling its methods from C
|
||||
type COutputs = Wrapped<Outputs>;
|
||||
|
||||
// Defined in Rust
|
||||
|
||||
// Callbacks from the output listener follow
|
||||
|
||||
extern fn outputs_handle_geometry(
|
||||
outputs: COutputs,
|
||||
wl_output: WlOutput,
|
||||
_x: i32, _y: i32,
|
||||
_phys_width: i32, _phys_height: i32,
|
||||
phys_width: i32, phys_height: i32,
|
||||
_subpixel: i32,
|
||||
_make: *const c_char, _model: *const c_char,
|
||||
transform: i32,
|
||||
@ -143,10 +142,23 @@ pub mod c {
|
||||
let outputs = outputs.clone_ref();
|
||||
let mut collection = outputs.borrow_mut();
|
||||
let output_state: Option<&mut OutputState>
|
||||
= find_output_mut(&mut collection, wl_output)
|
||||
= collection
|
||||
.find_output_mut(wl_output)
|
||||
.map(|o| &mut o.pending);
|
||||
match output_state {
|
||||
Some(state) => { state.transform = Some(transform) },
|
||||
Some(state) => {
|
||||
fn maybe_mm(value: i32) -> Option<Millimeter> {
|
||||
if value == 0 { None }
|
||||
else { Some(Millimeter(value)) }
|
||||
}
|
||||
state.geometry = Some(Geometry {
|
||||
phys_size: Size {
|
||||
width: maybe_mm(phys_width),
|
||||
height: maybe_mm(phys_height),
|
||||
},
|
||||
transform,
|
||||
});
|
||||
},
|
||||
None => log_print!(
|
||||
logging::Level::Warning,
|
||||
"Got geometry on unknown output",
|
||||
@ -171,7 +183,8 @@ pub mod c {
|
||||
let outputs = outputs.clone_ref();
|
||||
let mut collection = outputs.borrow_mut();
|
||||
let output_state: Option<&mut OutputState>
|
||||
= find_output_mut(&mut collection, wl_output)
|
||||
= collection
|
||||
.find_output_mut(wl_output)
|
||||
.map(|o| &mut o.pending);
|
||||
match output_state {
|
||||
Some(state) => {
|
||||
@ -192,14 +205,27 @@ pub mod c {
|
||||
) {
|
||||
let outputs = outputs.clone_ref();
|
||||
let mut collection = outputs.borrow_mut();
|
||||
let output = find_output_mut(&mut collection, wl_output);
|
||||
match output {
|
||||
Some(output) => { output.current = output.pending.clone(); }
|
||||
None => log_print!(
|
||||
logging::Level::Warning,
|
||||
"Got done on unknown output",
|
||||
),
|
||||
let output = collection
|
||||
.find_output_mut(wl_output);
|
||||
let event = match output {
|
||||
Some(output) => {
|
||||
output.current = output.pending.clone();
|
||||
Some(Event {
|
||||
output: OutputId(wl_output),
|
||||
change: ChangeType::Altered(output.current),
|
||||
})
|
||||
},
|
||||
None => {
|
||||
log_print!(
|
||||
logging::Level::Warning,
|
||||
"Got done on unknown output",
|
||||
);
|
||||
None
|
||||
}
|
||||
};
|
||||
if let Some(event) = event {
|
||||
collection.send_event(event);
|
||||
}
|
||||
}
|
||||
|
||||
extern fn outputs_handle_scale(
|
||||
@ -210,7 +236,8 @@ pub mod c {
|
||||
let outputs = outputs.clone_ref();
|
||||
let mut collection = outputs.borrow_mut();
|
||||
let output_state: Option<&mut OutputState>
|
||||
= find_output_mut(&mut collection, wl_output)
|
||||
= collection
|
||||
.find_output_mut(wl_output)
|
||||
.map(|o| &mut o.pending);
|
||||
match output_state {
|
||||
Some(state) => { state.scale = factor; }
|
||||
@ -221,11 +248,7 @@ pub mod c {
|
||||
};
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn squeek_outputs_new() -> COutputs {
|
||||
COutputs::new(Outputs { outputs: Vec::new() })
|
||||
}
|
||||
// End callbacks
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
@ -235,14 +258,17 @@ pub mod c {
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn squeek_outputs_register(raw_collection: COutputs, output: WlOutput) {
|
||||
fn squeek_outputs_register(raw_collection: COutputs, output: WlOutput, id: u32) {
|
||||
let collection = raw_collection.clone_ref();
|
||||
let mut collection = collection.borrow_mut();
|
||||
collection.outputs.push(Output {
|
||||
output: output.clone(),
|
||||
pending: OutputState::uninitialized(),
|
||||
current: OutputState::uninitialized(),
|
||||
});
|
||||
collection.outputs.push((
|
||||
Output {
|
||||
output: output.clone(),
|
||||
pending: OutputState::uninitialized(),
|
||||
current: OutputState::uninitialized(),
|
||||
},
|
||||
id,
|
||||
));
|
||||
|
||||
unsafe { squeek_output_add_listener(
|
||||
output,
|
||||
@ -255,61 +281,70 @@ pub mod c {
|
||||
raw_collection,
|
||||
)};
|
||||
}
|
||||
|
||||
|
||||
/// This will try to unregister the output, if the id matches a registered one.
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn squeek_outputs_get_current(raw_collection: COutputs) -> OutputHandle {
|
||||
fn squeek_outputs_try_unregister(raw_collection: COutputs, id: u32) -> WlOutput {
|
||||
let collection = raw_collection.clone_ref();
|
||||
let collection = collection.borrow();
|
||||
OutputHandle {
|
||||
wl_output: collection.outputs[0].output.clone(),
|
||||
outputs: raw_collection.clone(),
|
||||
}
|
||||
let mut collection = collection.borrow_mut();
|
||||
collection.remove_output_by_global(id)
|
||||
.map_err(|e| log_print!(
|
||||
logging::Level::Debug,
|
||||
"Tried to remove global {:x} but it is not registered as an output: {:?}",
|
||||
id, e,
|
||||
))
|
||||
.unwrap_or(WlOutput::null())
|
||||
}
|
||||
|
||||
// TODO: handle unregistration
|
||||
|
||||
fn find_output(
|
||||
collection: &Outputs,
|
||||
wl_output: WlOutput,
|
||||
) -> Option<&Output> {
|
||||
collection.outputs
|
||||
.iter()
|
||||
.find_map(|o|
|
||||
if o.output == wl_output { Some(o) } else { None }
|
||||
)
|
||||
}
|
||||
|
||||
fn find_output_mut(
|
||||
collection: &mut Outputs,
|
||||
wl_output: WlOutput,
|
||||
) -> Option<&mut Output> {
|
||||
collection.outputs
|
||||
.iter_mut()
|
||||
.find_map(|o|
|
||||
if o.output == wl_output { Some(o) } else { None }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Generic size
|
||||
#[derive(Clone)]
|
||||
pub struct Size {
|
||||
pub width: u32,
|
||||
pub height: u32,
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct Size<Unit> {
|
||||
pub width: Unit,
|
||||
pub height: Unit,
|
||||
}
|
||||
|
||||
pub type PixelSize = Size<u32>;
|
||||
|
||||
/// wl_output mode
|
||||
#[derive(Clone)]
|
||||
struct Mode {
|
||||
width: i32,
|
||||
height: i32,
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct Mode {
|
||||
pub width: i32,
|
||||
pub height: i32,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct Millimeter(pub i32);
|
||||
|
||||
impl DivCeil<i32> for Millimeter {
|
||||
type Output = Millimeter;
|
||||
fn div_ceil(self, other: i32) -> Self {
|
||||
Self(self.0.div_ceil(other))
|
||||
}
|
||||
}
|
||||
|
||||
impl ops::Mul<i32> for Millimeter {
|
||||
type Output = Self;
|
||||
fn mul(self, m: i32) -> Self {
|
||||
Self(self.0 * m as i32)
|
||||
}
|
||||
}
|
||||
|
||||
/// All geometry parameters
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct Geometry {
|
||||
pub transform: c::Transform,
|
||||
pub phys_size: Size<Option<Millimeter>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct OutputState {
|
||||
current_mode: Option<Mode>,
|
||||
transform: Option<c::Transform>,
|
||||
pub current_mode: Option<Mode>,
|
||||
pub geometry: Option<Geometry>,
|
||||
pub scale: i32,
|
||||
}
|
||||
|
||||
@ -323,44 +358,138 @@ impl OutputState {
|
||||
fn uninitialized() -> OutputState {
|
||||
OutputState {
|
||||
current_mode: None,
|
||||
transform: None,
|
||||
geometry: None,
|
||||
scale: 1,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_pixel_size(&self) -> Option<Size> {
|
||||
fn transform_size<T>(
|
||||
width: T,
|
||||
height: T,
|
||||
transform: self::c::Transform,
|
||||
) -> Size<T> {
|
||||
use self::c::Transform;
|
||||
|
||||
match transform {
|
||||
Transform::Normal
|
||||
| Transform::Rotated180
|
||||
| Transform::Flipped
|
||||
| Transform::FlippedRotated180 => Size {
|
||||
width,
|
||||
height,
|
||||
},
|
||||
_ => Size {
|
||||
width: height,
|
||||
height: width,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/// Return resolution adjusted for current transform
|
||||
pub fn get_pixel_size(&self) -> Option<PixelSize> {
|
||||
match self {
|
||||
OutputState {
|
||||
current_mode: Some(Mode { width, height } ),
|
||||
transform: Some(transform),
|
||||
geometry: Some(Geometry { transform, .. } ),
|
||||
scale: _,
|
||||
} => Some(
|
||||
match transform {
|
||||
Transform::Normal
|
||||
| Transform::Rotated180
|
||||
| Transform::Flipped
|
||||
| Transform::FlippedRotated180 => Size {
|
||||
width: *width as u32,
|
||||
height: *height as u32,
|
||||
},
|
||||
_ => Size {
|
||||
width: *height as u32,
|
||||
height: *width as u32,
|
||||
},
|
||||
}
|
||||
),
|
||||
} => Some(Self::transform_size(*width as u32, *height as u32, *transform)),
|
||||
OutputState {
|
||||
current_mode: Some(Mode { width, height } ),
|
||||
..
|
||||
} => Some(PixelSize { width: *width as u32, height: *height as u32 } ),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Return physical dimensions adjusted for current transform
|
||||
pub fn get_physical_size(&self) -> Option<Size<Option<Millimeter>>> {
|
||||
match self {
|
||||
OutputState {
|
||||
geometry: Some(Geometry { transform, phys_size } ),
|
||||
..
|
||||
} => Some(Self::transform_size(phys_size.width, phys_size.height, *transform)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Output {
|
||||
/// Not guaranteed to exist,
|
||||
/// but can be used to look up state.
|
||||
#[derive(Clone, Copy, PartialEq, Debug, Eq, Hash)]
|
||||
pub struct OutputId(pub c::WlOutput);
|
||||
|
||||
// WlOutput is a pointer,
|
||||
// but in the public interface,
|
||||
// we're only using it as a lookup key.
|
||||
unsafe impl Send for OutputId {}
|
||||
|
||||
struct Output {
|
||||
output: c::WlOutput,
|
||||
pending: OutputState,
|
||||
current: OutputState,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct NotFound;
|
||||
|
||||
/// Wayland global ID type
|
||||
type GlobalId = u32;
|
||||
|
||||
/// The outputs manager
|
||||
pub struct Outputs {
|
||||
outputs: Vec<Output>,
|
||||
outputs: Vec<(Output, GlobalId)>,
|
||||
sender: event_loop::driver::Threaded,
|
||||
}
|
||||
|
||||
impl Outputs {
|
||||
pub fn new(sender: event_loop::driver::Threaded) -> Outputs {
|
||||
Outputs {
|
||||
outputs: Vec::new(),
|
||||
sender,
|
||||
}
|
||||
}
|
||||
|
||||
fn send_event(&self, event: Event) {
|
||||
self.sender.send(event.into()).unwrap()
|
||||
}
|
||||
|
||||
fn remove_output_by_global(&mut self, id: GlobalId)
|
||||
-> Result<c::WlOutput, NotFound>
|
||||
{
|
||||
let index = self.outputs.iter()
|
||||
.position(|(_o, global_id)| *global_id == id);
|
||||
if let Some(index) = index {
|
||||
let (output, _id) = self.outputs.remove(index);
|
||||
self.send_event(Event {
|
||||
change: ChangeType::Removed,
|
||||
output: OutputId(output.output),
|
||||
});
|
||||
Ok(output.output)
|
||||
} else {
|
||||
Err(NotFound)
|
||||
}
|
||||
}
|
||||
|
||||
fn find_output_mut(&mut self, wl_output: c::WlOutput)
|
||||
-> Option<&mut Output>
|
||||
{
|
||||
self.outputs
|
||||
.iter_mut()
|
||||
.find_map(|(o, _global)|
|
||||
if o.output == wl_output { Some(o) } else { None }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub enum ChangeType {
|
||||
/// Added or changed
|
||||
Altered(OutputState),
|
||||
Removed,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct Event {
|
||||
pub output: OutputId,
|
||||
pub change: ChangeType,
|
||||
}
|
||||
|
||||
124
src/panel.c
Normal file
124
src/panel.c
Normal file
@ -0,0 +1,124 @@
|
||||
#include "eekboard/eekboard-context-service.h"
|
||||
#include "wayland.h"
|
||||
#include "panel.h"
|
||||
|
||||
|
||||
// Called from rust
|
||||
/// Destroys the widget
|
||||
void
|
||||
panel_manager_hide(struct panel_manager *self)
|
||||
{
|
||||
if (self->window) {
|
||||
gtk_widget_hide (GTK_WIDGET (self->window));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
on_destroy (struct panel_manager *self, GtkWidget *widget)
|
||||
{
|
||||
g_assert (widget == GTK_WIDGET(self->window));
|
||||
panel_manager_hide(self);
|
||||
}
|
||||
|
||||
|
||||
/// panel::Manager. Only needed for this callback
|
||||
struct squeek_panel_manager;
|
||||
|
||||
/// Calls back into Rust
|
||||
void squeek_panel_manager_configured(struct squeek_panel_manager *mgr, uint32_t width, uint32_t height);
|
||||
|
||||
static void
|
||||
on_surface_configure(struct squeek_panel_manager *self, PhoshLayerSurface *surface)
|
||||
{
|
||||
gint width;
|
||||
gint height;
|
||||
g_return_if_fail (PHOSH_IS_LAYER_SURFACE (surface));
|
||||
|
||||
g_object_get(G_OBJECT(surface),
|
||||
"configured-width", &width,
|
||||
"configured-height", &height,
|
||||
NULL);
|
||||
squeek_panel_manager_configured(self, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
make_widget (struct panel_manager *self)
|
||||
{
|
||||
if (self->widget) {
|
||||
g_error("Widget already present");
|
||||
}
|
||||
self->widget = eek_gtk_keyboard_new (self->state, self->submission, self->state_manager, self->popover);
|
||||
|
||||
gtk_widget_set_has_tooltip (self->widget, TRUE);
|
||||
gtk_container_add (GTK_CONTAINER(self->window), self->widget);
|
||||
gtk_widget_show_all(self->widget);
|
||||
}
|
||||
|
||||
|
||||
// Called from rust
|
||||
/// Creates a new panel widget
|
||||
void
|
||||
panel_manager_request_widget (struct panel_manager *self, struct wl_output *output, uint32_t height, struct squeek_panel_manager *mgr)
|
||||
{
|
||||
if (!self->window) {
|
||||
self->window = g_object_new (
|
||||
PHOSH_TYPE_LAYER_SURFACE,
|
||||
"layer-shell", squeek_wayland->layer_shell,
|
||||
"wl-output", output,
|
||||
"height", height,
|
||||
"anchor", ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM
|
||||
| ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT
|
||||
| ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT,
|
||||
"layer", ZWLR_LAYER_SHELL_V1_LAYER_TOP,
|
||||
"kbd-interactivity", FALSE,
|
||||
"exclusive-zone", height,
|
||||
"namespace", "osk",
|
||||
NULL
|
||||
);
|
||||
g_object_connect (self->window,
|
||||
"swapped-signal::destroy", G_CALLBACK(on_destroy), self,
|
||||
"swapped-signal::configured", G_CALLBACK(on_surface_configure), mgr,
|
||||
NULL);
|
||||
// The properties below are just to make hacking easier.
|
||||
// The way we use layer-shell overrides some,
|
||||
// and there's no space in the protocol for others.
|
||||
// Those may still be useful in the future,
|
||||
// or for hacks with regular windows.
|
||||
gtk_widget_set_can_focus (GTK_WIDGET(self->window), FALSE);
|
||||
g_object_set (G_OBJECT(self->window), "accept_focus", FALSE, NULL);
|
||||
gtk_window_set_title (GTK_WINDOW(self->window), "Squeekboard");
|
||||
gtk_window_set_icon_name (GTK_WINDOW(self->window), "squeekboard");
|
||||
gtk_window_set_keep_above (GTK_WINDOW(self->window), TRUE);
|
||||
}
|
||||
|
||||
if (!self->widget) {
|
||||
make_widget(self);
|
||||
}
|
||||
|
||||
gtk_widget_show (GTK_WIDGET(self->window));
|
||||
}
|
||||
|
||||
// Called from rust
|
||||
/// Updates the size
|
||||
void
|
||||
panel_manager_resize (struct panel_manager *self, uint32_t height)
|
||||
{
|
||||
phosh_layer_surface_set_size(self->window, 0, height);
|
||||
phosh_layer_surface_set_exclusive_zone(self->window, height);
|
||||
phosh_layer_surface_wl_surface_commit(self->window);
|
||||
}
|
||||
|
||||
|
||||
struct panel_manager panel_manager_new(EekboardContextService *state, struct submission *submission, struct squeek_state_manager *state_manager, struct squeek_popover *popover)
|
||||
{
|
||||
struct panel_manager mgr = {
|
||||
.state = state,
|
||||
.submission = submission,
|
||||
.window = NULL,
|
||||
.widget = NULL,
|
||||
.current_output = NULL,
|
||||
.state_manager = state_manager,
|
||||
.popover = popover,
|
||||
};
|
||||
return mgr;
|
||||
}
|
||||
25
src/panel.h
Normal file
25
src/panel.h
Normal file
@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "eek/layersurface.h"
|
||||
#include "src/layout.h"
|
||||
#include "src/main.h"
|
||||
#include "src/submission.h"
|
||||
|
||||
// Stores the objects that the panel and its widget will refer to
|
||||
struct panel_manager {
|
||||
EekboardContextService *state; // unowned
|
||||
/// Needed for instantiating the widget
|
||||
struct squeek_state_manager *state_manager; // shared reference
|
||||
struct squeek_popover *popover; // shared reference
|
||||
struct submission *submission; // unowned
|
||||
|
||||
// both memoized - doesn't have to be, but bugs happen:
|
||||
// https://gitlab.gnome.org/World/Phosh/squeekboard/-/issues/343
|
||||
PhoshLayerSurface *window;
|
||||
GtkWidget *widget;
|
||||
|
||||
// Those should be held in Rust
|
||||
struct wl_output *current_output;
|
||||
};
|
||||
|
||||
struct panel_manager panel_manager_new(EekboardContextService *state, struct submission *submission, struct squeek_state_manager *state_manager, struct squeek_popover *popover);
|
||||
247
src/panel.rs
Normal file
247
src/panel.rs
Normal file
@ -0,0 +1,247 @@
|
||||
/* Copyright (C) 2022 Purism SPC
|
||||
* SPDX-License-Identifier: GPL-3.0+
|
||||
*/
|
||||
|
||||
/*! Panel state management.
|
||||
*
|
||||
* This is effectively a mirror of the previous C code,
|
||||
* with an explicit state machine managing the panel size.
|
||||
*
|
||||
* It still relies on a callback from Wayland to accept the panel size,
|
||||
* which makes this code somewhat prone to mistakes.
|
||||
*
|
||||
* An alternative to the callback would be
|
||||
* to send a message all the way to `state::State`
|
||||
* every time the allocated size changes.
|
||||
* That would allow for a more holistic view
|
||||
* of interactions of different pieces of state.
|
||||
*
|
||||
* However, `state::State` already has the potential to become a ball of mud,
|
||||
* tightly coupling different functionality and making it difficult to see independent units.
|
||||
*
|
||||
* For this reason, I'm taking a light touch approach with the panel manager,
|
||||
* and moving it just a bit closer to `state::State`.
|
||||
* Hopefully ths still allows us to expose assumptions that were not stated yet
|
||||
* (e.g. can the output disappear between size request andallocation?).
|
||||
*
|
||||
* Tight coupling, e.g. a future one between presented hints and layout size,
|
||||
* will have to be taken into account later.
|
||||
*/
|
||||
|
||||
use crate::logging;
|
||||
use crate::outputs::OutputId;
|
||||
use crate::util::c::Wrapped;
|
||||
|
||||
|
||||
pub mod c {
|
||||
use super::*;
|
||||
use glib;
|
||||
use std::os::raw::c_void;
|
||||
|
||||
use crate::outputs::c::WlOutput;
|
||||
|
||||
/// struct panel_manager*
|
||||
#[repr(transparent)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct PanelManager(*const c_void);
|
||||
|
||||
extern "C" {
|
||||
#[allow(improper_ctypes)]
|
||||
pub fn panel_manager_request_widget(
|
||||
service: PanelManager,
|
||||
output: WlOutput,
|
||||
height: u32,
|
||||
// for callbacks
|
||||
panel: Wrapped<Manager>,
|
||||
);
|
||||
pub fn panel_manager_resize(service: PanelManager, height: u32);
|
||||
pub fn panel_manager_hide(service: PanelManager);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C"
|
||||
fn squeek_panel_manager_configured(panel: Wrapped<Manager>, width: u32, height: u32) {
|
||||
// This is why this needs to be moved into state::State:
|
||||
// it's getting too coupled to glib.
|
||||
glib::idle_add_local(move || {
|
||||
let panel = panel.clone_ref();
|
||||
panel.borrow_mut().set_configured(Size{width, height});
|
||||
glib::Continue(false)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Size in pixels that is aware of scaling
|
||||
#[derive(Clone, Copy, PartialEq, Debug)]
|
||||
pub struct PixelSize {
|
||||
pub pixels: u32,
|
||||
pub scale_factor: u32,
|
||||
}
|
||||
|
||||
fn div_ceil(a: u32, b: u32) -> u32 {
|
||||
// Given that it's for pixels on a screen, an overflow is unlikely.
|
||||
(a + b - 1) / b
|
||||
}
|
||||
|
||||
impl PixelSize {
|
||||
pub fn as_scaled_floor(&self) -> u32 {
|
||||
self.pixels / self.scale_factor
|
||||
}
|
||||
|
||||
pub fn as_scaled_ceiling(&self) -> u32 {
|
||||
div_ceil(self.pixels, self.scale_factor)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
struct Size {
|
||||
width: u32,
|
||||
height: u32,
|
||||
}
|
||||
|
||||
/// This state requests the Wayland layer shell protocol synchronization:
|
||||
/// the application asks for some size,
|
||||
/// and then receives a size that the compositor thought appropriate.
|
||||
/// Stores raw values passed to Wayland, i.e. scaled dimensions.
|
||||
#[derive(Clone, Debug)]
|
||||
enum State {
|
||||
Hidden,
|
||||
SizeRequested {
|
||||
output: OutputId,
|
||||
height: u32,
|
||||
//width: u32,
|
||||
},
|
||||
SizeAllocated {
|
||||
output: OutputId,
|
||||
wanted_height: u32,
|
||||
allocated: Size,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
pub enum Command {
|
||||
Show {
|
||||
output: OutputId,
|
||||
height: PixelSize,
|
||||
},
|
||||
Hide,
|
||||
}
|
||||
|
||||
/// Tries to contain all the panel sizing duties.
|
||||
pub struct Manager {
|
||||
panel: c::PanelManager,
|
||||
state: State,
|
||||
}
|
||||
|
||||
impl Manager {
|
||||
pub fn new(panel: c::PanelManager) -> Self {
|
||||
Self {
|
||||
panel,
|
||||
state: State::Hidden,
|
||||
}
|
||||
}
|
||||
// TODO: mabe send the allocated size back to state::State,
|
||||
// to perform layout adjustments
|
||||
fn set_configured(&mut self, size: Size) {
|
||||
self.state = match self.state.clone() {
|
||||
State::Hidden => {
|
||||
// This may happen if a hide is scheduled immediately after a show.
|
||||
log_print!(
|
||||
logging::Level::Surprise,
|
||||
"Panel has been configured, but no request is pending. Ignoring",
|
||||
);
|
||||
State::Hidden
|
||||
},
|
||||
State::SizeAllocated{output, wanted_height, ..} => {
|
||||
log_print!(
|
||||
logging::Level::Surprise,
|
||||
"Panel received new configuration without asking",
|
||||
);
|
||||
State::SizeAllocated{output, wanted_height, allocated: size}
|
||||
},
|
||||
State::SizeRequested{output, height} => State::SizeAllocated {
|
||||
output,
|
||||
wanted_height: height,
|
||||
allocated: size,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
pub fn update(mgr: Wrapped<Manager>, cmd: Command) {
|
||||
let copied = mgr.clone();
|
||||
|
||||
let mgr = mgr.clone_ref();
|
||||
let mut mgr = mgr.borrow_mut();
|
||||
|
||||
(*mgr).state = match (cmd, mgr.state.clone()) {
|
||||
(Command::Hide, State::Hidden) => State::Hidden,
|
||||
(Command::Hide, State::SizeAllocated{..}) => {
|
||||
unsafe { c::panel_manager_hide(mgr.panel); }
|
||||
State::Hidden
|
||||
},
|
||||
(Command::Hide, State::SizeRequested{..}) => {
|
||||
unsafe { c::panel_manager_hide(mgr.panel); }
|
||||
State::Hidden
|
||||
},
|
||||
(Command::Show{output, height}, State::Hidden) => {
|
||||
let height = height.as_scaled_ceiling();
|
||||
unsafe { c::panel_manager_request_widget(mgr.panel, output.0, height, copied); }
|
||||
State::SizeRequested{output, height}
|
||||
},
|
||||
(
|
||||
Command::Show{output, height},
|
||||
State::SizeRequested{output: req_output, height: req_height},
|
||||
) => {
|
||||
let height = height.as_scaled_ceiling();
|
||||
if output == req_output && height == req_height {
|
||||
State::SizeRequested{output: req_output, height: req_height}
|
||||
} else if output == req_output {
|
||||
// I'm not sure about that.
|
||||
// This could cause a busy loop,
|
||||
// when two requests are being processed at the same time:
|
||||
// one message in the compositor to allocate size A,
|
||||
// causing the state to update to height A'
|
||||
// the other from the state wanting height B',
|
||||
// causing the compositor to change size to B.
|
||||
// So better cut this short here, despite artifacts.
|
||||
// Out of simplicty, just ignore the new request.
|
||||
// If that causes problems, the request in flight could be stored
|
||||
// for the purpose of handling it better somehow.
|
||||
State::SizeRequested{output: req_output, height: req_height}
|
||||
} else {
|
||||
// This looks weird, but should be safe.
|
||||
// The stack seems to handle
|
||||
// configure events on a dead surface.
|
||||
unsafe {
|
||||
c::panel_manager_hide(mgr.panel);
|
||||
c::panel_manager_request_widget(mgr.panel, output.0, height, copied);
|
||||
}
|
||||
State::SizeRequested{output, height}
|
||||
}
|
||||
},
|
||||
(
|
||||
Command::Show{output, height},
|
||||
State::SizeAllocated{output: alloc_output, allocated, wanted_height},
|
||||
) => {
|
||||
let height = height.as_scaled_ceiling();
|
||||
if output == alloc_output && height == wanted_height {
|
||||
State::SizeAllocated{output: alloc_output, wanted_height, allocated}
|
||||
} else if output == alloc_output && height == allocated.height {
|
||||
State::SizeAllocated{output: alloc_output, wanted_height: height, allocated}
|
||||
} else if output == alloc_output {
|
||||
// Should *all* other heights cause a resize?
|
||||
// What about those between wanted and allocated?
|
||||
unsafe { c::panel_manager_resize(mgr.panel, height); }
|
||||
State::SizeRequested{output, height}
|
||||
} else {
|
||||
unsafe {
|
||||
c::panel_manager_hide(mgr.panel);
|
||||
c::panel_manager_request_widget(mgr.panel, output.0, height, copied);
|
||||
}
|
||||
State::SizeRequested{output, height}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
5
src/popover.h
Normal file
5
src/popover.h
Normal file
@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
/// Popover state.
|
||||
/// Wrapped<actors::popover::State>
|
||||
struct squeek_popover;
|
||||
|
||||
107
src/popover.rs
107
src/popover.rs
@ -4,24 +4,21 @@ use gio;
|
||||
use gtk;
|
||||
use std::ffi::CString;
|
||||
use std::cmp::Ordering;
|
||||
use ::layout::c::{ Bounds, EekGtkKeyboard };
|
||||
use ::locale::{ OwnedTranslation, compare_current_locale };
|
||||
use ::logging;
|
||||
use ::manager;
|
||||
use ::resources;
|
||||
use crate::actors;
|
||||
use crate::layout::c::{ Bounds, EekGtkKeyboard };
|
||||
use crate::locale::{ OwnedTranslation, compare_current_locale };
|
||||
use crate::logging;
|
||||
use crate::receiver;
|
||||
use crate::resources;
|
||||
use crate::state;
|
||||
|
||||
// Traits
|
||||
use gio::ActionMapExt;
|
||||
use gio::SettingsExt;
|
||||
#[cfg(feature = "gio_v0_5")]
|
||||
use gio::SimpleActionExt;
|
||||
use gio::prelude::ActionMapExt;
|
||||
use gio::prelude::SettingsExt;
|
||||
use glib::translate::FromGlibPtrNone;
|
||||
use glib::variant::ToVariant;
|
||||
#[cfg(not(feature = "gtk_v0_5"))]
|
||||
use gtk::prelude::*;
|
||||
use gtk::PopoverExt;
|
||||
use gtk::WidgetExt;
|
||||
use ::logging::Warn;
|
||||
use crate::logging::Warn;
|
||||
|
||||
mod c {
|
||||
use std::os::raw::c_char;
|
||||
@ -110,8 +107,13 @@ mod variants {
|
||||
|
||||
fn get_settings(schema_name: &str) -> Option<gio::Settings> {
|
||||
let mut error_handler = logging::Print{};
|
||||
gio::SettingsSchemaSource::get_default()
|
||||
.or_warn(
|
||||
|
||||
#[cfg(feature = "glib_v0_14")]
|
||||
let ss = gio::SettingsSchemaSource::default();
|
||||
#[cfg(not(feature = "glib_v0_14"))]
|
||||
let ss = gio::SettingsSchemaSource::get_default();
|
||||
|
||||
ss.or_warn(
|
||||
&mut error_handler,
|
||||
logging::Problem::Surprise,
|
||||
"No gsettings schemas installed.",
|
||||
@ -127,10 +129,16 @@ fn get_settings(schema_name: &str) -> Option<gio::Settings> {
|
||||
.map(|_sschema| gio::Settings::new(schema_name))
|
||||
}
|
||||
|
||||
fn set_layout(kind: String, name: String) {
|
||||
fn set_layout(kind: &str, name: &str) {
|
||||
let settings = get_settings("org.gnome.desktop.input-sources");
|
||||
if let Some(settings) = settings {
|
||||
let kind = String::from(kind);
|
||||
let name = String::from(name);
|
||||
#[cfg(feature = "glib_v0_14")]
|
||||
let inputs = settings.value("sources");
|
||||
#[cfg(not(feature = "glib_v0_14"))]
|
||||
let inputs = settings.get_value("sources").unwrap();
|
||||
|
||||
let current = (kind.clone(), name.clone());
|
||||
let inputs = variants::get_tuples(inputs).into_iter()
|
||||
.filter(|t| t != ¤t);
|
||||
@ -146,7 +154,7 @@ fn set_layout(kind: String, name: String) {
|
||||
|
||||
/// A reference to what the user wants to see
|
||||
#[derive(PartialEq, Clone, Debug)]
|
||||
enum LayoutId {
|
||||
pub enum LayoutId {
|
||||
/// Affects the layout in system settings
|
||||
System {
|
||||
kind: String,
|
||||
@ -166,40 +174,23 @@ impl LayoutId {
|
||||
}
|
||||
|
||||
fn set_visible_layout(
|
||||
manager: manager::c::Manager,
|
||||
layout_id: LayoutId,
|
||||
layout_id: &LayoutId,
|
||||
) {
|
||||
match layout_id {
|
||||
LayoutId::System { kind, name } => {
|
||||
unsafe {
|
||||
use std::ptr;
|
||||
manager::c::eekboard_context_service_set_overlay(
|
||||
manager,
|
||||
ptr::null(),
|
||||
);
|
||||
}
|
||||
set_layout(kind, name);
|
||||
}
|
||||
LayoutId::Local(name) => {
|
||||
let name = CString::new(name.as_str()).unwrap();
|
||||
let name_ptr = name.as_ptr();
|
||||
unsafe {
|
||||
manager::c::eekboard_context_service_set_overlay(
|
||||
manager,
|
||||
name_ptr,
|
||||
)
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
|
||||
/// Takes into account first any overlays, then system layouts from the list
|
||||
fn get_current_layout(
|
||||
manager: manager::c::Manager,
|
||||
popover: &actors::popover::State,
|
||||
system_layouts: &Vec<LayoutId>,
|
||||
) -> Option<LayoutId> {
|
||||
match manager::get_overlay(manager) {
|
||||
Some(name) => Some(LayoutId::Local(name)),
|
||||
match &popover.overlay {
|
||||
Some(name) => Some(LayoutId::Local(name.into())),
|
||||
None => system_layouts.get(0).map(LayoutId::clone),
|
||||
}
|
||||
}
|
||||
@ -243,7 +234,8 @@ fn translate_layout_names(layouts: &Vec<LayoutId>) -> Vec<OwnedTranslation> {
|
||||
pub fn show(
|
||||
window: EekGtkKeyboard,
|
||||
position: Bounds,
|
||||
manager: manager::c::Manager,
|
||||
popover: &actors::popover::State,
|
||||
app_state: receiver::State,
|
||||
) {
|
||||
unsafe { gtk::set_initialized() };
|
||||
let window = unsafe { gtk::Widget::from_glib_none(window.0) };
|
||||
@ -254,7 +246,11 @@ pub fn show(
|
||||
let settings = get_settings("org.gnome.desktop.input-sources");
|
||||
let inputs = settings
|
||||
.map(|settings| {
|
||||
#[cfg(feature = "glib_v0_14")]
|
||||
let inputs = settings.value("sources");
|
||||
#[cfg(not(feature = "glib_v0_14"))]
|
||||
let inputs = settings.get_value("sources").unwrap();
|
||||
|
||||
variants::get_tuples(inputs)
|
||||
})
|
||||
.unwrap_or_else(|| Vec::new());
|
||||
@ -285,8 +281,18 @@ pub fn show(
|
||||
}
|
||||
});
|
||||
|
||||
let builder = gtk::Builder::new_from_resource("/sm/puri/squeekboard/popover.ui");
|
||||
let model: gio::Menu = builder.get_object("app-menu").unwrap();
|
||||
let model: gio::Menu = {
|
||||
#[cfg(feature = "glib_v0_14")]
|
||||
{
|
||||
let builder = gtk::Builder::from_resource("/sm/puri/squeekboard/popover.ui");
|
||||
builder.object("app-menu").unwrap()
|
||||
}
|
||||
#[cfg(not(feature = "glib_v0_14"))]
|
||||
{
|
||||
let builder = gtk::Builder::new_from_resource("/sm/puri/squeekboard/popover.ui");
|
||||
builder.get_object("app-menu").unwrap()
|
||||
}
|
||||
};
|
||||
|
||||
for (tr, l) in human_names.iter().rev() {
|
||||
let detailed_action = format!("layout::{}", l.get_name());
|
||||
@ -294,7 +300,11 @@ pub fn show(
|
||||
model.prepend_item (&item);
|
||||
}
|
||||
|
||||
#[cfg(feature = "glib_v0_14")]
|
||||
let menu = gtk::Popover::from_model(Some(&window), &model);
|
||||
#[cfg(not(feature = "glib_v0_14"))]
|
||||
let menu = gtk::Popover::new_from_model(Some(&window), &model);
|
||||
|
||||
menu.set_pointing_to(>k::Rectangle {
|
||||
x: position.x.ceil() as i32,
|
||||
y: position.y.ceil() as i32,
|
||||
@ -305,7 +315,7 @@ pub fn show(
|
||||
|
||||
let action_group = gio::SimpleActionGroup::new();
|
||||
|
||||
if let Some(current_layout) = get_current_layout(manager, &system_layouts) {
|
||||
if let Some(current_layout) = get_current_layout(popover, &system_layouts) {
|
||||
let current_layout_name = all_layouts.iter()
|
||||
.find(
|
||||
|l| l.get_name() == current_layout.get_name()
|
||||
@ -334,10 +344,13 @@ pub fn show(
|
||||
.find(
|
||||
|choices| state == choices.get_name()
|
||||
).unwrap();
|
||||
set_visible_layout(
|
||||
manager,
|
||||
layout.clone(),
|
||||
)
|
||||
app_state
|
||||
.send(state::Event::OverlayChanged(layout.clone()))
|
||||
.or_print(
|
||||
logging::Problem::Bug,
|
||||
&format!("Can't send to state"),
|
||||
);
|
||||
set_visible_layout(layout)
|
||||
});
|
||||
},
|
||||
None => log_print!(
|
||||
|
||||
15
src/receiver.rs
Normal file
15
src/receiver.rs
Normal file
@ -0,0 +1,15 @@
|
||||
/*! Defines the application-wide message bus for updating state.*/
|
||||
|
||||
use crate::event_loop::driver::Threaded;
|
||||
|
||||
pub mod c {
|
||||
use super::*;
|
||||
use crate::util::c::Wrapped;
|
||||
pub type State = Wrapped<Threaded>;
|
||||
}
|
||||
|
||||
// The state receiver is an endpoint of a channel, so it's safely cloneable.
|
||||
// There's no need to keep it in a Rc.
|
||||
// The C version uses Wrapped with an underlying Rc,
|
||||
// because Wrapped is well-tested already.
|
||||
pub type State = Threaded;
|
||||
@ -52,8 +52,13 @@ static KEYBOARDS: &[(&'static str, &'static str)] = &[
|
||||
|
||||
("fr", include_str!("../data/keyboards/fr.yaml")),
|
||||
("fr_wide", include_str!("../data/keyboards/fr_wide.yaml")),
|
||||
("fr+bepo", include_str!("../data/keyboards/fr+bepo.yaml")),
|
||||
("fr+bepo_wide", include_str!("../data/keyboards/fr+bepo_wide.yaml")),
|
||||
|
||||
("ge", include_str!("../data/keyboards/ge.yaml")),
|
||||
("gr", include_str!("../data/keyboards/gr.yaml")),
|
||||
("gr_wide", include_str!("../data/keyboards/gr_wide.yaml")),
|
||||
("gr+polytonic", include_str!("../data/keyboards/gr+polytonic.yaml")),
|
||||
|
||||
("il", include_str!("../data/keyboards/il.yaml")),
|
||||
|
||||
@ -71,6 +76,9 @@ static KEYBOARDS: &[(&'static str, &'static str)] = &[
|
||||
("pl", include_str!("../data/keyboards/pl.yaml")),
|
||||
("pl_wide", include_str!("../data/keyboards/pl_wide.yaml")),
|
||||
|
||||
("ro", include_str!("../data/keyboards/ro.yaml")),
|
||||
("ro_wide", include_str!("../data/keyboards/ro_wide.yaml")),
|
||||
|
||||
("ru", include_str!("../data/keyboards/ru.yaml")),
|
||||
|
||||
("se", include_str!("../data/keyboards/se.yaml")),
|
||||
@ -102,6 +110,8 @@ static KEYBOARDS: &[(&'static str, &'static str)] = &[
|
||||
|
||||
("terminal/us", include_str!("../data/keyboards/terminal/us.yaml")),
|
||||
("terminal/us_wide", include_str!("../data/keyboards/terminal/us_wide.yaml")),
|
||||
("terminal/us+dvorak", include_str!("../data/keyboards/terminal/us+dvorak.yaml")),
|
||||
("terminal/us+dvorak_wide", include_str!("../data/keyboards/terminal/us+dvorak_wide.yaml")),
|
||||
|
||||
// Overlays
|
||||
("emoji/us", include_str!("../data/keyboards/emoji/us.yaml")),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user