Compare commits
403 Commits
eekboard-1
...
add-more-p
| Author | SHA1 | Date | |
|---|---|---|---|
| 2c355ec966 | |||
| a19bbdc870 | |||
| 8e0b4f05f8 | |||
| 1010b916ef | |||
| c475ed6619 | |||
| 687b260e29 | |||
| ecc46733da | |||
| d6b59d16fd | |||
| a6e220a2ae | |||
| 593946779e | |||
| 537ded4b58 | |||
| 25a6a00f0f | |||
| 8298a1412b | |||
| 47eb25d07f | |||
| 0057c80b2e | |||
| da88831689 | |||
| 7b6c6e51b3 | |||
| 42b2b3b8f6 | |||
| 64680664e3 | |||
| 87dd9b4374 | |||
| c7d5e8d152 | |||
| 4cd15c074e | |||
| 9bfdabdf57 | |||
| 9375bc212b | |||
| 3829b52127 | |||
| f852cab0f9 | |||
| f53babcd68 | |||
| 016c1086e6 | |||
| f7dd4c84b1 | |||
| c1c0cb6b31 | |||
| e5858bf698 | |||
| b8389f6736 | |||
| 6c1c979414 | |||
| 43df82355a | |||
| d8b26040f9 | |||
| bdf29bf57b | |||
| 24358c39a6 | |||
| 504285c08f | |||
| b7eb4026f6 | |||
| ad5e4f58bb | |||
| 3085a10507 | |||
| b5f0aa423b | |||
| 9344a13bed | |||
| c8bc2c424f | |||
| 46fa6d4500 | |||
| 6002774f95 | |||
| f7f208883c | |||
| 5523b00442 | |||
| c81fdb18de | |||
| 778543c719 | |||
| 18b8972029 | |||
| fa31f8eee1 | |||
| 98a2e33d78 | |||
| 58d01bf502 | |||
| 8326bd7016 | |||
| d5f8b0d83b | |||
| e70a898af5 | |||
| df249646bc | |||
| 35ff93258e | |||
| c58d034494 | |||
| 8f1de46381 | |||
| 1846a67e83 | |||
| 35ac14806c | |||
| 4aee4915d9 | |||
| 5eeaa1c693 | |||
| 9b2fcf89e8 | |||
| e801a68f0d | |||
| ffc5628637 | |||
| 306aa89d06 | |||
| 236415cde4 | |||
| d49e0eaa1b | |||
| 107399a531 | |||
| 99a7786dc3 | |||
| d8f48cc48b | |||
| 2f0beb6d3a | |||
| 3ab3627ffe | |||
| 70895999c2 | |||
| ce311e1bf1 | |||
| e9cf572a3c | |||
| 943b2ad9f3 | |||
| f86bbb09f8 | |||
| 1246776328 | |||
| ea15f69e73 | |||
| 2e22bb5431 | |||
| a9a6e1d2b5 | |||
| 7e939c36cc | |||
| c5d2d76ab1 | |||
| 622ba6e38a | |||
| fad06348a7 | |||
| a6ee303123 | |||
| 4b66add65f | |||
| 79dce7c4c3 | |||
| aff71e0e33 | |||
| 9b10f56ba6 | |||
| 2391947b34 | |||
| e903150971 | |||
| 7495ec9bbb | |||
| e25d5a84b2 | |||
| 88ade4df1b | |||
| 00c3903672 | |||
| c801b17ba0 | |||
| 9ec8d62f3f | |||
| b1edcfcb1b | |||
| 54b0f59935 | |||
| 531b09f296 | |||
| e5b6d66d60 | |||
| a045810af6 | |||
| d68a8fef9a | |||
| 9162d4291f | |||
| 93d7699aa7 | |||
| 6eb63f6a4c | |||
| f6d4ca0387 | |||
| 7b41466a77 | |||
| 18c25084db | |||
| a5875402ef | |||
| f3ed1ba247 | |||
| 633d69baca | |||
| dbc8cc14bc | |||
| c65583b911 | |||
| 3d518b5757 | |||
| bfa72d7f61 | |||
| 373713ba54 | |||
| 068c325ee2 | |||
| 3b076e5e64 | |||
| 07d6e3a0f2 | |||
| 7690ef9a1a | |||
| 9974c385e5 | |||
| 8dafad80b1 | |||
| 93e9b2dde9 | |||
| c3a54595ea | |||
| 95ef52fe42 | |||
| c638c40a09 | |||
| 83d48d24ce | |||
| d807e43929 | |||
| 0a112be956 | |||
| 078efa2a6e | |||
| 5827827008 | |||
| 9c61d8de72 | |||
| f72ddc8129 | |||
| 7e9c3b40bb | |||
| a8371af9c0 | |||
| 4e11d071d9 | |||
| a7140705c4 | |||
| 69986132b4 | |||
| 3c97a3a592 | |||
| 268dda4da0 | |||
| 45f58a97b9 | |||
| bdbbaf6099 | |||
| 839968dc84 | |||
| fbdc5f4a93 | |||
| e5648a82a3 | |||
| 38133d326b | |||
| cc00fcb5c9 | |||
| 53f7a14717 | |||
| 922495ca06 | |||
| e5e2e08ff4 | |||
| c7c410210b | |||
| cb7c214aa0 | |||
| 6f5f49729c | |||
| 94c9442de1 | |||
| 8c044d0852 | |||
| 1f0cc0a5f3 | |||
| 5693ce3df7 | |||
| bcf04ab11e | |||
| 086f6bd772 | |||
| d0fa444a0e | |||
| cd81aeb286 | |||
| 7db33bc92e | |||
| fb6c501e44 | |||
| ce7b398f7b | |||
| 4d8d3a8109 | |||
| a183cf8b63 | |||
| f834edcf94 | |||
| 17802a9408 | |||
| ac1aad881c | |||
| 928110a92d | |||
| f6479fafe2 | |||
| 62b1c2ba84 | |||
| c0ac5e540f | |||
| fb5ec5557b | |||
| 74d94e6792 | |||
| 63f4c6b4da | |||
| 2774c1c988 | |||
| 469b0c0a9a | |||
| 2ddd217737 | |||
| c4e8e34ad6 | |||
| 4dc18c0af4 | |||
| 55c6911b87 | |||
| 9bf0da5409 | |||
| 7d5b2dd1de | |||
| 6091632e40 | |||
| 44110fd4d9 | |||
| 74d76ebfeb | |||
| 760bc138b0 | |||
| 2a4763d4f3 | |||
| 4b92f205ef | |||
| a5668fa1db | |||
| de39256377 | |||
| f53709c83d | |||
| 8ad0192e55 | |||
| 791e454cb6 | |||
| c85638be4d | |||
| a61b1fdf06 | |||
| 07c25d1d91 | |||
| 83dafd87a4 | |||
| 25a8733957 | |||
| c529e9ed9c | |||
| d6a8a85b5e | |||
| 3a945535f7 | |||
| 0fc4374193 | |||
| e350b4ab92 | |||
| 626527ee09 | |||
| c4a462c385 | |||
| 706a04dbfc | |||
| 7fd51af4de | |||
| c1af9b2ba4 | |||
| 5efb4cc58d | |||
| 4b2977d601 | |||
| 2f1c1c2fb1 | |||
| f47ef09a1f | |||
| 47041b0fac | |||
| b6111b5e00 | |||
| b8a2b2d7c8 | |||
| 0765ea1b86 | |||
| 64223704e0 | |||
| 8c14763ea4 | |||
| 10cd93022a | |||
| d006aede6a | |||
| b57e1ce660 | |||
| 1b59c4dad3 | |||
| 189c721d7e | |||
| 1ff1592f24 | |||
| 7f5f310bf0 | |||
| f999861228 | |||
| a571bd7dca | |||
| 3d0d28fa01 | |||
| 4c54b49ef5 | |||
| eb940bcf52 | |||
| be0e773879 | |||
| 056e07e80e | |||
| 83b36d07d0 | |||
| 89aaf05aff | |||
| 2f87fd46fb | |||
| e04276ee38 | |||
| 05c3061f08 | |||
| c33006bcbc | |||
| 4bf4500ae1 | |||
| e2944ff4a7 | |||
| f79b5dadbb | |||
| 4d44129b04 | |||
| b3e1d84e6c | |||
| 6702edaa9d | |||
| a3a6e5933a | |||
| 66ec95ebb0 | |||
| a944bf85b8 | |||
| 1d1829f664 | |||
| 094aa872ce | |||
| eaf925e30b | |||
| 722d3d1ad4 | |||
| b69b3e9409 | |||
| ae5eaeec93 | |||
| c393eb20be | |||
| 0e8715b4ff | |||
| b09c812579 | |||
| d6f7c271e2 | |||
| f1d97e396b | |||
| abf8f4daa8 | |||
| aba242301d | |||
| 7a52080940 | |||
| c3ffe6ab8b | |||
| 851a9185c0 | |||
| c1e1ddb73f | |||
| d530c1d6d6 | |||
| 43579b51f0 | |||
| 3d1133cdb5 | |||
| e27af9fd24 | |||
| a7c6597246 | |||
| fd6d873c01 | |||
| 89dee04cdf | |||
| 3b0a073964 | |||
| a129863a4d | |||
| 5b700f7dfc | |||
| d982bcb5e4 | |||
| 61a5e8d4fd | |||
| cb641bd221 | |||
| 2f6e9a1756 | |||
| 51b183a0f3 | |||
| d071bb04af | |||
| 14887f9c99 | |||
| 654909261e | |||
| ab2a27345d | |||
| 484eb3303c | |||
| 319d64e1e5 | |||
| 60250ca5e5 | |||
| d729bb3a89 | |||
| 4dc55635d7 | |||
| 4af49ef7b6 | |||
| 3a42e66504 | |||
| 250b196b81 | |||
| 9ba1987cab | |||
| 909b1e2a28 | |||
| e46af41abf | |||
| 17671a3b08 | |||
| b8eb7752e7 | |||
| 5e92f45111 | |||
| baf848c791 | |||
| 737d57c1f4 | |||
| 9985ad7ee1 | |||
| 025b55e1a2 | |||
| 14fbabe8d7 | |||
| b746f7a70e | |||
| 0d3b003aac | |||
| 9428927879 | |||
| 511b2f7186 | |||
| d8c83e3c65 | |||
| 050fd6f3ba | |||
| 72d6a8d4e1 | |||
| 30d35216f6 | |||
| bcd0d40912 | |||
| 4b8a6bbbe0 | |||
| 47026b669b | |||
| 752dc467a8 | |||
| bde45b262a | |||
| fc338f5723 | |||
| 346ed453ef | |||
| 664f05edba | |||
| edcff44f4b | |||
| 42ee5d2ddb | |||
| 54e421d7e6 | |||
| 9e5629d1e0 | |||
| c0fdffac28 | |||
| e94e64d204 | |||
| e503e35b84 | |||
| 752592a3d8 | |||
| 2e6d194a6f | |||
| 63dfb07b51 | |||
| 02525056d6 | |||
| 8292429648 | |||
| 765c496068 | |||
| d6feec8010 | |||
| f1fbb37547 | |||
| 5a6386dd24 | |||
| 0809db9e32 | |||
| 15a3315854 | |||
| 82d1f256b2 | |||
| e7ba2a0eb0 | |||
| eff0449b3a | |||
| 3b9e066ec8 | |||
| 260ab42b9e | |||
| a3d745edd0 | |||
| 40a92fe730 | |||
| e30bb23711 | |||
| 292c1d08d8 | |||
| be56447614 | |||
| 70fda8ba64 | |||
| 5cc407986b | |||
| 53af829f46 | |||
| 53065a6d95 | |||
| 862cfdb55d | |||
| b065b16bf1 | |||
| 6ff33b48d1 | |||
| d04020f79c | |||
| 6b15072764 | |||
| f261115ac4 | |||
| 116f130c4c | |||
| cad1b02482 | |||
| 09fe69f63a | |||
| 8ecd81d51c | |||
| 8f71b010cc | |||
| b817c6189d | |||
| a00d41930d | |||
| caee942796 | |||
| d3410fdc61 | |||
| 8087c3e5d4 | |||
| 10bd0ea09e | |||
| 5803222e68 | |||
| a243fce1ae | |||
| c8059ebf50 | |||
| ce2d270e7c | |||
| 0c945bdc7e | |||
| 60ec684853 | |||
| b159625e62 | |||
| e212262f29 | |||
| c71167d893 | |||
| 2d4e4c7a13 | |||
| 695f8df5b8 | |||
| 2e822cb6a6 | |||
| f2a90935a3 | |||
| cee741eca0 | |||
| b5b59e77d6 | |||
| cce883808e | |||
| 8faae7ef08 | |||
| 4538ef38a1 | |||
| ee12d02402 | |||
| 7050fa41a0 | |||
| 4a346211b8 | |||
| 4df2ecc8ae | |||
| 03995ec6b2 | |||
| 6059146b42 | |||
| 30811ae656 | |||
| b8015bbef5 | |||
| 157d7c57fd | |||
| 03963036d1 |
91
.gitignore
vendored
@ -1,84 +1,9 @@
|
||||
*.la
|
||||
*.lo
|
||||
*.loT
|
||||
*.o
|
||||
*.so
|
||||
.zanata-cache/
|
||||
_build
|
||||
TAGS
|
||||
tags
|
||||
vgdump
|
||||
*.swp
|
||||
*~
|
||||
*.pyc
|
||||
Makefile
|
||||
Makefile.in
|
||||
.deps
|
||||
.libs
|
||||
INSTALL
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
compile
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.rpath
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
install-sh
|
||||
libtool
|
||||
ltmain.sh
|
||||
missing
|
||||
stamp-h1
|
||||
libkeyactor*.tar.*
|
||||
mkinstalldirs
|
||||
m4/*.m4
|
||||
gtk-doc.make
|
||||
eek/eek-special-keysym-entries.h
|
||||
eek/eek-unicode-keysym-entries.h
|
||||
eek/eek-xkeysym-keysym-entries.h
|
||||
eek/eek-enumtypes.[ch]
|
||||
eek/eek-marshalers.[ch]
|
||||
eek/*.pc
|
||||
eek/*.gir
|
||||
eek/*.typelib
|
||||
eekboard/*.pc
|
||||
eekboard/*.gir
|
||||
eekboard/*.typelib
|
||||
eekboard/eekboard-marshalers.[ch]
|
||||
tests/eek-simple-test
|
||||
tests/eek-xkb-test
|
||||
tests/eek-xml-test
|
||||
src/eekboard
|
||||
src/eekboard-server
|
||||
docs/reference/eek/*.stamp
|
||||
docs/reference/eek/*.txt
|
||||
docs/reference/eek/eek.types
|
||||
!/docs/reference/eek/eek-sections.txt
|
||||
docs/reference/eek/xml
|
||||
docs/reference/eek/html
|
||||
docs/reference/eek/eek.signals
|
||||
docs/reference/eek/eek.args
|
||||
docs/reference/eek/eek.hierarchy
|
||||
docs/reference/eek/eek.interfaces
|
||||
docs/reference/eek/eek.prerequisites
|
||||
docs/reference/eekboard/*.stamp
|
||||
docs/reference/eekboard/*.txt
|
||||
!/docs/reference/eekboard/eekboard-sections.txt
|
||||
docs/reference/eekboard/xml
|
||||
docs/reference/eekboard/html
|
||||
docs/reference/eekboard/eekboard.signals
|
||||
docs/reference/eekboard/eekboard.args
|
||||
docs/reference/eekboard/eekboard.hierarchy
|
||||
docs/reference/eekboard/eekboard.interfaces
|
||||
docs/reference/eekboard/eekboard.prerequisites
|
||||
po/*.gmo
|
||||
po/Makefile.in.in
|
||||
po/POTFILES
|
||||
po/stamp-it
|
||||
po/.intltool-merge-cache
|
||||
bindings/vala/*.vapi
|
||||
py-compile
|
||||
data/org.fedorahosted.eekboard.gschema.xml
|
||||
data/org.fedorahosted.eekboard.gschema.valid
|
||||
data/eekboard-server.service
|
||||
data/*.desktop
|
||||
examples/eekxml/eekxml
|
||||
|
||||
\#*#
|
||||
.\#*
|
||||
|
||||
31
.gitlab-ci.yml
Normal file
@ -0,0 +1,31 @@
|
||||
image: debian:buster
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
|
||||
.tags: &tags
|
||||
tags:
|
||||
- librem5
|
||||
|
||||
before_script:
|
||||
- apt-get -y update
|
||||
- apt-get -y build-dep .
|
||||
|
||||
build_meson:
|
||||
<<: *tags
|
||||
stage: build
|
||||
artifacts:
|
||||
paths:
|
||||
- _build
|
||||
script:
|
||||
- meson . _build/ -Ddepdatadir=/usr/share
|
||||
- ninja -C _build install
|
||||
|
||||
test:
|
||||
<<: *tags
|
||||
stage: test
|
||||
dependencies:
|
||||
- build_meson
|
||||
script:
|
||||
- ninja -C _build test
|
||||
21
Makefile.am
@ -1,21 +0,0 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
SUBDIRS = eek eekboard src tests bindings docs po data examples
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
|
||||
35
README
@ -1,35 +0,0 @@
|
||||
eekboard - an easy to use virtual keyboard toolkit -*- outline -*-
|
||||
|
||||
eekboard is a virtual keyboard software package, including a set of
|
||||
tools to implement desktop virtual keyboards.
|
||||
|
||||
* Building
|
||||
|
||||
** Dependencies
|
||||
|
||||
REQUIRED: GLib2, GTK, PangoCairo, libxklavier, libcroco
|
||||
OPTIONAL: libXtst, at-spi2-core, IBus, Clutter, Clutter-Gtk, Python, Vala, gobject-introspection, libcanberra
|
||||
|
||||
** Build from git repo
|
||||
|
||||
$ git clone git://github.com/ueno/eekboard.git
|
||||
$ cd eekboard
|
||||
$ ./autogen.sh --prefix=/usr --enable-gtk-doc
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
** Build from tarball
|
||||
|
||||
$ ./configure --prefix=/usr
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
* Running
|
||||
|
||||
$ eekboard
|
||||
$ eekboard -f # show/hide automatically based on focus-in/focus-out events
|
||||
|
||||
Even though eekboard -f watches a11y events by default, it currently
|
||||
works better with IBus. To use IBus, do:
|
||||
|
||||
$ gsettings set org.fedorahosted.eekboard focus-listener 'ibus'
|
||||
68
README.md
Normal file
@ -0,0 +1,68 @@
|
||||
*squeekboard* - a Wayland virtual keyboard
|
||||
========================================
|
||||
|
||||
*Squeekboard* is a virtual keyboard supporting Wayland, built primarily for the *Librem 5* phone.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
### Present
|
||||
|
||||
- GTK3
|
||||
- Custom xml-defined keyboards
|
||||
- DBus interface to show and hide
|
||||
|
||||
### Temporarily dropped
|
||||
|
||||
- A settings interface
|
||||
|
||||
### TODO
|
||||
|
||||
- Use Wayland virtual keyboard protocol
|
||||
- Use Wayland text input protocol
|
||||
- Use Wayland input method protocol
|
||||
- Pick up DBus interface files from /usr/share
|
||||
|
||||
Building
|
||||
--------
|
||||
|
||||
### Dependencies
|
||||
|
||||
See `.gitlab-ci.yml`.
|
||||
|
||||
### Build from git repo
|
||||
|
||||
```
|
||||
$ git clone https://source.puri.sm/Librem5/squeekboard.git
|
||||
$ cd squeekboard
|
||||
$ mkdir ../build
|
||||
$ meson ../build/
|
||||
$ cd ../build
|
||||
$ ninja install
|
||||
```
|
||||
|
||||
For development, alter the `meson` call:
|
||||
|
||||
```
|
||||
$ meson ../build/ --prefix=../install
|
||||
```
|
||||
|
||||
and don't skip `ninja install` before running. The last step is necessary in order to find the keyboard definition files.
|
||||
|
||||
Running
|
||||
-------
|
||||
|
||||
```
|
||||
$ rootston
|
||||
$ cd ../build/
|
||||
$ src/squeekboard
|
||||
```
|
||||
|
||||
### Testing
|
||||
|
||||
```
|
||||
$ busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true
|
||||
$ busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b false
|
||||
$ gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('xkb', 'ua')]"
|
||||
$ gsettings set org.gnome.desktop.input-sources current 1
|
||||
```
|
||||
25
autogen.sh
@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
PKG_NAME="eekboard"
|
||||
|
||||
(test -f $srcdir/configure.ac \
|
||||
&& test -f $srcdir/README ) || {
|
||||
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
||||
echo " top-level $PKG_NAME directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
which gnome-autogen.sh || {
|
||||
echo "You need to install gnome-common from the GNOME CVS"
|
||||
exit 1
|
||||
}
|
||||
|
||||
ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4"
|
||||
REQUIRED_AUTOMAKE_VERSION=1.10
|
||||
REQUIRED_AUTOCONF_VERSION=2.60
|
||||
|
||||
. gnome-autogen.sh
|
||||
@ -1,19 +0,0 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
SUBDIRS = vala
|
||||
@ -1,83 +0,0 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
if ENABLE_VALA
|
||||
vapidir = $(datadir)/vala/vapi
|
||||
dist_vapi_DATA = \
|
||||
eek-$(EEK_API_VERSION).vapi \
|
||||
eek-$(EEK_API_VERSION).deps \
|
||||
eek-gtk-$(EEK_API_VERSION).vapi \
|
||||
eek-gtk-$(EEK_API_VERSION).deps \
|
||||
eek-xkl-$(EEK_API_VERSION).vapi \
|
||||
eek-xkl-$(EEK_API_VERSION).deps \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DIST = \
|
||||
Eek-$(EEK_API_VERSION).metadata \
|
||||
EekGtk-$(EEK_API_VERSION).metadata \
|
||||
EekXkl-$(EEK_API_VERSION).metadata \
|
||||
$(NULL)
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f *.vapi
|
||||
|
||||
eek_vapi_deps = \
|
||||
$(srcdir)/Eek-$(EEK_API_VERSION).metadata \
|
||||
| \
|
||||
$(top_srcdir)/eek/Eek-$(EEK_API_VERSION).gir \
|
||||
$(NULL)
|
||||
|
||||
eek-$(EEK_API_VERSION).vapi: $(eek_vapi_deps)
|
||||
$(VAPIGEN_V)$(VAPIGEN) \
|
||||
--library eek-$(EEK_API_VERSION) \
|
||||
--pkg gio-2.0 \
|
||||
--metadatadir=$(srcdir) \
|
||||
$(top_srcdir)/eek/Eek-$(EEK_API_VERSION).gir
|
||||
|
||||
eek_gtk_vapi_deps = \
|
||||
$(srcdir)/EekGtk-$(EEK_API_VERSION).metadata \
|
||||
| \
|
||||
$(top_srcdir)/eek/EekGtk-$(EEK_API_VERSION).gir \
|
||||
$(NULL)
|
||||
|
||||
eek-gtk-$(EEK_API_VERSION).vapi: $(eek_gtk_vapi_deps)
|
||||
$(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \
|
||||
--library eek-gtk-$(EEK_API_VERSION) \
|
||||
--pkg eek-$(EEK_API_VERSION) \
|
||||
--pkg gtk+-3.0 \
|
||||
--metadatadir=$(srcdir) \
|
||||
$(top_srcdir)/eek/EekGtk-$(EEK_API_VERSION).gir
|
||||
|
||||
eek_xkl_vapi_deps = \
|
||||
$(srcdir)/EekXkl-$(EEK_API_VERSION).metadata \
|
||||
| \
|
||||
$(top_srcdir)/eek/EekXkl-$(EEK_API_VERSION).gir \
|
||||
$(NULL)
|
||||
|
||||
eek-xkl-$(EEK_API_VERSION).vapi: $(eek_xkl_vapi_deps)
|
||||
$(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \
|
||||
--library eek-xkl-$(EEK_API_VERSION) \
|
||||
--pkg eek-$(EEK_API_VERSION) \
|
||||
--metadatadir=$(srcdir) \
|
||||
$(top_srcdir)/eek/EekXkl-$(EEK_API_VERSION).gir
|
||||
|
||||
# set up the verbosity rules to avoid some build noise
|
||||
VAPIGEN_V = $(VAPIGEN_V_$(V))
|
||||
VAPIGEN_V_ = $(VAPIGEN_V_$(AM_DEFAULT_VERBOSITY))
|
||||
VAPIGEN_V_0 = @echo " VAPIG " $@;
|
||||
endif
|
||||
@ -1 +1,2 @@
|
||||
eek-0.90
|
||||
x11
|
||||
|
||||
245
configure.ac
@ -1,245 +0,0 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
AC_PREREQ(2.63)
|
||||
dnl AC_CONFIG_SRCDIR([configure.ac])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_INIT([eekboard], [1.0.6], [ueno@unixuser.org])
|
||||
|
||||
dnl Init automake
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
AC_GNU_SOURCE
|
||||
|
||||
dnl Support silent build
|
||||
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
||||
|
||||
dnl Check for programs
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CXX
|
||||
|
||||
# define PACKAGE_VERSION_* variables
|
||||
AM_DISABLE_STATIC
|
||||
AC_ISC_POSIX
|
||||
AC_HEADER_STDC
|
||||
LT_INIT
|
||||
IT_PROG_INTLTOOL([0.35.0])
|
||||
|
||||
GTK_API_VERSION=3.0
|
||||
GTK_REQUIRED=2.91.0
|
||||
EEK_API_VERSION=0.90
|
||||
EEK_API_MAJOR_VERSION=0
|
||||
EEK_API_MINOR_VERSION=90
|
||||
EEK_API_PC_VERSION=0.90
|
||||
EEK_LIBRARY_SUFFIX="-$EEK_API_VERSION"
|
||||
|
||||
AC_SUBST([GTK_API_VERSION])
|
||||
AC_SUBST([EEK_API_VERSION])
|
||||
AC_SUBST([EEK_API_MAJOR_VERSION])
|
||||
AC_SUBST([EEK_API_MINOR_VERSION])
|
||||
AC_SUBST([EEK_API_PC_VERSION])
|
||||
AC_SUBST([EEK_LIBRARY_SUFFIX])
|
||||
AC_SUBST([EEK_LIBRARY_SUFFIX_U],[AS_TR_SH([$EEK_LIBRARY_SUFFIX])])
|
||||
|
||||
AM_PATH_GLIB_2_0
|
||||
PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= 2.26.0], ,
|
||||
[AC_MSG_ERROR([GLib2 not found])])
|
||||
PKG_CHECK_MODULES([GIO2], [gio-2.0], ,
|
||||
[AC_MSG_ERROR([Gio2 not found])])
|
||||
GLIB_GSETTINGS
|
||||
|
||||
PKG_CHECK_MODULES([PANGOCAIRO], [pangocairo], ,
|
||||
[AC_MSG_ERROR([PangoCairo not found])])
|
||||
PKG_CHECK_MODULES([GTK], [
|
||||
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
|
||||
gdk-$GTK_API_VERSION >= $GTK_REQUIRED], ,
|
||||
[AC_MSG_ERROR([GTK not found])])
|
||||
PKG_CHECK_MODULES([LIBXKLAVIER], [libxklavier x11], ,
|
||||
[AC_MSG_ERROR([Libxklavier not found])])
|
||||
PKG_CHECK_MODULES([LIBCROCO], [libcroco-0.6], ,
|
||||
[AC_MSG_ERROR([libcroco not found])])
|
||||
|
||||
dnl use XTest to generate key events
|
||||
AC_MSG_CHECKING([whether you enable XTest])
|
||||
AC_ARG_ENABLE(xtest,
|
||||
AS_HELP_STRING([--enable-xtest=no/yes],
|
||||
[Enable XTest default=yes]),
|
||||
enable_xtest=$enableval,
|
||||
enable_xtest=yes)
|
||||
|
||||
if test x$enable_xtest = xyes; then
|
||||
PKG_CHECK_MODULES([XTEST], [xtst], , enable_xtest=no)
|
||||
if test x$enable_xtest = xyes; then
|
||||
AC_DEFINE([HAVE_XTEST], [1], [Define if XTest is found])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_XTEST, [test x$enable_xtest = xyes])
|
||||
AC_MSG_RESULT($enable_xtest)
|
||||
|
||||
dnl use X to mark the fullscreen window as dock
|
||||
AC_MSG_CHECKING([whether you enable X dock])
|
||||
AC_ARG_ENABLE(x-dock,
|
||||
AS_HELP_STRING([--enable-x-dock=no/yes],
|
||||
[Enable X dock default=yes]),
|
||||
enable_x_dock=$enableval,
|
||||
enable_x_dock=yes)
|
||||
|
||||
if test x$enable_x_dock = xyes; then
|
||||
PKG_CHECK_MODULES([XDOCK], [x11], , enable_x_dock=no)
|
||||
if test x$enable_x_dock = xyes; then
|
||||
AC_DEFINE([HAVE_XDOCK], [1], [Define if X dock is found])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_XDOCK, [test x$enable_x_dock = xyes])
|
||||
AC_MSG_RESULT($enable_x_dock)
|
||||
|
||||
focus_listeners="ibus"
|
||||
keystroke_listeners=""
|
||||
|
||||
dnl use AT-SPI 2 to capture focus/keystroke events
|
||||
AC_MSG_CHECKING([whether you enable AT-SPI 2 event handling])
|
||||
AC_ARG_ENABLE(atspi,
|
||||
AS_HELP_STRING([--enable-atspi=no/yes],
|
||||
[Enable AT-SPI 2 event handling default=yes]),
|
||||
enable_atspi=$enableval,
|
||||
enable_atspi=yes)
|
||||
|
||||
if test x$enable_atspi = xyes; then
|
||||
PKG_CHECK_MODULES([ATSPI2], [atspi-2 dbus-glib-1], , enable_atspi=no)
|
||||
if test x$enable_atspi = xyes; then
|
||||
AC_DEFINE([HAVE_ATSPI], [1], [Define if AT-SPI 2 is found])
|
||||
focus_listeners="atspi $focus_listeners"
|
||||
keystroke_listeners="atspi $keystroke_listeners"
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT($enable_atspi)
|
||||
AM_CONDITIONAL(ENABLE_ATSPI, [test x$enable_atspi = xyes])
|
||||
|
||||
if test -n "$focus_listeners"; then
|
||||
AC_DEFINE(ENABLE_FOCUS_LISTENER, [1], [Define if eekboard can follow focus changes])
|
||||
fi
|
||||
|
||||
GOBJECT_INTROSPECTION_CHECK([0.9.0])
|
||||
|
||||
dnl Vala langauge binding
|
||||
AC_MSG_CHECKING([whether you enable Vala language support])
|
||||
AC_ARG_ENABLE(vala,
|
||||
AS_HELP_STRING([--enable-vala=no/yes],
|
||||
[Enable Vala language binding default=yes]),
|
||||
enable_vala=$enableval,
|
||||
enable_vala=yes)
|
||||
if test x$enable_vala = xyes; then
|
||||
if test "x$INTROSPECTION_SCANNER" = x; then
|
||||
enable_vala=no
|
||||
AC_MSG_WARN([GObject-Introspection must be enabled for Vala bindings])
|
||||
fi
|
||||
|
||||
AM_PROG_VALAC([0.10.0])
|
||||
have_vala=yes
|
||||
|
||||
AC_PATH_PROG(VALAC, valac, valac)
|
||||
AC_SUBST(VALAC)
|
||||
AC_SUBST(VALAFLAGS)
|
||||
|
||||
AC_PATH_PROG([VAPIGEN], [vapigen], [false])
|
||||
|
||||
if test "x$VAPIGEN" = "xfalse"; then
|
||||
enable_vala=no
|
||||
AC_MSG_WARN([vapigen not found. Was vala compiled with --enable-vapigen?])
|
||||
fi
|
||||
|
||||
AC_SUBST(VAPIGEN)
|
||||
fi
|
||||
AC_MSG_RESULT($enable_vala)
|
||||
AM_CONDITIONAL(ENABLE_VALA, [test x$enable_vala = xyes])
|
||||
|
||||
dnl libcanberra
|
||||
AC_MSG_CHECKING([whether you enable libcanberra])
|
||||
AC_ARG_ENABLE(libcanberra,
|
||||
AS_HELP_STRING([--enable-libcanberra=no/yes],
|
||||
[Enable libcanberra user interface default=no]),
|
||||
enable_libcanberra=$enableval,
|
||||
enable_libcanberra=yes)
|
||||
|
||||
if test x$enable_libcanberra = xyes; then
|
||||
PKG_CHECK_MODULES([LIBCANBERRA], [libcanberra-gtk3], , enable_libcanberra=no)
|
||||
if test x$enable_libcanberra = xyes; then
|
||||
AC_DEFINE([HAVE_LIBCANBERRA], [1], [Define if libcanberra is found])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_LIBCANBERRA, [test x$enable_libcanberra = xyes])
|
||||
AC_MSG_RESULT($enable_libcanberra)
|
||||
|
||||
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
|
||||
|
||||
dnl define GETTEXT_* variables
|
||||
GETTEXT_PACKAGE=$PACKAGE
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the read-only architecture-independent data directory.])
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
AM_GLIB_DEFINE_LOCALEDIR(EEKBOARD_LOCALEDIR)
|
||||
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_FILES([Makefile
|
||||
eek/Makefile
|
||||
eekboard/Makefile
|
||||
src/Makefile
|
||||
tests/Makefile
|
||||
bindings/Makefile
|
||||
bindings/vala/Makefile
|
||||
docs/Makefile
|
||||
docs/reference/Makefile
|
||||
docs/reference/eek/Makefile
|
||||
docs/reference/eekboard/Makefile
|
||||
po/Makefile.in
|
||||
data/Makefile
|
||||
data/icons/Makefile
|
||||
data/icons/16x16/Makefile
|
||||
data/icons/22x22/Makefile
|
||||
data/icons/24x24/Makefile
|
||||
data/icons/32x32/Makefile
|
||||
data/icons/48x48/Makefile
|
||||
data/icons/scalable/Makefile
|
||||
data/themes/Makefile
|
||||
data/keyboards/Makefile
|
||||
examples/Makefile
|
||||
examples/simple-client/Makefile
|
||||
eek/eek-${EEK_API_VERSION}.pc
|
||||
eek/eek-gtk-${EEK_API_VERSION}.pc
|
||||
eek/eek-xkl-${EEK_API_VERSION}.pc
|
||||
eekboard/eekboard-${EEK_API_VERSION}.pc])
|
||||
AC_OUTPUT
|
||||
AC_MSG_RESULT([
|
||||
Build options:
|
||||
Version $VERSION
|
||||
Install prefix $prefix
|
||||
Build shared libs $enable_shared
|
||||
Build static libs $enable_static
|
||||
CFLAGS $CFLAGS
|
||||
Build Vala binding $enable_vala
|
||||
Sound support $enable_libcanberra
|
||||
Build document $enable_gtk_doc
|
||||
Focus listeners $focus_listeners
|
||||
Keystroke listeners $keystroke_listeners
|
||||
])
|
||||
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
SUBDIRS = icons themes keyboards
|
||||
|
||||
@GSETTINGS_RULES@
|
||||
@INTLTOOL_XML_NOMERGE_RULE@
|
||||
gsettings_schemas_in_files = org.fedorahosted.eekboard.gschema.xml.in
|
||||
gsettings_SCHEMAS = $(gsettings_schemas_in_files:.gschema.xml.in=.gschema.xml)
|
||||
|
||||
servicedir = $(datadir)/dbus-1/services
|
||||
service_in_files = eekboard-server.service.in
|
||||
service_DATA = $(service_in_files:.service.in=.service)
|
||||
|
||||
$(service_DATA): $(service_in_files) Makefile
|
||||
$(AM_V_GEN) sed -e "s|\@bindir\@|$(bindir)|" $< > $@
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
desktop_in_files = eekboard.desktop.in
|
||||
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
|
||||
|
||||
if ENABLE_ATSPI
|
||||
autostartdir = $(sysconfdir)/xdg/autostart
|
||||
autostart_in_files = eekboard-autostart.desktop.in
|
||||
autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
|
||||
endif
|
||||
|
||||
@INTLTOOL_DESKTOP_RULE@
|
||||
|
||||
CLEANFILES = $(service_DATA) $(desktop_DATA) $(gsettings_SCHEMAS)
|
||||
EXTRA_DIST = $(service_in_files) $(desktop_in_files) $(gsettings_schemas_in_files)
|
||||
|
||||
if ENABLE_ATSPI
|
||||
CLEANFILES += $(autostart_DATA)
|
||||
EXTRA_DIST += $(autostart_in_files)
|
||||
endif
|
||||
|
||||
20
data/dbus/sm.puri.OSK0.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||
<interface name="sm.puri.OSK0">
|
||||
<method name="SetVisible">
|
||||
<arg name="visible" type="b" direction="in"/>
|
||||
<doc:doc><doc:description>
|
||||
Switch keyboard visibility
|
||||
</doc:description></doc:doc>
|
||||
</method>
|
||||
<method name="GetVisible">
|
||||
<arg name="visible" type="b" direction="out"/>
|
||||
<doc:doc><doc:description>
|
||||
Get keyboard visibility
|
||||
</doc:description></doc:doc>
|
||||
</method>
|
||||
<property name="Visible" type="b" access="read">
|
||||
</property>
|
||||
</interface>
|
||||
</node>
|
||||
@ -1,16 +0,0 @@
|
||||
size = 16x16
|
||||
|
||||
icondir = $(datadir)/icons/hicolor/$(size)/apps
|
||||
dist_icon_DATA = eekboard.png
|
||||
|
||||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||
|
||||
install-data-hook:
|
||||
@-if test -z "$(DESTDIR)"; then \
|
||||
echo "Updating Gtk icon cache."; \
|
||||
$(gtk_update_icon_cache); \
|
||||
else \
|
||||
echo "*** Icon cache not updated. After install, run this:"; \
|
||||
echo "*** $(gtk_update_icon_cache)"; \
|
||||
fi
|
||||
|
||||
|
Before Width: | Height: | Size: 606 B |
@ -1,16 +0,0 @@
|
||||
size = 22x22
|
||||
|
||||
icondir = $(datadir)/icons/hicolor/$(size)/apps
|
||||
dist_icon_DATA = eekboard.png
|
||||
|
||||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||
|
||||
install-data-hook:
|
||||
@-if test -z "$(DESTDIR)"; then \
|
||||
echo "Updating Gtk icon cache."; \
|
||||
$(gtk_update_icon_cache); \
|
||||
else \
|
||||
echo "*** Icon cache not updated. After install, run this:"; \
|
||||
echo "*** $(gtk_update_icon_cache)"; \
|
||||
fi
|
||||
|
||||
|
Before Width: | Height: | Size: 892 B |
@ -1,16 +0,0 @@
|
||||
size = 24x24
|
||||
|
||||
icondir = $(datadir)/icons/hicolor/$(size)/apps
|
||||
dist_icon_DATA = eekboard.png
|
||||
|
||||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||
|
||||
install-data-hook:
|
||||
@-if test -z "$(DESTDIR)"; then \
|
||||
echo "Updating Gtk icon cache."; \
|
||||
$(gtk_update_icon_cache); \
|
||||
else \
|
||||
echo "*** Icon cache not updated. After install, run this:"; \
|
||||
echo "*** $(gtk_update_icon_cache)"; \
|
||||
fi
|
||||
|
||||
|
Before Width: | Height: | Size: 957 B |
@ -1,16 +0,0 @@
|
||||
size = 32x32
|
||||
|
||||
icondir = $(datadir)/icons/hicolor/$(size)/apps
|
||||
dist_icon_DATA = eekboard.png
|
||||
|
||||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||
|
||||
install-data-hook:
|
||||
@-if test -z "$(DESTDIR)"; then \
|
||||
echo "Updating Gtk icon cache."; \
|
||||
$(gtk_update_icon_cache); \
|
||||
else \
|
||||
echo "*** Icon cache not updated. After install, run this:"; \
|
||||
echo "*** $(gtk_update_icon_cache)"; \
|
||||
fi
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
@ -1,16 +0,0 @@
|
||||
size = 48x48
|
||||
|
||||
icondir = $(datadir)/icons/hicolor/$(size)/apps
|
||||
dist_icon_DATA = eekboard.png
|
||||
|
||||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||
|
||||
install-data-hook:
|
||||
@-if test -z "$(DESTDIR)"; then \
|
||||
echo "Updating Gtk icon cache."; \
|
||||
$(gtk_update_icon_cache); \
|
||||
else \
|
||||
echo "*** Icon cache not updated. After install, run this:"; \
|
||||
echo "*** $(gtk_update_icon_cache)"; \
|
||||
fi
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB |
@ -1 +0,0 @@
|
||||
SUBDIRS = 16x16 22x22 24x24 32x32 48x48 scalable
|
||||
10
data/icons/key-enter.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16"
|
||||
version="1.1" viewBox="0 0 24 24">
|
||||
|
||||
<path d="M 24,1 L 24,10 C 24,15 20,17 17,17 L 7,17 L 10,20 L 10,23
|
||||
L 7,23 L 0,15 L 7,7 L 10,7 L 10,10 L 7,13 L 17,13
|
||||
C 19,13 20,12 20,10 L 20,1 Z"
|
||||
stroke="none" fill="black" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 388 B |
8
data/icons/key-shift.svg
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16"
|
||||
version="1.1" viewBox="0 0 24 24">
|
||||
|
||||
<path d="M 12,2 L 22,14 L 16,14 L 16,22 L 8,22 L 8,14 L 2,14 Z"
|
||||
stroke="none" fill="black" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 279 B |
52
data/icons/keyboard-mode-symbolic.svg
Normal file
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
id="svg4043"
|
||||
version="1.1"
|
||||
viewBox="0 0 4.2333331 4.2333093"
|
||||
height="4.2333093mm"
|
||||
width="4.2333331mm">
|
||||
<defs
|
||||
id="defs4037" />
|
||||
<metadata
|
||||
id="metadata4040">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
transform="translate(-86.329776,-68.097636)"
|
||||
id="layer1">
|
||||
<g
|
||||
style="stroke-width:1.00004983;fill:#2e3436;fill-opacity:1"
|
||||
transform="matrix(0.99990029,0,0,1,-7.1823833,-1.8799927)"
|
||||
id="g842">
|
||||
<g
|
||||
style="stroke-width:1.00004983;fill:#2e3436;fill-opacity:1"
|
||||
id="g836">
|
||||
<path
|
||||
id="path5166"
|
||||
d="m 95.636719,69.978516 c -1.165869,0 -2.115235,0.949365 -2.115235,2.115234 0,1.165869 0.949366,2.117188 2.115235,2.117188 1.165869,0 2.117187,-0.951319 2.117187,-2.117188 0,-1.165869 -0.951318,-2.115234 -2.117187,-2.115234 z m 0,0.529296 c 0.879886,0 1.58789,0.706052 1.58789,1.585938 0,0.879886 -0.708004,1.587891 -1.58789,1.587891 -0.879886,0 -1.585938,-0.708005 -1.585938,-1.587891 0,-0.879886 0.706052,-1.585937 1.585938,-1.585938 z"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.52919304;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
</g>
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26459652;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 95.636719,70.109375 c -0.144398,0 -0.27248,0.07793 -0.373047,0.189453 -0.100567,0.111521 -0.18209,0.261405 -0.25,0.439453 -0.135821,0.356096 -0.214844,0.830395 -0.214844,1.355469 0,0.525074 0.07902,1.001326 0.214844,1.357422 0.06791,0.178048 0.149433,0.327932 0.25,0.439453 0.100567,0.111521 0.228649,0.1875 0.373047,0.1875 0.144397,0 0.27248,-0.07598 0.373047,-0.1875 0.100566,-0.111521 0.182089,-0.261405 0.25,-0.439453 0.135821,-0.356096 0.216797,-0.832348 0.216796,-1.357422 0,-0.525074 -0.08097,-0.999373 -0.216796,-1.355469 -0.06791,-0.178048 -0.149434,-0.327932 -0.25,-0.439453 -0.100567,-0.111521 -0.22865,-0.189453 -0.373047,-0.189453 z m 0,0.265625 c 0.05067,0 0.109272,0.02564 0.177734,0.101562 0.06846,0.07592 0.139293,0.198356 0.199219,0.355469 0.119851,0.314227 0.197266,0.763915 0.197266,1.261719 0,0.497804 -0.07742,0.949446 -0.197266,1.263672 -0.05993,0.157113 -0.130756,0.279549 -0.199219,0.355469 -0.06846,0.07592 -0.12706,0.101562 -0.177734,0.101562 -0.05067,0 -0.107319,-0.02564 -0.175781,-0.101562 -0.06846,-0.07592 -0.139294,-0.198356 -0.199219,-0.355469 C 95.141867,73.043196 95.0625,72.591554 95.0625,72.09375 c 0,-0.497804 0.07937,-0.947492 0.199219,-1.261719 0.05993,-0.157113 0.130756,-0.279549 0.199219,-0.355469 C 95.5294,70.400643 95.586045,70.375 95.636719,70.375 Z"
|
||||
id="circle5168" />
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26459652;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 93.697266,71.962891 v 0.263671 h 3.96875 v -0.263671 z"
|
||||
id="path5170" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.6 KiB |
@ -1,14 +0,0 @@
|
||||
icondir = $(datadir)/icons/hicolor/scalable/apps
|
||||
dist_icon_DATA = eekboard.svg
|
||||
|
||||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||
|
||||
install-data-hook:
|
||||
@-if test -z "$(DESTDIR)"; then \
|
||||
echo "Updating Gtk icon cache."; \
|
||||
$(gtk_update_icon_cache); \
|
||||
else \
|
||||
echo "*** Icon cache not updated. After install, run this:"; \
|
||||
echo "*** $(gtk_update_icon_cache)"; \
|
||||
fi
|
||||
|
||||
|
Before Width: | Height: | Size: 472 KiB |
@ -1,38 +0,0 @@
|
||||
keyboardsdir = $(pkgdatadir)/keyboards
|
||||
|
||||
nobase_dist_keyboards_DATA = \
|
||||
keyboards.xml \
|
||||
geometry/compact.xml \
|
||||
symbols/ar.xml \
|
||||
symbols/be.xml \
|
||||
symbols/fa.xml \
|
||||
symbols/he.xml \
|
||||
symbols/ja-kana.xml \
|
||||
symbols/kk.xml \
|
||||
symbols/ks.xml \
|
||||
symbols/my.xml \
|
||||
symbols/ru.xml \
|
||||
symbols/th.xml \
|
||||
symbols/ua.xml \
|
||||
symbols/ug.xml \
|
||||
symbols/us.xml \
|
||||
symbols/zh-bopomofo.xml \
|
||||
$(inscript_symbols) \
|
||||
$(NULL)
|
||||
|
||||
inscript_symbols = \
|
||||
symbols/as-inscript.xml \
|
||||
symbols/bn-inscript.xml \
|
||||
symbols/gu-inscript.xml \
|
||||
symbols/hi-inscript.xml \
|
||||
symbols/kn-inscript.xml \
|
||||
symbols/ks-inscript.xml \
|
||||
symbols/mai-inscript.xml \
|
||||
symbols/ml-inscript.xml \
|
||||
symbols/mr-inscript.xml \
|
||||
symbols/or-inscript.xml \
|
||||
symbols/pa-inscript.xml \
|
||||
symbols/sd-inscript.xml \
|
||||
symbols/ta-inscript.xml \
|
||||
symbols/te-inscript.xml \
|
||||
$(NULL)
|
||||
@ -1,307 +1,120 @@
|
||||
<?xml version="1.0"?>
|
||||
<geometry version="0.90">
|
||||
<bounds x="0.000000" y="0.000000" width="640.0000" height="296.5853"/>
|
||||
<bounds x="10" y="10" width="410.0000" height="229"/>
|
||||
<section angle="0">
|
||||
<bounds x="15.60975" y="15.60975" width="640.0000" height="39.02439"/>
|
||||
<row columns="16" orientation="1"/>
|
||||
<key keycode="9" name="ESC" column="0" row="0" oref="outline2">
|
||||
<bounds x="3.121951" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="67" name="FK01" column="1" row="0" oref="outline2">
|
||||
<bounds x="84.29268" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="68" name="FK02" column="2" row="0" oref="outline2">
|
||||
<bounds x="124.8780" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="69" name="FK03" column="3" row="0" oref="outline2">
|
||||
<bounds x="165.4634" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="70" name="FK04" column="4" row="0" oref="outline2">
|
||||
<bounds x="206.0487" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="71" name="FK05" column="5" row="0" oref="outline2">
|
||||
<bounds x="266.9268" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="72" name="FK06" column="6" row="0" oref="outline2">
|
||||
<bounds x="307.5121" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="73" name="FK07" column="7" row="0" oref="outline2">
|
||||
<bounds x="348.0975" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="74" name="FK08" column="8" row="0" oref="outline2">
|
||||
<bounds x="388.6829" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="75" name="FK09" column="9" row="0" oref="outline2">
|
||||
<bounds x="449.5609" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="76" name="FK10" column="10" row="0" oref="outline2">
|
||||
<bounds x="490.1463" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="95" name="FK11" column="11" row="0" oref="outline2">
|
||||
<bounds x="530.7317" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="96" name="FK12" column="12" row="0" oref="outline2">
|
||||
<bounds x="571.3170" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<row orientation="1">
|
||||
<key name="AD01" oref="outline2" />
|
||||
<key name="AD02" oref="outline2" />
|
||||
<key name="AD03" oref="outline2" />
|
||||
<key name="AD04" oref="outline2" />
|
||||
<key name="AD05" oref="outline2" />
|
||||
<key name="AD06" oref="outline2" />
|
||||
<key name="AD07" oref="outline2" />
|
||||
<key name="AD08" oref="outline2" />
|
||||
<key name="AD09" oref="outline2" />
|
||||
<key name="AD10" oref="outline2" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<bounds x="15.60975" y="78.04878" width="608.7804" height="201.3658"/>
|
||||
<row columns="14" orientation="1"/>
|
||||
<row columns="14" orientation="1"/>
|
||||
<row columns="13" orientation="1"/>
|
||||
<row columns="12" orientation="1"/>
|
||||
<row columns="9" orientation="1"/>
|
||||
<key keycode="49" name="TLDE" column="0" row="0" oref="outline2">
|
||||
<bounds x="3.121951" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="10" name="AE01" column="1" row="0" oref="outline2">
|
||||
<bounds x="43.70731" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="11" name="AE02" column="2" row="0" oref="outline2">
|
||||
<bounds x="84.29268" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="12" name="AE03" column="3" row="0" oref="outline2">
|
||||
<bounds x="124.8780" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="13" name="AE04" column="4" row="0" oref="outline2">
|
||||
<bounds x="165.4634" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="14" name="AE05" column="5" row="0" oref="outline2">
|
||||
<bounds x="206.0487" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="15" name="AE06" column="6" row="0" oref="outline2">
|
||||
<bounds x="245.0731" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="16" name="AE07" column="7" row="0" oref="outline2">
|
||||
<bounds x="285.6585" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="17" name="AE08" column="8" row="0" oref="outline2">
|
||||
<bounds x="326.2439" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="18" name="AE09" column="9" row="0" oref="outline2">
|
||||
<bounds x="366.8292" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="19" name="AE10" column="10" row="0" oref="outline2">
|
||||
<bounds x="407.4146" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="20" name="AE11" column="11" row="0" oref="outline2">
|
||||
<bounds x="448.0000" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="21" name="AE12" column="12" row="0" oref="outline2">
|
||||
<bounds x="488.5853" y="1.560976" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="22" name="BKSP" column="13" row="0" oref="outline13">
|
||||
<bounds x="529.1707" y="1.560976" width="79.60975" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="23" name="TAB" column="0" row="1" oref="outline4">
|
||||
<bounds x="3.121951" y="42.14634" width="59.31707" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="24" name="AD01" column="1" row="1" oref="outline2">
|
||||
<bounds x="65.56097" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="25" name="AD02" column="2" row="1" oref="outline2">
|
||||
<bounds x="106.1463" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="26" name="AD03" column="3" row="1" oref="outline2">
|
||||
<bounds x="145.1707" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="27" name="AD04" column="4" row="1" oref="outline2">
|
||||
<bounds x="185.7560" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="28" name="AD05" column="5" row="1" oref="outline2">
|
||||
<bounds x="226.3414" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="29" name="AD06" column="6" row="1" oref="outline2">
|
||||
<bounds x="266.9268" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="30" name="AD07" column="7" row="1" oref="outline2">
|
||||
<bounds x="307.5121" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="31" name="AD08" column="8" row="1" oref="outline2">
|
||||
<bounds x="348.0975" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="32" name="AD09" column="9" row="1" oref="outline2">
|
||||
<bounds x="388.6829" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="33" name="AD10" column="10" row="1" oref="outline2">
|
||||
<bounds x="429.2682" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="34" name="AD11" column="11" row="1" oref="outline2">
|
||||
<bounds x="468.2926" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="35" name="AD12" column="12" row="1" oref="outline2">
|
||||
<bounds x="508.8780" y="42.14634" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="51" name="BKSL" column="13" row="1" oref="outline5">
|
||||
<bounds x="549.4634" y="42.14634" width="59.31707" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="66" name="CAPS" column="0" row="2" oref="outline6">
|
||||
<bounds x="3.121951" y="82.73170" width="68.68292" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="38" name="AC01" column="1" row="2" oref="outline2">
|
||||
<bounds x="76.48780" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="39" name="AC02" column="2" row="2" oref="outline2">
|
||||
<bounds x="115.5121" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="40" name="AC03" column="3" row="2" oref="outline2">
|
||||
<bounds x="156.0975" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="41" name="AC04" column="4" row="2" oref="outline2">
|
||||
<bounds x="196.6829" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="42" name="AC05" column="5" row="2" oref="outline2">
|
||||
<bounds x="237.2682" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="43" name="AC06" column="6" row="2" oref="outline2">
|
||||
<bounds x="277.8536" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="44" name="AC07" column="7" row="2" oref="outline2">
|
||||
<bounds x="318.4390" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="45" name="AC08" column="8" row="2" oref="outline2">
|
||||
<bounds x="359.0243" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="46" name="AC09" column="9" row="2" oref="outline2">
|
||||
<bounds x="399.6097" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="47" name="AC10" column="10" row="2" oref="outline2">
|
||||
<bounds x="438.6341" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="48" name="AC11" column="11" row="2" oref="outline2">
|
||||
<bounds x="479.2195" y="82.73170" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="36" name="RTRN" column="12" row="2" oref="outline7">
|
||||
<bounds x="519.8048" y="82.73170" width="88.97561" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="50" name="LFSH" column="0" row="3" oref="outline8">
|
||||
<bounds x="3.121951" y="121.7560" width="88.97561" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="52" name="AB01" column="1" row="3" oref="outline2">
|
||||
<bounds x="95.21951" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="53" name="AB02" column="2" row="3" oref="outline2">
|
||||
<bounds x="135.8048" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="54" name="AB03" column="3" row="3" oref="outline2">
|
||||
<bounds x="176.3902" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="55" name="AB04" column="4" row="3" oref="outline2">
|
||||
<bounds x="215.4146" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="56" name="AB05" column="5" row="3" oref="outline2">
|
||||
<bounds x="256.0000" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="57" name="AB06" column="6" row="3" oref="outline2">
|
||||
<bounds x="296.5853" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="58" name="AB07" column="7" row="3" oref="outline2">
|
||||
<bounds x="337.1707" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="59" name="AB08" column="8" row="3" oref="outline2">
|
||||
<bounds x="377.7560" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="60" name="AB09" column="9" row="3" oref="outline2">
|
||||
<bounds x="418.3414" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="61" name="AB10" column="10" row="3" oref="outline2">
|
||||
<bounds x="458.9268" y="121.7560" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="62" name="RTSH" column="11" row="3" oref="outline9">
|
||||
<bounds x="499.5121" y="121.7560" width="109.2682" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="149" name="I149" column="0" row="4" oref="outline10">
|
||||
<bounds x="3.121951" y="162.3414" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="37" name="LCTL" column="1" row="4" oref="outline1">
|
||||
<bounds x="62.43902" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="64" name="LALT" column="2" row="4" oref="outline1">
|
||||
<bounds x="113.9512" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="65" name="SPCE" column="3" row="4" oref="outline3">
|
||||
<bounds x="165.4634" y="162.3414" width="217.5853" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="113" name="LEFT" column="4" row="4" oref="outline1">
|
||||
<bounds x="368.0487" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="111" name="UP" column="5" row="4" oref="outline1">
|
||||
<bounds x="419.43894" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="116" name="DOWN" column="6" row="4" oref="outline1">
|
||||
<bounds x="470.82918" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="114" name="RGHT" column="7" row="4" oref="outline1">
|
||||
<bounds x="522.21942" y="162.3414" width="48.39024" height="37.46341"/>
|
||||
</key>
|
||||
<key keycode="150" name="I150" column="8" row="4" oref="outline10">
|
||||
<bounds x="573.60966" y="162.3414" width="37.46341" height="37.46341"/>
|
||||
</key>
|
||||
<row orientation="1">
|
||||
<key name="AC01" oref="outline2" />
|
||||
<key name="AC02" oref="outline2" />
|
||||
<key name="AC03" oref="outline2" />
|
||||
<key name="AC04" oref="outline2" />
|
||||
<key name="AC05" oref="outline2" />
|
||||
<key name="AC06" oref="outline2" />
|
||||
<key name="AC07" oref="outline2" />
|
||||
<key name="AC08" oref="outline2" />
|
||||
<key name="AC09" oref="outline2" />
|
||||
<key name="AC10" oref="outline2" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="LFSH" oref="altline" />
|
||||
<key name="AB01" oref="outline2" />
|
||||
<key name="AB02" oref="outline2" />
|
||||
<key name="AB03" oref="outline2" />
|
||||
<key name="AB04" oref="outline2" />
|
||||
<key name="AB05" oref="outline2" />
|
||||
<key name="AB06" oref="outline2" />
|
||||
<key name="AB07" oref="outline2" />
|
||||
<key name="BKSP" oref="altline" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key keycode="0" name="ABC123" oref="altline" />
|
||||
<key name="I149" oref="altline" />
|
||||
<key name="SPCE" oref="spaceline" />
|
||||
<key name="AB08" oref="outline2" />
|
||||
<key name="RTRN" oref="outline7" />
|
||||
</row>
|
||||
</section>
|
||||
<outline id="outline2" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="37.46341" y="0.000000"/>
|
||||
<point x="37.46341" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
<point x="37.46341" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline1" corner-radius="1.000000">
|
||||
<outline id="altline" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="48.39024" y="0.000000"/>
|
||||
<point x="48.39024" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
<point x="48.39024" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline4" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="59.31707" y="0.000000"/>
|
||||
<point x="59.31707" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
<point x="59.31707" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline5" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="59.31707" y="0.000000"/>
|
||||
<point x="59.31707" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
<point x="59.31707" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline6" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="68.68292" y="0.000000"/>
|
||||
<point x="68.68292" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
<point x="68.68292" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline7" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="88.97561" y="0.000000"/>
|
||||
<point x="88.97561" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
<point x="88.97561" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline8" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="88.97561" y="0.000000"/>
|
||||
<point x="88.97561" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
<point x="88.97561" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline9" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="109.2682" y="0.000000"/>
|
||||
<point x="109.2682" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
<point x="109.2682" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline10" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="37.46341" y="0.000000"/>
|
||||
<point x="37.46341" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
<point x="37.46341" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline13" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="79.60975" y="0.000000"/>
|
||||
<point x="79.60975" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
<point x="79.60975" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline3" corner-radius="1.000000">
|
||||
<outline id="spaceline" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="217.5853" y="0.000000"/>
|
||||
<point x="217.5853" y="37.46341"/>
|
||||
<point x="0.000000" y="37.46341"/>
|
||||
<point x="150.5853" y="0.000000"/>
|
||||
<point x="150.5853" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
</geometry>
|
||||
|
||||
98
data/keyboards/geometry/digits.xml
Normal file
@ -0,0 +1,98 @@
|
||||
<?xml version="1.0"?>
|
||||
<geometry version="0.90">
|
||||
<bounds x="0" y="10.000000" width="426.0000" height="296.5853"/>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="AD01" oref="outline4" />
|
||||
<key name="AD02" oref="outline4" />
|
||||
<key name="AD03" oref="outline4" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="AC01" oref="outline4" />
|
||||
<key name="AC02" oref="outline4" />
|
||||
<key name="AC03" oref="outline4" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="AB01" oref="outline4" />
|
||||
<key name="AB02" oref="outline4" />
|
||||
<key name="AB03" oref="outline4" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="BKSP" oref="altline" />
|
||||
<key name="AB04" oref="outline4" />
|
||||
<key name="RTRN" oref="altline" />
|
||||
</row>
|
||||
</section>
|
||||
<outline id="outline2" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="37.46341" y="0.000000"/>
|
||||
<point x="37.46341" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="altline" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="48.39024" y="0.000000"/>
|
||||
<point x="48.39024" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline4" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="59.31707" y="0.000000"/>
|
||||
<point x="59.31707" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline5" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="59.31707" y="0.000000"/>
|
||||
<point x="59.31707" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline6" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="68.68292" y="0.000000"/>
|
||||
<point x="68.68292" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline7" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="88.97561" y="0.000000"/>
|
||||
<point x="88.97561" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline8" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="88.97561" y="0.000000"/>
|
||||
<point x="88.97561" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline9" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="109.2682" y="0.000000"/>
|
||||
<point x="109.2682" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline10" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="37.46341" y="0.000000"/>
|
||||
<point x="37.46341" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline13" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="79.60975" y="0.000000"/>
|
||||
<point x="79.60975" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="spaceline" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="120.5853" y="0.000000"/>
|
||||
<point x="120.5853" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
</geometry>
|
||||
122
data/keyboards/geometry/extended.xml
Normal file
@ -0,0 +1,122 @@
|
||||
<?xml version="1.0"?>
|
||||
<geometry version="0.90">
|
||||
<bounds x="0" y="10.000000" width="426.0000" height="296.5853"/>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="AD01" oref="outline2" />
|
||||
<key name="AD02" oref="outline2" />
|
||||
<key name="AD03" oref="outline2" />
|
||||
<key name="AD04" oref="outline2" />
|
||||
<key name="AD05" oref="outline2" />
|
||||
<key name="AD06" oref="outline2" />
|
||||
<key name="AD07" oref="outline2" />
|
||||
<key name="AD08" oref="outline2" />
|
||||
<key name="AD09" oref="outline2" />
|
||||
<key name="AD10" oref="outline2" />
|
||||
<key name="AD11" oref="outline2" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="AC01" oref="outline2" />
|
||||
<key name="AC02" oref="outline2" />
|
||||
<key name="AC03" oref="outline2" />
|
||||
<key name="AC04" oref="outline2" />
|
||||
<key name="AC05" oref="outline2" />
|
||||
<key name="AC06" oref="outline2" />
|
||||
<key name="AC07" oref="outline2" />
|
||||
<key name="AC08" oref="outline2" />
|
||||
<key name="AC09" oref="outline2" />
|
||||
<key name="AC10" oref="outline2" />
|
||||
<key name="AC11" oref="outline2" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="LFSH" oref="altline" />
|
||||
<key name="AB01" oref="outline2" />
|
||||
<key name="AB02" oref="outline2" />
|
||||
<key name="AB03" oref="outline2" />
|
||||
<key name="AB04" oref="outline2" />
|
||||
<key name="AB05" oref="outline2" />
|
||||
<key name="AB06" oref="outline2" />
|
||||
<key name="AB07" oref="outline2" />
|
||||
<key name="BKSP" oref="altline" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key keycode="0" name="ABC123" oref="altline" />
|
||||
<key name="I149" oref="altline" />
|
||||
<key name="SPCE" oref="spaceline" />
|
||||
<key name="AB08" oref="outline2" />
|
||||
<key name="RTRN" oref="outline7" />
|
||||
</row>
|
||||
</section>
|
||||
<outline id="outline2" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="32" y="0.000000"/>
|
||||
<point x="32" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="altline" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="48.39024" y="0.000000"/>
|
||||
<point x="48.39024" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline4" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="59.31707" y="0.000000"/>
|
||||
<point x="59.31707" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline5" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="59.31707" y="0.000000"/>
|
||||
<point x="59.31707" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline6" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="68.68292" y="0.000000"/>
|
||||
<point x="68.68292" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline7" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="88.97561" y="0.000000"/>
|
||||
<point x="88.97561" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline8" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="88.97561" y="0.000000"/>
|
||||
<point x="88.97561" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline9" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="109.2682" y="0.000000"/>
|
||||
<point x="109.2682" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline10" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="37.46341" y="0.000000"/>
|
||||
<point x="37.46341" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="outline13" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="79.60975" y="0.000000"/>
|
||||
<point x="79.60975" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
<outline id="spaceline" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="150.5853" y="0.000000"/>
|
||||
<point x="150.5853" y="52"/>
|
||||
<point x="0.000000" y="52"/>
|
||||
</outline>
|
||||
</geometry>
|
||||
105
data/keyboards/geometry/number-keypad.xml
Normal file
@ -0,0 +1,105 @@
|
||||
<?xml version="1.0"?>
|
||||
<geometry version="0.90">
|
||||
<bounds x="0" y="10.000000" width="426.0000" height="296.5853"/>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="AD01" oref="outline2" />
|
||||
<key name="AD02" oref="outline2" />
|
||||
<key name="AD03" oref="outline2" />
|
||||
<key name="AD04" oref="outline2" />
|
||||
<key name="AD05" oref="outline2" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="AC01" oref="outline2" />
|
||||
<key name="AC02" oref="outline2" />
|
||||
<key name="AC03" oref="outline2" />
|
||||
<key name="AC04" oref="outline2" />
|
||||
<key name="AC05" oref="outline2" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="AB01" oref="outline2" />
|
||||
<key name="AB02" oref="outline2" />
|
||||
<key name="AB03" oref="outline2" />
|
||||
<key name="AB04" oref="outline2" />
|
||||
<key name="AB05" oref="outline2" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="BKSP" oref="altline" />
|
||||
<key name="AB06" oref="outline2" />
|
||||
<key name="SPCE" oref="spaceline" />
|
||||
<key name="RTRN" oref="outline7" />
|
||||
</row>
|
||||
</section>
|
||||
<outline id="outline2" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="37.46341" y="0.000000"/>
|
||||
<point x="37.46341" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="altline" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="48.39024" y="0.000000"/>
|
||||
<point x="48.39024" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline4" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="59.31707" y="0.000000"/>
|
||||
<point x="59.31707" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline5" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="59.31707" y="0.000000"/>
|
||||
<point x="59.31707" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline6" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="68.68292" y="0.000000"/>
|
||||
<point x="68.68292" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline7" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="88.97561" y="0.000000"/>
|
||||
<point x="88.97561" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline8" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="88.97561" y="0.000000"/>
|
||||
<point x="88.97561" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline9" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="109.2682" y="0.000000"/>
|
||||
<point x="109.2682" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline10" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="37.46341" y="0.000000"/>
|
||||
<point x="37.46341" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline13" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="79.60975" y="0.000000"/>
|
||||
<point x="79.60975" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="spaceline" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="120.5853" y="0.000000"/>
|
||||
<point x="120.5853" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
</geometry>
|
||||
105
data/keyboards/geometry/phone-keypad.xml
Normal file
@ -0,0 +1,105 @@
|
||||
<?xml version="1.0"?>
|
||||
<geometry version="0.90">
|
||||
<bounds x="0" y="10.000000" width="426.0000" height="296.5853"/>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="AD01" oref="outline2" />
|
||||
<key name="AD02" oref="outline2" />
|
||||
<key name="AD03" oref="outline2" />
|
||||
<key name="AD04" oref="outline2" />
|
||||
<key name="AD05" oref="outline2" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="AC01" oref="outline2" />
|
||||
<key name="AC02" oref="outline2" />
|
||||
<key name="AC03" oref="outline2" />
|
||||
<key name="AC04" oref="outline2" />
|
||||
<key name="AC05" oref="outline2" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="AB01" oref="outline2" />
|
||||
<key name="AB02" oref="outline2" />
|
||||
<key name="AB03" oref="outline2" />
|
||||
<key name="AB04" oref="outline2" />
|
||||
<key name="AB05" oref="outline2" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="BKSP" oref="altline" />
|
||||
<key name="AB06" oref="outline2" />
|
||||
<key name="SPCE" oref="spaceline" />
|
||||
<key name="RTRN" oref="outline7" />
|
||||
</row>
|
||||
</section>
|
||||
<outline id="outline2" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="37.46341" y="0.000000"/>
|
||||
<point x="37.46341" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="altline" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="48.39024" y="0.000000"/>
|
||||
<point x="48.39024" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline4" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="59.31707" y="0.000000"/>
|
||||
<point x="59.31707" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline5" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="59.31707" y="0.000000"/>
|
||||
<point x="59.31707" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline6" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="68.68292" y="0.000000"/>
|
||||
<point x="68.68292" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline7" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="88.97561" y="0.000000"/>
|
||||
<point x="88.97561" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline8" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="88.97561" y="0.000000"/>
|
||||
<point x="88.97561" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline9" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="109.2682" y="0.000000"/>
|
||||
<point x="109.2682" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline10" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="37.46341" y="0.000000"/>
|
||||
<point x="37.46341" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline13" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="79.60975" y="0.000000"/>
|
||||
<point x="79.60975" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="spaceline" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="120.5853" y="0.000000"/>
|
||||
<point x="120.5853" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
</geometry>
|
||||
126
data/keyboards/geometry/url.xml
Normal file
@ -0,0 +1,126 @@
|
||||
<?xml version="1.0"?>
|
||||
<geometry version="0.90">
|
||||
<bounds x="0" y="10.000000" width="426.0000" height="296.5853"/>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="AD01" oref="outline2" />
|
||||
<key name="AD02" oref="outline2" />
|
||||
<key name="AD03" oref="outline2" />
|
||||
<key name="AD04" oref="outline2" />
|
||||
<key name="AD05" oref="outline2" />
|
||||
<key name="AD06" oref="outline2" />
|
||||
<key name="AD07" oref="outline2" />
|
||||
<key name="AD08" oref="outline2" />
|
||||
<key name="AD09" oref="outline2" />
|
||||
<key name="AD10" oref="outline2" />
|
||||
<key name="AE01" oref="outline6" />
|
||||
<key name="AE02" oref="outline2" />
|
||||
<key name="AE03" oref="outline6" />
|
||||
<key name="AE04" oref="outline6" />
|
||||
<key name="AE05" oref="outline6" />
|
||||
<key name="AE06" oref="outline6" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="AC01" oref="outline2" />
|
||||
<key name="AC02" oref="outline2" />
|
||||
<key name="AC03" oref="outline2" />
|
||||
<key name="AC04" oref="outline2" />
|
||||
<key name="AC05" oref="outline2" />
|
||||
<key name="AC06" oref="outline2" />
|
||||
<key name="AC07" oref="outline2" />
|
||||
<key name="AC08" oref="outline2" />
|
||||
<key name="AC09" oref="outline2" />
|
||||
<key name="AC10" oref="outline2" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key name="LFSH" oref="altline" />
|
||||
<key name="AB01" oref="outline2" />
|
||||
<key name="AB02" oref="outline2" />
|
||||
<key name="AB03" oref="outline2" />
|
||||
<key name="AB04" oref="outline2" />
|
||||
<key name="AB05" oref="outline2" />
|
||||
<key name="AB06" oref="outline2" />
|
||||
<key name="AB07" oref="outline2" />
|
||||
<key name="BKSP" oref="altline" />
|
||||
</row>
|
||||
</section>
|
||||
<section angle="0">
|
||||
<row orientation="1">
|
||||
<key keycode="0" name="ABC123" oref="altline" />
|
||||
<key name="I149" oref="altline" />
|
||||
<key name="SPCE" oref="spaceline" />
|
||||
<key name="AB08" oref="outline2" />
|
||||
<key name="RTRN" oref="outline7" />
|
||||
</row>
|
||||
</section>
|
||||
<outline id="outline2" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="37.46341" y="0.000000"/>
|
||||
<point x="37.46341" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="altline" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="48.39024" y="0.000000"/>
|
||||
<point x="48.39024" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline4" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="59.31707" y="0.000000"/>
|
||||
<point x="59.31707" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline5" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="59.31707" y="0.000000"/>
|
||||
<point x="59.31707" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline6" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="68.68292" y="0.000000"/>
|
||||
<point x="68.68292" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline7" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="88.97561" y="0.000000"/>
|
||||
<point x="88.97561" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline8" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="88.97561" y="0.000000"/>
|
||||
<point x="88.97561" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline9" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="109.2682" y="0.000000"/>
|
||||
<point x="109.2682" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline10" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="37.46341" y="0.000000"/>
|
||||
<point x="37.46341" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="outline13" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="79.60975" y="0.000000"/>
|
||||
<point x="79.60975" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
<outline id="spaceline" corner-radius="1.000000">
|
||||
<point x="0.000000" y="0.000000"/>
|
||||
<point x="150.5853" y="0.000000"/>
|
||||
<point x="150.5853" y="52.44877"/>
|
||||
<point x="0.000000" y="52.44877"/>
|
||||
</outline>
|
||||
</geometry>
|
||||
@ -24,6 +24,9 @@
|
||||
<keyboard id="my" name="my"
|
||||
geometry="compact" symbols="my"
|
||||
longname="Myanmar" language="my"/>
|
||||
<keyboard id="nb" name="nb"
|
||||
geometry="extended" symbols="nb"
|
||||
longname="Norwegian" language="nb"/>
|
||||
<keyboard id="ru" name="ru"
|
||||
geometry="compact" symbols="us"
|
||||
longname="Russian" language="ru"/>
|
||||
@ -85,4 +88,19 @@
|
||||
<keyboard id="te-inscript" name="te-inscript"
|
||||
geometry="compact" symbols="te-inscript"
|
||||
longname="Telugu (Inscript)" language="te"/>
|
||||
|
||||
<!-- Common keyboards -->
|
||||
<keyboard id="digits" name="digits"
|
||||
geometry="digits" symbols="special/digits"
|
||||
longname="Digits" language="all"/>
|
||||
<keyboard id="number" name="number"
|
||||
geometry="number-keypad" symbols="special/number"
|
||||
longname="Numeric keypad" language="all"/>
|
||||
<keyboard id="phone" name="phone"
|
||||
geometry="phone-keypad" symbols="special/phone"
|
||||
longname="Phone keypad" language="all"/>
|
||||
<keyboard id="url" name="url"
|
||||
geometry="url" symbols="special/url"
|
||||
longname="Uniform Resource Locator" language="all"/>
|
||||
|
||||
</keyboards>
|
||||
|
||||
@ -1,250 +1,154 @@
|
||||
<?xml version="1.0"?>
|
||||
<symbols version="0.90">
|
||||
<include>us</include>
|
||||
<key keycode="1" name="AE03" groups="2">
|
||||
<keysym keyval="51" label="あ">3</keysym>
|
||||
<keysym keyval="35" label="ぁ">numbersign</keysym>
|
||||
<keysym keyval="51" label="ア">3</keysym>
|
||||
<keysym keyval="35" label="ァ">numbersign</keysym>
|
||||
<key keycode="49" name="TLDE">
|
||||
<keysym keyval="1246">゛</keysym>
|
||||
<keysym keyval="1247">゜</keysym>
|
||||
</key>
|
||||
<key keycode="2" name="AD03" groups="2">
|
||||
<keysym keyval="101" label="い">e</keysym>
|
||||
<keysym keyval="69" label="ぃ">E</keysym>
|
||||
<keysym keyval="101" label="イ">e</keysym>
|
||||
<keysym keyval="69" label="ィ">E</keysym>
|
||||
<key keycode="10" name="AE01">
|
||||
<keysym keyval="1223">ぬ</keysym>
|
||||
</key>
|
||||
<key keycode="3" name="AE04" groups="2">
|
||||
<keysym keyval="52" label="う">4</keysym>
|
||||
<keysym keyval="36" label="ぅ">dollar</keysym>
|
||||
<keysym keyval="52" label="ウ">4</keysym>
|
||||
<keysym keyval="36" label="ゥ">dollar</keysym>
|
||||
<key keycode="11" name="AE02">
|
||||
<keysym keyval="1228">ふ</keysym>
|
||||
</key>
|
||||
<key keycode="4" name="AE05" groups="2">
|
||||
<keysym keyval="53" label="え">5</keysym>
|
||||
<keysym keyval="37" label="ぇ">percent</keysym>
|
||||
<keysym keyval="53" label="エ">5</keysym>
|
||||
<keysym keyval="37" label="ェ">percent</keysym>
|
||||
<key keycode="12" name="AE03">
|
||||
<keysym keyval="1201">あ</keysym>
|
||||
<keysym keyval="1191">ぁ</keysym>
|
||||
</key>
|
||||
<key keycode="5" name="AE06" groups="2">
|
||||
<keysym keyval="54" label="お">6</keysym>
|
||||
<keysym keyval="38" label="ぉ">ampersand</keysym>
|
||||
<keysym keyval="54" label="オ">6</keysym>
|
||||
<keysym keyval="38" label="ォ">ampersand</keysym>
|
||||
<key keycode="13" name="AE04">
|
||||
<keysym keyval="1203">う</keysym>
|
||||
<keysym keyval="1193">ぅ</keysym>
|
||||
</key>
|
||||
|
||||
<key keycode="6" name="AE03" groups="2">
|
||||
<keysym keyval="116" label="か">t</keysym>
|
||||
<keysym keyval="116" label="カ">t</keysym>
|
||||
<key keycode="14" name="AE05">
|
||||
<keysym keyval="1204">え</keysym>
|
||||
<keysym keyval="1194">ぇ</keysym>
|
||||
</key>
|
||||
<key keycode="7" name="AD03" groups="2">
|
||||
<keysym keyval="103" label="き">g</keysym>
|
||||
<keysym keyval="103" label="キ">g</keysym>
|
||||
<key keycode="15" name="AE06">
|
||||
<keysym keyval="1205">お</keysym>
|
||||
<keysym keyval="1195">ぉ</keysym>
|
||||
</key>
|
||||
<key keycode="8" name="AE04" groups="2">
|
||||
<keysym keyval="104" label="く">h</keysym>
|
||||
<keysym keyval="104" label="ク">h</keysym>
|
||||
<key keycode="16" name="AE07">
|
||||
<keysym keyval="1236">や</keysym>
|
||||
<keysym keyval="1196">ゃ</keysym>
|
||||
</key>
|
||||
<key keycode="9" name="AE05" groups="2">
|
||||
<keysym keyval="58" label="け">colon</keysym>
|
||||
<keysym keyval="58" label="ケ">colon</keysym>
|
||||
<key keycode="17" name="AE08">
|
||||
<keysym keyval="1237">ゆ</keysym>
|
||||
<keysym keyval="1197">ゅ</keysym>
|
||||
</key>
|
||||
<key keycode="10" name="AE06" groups="2">
|
||||
<keysym keyval="98" label="こ">b</keysym>
|
||||
<keysym keyval="98" label="コ">b</keysym>
|
||||
<key keycode="18" name="AE09">
|
||||
<keysym keyval="1238">よ</keysym>
|
||||
<keysym keyval="1198">ょ</keysym>
|
||||
</key>
|
||||
|
||||
<key keycode="11" name="AE03" groups="2">
|
||||
<keysym keyval="120" label="さ">x</keysym>
|
||||
<keysym keyval="120" label="サ">x</keysym>
|
||||
<key keycode="19" name="AE10">
|
||||
<keysym keyval="1244">わ</keysym>
|
||||
<keysym keyval="1190">を</keysym>
|
||||
</key>
|
||||
<key keycode="12" name="AD03" groups="2">
|
||||
<keysym keyval="100" label="し">d</keysym>
|
||||
<keysym keyval="100" label="シ">d</keysym>
|
||||
<key keycode="20" name="AE11">
|
||||
<keysym keyval="1230">ほ</keysym>
|
||||
</key>
|
||||
<key keycode="13" name="AE04" groups="2">
|
||||
<keysym keyval="114" label="す">r</keysym>
|
||||
<keysym keyval="114" label="ス">r</keysym>
|
||||
<key keycode="21" name="AE12">
|
||||
<keysym keyval="1229">へ</keysym>
|
||||
</key>
|
||||
<key keycode="14" name="AE05" groups="2">
|
||||
<keysym keyval="112" label="せ">p</keysym>
|
||||
<keysym keyval="112" label="セ">p</keysym>
|
||||
<key keycode="24" name="AD01">
|
||||
<keysym keyval="1216">た</keysym>
|
||||
</key>
|
||||
<key keycode="15" name="AE06" groups="2">
|
||||
<keysym keyval="99" label="そ">c</keysym>
|
||||
<keysym keyval="99" label="ソ">c</keysym>
|
||||
<key keycode="25" name="AD02">
|
||||
<keysym keyval="1219">て</keysym>
|
||||
</key>
|
||||
|
||||
<key keycode="16" name="AE03" groups="2">
|
||||
<keysym keyval="113" label="た">q</keysym>
|
||||
<keysym keyval="113" label="タ">q</keysym>
|
||||
<key keycode="26" name="AD03">
|
||||
<keysym keyval="1202">い</keysym>
|
||||
<keysym keyval="1192">ぃ</keysym>
|
||||
</key>
|
||||
<key keycode="17" name="AD03" groups="2">
|
||||
<keysym keyval="97" label="ち">a</keysym>
|
||||
<keysym keyval="97" label="チ">a</keysym>
|
||||
<key keycode="27" name="AD04">
|
||||
<keysym keyval="1213">す</keysym>
|
||||
</key>
|
||||
<key keycode="18" name="AE04" groups="2">
|
||||
<keysym keyval="122" label="つ">z</keysym>
|
||||
<keysym keyval="90" label="っ">Z</keysym>
|
||||
<keysym keyval="122" label="ツ">z</keysym>
|
||||
<keysym keyval="90" label="ッ">Z</keysym>
|
||||
<key keycode="28" name="AD05">
|
||||
<keysym keyval="1206">か</keysym>
|
||||
</key>
|
||||
<key keycode="19" name="AE05" groups="2">
|
||||
<keysym keyval="119" label="て">w</keysym>
|
||||
<keysym keyval="119" label="テ">w</keysym>
|
||||
<key keycode="29" name="AD06">
|
||||
<keysym keyval="1245">ん</keysym>
|
||||
</key>
|
||||
<key keycode="20" name="AE06" groups="2">
|
||||
<keysym keyval="115" label="と">s</keysym>
|
||||
<keysym keyval="115" label="ト">s</keysym>
|
||||
<key keycode="30" name="AD07">
|
||||
<keysym keyval="1221">な</keysym>
|
||||
</key>
|
||||
|
||||
<key keycode="21" name="AE03" groups="2">
|
||||
<keysym keyval="117" label="な">u</keysym>
|
||||
<keysym keyval="117" label="ナ">u</keysym>
|
||||
<key keycode="31" name="AD08">
|
||||
<keysym keyval="1222">に</keysym>
|
||||
</key>
|
||||
<key keycode="22" name="AD03" groups="2">
|
||||
<keysym keyval="105" label="に">i</keysym>
|
||||
<keysym keyval="105" label="ニ">i</keysym>
|
||||
<key keycode="32" name="AD09">
|
||||
<keysym keyval="1239">ら</keysym>
|
||||
</key>
|
||||
<key keycode="23" name="AE04" groups="2">
|
||||
<keysym keyval="33" label="ぬ">exclam</keysym>
|
||||
<keysym keyval="33" label="ヌ">exclam</keysym>
|
||||
<key keycode="33" name="AD10">
|
||||
<keysym keyval="1214">せ</keysym>
|
||||
</key>
|
||||
<key keycode="24" name="AE05" groups="2">
|
||||
<keysym keyval="44" label="ね">comma</keysym>
|
||||
<keysym keyval="44" label="ネ">comma</keysym>
|
||||
<key keycode="34" name="AD11">
|
||||
<keysym keyval="1233">む</keysym>
|
||||
</key>
|
||||
<key keycode="25" name="AE06" groups="2">
|
||||
<keysym keyval="107" label="の">k</keysym>
|
||||
<keysym keyval="107" label="ノ">k</keysym>
|
||||
<key keycode="35" name="AD12">
|
||||
<keysym keyval="1243">ろ</keysym>
|
||||
</key>
|
||||
|
||||
<key keycode="26" name="AE03" groups="2">
|
||||
<keysym keyval="102" label="は">f</keysym>
|
||||
<keysym keyval="102" label="ハ">f</keysym>
|
||||
<key keycode="38" name="AC01">
|
||||
<keysym keyval="1217">ち</keysym>
|
||||
</key>
|
||||
<key keycode="27" name="AD03" groups="2">
|
||||
<keysym keyval="118" label="ひ">v</keysym>
|
||||
<keysym keyval="118" label="ヒ">v</keysym>
|
||||
<key keycode="39" name="AC02">
|
||||
<keysym keyval="1220">と</keysym>
|
||||
</key>
|
||||
<key keycode="28" name="AE04" groups="2">
|
||||
<keysym keyval="34" label="ふ">quotedbl</keysym>
|
||||
<keysym keyval="34" label="フ">quotedbl</keysym>
|
||||
<key keycode="40" name="AC03">
|
||||
<keysym keyval="1212">し</keysym>
|
||||
</key>
|
||||
<key keycode="29" name="AE05" groups="2">
|
||||
<keysym keyval="94" label="へ">asciicircum</keysym>
|
||||
<keysym keyval="94" label="ヘ">asciicircum</keysym>
|
||||
<key keycode="41" name="AC04">
|
||||
<keysym keyval="1226">は</keysym>
|
||||
</key>
|
||||
<key keycode="30" name="AE06" groups="2">
|
||||
<keysym keyval="61" label="ほ">equal</keysym>
|
||||
<keysym keyval="61" label="ホ">equal</keysym>
|
||||
<key keycode="42" name="AC05">
|
||||
<keysym keyval="1207">き</keysym>
|
||||
</key>
|
||||
|
||||
<key keycode="31" name="AE03" groups="2">
|
||||
<keysym keyval="106" label="ま">j</keysym>
|
||||
<keysym keyval="106" label="マ">j</keysym>
|
||||
<key keycode="43" name="AC06">
|
||||
<keysym keyval="1208">く</keysym>
|
||||
</key>
|
||||
<key keycode="32" name="AD03" groups="2">
|
||||
<keysym keyval="110" label="み">n</keysym>
|
||||
<keysym keyval="110" label="ミ">n</keysym>
|
||||
<key keycode="44" name="AC07">
|
||||
<keysym keyval="1231">ま</keysym>
|
||||
</key>
|
||||
<key keycode="33" name="AE04" groups="2">
|
||||
<keysym keyval="93" label="む">bracketright</keysym>
|
||||
<keysym keyval="93" label="ム">bracketright</keysym>
|
||||
<key keycode="45" name="AC08">
|
||||
<keysym keyval="1225">の</keysym>
|
||||
</key>
|
||||
<key keycode="34" name="AE05" groups="2">
|
||||
<keysym keyval="47" label="め">slash</keysym>
|
||||
<keysym keyval="47" label="メ">slash</keysym>
|
||||
<key keycode="46" name="AC09">
|
||||
<keysym keyval="1240">り</keysym>
|
||||
</key>
|
||||
<key keycode="35" name="AE06" groups="2">
|
||||
<keysym keyval="109" label="も">m</keysym>
|
||||
<keysym keyval="109" label="モ">m</keysym>
|
||||
<key keycode="47" name="AC10">
|
||||
<keysym keyval="1242">れ</keysym>
|
||||
</key>
|
||||
|
||||
<key keycode="36" name="AE03" groups="2">
|
||||
<keysym keyval="55" label="や">7</keysym>
|
||||
<keysym keyval="39" label="ゃ">quoteright</keysym>
|
||||
<keysym keyval="55" label="ヤ">7</keysym>
|
||||
<keysym keyval="39" label="ャ">quoteright</keysym>
|
||||
<key keycode="48" name="AC11">
|
||||
<keysym keyval="1209">け</keysym>
|
||||
</key>
|
||||
<key keycode="37" name="AD03" groups="2">
|
||||
<keysym keyval="56" label="ゆ">8</keysym>
|
||||
<keysym keyval="40" label="ゅ">parenleft</keysym>
|
||||
<keysym keyval="56" label="ユ">8</keysym>
|
||||
<keysym keyval="40" label="ュ">parenleft</keysym>
|
||||
<key keycode="52" name="AB01">
|
||||
<keysym keyval="1218">つ</keysym>
|
||||
<keysym keyval="1199">っ</keysym>
|
||||
</key>
|
||||
<key keycode="38" name="AE04" groups="2">
|
||||
<keysym keyval="57" label="よ">9</keysym>
|
||||
<keysym keyval="41" label="ょ">parenright</keysym>
|
||||
<keysym keyval="57" label="ヨ">9</keysym>
|
||||
<keysym keyval="41" label="ョ">parenright</keysym>
|
||||
<key keycode="53" name="AB02">
|
||||
<keysym keyval="1211">さ</keysym>
|
||||
</key>
|
||||
<key keycode="41" name="AE03" groups="2">
|
||||
<keysym keyval="111" label="ら">o</keysym>
|
||||
<keysym keyval="111" label="ラ">o</keysym>
|
||||
<key keycode="54" name="AB03">
|
||||
<keysym keyval="1215">そ</keysym>
|
||||
</key>
|
||||
<key keycode="42" name="AD03" groups="2">
|
||||
<keysym keyval="108" label="り">l</keysym>
|
||||
<keysym keyval="108" label="リ">l</keysym>
|
||||
<key keycode="55" name="AB04">
|
||||
<keysym keyval="1227">ひ</keysym>
|
||||
</key>
|
||||
<key keycode="43" name="AE04" groups="2">
|
||||
<keysym keyval="46" label="る">period</keysym>
|
||||
<keysym keyval="46" label="ル">period</keysym>
|
||||
<key keycode="56" name="AB05">
|
||||
<keysym keyval="1210">こ</keysym>
|
||||
</key>
|
||||
<key keycode="44" name="AE05" groups="2">
|
||||
<keysym keyval="59" label="れ">semicolon</keysym>
|
||||
<keysym keyval="59" label="レ">semicolon</keysym>
|
||||
<key keycode="57" name="AB06">
|
||||
<keysym keyval="1232">み</keysym>
|
||||
</key>
|
||||
<key keycode="45" name="AE06" groups="2">
|
||||
<keysym keyval="92" label="ろ">backslash</keysym>
|
||||
<keysym keyval="92" label="ロ">backslash</keysym>
|
||||
<key keycode="58" name="AB07">
|
||||
<keysym keyval="1235">も</keysym>
|
||||
</key>
|
||||
|
||||
<key keycode="46" name="AE03" groups="2">
|
||||
<keysym keyval="48" label="わ">0</keysym>
|
||||
<keysym keyval="48" label="ワ">0</keysym>
|
||||
<key keycode="59" name="AB08">
|
||||
<keysym keyval="1224">ね</keysym>
|
||||
</key>
|
||||
<key keycode="47" name="AD03" groups="2">
|
||||
<keysym keyval="126" label="を">asciitilde</keysym>
|
||||
<keysym keyval="126" label="ヲ">asciitilde</keysym>
|
||||
<key keycode="60" name="AB09">
|
||||
<keysym keyval="1241">る</keysym>
|
||||
</key>
|
||||
<key keycode="48" name="AE04" groups="2">
|
||||
<keysym keyval="121" label="ん">y</keysym>
|
||||
<keysym keyval="121" label="ン">y</keysym>
|
||||
</key>
|
||||
<key keycode="49" name="AE05" groups="2">
|
||||
<keysym keyval="123" label="「">braceleft</keysym>
|
||||
<keysym keyval="48" label="ゐ">0</keysym>
|
||||
<keysym keyval="123" label="「">braceleft</keysym>
|
||||
<keysym keyval="48" label="ヰ">0</keysym>
|
||||
</key>
|
||||
<key keycode="50" name="AE06" groups="2">
|
||||
<keysym keyval="125" label="」">braceright</keysym>
|
||||
<keysym keyval="48" label="ゑ">0</keysym>
|
||||
<keysym keyval="125" label="」">braceright</keysym>
|
||||
<keysym keyval="48" label="ヱ">0</keysym>
|
||||
</key>
|
||||
|
||||
<key keycode="51" name="AE03" groups="2">
|
||||
<keysym keyval="64" label="゛">at</keysym>
|
||||
<keysym keyval="64" label="゛">at</keysym>
|
||||
</key>
|
||||
<key keycode="52" name="AD03" groups="2">
|
||||
<keysym keyval="91" label="゜">bracketleft</keysym>
|
||||
<keysym keyval="91" label="゜">bracketleft</keysym>
|
||||
</key>
|
||||
<key keycode="53" name="AE04" groups="2">
|
||||
<keysym keyval="124" label="ー">bar</keysym>
|
||||
<keysym keyval="124" label="ー">bar</keysym>
|
||||
</key>
|
||||
<key keycode="54" name="AE05" groups="2">
|
||||
<keysym keyval="60" label="、">less</keysym>
|
||||
<keysym keyval="60" label="、">less</keysym>
|
||||
</key>
|
||||
<key keycode="55" name="AE06" groups="2">
|
||||
<keysym keyval="62" label="。">greater</keysym>
|
||||
<keysym keyval="63" label="・">question</keysym>
|
||||
<keysym keyval="62" label="。">greater</keysym>
|
||||
<keysym keyval="63" label="・">question</keysym>
|
||||
<key keycode="61" name="AB10">
|
||||
<keysym keyval="1234">め</keysym>
|
||||
</key>
|
||||
</symbols>
|
||||
|
||||
|
||||
206
data/keyboards/symbols/nb.xml
Normal file
@ -0,0 +1,206 @@
|
||||
<?xml version='1.0' encoding='ASCII' standalone='yes'?>
|
||||
<symbols version="0.90">
|
||||
<key name="AD01">
|
||||
<symbol label="q">q</symbol>
|
||||
<symbol label="Q">Q</symbol>
|
||||
<symbol label="1">1</symbol>
|
||||
<symbol label="~">asciitilde</symbol>
|
||||
</key>
|
||||
<key name="AD02">
|
||||
<symbol label="w">w</symbol>
|
||||
<symbol label="W">W</symbol>
|
||||
<symbol label="2">2</symbol>
|
||||
<symbol label="`">quoteleft</symbol>
|
||||
</key>
|
||||
<key name="AD03">
|
||||
<symbol label="e">e</symbol>
|
||||
<symbol label="E">E</symbol>
|
||||
<symbol label="3">3</symbol>
|
||||
<symbol label="|">bar</symbol>
|
||||
</key>
|
||||
<key name="AD04">
|
||||
<symbol label="r">r</symbol>
|
||||
<symbol label="R">R</symbol>
|
||||
<symbol label="4">4</symbol>
|
||||
<symbol label="·">U00B7</symbol>
|
||||
</key>
|
||||
<key name="AD05">
|
||||
<symbol label="t">t</symbol>
|
||||
<symbol label="T">T</symbol>
|
||||
<symbol label="5">5</symbol>
|
||||
<symbol label="√">squareroot</symbol>
|
||||
</key>
|
||||
<key name="AD06">
|
||||
<symbol label="y">y</symbol>
|
||||
<symbol label="Y">Y</symbol>
|
||||
<symbol label="6">6</symbol>
|
||||
<symbol label="π">Greek_pi</symbol>
|
||||
</key>
|
||||
<key name="AD07">
|
||||
<symbol label="u">u</symbol>
|
||||
<symbol label="U">U</symbol>
|
||||
<symbol label="7">7</symbol>
|
||||
<symbol label="÷">division</symbol>
|
||||
</key>
|
||||
<key name="AD08">
|
||||
<symbol label="i">i</symbol>
|
||||
<symbol label="I">I</symbol>
|
||||
<symbol label="8">8</symbol>
|
||||
<symbol label="×">multiply</symbol>
|
||||
</key>
|
||||
<key name="AD09">
|
||||
<symbol label="o">o</symbol>
|
||||
<symbol label="O">O</symbol>
|
||||
<symbol label="9">9</symbol>
|
||||
<symbol label="¶">paragraph</symbol>
|
||||
</key>
|
||||
<key name="AD10">
|
||||
<symbol label="p">p</symbol>
|
||||
<symbol label="P">P</symbol>
|
||||
<symbol label="0">0</symbol>
|
||||
<symbol label="△">U25B3</symbol>
|
||||
</key>
|
||||
<key name="AD11">
|
||||
<symbol keyval="229" label="å">aring</symbol>
|
||||
<symbol keyval="197" label="Å">Aring</symbol>
|
||||
<symbol label=""></symbol>
|
||||
<symbol label=""></symbol>
|
||||
<!-- Empty labels cause keys to be hidden when the level they are defined
|
||||
for is shown. -->
|
||||
</key>
|
||||
<key name="AC01">
|
||||
<symbol label="a">a</symbol>
|
||||
<symbol label="A">A</symbol>
|
||||
<symbol label="@">at</symbol>
|
||||
<symbol label="©">copyright</symbol>
|
||||
</key>
|
||||
<key name="AC02">
|
||||
<symbol label="s">s</symbol>
|
||||
<symbol label="S">S</symbol>
|
||||
<symbol label="#">numbersign</symbol>
|
||||
<symbol label="®">U00AE</symbol>
|
||||
</key>
|
||||
<key name="AC03">
|
||||
<symbol label="d">d</symbol>
|
||||
<symbol label="D">D</symbol>
|
||||
<symbol label="$">dollar</symbol>
|
||||
<symbol label="£">U00A3</symbol>
|
||||
</key>
|
||||
<key name="AC04">
|
||||
<symbol label="f">f</symbol>
|
||||
<symbol label="F">F</symbol>
|
||||
<symbol label="%">percent</symbol>
|
||||
<symbol label="€">EuroSign</symbol>
|
||||
</key>
|
||||
<key name="AC05">
|
||||
<symbol label="g">g</symbol>
|
||||
<symbol label="G">G</symbol>
|
||||
<symbol label="&">ampersand</symbol>
|
||||
<symbol label="¥">U00A5</symbol>
|
||||
</key>
|
||||
<key name="AC06">
|
||||
<symbol label="h">h</symbol>
|
||||
<symbol label="H">H</symbol>
|
||||
<symbol label="-">minus</symbol>
|
||||
<symbol label="^">asciicircum</symbol>
|
||||
</key>
|
||||
<key name="AC07">
|
||||
<symbol label="j">j</symbol>
|
||||
<symbol label="J">J</symbol>
|
||||
<symbol label="_">underscore</symbol>
|
||||
<symbol label="°">degree</symbol>
|
||||
</key>
|
||||
<key name="AC08">
|
||||
<symbol label="k">k</symbol>
|
||||
<symbol label="K">K</symbol>
|
||||
<symbol label="+">plus</symbol>
|
||||
<symbol label="=">equal</symbol>
|
||||
</key>
|
||||
<key name="AC09">
|
||||
<symbol label="l">l</symbol>
|
||||
<symbol label="L">L</symbol>
|
||||
<symbol label="(">parenleft</symbol>
|
||||
<symbol label="{">braceleft</symbol>
|
||||
</key>
|
||||
<key name="AC10">
|
||||
<symbol keyval="248" label="ø">oslash</symbol>
|
||||
<symbol keyval="216" label="Ø">Oslash</symbol>
|
||||
<symbol label=")">parenright</symbol>
|
||||
<symbol label="}">braceright</symbol>
|
||||
</key>
|
||||
<key name="AC11">
|
||||
<symbol keyval="230" label="æ">ae</symbol>
|
||||
<symbol keyval="198" label="Æ">AE</symbol>
|
||||
<symbol label=""></symbol>
|
||||
<symbol label=""></symbol>
|
||||
</key>
|
||||
<key name="RTRN">
|
||||
<symbol keyval="65293" icon="key-enter">Return</symbol>
|
||||
</key>
|
||||
<key name="LFSH">
|
||||
<keysym keyval="65505" icon="key-shift">Shift_L</keysym>
|
||||
<keysym keyval="65505" icon="key-shift">Shift_L</keysym>
|
||||
<keysym keyval="65505" label="=/+">Shift_L</keysym>
|
||||
<keysym keyval="65505" label="123">Shift_L</keysym>
|
||||
</key>
|
||||
<key name="AB01">
|
||||
<symbol label="z">z</symbol>
|
||||
<symbol label="Z">Z</symbol>
|
||||
<symbol label=",">comma</symbol>
|
||||
<symbol label="\">backslash</symbol>
|
||||
</key>
|
||||
<key name="AB02">
|
||||
<symbol label="x">x</symbol>
|
||||
<symbol label="X">X</symbol>
|
||||
<symbol label=""">quotedbl</symbol>
|
||||
<symbol label="/">slash</symbol>
|
||||
</key>
|
||||
<key name="AB03">
|
||||
<symbol label="c">c</symbol>
|
||||
<symbol label="C">C</symbol>
|
||||
<symbol label="'">quoteright</symbol>
|
||||
<symbol label="<">less</symbol>
|
||||
</key>
|
||||
<key name="AB04">
|
||||
<symbol label="v">v</symbol>
|
||||
<symbol label="V">V</symbol>
|
||||
<symbol label=":">colon</symbol>
|
||||
<symbol label=">">greater</symbol>
|
||||
</key>
|
||||
<key name="AB05">
|
||||
<symbol label="b">b</symbol>
|
||||
<symbol label="B">B</symbol>
|
||||
<symbol label=";">semicolon</symbol>
|
||||
<symbol label="=">equal</symbol>
|
||||
</key>
|
||||
<key name="AB06">
|
||||
<symbol label="n">n</symbol>
|
||||
<symbol label="N">N</symbol>
|
||||
<symbol label="!">exclam</symbol>
|
||||
<symbol label="[">bracketleft</symbol>
|
||||
</key>
|
||||
<key name="AB07">
|
||||
<symbol label="m">m</symbol>
|
||||
<symbol label="M">M</symbol>
|
||||
<symbol label="?">question</symbol>
|
||||
<symbol label="]">bracketright</symbol>
|
||||
</key>
|
||||
<key name="AB08">
|
||||
<symbol label=".">period</symbol>
|
||||
</key>
|
||||
<key name="ABC123">
|
||||
<symbol label="123">show-numbers</symbol>
|
||||
<symbol label="123">show-numbers</symbol>
|
||||
<symbol label="ABC">show-letters</symbol>
|
||||
<symbol label="ABC">show-letters</symbol>
|
||||
</key>
|
||||
<key name="I149">
|
||||
<symbol icon="keyboard-mode-symbolic" tooltip="Setup">preferences</symbol>
|
||||
</key>
|
||||
<key name="SPCE">
|
||||
<symbol label=" ">space</symbol>
|
||||
</key>
|
||||
<key name="BKSP">
|
||||
<symbol keyval="65288" icon="edit-clear-symbolic">BackSpace</symbol>
|
||||
</key>
|
||||
</symbols>
|
||||
39
data/keyboards/symbols/special/digits.xml
Normal file
@ -0,0 +1,39 @@
|
||||
<?xml version='1.0' encoding='ASCII' standalone='yes'?>
|
||||
<symbols version="0.90">
|
||||
<key name="AD01">
|
||||
<symbol label="1">1</symbol>
|
||||
</key>
|
||||
<key name="AD02">
|
||||
<symbol label="2">2</symbol>
|
||||
</key>
|
||||
<key name="AD03">
|
||||
<symbol label="3">3</symbol>
|
||||
</key>
|
||||
<key name="AC01">
|
||||
<symbol label="4">4</symbol>
|
||||
</key>
|
||||
<key name="AC02">
|
||||
<symbol label="5">5</symbol>
|
||||
</key>
|
||||
<key name="AC03">
|
||||
<symbol label="6">6</symbol>
|
||||
</key>
|
||||
<key name="AB01">
|
||||
<symbol label="7">7</symbol>
|
||||
</key>
|
||||
<key name="AB02">
|
||||
<symbol label="8">8</symbol>
|
||||
</key>
|
||||
<key name="AB03">
|
||||
<symbol label="9">9</symbol>
|
||||
</key>
|
||||
<key name="AB04">
|
||||
<symbol label="0">0</symbol>
|
||||
</key>
|
||||
<key name="RTRN">
|
||||
<symbol keyval="65293" icon="key-enter">Return</symbol>
|
||||
</key>
|
||||
<key name="BKSP">
|
||||
<symbol keyval="65288" icon="edit-clear-symbolic">BackSpace</symbol>
|
||||
</key>
|
||||
</symbols>
|
||||
60
data/keyboards/symbols/special/number.xml
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version='1.0' encoding='ASCII' standalone='yes'?>
|
||||
<symbols version="0.90">
|
||||
<key name="AD01">
|
||||
<symbol label="1">1</symbol>
|
||||
</key>
|
||||
<key name="AD02">
|
||||
<symbol label="2">2</symbol>
|
||||
</key>
|
||||
<key name="AD03">
|
||||
<symbol label="3">3</symbol>
|
||||
</key>
|
||||
<key name="AD04">
|
||||
<symbol label=".">period</symbol>
|
||||
</key>
|
||||
<key name="AD05">
|
||||
<symbol label=",">comma</symbol>
|
||||
</key>
|
||||
<key name="AC01">
|
||||
<symbol label="4">4</symbol>
|
||||
</key>
|
||||
<key name="AC02">
|
||||
<symbol label="5">5</symbol>
|
||||
</key>
|
||||
<key name="AC03">
|
||||
<symbol label="6">6</symbol>
|
||||
</key>
|
||||
<key name="AC04">
|
||||
<symbol label="/">slash</symbol>
|
||||
</key>
|
||||
<key name="AC05">
|
||||
<symbol label="*">asterisk</symbol>
|
||||
</key>
|
||||
<key name="AB01">
|
||||
<symbol label="7">7</symbol>
|
||||
</key>
|
||||
<key name="AB02">
|
||||
<symbol label="8">8</symbol>
|
||||
</key>
|
||||
<key name="AB03">
|
||||
<symbol label="9">9</symbol>
|
||||
</key>
|
||||
<key name="AB04">
|
||||
<symbol label="+">plus</symbol>
|
||||
</key>
|
||||
<key name="AB05">
|
||||
<symbol label="-">minus</symbol>
|
||||
</key>
|
||||
<key name="AB06">
|
||||
<symbol label="0">0</symbol>
|
||||
</key>
|
||||
<key name="RTRN">
|
||||
<symbol keyval="65293" icon="key-enter">Return</symbol>
|
||||
</key>
|
||||
<key name="SPCE">
|
||||
<symbol label=" ">space</symbol>
|
||||
</key>
|
||||
<key name="BKSP">
|
||||
<symbol keyval="65288" icon="edit-clear-symbolic">BackSpace</symbol>
|
||||
</key>
|
||||
</symbols>
|
||||
60
data/keyboards/symbols/special/phone.xml
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version='1.0' encoding='ASCII' standalone='yes'?>
|
||||
<symbols version="0.90">
|
||||
<key name="AD01">
|
||||
<symbol label="1">1</symbol>
|
||||
</key>
|
||||
<key name="AD02">
|
||||
<symbol label="2">2</symbol>
|
||||
</key>
|
||||
<key name="AD03">
|
||||
<symbol label="3">3</symbol>
|
||||
</key>
|
||||
<key name="AD04">
|
||||
<symbol label="(">parenleft</symbol>
|
||||
</key>
|
||||
<key name="AD05">
|
||||
<symbol label=")">parenright</symbol>
|
||||
</key>
|
||||
<key name="AC01">
|
||||
<symbol label="4">4</symbol>
|
||||
</key>
|
||||
<key name="AC02">
|
||||
<symbol label="5">5</symbol>
|
||||
</key>
|
||||
<key name="AC03">
|
||||
<symbol label="6">6</symbol>
|
||||
</key>
|
||||
<key name="AC04">
|
||||
<symbol label="#">numbersign</symbol>
|
||||
</key>
|
||||
<key name="AC05">
|
||||
<symbol label="*">asterisk</symbol>
|
||||
</key>
|
||||
<key name="AB01">
|
||||
<symbol label="7">7</symbol>
|
||||
</key>
|
||||
<key name="AB02">
|
||||
<symbol label="8">8</symbol>
|
||||
</key>
|
||||
<key name="AB03">
|
||||
<symbol label="9">9</symbol>
|
||||
</key>
|
||||
<key name="AB04">
|
||||
<symbol label="+">plus</symbol>
|
||||
</key>
|
||||
<key name="AB05">
|
||||
<symbol label="-">minus</symbol>
|
||||
</key>
|
||||
<key name="AB06">
|
||||
<symbol label="0">0</symbol>
|
||||
</key>
|
||||
<key name="RTRN">
|
||||
<symbol keyval="65293" icon="key-enter">Return</symbol>
|
||||
</key>
|
||||
<key name="SPCE">
|
||||
<symbol label=" ">space</symbol>
|
||||
</key>
|
||||
<key name="BKSP">
|
||||
<symbol keyval="65288" icon="edit-clear-symbolic">BackSpace</symbol>
|
||||
</key>
|
||||
</symbols>
|
||||
231
data/keyboards/symbols/special/url.xml
Normal file
@ -0,0 +1,231 @@
|
||||
<?xml version='1.0' encoding='ASCII' standalone='yes'?>
|
||||
<symbols version="0.90">
|
||||
<key name="AD01">
|
||||
<symbol label="q">q</symbol>
|
||||
<symbol label="Q">Q</symbol>
|
||||
<symbol label=""></symbol>
|
||||
<symbol label="1">1</symbol>
|
||||
</key>
|
||||
<key name="AD02">
|
||||
<symbol label="w">w</symbol>
|
||||
<symbol label="W">W</symbol>
|
||||
<symbol label=""></symbol>
|
||||
<symbol label="2">2</symbol>
|
||||
</key>
|
||||
<key name="AD03">
|
||||
<symbol label="e">e</symbol>
|
||||
<symbol label="E">E</symbol>
|
||||
<symbol label=""></symbol>
|
||||
<symbol label="3">3</symbol>
|
||||
</key>
|
||||
<key name="AD04">
|
||||
<symbol label="r">r</symbol>
|
||||
<symbol label="R">R</symbol>
|
||||
<symbol label=""></symbol>
|
||||
<symbol label="4">4</symbol>
|
||||
</key>
|
||||
<key name="AD05">
|
||||
<symbol label="t">t</symbol>
|
||||
<symbol label="T">T</symbol>
|
||||
<symbol label=""></symbol>
|
||||
<symbol label="5">5</symbol>
|
||||
</key>
|
||||
<key name="AD06">
|
||||
<symbol label="y">y</symbol>
|
||||
<symbol label="Y">Y</symbol>
|
||||
<symbol label=""></symbol>
|
||||
<symbol label="6">6</symbol>
|
||||
</key>
|
||||
<key name="AD07">
|
||||
<symbol label="u">u</symbol>
|
||||
<symbol label="U">U</symbol>
|
||||
<symbol label=""></symbol>
|
||||
<symbol label="7">7</symbol>
|
||||
</key>
|
||||
<key name="AD08">
|
||||
<symbol label="i">i</symbol>
|
||||
<symbol label="I">I</symbol>
|
||||
<symbol label=""></symbol>
|
||||
<symbol label="8">8</symbol>
|
||||
</key>
|
||||
<key name="AD09">
|
||||
<symbol label="o">o</symbol>
|
||||
<symbol label="O">O</symbol>
|
||||
<symbol label=""></symbol>
|
||||
<symbol label="9">9</symbol>
|
||||
</key>
|
||||
<key name="AD10">
|
||||
<symbol label="p">p</symbol>
|
||||
<symbol label="P">P</symbol>
|
||||
<symbol label=""></symbol>
|
||||
<symbol label="0">0</symbol>
|
||||
</key>
|
||||
<key name="AC01">
|
||||
<symbol label="a">a</symbol>
|
||||
<symbol label="A">A</symbol>
|
||||
<symbol label="@">at</symbol>
|
||||
<symbol label="~">asciitilde</symbol>
|
||||
</key>
|
||||
<key name="AC02">
|
||||
<symbol label="s">s</symbol>
|
||||
<symbol label="S">S</symbol>
|
||||
<symbol label="#">numbersign</symbol>
|
||||
<symbol label="®">U00AE</symbol>
|
||||
</key>
|
||||
<key name="AC03">
|
||||
<symbol label="d">d</symbol>
|
||||
<symbol label="D">D</symbol>
|
||||
<symbol label="$">dollar</symbol>
|
||||
<symbol label="£">U00A3</symbol>
|
||||
</key>
|
||||
<key name="AC04">
|
||||
<symbol label="f">f</symbol>
|
||||
<symbol label="F">F</symbol>
|
||||
<symbol label="%">percent</symbol>
|
||||
<symbol label="€">EuroSign</symbol>
|
||||
</key>
|
||||
<key name="AC05">
|
||||
<symbol label="g">g</symbol>
|
||||
<symbol label="G">G</symbol>
|
||||
<symbol label="&">ampersand</symbol>
|
||||
<symbol label="¥">U00A5</symbol>
|
||||
</key>
|
||||
<key name="AC06">
|
||||
<symbol label="h">h</symbol>
|
||||
<symbol label="H">H</symbol>
|
||||
<symbol label="-">minus</symbol>
|
||||
<symbol label="^">asciicircum</symbol>
|
||||
</key>
|
||||
<key name="AC07">
|
||||
<symbol label="j">j</symbol>
|
||||
<symbol label="J">J</symbol>
|
||||
<symbol label="_">underscore</symbol>
|
||||
<symbol label="°">degree</symbol>
|
||||
</key>
|
||||
<key name="AC08">
|
||||
<symbol label="k">k</symbol>
|
||||
<symbol label="K">K</symbol>
|
||||
<symbol label="+">plus</symbol>
|
||||
<symbol label="=">equal</symbol>
|
||||
</key>
|
||||
<key name="AC09">
|
||||
<symbol label="l">l</symbol>
|
||||
<symbol label="L">L</symbol>
|
||||
<symbol label="(">parenleft</symbol>
|
||||
<symbol label="{">braceleft</symbol>
|
||||
</key>
|
||||
<key name="AC10">
|
||||
<symbol label=""></symbol>
|
||||
<symbol label=""></symbol>
|
||||
<symbol label=")">parenright</symbol>
|
||||
<symbol label="}">braceright</symbol>
|
||||
</key>
|
||||
<key name="RTRN">
|
||||
<symbol keyval="65293" icon="key-enter">Return</symbol>
|
||||
</key>
|
||||
<key name="LFSH">
|
||||
<keysym keyval="65505" icon="key-shift">Shift_L</keysym>
|
||||
<keysym keyval="65505" icon="key-shift">Shift_L</keysym>
|
||||
<keysym keyval="65505" label="123">Shift_L</keysym>
|
||||
<keysym keyval="65505" label="URL">Shift_L</keysym>
|
||||
</key>
|
||||
<key name="AB01">
|
||||
<symbol label="z">z</symbol>
|
||||
<symbol label="Z">Z</symbol>
|
||||
<symbol label=",">comma</symbol>
|
||||
<symbol label="\">backslash</symbol>
|
||||
</key>
|
||||
<key name="AB02">
|
||||
<symbol label="x">x</symbol>
|
||||
<symbol label="X">X</symbol>
|
||||
<symbol label=""">quotedbl</symbol>
|
||||
<symbol label="/">slash</symbol>
|
||||
</key>
|
||||
<key name="AB03">
|
||||
<symbol label="c">c</symbol>
|
||||
<symbol label="C">C</symbol>
|
||||
<symbol label="'">quoteright</symbol>
|
||||
<symbol label="<">less</symbol>
|
||||
</key>
|
||||
<key name="AB04">
|
||||
<symbol label="v">v</symbol>
|
||||
<symbol label="V">V</symbol>
|
||||
<symbol label=":">colon</symbol>
|
||||
<symbol label=">">greater</symbol>
|
||||
</key>
|
||||
<key name="AB05">
|
||||
<symbol label="b">b</symbol>
|
||||
<symbol label="B">B</symbol>
|
||||
<symbol label=";">semicolon</symbol>
|
||||
<symbol label="=">equal</symbol>
|
||||
</key>
|
||||
<key name="AB06">
|
||||
<symbol label="n">n</symbol>
|
||||
<symbol label="N">N</symbol>
|
||||
<symbol label="!">exclam</symbol>
|
||||
<symbol label="[">bracketleft</symbol>
|
||||
</key>
|
||||
<key name="AB07">
|
||||
<symbol label="m">m</symbol>
|
||||
<symbol label="M">M</symbol>
|
||||
<symbol label="?">question</symbol>
|
||||
<symbol label="]">bracketright</symbol>
|
||||
</key>
|
||||
<key name="AB08">
|
||||
<symbol label=".">period</symbol>
|
||||
</key>
|
||||
<key name="ABC123">
|
||||
<symbol label="URL">show-url</symbol>
|
||||
<symbol label="URL">show-url</symbol>
|
||||
<symbol label="ABC">show-letters</symbol>
|
||||
<symbol label="ABC">show-letters</symbol>
|
||||
</key>
|
||||
<key name="I149">
|
||||
<symbol label="☺" icon="keyboard-mode-symbolic" tooltip="Setup">preferences</symbol>
|
||||
</key>
|
||||
<key name="SPCE">
|
||||
<symbol label=" ">space</symbol>
|
||||
</key>
|
||||
<key name="BKSP">
|
||||
<symbol keyval="65288" icon="edit-clear-symbolic">BackSpace</symbol>
|
||||
</key>
|
||||
|
||||
<!-- Extra URL mode buttons -->
|
||||
<key name="AE01">
|
||||
<symbol label=""></symbol>
|
||||
<symbol label=""></symbol>
|
||||
<text label="https">https</text>
|
||||
<symbol label=""></symbol>
|
||||
</key>
|
||||
<key name="AE02">
|
||||
<symbol label=""></symbol>
|
||||
<symbol label=""></symbol>
|
||||
<text label="://">://</text>
|
||||
<symbol label=""></symbol>
|
||||
</key>
|
||||
<key name="AE03">
|
||||
<symbol label=""></symbol>
|
||||
<symbol label=""></symbol>
|
||||
<text label="www.">www.</text>
|
||||
<symbol label=""></symbol>
|
||||
</key>
|
||||
<key name="AE04">
|
||||
<symbol label=""></symbol>
|
||||
<symbol label=""></symbol>
|
||||
<text label=".com">.com</text>
|
||||
<symbol label=""></symbol>
|
||||
</key>
|
||||
<key name="AE05">
|
||||
<symbol label=""></symbol>
|
||||
<symbol label=""></symbol>
|
||||
<text label=".org">.org</text>
|
||||
<symbol label=""></symbol>
|
||||
</key>
|
||||
<key name="AE06">
|
||||
<symbol label=""></symbol>
|
||||
<symbol label=""></symbol>
|
||||
<text label=".net">.net</text>
|
||||
<symbol label=""></symbol>
|
||||
</key>
|
||||
|
||||
</symbols>
|
||||
@ -1,278 +1,194 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version='1.0' encoding='ASCII' standalone='yes'?>
|
||||
<symbols version="0.90">
|
||||
<key keycode="9" name="ESC">
|
||||
<keysym keyval="65307">Escape</keysym>
|
||||
</key>
|
||||
<key keycode="67" name="FK01">
|
||||
<keysym keyval="65470">F1</keysym>
|
||||
</key>
|
||||
<key keycode="68" name="FK02">
|
||||
<keysym keyval="65471">F2</keysym>
|
||||
</key>
|
||||
<key keycode="69" name="FK03">
|
||||
<keysym keyval="65472">F3</keysym>
|
||||
</key>
|
||||
<key keycode="70" name="FK04">
|
||||
<keysym keyval="65473">F4</keysym>
|
||||
</key>
|
||||
<key keycode="71" name="FK05">
|
||||
<keysym keyval="65474">F5</keysym>
|
||||
</key>
|
||||
<key keycode="72" name="FK06">
|
||||
<keysym keyval="65475">F6</keysym>
|
||||
</key>
|
||||
<key keycode="73" name="FK07">
|
||||
<keysym keyval="65476">F7</keysym>
|
||||
</key>
|
||||
<key keycode="74" name="FK08">
|
||||
<keysym keyval="65477">F8</keysym>
|
||||
</key>
|
||||
<key keycode="75" name="FK09">
|
||||
<keysym keyval="65478">F9</keysym>
|
||||
</key>
|
||||
<key keycode="76" name="FK10">
|
||||
<keysym keyval="65479">F10</keysym>
|
||||
</key>
|
||||
<key keycode="95" name="FK11">
|
||||
<keysym keyval="65480">F11</keysym>
|
||||
</key>
|
||||
<key keycode="96" name="FK12">
|
||||
<keysym keyval="65481">F12</keysym>
|
||||
</key>
|
||||
<key keycode="49" name="TLDE">
|
||||
<keysym keyval="96">quoteleft</keysym>
|
||||
<keysym keyval="126">asciitilde</keysym>
|
||||
</key>
|
||||
<key keycode="10" name="AE01">
|
||||
<keysym keyval="49">1</keysym>
|
||||
<keysym keyval="33">exclam</keysym>
|
||||
</key>
|
||||
<key keycode="11" name="AE02">
|
||||
<keysym keyval="50">2</keysym>
|
||||
<keysym keyval="64">at</keysym>
|
||||
</key>
|
||||
<key keycode="12" name="AE03">
|
||||
<keysym keyval="51">3</keysym>
|
||||
<keysym keyval="35">numbersign</keysym>
|
||||
</key>
|
||||
<key keycode="13" name="AE04">
|
||||
<keysym keyval="52">4</keysym>
|
||||
<keysym keyval="36">dollar</keysym>
|
||||
</key>
|
||||
<key keycode="14" name="AE05">
|
||||
<keysym keyval="53">5</keysym>
|
||||
<keysym keyval="37">percent</keysym>
|
||||
<keysym keyval="8364">EuroSign</keysym>
|
||||
</key>
|
||||
<key keycode="15" name="AE06">
|
||||
<keysym keyval="54">6</keysym>
|
||||
<keysym keyval="94">asciicircum</keysym>
|
||||
</key>
|
||||
<key keycode="16" name="AE07">
|
||||
<keysym keyval="55">7</keysym>
|
||||
<keysym keyval="38">ampersand</keysym>
|
||||
</key>
|
||||
<key keycode="17" name="AE08">
|
||||
<keysym keyval="56">8</keysym>
|
||||
<keysym keyval="42">asterisk</keysym>
|
||||
</key>
|
||||
<key keycode="18" name="AE09">
|
||||
<keysym keyval="57">9</keysym>
|
||||
<keysym keyval="40">parenleft</keysym>
|
||||
</key>
|
||||
<key keycode="19" name="AE10">
|
||||
<keysym keyval="48">0</keysym>
|
||||
<keysym keyval="41">parenright</keysym>
|
||||
</key>
|
||||
<key keycode="20" name="AE11">
|
||||
<keysym keyval="45">minus</keysym>
|
||||
<keysym keyval="95">underscore</keysym>
|
||||
</key>
|
||||
<key keycode="21" name="AE12">
|
||||
<keysym keyval="61">equal</keysym>
|
||||
<keysym keyval="43">plus</keysym>
|
||||
</key>
|
||||
<key keycode="22" name="BKSP">
|
||||
<keysym keyval="65288">BackSpace</keysym>
|
||||
</key>
|
||||
<key keycode="23" name="TAB">
|
||||
<keysym keyval="65289">Tab</keysym>
|
||||
<keysym keyval="65056">ISO_Left_Tab</keysym>
|
||||
</key>
|
||||
<key keycode="24" name="AD01">
|
||||
<keysym keyval="113">q</keysym>
|
||||
<keysym keyval="81">Q</keysym>
|
||||
</key>
|
||||
<key keycode="25" name="AD02">
|
||||
<keysym keyval="119">w</keysym>
|
||||
<keysym keyval="87">W</keysym>
|
||||
</key>
|
||||
<key keycode="26" name="AD03">
|
||||
<keysym keyval="101">e</keysym>
|
||||
<keysym keyval="69">E</keysym>
|
||||
</key>
|
||||
<key keycode="27" name="AD04">
|
||||
<keysym keyval="114">r</keysym>
|
||||
<keysym keyval="82">R</keysym>
|
||||
</key>
|
||||
<key keycode="28" name="AD05">
|
||||
<keysym keyval="116">t</keysym>
|
||||
<keysym keyval="84">T</keysym>
|
||||
</key>
|
||||
<key keycode="29" name="AD06">
|
||||
<keysym keyval="121">y</keysym>
|
||||
<keysym keyval="89">Y</keysym>
|
||||
</key>
|
||||
<key keycode="30" name="AD07">
|
||||
<keysym keyval="117">u</keysym>
|
||||
<keysym keyval="85">U</keysym>
|
||||
</key>
|
||||
<key keycode="31" name="AD08">
|
||||
<keysym keyval="105">i</keysym>
|
||||
<keysym keyval="73">I</keysym>
|
||||
</key>
|
||||
<key keycode="32" name="AD09">
|
||||
<keysym keyval="111">o</keysym>
|
||||
<keysym keyval="79">O</keysym>
|
||||
</key>
|
||||
<key keycode="33" name="AD10">
|
||||
<keysym keyval="112">p</keysym>
|
||||
<keysym keyval="80">P</keysym>
|
||||
</key>
|
||||
<key keycode="34" name="AD11">
|
||||
<keysym keyval="91">bracketleft</keysym>
|
||||
<keysym keyval="123">braceleft</keysym>
|
||||
</key>
|
||||
<key keycode="35" name="AD12">
|
||||
<keysym keyval="93">bracketright</keysym>
|
||||
<keysym keyval="125">braceright</keysym>
|
||||
</key>
|
||||
<key keycode="51" name="BKSL">
|
||||
<keysym keyval="92">backslash</keysym>
|
||||
<keysym keyval="124">bar</keysym>
|
||||
</key>
|
||||
<key keycode="66" name="CAPS">
|
||||
<keysym keyval="65027">ISO_Level3_Shift</keysym>
|
||||
</key>
|
||||
<key keycode="38" name="AC01">
|
||||
<keysym keyval="97">a</keysym>
|
||||
<keysym keyval="65">A</keysym>
|
||||
</key>
|
||||
<key keycode="39" name="AC02">
|
||||
<keysym keyval="115">s</keysym>
|
||||
<keysym keyval="83">S</keysym>
|
||||
</key>
|
||||
<key keycode="40" name="AC03">
|
||||
<keysym keyval="100">d</keysym>
|
||||
<keysym keyval="68">D</keysym>
|
||||
</key>
|
||||
<key keycode="41" name="AC04">
|
||||
<keysym keyval="102">f</keysym>
|
||||
<keysym keyval="70">F</keysym>
|
||||
</key>
|
||||
<key keycode="42" name="AC05">
|
||||
<keysym keyval="103">g</keysym>
|
||||
<keysym keyval="71">G</keysym>
|
||||
</key>
|
||||
<key keycode="43" name="AC06">
|
||||
<keysym keyval="104">h</keysym>
|
||||
<keysym keyval="72">H</keysym>
|
||||
</key>
|
||||
<key keycode="44" name="AC07">
|
||||
<keysym keyval="106">j</keysym>
|
||||
<keysym keyval="74">J</keysym>
|
||||
</key>
|
||||
<key keycode="45" name="AC08">
|
||||
<keysym keyval="107">k</keysym>
|
||||
<keysym keyval="75">K</keysym>
|
||||
</key>
|
||||
<key keycode="46" name="AC09">
|
||||
<keysym keyval="108">l</keysym>
|
||||
<keysym keyval="76">L</keysym>
|
||||
</key>
|
||||
<key keycode="47" name="AC10">
|
||||
<keysym keyval="59">semicolon</keysym>
|
||||
<keysym keyval="58">colon</keysym>
|
||||
</key>
|
||||
<key keycode="48" name="AC11">
|
||||
<keysym keyval="39">quoteright</keysym>
|
||||
<keysym keyval="34">quotedbl</keysym>
|
||||
</key>
|
||||
<key keycode="36" name="RTRN">
|
||||
<keysym keyval="65293">Return</keysym>
|
||||
</key>
|
||||
<key keycode="50" name="LFSH">
|
||||
<keysym keyval="65505">Shift_L</keysym>
|
||||
</key>
|
||||
<key keycode="52" name="AB01">
|
||||
<keysym keyval="122">z</keysym>
|
||||
<keysym keyval="90">Z</keysym>
|
||||
</key>
|
||||
<key keycode="53" name="AB02">
|
||||
<keysym keyval="120">x</keysym>
|
||||
<keysym keyval="88">X</keysym>
|
||||
</key>
|
||||
<key keycode="54" name="AB03">
|
||||
<keysym keyval="99">c</keysym>
|
||||
<keysym keyval="67">C</keysym>
|
||||
</key>
|
||||
<key keycode="55" name="AB04">
|
||||
<keysym keyval="118">v</keysym>
|
||||
<keysym keyval="86">V</keysym>
|
||||
</key>
|
||||
<key keycode="56" name="AB05">
|
||||
<keysym keyval="98">b</keysym>
|
||||
<keysym keyval="66">B</keysym>
|
||||
</key>
|
||||
<key keycode="57" name="AB06">
|
||||
<keysym keyval="110">n</keysym>
|
||||
<keysym keyval="78">N</keysym>
|
||||
</key>
|
||||
<key keycode="58" name="AB07">
|
||||
<keysym keyval="109">m</keysym>
|
||||
<keysym keyval="77">M</keysym>
|
||||
</key>
|
||||
<key keycode="59" name="AB08">
|
||||
<keysym keyval="44">comma</keysym>
|
||||
<keysym keyval="60">less</keysym>
|
||||
</key>
|
||||
<key keycode="60" name="AB09">
|
||||
<keysym keyval="46">period</keysym>
|
||||
<keysym keyval="62">greater</keysym>
|
||||
</key>
|
||||
<key keycode="61" name="AB10">
|
||||
<keysym keyval="47">slash</keysym>
|
||||
<keysym keyval="63">question</keysym>
|
||||
</key>
|
||||
<key keycode="62" name="RTSH">
|
||||
<keysym keyval="65506">Shift_R</keysym>
|
||||
</key>
|
||||
<key keycode="149" name="I149">
|
||||
<symbol label="⌨" icon="input-keyboard-symbolic">cycle-keyboard</symbol>
|
||||
</key>
|
||||
<key keycode="150" name="I150">
|
||||
<symbol label="☺" icon="preferences-system-symbolic">preferences</symbol>
|
||||
</key>
|
||||
<key keycode="37" name="LCTL">
|
||||
<keysym keyval="65507">Control_L</keysym>
|
||||
</key>
|
||||
<key keycode="64" name="LALT">
|
||||
<keysym keyval="65513">Alt_L</keysym>
|
||||
<keysym keyval="65511">Meta_L</keysym>
|
||||
</key>
|
||||
<key keycode="65" name="SPCE">
|
||||
<keysym keyval="32">space</keysym>
|
||||
</key>
|
||||
<key keycode="113" name="LEFT">
|
||||
<keysym keyval="65361">Left</keysym>
|
||||
</key>
|
||||
<key keycode="111" name="UP">
|
||||
<keysym keyval="65362">Up</keysym>
|
||||
</key>
|
||||
<key keycode="116" name="DOWN">
|
||||
<keysym keyval="65364">Down</keysym>
|
||||
</key>
|
||||
<key keycode="114" name="RGHT">
|
||||
<keysym keyval="65363">Right</keysym>
|
||||
<key name="AD01">
|
||||
<symbol label="q">q</symbol>
|
||||
<symbol label="Q">Q</symbol>
|
||||
<symbol label="1">1</symbol>
|
||||
<symbol label="~">asciitilde</symbol>
|
||||
</key>
|
||||
<key name="AD02">
|
||||
<symbol label="w">w</symbol>
|
||||
<symbol label="W">W</symbol>
|
||||
<symbol label="2">2</symbol>
|
||||
<symbol label="`">quoteleft</symbol>
|
||||
</key>
|
||||
<key name="AD03">
|
||||
<symbol label="e">e</symbol>
|
||||
<symbol label="E">E</symbol>
|
||||
<symbol label="3">3</symbol>
|
||||
<symbol label="|">bar</symbol>
|
||||
</key>
|
||||
<key name="AD04">
|
||||
<symbol label="r">r</symbol>
|
||||
<symbol label="R">R</symbol>
|
||||
<symbol label="4">4</symbol>
|
||||
<symbol label="·">U00B7</symbol>
|
||||
</key>
|
||||
<key name="AD05">
|
||||
<symbol label="t">t</symbol>
|
||||
<symbol label="T">T</symbol>
|
||||
<symbol label="5">5</symbol>
|
||||
<symbol label="√">squareroot</symbol>
|
||||
</key>
|
||||
<key name="AD06">
|
||||
<symbol label="y">y</symbol>
|
||||
<symbol label="Y">Y</symbol>
|
||||
<symbol label="6">6</symbol>
|
||||
<symbol label="π">Greek_pi</symbol>
|
||||
</key>
|
||||
<key name="AD07">
|
||||
<symbol label="u">u</symbol>
|
||||
<symbol label="U">U</symbol>
|
||||
<symbol label="7">7</symbol>
|
||||
<symbol label="÷">division</symbol>
|
||||
</key>
|
||||
<key name="AD08">
|
||||
<symbol label="i">i</symbol>
|
||||
<symbol label="I">I</symbol>
|
||||
<symbol label="8">8</symbol>
|
||||
<symbol label="×">multiply</symbol>
|
||||
</key>
|
||||
<key name="AD09">
|
||||
<symbol label="o">o</symbol>
|
||||
<symbol label="O">O</symbol>
|
||||
<symbol label="9">9</symbol>
|
||||
<symbol label="¶">paragraph</symbol>
|
||||
</key>
|
||||
<key name="AD10">
|
||||
<symbol label="p">p</symbol>
|
||||
<symbol label="P">P</symbol>
|
||||
<symbol label="0">0</symbol>
|
||||
<symbol label="△">U25B3</symbol>
|
||||
</key>
|
||||
<key name="AC01">
|
||||
<symbol label="a">a</symbol>
|
||||
<symbol label="A">A</symbol>
|
||||
<symbol label="@">at</symbol>
|
||||
<symbol label="©">copyright</symbol>
|
||||
</key>
|
||||
<key name="AC02">
|
||||
<symbol label="s">s</symbol>
|
||||
<symbol label="S">S</symbol>
|
||||
<symbol label="#">numbersign</symbol>
|
||||
<symbol label="®">U00AE</symbol>
|
||||
</key>
|
||||
<key name="AC03">
|
||||
<symbol label="d">d</symbol>
|
||||
<symbol label="D">D</symbol>
|
||||
<symbol label="$">dollar</symbol>
|
||||
<symbol label="£">U00A3</symbol>
|
||||
</key>
|
||||
<key name="AC04">
|
||||
<symbol label="f">f</symbol>
|
||||
<symbol label="F">F</symbol>
|
||||
<symbol label="%">percent</symbol>
|
||||
<symbol label="€">EuroSign</symbol>
|
||||
</key>
|
||||
<key name="AC05">
|
||||
<symbol label="g">g</symbol>
|
||||
<symbol label="G">G</symbol>
|
||||
<symbol label="&">ampersand</symbol>
|
||||
<symbol label="¥">U00A5</symbol>
|
||||
</key>
|
||||
<key name="AC06">
|
||||
<symbol label="h">h</symbol>
|
||||
<symbol label="H">H</symbol>
|
||||
<symbol label="-">minus</symbol>
|
||||
<symbol label="^">asciicircum</symbol>
|
||||
</key>
|
||||
<key name="AC07">
|
||||
<symbol label="j">j</symbol>
|
||||
<symbol label="J">J</symbol>
|
||||
<symbol label="_">underscore</symbol>
|
||||
<symbol label="°">degree</symbol>
|
||||
</key>
|
||||
<key name="AC08">
|
||||
<symbol label="k">k</symbol>
|
||||
<symbol label="K">K</symbol>
|
||||
<symbol label="+">plus</symbol>
|
||||
<symbol label="=">equal</symbol>
|
||||
</key>
|
||||
<key name="AC09">
|
||||
<symbol label="l">l</symbol>
|
||||
<symbol label="L">L</symbol>
|
||||
<symbol label="(">parenleft</symbol>
|
||||
<symbol label="{">braceleft</symbol>
|
||||
</key>
|
||||
<key name="AC10">
|
||||
<!-- Empty labels cause keys to be hidden when the level they are defined
|
||||
for is shown. -->
|
||||
<symbol label=""></symbol>
|
||||
<symbol label=""></symbol>
|
||||
<symbol label=")">parenright</symbol>
|
||||
<symbol label="}">braceright</symbol>
|
||||
</key>
|
||||
<key name="RTRN">
|
||||
<symbol keyval="65293" icon="key-enter">Return</symbol>
|
||||
</key>
|
||||
<key name="LFSH">
|
||||
<keysym keyval="65505" icon="key-shift">Shift_L</keysym>
|
||||
<keysym keyval="65505" icon="key-shift">Shift_L</keysym>
|
||||
<keysym keyval="65505" label="=/+">Shift_L</keysym>
|
||||
<keysym keyval="65505" label="123">Shift_L</keysym>
|
||||
</key>
|
||||
<key name="AB01">
|
||||
<symbol label="z">z</symbol>
|
||||
<symbol label="Z">Z</symbol>
|
||||
<symbol label=",">comma</symbol>
|
||||
<symbol label="\">backslash</symbol>
|
||||
</key>
|
||||
<key name="AB02">
|
||||
<symbol label="x">x</symbol>
|
||||
<symbol label="X">X</symbol>
|
||||
<symbol label=""">quotedbl</symbol>
|
||||
<symbol label="/">slash</symbol>
|
||||
</key>
|
||||
<key name="AB03">
|
||||
<symbol label="c">c</symbol>
|
||||
<symbol label="C">C</symbol>
|
||||
<symbol label="'">quoteright</symbol>
|
||||
<symbol label="<">less</symbol>
|
||||
</key>
|
||||
<key name="AB04">
|
||||
<symbol label="v">v</symbol>
|
||||
<symbol label="V">V</symbol>
|
||||
<symbol label=":">colon</symbol>
|
||||
<symbol label=">">greater</symbol>
|
||||
</key>
|
||||
<key name="AB05">
|
||||
<symbol label="b">b</symbol>
|
||||
<symbol label="B">B</symbol>
|
||||
<symbol label=";">semicolon</symbol>
|
||||
<symbol label="=">equal</symbol>
|
||||
</key>
|
||||
<key name="AB06">
|
||||
<symbol label="n">n</symbol>
|
||||
<symbol label="N">N</symbol>
|
||||
<symbol label="!">exclam</symbol>
|
||||
<symbol label="[">bracketleft</symbol>
|
||||
</key>
|
||||
<key name="AB07">
|
||||
<symbol label="m">m</symbol>
|
||||
<symbol label="M">M</symbol>
|
||||
<symbol label="?">question</symbol>
|
||||
<symbol label="]">bracketright</symbol>
|
||||
</key>
|
||||
<key name="AB08">
|
||||
<symbol label=".">period</symbol>
|
||||
</key>
|
||||
<key name="ABC123">
|
||||
<symbol label="123">show-numbers</symbol>
|
||||
<symbol label="123">show-numbers</symbol>
|
||||
<symbol label="ABC">show-letters</symbol>
|
||||
<symbol label="ABC">show-letters</symbol>
|
||||
</key>
|
||||
<key name="I149">
|
||||
<symbol label="☺" icon="keyboard-mode-symbolic" tooltip="Setup">preferences</symbol>
|
||||
</key>
|
||||
<key name="SPCE">
|
||||
<symbol label=" ">space</symbol>
|
||||
</key>
|
||||
<key name="BKSP">
|
||||
<symbol keyval="65288" icon="edit-clear-symbolic">BackSpace</symbol>
|
||||
</key>
|
||||
</symbols>
|
||||
|
||||
19
data/meson.build
Normal file
@ -0,0 +1,19 @@
|
||||
gnome = import('gnome')
|
||||
|
||||
squeekboard_resources = gnome.compile_resources(
|
||||
'squeekboard-resources',
|
||||
'squeekboard.gresources.xml',
|
||||
|
||||
c_name: 'squeekboard',
|
||||
)
|
||||
|
||||
desktop_file = 'sm.puri.Squeekboard.desktop'
|
||||
|
||||
i18n.merge_file('desktop',
|
||||
input: desktop_file + '.in',
|
||||
output: desktop_file,
|
||||
po_dir: '../po',
|
||||
install: true,
|
||||
install_dir: join_paths(datadir, 'applications'),
|
||||
type: 'desktop'
|
||||
)
|
||||
@ -1,60 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<schemalist>
|
||||
<schema id="org.fedorahosted.eekboard" path="/org/fedorahosted/eekboard/">
|
||||
<key name="keyboards" type="as">
|
||||
<default>['us']</default>
|
||||
<summary>Keyboard types</summary>
|
||||
<description>keyboard types.</description>
|
||||
</key>
|
||||
<key name="focus-listener" type="s">
|
||||
<default>'atspi'</default>
|
||||
<summary>Use the given focus listener</summary>
|
||||
<description>The name of the focus listener (either 'atspi' or 'ibus') used to detect focus events.</description>
|
||||
</key>
|
||||
<key name="auto-hide" type="b">
|
||||
<default>true</default>
|
||||
<summary>Hide keyboard automatically when focus is out</summary>
|
||||
<description>If true, hide keyboard automatically when focus is out.</description>
|
||||
</key>
|
||||
<key name="auto-hide-delay" type="u">
|
||||
<default>500</default>
|
||||
<summary>Delay before hiding keyboard</summary>
|
||||
<description>Delay before hiding keyboard in milliseconds. This is useful when focus listener is enabled.</description>
|
||||
</key>
|
||||
<key type="b" name="repeat">
|
||||
<default>true</default>
|
||||
<summary>Key repeat</summary>
|
||||
<description>Generate key-press/release event repeatedly while a key is held down</description>
|
||||
</key>
|
||||
<key type="u" name="repeat-interval">
|
||||
<default>100</default>
|
||||
<summary>Key repeat interval</summary>
|
||||
<description>Delay between repeats in milliseconds.</description>
|
||||
</key>
|
||||
<key type="u" name="repeat-delay">
|
||||
<default>1000</default>
|
||||
<summary>Initial key repeat delay</summary>
|
||||
<description>Initial key repeat delay in milliseconds.</description>
|
||||
</key>
|
||||
<key name="start-fullscreen" type="b">
|
||||
<default>false</default>
|
||||
<summary>Switch to fullscreen mode when startup</summary>
|
||||
<description>If true, switch to fullscreen mode when startup.</description>
|
||||
</key>
|
||||
<key name="size-constraint-landscape" type="(dd)">
|
||||
<default>(1.0, 0.3)</default>
|
||||
<summary>Constraint of the maximum window size on landscape screen</summary>
|
||||
<description>Constraint of maximum window size on landscape screen</description>
|
||||
</key>
|
||||
<key name="size-constraint-portrait" type="(dd)">
|
||||
<default>(1.0, 0.5)</default>
|
||||
<summary>Constraint of the maximum window size on portrait screen</summary>
|
||||
<description>Constraint of maximum window size on portrait screen</description>
|
||||
</key>
|
||||
<key name="theme" type="s">
|
||||
<default>'default'</default>
|
||||
<summary>Theme</summary>
|
||||
<description>Base name of the theme to apply.</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
||||
9
data/sm.puri.Squeekboard.desktop.in
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=Squeekboard
|
||||
GenericName=Squeekboard Virtual Keyboard
|
||||
Comment=Virtual Keyboard
|
||||
Exec=squeekboard
|
||||
Icon=squeekboard
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GTK;Utility;
|
||||
58
data/squeekboard.gresources.xml
Normal file
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/sm/puri/squeekboard">
|
||||
<file compressed="true">style.css</file>
|
||||
|
||||
<!-- Keyboard layouts -->
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/geometry/compact.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/geometry/extended.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/geometry/digits.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/geometry/number-keypad.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/geometry/phone-keypad.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/geometry/url.xml</file>
|
||||
|
||||
<!-- Keyboard definitions -->
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/keyboards.xml</file>
|
||||
|
||||
<!-- Natural language keyboards -->
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ar.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/as-inscript.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/be.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/bn-inscript.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/fa.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/gu-inscript.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/he.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/hi-inscript.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ja-kana.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/kk.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/kn-inscript.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ks-inscript.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ks.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/mai-inscript.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ml-inscript.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/mr-inscript.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/my.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/nb.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/or-inscript.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/pa-inscript.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ru.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/sd-inscript.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ta-inscript.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/te-inscript.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/th.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ua.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ug.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/us.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/zh-bopomofo.xml</file>
|
||||
|
||||
<!-- Special purpose keyboards -->
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/special/digits.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/special/number.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/special/phone.xml</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/special/url.xml</file>
|
||||
|
||||
<file>icons/key-enter.svg</file>
|
||||
<file>icons/key-shift.svg</file>
|
||||
<file>icons/keyboard-mode-symbolic.svg</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
18
data/style.css
Normal file
@ -0,0 +1,18 @@
|
||||
.keyboard {
|
||||
background-color: rgba(0, 0, 0, 255);
|
||||
color: #ffffff;
|
||||
font-family: cantarell, sans-serif;
|
||||
}
|
||||
|
||||
.key {
|
||||
color: #deddda;
|
||||
background: #464448;
|
||||
border-width: 0.5px;
|
||||
border-color: #5e5c64;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.key:active {
|
||||
background: #1c71d8;
|
||||
border-color: #3584e4;
|
||||
}
|
||||
@ -1,2 +0,0 @@
|
||||
themedir = $(pkgdatadir)/themes
|
||||
dist_theme_DATA = default.css
|
||||
@ -1,22 +0,0 @@
|
||||
.keyboard {
|
||||
background-color: rgba(0, 0, 0, 255);
|
||||
color: #ffffff;
|
||||
font-family: cantarell, sans-serif;
|
||||
}
|
||||
|
||||
.key {
|
||||
color: #ffffff;
|
||||
background-gradient-direction: vertical;
|
||||
background-gradient-start: rgba(0, 0, 0, 255);
|
||||
background-gradient-end: rgba(64, 64, 64, 255);
|
||||
border-width: 2px;
|
||||
border-color: rgba(128, 128, 128, 255);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.key:active {
|
||||
background-gradient-direction: vertical;
|
||||
background-gradient-start: rgba(0, 0, 255, 255);
|
||||
background-gradient-end: rgba(64, 64, 255, 255);
|
||||
border-color: rgba(160, 160, 255, 255);
|
||||
}
|
||||
11
debian/changelog
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
squeekboard (1.0.10) unstable; urgency=medium
|
||||
|
||||
* Use a shared DBus definition
|
||||
|
||||
-- Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Tue, 02 Jul 2019 20:12:02 +0000
|
||||
|
||||
squeekboard (1.0.9) unstable; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- David Boddie <david.boddie@puri.sm> Tue, 25 Jun 2019 19:33:00 +0200
|
||||
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
||||
10
|
||||
27
debian/control
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
Source: squeekboard
|
||||
Section: x11
|
||||
Priority: optional
|
||||
Maintainer: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm>
|
||||
Build-Depends:
|
||||
debhelper (>= 10),
|
||||
meson (>=0.43.0),
|
||||
pkg-config,
|
||||
libglib2.0-dev,
|
||||
libgtk-3-dev,
|
||||
libcroco3-dev,
|
||||
libwayland-dev (>= 1.16),
|
||||
rustc,
|
||||
wayland-protocols (>= 1.14),
|
||||
# for running the tests
|
||||
xvfb,
|
||||
xauth,
|
||||
Standards-Version: 4.1.3
|
||||
Homepage: https://source.puri.sm/Librem5/squeekboard
|
||||
|
||||
Package: squeekboard
|
||||
Architecture: linux-any
|
||||
Depends:
|
||||
${shlibs:Depends}
|
||||
${misc:Depends}
|
||||
Description: On-screen keyboard for Wayland
|
||||
Virtual keyboard supporting Wayland, built primarily for the Librem 5 phone.
|
||||
73
debian/copyright
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: evscript
|
||||
Source: https://source.puri.sm/david.boddie/evscript
|
||||
|
||||
Files: *
|
||||
Copyright: 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
2010-2011 Red Hat, Inc.
|
||||
2019 Purism SPC
|
||||
License: GPL-3+
|
||||
|
||||
Files: eek/layersurface.c
|
||||
src/wayland.c
|
||||
src/key-emitter.c
|
||||
meson.build
|
||||
src/meson.build
|
||||
po/meson.build
|
||||
Copyright: 2018-2019 Purism SPC
|
||||
License: GPL-3+
|
||||
|
||||
Files: eekboard/keymap.c
|
||||
Copyright: 2000 Red Hat, Inc.
|
||||
2019 Purism, SPC
|
||||
License: LGPL-2+
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Files: protocols/wlr-layer-shell-unstable-v1.xml
|
||||
Copytight: Copyright © 2017 Drew DeVault
|
||||
License: X11
|
||||
Permission to use, copy, modify, distribute, and sell this software and
|
||||
its documentation for any purpose is hereby granted without fee, provided
|
||||
that the above copyright notice appear in all copies and fthat both that
|
||||
copyright notice and this permission notice appear in supporting
|
||||
documentation, and that the name of the copyright holders not be used in
|
||||
advertising or publicity pertaining to distribution of the software
|
||||
without specific, written prior permission. The copyright holders make
|
||||
no representations about the suitability of this software for any
|
||||
purpose. It is provided "as is" without express or implied warranty.
|
||||
.
|
||||
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
|
||||
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
|
||||
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
|
||||
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
License: GPL-3+
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
|
||||
8
debian/rules
vendored
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
%:
|
||||
dh $@ --builddirectory=_build --buildsystem=meson
|
||||
|
||||
override_dh_autoreconf:
|
||||
1
debian/source/format
vendored
Normal file
@ -0,0 +1 @@
|
||||
3.0 (native)
|
||||
@ -1,19 +0,0 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
SUBDIRS = reference
|
||||
@ -1,19 +0,0 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
SUBDIRS = eek eekboard
|
||||
@ -1,131 +0,0 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
# We require automake 1.6 at least.
|
||||
AUTOMAKE_OPTIONS = 1.6
|
||||
|
||||
# This is a blank Makefile.am for using gtk-doc.
|
||||
# Copy this to your project's API docs directory and modify the variables to
|
||||
# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
|
||||
# of using the various options.
|
||||
|
||||
# The name of the module, e.g. 'glib'.
|
||||
DOC_MODULE=eek
|
||||
|
||||
# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
|
||||
#DOC_MODULE_VERSION=2
|
||||
|
||||
|
||||
# The top-level SGML file. You can change this if you want to.
|
||||
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
|
||||
|
||||
# The directory containing the source code. Relative to $(srcdir).
|
||||
# gtk-doc will search all .c & .h files beneath here for inline comments
|
||||
# documenting the functions and macros.
|
||||
# e.g. DOC_SOURCE_DIR=../../../gtk
|
||||
DOC_SOURCE_DIR=../../../eek
|
||||
|
||||
# Extra options to pass to gtkdoc-scangobj. Not normally needed.
|
||||
SCANGOBJ_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-scan.
|
||||
# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
|
||||
SCAN_OPTIONS=--rebuild-types --deprecated-guards="EEK_DISABLE_DEPRECATED"
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb.
|
||||
# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
|
||||
MKDB_OPTIONS=--sgml-mode --output-format=xml
|
||||
|
||||
# Extra options to supply to gtkdoc-mktmpl
|
||||
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
|
||||
MKTMPL_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-mkhtml
|
||||
MKHTML_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref. Not normally needed.
|
||||
# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
|
||||
FIXXREF_OPTIONS=
|
||||
|
||||
# Used for dependencies. The docs will be rebuilt if any of these change.
|
||||
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
|
||||
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
|
||||
HFILE_GLOB=$(top_srcdir)/eek/*.h
|
||||
CFILE_GLOB=$(top_srcdir)/eek/*.c
|
||||
|
||||
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
|
||||
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
|
||||
EXTRA_HFILES=
|
||||
|
||||
# Header files to ignore when scanning. Use base file name, no paths
|
||||
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
|
||||
IGNORE_HFILES = \
|
||||
config.h \
|
||||
eek-renderer.h \
|
||||
eek-gtk-renderer.h \
|
||||
eek-theme.h \
|
||||
eek-theme-node.h \
|
||||
eek-enumtypes.h
|
||||
|
||||
# Images to copy into HTML directory.
|
||||
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
|
||||
HTML_IMAGES=
|
||||
|
||||
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
|
||||
# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
|
||||
content_files=eek-overview.xml
|
||||
|
||||
# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
|
||||
# These files must be listed here *and* in content_files
|
||||
# e.g. expand_content_files=running.sgml
|
||||
expand_content_files=eek-overview.xml
|
||||
|
||||
# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
|
||||
# Only needed if you are using gtkdoc-scangobj to dynamically query widget
|
||||
# signals and properties.
|
||||
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
|
||||
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
|
||||
GTKDOC_CFLAGS = $(GIO2_CFLAGS)
|
||||
GTKDOC_LIBS = $(top_builddir)/eek/libeek.la \
|
||||
$(top_builddir)/eek/libeek-gtk.la \
|
||||
$(top_builddir)/eek/libeek-xkl.la \
|
||||
$(GIO2_LIBS) \
|
||||
$(GTK_LIBS) \
|
||||
$(LIBXKLAVIER_LIBS)
|
||||
|
||||
# This includes the standard gtk-doc make rules, copied by gtkdocize.
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
# Other files to distribute
|
||||
# e.g. EXTRA_DIST += version.xml.in
|
||||
EXTRA_DIST +=
|
||||
|
||||
# Files not to distribute
|
||||
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
|
||||
# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
|
||||
#DISTCLEANFILES +=
|
||||
|
||||
# Comment this out if you want your docs-status tested during 'make check'
|
||||
if ENABLE_GTK_DOC
|
||||
#TESTS_ENVIRONMENT = cd $(srcsrc) &&
|
||||
#TESTS = $(GTKDOC_CHECK)
|
||||
endif
|
||||
|
||||
-include $(top_srcdir)/gtk-doc.mk
|
||||
@ -1,120 +0,0 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
# We require automake 1.6 at least.
|
||||
AUTOMAKE_OPTIONS = 1.6
|
||||
|
||||
# This is a blank Makefile.am for using gtk-doc.
|
||||
# Copy this to your project's API docs directory and modify the variables to
|
||||
# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
|
||||
# of using the various options.
|
||||
|
||||
# The name of the module, e.g. 'glib'.
|
||||
DOC_MODULE=eekboard
|
||||
|
||||
# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
|
||||
#DOC_MODULE_VERSION=2
|
||||
|
||||
|
||||
# The top-level SGML file. You can change this if you want to.
|
||||
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
|
||||
|
||||
# The directory containing the source code. Relative to $(srcdir).
|
||||
# gtk-doc will search all .c & .h files beneath here for inline comments
|
||||
# documenting the functions and macros.
|
||||
# e.g. DOC_SOURCE_DIR=../../../gtk
|
||||
DOC_SOURCE_DIR=../../../eekboard
|
||||
|
||||
# Extra options to pass to gtkdoc-scangobj. Not normally needed.
|
||||
SCANGOBJ_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-scan.
|
||||
# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
|
||||
SCAN_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb.
|
||||
# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
|
||||
MKDB_OPTIONS=--sgml-mode --output-format=xml
|
||||
|
||||
# Extra options to supply to gtkdoc-mktmpl
|
||||
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
|
||||
MKTMPL_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-mkhtml
|
||||
MKHTML_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref. Not normally needed.
|
||||
# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
|
||||
FIXXREF_OPTIONS=
|
||||
|
||||
# Used for dependencies. The docs will be rebuilt if any of these change.
|
||||
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
|
||||
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
|
||||
HFILE_GLOB=$(top_srcdir)/eekboard/*.h
|
||||
CFILE_GLOB=$(top_srcdir)/eekboard/*.c
|
||||
|
||||
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
|
||||
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
|
||||
EXTRA_HFILES=
|
||||
|
||||
# Header files to ignore when scanning. Use base file name, no paths
|
||||
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
|
||||
IGNORE_HFILES=config.h eekboard.h
|
||||
|
||||
# Images to copy into HTML directory.
|
||||
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
|
||||
HTML_IMAGES=
|
||||
|
||||
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
|
||||
# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
|
||||
# content_files=eekboard-overview.xml
|
||||
|
||||
# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
|
||||
# These files must be listed here *and* in content_files
|
||||
# e.g. expand_content_files=running.sgml
|
||||
# expand_content_files=eekboard-overview.xml
|
||||
|
||||
# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
|
||||
# Only needed if you are using gtkdoc-scangobj to dynamically query widget
|
||||
# signals and properties.
|
||||
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
|
||||
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
|
||||
GTKDOC_CFLAGS = $(GIO2_CFLAGS)
|
||||
GTKDOC_LIBS = $(top_builddir)/eekboard/libeekboard.la $(GIO2_LIBS)
|
||||
|
||||
# This includes the standard gtk-doc make rules, copied by gtkdocize.
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
# Other files to distribute
|
||||
# e.g. EXTRA_DIST += version.xml.in
|
||||
# EXTRA_DIST +=
|
||||
|
||||
# Files not to distribute
|
||||
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
|
||||
# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
|
||||
#DISTCLEANFILES +=
|
||||
|
||||
# Comment this out if you want your docs-status tested during 'make check'
|
||||
if ENABLE_GTK_DOC
|
||||
#TESTS_ENVIRONMENT = cd $(srcsrc) &&
|
||||
#TESTS = $(GTKDOC_CHECK)
|
||||
endif
|
||||
|
||||
-include $(top_srcdir)/gtk-doc.mk
|
||||
241
eek/Makefile.am
@ -1,241 +0,0 @@
|
||||
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
lib_LTLIBRARIES = \
|
||||
libeek.la \
|
||||
libeek-gtk.la \
|
||||
libeek-xkl.la
|
||||
|
||||
libeek_public_headers = \
|
||||
$(srcdir)/eek-layout.h \
|
||||
$(srcdir)/eek-element.h \
|
||||
$(srcdir)/eek-container.h \
|
||||
$(srcdir)/eek-keyboard.h \
|
||||
$(srcdir)/eek-section.h \
|
||||
$(srcdir)/eek-key.h \
|
||||
$(srcdir)/eek-symbol.h \
|
||||
$(srcdir)/eek-keysym.h \
|
||||
$(srcdir)/eek-text.h \
|
||||
$(srcdir)/eek-symbol-matrix.h \
|
||||
$(srcdir)/eek-types.h \
|
||||
$(srcdir)/eek-xml.h \
|
||||
$(srcdir)/eek-xml-layout.h \
|
||||
$(srcdir)/eek-serializable.h \
|
||||
$(srcdir)/eek-theme.h \
|
||||
$(srcdir)/eek.h
|
||||
|
||||
libeek_private_headers = \
|
||||
$(srcdir)/eek-renderer.h \
|
||||
$(srcdir)/eek-special-keysym-entries.h \
|
||||
$(srcdir)/eek-unicode-keysym-entries.h \
|
||||
$(srcdir)/eek-xkeysym-keysym-entries.h \
|
||||
$(srcdir)/eek-marshalers.h \
|
||||
$(srcdir)/eek-theme-context.h \
|
||||
$(srcdir)/eek-theme-private.h \
|
||||
$(srcdir)/eek-theme-node.h
|
||||
|
||||
libeek_sources = \
|
||||
$(srcdir)/eek.c \
|
||||
$(srcdir)/eek-layout.c \
|
||||
$(srcdir)/eek-element.c \
|
||||
$(srcdir)/eek-container.c \
|
||||
$(srcdir)/eek-keyboard.c \
|
||||
$(srcdir)/eek-section.c \
|
||||
$(srcdir)/eek-key.c \
|
||||
$(srcdir)/eek-symbol-matrix.c \
|
||||
$(srcdir)/eek-symbol.c \
|
||||
$(srcdir)/eek-keysym.c \
|
||||
$(srcdir)/eek-text.c \
|
||||
$(srcdir)/eek-types.c \
|
||||
$(srcdir)/eek-serializable.c \
|
||||
$(srcdir)/eek-xml.c \
|
||||
$(srcdir)/eek-xml-layout.c \
|
||||
$(srcdir)/eek-renderer.c \
|
||||
$(srcdir)/eek-keyboard-drawing.c \
|
||||
$(srcdir)/eek-theme.c \
|
||||
$(srcdir)/eek-theme-context.c \
|
||||
$(srcdir)/eek-theme-node.c
|
||||
|
||||
libeek_keysym_sources = \
|
||||
$(srcdir)/eek-special-keysym-entries.h \
|
||||
$(srcdir)/eek-unicode-keysym-entries.h \
|
||||
$(srcdir)/eek-xkeysym-keysym-entries.h
|
||||
|
||||
libeek_enumtypes_sources = \
|
||||
$(srcdir)/eek-enumtypes.c \
|
||||
$(srcdir)/eek-enumtypes.h
|
||||
|
||||
libeek_marshalers_sources = \
|
||||
$(srcdir)/eek-marshalers.c \
|
||||
$(srcdir)/eek-marshalers.h
|
||||
|
||||
BUILT_SOURCES = \
|
||||
$(libeek_keysym_sources) \
|
||||
$(libeek_enumtypes_sources) \
|
||||
$(libeek_marshalers_sources)
|
||||
|
||||
libeek_la_SOURCES = \
|
||||
$(libeek_sources) \
|
||||
$(srcdir)/eek-enumtypes.c \
|
||||
$(srcdir)/eek-marshalers.c
|
||||
|
||||
libeek_la_CFLAGS = \
|
||||
-DEEK_COMPILATION=1 \
|
||||
-DKEYBOARDSDIR=\"$(pkgdatadir)/keyboards\" \
|
||||
$(GIO2_CFLAGS) \
|
||||
$(PANGOCAIRO_CFLAGS) \
|
||||
$(LIBCROCO_CFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
libeek_la_LIBADD = \
|
||||
$(GIO2_LIBS) \
|
||||
$(PANGOCAIRO_LIBS) \
|
||||
$(LIBCROCO_LIBS) \
|
||||
-lm \
|
||||
$(NULL)
|
||||
|
||||
libeek_gtk_public_headers = \
|
||||
$(srcdir)/eek-gtk-keyboard.h \
|
||||
$(srcdir)/eek-gtk.h
|
||||
libeek_gtk_private_headers = \
|
||||
$(srcdir)/eek-gtk-renderer.h
|
||||
libeek_gtk_sources = \
|
||||
$(srcdir)/eek-gtk-keyboard.c \
|
||||
$(srcdir)/eek-gtk-renderer.c
|
||||
|
||||
libeek_gtk_la_SOURCES = $(libeek_gtk_sources)
|
||||
libeek_gtk_la_CFLAGS = -DEEK_COMPILATION=1 $(GTK_CFLAGS) $(LIBCANBERRA_CFLAGS)
|
||||
libeek_gtk_la_LIBADD = libeek.la $(GTK_LIBS) $(LIBCANBERRA_LIBS)
|
||||
|
||||
libeek_xkl_public_headers = \
|
||||
$(srcdir)/eek-xkl-layout.h \
|
||||
$(srcdir)/eek-xkl.h \
|
||||
$(srcdir)/eek-xkb-layout.h \
|
||||
$(srcdir)/eek-xkb.h
|
||||
|
||||
libeek_xkl_sources = \
|
||||
$(srcdir)/eek-xkb-layout.c \
|
||||
$(srcdir)/eek-xkl-layout.c
|
||||
|
||||
libeek_xkl_la_SOURCES = $(libeek_xkl_sources)
|
||||
libeek_xkl_la_CFLAGS = -DEEK_COMPILATION=1 $(LIBXKLAVIER_CFLAGS)
|
||||
libeek_xkl_la_LIBADD = libeek.la $(LIBXKLAVIER_LIBS)
|
||||
|
||||
eekdir = $(includedir)/eek-$(EEK_API_VERSION)/eek
|
||||
eek_HEADERS = \
|
||||
$(libeek_public_headers) \
|
||||
$(srcdir)/eek-enumtypes.h \
|
||||
$(libeek_gtk_public_headers) \
|
||||
$(libeek_xkl_public_headers)
|
||||
|
||||
noinst_HEADERS = \
|
||||
$(libeek_private_headers) \
|
||||
$(libeek_gtk_private_headers) \
|
||||
$(libeek_xkl_private_headers)
|
||||
|
||||
eek-special-keysym-entries.h: special-keysym-entries.txt
|
||||
$(AM_V_GEN) $(PYTHON) ./gen-keysym-entries.py special_keysym_entries \
|
||||
< $< > $@
|
||||
eek-unicode-keysym-entries.h: unicode-keysym-entries.txt
|
||||
$(AM_V_GEN) $(PYTHON) ./gen-keysym-entries.py unicode_keysym_entries \
|
||||
< $< > $@
|
||||
eek-xkeysym-keysym-entries.h: xkeysym-keysym-entries.txt
|
||||
$(AM_V_GEN) $(PYTHON) ./gen-keysym-entries.py xkeysym_keysym_entries \
|
||||
< $< > $@
|
||||
|
||||
eek-enumtypes.h: $(libeek_public_headers) eek-enumtypes.h.template
|
||||
$(AM_V_GEN) $(GLIB_MKENUMS) --template eek-enumtypes.h.template \
|
||||
$(libeek_public_headers) > eek-enumtypes.h.tmp && \
|
||||
mv eek-enumtypes.h.tmp eek-enumtypes.h
|
||||
|
||||
eek-enumtypes.c: $(libeek_public_headers) eek-enumtypes.c.template
|
||||
$(AM_V_GEN) $(GLIB_MKENUMS) --template eek-enumtypes.c.template \
|
||||
$(libeek_public_headers) > eek-enumtypes.c.tmp && \
|
||||
mv eek-enumtypes.c.tmp eek-enumtypes.c
|
||||
|
||||
# gen marshal
|
||||
eek-marshalers.h: eek-marshalers.list
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_eek_marshal $(srcdir)/eek-marshalers.list --header --internal > $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
eek-marshalers.c: eek-marshalers.list eek-marshalers.h
|
||||
$(AM_V_GEN) (echo "#include \"eek-marshalers.h\""; \
|
||||
$(GLIB_GENMARSHAL) --prefix=_eek_marshal $(srcdir)/eek-marshalers.list --body --internal) > $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = \
|
||||
eek-$(EEK_API_VERSION).pc \
|
||||
eek-gtk-$(EEK_API_VERSION).pc \
|
||||
eek-xkl-$(EEK_API_VERSION).pc
|
||||
|
||||
CLEANFILES =
|
||||
|
||||
DISTCLEANFILES = \
|
||||
$(BUILT_SOURCES) \
|
||||
$(pkgconfig_DATA)
|
||||
|
||||
EXTRA_DIST = \
|
||||
gen-keysym-entries.py \
|
||||
special-keysym-entries.txt \
|
||||
unicode-keysym-entries.txt \
|
||||
xkeysym-keysym-entries.txt \
|
||||
eek-enumtypes.h.template \
|
||||
eek-enumtypes.c.template \
|
||||
eek-marshalers.list
|
||||
|
||||
-include $(INTROSPECTION_MAKEFILE)
|
||||
INTROSPECTION_GIRS =
|
||||
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(builddir)
|
||||
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
|
||||
Eek@EEK_LIBRARY_SUFFIX@.gir: libeek.la
|
||||
Eek@EEK_LIBRARY_SUFFIX_U@_gir_SCANNERFLAGS = --strip-prefix=Eek --pkg=glib-2.0 --pkg-export=eek-$(EEK_API_VERSION)
|
||||
Eek@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = GLib-2.0 GObject-2.0 Gio-2.0
|
||||
Eek@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeek_la_CFLAGS)
|
||||
Eek@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeek.la
|
||||
Eek@EEK_LIBRARY_SUFFIX_U@_gir_FILES = $(libeek_sources) $(libeek_public_headers) $(srcdir)/eek-enumtypes.h
|
||||
|
||||
EekGtk@EEK_LIBRARY_SUFFIX@.gir: libeek-gtk.la Eek@EEK_LIBRARY_SUFFIX@.gir
|
||||
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_SCANNERFLAGS = --pkg-export=eek-gtk-$(EEK_API_VERSION)
|
||||
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = GObject-2.0 Gtk-@GTK_API_VERSION@ Eek@EEK_LIBRARY_SUFFIX@
|
||||
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeek_gtk_la_CFLAGS)
|
||||
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeek-gtk.la
|
||||
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_FILES = $(libeek_gtk_sources) $(libeek_gtk_public_headers)
|
||||
|
||||
EekXkl@EEK_LIBRARY_SUFFIX@.gir: libeek-xkl.la Eek@EEK_LIBRARY_SUFFIX@.gir
|
||||
EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = GObject-2.0 Eek@EEK_LIBRARY_SUFFIX@
|
||||
EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeek_xkl_la_CFLAGS)
|
||||
EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeek-xkl.la
|
||||
EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_FILES = $(libeek_xkl_sources) $(libeek_xkl_public_headers)
|
||||
|
||||
INTROSPECTION_GIRS += \
|
||||
Eek@EEK_LIBRARY_SUFFIX@.gir \
|
||||
EekGtk@EEK_LIBRARY_SUFFIX@.gir \
|
||||
EekXkl@EEK_LIBRARY_SUFFIX@.gir
|
||||
|
||||
girdir = $(datadir)/gir-1.0
|
||||
gir_DATA = $(INTROSPECTION_GIRS)
|
||||
|
||||
typelibdir = $(libdir)/girepository-1.0
|
||||
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
|
||||
|
||||
CLEANFILES += $(gir_DATA) $(typelib_DATA)
|
||||
endif
|
||||
@ -26,9 +26,7 @@
|
||||
* shall be used to implement #EekKeyboard and #EekSection.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include "eek-container.h"
|
||||
|
||||
@ -40,23 +38,19 @@ enum {
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0, };
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (EekContainer, eek_container, EEK_TYPE_ELEMENT);
|
||||
|
||||
#define EEK_CONTAINER_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_CONTAINER, EekContainerPrivate))
|
||||
|
||||
|
||||
struct _EekContainerPrivate
|
||||
typedef struct _EekContainerPrivate
|
||||
{
|
||||
GList *head;
|
||||
GList *last;
|
||||
};
|
||||
} EekContainerPrivate;
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (EekContainer, eek_container, EEK_TYPE_ELEMENT)
|
||||
|
||||
static void
|
||||
eek_container_real_add_child (EekContainer *self,
|
||||
EekElement *child)
|
||||
{
|
||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
|
||||
EekContainerPrivate *priv = (EekContainerPrivate*)eek_container_get_instance_private (self);
|
||||
|
||||
g_return_if_fail (EEK_IS_ELEMENT(child));
|
||||
g_object_ref (child);
|
||||
@ -75,7 +69,7 @@ static void
|
||||
eek_container_real_remove_child (EekContainer *self,
|
||||
EekElement *child)
|
||||
{
|
||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
|
||||
EekContainerPrivate *priv = eek_container_get_instance_private (self);
|
||||
GList *head;
|
||||
|
||||
g_return_if_fail (EEK_IS_ELEMENT(child));
|
||||
@ -94,7 +88,7 @@ eek_container_real_foreach_child (EekContainer *self,
|
||||
EekCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
|
||||
EekContainerPrivate *priv = eek_container_get_instance_private (self);
|
||||
GList *head;
|
||||
|
||||
for (head = priv->head; head; head = g_list_next (head))
|
||||
@ -106,7 +100,7 @@ eek_container_real_find (EekContainer *self,
|
||||
EekCompareFunc func,
|
||||
gpointer user_data)
|
||||
{
|
||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
|
||||
EekContainerPrivate *priv = eek_container_get_instance_private (self);
|
||||
GList *head;
|
||||
|
||||
head = g_list_find_custom (priv->head, user_data, (GCompareFunc)func);
|
||||
@ -118,7 +112,8 @@ eek_container_real_find (EekContainer *self,
|
||||
static void
|
||||
eek_container_dispose (GObject *object)
|
||||
{
|
||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(object);
|
||||
EekContainer *self = EEK_CONTAINER (object);
|
||||
EekContainerPrivate *priv = eek_container_get_instance_private (self);
|
||||
GList *head;
|
||||
|
||||
for (head = priv->head; head; head = priv->head) {
|
||||
@ -134,9 +129,6 @@ eek_container_class_init (EekContainerClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
g_type_class_add_private (gobject_class,
|
||||
sizeof (EekContainerPrivate));
|
||||
|
||||
klass->add_child = eek_container_real_add_child;
|
||||
klass->remove_child = eek_container_real_remove_child;
|
||||
klass->foreach_child = eek_container_real_foreach_child;
|
||||
@ -189,7 +181,7 @@ eek_container_class_init (EekContainerClass *klass)
|
||||
static void
|
||||
eek_container_init (EekContainer *self)
|
||||
{
|
||||
self->priv = EEK_CONTAINER_GET_PRIVATE(self);
|
||||
/* void */
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -30,14 +30,7 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define EEK_TYPE_CONTAINER (eek_container_get_type())
|
||||
#define EEK_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_CONTAINER, EekContainer))
|
||||
#define EEK_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_CONTAINER, EekContainerClass))
|
||||
#define EEK_IS_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_CONTAINER))
|
||||
#define EEK_IS_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_CONTAINER))
|
||||
#define EEK_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_CONTAINER, EekContainerClass))
|
||||
|
||||
typedef struct _EekContainerClass EekContainerClass;
|
||||
typedef struct _EekContainerPrivate EekContainerPrivate;
|
||||
G_DECLARE_DERIVABLE_TYPE (EekContainer, eek_container, EEK, CONTAINER, EekElement)
|
||||
|
||||
/**
|
||||
* EekCallback:
|
||||
@ -50,14 +43,6 @@ typedef struct _EekContainerPrivate EekContainerPrivate;
|
||||
typedef void (*EekCallback) (EekElement *element, gpointer user_data);
|
||||
typedef gint (*EekCompareFunc) (EekElement *element, gpointer user_data);
|
||||
|
||||
struct _EekContainer
|
||||
{
|
||||
/*< private >*/
|
||||
EekElement parent;
|
||||
|
||||
EekContainerPrivate *priv;
|
||||
};
|
||||
|
||||
/**
|
||||
* EekContainerClass:
|
||||
* @foreach_child: virtual function for iterating over the container's children
|
||||
|
||||
@ -26,9 +26,7 @@
|
||||
* shall be used to implement #EekKeyboard, #EekSection, or #EekKey.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@ -52,20 +50,16 @@ enum {
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0, };
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (EekElement, eek_element, G_TYPE_OBJECT);
|
||||
|
||||
#define EEK_ELEMENT_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_ELEMENT, EekElementPrivate))
|
||||
|
||||
|
||||
struct _EekElementPrivate
|
||||
typedef struct _EekElementPrivate
|
||||
{
|
||||
gchar *name;
|
||||
EekBounds bounds;
|
||||
EekElement *parent;
|
||||
gint group;
|
||||
gint level;
|
||||
};
|
||||
} EekElementPrivate;
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (EekElement, eek_element, G_TYPE_OBJECT)
|
||||
|
||||
static void
|
||||
eek_element_real_symbol_index_changed (EekElement *self,
|
||||
@ -78,7 +72,8 @@ eek_element_real_symbol_index_changed (EekElement *self,
|
||||
static void
|
||||
eek_element_finalize (GObject *object)
|
||||
{
|
||||
EekElementPrivate *priv = EEK_ELEMENT_GET_PRIVATE(object);
|
||||
EekElement *self = EEK_ELEMENT (object);
|
||||
EekElementPrivate *priv = eek_element_get_instance_private (self);
|
||||
|
||||
g_free (priv->name);
|
||||
G_OBJECT_CLASS (eek_element_parent_class)->finalize (object);
|
||||
@ -105,6 +100,7 @@ eek_element_set_property (GObject *object,
|
||||
break;
|
||||
case PROP_LEVEL:
|
||||
eek_element_set_level (element, g_value_get_int (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@ -146,9 +142,6 @@ eek_element_class_init (EekElementClass *klass)
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
GParamSpec *pspec;
|
||||
|
||||
g_type_class_add_private (gobject_class,
|
||||
sizeof (EekElementPrivate));
|
||||
|
||||
/* signals */
|
||||
klass->symbol_index_changed = eek_element_real_symbol_index_changed;
|
||||
|
||||
@ -238,9 +231,8 @@ eek_element_class_init (EekElementClass *klass)
|
||||
static void
|
||||
eek_element_init (EekElement *self)
|
||||
{
|
||||
EekElementPrivate *priv;
|
||||
EekElementPrivate *priv = eek_element_get_instance_private (self);
|
||||
|
||||
priv = self->priv = EEK_ELEMENT_GET_PRIVATE(self);
|
||||
priv->group = -1;
|
||||
priv->level = -1;
|
||||
}
|
||||
@ -259,10 +251,12 @@ eek_element_set_parent (EekElement *element,
|
||||
g_return_if_fail (EEK_IS_ELEMENT(element));
|
||||
g_return_if_fail (parent == NULL || EEK_IS_ELEMENT(parent));
|
||||
|
||||
if (element->priv->parent == parent)
|
||||
EekElementPrivate *priv = eek_element_get_instance_private (element);
|
||||
|
||||
if (priv->parent == parent)
|
||||
return;
|
||||
|
||||
if (element->priv->parent != NULL) {
|
||||
if (priv->parent != NULL) {
|
||||
/* release self-reference acquired when setting parent */
|
||||
g_object_unref (element);
|
||||
}
|
||||
@ -271,7 +265,7 @@ eek_element_set_parent (EekElement *element,
|
||||
g_object_ref (element);
|
||||
}
|
||||
|
||||
element->priv->parent = parent;
|
||||
priv->parent = parent;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -285,7 +279,10 @@ EekElement *
|
||||
eek_element_get_parent (EekElement *element)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_ELEMENT(element), NULL);
|
||||
return element->priv->parent;
|
||||
|
||||
EekElementPrivate *priv = eek_element_get_instance_private (element);
|
||||
|
||||
return priv->parent;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -300,8 +297,11 @@ eek_element_set_name (EekElement *element,
|
||||
const gchar *name)
|
||||
{
|
||||
g_return_if_fail (EEK_IS_ELEMENT(element));
|
||||
g_free (element->priv->name);
|
||||
element->priv->name = g_strdup (name);
|
||||
|
||||
EekElementPrivate *priv = eek_element_get_instance_private (element);
|
||||
|
||||
g_free (priv->name);
|
||||
priv->name = g_strdup (name);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -311,11 +311,14 @@ eek_element_set_name (EekElement *element,
|
||||
* Get the name of @element.
|
||||
* Returns: the name of @element or NULL when the name is not set
|
||||
*/
|
||||
G_CONST_RETURN gchar *
|
||||
const gchar *
|
||||
eek_element_get_name (EekElement *element)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_ELEMENT(element), NULL);
|
||||
return element->priv->name;
|
||||
|
||||
EekElementPrivate *priv = eek_element_get_instance_private (element);
|
||||
|
||||
return priv->name;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -332,7 +335,10 @@ eek_element_set_bounds (EekElement *element,
|
||||
EekBounds *bounds)
|
||||
{
|
||||
g_return_if_fail (EEK_IS_ELEMENT(element));
|
||||
memcpy (&element->priv->bounds, bounds, sizeof(EekBounds));
|
||||
|
||||
EekElementPrivate *priv = eek_element_get_instance_private (element);
|
||||
|
||||
memcpy (&priv->bounds, bounds, sizeof(EekBounds));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -350,7 +356,10 @@ eek_element_get_bounds (EekElement *element,
|
||||
{
|
||||
g_return_if_fail (EEK_IS_ELEMENT(element));
|
||||
g_return_if_fail (bounds != NULL);
|
||||
memcpy (bounds, &element->priv->bounds, sizeof(EekBounds));
|
||||
|
||||
EekElementPrivate *priv = eek_element_get_instance_private (element);
|
||||
|
||||
memcpy (bounds, &priv->bounds, sizeof(EekBounds));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -486,11 +495,14 @@ eek_element_set_group (EekElement *element,
|
||||
gint group)
|
||||
{
|
||||
g_return_if_fail (EEK_IS_ELEMENT(element));
|
||||
if (element->priv->group != group) {
|
||||
element->priv->group = group;
|
||||
|
||||
EekElementPrivate *priv = eek_element_get_instance_private (element);
|
||||
|
||||
if (priv->group != group) {
|
||||
priv->group = group;
|
||||
g_object_notify (G_OBJECT(element), "group");
|
||||
g_signal_emit (element, signals[SYMBOL_INDEX_CHANGED], 0,
|
||||
group, element->priv->level);
|
||||
group, priv->level);
|
||||
}
|
||||
}
|
||||
|
||||
@ -509,11 +521,14 @@ eek_element_set_level (EekElement *element,
|
||||
gint level)
|
||||
{
|
||||
g_return_if_fail (EEK_IS_ELEMENT(element));
|
||||
if (element->priv->level != level) {
|
||||
element->priv->level = level;
|
||||
|
||||
EekElementPrivate *priv = eek_element_get_instance_private (element);
|
||||
|
||||
if (priv->level != level) {
|
||||
priv->level = level;
|
||||
g_object_notify (G_OBJECT(element), "level");
|
||||
g_signal_emit (element, signals[SYMBOL_INDEX_CHANGED], 0,
|
||||
element->priv->group, level);
|
||||
priv->group, level);
|
||||
}
|
||||
}
|
||||
|
||||
@ -530,7 +545,10 @@ gint
|
||||
eek_element_get_group (EekElement *element)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_ELEMENT(element), -1);
|
||||
return element->priv->group;
|
||||
|
||||
EekElementPrivate *priv = eek_element_get_instance_private (element);
|
||||
|
||||
return priv->group;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -546,5 +564,8 @@ gint
|
||||
eek_element_get_level (EekElement *element)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_ELEMENT(element), -1);
|
||||
return element->priv->level;
|
||||
|
||||
EekElementPrivate *priv = eek_element_get_instance_private (element);
|
||||
|
||||
return priv->level;
|
||||
}
|
||||
|
||||
@ -30,22 +30,7 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
#define EEK_TYPE_ELEMENT (eek_element_get_type())
|
||||
#define EEK_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_ELEMENT, EekElement))
|
||||
#define EEK_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_ELEMENT, EekElementClass))
|
||||
#define EEK_IS_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_ELEMENT))
|
||||
#define EEK_IS_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_ELEMENT))
|
||||
#define EEK_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_ELEMENT, EekElementClass))
|
||||
|
||||
typedef struct _EekElementClass EekElementClass;
|
||||
typedef struct _EekElementPrivate EekElementPrivate;
|
||||
|
||||
struct _EekElement
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent;
|
||||
|
||||
EekElementPrivate *priv;
|
||||
};
|
||||
G_DECLARE_DERIVABLE_TYPE (EekElement, eek_element, EEK, ELEMENT, GObject)
|
||||
|
||||
struct _EekElementClass
|
||||
{
|
||||
@ -58,45 +43,45 @@ struct _EekElementClass
|
||||
gint level);
|
||||
};
|
||||
|
||||
GType eek_element_get_type (void) G_GNUC_CONST;
|
||||
GType eek_element_get_type (void) G_GNUC_CONST;
|
||||
|
||||
void eek_element_set_parent (EekElement *element,
|
||||
EekElement *parent);
|
||||
EekElement *eek_element_get_parent (EekElement *element);
|
||||
void eek_element_set_name (EekElement *element,
|
||||
const gchar *name);
|
||||
void eek_element_set_parent (EekElement *element,
|
||||
EekElement *parent);
|
||||
EekElement *eek_element_get_parent (EekElement *element);
|
||||
void eek_element_set_name (EekElement *element,
|
||||
const gchar *name);
|
||||
|
||||
G_CONST_RETURN gchar *eek_element_get_name (EekElement *element);
|
||||
const gchar *eek_element_get_name (EekElement *element);
|
||||
|
||||
void eek_element_set_bounds (EekElement *element,
|
||||
EekBounds *bounds);
|
||||
void eek_element_set_bounds (EekElement *element,
|
||||
EekBounds *bounds);
|
||||
|
||||
void eek_element_get_bounds (EekElement *element,
|
||||
EekBounds *bounds);
|
||||
void eek_element_get_bounds (EekElement *element,
|
||||
EekBounds *bounds);
|
||||
|
||||
void eek_element_set_position (EekElement *element,
|
||||
gdouble x,
|
||||
gdouble y);
|
||||
void eek_element_set_size (EekElement *element,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void eek_element_set_position (EekElement *element,
|
||||
gdouble x,
|
||||
gdouble y);
|
||||
void eek_element_set_size (EekElement *element,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
|
||||
void eek_element_get_absolute_position (EekElement *element,
|
||||
gdouble *x,
|
||||
gdouble *y);
|
||||
void eek_element_get_absolute_position (EekElement *element,
|
||||
gdouble *x,
|
||||
gdouble *y);
|
||||
|
||||
void eek_element_set_symbol_index (EekElement *element,
|
||||
gint group,
|
||||
gint level);
|
||||
void eek_element_get_symbol_index (EekElement *element,
|
||||
gint *group,
|
||||
gint *level);
|
||||
void eek_element_set_group (EekElement *element,
|
||||
gint group);
|
||||
void eek_element_set_level (EekElement *element,
|
||||
gint level);
|
||||
gint eek_element_get_group (EekElement *element);
|
||||
gint eek_element_get_level (EekElement *element);
|
||||
void eek_element_set_symbol_index (EekElement *element,
|
||||
gint group,
|
||||
gint level);
|
||||
void eek_element_get_symbol_index (EekElement *element,
|
||||
gint *group,
|
||||
gint *level);
|
||||
void eek_element_set_group (EekElement *element,
|
||||
gint group);
|
||||
void eek_element_set_level (EekElement *element,
|
||||
gint level);
|
||||
gint eek_element_get_group (EekElement *element);
|
||||
gint eek_element_get_level (EekElement *element);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEK_ELEMENT_H */
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
* Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
@ -23,18 +23,17 @@
|
||||
* @short_description: a #GtkWidget displaying #EekKeyboard
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#ifdef HAVE_LIBCANBERRA
|
||||
#include <canberra-gtk.h>
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "eek-gtk-keyboard.h"
|
||||
#include "eek-gtk-renderer.h"
|
||||
#include "eek-renderer.h"
|
||||
#include "eek-keyboard.h"
|
||||
#include "eek-section.h"
|
||||
#include "eek-key.h"
|
||||
@ -46,50 +45,28 @@ enum {
|
||||
PROP_LAST
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (EekGtkKeyboard, eek_gtk_keyboard, GTK_TYPE_DRAWING_AREA);
|
||||
|
||||
#define EEK_GTK_KEYBOARD_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_GTK_KEYBOARD, EekGtkKeyboardPrivate))
|
||||
|
||||
/* since 2.91.5 GDK_DRAWABLE was removed and gdk_cairo_create takes
|
||||
GdkWindow as the argument */
|
||||
#ifndef GDK_DRAWABLE
|
||||
#define GDK_DRAWABLE(x) (x)
|
||||
#endif
|
||||
|
||||
struct _EekGtkKeyboardPrivate
|
||||
typedef struct _EekGtkKeyboardPrivate
|
||||
{
|
||||
EekRenderer *renderer;
|
||||
EekKeyboard *keyboard;
|
||||
gulong key_pressed_handler;
|
||||
gulong key_released_handler;
|
||||
gulong key_locked_handler;
|
||||
gulong key_unlocked_handler;
|
||||
gulong key_cancelled_handler;
|
||||
gulong symbol_index_changed_handler;
|
||||
EekTheme *theme;
|
||||
};
|
||||
GtkCssProvider *css_provider;
|
||||
GtkStyleContext *scontext;
|
||||
|
||||
static EekColor * color_from_gdk_color (GdkColor *gdk_color);
|
||||
static void on_key_pressed (EekKeyboard *keyboard,
|
||||
EekKey *key,
|
||||
gpointer user_data);
|
||||
static void on_key_released (EekKeyboard *keyboard,
|
||||
EekKey *key,
|
||||
gpointer user_data);
|
||||
static void on_key_locked (EekKeyboard *keyboard,
|
||||
EekKey *key,
|
||||
gpointer user_data);
|
||||
static void on_key_unlocked (EekKeyboard *keyboard,
|
||||
EekKey *key,
|
||||
gpointer user_data);
|
||||
static void on_key_cancelled (EekKeyboard *keyboard,
|
||||
EekKey *key,
|
||||
gpointer user_data);
|
||||
static void on_symbol_index_changed (EekKeyboard *keyboard,
|
||||
gint group,
|
||||
gint level,
|
||||
gpointer user_data);
|
||||
GdkEventSequence *sequence; // unowned reference
|
||||
} EekGtkKeyboardPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (EekGtkKeyboard, eek_gtk_keyboard, GTK_TYPE_DRAWING_AREA)
|
||||
|
||||
static void on_key_pressed (EekKey *key,
|
||||
EekGtkKeyboard *self);
|
||||
static void on_key_released (EekKey *key,
|
||||
EekGtkKeyboard *self);
|
||||
static void render_pressed_key (GtkWidget *widget,
|
||||
EekKey *key);
|
||||
static void render_locked_key (GtkWidget *widget,
|
||||
@ -100,7 +77,6 @@ static void render_released_key (GtkWidget *widget,
|
||||
static void
|
||||
eek_gtk_keyboard_real_realize (GtkWidget *self)
|
||||
{
|
||||
gtk_widget_set_double_buffered (self, FALSE);
|
||||
gtk_widget_set_events (self,
|
||||
GDK_EXPOSURE_MASK |
|
||||
GDK_KEY_PRESS_MASK |
|
||||
@ -116,51 +92,25 @@ static gboolean
|
||||
eek_gtk_keyboard_real_draw (GtkWidget *self,
|
||||
cairo_t *cr)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
EekGtkKeyboardPrivate *priv =
|
||||
eek_gtk_keyboard_get_instance_private (EEK_GTK_KEYBOARD (self));
|
||||
GtkAllocation allocation;
|
||||
EekColor background;
|
||||
GList *list, *head;
|
||||
|
||||
gtk_widget_get_allocation (self, &allocation);
|
||||
|
||||
if (!priv->renderer) {
|
||||
GtkStyle *style;
|
||||
GtkStateType state;
|
||||
PangoContext *pcontext;
|
||||
EekColor *color;
|
||||
PangoContext *pcontext = gtk_widget_get_pango_context (self);
|
||||
|
||||
pcontext = gtk_widget_get_pango_context (self);
|
||||
priv->renderer = eek_gtk_renderer_new (priv->keyboard, pcontext, self);
|
||||
if (priv->theme)
|
||||
eek_renderer_set_theme (priv->renderer, priv->theme);
|
||||
priv->renderer = eek_renderer_new (priv->keyboard, pcontext, priv->scontext);
|
||||
|
||||
eek_renderer_set_allocation_size (priv->renderer,
|
||||
allocation.width,
|
||||
allocation.height);
|
||||
|
||||
style = gtk_widget_get_style (self);
|
||||
state = gtk_widget_get_state (self);
|
||||
|
||||
color = color_from_gdk_color (&style->text[state]);
|
||||
eek_renderer_set_default_foreground_color (priv->renderer, color);
|
||||
eek_color_free (color);
|
||||
|
||||
color = color_from_gdk_color (&style->base[state]);
|
||||
eek_renderer_set_default_background_color (priv->renderer, color);
|
||||
eek_color_free (color);
|
||||
eek_renderer_set_scale_factor (priv->renderer,
|
||||
gtk_widget_get_scale_factor (self));
|
||||
}
|
||||
|
||||
/* blank background */
|
||||
eek_renderer_get_background_color (priv->renderer,
|
||||
EEK_ELEMENT(priv->keyboard),
|
||||
&background);
|
||||
cairo_set_source_rgba (cr,
|
||||
background.red,
|
||||
background.green,
|
||||
background.blue,
|
||||
background.alpha);
|
||||
cairo_paint (cr);
|
||||
|
||||
eek_renderer_render_keyboard (priv->renderer, cr);
|
||||
|
||||
/* redraw pressed key */
|
||||
@ -184,7 +134,8 @@ static void
|
||||
eek_gtk_keyboard_real_size_allocate (GtkWidget *self,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
EekGtkKeyboardPrivate *priv =
|
||||
eek_gtk_keyboard_get_instance_private (EEK_GTK_KEYBOARD (self));
|
||||
|
||||
if (priv->renderer)
|
||||
eek_renderer_set_allocation_size (priv->renderer,
|
||||
@ -195,33 +146,83 @@ eek_gtk_keyboard_real_size_allocate (GtkWidget *self,
|
||||
size_allocate (self, allocation);
|
||||
}
|
||||
|
||||
static void depress(EekGtkKeyboard *self,
|
||||
gdouble x, gdouble y, guint32 time)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
|
||||
EekKey *key = eek_renderer_find_key_by_position (priv->renderer, x, y);
|
||||
|
||||
if (key) {
|
||||
eek_keyboard_press_key(priv->keyboard, key, time);
|
||||
on_key_pressed(key, self);
|
||||
}
|
||||
}
|
||||
|
||||
static void drag(EekGtkKeyboard *self,
|
||||
gdouble x, gdouble y, guint32 time) {
|
||||
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
|
||||
EekKey *key = eek_renderer_find_key_by_position (priv->renderer, x, y);
|
||||
GList *list, *head;
|
||||
|
||||
list = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
|
||||
if (key) {
|
||||
gboolean found = FALSE;
|
||||
|
||||
for (head = list; head; head = g_list_next (head)) {
|
||||
if (head->data == key) {
|
||||
found = TRUE;
|
||||
} else {
|
||||
eek_keyboard_release_key(priv->keyboard, EEK_KEY(head->data), time);
|
||||
on_key_released(key, self);
|
||||
}
|
||||
}
|
||||
g_list_free (list);
|
||||
|
||||
if (!found) {
|
||||
eek_keyboard_press_key(priv->keyboard, key, time);
|
||||
on_key_pressed(key, self);
|
||||
}
|
||||
} else {
|
||||
for (head = list; head; head = g_list_next (head)) {
|
||||
eek_keyboard_release_key(priv->keyboard, EEK_KEY(head->data), time);
|
||||
on_key_released(key, self);
|
||||
}
|
||||
g_list_free (list);
|
||||
}
|
||||
}
|
||||
|
||||
static void release(EekGtkKeyboard *self, guint32 time) {
|
||||
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
|
||||
|
||||
GList *list = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
for (GList *head = list; head; head = g_list_next (head)) {
|
||||
EekKey *key = EEK_KEY(head->data);
|
||||
eek_keyboard_release_key(priv->keyboard, key, time);
|
||||
on_key_released(key, self);
|
||||
}
|
||||
g_list_free (list);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
eek_gtk_keyboard_real_button_press_event (GtkWidget *self,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
EekKey *key;
|
||||
|
||||
key = eek_renderer_find_key_by_position (priv->renderer,
|
||||
(gdouble)event->x,
|
||||
(gdouble)event->y);
|
||||
if (key)
|
||||
g_signal_emit_by_name (key, "pressed", priv->keyboard);
|
||||
if (event->type == GDK_BUTTON_PRESS && event->button == 1) {
|
||||
depress(EEK_GTK_KEYBOARD(self), event->x, event->y, event->time);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// TODO: this belongs more in gtk_keyboard, with a way to find out which key to re-render
|
||||
static gboolean
|
||||
eek_gtk_keyboard_real_button_release_event (GtkWidget *self,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
GList *list, *head;
|
||||
|
||||
list = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
for (head = list; head; head = g_list_next (head))
|
||||
g_signal_emit_by_name (head->data, "released", priv->keyboard);
|
||||
g_list_free (list);
|
||||
|
||||
if (event->type == GDK_BUTTON_RELEASE && event->button == 1) {
|
||||
// TODO: can the event have different coords than the previous move event?
|
||||
release(EEK_GTK_KEYBOARD(self), event->time);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -229,27 +230,41 @@ static gboolean
|
||||
eek_gtk_keyboard_real_motion_notify_event (GtkWidget *self,
|
||||
GdkEventMotion *event)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
EekKey *key;
|
||||
if (event->state & GDK_BUTTON1_MASK) {
|
||||
drag(EEK_GTK_KEYBOARD(self), event->x, event->y, event->time);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
key = eek_renderer_find_key_by_position (priv->renderer,
|
||||
(gdouble)event->x,
|
||||
(gdouble)event->y);
|
||||
if (key) {
|
||||
GList *list, *head;
|
||||
gboolean found = FALSE;
|
||||
// Only one touch stream at a time allowed. Others will be completely ignored.
|
||||
static gboolean
|
||||
handle_touch_event (GtkWidget *widget,
|
||||
GdkEventTouch *event)
|
||||
{
|
||||
EekGtkKeyboard *self = EEK_GTK_KEYBOARD (widget);
|
||||
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
|
||||
|
||||
list = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
for (head = list; head; head = g_list_next (head)) {
|
||||
if (head->data == key)
|
||||
found = TRUE;
|
||||
else
|
||||
g_signal_emit_by_name (head->data, "cancelled", priv->keyboard);
|
||||
if (event->type == GDK_TOUCH_BEGIN) {
|
||||
if (priv->sequence) {
|
||||
// Ignore second and following touch points
|
||||
return FALSE;
|
||||
}
|
||||
g_list_free (list);
|
||||
priv->sequence = event->sequence;
|
||||
depress(self, event->x, event->y, event->time);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
g_signal_emit_by_name (key, "pressed", priv->keyboard);
|
||||
if (priv->sequence != event->sequence) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (event->type == GDK_TOUCH_UPDATE) {
|
||||
drag(self, event->x, event->y, event->time);
|
||||
}
|
||||
if (event->type == GDK_TOUCH_END || event->type == GDK_TOUCH_CANCEL) {
|
||||
// TODO: can the event have different coords than the previous update event?
|
||||
release(self, event->time);
|
||||
priv->sequence = NULL;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -257,7 +272,8 @@ eek_gtk_keyboard_real_motion_notify_event (GtkWidget *self,
|
||||
static void
|
||||
eek_gtk_keyboard_real_unmap (GtkWidget *self)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
EekGtkKeyboardPrivate *priv =
|
||||
eek_gtk_keyboard_get_instance_private (EEK_GTK_KEYBOARD (self));
|
||||
|
||||
if (priv->keyboard) {
|
||||
GList *list, *head;
|
||||
@ -267,39 +283,56 @@ eek_gtk_keyboard_real_unmap (GtkWidget *self)
|
||||
EekKeyboard::key-released signal can remove elements from its
|
||||
internal copy */
|
||||
list = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
for (head = list; head; head = g_list_next (head))
|
||||
g_signal_emit_by_name (head->data, "released", priv->keyboard);
|
||||
for (head = list; head; head = g_list_next (head)) {
|
||||
g_log("squeek", G_LOG_LEVEL_DEBUG, "emit EekKey released");
|
||||
g_signal_emit_by_name (head->data, "released");
|
||||
}
|
||||
g_list_free (list);
|
||||
}
|
||||
|
||||
GTK_WIDGET_CLASS (eek_gtk_keyboard_parent_class)->unmap (self);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
eek_gtk_keyboard_real_query_tooltip (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
gboolean keyboard_tooltip,
|
||||
GtkTooltip *tooltip)
|
||||
{
|
||||
EekGtkKeyboard *self = EEK_GTK_KEYBOARD (widget);
|
||||
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
|
||||
|
||||
EekKey *key;
|
||||
|
||||
key = eek_renderer_find_key_by_position (priv->renderer,
|
||||
(gdouble)x,
|
||||
(gdouble)y);
|
||||
if (key) {
|
||||
EekSymbol *symbol = eek_key_get_symbol (key);
|
||||
const gchar *text = eek_symbol_get_tooltip (symbol);
|
||||
if (text) {
|
||||
gtk_tooltip_set_text (tooltip, text);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_gtk_keyboard_set_keyboard (EekGtkKeyboard *self,
|
||||
EekKeyboard *keyboard)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
priv->keyboard = g_object_ref (keyboard);
|
||||
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
|
||||
|
||||
priv->key_pressed_handler =
|
||||
g_signal_connect (priv->keyboard, "key-pressed",
|
||||
G_CALLBACK(on_key_pressed), self);
|
||||
priv->key_released_handler =
|
||||
g_signal_connect (priv->keyboard, "key-released",
|
||||
G_CALLBACK(on_key_released), self);
|
||||
priv->key_locked_handler =
|
||||
g_signal_connect (priv->keyboard, "key-locked",
|
||||
G_CALLBACK(on_key_locked), self);
|
||||
priv->key_unlocked_handler =
|
||||
g_signal_connect (priv->keyboard, "key-unlocked",
|
||||
G_CALLBACK(on_key_unlocked), self);
|
||||
priv->key_cancelled_handler =
|
||||
g_signal_connect (priv->keyboard, "key-cancelled",
|
||||
G_CALLBACK(on_key_cancelled), self);
|
||||
priv->symbol_index_changed_handler =
|
||||
g_signal_connect (priv->keyboard, "symbol-index-changed",
|
||||
G_CALLBACK(on_symbol_index_changed), self);
|
||||
if (priv->keyboard == keyboard)
|
||||
return;
|
||||
|
||||
if (priv->keyboard) {
|
||||
g_object_unref (priv->keyboard);
|
||||
}
|
||||
|
||||
priv->keyboard = g_object_ref (keyboard);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -324,7 +357,8 @@ eek_gtk_keyboard_set_property (GObject *object,
|
||||
static void
|
||||
eek_gtk_keyboard_dispose (GObject *object)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(object);
|
||||
EekGtkKeyboard *self = EEK_GTK_KEYBOARD (object);
|
||||
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
|
||||
|
||||
if (priv->renderer) {
|
||||
g_object_unref (priv->renderer);
|
||||
@ -332,35 +366,11 @@ eek_gtk_keyboard_dispose (GObject *object)
|
||||
}
|
||||
|
||||
if (priv->keyboard) {
|
||||
if (g_signal_handler_is_connected (priv->keyboard,
|
||||
priv->key_pressed_handler))
|
||||
g_signal_handler_disconnect (priv->keyboard,
|
||||
priv->key_pressed_handler);
|
||||
if (g_signal_handler_is_connected (priv->keyboard,
|
||||
priv->key_released_handler))
|
||||
g_signal_handler_disconnect (priv->keyboard,
|
||||
priv->key_released_handler);
|
||||
if (g_signal_handler_is_connected (priv->keyboard,
|
||||
priv->key_locked_handler))
|
||||
g_signal_handler_disconnect (priv->keyboard,
|
||||
priv->key_locked_handler);
|
||||
if (g_signal_handler_is_connected (priv->keyboard,
|
||||
priv->key_unlocked_handler))
|
||||
g_signal_handler_disconnect (priv->keyboard,
|
||||
priv->key_unlocked_handler);
|
||||
if (g_signal_handler_is_connected (priv->keyboard,
|
||||
priv->key_cancelled_handler))
|
||||
g_signal_handler_disconnect (priv->keyboard,
|
||||
priv->key_cancelled_handler);
|
||||
if (g_signal_handler_is_connected (priv->keyboard,
|
||||
priv->symbol_index_changed_handler))
|
||||
g_signal_handler_disconnect (priv->keyboard,
|
||||
priv->symbol_index_changed_handler);
|
||||
|
||||
GList *list, *head;
|
||||
|
||||
list = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
for (head = list; head; head = g_list_next (head)) {
|
||||
g_log("squeek", G_LOG_LEVEL_DEBUG, "emit EekKey pressed");
|
||||
g_signal_emit_by_name (head->data, "released", priv->keyboard);
|
||||
}
|
||||
g_list_free (list);
|
||||
@ -369,11 +379,6 @@ eek_gtk_keyboard_dispose (GObject *object)
|
||||
priv->keyboard = NULL;
|
||||
}
|
||||
|
||||
if (priv->theme) {
|
||||
g_object_unref (priv->theme);
|
||||
priv->theme = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (eek_gtk_keyboard_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
@ -384,9 +389,6 @@ eek_gtk_keyboard_class_init (EekGtkKeyboardClass *klass)
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
GParamSpec *pspec;
|
||||
|
||||
g_type_class_add_private (gobject_class,
|
||||
sizeof (EekGtkKeyboardPrivate));
|
||||
|
||||
widget_class->realize = eek_gtk_keyboard_real_realize;
|
||||
widget_class->unmap = eek_gtk_keyboard_real_unmap;
|
||||
widget_class->draw = eek_gtk_keyboard_real_draw;
|
||||
@ -397,6 +399,9 @@ eek_gtk_keyboard_class_init (EekGtkKeyboardClass *klass)
|
||||
eek_gtk_keyboard_real_button_release_event;
|
||||
widget_class->motion_notify_event =
|
||||
eek_gtk_keyboard_real_motion_notify_event;
|
||||
widget_class->query_tooltip =
|
||||
eek_gtk_keyboard_real_query_tooltip;
|
||||
widget_class->touch_event = handle_touch_event;
|
||||
|
||||
gobject_class->set_property = eek_gtk_keyboard_set_property;
|
||||
gobject_class->dispose = eek_gtk_keyboard_dispose;
|
||||
@ -414,7 +419,20 @@ eek_gtk_keyboard_class_init (EekGtkKeyboardClass *klass)
|
||||
static void
|
||||
eek_gtk_keyboard_init (EekGtkKeyboard *self)
|
||||
{
|
||||
self->priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
|
||||
|
||||
/* Create a default CSS provider and load a style sheet */
|
||||
priv->css_provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_resource (priv->css_provider,
|
||||
"/sm/puri/squeekboard/style.css");
|
||||
|
||||
/* Apply the style to the widget */
|
||||
priv->scontext = gtk_widget_get_style_context (GTK_WIDGET(self));
|
||||
gtk_style_context_add_class (priv->scontext, "keyboard");
|
||||
gtk_style_context_add_provider (priv->scontext,
|
||||
GTK_STYLE_PROVIDER(priv->css_provider),
|
||||
GTK_STYLE_PROVIDER_PRIORITY_USER);
|
||||
gtk_style_context_set_state (priv->scontext, GTK_STATE_FLAG_NORMAL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -430,15 +448,6 @@ eek_gtk_keyboard_new (EekKeyboard *keyboard)
|
||||
return g_object_new (EEK_TYPE_GTK_KEYBOARD, "keyboard", keyboard, NULL);
|
||||
}
|
||||
|
||||
static EekColor *
|
||||
color_from_gdk_color (GdkColor *gdk_color)
|
||||
{
|
||||
return eek_color_new (gdk_color->red / (gdouble)0xFFFF,
|
||||
gdk_color->green / (gdouble)0xFFFF,
|
||||
gdk_color->blue / (gdouble)0xFFFF,
|
||||
1.0);
|
||||
}
|
||||
|
||||
static void
|
||||
magnify_bounds (GtkWidget *self,
|
||||
EekBounds *bounds,
|
||||
@ -466,86 +475,73 @@ static void
|
||||
render_pressed_key (GtkWidget *widget,
|
||||
EekKey *key)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
|
||||
EekBounds bounds, large_bounds;
|
||||
cairo_t *cr;
|
||||
EekGtkKeyboard *self = EEK_GTK_KEYBOARD (widget);
|
||||
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
|
||||
|
||||
cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (widget)));
|
||||
GdkWindow *window = gtk_widget_get_window (widget);
|
||||
cairo_region_t *region = gdk_window_get_clip_region (window);
|
||||
GdkDrawingContext *context = gdk_window_begin_draw_frame (window, region);
|
||||
cairo_t *cr = gdk_drawing_context_get_cairo_context (context);
|
||||
|
||||
eek_renderer_get_key_bounds (priv->renderer, key, &bounds, TRUE);
|
||||
magnify_bounds (widget, &bounds, &large_bounds, 1.5);
|
||||
|
||||
cairo_save (cr);
|
||||
cairo_translate (cr, bounds.x, bounds.y);
|
||||
eek_renderer_render_key (priv->renderer, cr, key, 1.0, TRUE);
|
||||
cairo_restore (cr);
|
||||
|
||||
cairo_save (cr);
|
||||
cairo_translate (cr, large_bounds.x, large_bounds.y);
|
||||
/*
|
||||
eek_renderer_render_key (priv->renderer, cr, key, 1.5, TRUE);
|
||||
cairo_restore (cr);
|
||||
*/
|
||||
gdk_window_end_draw_frame (window, context);
|
||||
|
||||
cairo_destroy (cr);
|
||||
cairo_region_destroy (region);
|
||||
}
|
||||
|
||||
static void
|
||||
render_locked_key (GtkWidget *widget,
|
||||
EekKey *key)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
|
||||
EekBounds bounds;
|
||||
cairo_t *cr;
|
||||
EekGtkKeyboard *self = EEK_GTK_KEYBOARD (widget);
|
||||
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
|
||||
|
||||
cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (widget)));
|
||||
GdkWindow *window = gtk_widget_get_window (widget);
|
||||
cairo_region_t *region = gdk_window_get_clip_region (window);
|
||||
GdkDrawingContext *context = gdk_window_begin_draw_frame (window, region);
|
||||
cairo_t *cr = gdk_drawing_context_get_cairo_context (context);
|
||||
|
||||
eek_renderer_get_key_bounds (priv->renderer, key, &bounds, TRUE);
|
||||
cairo_translate (cr, bounds.x, bounds.y);
|
||||
eek_renderer_render_key (priv->renderer, cr, key, 1.0, TRUE);
|
||||
|
||||
cairo_destroy (cr);
|
||||
gdk_window_end_draw_frame (window, context);
|
||||
|
||||
cairo_region_destroy (region);
|
||||
}
|
||||
|
||||
static void
|
||||
render_released_key (GtkWidget *widget,
|
||||
EekKey *key)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
|
||||
EekBounds bounds, large_bounds;
|
||||
cairo_t *cr;
|
||||
EekGtkKeyboard *self = EEK_GTK_KEYBOARD (widget);
|
||||
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
|
||||
|
||||
cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (widget)));
|
||||
|
||||
eek_renderer_get_key_bounds (priv->renderer, key, &bounds, TRUE);
|
||||
magnify_bounds (widget, &bounds, &large_bounds, 2.0);
|
||||
cairo_rectangle (cr,
|
||||
large_bounds.x,
|
||||
large_bounds.y,
|
||||
large_bounds.width,
|
||||
large_bounds.height);
|
||||
cairo_rectangle (cr,
|
||||
bounds.x,
|
||||
bounds.y,
|
||||
bounds.width,
|
||||
bounds.height);
|
||||
cairo_clip (cr);
|
||||
GdkWindow *window = gtk_widget_get_window (widget);
|
||||
cairo_region_t *region = gdk_window_get_clip_region (window);
|
||||
GdkDrawingContext *context = gdk_window_begin_draw_frame (window, region);
|
||||
cairo_t *cr = gdk_drawing_context_get_cairo_context (context);
|
||||
|
||||
eek_renderer_render_keyboard (priv->renderer, cr);
|
||||
cairo_destroy (cr);
|
||||
|
||||
gdk_window_end_draw_frame (window, context);
|
||||
|
||||
cairo_region_destroy (region);
|
||||
}
|
||||
|
||||
static void
|
||||
on_key_pressed (EekKeyboard *keyboard,
|
||||
EekKey *key,
|
||||
gpointer user_data)
|
||||
on_key_pressed (EekKey *key,
|
||||
EekGtkKeyboard *self)
|
||||
{
|
||||
GtkWidget *widget = user_data;
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
|
||||
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
|
||||
|
||||
/* renderer may have not been set yet if the widget is a popup */
|
||||
if (!priv->renderer)
|
||||
return;
|
||||
|
||||
render_pressed_key (widget, key);
|
||||
render_pressed_key (GTK_WIDGET(self), key);
|
||||
gtk_widget_queue_draw (GTK_WIDGET(self));
|
||||
|
||||
#if HAVE_LIBCANBERRA
|
||||
ca_gtk_play_for_widget (widget, 0,
|
||||
@ -557,18 +553,17 @@ on_key_pressed (EekKeyboard *keyboard,
|
||||
}
|
||||
|
||||
static void
|
||||
on_key_released (EekKeyboard *keyboard,
|
||||
EekKey *key,
|
||||
gpointer user_data)
|
||||
on_key_released (EekKey *key,
|
||||
EekGtkKeyboard *self)
|
||||
{
|
||||
GtkWidget *widget = user_data;
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
|
||||
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (self);
|
||||
|
||||
/* renderer may have not been set yet if the widget is a popup */
|
||||
if (!priv->renderer)
|
||||
return;
|
||||
|
||||
render_released_key (widget, key);
|
||||
render_released_key (GTK_WIDGET(self), key);
|
||||
gtk_widget_queue_draw (GTK_WIDGET(self));
|
||||
|
||||
#if HAVE_LIBCANBERRA
|
||||
ca_gtk_play_for_widget (widget, 0,
|
||||
@ -578,72 +573,3 @@ on_key_released (EekKeyboard *keyboard,
|
||||
NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
on_key_cancelled (EekKeyboard *keyboard,
|
||||
EekKey *key,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *widget = user_data;
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
|
||||
|
||||
/* renderer may have not been set yet if the widget is a popup */
|
||||
if (!priv->renderer)
|
||||
return;
|
||||
|
||||
render_released_key (widget, key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_key_locked (EekKeyboard *keyboard,
|
||||
EekKey *key,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *widget = user_data;
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
|
||||
|
||||
/* renderer may have not been set yet if the widget is a popup */
|
||||
if (!priv->renderer)
|
||||
return;
|
||||
|
||||
render_locked_key (widget, key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_key_unlocked (EekKeyboard *keyboard,
|
||||
EekKey *key,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *widget = user_data;
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
|
||||
|
||||
/* renderer may have not been set yet if the widget is a popup */
|
||||
if (!priv->renderer)
|
||||
return;
|
||||
|
||||
render_released_key (widget, key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_symbol_index_changed (EekKeyboard *keyboard,
|
||||
gint group,
|
||||
gint level,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *widget = user_data;
|
||||
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
void
|
||||
eek_gtk_keyboard_set_theme (EekGtkKeyboard *keyboard,
|
||||
EekTheme *theme)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv;
|
||||
|
||||
g_return_if_fail (EEK_IS_GTK_KEYBOARD(keyboard));
|
||||
g_return_if_fail (EEK_IS_THEME(theme));
|
||||
|
||||
priv = EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||
priv->theme = g_object_ref (theme);
|
||||
}
|
||||
|
||||
@ -32,23 +32,7 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
#define EEK_TYPE_GTK_KEYBOARD (eek_gtk_keyboard_get_type())
|
||||
#define EEK_GTK_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_GTK_KEYBOARD, EekGtkKeyboard))
|
||||
#define EEK_GTK_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_GTK_KEYBOARD, EekGtkKeyboardClass))
|
||||
#define EEK_IS_GTK_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_GTK_KEYBOARD))
|
||||
#define EEK_IS_GTK_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_GTK_KEYBOARD))
|
||||
#define EEK_GTK_KEYBOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_GTK_KEYBOARD, EekGtkKeyboardClass))
|
||||
|
||||
typedef struct _EekGtkKeyboard EekGtkKeyboard;
|
||||
typedef struct _EekGtkKeyboardClass EekGtkKeyboardClass;
|
||||
typedef struct _EekGtkKeyboardPrivate EekGtkKeyboardPrivate;
|
||||
|
||||
struct _EekGtkKeyboard
|
||||
{
|
||||
/*< private >*/
|
||||
GtkDrawingArea parent;
|
||||
|
||||
EekGtkKeyboardPrivate *priv;
|
||||
};
|
||||
G_DECLARE_DERIVABLE_TYPE (EekGtkKeyboard, eek_gtk_keyboard, EEK, GTK_KEYBOARD, GtkDrawingArea)
|
||||
|
||||
struct _EekGtkKeyboardClass
|
||||
{
|
||||
@ -62,8 +46,6 @@ struct _EekGtkKeyboardClass
|
||||
|
||||
GType eek_gtk_keyboard_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget *eek_gtk_keyboard_new (EekKeyboard *keyboard);
|
||||
void eek_gtk_keyboard_set_theme (EekGtkKeyboard *keyboard,
|
||||
EekTheme *theme);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEK_GTK_KEYBOARD_H */
|
||||
|
||||
@ -1,104 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Daiki Ueno <ueno@unixuser.org>
|
||||
* Copyright (C) 2011 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "eek-gtk-renderer.h"
|
||||
#include "eek-key.h"
|
||||
|
||||
G_DEFINE_TYPE (EekGtkRenderer, eek_gtk_renderer, EEK_TYPE_RENDERER);
|
||||
|
||||
static cairo_surface_t *
|
||||
pixbuf_to_cairo_surface (GdkPixbuf *pixbuf)
|
||||
{
|
||||
cairo_surface_t *dummy_surface;
|
||||
cairo_pattern_t *pattern;
|
||||
cairo_surface_t *surface;
|
||||
cairo_t *cr;
|
||||
|
||||
dummy_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 1, 1);
|
||||
|
||||
cr = cairo_create (dummy_surface);
|
||||
gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
|
||||
pattern = cairo_get_source (cr);
|
||||
cairo_pattern_get_surface (pattern, &surface);
|
||||
cairo_surface_reference (surface);
|
||||
cairo_destroy (cr);
|
||||
cairo_surface_destroy (dummy_surface);
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
static cairo_surface_t *
|
||||
eek_gtk_renderer_real_get_icon_surface (EekRenderer *self,
|
||||
const gchar *icon_name,
|
||||
gint size)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
GError *error;
|
||||
cairo_surface_t *surface;
|
||||
|
||||
error = NULL;
|
||||
pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
|
||||
icon_name,
|
||||
size,
|
||||
0,
|
||||
&error);
|
||||
if (pixbuf == NULL) {
|
||||
g_warning ("can't get icon pixbuf for %s: %s",
|
||||
icon_name,
|
||||
error->message);
|
||||
g_error_free (error);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
surface = pixbuf_to_cairo_surface (pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
return surface;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_gtk_renderer_class_init (EekGtkRendererClass *klass)
|
||||
{
|
||||
EekRendererClass *renderer_class = EEK_RENDERER_CLASS (klass);
|
||||
|
||||
renderer_class->get_icon_surface = eek_gtk_renderer_real_get_icon_surface;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_gtk_renderer_init (EekGtkRenderer *self)
|
||||
{
|
||||
}
|
||||
|
||||
EekRenderer *
|
||||
eek_gtk_renderer_new (EekKeyboard *keyboard,
|
||||
PangoContext *pcontext,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
return g_object_new (EEK_TYPE_GTK_RENDERER,
|
||||
"keyboard", keyboard,
|
||||
"pango-context", pcontext,
|
||||
NULL);
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
* Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef EEK_GTK_RENDERER_H
|
||||
#define EEK_GTK_RENDERER_H 1
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "eek-renderer.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define EEK_TYPE_GTK_RENDERER (eek_gtk_renderer_get_type())
|
||||
#define EEK_GTK_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_GTK_RENDERER, EekGtkRenderer))
|
||||
#define EEK_GTK_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_GTK_RENDERER, EekGtkRendererClass))
|
||||
#define EEK_IS_GTK_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_GTK_RENDERER))
|
||||
#define EEK_IS_GTK_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_GTK_RENDERER))
|
||||
#define EEK_GTK_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_GTK_RENDERER, EekGtkRendererClass))
|
||||
|
||||
typedef struct _EekGtkRenderer EekGtkRenderer;
|
||||
typedef struct _EekGtkRendererClass EekGtkRendererClass;
|
||||
typedef struct _EekGtkRendererPrivate EekGtkRendererPrivate;
|
||||
|
||||
struct _EekGtkRenderer {
|
||||
EekRenderer parent;
|
||||
|
||||
EekGtkRendererPrivate *priv;
|
||||
};
|
||||
|
||||
struct _EekGtkRendererClass
|
||||
{
|
||||
EekRendererClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
/* padding */
|
||||
gpointer pdummy[24];
|
||||
};
|
||||
|
||||
GType eek_gtk_renderer_get_type (void) G_GNUC_CONST;
|
||||
EekRenderer *eek_gtk_renderer_new (EekKeyboard *keyboard,
|
||||
PangoContext *pcontext,
|
||||
GtkWidget *widget);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEK_GTK_RENDERER_H */
|
||||
285
eek/eek-key.c
@ -25,15 +25,9 @@
|
||||
* The #EekKeyClass class represents a key.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include "eek-key.h"
|
||||
#include "eek-section.h"
|
||||
@ -44,66 +38,33 @@ enum {
|
||||
PROP_0,
|
||||
PROP_KEYCODE,
|
||||
PROP_SYMBOL_MATRIX,
|
||||
PROP_COLUMN,
|
||||
PROP_ROW,
|
||||
PROP_OREF,
|
||||
PROP_LAST
|
||||
};
|
||||
|
||||
enum {
|
||||
PRESSED,
|
||||
RELEASED,
|
||||
LOCKED,
|
||||
UNLOCKED,
|
||||
CANCELLED,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0, };
|
||||
|
||||
G_DEFINE_TYPE (EekKey, eek_key, EEK_TYPE_ELEMENT);
|
||||
|
||||
#define EEK_KEY_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_KEY, EekKeyPrivate))
|
||||
|
||||
|
||||
struct _EekKeyPrivate
|
||||
typedef struct _EekKeyPrivate
|
||||
{
|
||||
guint keycode;
|
||||
EekSymbolMatrix *symbol_matrix;
|
||||
gint column;
|
||||
gint row;
|
||||
gulong oref;
|
||||
gulong oref; // UI outline reference
|
||||
gboolean is_pressed;
|
||||
gboolean is_locked;
|
||||
};
|
||||
} EekKeyPrivate;
|
||||
|
||||
static void
|
||||
eek_key_real_pressed (EekKey *self)
|
||||
{
|
||||
EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(self);
|
||||
|
||||
priv->is_pressed = TRUE;
|
||||
#if DEBUG
|
||||
g_debug ("pressed %X", eek_key_get_keycode (self));
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
eek_key_real_released (EekKey *self)
|
||||
{
|
||||
EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(self);
|
||||
|
||||
priv->is_pressed = FALSE;
|
||||
#if DEBUG
|
||||
g_debug ("released %X", eek_key_get_keycode (self));
|
||||
#endif
|
||||
}
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (EekKey, eek_key, EEK_TYPE_ELEMENT)
|
||||
|
||||
static void
|
||||
eek_key_real_locked (EekKey *self)
|
||||
{
|
||||
EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(self);
|
||||
EekKeyPrivate *priv = eek_key_get_instance_private (self);
|
||||
|
||||
priv->is_locked = TRUE;
|
||||
#if DEBUG
|
||||
@ -114,7 +75,7 @@ eek_key_real_locked (EekKey *self)
|
||||
static void
|
||||
eek_key_real_unlocked (EekKey *self)
|
||||
{
|
||||
EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(self);
|
||||
EekKeyPrivate *priv = eek_key_get_instance_private (self);
|
||||
|
||||
priv->is_locked = FALSE;
|
||||
#if DEBUG
|
||||
@ -122,22 +83,14 @@ eek_key_real_unlocked (EekKey *self)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
eek_key_real_cancelled (EekKey *self)
|
||||
{
|
||||
EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(self);
|
||||
|
||||
priv->is_pressed = FALSE;
|
||||
#if DEBUG
|
||||
g_debug ("cancelled %X", eek_key_get_keycode (self));
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
eek_key_finalize (GObject *object)
|
||||
{
|
||||
EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(object);
|
||||
EekKey *self = EEK_KEY (object);
|
||||
EekKeyPrivate *priv = eek_key_get_instance_private (self);
|
||||
|
||||
eek_symbol_matrix_free (priv->symbol_matrix);
|
||||
|
||||
G_OBJECT_CLASS (eek_key_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
@ -148,8 +101,6 @@ eek_key_set_property (GObject *object,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
EekSymbolMatrix *matrix;
|
||||
gint column, row;
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_KEYCODE:
|
||||
eek_key_set_keycode (EEK_KEY(object), g_value_get_uint (value));
|
||||
@ -158,14 +109,6 @@ eek_key_set_property (GObject *object,
|
||||
matrix = g_value_get_boxed (value);
|
||||
eek_key_set_symbol_matrix (EEK_KEY(object), matrix);
|
||||
break;
|
||||
case PROP_COLUMN:
|
||||
eek_key_get_index (EEK_KEY(object), &column, &row);
|
||||
eek_key_set_index (EEK_KEY(object), g_value_get_int (value), row);
|
||||
break;
|
||||
case PROP_ROW:
|
||||
eek_key_get_index (EEK_KEY(object), &column, &row);
|
||||
eek_key_set_index (EEK_KEY(object), column, g_value_get_int (value));
|
||||
break;
|
||||
case PROP_OREF:
|
||||
eek_key_set_oref (EEK_KEY(object), g_value_get_uint (value));
|
||||
break;
|
||||
@ -181,8 +124,6 @@ eek_key_get_property (GObject *object,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
gint column, row;
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_KEYCODE:
|
||||
g_value_set_uint (value, eek_key_get_keycode (EEK_KEY(object)));
|
||||
@ -191,14 +132,6 @@ eek_key_get_property (GObject *object,
|
||||
g_value_set_boxed (value,
|
||||
eek_key_get_symbol_matrix (EEK_KEY(object)));
|
||||
break;
|
||||
case PROP_COLUMN:
|
||||
eek_key_get_index (EEK_KEY(object), &column, &row);
|
||||
g_value_set_int (value, column);
|
||||
break;
|
||||
case PROP_ROW:
|
||||
eek_key_get_index (EEK_KEY(object), &column, &row);
|
||||
g_value_set_int (value, row);
|
||||
break;
|
||||
case PROP_OREF:
|
||||
g_value_set_uint (value, eek_key_get_oref (EEK_KEY(object)));
|
||||
break;
|
||||
@ -214,19 +147,13 @@ eek_key_class_init (EekKeyClass *klass)
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
GParamSpec *pspec;
|
||||
|
||||
g_type_class_add_private (gobject_class,
|
||||
sizeof (EekKeyPrivate));
|
||||
|
||||
gobject_class->set_property = eek_key_set_property;
|
||||
gobject_class->get_property = eek_key_get_property;
|
||||
gobject_class->finalize = eek_key_finalize;
|
||||
|
||||
/* signals */
|
||||
klass->pressed = eek_key_real_pressed;
|
||||
klass->released = eek_key_real_released;
|
||||
klass->locked = eek_key_real_locked;
|
||||
klass->unlocked = eek_key_real_unlocked;
|
||||
klass->cancelled = eek_key_real_cancelled;
|
||||
|
||||
/**
|
||||
* EekKey:keycode:
|
||||
@ -252,30 +179,6 @@ eek_key_class_init (EekKeyClass *klass)
|
||||
G_PARAM_READWRITE);
|
||||
g_object_class_install_property (gobject_class, PROP_SYMBOL_MATRIX, pspec);
|
||||
|
||||
/**
|
||||
* EekKey:column:
|
||||
*
|
||||
* The column index of #EekKey in the parent #EekSection.
|
||||
*/
|
||||
pspec = g_param_spec_int ("column",
|
||||
"Column",
|
||||
"Column index of the key in section",
|
||||
-1, G_MAXINT, -1,
|
||||
G_PARAM_READWRITE);
|
||||
g_object_class_install_property (gobject_class, PROP_COLUMN, pspec);
|
||||
|
||||
/**
|
||||
* EekKey:row:
|
||||
*
|
||||
* The row index of #EekKey in the parent #EekSection.
|
||||
*/
|
||||
pspec = g_param_spec_int ("row",
|
||||
"Row",
|
||||
"Row index of the key in section",
|
||||
-1, G_MAXINT, -1,
|
||||
G_PARAM_READWRITE);
|
||||
g_object_class_install_property (gobject_class, PROP_ROW, pspec);
|
||||
|
||||
/**
|
||||
* EekKey:oref:
|
||||
*
|
||||
@ -288,42 +191,6 @@ eek_key_class_init (EekKeyClass *klass)
|
||||
G_PARAM_READWRITE);
|
||||
g_object_class_install_property (gobject_class, PROP_OREF, pspec);
|
||||
|
||||
/**
|
||||
* EekKey::pressed:
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::pressed signal is emitted each time @key is shifted to
|
||||
* the pressed state. The class handler runs before signal
|
||||
* handlers to allow signal handlers to read the status of @key
|
||||
* with eek_key_is_pressed().
|
||||
*/
|
||||
signals[PRESSED] =
|
||||
g_signal_new (I_("pressed"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(EekKeyClass, pressed),
|
||||
NULL,
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
/**
|
||||
* EekKey::released:
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::released signal is emitted each time @key is shifted to
|
||||
* the released state.
|
||||
*/
|
||||
signals[RELEASED] =
|
||||
g_signal_new (I_("released"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(EekKeyClass, released),
|
||||
NULL,
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
/**
|
||||
* EekKey::locked:
|
||||
* @key: an #EekKey
|
||||
@ -359,31 +226,12 @@ eek_key_class_init (EekKeyClass *klass)
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
/**
|
||||
* EekKey::cancelled:
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::cancelled signal is emitted each time @key is shifted to
|
||||
* the cancelled state.
|
||||
*/
|
||||
signals[CANCELLED] =
|
||||
g_signal_new (I_("cancelled"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(EekKeyClass, cancelled),
|
||||
NULL,
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
eek_key_init (EekKey *self)
|
||||
{
|
||||
EekKeyPrivate *priv;
|
||||
|
||||
priv = self->priv = EEK_KEY_GET_PRIVATE(self);
|
||||
EekKeyPrivate *priv = eek_key_get_instance_private (self);
|
||||
priv->symbol_matrix = eek_symbol_matrix_new (0, 0);
|
||||
}
|
||||
|
||||
@ -403,7 +251,10 @@ eek_key_set_keycode (EekKey *key,
|
||||
guint keycode)
|
||||
{
|
||||
g_return_if_fail (EEK_IS_KEY (key));
|
||||
key->priv->keycode = keycode;
|
||||
|
||||
EekKeyPrivate *priv = eek_key_get_instance_private (key);
|
||||
|
||||
priv->keycode = keycode;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -417,7 +268,10 @@ guint
|
||||
eek_key_get_keycode (EekKey *key)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_KEY (key), EEK_INVALID_KEYCODE);
|
||||
return key->priv->keycode;
|
||||
|
||||
EekKeyPrivate *priv = eek_key_get_instance_private (key);
|
||||
|
||||
return priv->keycode;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -433,8 +287,10 @@ eek_key_set_symbol_matrix (EekKey *key,
|
||||
{
|
||||
g_return_if_fail (EEK_IS_KEY(key));
|
||||
|
||||
eek_symbol_matrix_free (key->priv->symbol_matrix);
|
||||
key->priv->symbol_matrix = eek_symbol_matrix_copy (matrix);
|
||||
EekKeyPrivate *priv = eek_key_get_instance_private (key);
|
||||
|
||||
eek_symbol_matrix_free (priv->symbol_matrix);
|
||||
priv->symbol_matrix = eek_symbol_matrix_copy (matrix);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -448,7 +304,10 @@ EekSymbolMatrix *
|
||||
eek_key_get_symbol_matrix (EekKey *key)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_KEY(key), NULL);
|
||||
return key->priv->symbol_matrix;
|
||||
|
||||
EekKeyPrivate *priv = eek_key_get_instance_private (key);
|
||||
|
||||
return priv->symbol_matrix;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -536,7 +395,7 @@ eek_key_get_symbol_at_index (EekKey *key,
|
||||
gint fallback_group,
|
||||
gint fallback_level)
|
||||
{
|
||||
EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(key);
|
||||
EekKeyPrivate *priv = eek_key_get_instance_private (key);
|
||||
gint num_symbols;
|
||||
|
||||
g_return_val_if_fail (fallback_group >= 0, NULL);
|
||||
@ -571,55 +430,6 @@ eek_key_get_symbol_at_index (EekKey *key,
|
||||
level];
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_key_set_index:
|
||||
* @key: an #EekKey
|
||||
* @column: column index of @key in #EekSection
|
||||
* @row: row index of @key in #EekSection
|
||||
*
|
||||
* Set the location of @key in #EekSection with @column and @row.
|
||||
*/
|
||||
void
|
||||
eek_key_set_index (EekKey *key,
|
||||
gint column,
|
||||
gint row)
|
||||
{
|
||||
g_return_if_fail (EEK_IS_KEY(key));
|
||||
g_return_if_fail (0 <= column);
|
||||
g_return_if_fail (0 <= row);
|
||||
|
||||
if (key->priv->column != column) {
|
||||
key->priv->column = column;
|
||||
g_object_notify (G_OBJECT(key), "column");
|
||||
}
|
||||
if (key->priv->row != row) {
|
||||
key->priv->row = row;
|
||||
g_object_notify (G_OBJECT(key), "row");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_key_get_index:
|
||||
* @key: an #EekKey
|
||||
* @column: (allow-none): pointer where the column index of @key in #EekSection will be stored
|
||||
* @row: (allow-none): pointer where the row index of @key in #EekSection will be stored
|
||||
*
|
||||
* Get the location of @key in #EekSection.
|
||||
*/
|
||||
void
|
||||
eek_key_get_index (EekKey *key,
|
||||
gint *column,
|
||||
gint *row)
|
||||
{
|
||||
g_return_if_fail (EEK_IS_KEY(key));
|
||||
g_return_if_fail (column != NULL || row != NULL);
|
||||
|
||||
if (column != NULL)
|
||||
*column = key->priv->column;
|
||||
if (row != NULL)
|
||||
*row = key->priv->row;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_key_set_oref:
|
||||
* @key: an #EekKey
|
||||
@ -632,8 +442,11 @@ eek_key_set_oref (EekKey *key,
|
||||
guint oref)
|
||||
{
|
||||
g_return_if_fail (EEK_IS_KEY(key));
|
||||
if (key->priv->oref != oref) {
|
||||
key->priv->oref = oref;
|
||||
|
||||
EekKeyPrivate *priv = eek_key_get_instance_private (key);
|
||||
|
||||
if (priv->oref != oref) {
|
||||
priv->oref = oref;
|
||||
g_object_notify (G_OBJECT(key), "oref");
|
||||
}
|
||||
}
|
||||
@ -649,7 +462,10 @@ guint
|
||||
eek_key_get_oref (EekKey *key)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_KEY (key), 0);
|
||||
return key->priv->oref;
|
||||
|
||||
EekKeyPrivate *priv = eek_key_get_instance_private (key);
|
||||
|
||||
return priv->oref;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -662,7 +478,10 @@ gboolean
|
||||
eek_key_is_pressed (EekKey *key)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_KEY(key), FALSE);
|
||||
return key->priv->is_pressed;
|
||||
|
||||
EekKeyPrivate *priv = eek_key_get_instance_private (key);
|
||||
|
||||
return priv->is_pressed;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -675,5 +494,25 @@ gboolean
|
||||
eek_key_is_locked (EekKey *key)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_KEY(key), FALSE);
|
||||
return key->priv->is_locked;
|
||||
|
||||
EekKeyPrivate *priv = eek_key_get_instance_private (key);
|
||||
|
||||
return priv->is_locked;
|
||||
}
|
||||
|
||||
void eek_key_set_pressed(EekKey *key, gboolean value)
|
||||
{
|
||||
g_return_if_fail (EEK_IS_KEY(key));
|
||||
|
||||
EekKeyPrivate *priv = eek_key_get_instance_private (key);
|
||||
|
||||
priv->is_pressed = value;
|
||||
}
|
||||
|
||||
gboolean
|
||||
eek_key_has_label(EekKey *key)
|
||||
{
|
||||
EekSymbol *symbol = eek_key_get_symbol(key);
|
||||
return (eek_symbol_get_label(symbol) != NULL) ||
|
||||
(eek_symbol_get_icon_name(symbol) != NULL);
|
||||
}
|
||||
|
||||
@ -31,28 +31,7 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define EEK_TYPE_KEY (eek_key_get_type())
|
||||
#define EEK_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_KEY, EekKey))
|
||||
#define EEK_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_KEY, EekKeyClass))
|
||||
#define EEK_IS_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_KEY))
|
||||
#define EEK_IS_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_KEY))
|
||||
#define EEK_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_KEY, EekKeyClass))
|
||||
|
||||
typedef struct _EekKeyClass EekKeyClass;
|
||||
typedef struct _EekKeyPrivate EekKeyPrivate;
|
||||
|
||||
/**
|
||||
* EekKey:
|
||||
*
|
||||
* The #EekKey structure contains only private data and should only be
|
||||
* accessed using the provided API.
|
||||
*/
|
||||
struct _EekKey
|
||||
{
|
||||
/*< private >*/
|
||||
EekElement parent;
|
||||
|
||||
EekKeyPrivate *priv;
|
||||
};
|
||||
G_DECLARE_DERIVABLE_TYPE(EekKey, eek_key, EEK, KEY, EekElement)
|
||||
|
||||
/**
|
||||
* EekKeyClass:
|
||||
@ -71,11 +50,8 @@ struct _EekKeyClass
|
||||
|
||||
/*< public >*/
|
||||
/* signals */
|
||||
void (* pressed) (EekKey *key);
|
||||
void (* released) (EekKey *key);
|
||||
void (* locked) (EekKey *key);
|
||||
void (* unlocked) (EekKey *key);
|
||||
void (* cancelled) (EekKey *key);
|
||||
};
|
||||
|
||||
GType eek_key_get_type (void) G_GNUC_CONST;
|
||||
@ -97,19 +73,16 @@ EekSymbol *eek_key_get_symbol_at_index (EekKey *key,
|
||||
gint fallback_group,
|
||||
gint fallback_level);
|
||||
|
||||
void eek_key_set_index (EekKey *key,
|
||||
gint column,
|
||||
gint row);
|
||||
void eek_key_get_index (EekKey *key,
|
||||
gint *column,
|
||||
gint *row);
|
||||
|
||||
void eek_key_set_oref (EekKey *key,
|
||||
guint oref);
|
||||
guint eek_key_get_oref (EekKey *key);
|
||||
|
||||
gboolean eek_key_is_pressed (EekKey *key);
|
||||
gboolean eek_key_is_locked (EekKey *key);
|
||||
void eek_key_set_pressed (EekKey *key,
|
||||
gboolean value);
|
||||
|
||||
gboolean eek_key_has_label (EekKey *key);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEK_KEY_H */
|
||||
|
||||
@ -17,9 +17,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <math.h>
|
||||
#include <pango/pangocairo.h>
|
||||
@ -199,32 +197,21 @@ void
|
||||
_eek_rounded_polygon (cairo_t *cr,
|
||||
gdouble radius,
|
||||
EekPoint *points,
|
||||
gint num_points)
|
||||
guint num_points)
|
||||
{
|
||||
gint i, j;
|
||||
|
||||
cairo_move_to (cr,
|
||||
(gdouble) (points[num_points - 1].x +
|
||||
points[0].x) / 2,
|
||||
(gdouble) (points[num_points - 1].y +
|
||||
points[0].y) / 2);
|
||||
|
||||
|
||||
#ifdef KBDRAW_DEBUG
|
||||
printf (" rounded polygon of radius %f:\n", radius);
|
||||
#endif
|
||||
for (i = 0; i < num_points; i++) {
|
||||
j = (i + 1) % num_points;
|
||||
for (guint i = 0; i < num_points; i++) {
|
||||
guint j = (i + 1) % num_points;
|
||||
rounded_corner (cr, (gdouble) points[i].x,
|
||||
(gdouble) points[i].y,
|
||||
(gdouble) (points[i].x + points[j].x) / 2,
|
||||
(gdouble) (points[i].y + points[j].y) / 2,
|
||||
radius);
|
||||
#ifdef KBDRAW_DEBUG
|
||||
printf (" corner (%d, %d) -> (%d, %d):\n",
|
||||
points[i].x, points[i].y, points[j].x,
|
||||
points[j].y);
|
||||
#endif
|
||||
};
|
||||
}
|
||||
cairo_close_path (cr);
|
||||
}
|
||||
|
||||
@ -27,15 +27,17 @@
|
||||
* of one or more sections of the #EekSectionClass class.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
#include <glib/gprintf.h>
|
||||
|
||||
#include "eek-keyboard.h"
|
||||
#include "eek-marshalers.h"
|
||||
#include "eek-section.h"
|
||||
#include "eek-key.h"
|
||||
#include "eek-symbol.h"
|
||||
#include "eek-enumtypes.h"
|
||||
#include "eekboard/key-emitter.h"
|
||||
#include "keymap.h"
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
@ -45,17 +47,20 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
KEY_PRESSED,
|
||||
KEY_RELEASED,
|
||||
KEY_LOCKED,
|
||||
KEY_UNLOCKED,
|
||||
KEY_CANCELLED,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0, };
|
||||
enum {
|
||||
VIEW_LETTERS_LOWER,
|
||||
VIEW_LETTERS_UPPER,
|
||||
VIEW_NUMBERS,
|
||||
VIEW_SYMBOLS
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (EekKeyboard, eek_keyboard, EEK_TYPE_CONTAINER);
|
||||
static guint signals[LAST_SIGNAL] = { 0, };
|
||||
|
||||
#define EEK_KEYBOARD_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_KEYBOARD, EekKeyboardPrivate))
|
||||
@ -65,16 +70,23 @@ struct _EekKeyboardPrivate
|
||||
EekLayout *layout;
|
||||
EekModifierBehavior modifier_behavior;
|
||||
EekModifierType modifiers;
|
||||
unsigned int old_level;
|
||||
GList *pressed_keys;
|
||||
GList *locked_keys;
|
||||
GArray *outline_array;
|
||||
GHashTable *keycodes;
|
||||
|
||||
/* Map key names to key objects */
|
||||
GHashTable *names;
|
||||
/* Map characters to symbols and levels */
|
||||
GHashTable *character_map;
|
||||
|
||||
/* modifiers dynamically assigned at run time */
|
||||
EekModifierType num_lock_mask;
|
||||
EekModifierType alt_gr_mask;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (EekKeyboard, eek_keyboard, EEK_TYPE_CONTAINER);
|
||||
|
||||
G_DEFINE_BOXED_TYPE(EekModifierKey, eek_modifier_key,
|
||||
eek_modifier_key_copy, eek_modifier_key_free);
|
||||
|
||||
@ -91,22 +103,6 @@ eek_modifier_key_free (EekModifierKey *modkey)
|
||||
g_slice_free (EekModifierKey, modkey);
|
||||
}
|
||||
|
||||
static void
|
||||
on_key_pressed (EekSection *section,
|
||||
EekKey *key,
|
||||
EekKeyboard *keyboard)
|
||||
{
|
||||
g_signal_emit (keyboard, signals[KEY_PRESSED], 0, key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_key_released (EekSection *section,
|
||||
EekKey *key,
|
||||
EekKeyboard *keyboard)
|
||||
{
|
||||
g_signal_emit (keyboard, signals[KEY_RELEASED], 0, key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_key_locked (EekSection *section,
|
||||
EekKey *key,
|
||||
@ -123,14 +119,6 @@ on_key_unlocked (EekSection *section,
|
||||
g_signal_emit (keyboard, signals[KEY_UNLOCKED], 0, key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_key_cancelled (EekSection *section,
|
||||
EekKey *key,
|
||||
EekKeyboard *keyboard)
|
||||
{
|
||||
g_signal_emit (keyboard, signals[KEY_CANCELLED], 0, key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_symbol_index_changed (EekSection *section,
|
||||
gint group,
|
||||
@ -145,9 +133,9 @@ section_child_added_cb (EekContainer *container,
|
||||
EekElement *element,
|
||||
EekKeyboard *keyboard)
|
||||
{
|
||||
guint keycode = eek_key_get_keycode (EEK_KEY(element));
|
||||
g_hash_table_insert (keyboard->priv->keycodes,
|
||||
GUINT_TO_POINTER(keycode),
|
||||
const gchar *name = eek_element_get_name(element);
|
||||
g_hash_table_insert (keyboard->priv->names,
|
||||
(gpointer)name,
|
||||
element);
|
||||
}
|
||||
|
||||
@ -156,9 +144,9 @@ section_child_removed_cb (EekContainer *container,
|
||||
EekElement *element,
|
||||
EekKeyboard *keyboard)
|
||||
{
|
||||
guint keycode = eek_key_get_keycode (EEK_KEY(element));
|
||||
g_hash_table_remove (keyboard->priv->keycodes,
|
||||
GUINT_TO_POINTER(keycode));
|
||||
const gchar *name = eek_element_get_name(element);
|
||||
g_hash_table_remove (keyboard->priv->names,
|
||||
name);
|
||||
}
|
||||
|
||||
static EekSection *
|
||||
@ -227,16 +215,61 @@ eek_keyboard_get_property (GObject *object,
|
||||
}
|
||||
|
||||
static void
|
||||
set_level_from_modifiers (EekKeyboard *self)
|
||||
set_level_from_modifiers (EekKeyboard *self, EekKey *key)
|
||||
{
|
||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(self);
|
||||
gint level = 0;
|
||||
|
||||
if (priv->modifiers & priv->alt_gr_mask)
|
||||
level |= 2;
|
||||
if (priv->modifiers & EEK_SHIFT_MASK)
|
||||
level |= 1;
|
||||
/* The levels are: 0 Letters, 1 Upper case letters, 2 Numbers, 3 Symbols */
|
||||
|
||||
/* Use the numbers/letters bit from the old level */
|
||||
gint level = priv->old_level & 2;
|
||||
|
||||
/* Handle non-emitting keys */
|
||||
if (key) {
|
||||
const gchar *name = eek_element_get_name(EEK_ELEMENT(key));
|
||||
if (g_strcmp0(name, "ABC123") == 0)
|
||||
level ^= 2;
|
||||
}
|
||||
|
||||
level |= ((priv->modifiers & EEK_SHIFT_MASK) ? 1 : 0);
|
||||
|
||||
switch (priv->old_level) {
|
||||
case VIEW_LETTERS_UPPER:
|
||||
{
|
||||
/* Redirect upper case letters to numbers instead of symbols, clearing
|
||||
the shift modifier to keep the modifiers in sync with the level */
|
||||
if (level == VIEW_SYMBOLS) {
|
||||
level = VIEW_NUMBERS;
|
||||
priv->modifiers &= ~EEK_SHIFT_MASK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VIEW_SYMBOLS:
|
||||
{
|
||||
/* Redirect symbols to lower case letters instead of upper case,
|
||||
clearing the shift modifier to keep the modifiers in sync with the
|
||||
level */
|
||||
if (level == VIEW_LETTERS_UPPER) {
|
||||
level = VIEW_LETTERS_LOWER;
|
||||
priv->modifiers &= ~EEK_SHIFT_MASK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VIEW_LETTERS_LOWER: /* Direct transitions between views */
|
||||
case VIEW_NUMBERS:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (level == VIEW_NUMBERS || level == VIEW_SYMBOLS)
|
||||
priv->modifier_behavior = EEK_MODIFIER_BEHAVIOR_LOCK;
|
||||
else
|
||||
priv->modifier_behavior = EEK_MODIFIER_BEHAVIOR_LATCH;
|
||||
|
||||
priv->old_level = level;
|
||||
eek_element_set_level (EEK_ELEMENT(self), level);
|
||||
|
||||
eek_layout_update_layout(self);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -278,74 +311,76 @@ set_modifiers_with_key (EekKeyboard *self,
|
||||
priv->modifiers = modifiers;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_keyboard_real_key_pressed (EekKeyboard *self,
|
||||
EekKey *key)
|
||||
{
|
||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(self);
|
||||
EekSymbol *symbol;
|
||||
EekModifierType modifier;
|
||||
void eek_keyboard_press_key(EekKeyboard *keyboard, EekKey *key, guint32 timestamp) {
|
||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||
|
||||
eek_key_set_pressed(key, TRUE);
|
||||
priv->pressed_keys = g_list_prepend (priv->pressed_keys, key);
|
||||
|
||||
symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
||||
EekSymbol *symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
||||
if (!symbol)
|
||||
return;
|
||||
|
||||
modifier = eek_symbol_get_modifier_mask (symbol);
|
||||
EekModifierType modifier = eek_symbol_get_modifier_mask (symbol);
|
||||
if (priv->modifier_behavior == EEK_MODIFIER_BEHAVIOR_NONE) {
|
||||
set_modifiers_with_key (self, key, priv->modifiers | modifier);
|
||||
set_level_from_modifiers (self);
|
||||
set_modifiers_with_key (keyboard, key, priv->modifiers | modifier);
|
||||
set_level_from_modifiers (keyboard, key);
|
||||
}
|
||||
|
||||
// "Borrowed" from eek-context-service; doesn't influence the state but forwards the event
|
||||
|
||||
guint keycode = eek_key_get_keycode (key);
|
||||
EekModifierType modifiers = eek_keyboard_get_modifiers (keyboard);
|
||||
|
||||
emit_key_activated(keyboard->manager, keyboard, keycode, symbol, modifiers, TRUE, timestamp);
|
||||
}
|
||||
|
||||
static void
|
||||
eek_keyboard_real_key_released (EekKeyboard *self,
|
||||
EekKey *key)
|
||||
{
|
||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(self);
|
||||
EekSymbol *symbol;
|
||||
EekModifierType modifier;
|
||||
void eek_keyboard_release_key( EekKeyboard *keyboard,
|
||||
EekKey *key,
|
||||
guint32 timestamp) {
|
||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||
|
||||
EEK_KEYBOARD_GET_CLASS (self)->key_cancelled (self, key);
|
||||
|
||||
symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
||||
if (!symbol)
|
||||
return;
|
||||
|
||||
modifier = eek_symbol_get_modifier_mask (symbol);
|
||||
switch (priv->modifier_behavior) {
|
||||
case EEK_MODIFIER_BEHAVIOR_NONE:
|
||||
set_modifiers_with_key (self, key, priv->modifiers & ~modifier);
|
||||
break;
|
||||
case EEK_MODIFIER_BEHAVIOR_LOCK:
|
||||
priv->modifiers ^= modifier;
|
||||
break;
|
||||
case EEK_MODIFIER_BEHAVIOR_LATCH:
|
||||
if (modifier)
|
||||
set_modifiers_with_key (self, key, priv->modifiers ^ modifier);
|
||||
else
|
||||
set_modifiers_with_key (self, key,
|
||||
(priv->modifiers ^ modifier) & modifier);
|
||||
break;
|
||||
}
|
||||
set_level_from_modifiers (self);
|
||||
}
|
||||
|
||||
static void
|
||||
eek_keyboard_real_key_cancelled (EekKeyboard *self,
|
||||
EekKey *key)
|
||||
{
|
||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(self);
|
||||
GList *head;
|
||||
|
||||
for (head = priv->pressed_keys; head; head = g_list_next (head)) {
|
||||
for (GList *head = priv->pressed_keys; head; head = g_list_next (head)) {
|
||||
if (head->data == key) {
|
||||
priv->pressed_keys = g_list_remove_link (priv->pressed_keys, head);
|
||||
g_list_free1 (head);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
EekSymbol *symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
||||
if (!symbol)
|
||||
return;
|
||||
|
||||
EekModifierType modifier = eek_symbol_get_modifier_mask (symbol);
|
||||
|
||||
if (!symbol)
|
||||
return;
|
||||
|
||||
modifier = eek_symbol_get_modifier_mask (symbol);
|
||||
switch (priv->modifier_behavior) {
|
||||
case EEK_MODIFIER_BEHAVIOR_NONE:
|
||||
set_modifiers_with_key (keyboard, key, priv->modifiers & ~modifier);
|
||||
break;
|
||||
case EEK_MODIFIER_BEHAVIOR_LOCK:
|
||||
priv->modifiers ^= modifier;
|
||||
break;
|
||||
case EEK_MODIFIER_BEHAVIOR_LATCH:
|
||||
if (modifier)
|
||||
set_modifiers_with_key (keyboard, key, priv->modifiers ^ modifier);
|
||||
else
|
||||
set_modifiers_with_key (keyboard, key,
|
||||
(priv->modifiers ^ modifier) & modifier);
|
||||
break;
|
||||
}
|
||||
set_level_from_modifiers (keyboard, key);
|
||||
|
||||
// "Borrowed" from eek-context-service; doesn't influence the state but forwards the event
|
||||
|
||||
guint keycode = eek_key_get_keycode (key);
|
||||
guint modifiers = eek_keyboard_get_modifiers (keyboard);
|
||||
|
||||
emit_key_activated(keyboard->manager, keyboard, keycode, symbol, modifiers, FALSE, timestamp);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -365,13 +400,14 @@ static void
|
||||
eek_keyboard_finalize (GObject *object)
|
||||
{
|
||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(object);
|
||||
gint i;
|
||||
guint i;
|
||||
|
||||
g_list_free (priv->pressed_keys);
|
||||
g_list_free_full (priv->locked_keys,
|
||||
(GDestroyNotify) eek_modifier_key_free);
|
||||
|
||||
g_hash_table_destroy (priv->keycodes);
|
||||
g_hash_table_destroy (priv->names);
|
||||
g_hash_table_destroy (priv->character_map);
|
||||
|
||||
for (i = 0; i < priv->outline_array->len; i++) {
|
||||
EekOutline *outline = &g_array_index (priv->outline_array,
|
||||
@ -389,16 +425,10 @@ static void
|
||||
eek_keyboard_real_child_added (EekContainer *self,
|
||||
EekElement *element)
|
||||
{
|
||||
g_signal_connect (element, "key-pressed",
|
||||
G_CALLBACK(on_key_pressed), self);
|
||||
g_signal_connect (element, "key-released",
|
||||
G_CALLBACK(on_key_released), self);
|
||||
g_signal_connect (element, "key-locked",
|
||||
G_CALLBACK(on_key_locked), self);
|
||||
g_signal_connect (element, "key-unlocked",
|
||||
G_CALLBACK(on_key_unlocked), self);
|
||||
g_signal_connect (element, "key-cancelled",
|
||||
G_CALLBACK(on_key_cancelled), self);
|
||||
g_signal_connect (element, "symbol-index-changed",
|
||||
G_CALLBACK(on_symbol_index_changed), self);
|
||||
}
|
||||
@ -407,11 +437,8 @@ static void
|
||||
eek_keyboard_real_child_removed (EekContainer *self,
|
||||
EekElement *element)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (element, on_key_pressed, self);
|
||||
g_signal_handlers_disconnect_by_func (element, on_key_released, self);
|
||||
g_signal_handlers_disconnect_by_func (element, on_key_locked, self);
|
||||
g_signal_handlers_disconnect_by_func (element, on_key_unlocked, self);
|
||||
g_signal_handlers_disconnect_by_func (element, on_key_cancelled, self);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -421,16 +448,9 @@ eek_keyboard_class_init (EekKeyboardClass *klass)
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
GParamSpec *pspec;
|
||||
|
||||
g_type_class_add_private (gobject_class,
|
||||
sizeof (EekKeyboardPrivate));
|
||||
|
||||
klass->create_section = eek_keyboard_real_create_section;
|
||||
|
||||
/* signals */
|
||||
klass->key_pressed = eek_keyboard_real_key_pressed;
|
||||
klass->key_released = eek_keyboard_real_key_released;
|
||||
klass->key_cancelled = eek_keyboard_real_key_cancelled;
|
||||
|
||||
container_class->child_added = eek_keyboard_real_child_added;
|
||||
container_class->child_removed = eek_keyboard_real_child_removed;
|
||||
|
||||
@ -468,46 +488,6 @@ eek_keyboard_class_init (EekKeyboardClass *klass)
|
||||
PROP_MODIFIER_BEHAVIOR,
|
||||
pspec);
|
||||
|
||||
/**
|
||||
* EekKeyboard::key-pressed:
|
||||
* @keyboard: an #EekKeyboard
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::key-pressed signal is emitted each time a key in @keyboard
|
||||
* is shifted to the pressed state.
|
||||
*/
|
||||
signals[KEY_PRESSED] =
|
||||
g_signal_new (I_("key-pressed"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(EekKeyboardClass, key_pressed),
|
||||
NULL,
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
EEK_TYPE_KEY);
|
||||
|
||||
/**
|
||||
* EekKeyboard::key-released:
|
||||
* @keyboard: an #EekKeyboard
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::key-released signal is emitted each time a key in @keyboard
|
||||
* is shifted to the released state.
|
||||
*/
|
||||
signals[KEY_RELEASED] =
|
||||
g_signal_new (I_("key-released"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(EekKeyboardClass, key_released),
|
||||
NULL,
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
EEK_TYPE_KEY);
|
||||
|
||||
/**
|
||||
* EekKeyboard::key-locked:
|
||||
* @keyboard: an #EekKeyboard
|
||||
@ -547,26 +527,6 @@ eek_keyboard_class_init (EekKeyboardClass *klass)
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
EEK_TYPE_KEY);
|
||||
|
||||
/**
|
||||
* EekKeyboard::key-cancelled:
|
||||
* @keyboard: an #EekKeyboard
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::key-cancelled signal is emitted each time a key in @keyboard
|
||||
* is shifted to the cancelled state.
|
||||
*/
|
||||
signals[KEY_CANCELLED] =
|
||||
g_signal_new (I_("key-cancelled"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(EekKeyboardClass, key_cancelled),
|
||||
NULL,
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
EEK_TYPE_KEY);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -575,8 +535,11 @@ eek_keyboard_init (EekKeyboard *self)
|
||||
self->priv = EEK_KEYBOARD_GET_PRIVATE(self);
|
||||
self->priv->modifier_behavior = EEK_MODIFIER_BEHAVIOR_NONE;
|
||||
self->priv->outline_array = g_array_new (FALSE, TRUE, sizeof (EekOutline));
|
||||
self->priv->keycodes = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||
self->priv->names = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
self->priv->character_map = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||
NULL, g_free);
|
||||
eek_element_set_symbol_index (EEK_ELEMENT(self), 0, 0);
|
||||
self->scale = 1.0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -595,20 +558,20 @@ eek_keyboard_create_section (EekKeyboard *keyboard)
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_keyboard_find_key_by_keycode:
|
||||
* eek_keyboard_find_key_by_name:
|
||||
* @keyboard: an #EekKeyboard
|
||||
* @keycode: a keycode
|
||||
* @name: a key name
|
||||
*
|
||||
* Find an #EekKey whose keycode is @keycode.
|
||||
* Return value: (transfer none): #EekKey whose keycode is @keycode
|
||||
* Find an #EekKey whose name is @name.
|
||||
* Return value: (transfer none): #EekKey whose name is @name
|
||||
*/
|
||||
EekKey *
|
||||
eek_keyboard_find_key_by_keycode (EekKeyboard *keyboard,
|
||||
guint keycode)
|
||||
eek_keyboard_find_key_by_name (EekKeyboard *keyboard,
|
||||
const gchar *name)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_KEYBOARD(keyboard), NULL);
|
||||
return g_hash_table_lookup (keyboard->priv->keycodes,
|
||||
GUINT_TO_POINTER(keycode));
|
||||
return g_hash_table_lookup (keyboard->priv->names,
|
||||
name);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -680,7 +643,7 @@ eek_keyboard_set_modifiers (EekKeyboard *keyboard,
|
||||
{
|
||||
g_return_if_fail (EEK_IS_KEYBOARD(keyboard));
|
||||
keyboard->priv->modifiers = modifiers;
|
||||
set_level_from_modifiers (keyboard);
|
||||
set_level_from_modifiers (keyboard, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -833,7 +796,7 @@ eek_keyboard_get_pressed_keys (EekKeyboard *keyboard)
|
||||
* @keyboard: an #EekKeyboard
|
||||
*
|
||||
* Get locked keys.
|
||||
* Returns: (transfer container) (element-type EekModifierKey): A list
|
||||
* Returns: (transfer container) (element-type Eek.ModifierKey): A list
|
||||
* of locked keys.
|
||||
*/
|
||||
GList *
|
||||
@ -842,3 +805,117 @@ eek_keyboard_get_locked_keys (EekKeyboard *keyboard)
|
||||
g_return_val_if_fail (EEK_IS_KEYBOARD(keyboard), NULL);
|
||||
return g_list_copy (keyboard->priv->locked_keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_keyboard_get_keymap:
|
||||
* @keyboard: an #EekKeyboard
|
||||
*
|
||||
* Get the keymap for the keyboard.
|
||||
* Returns: a string containing the XKB keymap.
|
||||
*/
|
||||
gchar *
|
||||
eek_keyboard_get_keymap(EekKeyboard *keyboard)
|
||||
{
|
||||
/* Start the keycodes and symbols sections with their respective headers. */
|
||||
gchar *keycodes = g_strdup(keymap_keycodes_header);
|
||||
gchar *symbols = g_strdup(keymap_symbols_header);
|
||||
|
||||
/* Iterate over the keys in the name-to-key hash table. */
|
||||
GHashTableIter iter;
|
||||
gpointer key_name, key_ptr;
|
||||
g_hash_table_iter_init(&iter, keyboard->priv->names);
|
||||
|
||||
while (g_hash_table_iter_next(&iter, &key_name, &key_ptr)) {
|
||||
|
||||
gchar *current, *line;
|
||||
EekKey *key = EEK_KEY(key_ptr);
|
||||
int keycode = eek_key_get_keycode(key);
|
||||
|
||||
/* Don't include invalid keycodes in the keymap. */
|
||||
if (keycode == EEK_INVALID_KEYCODE)
|
||||
continue;
|
||||
|
||||
/* Append a key name-to-keycode definition to the keycodes section. */
|
||||
current = keycodes;
|
||||
line = g_strdup_printf(" <%s> = %i;\n", (char *)key_name, keycode);
|
||||
|
||||
keycodes = g_strconcat(current, line, NULL);
|
||||
g_free(line);
|
||||
g_free(current);
|
||||
|
||||
/* Find the symbols associated with the key. */
|
||||
EekSymbolMatrix *matrix = eek_key_get_symbol_matrix(key);
|
||||
EekSymbol *syms[4];
|
||||
int i, j;
|
||||
|
||||
/* Get the symbols for all the levels defined for the key, then
|
||||
pad it out with the first symbol for all levels up to the fourth. */
|
||||
for (i = 0; (i < matrix->num_levels) && (i < 4); ++i)
|
||||
syms[i] = eek_symbol_matrix_get_symbol(matrix, 0, i);
|
||||
|
||||
while (i < 4) {
|
||||
syms[i] = eek_symbol_matrix_get_symbol(matrix, 0, 0);
|
||||
i++;
|
||||
}
|
||||
|
||||
/* The four levels are split into two groups in the keymap.
|
||||
Generate strings for each of these groups, where an empty group is
|
||||
treated specially. */
|
||||
|
||||
gchar *groups[2] = {NULL, NULL};
|
||||
for (i = 0, j = 0; i < 2; ++i, j += 2) {
|
||||
if (syms[j] && syms[j + 1])
|
||||
groups[i] = g_strjoin(", ", eek_symbol_get_name(syms[j]),
|
||||
eek_symbol_get_name(syms[j + 1]),
|
||||
NULL);
|
||||
}
|
||||
|
||||
/* Append a key definition to the symbols section. */
|
||||
current = symbols;
|
||||
line = g_strdup_printf(" key <%s> { [ %s ], [ %s ] };\n",
|
||||
(char *)key_name, groups[0], groups[1]);
|
||||
|
||||
g_free(groups[0]);
|
||||
g_free(groups[1]);
|
||||
|
||||
symbols = g_strconcat(current, line, NULL);
|
||||
g_free(line);
|
||||
g_free(current);
|
||||
}
|
||||
|
||||
/* Assemble the keymap file from the header, sections and footer. */
|
||||
gchar *keymap = g_strconcat(keymap_header,
|
||||
keycodes, " };\n\n",
|
||||
symbols, " };\n\n",
|
||||
keymap_footer, NULL);
|
||||
|
||||
g_free(keycodes);
|
||||
g_free(symbols);
|
||||
return keymap;
|
||||
}
|
||||
|
||||
void
|
||||
eek_keyboard_register_symbol (EekKeyboard *keyboard,
|
||||
EekSymbol *symbol,
|
||||
EekKey *key,
|
||||
guint level)
|
||||
{
|
||||
const gchar *label = eek_symbol_get_label(symbol);
|
||||
|
||||
if (label) {
|
||||
EekKeyPress *key_press = g_malloc0 (sizeof(EekKeyPress));
|
||||
key_press->key = key;
|
||||
key_press->level = level;
|
||||
|
||||
g_hash_table_insert (keyboard->priv->character_map,
|
||||
(gpointer)label,
|
||||
key_press);
|
||||
}
|
||||
}
|
||||
|
||||
EekKeyPress *
|
||||
eek_keyboard_get_key_press (EekKeyboard *keyboard,
|
||||
gchar *ch)
|
||||
{
|
||||
return g_hash_table_lookup (keyboard->priv->character_map, ch);
|
||||
}
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
#define EEK_KEYBOARD_H 1
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
#include "eek-container.h"
|
||||
#include "eek-types.h"
|
||||
#include "eek-layout.h"
|
||||
@ -45,6 +46,10 @@ typedef struct _EekKeyboardPrivate EekKeyboardPrivate;
|
||||
/**
|
||||
* EekKeyboard:
|
||||
*
|
||||
* Contains the state of the physical keyboard.
|
||||
*
|
||||
* Is also a graphical element...
|
||||
*
|
||||
* The #EekKeyboard structure contains only private data and should
|
||||
* only be accessed using the provided API.
|
||||
*/
|
||||
@ -54,13 +59,19 @@ struct _EekKeyboard
|
||||
EekContainer parent;
|
||||
|
||||
EekKeyboardPrivate *priv;
|
||||
struct xkb_keymap *keymap;
|
||||
int keymap_fd; // keymap formatted as XKB string
|
||||
size_t keymap_len; // length of the data inside keymap_fd
|
||||
double scale;
|
||||
|
||||
EekboardContextService *manager; // unowned reference
|
||||
};
|
||||
|
||||
/**
|
||||
* EekKeyboardClass:
|
||||
* @create_section: virtual function for creating a section
|
||||
* @find_key_by_keycode: virtual function for finding a key in the
|
||||
* keyboard by keycode
|
||||
* @find_key_by_name: virtual function for finding a key in the
|
||||
* keyboard by name
|
||||
* @key_pressed: class handler for #EekKeyboard::key-pressed signal
|
||||
* @key_released: class handler for #EekKeyboard::key-released signal
|
||||
* @key_locked: class handler for #EekKeyboard::key-locked signal
|
||||
@ -79,14 +90,8 @@ struct _EekKeyboardClass
|
||||
/*< public >*/
|
||||
EekSection *(* create_section) (EekKeyboard *self);
|
||||
|
||||
EekKey *(* find_key_by_keycode) (EekKeyboard *self,
|
||||
guint keycode);
|
||||
|
||||
/* signals */
|
||||
void (* key_pressed) (EekKeyboard *self,
|
||||
EekKey *key);
|
||||
void (* key_released) (EekKeyboard *self,
|
||||
EekKey *key);
|
||||
EekKey *(* find_key_by_name) (EekKeyboard *self,
|
||||
const gchar *name);
|
||||
|
||||
/*< private >*/
|
||||
/* obsolete members moved to EekElement */
|
||||
@ -98,8 +103,6 @@ struct _EekKeyboardClass
|
||||
EekKey *key);
|
||||
void (* key_unlocked) (EekKeyboard *self,
|
||||
EekKey *key);
|
||||
void (* key_cancelled) (EekKeyboard *self,
|
||||
EekKey *key);
|
||||
|
||||
/*< private >*/
|
||||
/* padding */
|
||||
@ -121,12 +124,18 @@ struct _EekModifierKey {
|
||||
};
|
||||
typedef struct _EekModifierKey EekModifierKey;
|
||||
|
||||
GType eek_keyboard_get_type
|
||||
(void) G_GNUC_CONST;
|
||||
struct _EekKeyPress {
|
||||
EekKey *key;
|
||||
guint level;
|
||||
};
|
||||
typedef struct _EekKeyPress EekKeyPress;
|
||||
|
||||
EekKeyboard *eek_keyboard_new (EekLayout *layout,
|
||||
EekKeyboard *eek_keyboard_new (EekboardContextService *manager,
|
||||
EekLayout *layout,
|
||||
gdouble initial_width,
|
||||
gdouble initial_height);
|
||||
GType eek_keyboard_get_type
|
||||
(void) G_GNUC_CONST;
|
||||
EekLayout *eek_keyboard_get_layout
|
||||
(EekKeyboard *keyboard);
|
||||
void eek_keyboard_get_size
|
||||
@ -152,9 +161,9 @@ EekModifierType eek_keyboard_get_modifiers
|
||||
EekSection *eek_keyboard_create_section
|
||||
(EekKeyboard *keyboard);
|
||||
|
||||
EekKey *eek_keyboard_find_key_by_keycode
|
||||
EekKey *eek_keyboard_find_key_by_name
|
||||
(EekKeyboard *keyboard,
|
||||
guint keycode);
|
||||
const gchar *name);
|
||||
|
||||
guint eek_keyboard_add_outline
|
||||
(EekKeyboard *keyboard,
|
||||
@ -188,5 +197,21 @@ EekModifierKey *eek_modifier_key_copy
|
||||
void eek_modifier_key_free
|
||||
(EekModifierKey *modkey);
|
||||
|
||||
void eek_keyboard_press_key(EekKeyboard *keyboard, EekKey *key, guint32 timestamp);
|
||||
void eek_keyboard_release_key(EekKeyboard *keyboard, EekKey *key, guint32 timestamp);
|
||||
|
||||
gchar * eek_keyboard_get_keymap
|
||||
(EekKeyboard *keyboard);
|
||||
|
||||
void eek_keyboard_register_symbol
|
||||
(EekKeyboard *keyboard,
|
||||
EekSymbol *symbol,
|
||||
EekKey *key,
|
||||
guint level);
|
||||
|
||||
EekKeyPress * eek_keyboard_get_key_press
|
||||
(EekKeyboard *keyboard,
|
||||
gchar *ch);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEK_KEYBOARD_H */
|
||||
|
||||
126
eek/eek-keysym.c
@ -23,9 +23,7 @@
|
||||
* @short_description: an #EekSymbol represents an X keysym
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@ -50,14 +48,9 @@
|
||||
#define EEK_KEYSYM_Hyper_L 0xffed
|
||||
#define EEK_KEYSYM_Hyper_R 0xffee
|
||||
|
||||
struct _EekKeysymPrivate {
|
||||
guint xkeysym;
|
||||
};
|
||||
|
||||
struct _EekKeysymEntry {
|
||||
guint xkeysym;
|
||||
const gchar *name;
|
||||
EekSymbolCategory category;
|
||||
};
|
||||
|
||||
typedef struct _EekKeysymEntry EekKeysymEntry;
|
||||
@ -66,53 +59,6 @@ typedef struct _EekKeysymEntry EekKeysymEntry;
|
||||
#include "eek-unicode-keysym-entries.h"
|
||||
#include "eek-xkeysym-keysym-entries.h"
|
||||
|
||||
static void eek_serializable_iface_init (EekSerializableIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (EekKeysym, eek_keysym, EEK_TYPE_SYMBOL,
|
||||
G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
|
||||
eek_serializable_iface_init));
|
||||
|
||||
#define EEK_KEYSYM_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_KEYSYM, EekKeysymPrivate))
|
||||
|
||||
static EekSerializableIface *eek_keysym_parent_serializable_iface;
|
||||
|
||||
static void
|
||||
eek_keysym_real_serialize (EekSerializable *self,
|
||||
GVariantBuilder *builder)
|
||||
{
|
||||
EekKeysymPrivate *priv = EEK_KEYSYM_GET_PRIVATE(self);
|
||||
|
||||
eek_keysym_parent_serializable_iface->serialize (self, builder);
|
||||
|
||||
g_variant_builder_add (builder, "u", priv->xkeysym);
|
||||
}
|
||||
|
||||
static gsize
|
||||
eek_keysym_real_deserialize (EekSerializable *self,
|
||||
GVariant *variant,
|
||||
gsize index)
|
||||
{
|
||||
EekKeysymPrivate *priv = EEK_KEYSYM_GET_PRIVATE(self);
|
||||
|
||||
index = eek_keysym_parent_serializable_iface->deserialize (self,
|
||||
variant,
|
||||
index);
|
||||
|
||||
g_variant_get_child (variant, index++, "u", &priv->xkeysym);
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_serializable_iface_init (EekSerializableIface *iface)
|
||||
{
|
||||
eek_keysym_parent_serializable_iface =
|
||||
g_type_interface_peek_parent (iface);
|
||||
|
||||
iface->serialize = eek_keysym_real_serialize;
|
||||
iface->deserialize = eek_keysym_real_deserialize;
|
||||
}
|
||||
|
||||
static gchar *
|
||||
unichar_to_utf8 (gunichar uc)
|
||||
@ -177,7 +123,7 @@ get_modifier_mask (guint xkeysym)
|
||||
case EEK_KEYSYM_Shift_Lock:
|
||||
return EEK_SHIFT_MASK;
|
||||
case EEK_KEYSYM_ISO_Level3_Shift:
|
||||
return EEK_MOD5_MASK;
|
||||
return EEK_BUTTON1_MASK;
|
||||
case EEK_KEYSYM_Control_L:
|
||||
case EEK_KEYSYM_Control_R:
|
||||
return EEK_CONTROL_MASK;
|
||||
@ -197,20 +143,6 @@ get_modifier_mask (guint xkeysym)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_keysym_class_init (EekKeysymClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
g_type_class_add_private (gobject_class, sizeof (EekKeysymPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
eek_keysym_init (EekKeysym *self)
|
||||
{
|
||||
self->priv = EEK_KEYSYM_GET_PRIVATE(self);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_keysym_new_with_modifier:
|
||||
* @xkeysym: an X keysym value
|
||||
@ -219,16 +151,12 @@ eek_keysym_init (EekKeysym *self)
|
||||
* Create an #EekKeysym with given X keysym value @xkeysym and
|
||||
* modifier @modifier_mask.
|
||||
*/
|
||||
EekKeysym *
|
||||
eek_keysym_new_with_modifier (guint xkeysym,
|
||||
EekModifierType modifier_mask)
|
||||
EekSymbol *eek_keysym_new_with_modifier(guint xkeysym,
|
||||
EekModifierType modifier_mask)
|
||||
{
|
||||
EekKeysym *keysym;
|
||||
EekKeysymPrivate *priv;
|
||||
EekKeysymEntry *special_entry, *xkeysym_entry, *unicode_entry,
|
||||
*unichar_entry;
|
||||
gchar *name, *label;
|
||||
EekSymbolCategory category;
|
||||
gunichar uc;
|
||||
|
||||
special_entry =
|
||||
@ -248,23 +176,17 @@ eek_keysym_new_with_modifier (guint xkeysym,
|
||||
unichar_entry = g_slice_new (EekKeysymEntry);
|
||||
unichar_entry->xkeysym = xkeysym;
|
||||
unichar_entry->name = unichar_to_utf8 (uc);
|
||||
unichar_entry->category = EEK_SYMBOL_CATEGORY_LETTER;
|
||||
}
|
||||
|
||||
/* name and category */
|
||||
name = NULL;
|
||||
if (xkeysym_entry) {
|
||||
name = g_strdup (xkeysym_entry->name);
|
||||
category = xkeysym_entry->category;
|
||||
} else if (unichar_entry) {
|
||||
name = g_strdup (unichar_entry->name);
|
||||
category = unichar_entry->category;
|
||||
} else if (unicode_entry) {
|
||||
name = g_strdup (unicode_entry->name);
|
||||
category = unicode_entry->category;
|
||||
} else {
|
||||
name = g_strdup ("");
|
||||
category = EEK_SYMBOL_CATEGORY_UNKNOWN;
|
||||
}
|
||||
|
||||
/* label */
|
||||
@ -277,12 +199,10 @@ eek_keysym_new_with_modifier (guint xkeysym,
|
||||
else
|
||||
label = g_strdup (name);
|
||||
|
||||
keysym = g_object_new (EEK_TYPE_KEYSYM,
|
||||
"name", name,
|
||||
"label", label,
|
||||
"category", category,
|
||||
"modifier-mask", modifier_mask,
|
||||
NULL);
|
||||
EekSymbol *keysym = eek_symbol_new(name);
|
||||
eek_symbol_set_label(keysym, label);
|
||||
eek_symbol_set_modifier_mask(keysym, modifier_mask);
|
||||
|
||||
g_free (name);
|
||||
g_free (label);
|
||||
|
||||
@ -291,8 +211,7 @@ eek_keysym_new_with_modifier (guint xkeysym,
|
||||
g_slice_free (EekKeysymEntry, unichar_entry);
|
||||
}
|
||||
|
||||
priv = EEK_KEYSYM_GET_PRIVATE(keysym);
|
||||
priv->xkeysym = xkeysym;
|
||||
keysym->xkeysym = xkeysym;
|
||||
|
||||
return keysym;
|
||||
}
|
||||
@ -303,7 +222,7 @@ eek_keysym_new_with_modifier (guint xkeysym,
|
||||
*
|
||||
* Create an #EekKeysym with given X keysym value @xkeysym.
|
||||
*/
|
||||
EekKeysym *
|
||||
EekSymbol*
|
||||
eek_keysym_new (guint xkeysym)
|
||||
{
|
||||
return eek_keysym_new_with_modifier (xkeysym, get_modifier_mask (xkeysym));
|
||||
@ -315,22 +234,16 @@ eek_keysym_new (guint xkeysym)
|
||||
*
|
||||
* Create an #EekKeysym with an X keysym value looked up by @name.
|
||||
*/
|
||||
EekKeysym *
|
||||
EekSymbol*
|
||||
eek_keysym_new_from_name (const gchar *name)
|
||||
{
|
||||
gint i;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS(xkeysym_keysym_entries); i++)
|
||||
for (uint i = 0; i < G_N_ELEMENTS(xkeysym_keysym_entries); i++)
|
||||
if (g_strcmp0 (xkeysym_keysym_entries[i].name, name) == 0)
|
||||
return eek_keysym_new (xkeysym_keysym_entries[i].xkeysym);
|
||||
|
||||
// g_warning ("can't find keysym entry for %s", name);
|
||||
return g_object_new (EEK_TYPE_KEYSYM,
|
||||
"name", name,
|
||||
"label", name,
|
||||
"category", EEK_SYMBOL_CATEGORY_UNKNOWN,
|
||||
"modifier-mask", 0,
|
||||
NULL);
|
||||
EekSymbol *ret = eek_symbol_new(name);
|
||||
eek_symbol_set_label(ret, name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -340,11 +253,10 @@ eek_keysym_new_from_name (const gchar *name)
|
||||
* Get an X keysym value associated with @keysym
|
||||
*/
|
||||
guint
|
||||
eek_keysym_get_xkeysym (EekKeysym *keysym)
|
||||
eek_keysym_get_xkeysym (EekSymbol *keysym)
|
||||
{
|
||||
EekKeysymPrivate *priv;
|
||||
|
||||
g_assert (EEK_IS_KEYSYM(keysym));
|
||||
priv = EEK_KEYSYM_GET_PRIVATE(keysym);
|
||||
return priv->xkeysym;
|
||||
if (keysym->xkeysym == 0) {
|
||||
g_warning("Symbol %s was expected to have a valid keysym", keysym->name);
|
||||
}
|
||||
return keysym->xkeysym;
|
||||
}
|
||||
|
||||
@ -37,40 +37,11 @@ G_BEGIN_DECLS
|
||||
*/
|
||||
#define EEK_INVALID_KEYSYM (0)
|
||||
|
||||
#define EEK_TYPE_KEYSYM (eek_keysym_get_type())
|
||||
#define EEK_KEYSYM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_KEYSYM, EekKeysym))
|
||||
#define EEK_KEYSYM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_KEYSYM, EekKeysymClass))
|
||||
#define EEK_IS_KEYSYM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_KEYSYM))
|
||||
#define EEK_IS_KEYSYM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_KEYSYM))
|
||||
#define EEK_KEYSYM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_KEYSYM, EekKeysymClass))
|
||||
EekSymbol *eek_keysym_new (guint xkeysym);
|
||||
guint eek_keysym_get_xkeysym (EekSymbol *keysym);
|
||||
|
||||
typedef struct _EekKeysymClass EekKeysymClass;
|
||||
typedef struct _EekKeysymPrivate EekKeysymPrivate;
|
||||
|
||||
/**
|
||||
* EekKeysym:
|
||||
*
|
||||
* The #EekKeysym structure contains only private data and should only
|
||||
* be accessed using the provided API.
|
||||
*/
|
||||
struct _EekKeysym {
|
||||
/*< private >*/
|
||||
EekSymbol parent;
|
||||
|
||||
EekKeysymPrivate *priv;
|
||||
};
|
||||
|
||||
struct _EekKeysymClass {
|
||||
/*< private >*/
|
||||
EekSymbolClass parent_class;
|
||||
};
|
||||
|
||||
GType eek_keysym_get_type (void) G_GNUC_CONST;
|
||||
EekKeysym *eek_keysym_new (guint xkeysym);
|
||||
guint eek_keysym_get_xkeysym (EekKeysym *keysym);
|
||||
|
||||
EekKeysym *eek_keysym_new_from_name (const gchar *name);
|
||||
EekKeysym *eek_keysym_new_with_modifier (guint xkeysym,
|
||||
EekSymbol *eek_keysym_new_from_name (const gchar *name);
|
||||
EekSymbol *eek_keysym_new_with_modifier (guint xkeysym,
|
||||
EekModifierType modifier_mask);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@ -26,14 +26,13 @@
|
||||
* arranges keyboard elements.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include "eek-layout.h"
|
||||
#include "eek-keyboard.h"
|
||||
#include "eekboard/eekboard-context-service.h"
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (EekLayout, eek_layout, G_TYPE_OBJECT);
|
||||
G_DEFINE_ABSTRACT_TYPE (EekLayout, eek_layout, G_TYPE_OBJECT)
|
||||
|
||||
static void
|
||||
eek_layout_class_init (EekLayoutClass *klass)
|
||||
@ -55,14 +54,83 @@ eek_layout_init (EekLayout *self)
|
||||
* Create a new #EekKeyboard based on @layout.
|
||||
*/
|
||||
EekKeyboard *
|
||||
eek_keyboard_new (EekLayout *layout,
|
||||
eek_keyboard_new (EekboardContextService *manager,
|
||||
EekLayout *layout,
|
||||
gdouble initial_width,
|
||||
gdouble initial_height)
|
||||
{
|
||||
g_assert (EEK_IS_LAYOUT(layout));
|
||||
g_assert (EEK_LAYOUT_GET_CLASS(layout)->create_keyboard);
|
||||
|
||||
return EEK_LAYOUT_GET_CLASS(layout)->create_keyboard (layout,
|
||||
return EEK_LAYOUT_GET_CLASS(layout)->create_keyboard (manager,
|
||||
layout,
|
||||
initial_width,
|
||||
initial_height);
|
||||
}
|
||||
|
||||
const double section_spacing = 7.0;
|
||||
|
||||
struct place_data {
|
||||
double desired_width;
|
||||
double current_offset;
|
||||
EekKeyboard *keyboard;
|
||||
};
|
||||
|
||||
static void
|
||||
section_placer(EekElement *element, gpointer user_data)
|
||||
{
|
||||
struct place_data *data = (struct place_data*)user_data;
|
||||
|
||||
EekBounds section_bounds = {0};
|
||||
eek_element_get_bounds(element, §ion_bounds);
|
||||
section_bounds.width = data->desired_width;
|
||||
eek_element_set_bounds(element, §ion_bounds);
|
||||
|
||||
// Sections are rows now. Gather up all the keys and adjust their bounds.
|
||||
eek_section_place_keys(EEK_SECTION(element), EEK_KEYBOARD(data->keyboard));
|
||||
|
||||
eek_element_get_bounds(element, §ion_bounds);
|
||||
section_bounds.y = data->current_offset;
|
||||
eek_element_set_bounds(element, §ion_bounds);
|
||||
data->current_offset += section_bounds.height + section_spacing;
|
||||
}
|
||||
|
||||
static void
|
||||
section_counter(EekElement *element, gpointer user_data) {
|
||||
|
||||
double *total_height = user_data;
|
||||
EekBounds section_bounds = {0};
|
||||
eek_element_get_bounds(element, §ion_bounds);
|
||||
*total_height += section_bounds.height + section_spacing;
|
||||
}
|
||||
|
||||
void
|
||||
eek_layout_place_sections(EekKeyboard *keyboard)
|
||||
{
|
||||
/* Order rows */
|
||||
// This needs to be done after outlines, because outlines define key sizes
|
||||
// TODO: do this only for rows without bounds
|
||||
|
||||
// The keyboard width is given by the user via screen size. The height will be given dynamically.
|
||||
// TODO: calculate max line width beforehand for button centering. Leave keyboard centering to the renderer later
|
||||
EekBounds keyboard_bounds = {0};
|
||||
eek_element_get_bounds(EEK_ELEMENT(keyboard), &keyboard_bounds);
|
||||
|
||||
struct place_data placer_data = {
|
||||
.desired_width = keyboard_bounds.width,
|
||||
.current_offset = 0,
|
||||
.keyboard = keyboard,
|
||||
};
|
||||
eek_container_foreach_child(EEK_CONTAINER(keyboard), section_placer, &placer_data);
|
||||
|
||||
double total_height = 0;
|
||||
eek_container_foreach_child(EEK_CONTAINER(keyboard), section_counter, &total_height);
|
||||
keyboard_bounds.height = total_height;
|
||||
eek_element_set_bounds(EEK_ELEMENT(keyboard), &keyboard_bounds);
|
||||
}
|
||||
|
||||
void
|
||||
eek_layout_update_layout(EekKeyboard *keyboard)
|
||||
{
|
||||
eek_layout_place_sections(keyboard);
|
||||
}
|
||||
|
||||
@ -31,20 +31,7 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define EEK_TYPE_LAYOUT (eek_layout_get_type())
|
||||
#define EEK_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_LAYOUT, EekLayout))
|
||||
#define EEK_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_LAYOUT, EekLayoutClass))
|
||||
#define EEK_IS_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_LAYOUT))
|
||||
#define EEK_IS_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_LAYOUT))
|
||||
#define EEK_LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_LAYOUT, EekLayoutClass))
|
||||
|
||||
typedef struct _EekLayoutClass EekLayoutClass;
|
||||
typedef struct _EekLayout EekLayout;
|
||||
|
||||
struct _EekLayout
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent;
|
||||
};
|
||||
G_DECLARE_DERIVABLE_TYPE (EekLayout, eek_layout, EEK, LAYOUT, GObject)
|
||||
|
||||
/**
|
||||
* EekLayoutClass:
|
||||
@ -56,7 +43,8 @@ struct _EekLayoutClass
|
||||
GObjectClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
EekKeyboard* (* create_keyboard) (EekLayout *self,
|
||||
EekKeyboard* (* create_keyboard) (EekboardContextService *manager,
|
||||
EekLayout *self,
|
||||
gdouble initial_width,
|
||||
gdouble initial_height);
|
||||
|
||||
@ -67,5 +55,9 @@ struct _EekLayoutClass
|
||||
|
||||
GType eek_layout_get_type (void) G_GNUC_CONST;
|
||||
|
||||
void eek_layout_place_sections(EekKeyboard *keyboard);
|
||||
|
||||
void eek_layout_update_layout(EekKeyboard *keyboard);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEK_LAYOUT_H */
|
||||
|
||||
@ -25,36 +25,16 @@
|
||||
#include "eek-keyboard.h"
|
||||
#include "eek-keysym.h"
|
||||
#include "eek-types.h"
|
||||
#include "eek-theme.h"
|
||||
#include "eek-theme-context.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define EEK_TYPE_RENDERER (eek_renderer_get_type())
|
||||
#define EEK_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_RENDERER, EekRenderer))
|
||||
#define EEK_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_RENDERER, EekRendererClass))
|
||||
#define EEK_IS_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_RENDERER))
|
||||
#define EEK_IS_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_RENDERER))
|
||||
#define EEK_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_RENDERER, EekRendererClass))
|
||||
|
||||
typedef struct _EekRenderer EekRenderer;
|
||||
typedef struct _EekRendererClass EekRendererClass;
|
||||
typedef struct _EekRendererPrivate EekRendererPrivate;
|
||||
|
||||
struct _EekRenderer {
|
||||
GObject parent;
|
||||
|
||||
EekRendererPrivate *priv;
|
||||
};
|
||||
G_DECLARE_DERIVABLE_TYPE (EekRenderer, eek_renderer, EEK, RENDERER, GObject)
|
||||
|
||||
struct _EekRendererClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
void (* render_key_label) (EekRenderer *self,
|
||||
PangoLayout *layout,
|
||||
EekKey *key);
|
||||
|
||||
void (* render_key_outline) (EekRenderer *self,
|
||||
cairo_t *cr,
|
||||
EekKey *key,
|
||||
@ -72,7 +52,8 @@ struct _EekRendererClass
|
||||
|
||||
cairo_surface_t *(* get_icon_surface) (EekRenderer *self,
|
||||
const gchar *icon_name,
|
||||
gint size);
|
||||
gint size,
|
||||
gint scale);
|
||||
|
||||
/*< private >*/
|
||||
/* padding */
|
||||
@ -81,7 +62,8 @@ struct _EekRendererClass
|
||||
|
||||
GType eek_renderer_get_type (void) G_GNUC_CONST;
|
||||
EekRenderer *eek_renderer_new (EekKeyboard *keyboard,
|
||||
PangoContext *pcontext);
|
||||
PangoContext *pcontext,
|
||||
GtkStyleContext *scontext);
|
||||
void eek_renderer_set_allocation_size
|
||||
(EekRenderer *renderer,
|
||||
gdouble width,
|
||||
@ -95,6 +77,8 @@ void eek_renderer_get_key_bounds (EekRenderer *renderer,
|
||||
gboolean rotate);
|
||||
|
||||
gdouble eek_renderer_get_scale (EekRenderer *renderer);
|
||||
void eek_renderer_set_scale_factor (EekRenderer *renderer,
|
||||
gint scale);
|
||||
|
||||
PangoLayout *eek_renderer_create_pango_layout
|
||||
(EekRenderer *renderer);
|
||||
@ -117,7 +101,8 @@ void eek_renderer_render_key (EekRenderer *renderer,
|
||||
|
||||
cairo_surface_t *eek_renderer_get_icon_surface (EekRenderer *renderer,
|
||||
const gchar *icon_name,
|
||||
gint size);
|
||||
gint size,
|
||||
gint scale);
|
||||
|
||||
void eek_renderer_render_keyboard (EekRenderer *renderer,
|
||||
cairo_t *cr);
|
||||
@ -130,18 +115,8 @@ void eek_renderer_set_default_background_color
|
||||
const EekColor *color);
|
||||
void eek_renderer_get_foreground_color
|
||||
(EekRenderer *renderer,
|
||||
EekElement *element,
|
||||
GtkStyleContext *context,
|
||||
EekColor *color);
|
||||
void eek_renderer_get_background_color
|
||||
(EekRenderer *renderer,
|
||||
EekElement *element,
|
||||
EekColor *color);
|
||||
void eek_renderer_get_background_gradient
|
||||
(EekRenderer *renderer,
|
||||
EekElement *element,
|
||||
EekGradientType *type,
|
||||
EekColor *start,
|
||||
EekColor *end);
|
||||
void eek_renderer_set_border_width (EekRenderer *renderer,
|
||||
gdouble border_width);
|
||||
EekKey *eek_renderer_find_key_by_position
|
||||
@ -155,8 +130,5 @@ void eek_renderer_apply_transformation_for_key
|
||||
gdouble scale,
|
||||
gboolean rotate);
|
||||
|
||||
void eek_renderer_set_theme (EekRenderer *renderer,
|
||||
EekTheme *theme);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEK_RENDERER_H */
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
* Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
@ -27,9 +27,7 @@
|
||||
* of one or more keys of the #EekKeyClass class.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@ -45,21 +43,13 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
KEY_PRESSED,
|
||||
KEY_RELEASED,
|
||||
KEY_LOCKED,
|
||||
KEY_UNLOCKED,
|
||||
KEY_CANCELLED,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0, };
|
||||
|
||||
G_DEFINE_TYPE (EekSection, eek_section, EEK_TYPE_CONTAINER);
|
||||
|
||||
#define EEK_SECTION_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_SECTION, EekSectionPrivate))
|
||||
|
||||
struct _EekRow
|
||||
{
|
||||
gint num_columns;
|
||||
@ -68,19 +58,19 @@ struct _EekRow
|
||||
|
||||
typedef struct _EekRow EekRow;
|
||||
|
||||
struct _EekSectionPrivate
|
||||
typedef struct _EekSectionPrivate
|
||||
{
|
||||
gint angle;
|
||||
GSList *rows;
|
||||
EekRow row;
|
||||
EekModifierType modifiers;
|
||||
};
|
||||
} EekSectionPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (EekSection, eek_section, EEK_TYPE_CONTAINER)
|
||||
|
||||
static gint
|
||||
eek_section_real_get_n_rows (EekSection *self)
|
||||
{
|
||||
EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
|
||||
|
||||
return g_slist_length (priv->rows);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -88,13 +78,14 @@ eek_section_real_add_row (EekSection *self,
|
||||
gint num_columns,
|
||||
EekOrientation orientation)
|
||||
{
|
||||
EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
|
||||
EekRow *row;
|
||||
|
||||
EekSectionPrivate *priv = (EekSectionPrivate*)eek_section_get_instance_private (self);
|
||||
priv->row.num_columns = num_columns;
|
||||
priv->row.orientation = orientation;
|
||||
/*
|
||||
row = g_slice_new (EekRow);
|
||||
row->num_columns = num_columns;
|
||||
row->orientation = orientation;
|
||||
priv->rows = g_slist_append (priv->rows, row);
|
||||
priv->rows = g_slist_append (priv->rows, row);*/
|
||||
}
|
||||
|
||||
static void
|
||||
@ -103,29 +94,14 @@ eek_section_real_get_row (EekSection *self,
|
||||
gint *num_columns,
|
||||
EekOrientation *orientation)
|
||||
{
|
||||
EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
|
||||
EekRow *row;
|
||||
|
||||
row = g_slist_nth_data (priv->rows, index);
|
||||
g_return_if_fail (row);
|
||||
if (num_columns)
|
||||
EekSectionPrivate *priv = (EekSectionPrivate*)eek_section_get_instance_private (self);
|
||||
EekRow *row = &priv->row;
|
||||
if (num_columns) {
|
||||
*num_columns = row->num_columns;
|
||||
if (orientation)
|
||||
}
|
||||
if (orientation) {
|
||||
*orientation = row->orientation;
|
||||
}
|
||||
|
||||
static void
|
||||
on_pressed (EekKey *key,
|
||||
EekSection *section)
|
||||
{
|
||||
g_signal_emit (section, signals[KEY_PRESSED], 0, key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_released (EekKey *key,
|
||||
EekSection *section)
|
||||
{
|
||||
g_signal_emit (section, signals[KEY_RELEASED], 0, key);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@ -142,33 +118,20 @@ on_unlocked (EekKey *key,
|
||||
g_signal_emit (section, signals[KEY_UNLOCKED], 0, key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_cancelled (EekKey *key,
|
||||
EekSection *section)
|
||||
{
|
||||
g_signal_emit (section, signals[KEY_CANCELLED], 0, key);
|
||||
}
|
||||
|
||||
static EekKey *
|
||||
eek_section_real_create_key (EekSection *self,
|
||||
guint keycode,
|
||||
gint column,
|
||||
gint row)
|
||||
const gchar *name,
|
||||
gint keycode)
|
||||
{
|
||||
EekKey *key;
|
||||
gint num_columns, num_rows;
|
||||
EekOrientation orientation;
|
||||
EekSectionPrivate *priv = (EekSectionPrivate*)eek_section_get_instance_private (self);
|
||||
|
||||
num_rows = eek_section_get_n_rows (self);
|
||||
g_return_val_if_fail (0 <= row && row < num_rows, NULL);
|
||||
eek_section_get_row (self, row, &num_columns, &orientation);
|
||||
g_return_val_if_fail (column < num_columns, NULL);
|
||||
EekRow *row = &priv->row;
|
||||
row->num_columns++;
|
||||
|
||||
key = g_object_new (EEK_TYPE_KEY,
|
||||
"keycode", keycode,
|
||||
"column", column,
|
||||
"row", row,
|
||||
NULL);
|
||||
EekKey *key = (EekKey*)g_object_new (EEK_TYPE_KEY,
|
||||
"name", name,
|
||||
"keycode", keycode,
|
||||
NULL);
|
||||
g_return_val_if_fail (key, NULL);
|
||||
|
||||
EEK_CONTAINER_GET_CLASS(self)->add_child (EEK_CONTAINER(self),
|
||||
@ -180,7 +143,7 @@ eek_section_real_create_key (EekSection *self,
|
||||
static void
|
||||
set_level_from_modifiers (EekSection *self)
|
||||
{
|
||||
EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
|
||||
EekSectionPrivate *priv = eek_section_get_instance_private (self);
|
||||
EekKeyboard *keyboard;
|
||||
EekModifierType num_lock_mask;
|
||||
gint level = -1;
|
||||
@ -195,7 +158,7 @@ set_level_from_modifiers (EekSection *self)
|
||||
static void
|
||||
eek_section_real_key_pressed (EekSection *self, EekKey *key)
|
||||
{
|
||||
EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
|
||||
EekSectionPrivate *priv = eek_section_get_instance_private (self);
|
||||
EekSymbol *symbol;
|
||||
EekKeyboard *keyboard;
|
||||
EekModifierBehavior behavior;
|
||||
@ -217,7 +180,7 @@ eek_section_real_key_pressed (EekSection *self, EekKey *key)
|
||||
static void
|
||||
eek_section_real_key_released (EekSection *self, EekKey *key)
|
||||
{
|
||||
EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
|
||||
EekSectionPrivate *priv = eek_section_get_instance_private (self);
|
||||
EekSymbol *symbol;
|
||||
EekKeyboard *keyboard;
|
||||
EekModifierBehavior behavior;
|
||||
@ -247,12 +210,8 @@ eek_section_real_key_released (EekSection *self, EekKey *key)
|
||||
static void
|
||||
eek_section_finalize (GObject *object)
|
||||
{
|
||||
EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(object);
|
||||
GSList *head;
|
||||
|
||||
for (head = priv->rows; head; head = g_slist_next (head))
|
||||
g_slice_free (EekRow, head->data);
|
||||
g_slist_free (priv->rows);
|
||||
EekSection *self = EEK_SECTION (object);
|
||||
EekSectionPrivate *priv = (EekSectionPrivate*)eek_section_get_instance_private (self);
|
||||
|
||||
G_OBJECT_CLASS (eek_section_parent_class)->finalize (object);
|
||||
}
|
||||
@ -294,22 +253,16 @@ static void
|
||||
eek_section_real_child_added (EekContainer *self,
|
||||
EekElement *element)
|
||||
{
|
||||
g_signal_connect (element, "pressed", G_CALLBACK(on_pressed), self);
|
||||
g_signal_connect (element, "released", G_CALLBACK(on_released), self);
|
||||
g_signal_connect (element, "locked", G_CALLBACK(on_locked), self);
|
||||
g_signal_connect (element, "unlocked", G_CALLBACK(on_unlocked), self);
|
||||
g_signal_connect (element, "cancelled", G_CALLBACK(on_cancelled), self);
|
||||
}
|
||||
|
||||
static void
|
||||
eek_section_real_child_removed (EekContainer *self,
|
||||
EekElement *element)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (element, on_pressed, self);
|
||||
g_signal_handlers_disconnect_by_func (element, on_released, self);
|
||||
g_signal_handlers_disconnect_by_func (element, on_locked, self);
|
||||
g_signal_handlers_disconnect_by_func (element, on_unlocked, self);
|
||||
g_signal_handlers_disconnect_by_func (element, on_cancelled, self);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -319,8 +272,6 @@ eek_section_class_init (EekSectionClass *klass)
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
GParamSpec *pspec;
|
||||
|
||||
g_type_class_add_private (gobject_class, sizeof (EekSectionPrivate));
|
||||
|
||||
klass->get_n_rows = eek_section_real_get_n_rows;
|
||||
klass->add_row = eek_section_real_add_row;
|
||||
klass->get_row = eek_section_real_get_row;
|
||||
@ -351,46 +302,6 @@ eek_section_class_init (EekSectionClass *klass)
|
||||
PROP_ANGLE,
|
||||
pspec);
|
||||
|
||||
/**
|
||||
* EekSection::key-pressed:
|
||||
* @section: an #EekSection
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::key-pressed signal is emitted each time a key in @section
|
||||
* is shifted to the pressed state.
|
||||
*/
|
||||
signals[KEY_PRESSED] =
|
||||
g_signal_new (I_("key-pressed"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(EekSectionClass, key_pressed),
|
||||
NULL,
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
EEK_TYPE_KEY);
|
||||
|
||||
/**
|
||||
* EekSection::key-released:
|
||||
* @section: an #EekSection
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::key-released signal is emitted each time a key in @section
|
||||
* is shifted to the released state.
|
||||
*/
|
||||
signals[KEY_RELEASED] =
|
||||
g_signal_new (I_("key-released"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(EekSectionClass, key_released),
|
||||
NULL,
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
EEK_TYPE_KEY);
|
||||
|
||||
/**
|
||||
* EekSection::key-locked:
|
||||
* @section: an #EekSection
|
||||
@ -430,32 +341,12 @@ eek_section_class_init (EekSectionClass *klass)
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
EEK_TYPE_KEY);
|
||||
|
||||
/**
|
||||
* EekSection::key-cancelled:
|
||||
* @section: an #EekSection
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::key-cancelled signal is emitted each time a key in @section
|
||||
* is shifted to the cancelled state.
|
||||
*/
|
||||
signals[KEY_CANCELLED] =
|
||||
g_signal_new (I_("key-cancelled"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(EekSectionClass, key_cancelled),
|
||||
NULL,
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
EEK_TYPE_KEY);
|
||||
}
|
||||
|
||||
static void
|
||||
eek_section_init (EekSection *self)
|
||||
{
|
||||
self->priv = EEK_SECTION_GET_PRIVATE (self);
|
||||
/* void */
|
||||
}
|
||||
|
||||
/**
|
||||
@ -470,8 +361,11 @@ eek_section_set_angle (EekSection *section,
|
||||
gint angle)
|
||||
{
|
||||
g_return_if_fail (EEK_IS_SECTION(section));
|
||||
if (section->priv->angle != angle) {
|
||||
section->priv->angle = angle;
|
||||
|
||||
EekSectionPrivate *priv = eek_section_get_instance_private (section);
|
||||
|
||||
if (priv->angle != angle) {
|
||||
priv->angle = angle;
|
||||
g_object_notify (G_OBJECT(section), "angle");
|
||||
}
|
||||
}
|
||||
@ -486,7 +380,10 @@ gint
|
||||
eek_section_get_angle (EekSection *section)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_SECTION(section), -1);
|
||||
return section->priv->angle;
|
||||
|
||||
EekSectionPrivate *priv = eek_section_get_instance_private (section);
|
||||
|
||||
return priv->angle;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -547,6 +444,7 @@ eek_section_get_row (EekSection *section,
|
||||
/**
|
||||
* eek_section_create_key:
|
||||
* @section: an #EekSection
|
||||
* @name: a name
|
||||
* @keycode: a keycode
|
||||
* @column: the column index of the key
|
||||
* @row: the row index of the key
|
||||
@ -557,13 +455,109 @@ eek_section_get_row (EekSection *section,
|
||||
*/
|
||||
EekKey *
|
||||
eek_section_create_key (EekSection *section,
|
||||
guint keycode,
|
||||
gint column,
|
||||
gint row)
|
||||
const gchar *name,
|
||||
gint keycode)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_SECTION(section), NULL);
|
||||
return EEK_SECTION_GET_CLASS(section)->create_key (section,
|
||||
keycode,
|
||||
column,
|
||||
row);
|
||||
name,
|
||||
keycode);
|
||||
}
|
||||
|
||||
const double keyspacing = 4.0;
|
||||
|
||||
struct keys_info {
|
||||
uint count;
|
||||
double total_width;
|
||||
double biggest_height;
|
||||
};
|
||||
|
||||
static void
|
||||
keysizer(EekElement *element, gpointer user_data)
|
||||
{
|
||||
EekKey *key = EEK_KEY(element);
|
||||
|
||||
EekKeyboard *keyboard = EEK_KEYBOARD(user_data);
|
||||
uint oref = eek_key_get_oref (key);
|
||||
EekOutline *outline = eek_keyboard_get_outline (keyboard, oref);
|
||||
if (outline && outline->num_points > 0) {
|
||||
double minx = outline->points[0].x;
|
||||
double maxx = minx;
|
||||
double miny = outline->points[0].y;
|
||||
double maxy = miny;
|
||||
for (uint i = 1; i < outline->num_points; i++) {
|
||||
EekPoint p = outline->points[i];
|
||||
if (p.x < minx) {
|
||||
minx = p.x;
|
||||
} else if (p.x > maxx) {
|
||||
maxx = p.x;
|
||||
}
|
||||
|
||||
if (p.y < miny) {
|
||||
miny = p.y;
|
||||
} else if (p.y > maxy) {
|
||||
maxy = p.y;
|
||||
}
|
||||
}
|
||||
EekBounds key_bounds = {0};
|
||||
eek_element_get_bounds(element, &key_bounds);
|
||||
key_bounds.height = maxy - miny;
|
||||
key_bounds.width = maxx - minx;
|
||||
eek_element_set_bounds(element, &key_bounds);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
keycounter (EekElement *element, gpointer user_data)
|
||||
{
|
||||
EekKey *key = EEK_KEY(element);
|
||||
|
||||
/* Skip keys without labels for the current level. This causes those
|
||||
keys to be hidden in the visible layout. */
|
||||
if (!eek_key_has_label(key))
|
||||
return;
|
||||
|
||||
struct keys_info *data = user_data;
|
||||
data->count++;
|
||||
EekBounds key_bounds = {0};
|
||||
eek_element_get_bounds(element, &key_bounds);
|
||||
data->total_width += key_bounds.width;
|
||||
if (key_bounds.height > data->biggest_height) {
|
||||
data->biggest_height = key_bounds.height;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
keyplacer(EekElement *element, gpointer user_data)
|
||||
{
|
||||
EekKey *key = EEK_KEY(element);
|
||||
|
||||
/* Skip keys without labels for the current level. */
|
||||
if (!eek_key_has_label(key))
|
||||
return;
|
||||
|
||||
double *current_offset = user_data;
|
||||
EekBounds key_bounds = {0};
|
||||
eek_element_get_bounds(element, &key_bounds);
|
||||
key_bounds.x = *current_offset;
|
||||
key_bounds.y = 0;
|
||||
eek_element_set_bounds(element, &key_bounds);
|
||||
*current_offset += key_bounds.width + keyspacing;
|
||||
}
|
||||
|
||||
void
|
||||
eek_section_place_keys(EekSection *section, EekKeyboard *keyboard)
|
||||
{
|
||||
eek_container_foreach_child(EEK_CONTAINER(section), keysizer, keyboard);
|
||||
|
||||
struct keys_info keyinfo = {0};
|
||||
eek_container_foreach_child(EEK_CONTAINER(section), keycounter, &keyinfo);
|
||||
EekBounds section_bounds = {0};
|
||||
eek_element_get_bounds(EEK_ELEMENT(section), §ion_bounds);
|
||||
|
||||
double key_offset = (section_bounds.width - (keyinfo.total_width + (keyinfo.count - 1) * keyspacing)) / 2;
|
||||
eek_container_foreach_child(EEK_CONTAINER(section), keyplacer, &key_offset);
|
||||
|
||||
section_bounds.height = keyinfo.biggest_height;
|
||||
eek_element_set_bounds(EEK_ELEMENT(section), §ion_bounds);
|
||||
}
|
||||
|
||||
@ -32,28 +32,7 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define EEK_TYPE_SECTION (eek_section_get_type())
|
||||
#define EEK_SECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_SECTION, EekSection))
|
||||
#define EEK_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_SECTION, EekSectionClass))
|
||||
#define EEK_IS_SECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_SECTION))
|
||||
#define EEK_IS_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_SECTION))
|
||||
#define EEK_SECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_SECTION, EekSectionClass))
|
||||
|
||||
typedef struct _EekSectionClass EekSectionClass;
|
||||
typedef struct _EekSectionPrivate EekSectionPrivate;
|
||||
|
||||
/**
|
||||
* EekSection:
|
||||
*
|
||||
* The #EekSection structure contains only private data and should
|
||||
* only be accessed using the provided API.
|
||||
*/
|
||||
struct _EekSection
|
||||
{
|
||||
/*< private >*/
|
||||
EekContainer parent;
|
||||
|
||||
EekSectionPrivate *priv;
|
||||
};
|
||||
G_DECLARE_DERIVABLE_TYPE(EekSection, eek_section, EEK, SECTION, EekContainer)
|
||||
|
||||
/**
|
||||
* EekSectionClass:
|
||||
@ -83,9 +62,8 @@ struct _EekSectionClass
|
||||
EekOrientation *orientation);
|
||||
|
||||
EekKey *(* create_key) (EekSection *self,
|
||||
guint keycode,
|
||||
gint row,
|
||||
gint column);
|
||||
const gchar *name,
|
||||
gint keycode);
|
||||
|
||||
/* signals */
|
||||
void (* key_pressed) (EekSection *self,
|
||||
@ -120,12 +98,13 @@ void eek_section_get_row (EekSection *section,
|
||||
EekOrientation *orientation);
|
||||
|
||||
EekKey *eek_section_create_key (EekSection *section,
|
||||
guint keycode,
|
||||
gint column,
|
||||
gint row);
|
||||
const gchar *name,
|
||||
gint keycode);
|
||||
|
||||
EekKey *eek_section_find_key_by_keycode (EekSection *section,
|
||||
guint keycode);
|
||||
|
||||
void eek_section_place_keys (EekSection *section, EekKeyboard *keyboard);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEK_SECTION_H */
|
||||
|
||||
@ -27,9 +27,7 @@
|
||||
* method.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include "eek-serializable.h"
|
||||
|
||||
@ -38,10 +36,8 @@ eek_serializable_get_type (void)
|
||||
{
|
||||
static GType iface_type = 0;
|
||||
if (iface_type == 0) {
|
||||
static const GTypeInfo info = {
|
||||
sizeof (EekSerializableIface),
|
||||
NULL,
|
||||
NULL,
|
||||
static GTypeInfo info = {
|
||||
.class_size = sizeof (EekSerializableIface)
|
||||
};
|
||||
iface_type = g_type_register_static (G_TYPE_INTERFACE,
|
||||
"EekSerializable",
|
||||
|
||||
@ -36,24 +36,19 @@ EekSymbolMatrix *
|
||||
eek_symbol_matrix_copy (const EekSymbolMatrix *matrix)
|
||||
{
|
||||
EekSymbolMatrix *retval;
|
||||
gint i, num_symbols = matrix->num_groups * matrix->num_levels;
|
||||
guint num_symbols = matrix->num_groups * matrix->num_levels;
|
||||
|
||||
retval = g_slice_dup (EekSymbolMatrix, matrix);
|
||||
retval->data = g_slice_copy (sizeof (EekSymbol *) * num_symbols,
|
||||
matrix->data);
|
||||
for (i = 0; i < num_symbols; i++)
|
||||
if (retval->data[i])
|
||||
g_object_ref (retval->data[i]);
|
||||
// FIXME: do a deep copy over the data in EekSymbol
|
||||
return retval;
|
||||
}
|
||||
|
||||
void
|
||||
eek_symbol_matrix_free (EekSymbolMatrix *matrix)
|
||||
{
|
||||
gint i, num_symbols = matrix->num_groups * matrix->num_levels;
|
||||
for (i = 0; i < num_symbols; i++)
|
||||
if (matrix->data[i])
|
||||
g_object_unref (matrix->data[i]);
|
||||
guint num_symbols = matrix->num_groups * matrix->num_levels;
|
||||
g_slice_free1 (sizeof (EekSymbol *) * num_symbols, matrix->data);
|
||||
g_slice_free (EekSymbolMatrix, matrix);
|
||||
}
|
||||
@ -79,7 +74,6 @@ eek_symbol_matrix_set_symbol (EekSymbolMatrix *matrix,
|
||||
{
|
||||
g_return_if_fail (group >= 0 && group < matrix->num_groups);
|
||||
g_return_if_fail (level >= 0 && level < matrix->num_levels);
|
||||
g_return_if_fail (EEK_IS_SYMBOL(symbol));
|
||||
matrix->data[group * matrix->num_levels + level] = g_object_ref (symbol);
|
||||
}
|
||||
|
||||
|
||||
389
eek/eek-symbol.c
@ -25,257 +25,45 @@
|
||||
* The #EekSymbolClass class represents a symbol assigned to a key.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include "eek-symbol.h"
|
||||
#include "eek-serializable.h"
|
||||
#include "eek-enumtypes.h"
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_NAME,
|
||||
PROP_LABEL,
|
||||
PROP_CATEGORY,
|
||||
PROP_MODIFIER_MASK,
|
||||
PROP_ICON_NAME,
|
||||
PROP_LAST
|
||||
};
|
||||
|
||||
struct _EekSymbolPrivate {
|
||||
gchar *name;
|
||||
gchar *label;
|
||||
EekSymbolCategory category;
|
||||
EekModifierType modifier_mask;
|
||||
gchar *icon_name;
|
||||
};
|
||||
|
||||
static void eek_serializable_iface_init (EekSerializableIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (EekSymbol, eek_symbol, G_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
|
||||
eek_serializable_iface_init));
|
||||
|
||||
#define EEK_SYMBOL_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_SYMBOL, EekSymbolPrivate))
|
||||
|
||||
static void
|
||||
eek_symbol_real_serialize (EekSerializable *self,
|
||||
GVariantBuilder *builder)
|
||||
void
|
||||
eek_symbol_destroy (EekSymbol *priv)
|
||||
{
|
||||
EekSymbolPrivate *priv = EEK_SYMBOL_GET_PRIVATE(self);
|
||||
#define NOTNULL(s) ((s) != NULL ? (s) : "")
|
||||
g_variant_builder_add (builder, "s", NOTNULL(priv->name));
|
||||
g_variant_builder_add (builder, "s", NOTNULL(priv->label));
|
||||
g_variant_builder_add (builder, "u", priv->category);
|
||||
g_variant_builder_add (builder, "u", priv->modifier_mask);
|
||||
g_variant_builder_add (builder, "s", NOTNULL(priv->icon_name));
|
||||
#undef NOTNULL
|
||||
}
|
||||
|
||||
static gsize
|
||||
eek_symbol_real_deserialize (EekSerializable *self,
|
||||
GVariant *variant,
|
||||
gsize index)
|
||||
{
|
||||
EekSymbolPrivate *priv = EEK_SYMBOL_GET_PRIVATE(self);
|
||||
|
||||
g_variant_get_child (variant, index++, "s", &priv->name);
|
||||
g_variant_get_child (variant, index++, "s", &priv->label);
|
||||
g_variant_get_child (variant, index++, "u", &priv->category);
|
||||
g_variant_get_child (variant, index++, "u", &priv->modifier_mask);
|
||||
g_variant_get_child (variant, index++, "s", &priv->icon_name);
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_serializable_iface_init (EekSerializableIface *iface)
|
||||
{
|
||||
iface->serialize = eek_symbol_real_serialize;
|
||||
iface->deserialize = eek_symbol_real_deserialize;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_symbol_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
switch (prop_id) {
|
||||
case PROP_NAME:
|
||||
eek_symbol_set_name (EEK_SYMBOL(object), g_value_get_string (value));
|
||||
break;
|
||||
case PROP_LABEL:
|
||||
eek_symbol_set_label (EEK_SYMBOL(object), g_value_get_string (value));
|
||||
break;
|
||||
case PROP_CATEGORY:
|
||||
eek_symbol_set_category (EEK_SYMBOL(object), g_value_get_enum (value));
|
||||
break;
|
||||
case PROP_MODIFIER_MASK:
|
||||
eek_symbol_set_modifier_mask (EEK_SYMBOL(object),
|
||||
g_value_get_flags (value));
|
||||
break;
|
||||
case PROP_ICON_NAME:
|
||||
eek_symbol_set_icon_name (EEK_SYMBOL(object),
|
||||
g_value_get_string (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
eek_symbol_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
switch (prop_id) {
|
||||
case PROP_NAME:
|
||||
g_value_set_string (value, eek_symbol_get_name (EEK_SYMBOL(object)));
|
||||
break;
|
||||
case PROP_LABEL:
|
||||
g_value_set_string (value, eek_symbol_get_label (EEK_SYMBOL(object)));
|
||||
break;
|
||||
case PROP_CATEGORY:
|
||||
g_value_set_enum (value, eek_symbol_get_category (EEK_SYMBOL(object)));
|
||||
break;
|
||||
case PROP_MODIFIER_MASK:
|
||||
g_value_set_flags (value,
|
||||
eek_symbol_get_modifier_mask (EEK_SYMBOL(object)));
|
||||
break;
|
||||
case PROP_ICON_NAME:
|
||||
g_value_set_string (value,
|
||||
eek_symbol_get_icon_name (EEK_SYMBOL(object)));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
eek_symbol_finalize (GObject *object)
|
||||
{
|
||||
EekSymbolPrivate *priv = EEK_SYMBOL_GET_PRIVATE(object);
|
||||
|
||||
g_free (priv->name);
|
||||
g_free (priv->label);
|
||||
g_free (priv->icon_name);
|
||||
G_OBJECT_CLASS (eek_symbol_parent_class)->finalize (object);
|
||||
g_free (priv->tooltip);
|
||||
g_free(priv->text);
|
||||
g_free(priv);
|
||||
}
|
||||
|
||||
static void
|
||||
eek_symbol_class_init (EekSymbolClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
GParamSpec *pspec;
|
||||
|
||||
g_type_class_add_private (gobject_class, sizeof (EekSymbolPrivate));
|
||||
|
||||
gobject_class->set_property = eek_symbol_set_property;
|
||||
gobject_class->get_property = eek_symbol_get_property;
|
||||
gobject_class->finalize = eek_symbol_finalize;
|
||||
|
||||
pspec = g_param_spec_string ("name",
|
||||
"Name",
|
||||
"Canonical name of the symbol",
|
||||
NULL,
|
||||
G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
|
||||
g_object_class_install_property (gobject_class, PROP_NAME, pspec);
|
||||
|
||||
pspec = g_param_spec_string ("label",
|
||||
"Label",
|
||||
"Text used to display the symbol",
|
||||
NULL,
|
||||
G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
|
||||
g_object_class_install_property (gobject_class, PROP_LABEL, pspec);
|
||||
|
||||
pspec = g_param_spec_enum ("category",
|
||||
"Category",
|
||||
"Category of the symbol",
|
||||
EEK_TYPE_SYMBOL_CATEGORY,
|
||||
EEK_SYMBOL_CATEGORY_UNKNOWN,
|
||||
G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
|
||||
g_object_class_install_property (gobject_class, PROP_CATEGORY, pspec);
|
||||
|
||||
pspec = g_param_spec_flags ("modifier-mask",
|
||||
"Modifier mask",
|
||||
"Modifier mask of the symbol",
|
||||
EEK_TYPE_MODIFIER_TYPE,
|
||||
0,
|
||||
G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
|
||||
g_object_class_install_property (gobject_class, PROP_MODIFIER_MASK, pspec);
|
||||
|
||||
pspec = g_param_spec_string ("icon-name",
|
||||
"Icon name",
|
||||
"Icon name used to render the symbol",
|
||||
NULL,
|
||||
G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
|
||||
g_object_class_install_property (gobject_class, PROP_ICON_NAME, pspec);
|
||||
}
|
||||
|
||||
static void
|
||||
eek_symbol_init (EekSymbol *self)
|
||||
{
|
||||
EekSymbolPrivate *priv;
|
||||
|
||||
priv = self->priv = EEK_SYMBOL_GET_PRIVATE(self);
|
||||
priv->category = EEK_SYMBOL_CATEGORY_UNKNOWN;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_symbol_new:
|
||||
* @name: name of the symbol
|
||||
*
|
||||
* Create a new #EekSymbol with @name.
|
||||
*/
|
||||
EekSymbol *
|
||||
eek_symbol_new (const gchar *name)
|
||||
{
|
||||
return g_object_new (EEK_TYPE_SYMBOL, "name", name, NULL);
|
||||
EekSymbol *self = g_new0(EekSymbol, 1);
|
||||
eek_symbol_set_name(self, name);
|
||||
self->category = EEK_SYMBOL_CATEGORY_UNKNOWN;
|
||||
return self;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_symbol_set_name:
|
||||
* @symbol: an #EekSymbol
|
||||
* @name: name of the symbol
|
||||
*
|
||||
* Set the name of @symbol to @name.
|
||||
*/
|
||||
void
|
||||
eek_symbol_set_name (EekSymbol *symbol,
|
||||
const gchar *name)
|
||||
{
|
||||
EekSymbolPrivate *priv;
|
||||
|
||||
g_return_if_fail (EEK_IS_SYMBOL(symbol));
|
||||
|
||||
priv = EEK_SYMBOL_GET_PRIVATE(symbol);
|
||||
g_free (priv->name);
|
||||
priv->name = g_strdup (name);
|
||||
g_free (symbol->name);
|
||||
symbol->name = g_strdup (name);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_symbol_get_name:
|
||||
* @symbol: an #EekSymbol
|
||||
*
|
||||
* Get the name of @symbol.
|
||||
*/
|
||||
G_CONST_RETURN gchar *
|
||||
const gchar *
|
||||
eek_symbol_get_name (EekSymbol *symbol)
|
||||
{
|
||||
EekSymbolPrivate *priv;
|
||||
|
||||
g_return_val_if_fail (EEK_IS_SYMBOL(symbol), NULL);
|
||||
|
||||
priv = EEK_SYMBOL_GET_PRIVATE(symbol);
|
||||
if (priv->name == NULL || *priv->name == '\0')
|
||||
if (symbol->name == NULL || *symbol->name == '\0')
|
||||
return NULL;
|
||||
return priv->name;
|
||||
return symbol->name;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -289,13 +77,8 @@ void
|
||||
eek_symbol_set_label (EekSymbol *symbol,
|
||||
const gchar *label)
|
||||
{
|
||||
EekSymbolPrivate *priv;
|
||||
|
||||
g_return_if_fail (EEK_IS_SYMBOL(symbol));
|
||||
|
||||
priv = EEK_SYMBOL_GET_PRIVATE(symbol);
|
||||
g_free (priv->label);
|
||||
priv->label = g_strdup (label);
|
||||
g_free (symbol->label);
|
||||
symbol->label = g_strdup (label);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -304,53 +87,12 @@ eek_symbol_set_label (EekSymbol *symbol,
|
||||
*
|
||||
* Get the label text of @symbol.
|
||||
*/
|
||||
G_CONST_RETURN gchar *
|
||||
const gchar *
|
||||
eek_symbol_get_label (EekSymbol *symbol)
|
||||
{
|
||||
EekSymbolPrivate *priv;
|
||||
|
||||
g_return_val_if_fail (EEK_IS_SYMBOL(symbol), NULL);
|
||||
|
||||
priv = EEK_SYMBOL_GET_PRIVATE(symbol);
|
||||
if (priv->label == NULL || *priv->label == '\0')
|
||||
if (symbol->label == NULL || *symbol->label == '\0')
|
||||
return NULL;
|
||||
return priv->label;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_symbol_set_category:
|
||||
* @symbol: an #EekSymbol
|
||||
* @category: an #EekSymbolCategory
|
||||
*
|
||||
* Set symbol category of @symbol to @category.
|
||||
*/
|
||||
void
|
||||
eek_symbol_set_category (EekSymbol *symbol,
|
||||
EekSymbolCategory category)
|
||||
{
|
||||
EekSymbolPrivate *priv;
|
||||
|
||||
g_return_if_fail (EEK_IS_SYMBOL(symbol));
|
||||
|
||||
priv = EEK_SYMBOL_GET_PRIVATE(symbol);
|
||||
priv->category = category;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_symbol_get_category:
|
||||
* @symbol: an #EekSymbol
|
||||
*
|
||||
* Get symbol category of @symbol.
|
||||
*/
|
||||
EekSymbolCategory
|
||||
eek_symbol_get_category (EekSymbol *symbol)
|
||||
{
|
||||
EekSymbolPrivate *priv;
|
||||
|
||||
g_return_val_if_fail (EEK_IS_SYMBOL(symbol), EEK_SYMBOL_CATEGORY_UNKNOWN);
|
||||
|
||||
priv = EEK_SYMBOL_GET_PRIVATE(symbol);
|
||||
return priv->category;
|
||||
return symbol->label;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -364,12 +106,7 @@ void
|
||||
eek_symbol_set_modifier_mask (EekSymbol *symbol,
|
||||
EekModifierType mask)
|
||||
{
|
||||
EekSymbolPrivate *priv;
|
||||
|
||||
g_return_if_fail (EEK_IS_SYMBOL(symbol));
|
||||
|
||||
priv = EEK_SYMBOL_GET_PRIVATE(symbol);
|
||||
priv->modifier_mask = mask;
|
||||
symbol->modifier_mask = mask;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -381,97 +118,43 @@ eek_symbol_set_modifier_mask (EekSymbol *symbol,
|
||||
EekModifierType
|
||||
eek_symbol_get_modifier_mask (EekSymbol *symbol)
|
||||
{
|
||||
EekSymbolPrivate *priv;
|
||||
|
||||
g_return_val_if_fail (EEK_IS_SYMBOL(symbol), 0);
|
||||
|
||||
priv = EEK_SYMBOL_GET_PRIVATE(symbol);
|
||||
return priv->modifier_mask;
|
||||
return symbol->modifier_mask;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_symbol_is_modifier:
|
||||
* @symbol: an #EekSymbol
|
||||
*
|
||||
* Check if @symbol is a modifier.
|
||||
* Returns: %TRUE if @symbol is a modifier.
|
||||
*/
|
||||
gboolean
|
||||
eek_symbol_is_modifier (EekSymbol *symbol)
|
||||
{
|
||||
return eek_symbol_get_modifier_mask (symbol) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_symbol_set_icon_name:
|
||||
* @symbol: an #EekSymbol
|
||||
* @icon_name: icon name of @symbol
|
||||
*
|
||||
* Set the icon name of @symbol to @icon_name.
|
||||
*/
|
||||
void
|
||||
eek_symbol_set_icon_name (EekSymbol *symbol,
|
||||
const gchar *icon_name)
|
||||
{
|
||||
EekSymbolPrivate *priv;
|
||||
|
||||
g_return_if_fail (EEK_IS_SYMBOL(symbol));
|
||||
|
||||
priv = EEK_SYMBOL_GET_PRIVATE(symbol);
|
||||
g_free (priv->icon_name);
|
||||
priv->icon_name = g_strdup (icon_name);
|
||||
g_free (symbol->icon_name);
|
||||
symbol->icon_name = g_strdup (icon_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_symbol_get_icon_name:
|
||||
* @symbol: an #EekSymbol
|
||||
*
|
||||
* Get the icon name of @symbol.
|
||||
*/
|
||||
G_CONST_RETURN gchar *
|
||||
const gchar *
|
||||
eek_symbol_get_icon_name (EekSymbol *symbol)
|
||||
{
|
||||
EekSymbolPrivate *priv;
|
||||
|
||||
g_return_val_if_fail (EEK_IS_SYMBOL(symbol), NULL);
|
||||
|
||||
priv = EEK_SYMBOL_GET_PRIVATE(symbol);
|
||||
if (priv->icon_name == NULL || *priv->icon_name == '\0')
|
||||
if (symbol->icon_name == NULL || *symbol->icon_name == '\0')
|
||||
return NULL;
|
||||
return priv->icon_name;
|
||||
return symbol->icon_name;
|
||||
}
|
||||
|
||||
static const struct {
|
||||
EekSymbolCategory category;
|
||||
gchar *name;
|
||||
} category_names[] = {
|
||||
{ EEK_SYMBOL_CATEGORY_LETTER, "letter" },
|
||||
{ EEK_SYMBOL_CATEGORY_FUNCTION, "function" },
|
||||
{ EEK_SYMBOL_CATEGORY_KEYNAME, "keyname" },
|
||||
{ EEK_SYMBOL_CATEGORY_USER0, "user0" },
|
||||
{ EEK_SYMBOL_CATEGORY_USER1, "user1" },
|
||||
{ EEK_SYMBOL_CATEGORY_USER2, "user2" },
|
||||
{ EEK_SYMBOL_CATEGORY_USER3, "user3" },
|
||||
{ EEK_SYMBOL_CATEGORY_USER4, "user4" },
|
||||
{ EEK_SYMBOL_CATEGORY_UNKNOWN, NULL }
|
||||
};
|
||||
|
||||
G_CONST_RETURN gchar *
|
||||
eek_symbol_category_get_name (EekSymbolCategory category)
|
||||
void
|
||||
eek_symbol_set_tooltip (EekSymbol *symbol,
|
||||
const gchar *tooltip)
|
||||
{
|
||||
gint i;
|
||||
for (i = 0; i < G_N_ELEMENTS(category_names); i++)
|
||||
if (category_names[i].category == category)
|
||||
return category_names[i].name;
|
||||
return NULL;
|
||||
g_free (symbol->tooltip);
|
||||
symbol->tooltip = g_strdup (tooltip);
|
||||
}
|
||||
|
||||
EekSymbolCategory
|
||||
eek_symbol_category_from_name (const gchar *name)
|
||||
const gchar *
|
||||
eek_symbol_get_tooltip (EekSymbol *symbol)
|
||||
{
|
||||
gint i;
|
||||
for (i = 0; i < G_N_ELEMENTS(category_names); i++)
|
||||
if (g_strcmp0 (category_names[i].name, name) == 0)
|
||||
return category_names[i].category;
|
||||
return EEK_SYMBOL_CATEGORY_UNKNOWN;
|
||||
if (symbol->tooltip == NULL || *symbol->tooltip == '\0')
|
||||
return NULL;
|
||||
return symbol->tooltip;
|
||||
}
|
||||
|
||||
@ -58,63 +58,49 @@ typedef enum {
|
||||
EEK_SYMBOL_CATEGORY_LAST = EEK_SYMBOL_CATEGORY_UNKNOWN
|
||||
} EekSymbolCategory;
|
||||
|
||||
#define EEK_TYPE_SYMBOL (eek_symbol_get_type())
|
||||
#define EEK_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_SYMBOL, EekSymbol))
|
||||
#define EEK_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_SYMBOL, EekSymbolClass))
|
||||
#define EEK_IS_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_SYMBOL))
|
||||
#define EEK_IS_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_SYMBOL))
|
||||
#define EEK_SYMBOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_SYMBOL, EekSymbolClass))
|
||||
|
||||
typedef struct _EekSymbolClass EekSymbolClass;
|
||||
typedef struct _EekSymbolPrivate EekSymbolPrivate;
|
||||
typedef struct _EekSymbol
|
||||
{
|
||||
/// Canonical name of the symbol
|
||||
gchar *name;
|
||||
/// Text used to display the symbol
|
||||
gchar *label;
|
||||
EekSymbolCategory category;
|
||||
EekModifierType modifier_mask;
|
||||
/// Icon name used to render the symbol
|
||||
gchar *icon_name;
|
||||
/// Tooltip text
|
||||
gchar *tooltip;
|
||||
|
||||
/**
|
||||
* EekSymbol:
|
||||
*
|
||||
* The #EekSymbol structure contains only private data and should only
|
||||
* be accessed using the provided API.
|
||||
*/
|
||||
struct _EekSymbol {
|
||||
/*< private >*/
|
||||
GObject parent;
|
||||
// May not be present
|
||||
guint xkeysym;
|
||||
gchar *text;
|
||||
} EekSymbol;
|
||||
|
||||
EekSymbolPrivate *priv;
|
||||
};
|
||||
EekSymbol *eek_symbol_new (const gchar *name);
|
||||
void eek_symbol_free (EekSymbol *symbol);
|
||||
void eek_symbol_set_name (EekSymbol *symbol,
|
||||
const gchar *name);
|
||||
const gchar *eek_symbol_get_name (EekSymbol *symbol);
|
||||
void eek_symbol_set_label (EekSymbol *symbol,
|
||||
const gchar *label);
|
||||
const gchar *eek_symbol_get_label (EekSymbol *symbol);
|
||||
void eek_symbol_set_category (EekSymbol *symbol,
|
||||
EekSymbolCategory category);
|
||||
EekSymbolCategory eek_symbol_get_category (EekSymbol *symbol);
|
||||
EekModifierType eek_symbol_get_modifier_mask (EekSymbol *symbol);
|
||||
void eek_symbol_set_modifier_mask (EekSymbol *symbol,
|
||||
EekModifierType mask);
|
||||
gboolean eek_symbol_is_modifier (EekSymbol *symbol);
|
||||
void eek_symbol_set_icon_name (EekSymbol *symbol,
|
||||
const gchar *icon_name);
|
||||
const gchar *eek_symbol_get_icon_name (EekSymbol *symbol);
|
||||
void eek_symbol_set_tooltip (EekSymbol *symbol,
|
||||
const gchar *tooltip);
|
||||
const gchar * eek_symbol_get_tooltip (EekSymbol *symbol);
|
||||
|
||||
/**
|
||||
* EekSymbolClass:
|
||||
*/
|
||||
struct _EekSymbolClass {
|
||||
/*< private >*/
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
GType eek_symbol_get_type (void) G_GNUC_CONST;
|
||||
|
||||
EekSymbol *eek_symbol_new (const gchar *name);
|
||||
void eek_symbol_set_name (EekSymbol *symbol,
|
||||
const gchar *name);
|
||||
G_CONST_RETURN gchar *eek_symbol_get_name (EekSymbol *symbol);
|
||||
void eek_symbol_set_label (EekSymbol *symbol,
|
||||
const gchar *label);
|
||||
G_CONST_RETURN gchar *eek_symbol_get_label (EekSymbol *symbol);
|
||||
void eek_symbol_set_category (EekSymbol *symbol,
|
||||
EekSymbolCategory category);
|
||||
EekSymbolCategory eek_symbol_get_category (EekSymbol *symbol);
|
||||
EekModifierType eek_symbol_get_modifier_mask
|
||||
(EekSymbol *symbol);
|
||||
void eek_symbol_set_modifier_mask
|
||||
(EekSymbol *symbol,
|
||||
EekModifierType mask);
|
||||
gboolean eek_symbol_is_modifier (EekSymbol *symbol);
|
||||
void eek_symbol_set_icon_name (EekSymbol *symbol,
|
||||
const gchar *icon_name);
|
||||
G_CONST_RETURN gchar *eek_symbol_get_icon_name (EekSymbol *symbol);
|
||||
|
||||
G_CONST_RETURN gchar *eek_symbol_category_get_name
|
||||
(EekSymbolCategory category);
|
||||
EekSymbolCategory eek_symbol_category_from_name
|
||||
(const gchar *name);
|
||||
const gchar *eek_symbol_category_get_name (EekSymbolCategory category);
|
||||
EekSymbolCategory eek_symbol_category_from_name (const gchar *name);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
153
eek/eek-text.c
@ -23,160 +23,21 @@
|
||||
* @short_description: an #EekText represents a text symbol
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include "eek-text.h"
|
||||
#include "eek-serializable.h"
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_TEXT,
|
||||
PROP_LAST
|
||||
};
|
||||
|
||||
struct _EekTextPrivate {
|
||||
gchar *text;
|
||||
};
|
||||
|
||||
static void eek_serializable_iface_init (EekSerializableIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (EekText, eek_text, EEK_TYPE_SYMBOL,
|
||||
G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
|
||||
eek_serializable_iface_init));
|
||||
|
||||
#define EEK_TEXT_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_TEXT, EekTextPrivate))
|
||||
|
||||
static EekSerializableIface *eek_text_parent_serializable_iface;
|
||||
|
||||
static void
|
||||
eek_text_real_serialize (EekSerializable *self,
|
||||
GVariantBuilder *builder)
|
||||
{
|
||||
EekTextPrivate *priv = EEK_TEXT_GET_PRIVATE(self);
|
||||
|
||||
eek_text_parent_serializable_iface->serialize (self, builder);
|
||||
|
||||
g_variant_builder_add (builder, "s", priv->text);
|
||||
}
|
||||
|
||||
static gsize
|
||||
eek_text_real_deserialize (EekSerializable *self,
|
||||
GVariant *variant,
|
||||
gsize index)
|
||||
{
|
||||
EekTextPrivate *priv = EEK_TEXT_GET_PRIVATE(self);
|
||||
|
||||
index = eek_text_parent_serializable_iface->deserialize (self,
|
||||
variant,
|
||||
index);
|
||||
g_variant_get_child (variant, index++, "s", &priv->text);
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_serializable_iface_init (EekSerializableIface *iface)
|
||||
{
|
||||
eek_text_parent_serializable_iface =
|
||||
g_type_interface_peek_parent (iface);
|
||||
|
||||
iface->serialize = eek_text_real_serialize;
|
||||
iface->deserialize = eek_text_real_deserialize;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_text_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
EekTextPrivate *priv = EEK_TEXT_GET_PRIVATE(object);
|
||||
switch (prop_id) {
|
||||
case PROP_TEXT:
|
||||
g_free (priv->text);
|
||||
priv->text = g_strdup (g_value_get_string (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
eek_text_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
EekTextPrivate *priv = EEK_TEXT_GET_PRIVATE(object);
|
||||
switch (prop_id) {
|
||||
case PROP_TEXT:
|
||||
g_value_set_string (value, priv->text);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
eek_text_finalize (GObject *object)
|
||||
{
|
||||
EekTextPrivate *priv = EEK_TEXT_GET_PRIVATE(object);
|
||||
|
||||
g_free (priv->text);
|
||||
G_OBJECT_CLASS (eek_text_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
eek_text_class_init (EekTextClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
GParamSpec *pspec;
|
||||
|
||||
g_type_class_add_private (gobject_class, sizeof (EekTextPrivate));
|
||||
|
||||
gobject_class->set_property = eek_text_set_property;
|
||||
gobject_class->get_property = eek_text_get_property;
|
||||
gobject_class->finalize = eek_text_finalize;
|
||||
|
||||
pspec = g_param_spec_string ("text",
|
||||
"Text",
|
||||
"Text",
|
||||
NULL,
|
||||
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
|
||||
g_object_class_install_property (gobject_class, PROP_TEXT, pspec);
|
||||
}
|
||||
|
||||
static void
|
||||
eek_text_init (EekText *self)
|
||||
{
|
||||
self->priv = EEK_TEXT_GET_PRIVATE(self);
|
||||
}
|
||||
|
||||
EekText *
|
||||
EekSymbol *
|
||||
eek_text_new (const gchar *text)
|
||||
{
|
||||
return g_object_new (EEK_TYPE_TEXT,
|
||||
"label", text,
|
||||
"category", EEK_SYMBOL_CATEGORY_FUNCTION,
|
||||
"text", text,
|
||||
NULL);
|
||||
EekSymbol *ret = eek_symbol_new("");
|
||||
eek_symbol_set_label(ret, text);
|
||||
ret->text = g_strdup (text);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_text_get_text:
|
||||
* @text: an #EekText
|
||||
*
|
||||
* Get a text value associated with @text
|
||||
*/
|
||||
const gchar *
|
||||
eek_text_get_text (EekText *text)
|
||||
eek_text_get_text (EekSymbol *text)
|
||||
{
|
||||
EekTextPrivate *priv = EEK_TEXT_GET_PRIVATE(text);
|
||||
|
||||
return priv->text;
|
||||
return text->text;
|
||||
}
|
||||
|
||||
@ -29,37 +29,9 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define EEK_TYPE_TEXT (eek_text_get_type())
|
||||
#define EEK_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_TEXT, EekText))
|
||||
#define EEK_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_TEXT, EekTextClass))
|
||||
#define EEK_IS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_TEXT))
|
||||
#define EEK_IS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_TEXT))
|
||||
#define EEK_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_TEXT, EekTextClass))
|
||||
|
||||
typedef struct _EekTextClass EekTextClass;
|
||||
typedef struct _EekTextPrivate EekTextPrivate;
|
||||
|
||||
/**
|
||||
* EekText:
|
||||
*
|
||||
* The #EekText structure contains only private data and should only
|
||||
* be accessed using the provided API.
|
||||
*/
|
||||
struct _EekText {
|
||||
/*< private >*/
|
||||
EekSymbol parent;
|
||||
|
||||
EekTextPrivate *priv;
|
||||
};
|
||||
|
||||
struct _EekTextClass {
|
||||
/*< private >*/
|
||||
EekSymbolClass parent_class;
|
||||
};
|
||||
|
||||
GType eek_text_get_type (void) G_GNUC_CONST;
|
||||
EekText *eek_text_new (const gchar *text);
|
||||
const gchar *eek_text_get_text (EekText *text);
|
||||
EekSymbol *eek_text_new (const gchar *text);
|
||||
const gchar *eek_text_get_text (EekSymbol *text);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
@ -1,289 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/*
|
||||
* eek-theme-context.c: holds global information about a tree of styled objects
|
||||
*
|
||||
* Copyright 2009, 2010 Red Hat, Inc.
|
||||
* Copyright 2009 Florian Müllner
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation, either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include "eek-theme.h"
|
||||
#include "eek-theme-context.h"
|
||||
|
||||
struct _EekThemeContext {
|
||||
GObject parent;
|
||||
|
||||
double resolution;
|
||||
PangoFontDescription *font;
|
||||
EekThemeNode *root_node;
|
||||
EekTheme *theme;
|
||||
};
|
||||
|
||||
struct _EekThemeContextClass {
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
#define DEFAULT_RESOLUTION 96.
|
||||
#define DEFAULT_FONT "sans-serif 10"
|
||||
|
||||
enum
|
||||
{
|
||||
CHANGED,
|
||||
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0, };
|
||||
|
||||
G_DEFINE_TYPE (EekThemeContext, eek_theme_context, G_TYPE_OBJECT)
|
||||
|
||||
static void
|
||||
eek_theme_context_finalize (GObject *object)
|
||||
{
|
||||
EekThemeContext *context = EEK_THEME_CONTEXT (object);
|
||||
|
||||
if (context->root_node)
|
||||
g_object_unref (context->root_node);
|
||||
if (context->theme)
|
||||
g_object_unref (context->theme);
|
||||
|
||||
pango_font_description_free (context->font);
|
||||
|
||||
G_OBJECT_CLASS (eek_theme_context_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
eek_theme_context_class_init (EekThemeContextClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->finalize = eek_theme_context_finalize;
|
||||
|
||||
signals[CHANGED] =
|
||||
g_signal_new ("changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, /* no default handler slot */
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
eek_theme_context_init (EekThemeContext *context)
|
||||
{
|
||||
context->resolution = DEFAULT_RESOLUTION;
|
||||
context->font = pango_font_description_from_string (DEFAULT_FONT);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_theme_context_new:
|
||||
*
|
||||
* Create a new theme context.
|
||||
*/
|
||||
EekThemeContext *
|
||||
eek_theme_context_new (void)
|
||||
{
|
||||
EekThemeContext *context;
|
||||
|
||||
context = g_object_new (EEK_TYPE_THEME_CONTEXT, NULL);
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_theme_context_changed (EekThemeContext *context)
|
||||
{
|
||||
EekThemeNode *old_root = context->root_node;
|
||||
context->root_node = NULL;
|
||||
|
||||
g_signal_emit (context, signals[CHANGED], 0);
|
||||
|
||||
if (old_root)
|
||||
g_object_unref (old_root);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_theme_context_set_theme:
|
||||
* @context: an #EekThemeContext
|
||||
* @theme: an #EekTheme
|
||||
*
|
||||
* Sets the default set of theme stylesheets for the context. This theme will
|
||||
* be used for the root node and for nodes descending from it, unless some other
|
||||
* style is explicitely specified.
|
||||
*/
|
||||
void
|
||||
eek_theme_context_set_theme (EekThemeContext *context,
|
||||
EekTheme *theme)
|
||||
{
|
||||
g_return_if_fail (EEK_IS_THEME_CONTEXT (context));
|
||||
g_return_if_fail (theme == NULL || EEK_IS_THEME (theme));
|
||||
|
||||
if (context->theme != theme)
|
||||
{
|
||||
if (context->theme)
|
||||
g_object_unref (context->theme);
|
||||
|
||||
context->theme = theme;
|
||||
|
||||
if (context->theme)
|
||||
g_object_ref (context->theme);
|
||||
|
||||
eek_theme_context_changed (context);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_theme_context_get_theme:
|
||||
* @context: a #EekThemeContext
|
||||
*
|
||||
* Gets the default theme for the context. See eek_theme_context_set_theme()
|
||||
*
|
||||
* Return value: (transfer none): the default theme for the context
|
||||
*/
|
||||
EekTheme *
|
||||
eek_theme_context_get_theme (EekThemeContext *context)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_THEME_CONTEXT (context), NULL);
|
||||
|
||||
return context->theme;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_theme_context_set_resolution:
|
||||
* @context: a #EekThemeContext
|
||||
* @resolution: resolution of the context (number of pixels in an "inch")
|
||||
*
|
||||
* Sets the resolution of the theme context. This is the scale factor
|
||||
* used to convert between points and the length units pt, in, and cm.
|
||||
* This does not necessarily need to correspond to the actual number
|
||||
* resolution of the device. A value of 72. means that points and
|
||||
* pixels are identical. The default value is 96.
|
||||
*/
|
||||
void
|
||||
eek_theme_context_set_resolution (EekThemeContext *context,
|
||||
double resolution)
|
||||
{
|
||||
g_return_if_fail (EEK_IS_THEME_CONTEXT (context));
|
||||
|
||||
if (resolution == context->resolution)
|
||||
return;
|
||||
|
||||
context->resolution = resolution;
|
||||
eek_theme_context_changed (context);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_theme_context_set_default_resolution:
|
||||
* @context: a #EekThemeContext
|
||||
*
|
||||
* Sets the resolution of the theme context to the default value of 96.
|
||||
* See eek_theme_context_set_resolution().
|
||||
*/
|
||||
void
|
||||
eek_theme_context_set_default_resolution (EekThemeContext *context)
|
||||
{
|
||||
g_return_if_fail (EEK_IS_THEME_CONTEXT (context));
|
||||
|
||||
if (context->resolution == DEFAULT_RESOLUTION)
|
||||
return;
|
||||
|
||||
context->resolution = DEFAULT_RESOLUTION;
|
||||
eek_theme_context_changed (context);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_theme_context_get_resolution:
|
||||
* @context: a #EekThemeContext
|
||||
*
|
||||
* Gets the current resolution of the theme context.
|
||||
* See eek_theme_context_set_resolution().
|
||||
*
|
||||
* Return value: the resolution (in dots-per-"inch")
|
||||
*/
|
||||
double
|
||||
eek_theme_context_get_resolution (EekThemeContext *context)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_THEME_CONTEXT (context), DEFAULT_RESOLUTION);
|
||||
|
||||
return context->resolution;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_theme_context_set_font:
|
||||
* @context: a #EekThemeContext
|
||||
* @font: the default font for theme context
|
||||
*
|
||||
* Sets the default font for the theme context. This is the font that
|
||||
* is inherited by the root node of the tree of theme nodes. If the
|
||||
* font is not overriden, then this font will be used. If the font is
|
||||
* partially modified (for example, with 'font-size: 110%', then that
|
||||
* modification is based on this font.
|
||||
*/
|
||||
void
|
||||
eek_theme_context_set_font (EekThemeContext *context,
|
||||
const PangoFontDescription *font)
|
||||
{
|
||||
g_return_if_fail (EEK_IS_THEME_CONTEXT (context));
|
||||
g_return_if_fail (font != NULL);
|
||||
|
||||
if (context->font == font ||
|
||||
pango_font_description_equal (context->font, font))
|
||||
return;
|
||||
|
||||
pango_font_description_free (context->font);
|
||||
context->font = pango_font_description_copy (font);
|
||||
eek_theme_context_changed (context);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_theme_context_get_font:
|
||||
* @context: a #EekThemeContext
|
||||
*
|
||||
* Gets the default font for the theme context. See eek_theme_context_set_font().
|
||||
*
|
||||
* Return value: the default font for the theme context.
|
||||
*/
|
||||
const PangoFontDescription *
|
||||
eek_theme_context_get_font (EekThemeContext *context)
|
||||
{
|
||||
g_return_val_if_fail (EEK_IS_THEME_CONTEXT (context), NULL);
|
||||
|
||||
return context->font;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_theme_context_get_root_node:
|
||||
* @context: a #EekThemeContext
|
||||
*
|
||||
* Gets the root node of the tree of theme style nodes that associated with this
|
||||
* context. For the node tree associated with a stage, this node represents
|
||||
* styles applied to the stage itself.
|
||||
*
|
||||
* Return value: (transfer none): the root node of the context's style tree
|
||||
*/
|
||||
EekThemeNode *
|
||||
eek_theme_context_get_root_node (EekThemeContext *context)
|
||||
{
|
||||
if (context->root_node == NULL)
|
||||
context->root_node = eek_theme_node_new (context, NULL, context->theme,
|
||||
G_TYPE_NONE, NULL, NULL, NULL, NULL);
|
||||
|
||||
return context->root_node;
|
||||
}
|
||||
@ -1,78 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* eek-theme-context.c: holds global information about a tree of styled objects
|
||||
*
|
||||
* Copyright 2009, 2010 Red Hat, Inc.
|
||||
* Copyright 2009 Florian Müllner
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation, either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __EEK_THEME_CONTEXT_H__
|
||||
#define __EEK_THEME_CONTEXT_H__
|
||||
|
||||
#include <pango/pango.h>
|
||||
#include "eek-theme-node.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* SECTION:eek-theme-context
|
||||
* @short_description: holds global information about a tree of styled objects
|
||||
*
|
||||
* #EekThemeContext is responsible for managing information global to
|
||||
* a tree of styled objects, such as the set of stylesheets or the
|
||||
* default font.
|
||||
*/
|
||||
|
||||
typedef struct _EekThemeContextClass EekThemeContextClass;
|
||||
|
||||
#define EEK_TYPE_THEME_CONTEXT (eek_theme_context_get_type ())
|
||||
#define EEK_THEME_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), EEK_TYPE_THEME_CONTEXT, EekThemeContext))
|
||||
#define EEK_THEME_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_THEME_CONTEXT, EekThemeContextClass))
|
||||
#define EEK_IS_THEME_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), EEK_TYPE_THEME_CONTEXT))
|
||||
#define EEK_IS_THEME_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_THEME_CONTEXT))
|
||||
#define EEK_THEME_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_THEME_CONTEXT, EekThemeContextClass))
|
||||
|
||||
GType eek_theme_context_get_type
|
||||
(void) G_GNUC_CONST;
|
||||
|
||||
EekThemeContext *eek_theme_context_new
|
||||
(void);
|
||||
|
||||
void eek_theme_context_set_theme
|
||||
(EekThemeContext *context,
|
||||
EekTheme *theme);
|
||||
EekTheme * eek_theme_context_get_theme
|
||||
(EekThemeContext *context);
|
||||
|
||||
void eek_theme_context_set_resolution
|
||||
(EekThemeContext *context,
|
||||
gdouble resolution);
|
||||
void eek_theme_context_set_default_resolution
|
||||
(EekThemeContext *context);
|
||||
double eek_theme_context_get_resolution
|
||||
(EekThemeContext *context);
|
||||
void eek_theme_context_set_font
|
||||
(EekThemeContext *context,
|
||||
const PangoFontDescription *font);
|
||||
const PangoFontDescription *eek_theme_context_get_font
|
||||
(EekThemeContext *context);
|
||||
|
||||
EekThemeNode * eek_theme_context_get_root_node
|
||||
(EekThemeContext *context);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __EEK_THEME_CONTEXT_H__ */
|
||||
1869
eek/eek-theme-node.c
@ -1,141 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||
* Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
#ifndef __EEK_THEME_NODE_H__
|
||||
#define __EEK_THEME_NODE_H__
|
||||
|
||||
#include <pango/pango.h>
|
||||
#include "eek-types.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* SECTION:eek-theme-node
|
||||
* @short_description: style information for one node in a tree of
|
||||
* themed objects
|
||||
*
|
||||
* The #EekThemeNode class represents the CSS style information (the
|
||||
* set of CSS properties) for one node in a tree of themed objects. In
|
||||
* typical usage, it represents the style information for a single
|
||||
* #EekElement. A #EekThemeNode is immutable: attributes such as the
|
||||
* CSS classes for the node are passed in at construction. If the
|
||||
* attributes of the node or any parent node change, the node should
|
||||
* be discarded and a new node created. #EekThemeNode has generic
|
||||
* accessors to look up properties by name and specific accessors for
|
||||
* standard CSS properties that add caching and handling of various
|
||||
* details of the CSS specification. #EekThemeNode also has
|
||||
* convenience functions to help in implementing a #EekElement with
|
||||
* borders and padding.
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
EEK_SIDE_TOP,
|
||||
EEK_SIDE_RIGHT,
|
||||
EEK_SIDE_BOTTOM,
|
||||
EEK_SIDE_LEFT
|
||||
} EekSide;
|
||||
|
||||
typedef enum {
|
||||
EEK_CORNER_TOPLEFT,
|
||||
EEK_CORNER_TOPRIGHT,
|
||||
EEK_CORNER_BOTTOMRIGHT,
|
||||
EEK_CORNER_BOTTOMLEFT
|
||||
} EekCorner;
|
||||
|
||||
#define EEK_TYPE_THEME_NODE (eek_theme_node_get_type())
|
||||
#define EEK_THEME_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_THEME_NODE, EekThemeNode))
|
||||
#define EEK_THEME_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_THEME_NODE, EekThemeNodeClass))
|
||||
#define EEK_IS_THEME_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_THEME_NODE))
|
||||
#define EEK_IS_THEME_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_THEME_NODE))
|
||||
#define EEK_THEME_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_THEME_NODE, EekThemeNodeClass))
|
||||
|
||||
typedef struct _EekThemeNodeClass EekThemeNodeClass;
|
||||
typedef struct _EekThemeNodePrivate EekThemeNodePrivate;
|
||||
|
||||
GType eek_theme_node_get_type
|
||||
(void) G_GNUC_CONST;
|
||||
|
||||
EekThemeNode *eek_theme_node_new (EekThemeContext *context,
|
||||
EekThemeNode *parent_node,
|
||||
/* can be null */ EekTheme *theme,
|
||||
/* can be null */ GType element_type,
|
||||
const char *element_id,
|
||||
const char *element_class,
|
||||
const char *pseudo_class,
|
||||
const char *inline_style);
|
||||
|
||||
EekThemeNode *eek_theme_node_get_parent
|
||||
(EekThemeNode *node);
|
||||
|
||||
EekTheme *eek_theme_node_get_theme
|
||||
(EekThemeNode *node);
|
||||
|
||||
GType eek_theme_node_get_element_type
|
||||
(EekThemeNode *node);
|
||||
const char *eek_theme_node_get_element_id
|
||||
(EekThemeNode *node);
|
||||
const char *eek_theme_node_get_element_class
|
||||
(EekThemeNode *node);
|
||||
const char *eek_theme_node_get_pseudo_class
|
||||
(EekThemeNode *node);
|
||||
|
||||
/* Generic getters ... these are not cached so are less efficient. The other
|
||||
* reason for adding the more specific version is that we can handle the
|
||||
* details of the actual CSS rules, which can be complicated, especially
|
||||
* for fonts
|
||||
*/
|
||||
void eek_theme_node_get_color
|
||||
(EekThemeNode *node,
|
||||
const char *property_name,
|
||||
EekColor *color);
|
||||
|
||||
/* Specific getters for particular properties: cached
|
||||
*/
|
||||
void eek_theme_node_get_background_color
|
||||
(EekThemeNode *node,
|
||||
EekColor *color);
|
||||
void eek_theme_node_get_foreground_color
|
||||
(EekThemeNode *node,
|
||||
EekColor *color);
|
||||
void eek_theme_node_get_background_gradient
|
||||
(EekThemeNode *node,
|
||||
EekGradientType *type,
|
||||
EekColor *start,
|
||||
EekColor *end);
|
||||
int eek_theme_node_get_border_width
|
||||
(EekThemeNode *node,
|
||||
EekSide side);
|
||||
int eek_theme_node_get_border_radius
|
||||
(EekThemeNode *node,
|
||||
EekCorner corner);
|
||||
void eek_theme_node_get_border_color
|
||||
(EekThemeNode *node,
|
||||
EekSide side,
|
||||
EekColor *color);
|
||||
|
||||
/* Font rule processing is pretty complicated, so we just hardcode it
|
||||
* under the standard font/font-family/font-size/etc names. This means
|
||||
* you can't have multiple separate styled fonts for a single item,
|
||||
* but that should be OK.
|
||||
*/
|
||||
const PangoFontDescription *eek_theme_node_get_font (EekThemeNode *node);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __EEK_THEME_NODE_H__ */
|
||||
@ -1,22 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
#ifndef __EEK_THEME_PRIVATE_H__
|
||||
#define __EEK_THEME_PRIVATE_H__
|
||||
|
||||
#include <libcroco/libcroco.h>
|
||||
#include "eek-theme.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GPtrArray *_eek_theme_get_matched_properties (EekTheme *theme,
|
||||
EekThemeNode *node);
|
||||
|
||||
/* Resolve an URL from the stylesheet to a filename */
|
||||
char *_eek_theme_resolve_url (EekTheme *theme,
|
||||
CRStyleSheet *base_stylesheet,
|
||||
const char *url);
|
||||
|
||||
CRDeclaration *_eek_theme_parse_declaration_list (const char *str);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __EEK_THEME_PRIVATE_H__ */
|
||||
1133
eek/eek-theme.c
@ -1,49 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __EEK_THEME_H__
|
||||
#define __EEK_THEME_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "eek-types.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* SECTION:EekTheme
|
||||
* @short_description: a set of stylesheets
|
||||
*
|
||||
* #EekTheme holds a set of stylesheets. (The "cascade" of the name
|
||||
* Cascading Stylesheets.) An #EekTheme can be set to apply to all the
|
||||
* keyboard elements.
|
||||
*/
|
||||
|
||||
typedef struct _EekThemeClass EekThemeClass;
|
||||
|
||||
#define EEK_TYPE_THEME (eek_theme_get_type())
|
||||
#define EEK_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_THEME, EekTheme))
|
||||
#define EEK_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_THEME, EekThemeClass))
|
||||
#define EEK_IS_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_THEME))
|
||||
#define EEK_IS_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_THEME))
|
||||
#define EEK_THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_THEME, EekThemeClass))
|
||||
|
||||
GType eek_theme_get_type (void) G_GNUC_CONST;
|
||||
|
||||
EekTheme *eek_theme_new (const char *application_stylesheet,
|
||||
const char *theme_stylesheet,
|
||||
const char *default_stylesheet);
|
||||
|
||||
gboolean eek_theme_load_stylesheet (EekTheme *theme,
|
||||
const char *path,
|
||||
GError **error);
|
||||
|
||||
void eek_theme_unload_stylesheet (EekTheme *theme,
|
||||
const char *path);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __EEK_THEME_H__ */
|
||||
@ -24,9 +24,7 @@
|
||||
* @short_description: Miscellaneous types used in Libeek
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
@ -139,7 +139,6 @@ typedef struct _EekKey EekKey;
|
||||
typedef struct _EekSection EekSection;
|
||||
typedef struct _EekKeyboard EekKeyboard;
|
||||
typedef struct _EekSymbol EekSymbol;
|
||||
typedef struct _EekKeysym EekKeysym;
|
||||
typedef struct _EekText EekText;
|
||||
typedef struct _EekTheme EekTheme;
|
||||
typedef struct _EekThemeContext EekThemeContext;
|
||||
@ -150,6 +149,8 @@ typedef struct _EekBounds EekBounds;
|
||||
typedef struct _EekOutline EekOutline;
|
||||
typedef struct _EekColor EekColor;
|
||||
|
||||
typedef struct _EekboardContextService EekboardContextService;
|
||||
|
||||
/**
|
||||
* EekPoint:
|
||||
* @x: X coordinate of the point
|
||||
@ -212,7 +213,7 @@ struct _EekOutline
|
||||
/*< public >*/
|
||||
gdouble corner_radius;
|
||||
EekPoint *points;
|
||||
gint num_points;
|
||||
guint num_points;
|
||||
};
|
||||
|
||||
GType eek_outline_get_type (void) G_GNUC_CONST;
|
||||
|
||||