Compare commits
200 Commits
eekboard-0
...
eekboard-1
| Author | SHA1 | Date | |
|---|---|---|---|
| ce2c4ed0f4 | |||
| 099ca60975 | |||
| 43ab623fac | |||
| bcc9a8fd60 | |||
| 6fb96ea5d6 | |||
| 2f64b3ee13 | |||
| d4a78e5dc7 | |||
| 71033f5739 | |||
| 17444509fe | |||
| 42baa22cdc | |||
| f07de8cd3b | |||
| 0772898b83 | |||
| 828b2d66d1 | |||
| 8ab4fb7946 | |||
| e91a059f0f | |||
| 093d83ed89 | |||
| 5c0381e4f0 | |||
| 657c6f8e35 | |||
| 4bb984daf3 | |||
| e46a3f89ed | |||
| 6843cd62dd | |||
| 52ffc77fdd | |||
| 158542ec0a | |||
| 360da8a3c9 | |||
| 65d1186317 | |||
| b7b4d68a9a | |||
| 952f70b433 | |||
| 74de8e5056 | |||
| 9d88c1c5da | |||
| a6bde78168 | |||
| bb85885e5d | |||
| dd085be73d | |||
| f576310cdf | |||
| 70e1c98987 | |||
| 4f03aa82fe | |||
| 383c93a415 | |||
| 860fbe8ede | |||
| 39900bd987 | |||
| 5c09147551 | |||
| f0929a9bd8 | |||
| 786496b3c4 | |||
| e5f5c8273e | |||
| ca250699ef | |||
| 7f41af3ee7 | |||
| 260dc3fddd | |||
| 052c40cc26 | |||
| 1b5bab9c18 | |||
| 6a7b256676 | |||
| 0e135129e2 | |||
| 7af6bf13ed | |||
| 91ed49b65a | |||
| 84f614528f | |||
| 7c0e29fc86 | |||
| 1f9e4bd576 | |||
| fc0a577dfb | |||
| 69d16ddce5 | |||
| 984813b154 | |||
| b6beeedc26 | |||
| 55f7a0d0dc | |||
| 7919cc191e | |||
| db0c5088b7 | |||
| cc4b9a6b45 | |||
| f4e33a4ad4 | |||
| 0e0fe9ed51 | |||
| 20c1f8cbe3 | |||
| f2ee3b4966 | |||
| 57a072746e | |||
| 497f21a5bd | |||
| 099c242ad7 | |||
| 109eff420c | |||
| 0896096a70 | |||
| 2d2aea009e | |||
| 0425b4e094 | |||
| 15c0a9dadf | |||
| e09c563cd8 | |||
| 218a4a50f6 | |||
| 9ab228e8f0 | |||
| b30db118f2 | |||
| cccb4f45cd | |||
| 54c9d6e35d | |||
| da7d11e387 | |||
| d9073183a7 | |||
| 78480f7577 | |||
| 1dbf0d70da | |||
| 44ee2a9913 | |||
| a3a5a51f74 | |||
| 1ae4426ec8 | |||
| 270760bd16 | |||
| 5bb20e44fb | |||
| 26a2ab725e | |||
| 9d73b89a4e | |||
| 606f335496 | |||
| fe9a02e514 | |||
| f76a835e33 | |||
| e199add701 | |||
| a744096dd7 | |||
| 51a18849c0 | |||
| bd303ef10b | |||
| 1e9ec77b65 | |||
| 4b409de5ba | |||
| 66cea3a0b5 | |||
| 0add617834 | |||
| 70b0d95d9b | |||
| cae9c89b64 | |||
| a9d9274e78 | |||
| 2211fb6b1e | |||
| 34569679f0 | |||
| 816e1f0d51 | |||
| de62d74ac5 | |||
| d71c79f268 | |||
| ee948cb2ae | |||
| ba59a850d1 | |||
| b7999842a9 | |||
| 2dd0ae47db | |||
| 926d9346e1 | |||
| ac8764b9b7 | |||
| 4cf3f24fbc | |||
| 0691766a31 | |||
| 77c00a10da | |||
| 8c407ae482 | |||
| 8d2d612547 | |||
| 80dc26b7f4 | |||
| fbe7b9ec1a | |||
| 048fccd6e0 | |||
| 638d41e0b6 | |||
| 4271eb6b3e | |||
| d25bfd8ba7 | |||
| 0739fbf464 | |||
| d1b38f8eb2 | |||
| e6d17fa4cb | |||
| d62b8b49a2 | |||
| 149dd7dc8b | |||
| 0177f96795 | |||
| ec56773dc6 | |||
| 881bf34ec4 | |||
| 6787308061 | |||
| 0cd01bf165 | |||
| 132ae3899f | |||
| 72f84fa4ef | |||
| 16d81f3f71 | |||
| 42a0ea148b | |||
| 2021311a4e | |||
| b64e91dffa | |||
| 57bb7030fb | |||
| 425fe7829b | |||
| aa88315924 | |||
| 39a59fb049 | |||
| e0993a5e55 | |||
| 4eb59ba7ed | |||
| cc9fb31e61 | |||
| c44ebecfb2 | |||
| f60e1d763e | |||
| 5c3cb477ef | |||
| 5fd4005967 | |||
| 76d1b8f7fb | |||
| 2bbc65958a | |||
| cbdd0fd2ba | |||
| 2f7aa77c11 | |||
| bed39570ff | |||
| 8bc3b204b4 | |||
| fa030ebcbb | |||
| af365024b7 | |||
| c742877b77 | |||
| ace4391b79 | |||
| 627cbf2898 | |||
| baae80fa41 | |||
| 9be07710dd | |||
| 163e005561 | |||
| d8e691d3f5 | |||
| 85a1a6ba24 | |||
| 828a59b298 | |||
| f1b91c0223 | |||
| cadb0f18a9 | |||
| 2a8d7cf0a8 | |||
| c9b54ba87f | |||
| d57ae91995 | |||
| dd86b132ce | |||
| 3967558bae | |||
| 668ce51f3c | |||
| 1db2a4aeea | |||
| e20425f385 | |||
| a20224f969 | |||
| d66318a031 | |||
| 37c2579253 | |||
| 23ab2a343f | |||
| e6dfc595ab | |||
| 98e15d7741 | |||
| 38b226b46f | |||
| c53b4d398e | |||
| fbcf6b6c65 | |||
| 09c95b20da | |||
| a7f81c3cfb | |||
| a66256f390 | |||
| 8b7da18641 | |||
| a9c0356611 | |||
| b25a9a5407 | |||
| 8b632356e9 | |||
| b8a01d794e | |||
| cfd33921a1 | |||
| 979aa010b9 |
16
.gitignore
vendored
16
.gitignore
vendored
@ -4,6 +4,7 @@
|
||||
*.o
|
||||
*.so
|
||||
*~
|
||||
*.pyc
|
||||
Makefile
|
||||
Makefile.in
|
||||
.deps
|
||||
@ -33,6 +34,7 @@ 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
|
||||
@ -40,15 +42,15 @@ 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
|
||||
src/eekboard-client
|
||||
src/eekboard-system-client
|
||||
src/eekboard-xml
|
||||
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
|
||||
@ -71,4 +73,12 @@ 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
|
||||
|
||||
|
||||
38
AUTHORS
38
AUTHORS
@ -1,6 +1,36 @@
|
||||
eekboard is written by Daiki Ueno <ueno@unixuser.org>
|
||||
eekboard is written by Daiki Ueno <ueno@unixuser.org>. The following
|
||||
files contain code derived from other free software packages:
|
||||
|
||||
Cairo keyboard drawing functions are borrowed from the libgnomekbd
|
||||
library by Sergey V. Udaltsov <svu@gnome.org>. See the comments in
|
||||
eek/eek-drawing.c for detail.
|
||||
eek/eek-keyboard-drawing.h
|
||||
eek/eek-keyboard-drawing.c
|
||||
|
||||
These files contain code derived from the libgnomekbd library.
|
||||
Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
|
||||
|
||||
eek/eek-theme.h
|
||||
eek/eek-theme.c
|
||||
eek/eek-theme-context.h
|
||||
eek/eek-theme-context.c
|
||||
eek/eek-theme-node.h
|
||||
eek/eek-theme-node.c
|
||||
|
||||
These files contain code derived from gnome-shell.
|
||||
|
||||
Copyright 2008-2010 Red Hat, Inc.
|
||||
Copyright 2009 Steve Frécinaux
|
||||
Copyright 2009, 2010 Florian Müllner
|
||||
Copyright 2010 Adel Gadllah
|
||||
Copyright 2010 Giovanni Campagna
|
||||
Copyright 2003-2004 Dodji Seketeli
|
||||
|
||||
data/icons/8x8/Makefile.am
|
||||
data/icons/16x16/Makefile.am
|
||||
data/icons/22x22/Makefile.am
|
||||
data/icons/24x24/Makefile.am
|
||||
data/icons/32x32/Makefile.am
|
||||
data/icons/48x48/Makefile.am
|
||||
data/icons/scalable/Makefile.am
|
||||
|
||||
These files contain code derived from im-chooser.
|
||||
|
||||
Copyright (C) 2006-2008 Red Hat, Inc. All rights reserved.
|
||||
|
||||
@ -17,5 +17,5 @@
|
||||
# 02110-1301 USA
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
SUBDIRS = eek eekboard src tests bindings docs po data
|
||||
SUBDIRS = eek eekboard src tests bindings docs po data examples
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
|
||||
|
||||
58
README
58
README
@ -3,12 +3,12 @@ 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.
|
||||
|
||||
* How to build
|
||||
* Building
|
||||
|
||||
** Dependencies
|
||||
|
||||
REQUIRED: GLib2, GTK, GConf2, PangoCairo, libxklavier
|
||||
OPTIONAL: fakekey, CSPI, Clutter, Clutter-Gtk, Vala, gobject-introspection
|
||||
REQUIRED: GLib2, GTK, PangoCairo, libxklavier, libcroco
|
||||
OPTIONAL: libXtst, at-spi2-core, IBus, Clutter, Clutter-Gtk, Python, Vala, gobject-introspection, libcanberra
|
||||
|
||||
** Build from git repo
|
||||
|
||||
@ -24,52 +24,12 @@ OPTIONAL: fakekey, CSPI, Clutter, Clutter-Gtk, Vala, gobject-introspection
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
* How to test
|
||||
* Running
|
||||
|
||||
eekboard currently includes 4 tools to implement your own virtual
|
||||
keyboard.
|
||||
$ eekboard
|
||||
$ eekboard -f # show/hide automatically based on focus-in/focus-out events
|
||||
|
||||
** eekboard-server
|
||||
Even though eekboard -f watches a11y events by default, it currently
|
||||
works better with IBus. To use IBus, do:
|
||||
|
||||
eekboard-server is a D-Bus server which is responsible for drawing
|
||||
interactive on-screen keyboards. Since it has a D-Bus service
|
||||
activation entry, you will not need to start it manually, but you can
|
||||
do that with:
|
||||
|
||||
$ eekboard-server &
|
||||
|
||||
** eekboard-desktop-client
|
||||
|
||||
eekboard-desktop-client is a client of eekboard-server. It listens
|
||||
desktop events (keyboard change, focus in/out, and keystroke) and
|
||||
generates key events when some keys are pressed on the on-screen
|
||||
keyboard. It can be started with:
|
||||
|
||||
$ eekboard-desktop-client
|
||||
|
||||
** eekboard-xml
|
||||
|
||||
eekboard-xml is a tool to manipulate XML keyboard description used by
|
||||
eekboard-client tool and in the eekboard library.
|
||||
|
||||
To dump the current system keyboard layout into an XML file:
|
||||
|
||||
$ eekboard-xml --dump > keyboard.xml
|
||||
|
||||
You can display the dumped layout with:
|
||||
|
||||
$ eekboard-xml --load keyboard.xml
|
||||
|
||||
** eekboard-client
|
||||
|
||||
eekboard-client is a simple test client of eekboard-server. To upload
|
||||
the keyboard description to the server, display it, and listen
|
||||
key events.
|
||||
|
||||
$ eekboard-client --set-keyboard keyboard.xml --show-keyboard --listen
|
||||
KeyPressed XXXXX
|
||||
KeyReleased XXXXX
|
||||
|
||||
* Documentation
|
||||
|
||||
See file:docs/reference/eek/html/index.html
|
||||
$ gsettings set org.fedorahosted.eekboard focus-listener 'ibus'
|
||||
|
||||
@ -15,7 +15,10 @@
|
||||
# along with this program. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
eekboard.py \
|
||||
pkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
serializable.py \
|
||||
symbol.py \
|
||||
keysym.py \
|
||||
client.py \
|
||||
context.py
|
||||
|
||||
@ -15,49 +15,8 @@
|
||||
# along with this program. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
from gi.repository import Eek, EekXkl, Gio
|
||||
|
||||
from eekboard import Eekboard
|
||||
from context import Context
|
||||
|
||||
Keyboard = Eek.Keyboard
|
||||
Section = Eek.Section
|
||||
Key = Eek.Key
|
||||
Symbol = Eek.Symbol
|
||||
Keysym = Eek.Keysym
|
||||
|
||||
MODIFIER_BEHAVIOR_NONE, \
|
||||
MODIFIER_BEHAVIOR_LOCK, \
|
||||
MODIFIER_BEHAVIOR_LATCH = \
|
||||
(Eek.ModifierBehavior.NONE,
|
||||
Eek.ModifierBehavior.LOCK,
|
||||
Eek.ModifierBehavior.LATCH)
|
||||
|
||||
CSW = 640
|
||||
CSH = 480
|
||||
|
||||
def XmlKeyboard(path, modifier_behavior=MODIFIER_BEHAVIOR_NONE):
|
||||
_file = Gio.file_new_for_path(path)
|
||||
layout = Eek.XmlLayout.new(_file.read())
|
||||
keyboard = Eek.Keyboard.new(layout, CSW, CSH)
|
||||
keyboard.set_modifier_behavior(modifier_behavior)
|
||||
return keyboard
|
||||
|
||||
def XklKeyboard(modifier_behavior=MODIFIER_BEHAVIOR_NONE):
|
||||
layout = EekXkl.Layout.new()
|
||||
keyboard = Eek.Keyboard.new(layout, CSW, CSH)
|
||||
keyboard.set_modifier_behavior(modifier_behavior)
|
||||
return keyboard
|
||||
|
||||
__all__ = ['Eekboard',
|
||||
'Context',
|
||||
'Keyboard',
|
||||
'Section',
|
||||
'Key',
|
||||
'Symbol',
|
||||
'Keysym',
|
||||
'MODIFIER_BEHAVIOR_NONE',
|
||||
'MODIFIER_BEHAVIOR_LOCK',
|
||||
'MODIFIER_BEHAVIOR_LATCH',
|
||||
'XmlKeyboard',
|
||||
'XklKeyboard']
|
||||
from symbol import *
|
||||
from keysym import *
|
||||
from serializable import *
|
||||
from client import *
|
||||
from context import *
|
||||
|
||||
56
bindings/python/eekboard/client.py
Normal file
56
bindings/python/eekboard/client.py
Normal file
@ -0,0 +1,56 @@
|
||||
# Copyright (C) 2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2011 Red Hat, Inc.
|
||||
|
||||
# This program 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 program 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
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
import dbus
|
||||
import dbus.mainloop.glib
|
||||
import gobject
|
||||
from context import Context
|
||||
|
||||
dbus.mainloop.glib.DBusGMainLoop(set_as_default = True)
|
||||
|
||||
class Client(gobject.GObject):
|
||||
__gtype_name__ = "PYEekboardClient"
|
||||
__gsignals__ = {
|
||||
'destroyed': (
|
||||
gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
())
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
super(Client, self).__init__()
|
||||
self.__bus = dbus.SessionBus()
|
||||
_service = self.__bus.get_object("org.fedorahosted.Eekboard",
|
||||
"/org/fedorahosted/Eekboard")
|
||||
self.__service = dbus.Interface(_service, dbus_interface="org.fedorahosted.Eekboard")
|
||||
self.__service.connect_to_signal("Destroyed", self.__destroyed_cb)
|
||||
|
||||
def __destroyed_cb(self):
|
||||
self.emit("destroyed")
|
||||
|
||||
def create_context(self, client_name):
|
||||
object_path = self.__service.CreateContext(client_name)
|
||||
return Context(self.__bus, object_path)
|
||||
|
||||
def push_context(self, context):
|
||||
self.__service.PushContext(context.object_path)
|
||||
|
||||
def pop_context(self):
|
||||
self.__service.PopContext()
|
||||
|
||||
def destroy_context(self, context):
|
||||
self.__service.DestroyContext(context.object_path)
|
||||
@ -15,8 +15,9 @@
|
||||
# along with this program. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
from gi.repository import Eekboard
|
||||
import dbus
|
||||
import gobject
|
||||
import serializable
|
||||
|
||||
class Context(gobject.GObject):
|
||||
__gtype_name__ = "PYEekboardContext"
|
||||
@ -32,48 +33,94 @@ class Context(gobject.GObject):
|
||||
'key-pressed': (
|
||||
gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
(gobject.TYPE_UINT,)),
|
||||
'key-released': (
|
||||
(gobject.TYPE_STRING, gobject.TYPE_PYOBJECT, gobject.TYPE_UINT)),
|
||||
'destroyed': (
|
||||
gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
(gobject.TYPE_UINT,))
|
||||
()),
|
||||
}
|
||||
|
||||
def __init__(self, giobject):
|
||||
__gproperties__ = {
|
||||
'visible': (gobject.TYPE_BOOLEAN, 'Visible', 'Visible',
|
||||
False, gobject.PARAM_READWRITE),
|
||||
'keyboard': (gobject.TYPE_UINT, 'Keyboard', 'Keyboard',
|
||||
0, gobject.G_MAXUINT, 0, gobject.PARAM_READWRITE),
|
||||
'group': (gobject.TYPE_UINT, 'Group', 'Group',
|
||||
0, gobject.G_MAXUINT, 0, gobject.PARAM_READWRITE),
|
||||
}
|
||||
|
||||
def __init__(self, bus, object_path):
|
||||
super(Context, self).__init__()
|
||||
import sys
|
||||
self.__giobject = giobject
|
||||
self.__giobject.connect('enabled', lambda *args: self.emit('enabled'))
|
||||
self.__giobject.connect('disabled', lambda *args: self.emit('disabled'))
|
||||
self.__giobject.connect('key-pressed', lambda *args: self.emit('key-pressed', args[1]))
|
||||
self.__giobject.connect('key-released', lambda *args: self.emit('key-released', args[1]))
|
||||
self.__bus = bus
|
||||
self.__object_path = object_path
|
||||
self.__properties = {}
|
||||
_context = self.__bus.get_object("org.fedorahosted.Eekboard",
|
||||
object_path)
|
||||
self.__context = dbus.Interface(_context, dbus_interface="org.fedorahosted.Eekboard.Context")
|
||||
|
||||
def get_giobject(self):
|
||||
return self.__giobject
|
||||
self.__context.connect_to_signal('Enabled', self.__enabled_cb)
|
||||
self.__context.connect_to_signal('Disabled', self.__disabled_cb)
|
||||
self.__context.connect_to_signal('KeyPressed', self.__key_pressed_cb)
|
||||
self.__context.connect_to_signal('Destroyed', self.__destroyed_cb)
|
||||
self.__context.connect_to_signal('VisibilityChanged', self.__visibility_changed_cb)
|
||||
self.__context.connect_to_signal('KeyboardChanged', self.__keyboard_changed_cb)
|
||||
self.__context.connect_to_signal('GroupChanged', self.__group_changed_cb)
|
||||
|
||||
def add_keyboard(self, keyboard):
|
||||
return self.__giobject.add_keyboard(keyboard, None)
|
||||
object_path = property(lambda self: self.__object_path)
|
||||
|
||||
def __enabled_cb(self):
|
||||
self.emit('enabled')
|
||||
|
||||
def __disabled_cb(self):
|
||||
self.emit('disabled')
|
||||
|
||||
def __key_pressed_cb(self, *args):
|
||||
keyname = args[0]
|
||||
symbol = serializable.deserialize_object(args[1])
|
||||
modifiers = args[2]
|
||||
self.emit('key-pressed', keyname, symbol, modifiers)
|
||||
|
||||
def __visibility_changed_cb(self, *args):
|
||||
self.set_property('visible', args[0])
|
||||
self.notify('visible')
|
||||
|
||||
def __keyboard_changed_cb(self, *args):
|
||||
self.set_property('keyboard', args[0])
|
||||
self.notify('keyboard')
|
||||
|
||||
def __group_changed_cb(self, *args):
|
||||
self.set_property('group', args[0])
|
||||
self.notify('group')
|
||||
|
||||
def __destroyed_cb(self):
|
||||
self.emit("destroyed")
|
||||
|
||||
def do_set_property(self, pspec, value):
|
||||
self.__properties[pspec.name] = value
|
||||
|
||||
def do_get_property(self, pspec):
|
||||
return self.__properties[pspec.name]
|
||||
|
||||
def add_keyboard(self, keyboard_type):
|
||||
return self.__context.AddKeyboard(keyboard_type)
|
||||
|
||||
def remove_keyboard(self, keyboard_id):
|
||||
return self.__giobject.remove_keyboard(keyboard_id, None)
|
||||
return self.__context.RemoveKeyboard(keyboard_id)
|
||||
|
||||
def set_keyboard(self, keyboard_id):
|
||||
self.__giobject.set_keyboard(keyboard_id, None)
|
||||
self.__context.SetKeyboard(keyboard_id)
|
||||
|
||||
def show_keyboard(self):
|
||||
self.__giobject.show_keyboard(None)
|
||||
self.__context.ShowKeyboard()
|
||||
|
||||
def hide_keyboard(self):
|
||||
self.__giobject.hide_keyboard(None)
|
||||
self.__context.HideKeyboard()
|
||||
|
||||
def set_group(self, group):
|
||||
self.__giobject.set_group(group, None)
|
||||
self.__context.SetGroup(group)
|
||||
|
||||
def press_key(self, keycode):
|
||||
self.__giobject.press_key(keycode, None)
|
||||
def press_keycode(self, keycode):
|
||||
self.__context.PressKeycode(keycode)
|
||||
|
||||
def release_key(self, keycode):
|
||||
self.__giobject.release_key(keycode, None)
|
||||
|
||||
def is_enabled(self):
|
||||
return self.__giobject.is_enabled()
|
||||
def release_keycode(self, keycode):
|
||||
self.__context.ReleaseKeycode(keycode)
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
# Copyright (C) 2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2011 Red Hat, Inc.
|
||||
|
||||
# This program 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 program 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
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
from gi.repository import Gio
|
||||
import gi.repository
|
||||
import gobject
|
||||
from context import Context
|
||||
|
||||
class Eekboard(gobject.GObject):
|
||||
__gtype_name__ = "PYEekboardEekboard"
|
||||
|
||||
def __init__(self):
|
||||
super(Eekboard, self).__init__()
|
||||
self.__connection = Gio.bus_get_sync(Gio.BusType.SESSION, None)
|
||||
self.__eekboard = gi.repository.Eekboard.Eekboard.new(self.__connection, None);
|
||||
|
||||
def create_context(self, client_name):
|
||||
context = self.__eekboard.create_context(client_name, None)
|
||||
return Context(context)
|
||||
|
||||
def push_context(self, context):
|
||||
self.__eekboard.push_context(context.get_giobject(), None)
|
||||
|
||||
def pop_context(self):
|
||||
self.__eekboard.pop_context(None)
|
||||
|
||||
def destroy_context(self, context):
|
||||
self.__eekboard.destroy_context(context.get_giobject(), None)
|
||||
35
bindings/python/eekboard/keysym.py
Normal file
35
bindings/python/eekboard/keysym.py
Normal file
@ -0,0 +1,35 @@
|
||||
# Copyright (C) 2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2011 Red Hat, Inc.
|
||||
|
||||
# This program 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 program 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
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
import symbol
|
||||
|
||||
class Keysym(symbol.Symbol):
|
||||
__gtype_name__ = "PYEekKeysym"
|
||||
__NAME__ = "EekKeysym"
|
||||
|
||||
def __init__(self):
|
||||
super(Keysym, self).__init__()
|
||||
|
||||
xkeysym = property(lambda self: self.xkeysym)
|
||||
|
||||
def serialize(self, struct):
|
||||
super(Keysym, self).serialize(struct)
|
||||
struct.append(dbus.UInt32(self.__xkeysym))
|
||||
|
||||
def deserialize(self, struct):
|
||||
super(Keysym, self).deserialize(struct)
|
||||
self.__xkeysym = struct.pop(0)
|
||||
76
bindings/python/eekboard/serializable.py
Normal file
76
bindings/python/eekboard/serializable.py
Normal file
@ -0,0 +1,76 @@
|
||||
# vim:set et sts=4 sw=4:
|
||||
#
|
||||
# ibus - The Input Bus
|
||||
#
|
||||
# Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com>
|
||||
# Copyright (c) 2007-2010 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 program; if not, write to the
|
||||
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
# Boston, MA 02111-1307 USA
|
||||
|
||||
__all__ = (
|
||||
"Serializable",
|
||||
"serialize_object",
|
||||
"deserialize_object",
|
||||
)
|
||||
|
||||
import dbus
|
||||
import gobject
|
||||
|
||||
__serializable_name_dict = dict()
|
||||
|
||||
def serializable_register(classobj):
|
||||
# if not issubclass(classobj, Serializable):
|
||||
# raise "%s is not a sub-class of Serializable" % str(classobj)
|
||||
__serializable_name_dict[classobj.__NAME__] = classobj
|
||||
|
||||
def serialize_object(o):
|
||||
if isinstance(o, Serializable):
|
||||
l = [o.__NAME__]
|
||||
o.serialize(l)
|
||||
return dbus.Struct(l)
|
||||
else:
|
||||
return o
|
||||
|
||||
def deserialize_object(v):
|
||||
if isinstance(v, tuple):
|
||||
struct = list(v)
|
||||
type_name = struct.pop(0)
|
||||
type_class = __serializable_name_dict[type_name]
|
||||
o = type_class()
|
||||
o.deserialize (struct)
|
||||
return o
|
||||
return v
|
||||
|
||||
class SerializableMeta(gobject.GObjectMeta):
|
||||
def __init__(cls, name, bases, dict_):
|
||||
super(SerializableMeta, cls).__init__(name, bases, dict_)
|
||||
if "__NAME__" in cls.__dict__:
|
||||
serializable_register(cls)
|
||||
|
||||
class Serializable(gobject.GObject):
|
||||
__metaclass__ = SerializableMeta
|
||||
__gtype_name__ = "PYEekSerializable"
|
||||
__NAME__ = "EekSerializable"
|
||||
def __init__(self):
|
||||
super(Serializable, self).__init__()
|
||||
|
||||
def serialize(self, struct):
|
||||
pass
|
||||
|
||||
def deserialize(self, struct):
|
||||
pass
|
||||
|
||||
__serializable_name_dict["EekSerializable"] = Serializable
|
||||
47
bindings/python/eekboard/symbol.py
Normal file
47
bindings/python/eekboard/symbol.py
Normal file
@ -0,0 +1,47 @@
|
||||
# Copyright (C) 2011 Daiki Ueno <ueno@unixuser.org>
|
||||
# Copyright (C) 2011 Red Hat, Inc.
|
||||
|
||||
# This program 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 program 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
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
import serializable
|
||||
|
||||
class Symbol(serializable.Serializable):
|
||||
__gtype_name__ = "PYEekSymbol"
|
||||
__NAME__ = "EekSymbol"
|
||||
|
||||
def __init__(self):
|
||||
super(Symbol, self).__init__()
|
||||
|
||||
name = property(lambda self: self.__name)
|
||||
label = property(lambda self: self.__label)
|
||||
category = property(lambda self: self.__category)
|
||||
modifier_mask = property(lambda self: self.__modifier_mask)
|
||||
icon_name = property(lambda self: self.__icon_name)
|
||||
|
||||
def serialize(self, struct):
|
||||
super(Symbol, self).serialize(struct)
|
||||
struct.append(dbus.String(self.__name))
|
||||
struct.append(dbus.String(self.__label))
|
||||
struct.append(dbus.UInt32(self.__category))
|
||||
struct.append(dbus.UInt32(self.__modifier_mask))
|
||||
struct.append(dbus.String(self.__icon_name))
|
||||
|
||||
def deserialize(self, struct):
|
||||
super(Symbol, self).deserialize(struct)
|
||||
self.__name = struct.pop(0)
|
||||
self.__label = struct.pop(0)
|
||||
self.__category = struct.pop(0)
|
||||
self.__modifier_mask = struct.pop(0)
|
||||
self.__icon_name = struct.pop(0)
|
||||
@ -26,25 +26,49 @@ dist_vapi_DATA = \
|
||||
MAINTAINERCLEANFILES = $(dist_vapi_DATA)
|
||||
|
||||
eek-$(EEK_API_VERSION).vapi:
|
||||
vapigen --library eek-$(EEK_API_VERSION) \
|
||||
$(VAPIGEN_V)$(VAPIGEN) \
|
||||
--library eek-$(EEK_API_VERSION) \
|
||||
--pkg gio-2.0 \
|
||||
eek-$(EEK_API_VERSION)/eek-$(EEK_API_VERSION).gi
|
||||
|
||||
eek-clutter-$(EEK_API_VERSION).vapi: eek-$(EEK_API_VERSION).vapi
|
||||
vapigen --vapidir=$(builddir) --library eek-clutter-$(EEK_API_VERSION) \
|
||||
--pkg eek-$(EEK_API_VERSION) --pkg clutter-1.0 \
|
||||
$(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \
|
||||
--library eek-clutter-$(EEK_API_VERSION) \
|
||||
--pkg eek-$(EEK_API_VERSION) \
|
||||
--pkg clutter-1.0 \
|
||||
--pkg gio-2.0 \
|
||||
--pkg atk \
|
||||
eek-clutter-$(EEK_API_VERSION)/eek-clutter-$(EEK_API_VERSION).gi
|
||||
|
||||
eek-gtk-$(EEK_API_VERSION).vapi: eek-$(EEK_API_VERSION).vapi
|
||||
vapigen --vapidir=$(builddir) --library eek-gtk-$(EEK_API_VERSION) \
|
||||
--pkg eek-$(EEK_API_VERSION) --pkg gtk+-2.0 \
|
||||
$(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \
|
||||
--library eek-gtk-$(EEK_API_VERSION) \
|
||||
--pkg eek-$(EEK_API_VERSION) \
|
||||
--pkg gtk+-2.0 \
|
||||
eek-gtk-$(EEK_API_VERSION)/eek-gtk-$(EEK_API_VERSION).gi
|
||||
|
||||
eek-xkb-$(EEK_API_VERSION).vapi: eek-$(EEK_API_VERSION).vapi
|
||||
vapigen --vapidir=$(builddir) --library eek-xkb-$(EEK_API_VERSION) \
|
||||
$(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \
|
||||
--library eek-xkb-$(EEK_API_VERSION) \
|
||||
--pkg eek-$(EEK_API_VERSION) \
|
||||
--pkg gio-2.0 \
|
||||
eek-xkb-$(EEK_API_VERSION)/eek-xkb-$(EEK_API_VERSION).gi
|
||||
|
||||
eek-xkl-$(EEK_API_VERSION).vapi: eek-xkb-$(EEK_API_VERSION).vapi
|
||||
vapigen --vapidir=$(builddir) --library eek-xkl-$(EEK_API_VERSION) \
|
||||
--pkg eek-$(EEK_API_VERSION) --pkg eek-xkb-$(EEK_API_VERSION) \
|
||||
$(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \
|
||||
--library eek-xkl-$(EEK_API_VERSION) \
|
||||
--pkg eek-$(EEK_API_VERSION) \
|
||||
--pkg eek-xkb-$(EEK_API_VERSION) --pkg gio-2.0 \
|
||||
eek-xkl-$(EEK_API_VERSION)/eek-xkl-$(EEK_API_VERSION).gi
|
||||
|
||||
eekboard-$(EEK_API_VERSION).vapi:
|
||||
$(VAPIGEN_V)$(VAPIGEN) \
|
||||
--library eekboard-$(EEK_API_VERSION) \
|
||||
--pkg eek-$(EEK_API_VERSION) \
|
||||
--pkg gio-2.0 \
|
||||
eek-$(EEK_API_VERSION)/eek-$(EEK_API_VERSION).gi
|
||||
|
||||
# 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 " $@;
|
||||
|
||||
2
bindings/vala/eek-0.90/eek-0.90.defines
Normal file
2
bindings/vala/eek-0.90/eek-0.90.defines
Normal file
@ -0,0 +1,2 @@
|
||||
-DEEK_COMPILATION=1
|
||||
|
||||
@ -1,9 +1,16 @@
|
||||
include/eek-0.1/eek/eek-layout.h
|
||||
include/eek-0.1/eek/eek-element.h
|
||||
include/eek-0.1/eek/eek-container.h
|
||||
include/eek-0.1/eek/eek-keyboard.h
|
||||
include/eek-0.1/eek/eek-section.h
|
||||
include/eek-0.1/eek/eek-key.h
|
||||
include/eek-0.1/eek/eek-types.h
|
||||
include/eek-0.1/eek/eek-keysym.h
|
||||
include/eek-0.90/eek/eek-container.h
|
||||
include/eek-0.90/eek/eek-element.h
|
||||
include/eek-0.90/eek/eek-enumtypes.h
|
||||
include/eek-0.90/eek/eek-keyboard.h
|
||||
include/eek-0.90/eek/eek-key.h
|
||||
include/eek-0.90/eek/eek-keysym.h
|
||||
include/eek-0.90/eek/eek-layout.h
|
||||
include/eek-0.90/eek/eek-section.h
|
||||
include/eek-0.90/eek/eek-serializable.h
|
||||
include/eek-0.90/eek/eek-symbol.h
|
||||
include/eek-0.90/eek/eek-symbol-matrix.h
|
||||
include/eek-0.90/eek/eek-theme.h
|
||||
include/eek-0.90/eek/eek-types.h
|
||||
include/eek-0.90/eek/eek-xml.h
|
||||
include/eek-0.90/eek/eek-xml-layout.h
|
||||
lib/libeek.so
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
2
bindings/vala/eek-clutter-0.90/eek-clutter-0.90.defines
Normal file
2
bindings/vala/eek-clutter-0.90/eek-clutter-0.90.defines
Normal file
@ -0,0 +1,2 @@
|
||||
-DEEK_COMPILATION=1
|
||||
|
||||
@ -1,6 +1,2 @@
|
||||
include/eek-0.1/eek/eek-clutter-keyboard.h
|
||||
include/eek-0.1/eek/eek-clutter-section.h
|
||||
include/eek-0.1/eek/eek-clutter-key.h
|
||||
include/eek-0.1/eek/eek-clutter-drawing-context.h
|
||||
include/eek-0.90/eek/eek-clutter-keyboard.h
|
||||
lib/libeek-clutter.so
|
||||
|
||||
|
||||
@ -1,85 +1,28 @@
|
||||
<?xml version="1.0"?>
|
||||
<api version="1.0">
|
||||
<namespace name="EekClutter">
|
||||
<object name="EekClutterDrawingContext" parent="GInitiallyUnowned" type-name="EekClutterDrawingContext" get-type="eek_clutter_drawing_context_get_type">
|
||||
<method name="get_category_font" symbol="eek_clutter_drawing_context_get_category_font">
|
||||
<return-type type="PangoFontDescription*"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekClutterDrawingContext*"/>
|
||||
<parameter name="category" type="EekKeysymCategory"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="get_outline_texture" symbol="eek_clutter_drawing_context_get_outline_texture">
|
||||
<object name="EekClutterKeyboard" parent="ClutterGroup" type-name="EekClutterKeyboard" get-type="eek_clutter_keyboard_get_type">
|
||||
<implements>
|
||||
<interface name="ClutterScriptable"/>
|
||||
<interface name="ClutterAnimatable"/>
|
||||
<interface name="AtkImplementor"/>
|
||||
<interface name="ClutterContainer"/>
|
||||
</implements>
|
||||
<constructor name="new" symbol="eek_clutter_keyboard_new">
|
||||
<return-type type="ClutterActor*"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekClutterDrawingContext*"/>
|
||||
<parameter name="outline" type="EekOutline*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<constructor name="new" symbol="eek_clutter_drawing_context_new">
|
||||
<return-type type="EekClutterDrawingContext*"/>
|
||||
</constructor>
|
||||
<method name="set_category_font" symbol="eek_clutter_drawing_context_set_category_font">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekClutterDrawingContext*"/>
|
||||
<parameter name="category" type="EekKeysymCategory"/>
|
||||
<parameter name="fonts" type="PangoFontDescription*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="set_outline_texture" symbol="eek_clutter_drawing_context_set_outline_texture">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekClutterDrawingContext*"/>
|
||||
<parameter name="outline" type="EekOutline*"/>
|
||||
<parameter name="texture" type="ClutterActor*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
</object>
|
||||
<object name="EekClutterKey" parent="EekKey" type-name="EekClutterKey" get-type="eek_clutter_key_get_type">
|
||||
<method name="get_actor" symbol="eek_clutter_key_get_actor">
|
||||
<return-type type="ClutterActor*"/>
|
||||
<parameters>
|
||||
<parameter name="key" type="EekClutterKey*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<constructor name="new" symbol="eek_clutter_key_new">
|
||||
<return-type type="EekKey*"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekClutterDrawingContext*"/>
|
||||
<parameter name="column" type="gint"/>
|
||||
<parameter name="row" type="gint"/>
|
||||
<parameter name="keyboard" type="EekKeyboard*"/>
|
||||
</parameters>
|
||||
</constructor>
|
||||
</object>
|
||||
<object name="EekClutterKeyboard" parent="EekKeyboard" type-name="EekClutterKeyboard" get-type="eek_clutter_keyboard_get_type">
|
||||
<method name="get_actor" symbol="eek_clutter_keyboard_get_actor">
|
||||
<return-type type="ClutterActor*"/>
|
||||
<method name="set_theme" symbol="eek_clutter_keyboard_set_theme">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="keyboard" type="EekClutterKeyboard*"/>
|
||||
<parameter name="theme" type="EekTheme*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<constructor name="new" symbol="eek_clutter_keyboard_new">
|
||||
<return-type type="EekKeyboard*"/>
|
||||
</constructor>
|
||||
<property name="keyboard" type="EekKeyboard*" readable="0" writable="1" construct="0" construct-only="1"/>
|
||||
</object>
|
||||
<object name="EekClutterSection" parent="EekSection" type-name="EekClutterSection" get-type="eek_clutter_section_get_type">
|
||||
<method name="get_actor" symbol="eek_clutter_section_get_actor">
|
||||
<return-type type="ClutterActor*"/>
|
||||
<parameters>
|
||||
<parameter name="section" type="EekClutterSection*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<constructor name="new" symbol="eek_clutter_section_new">
|
||||
<return-type type="EekSection*"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekClutterDrawingContext*"/>
|
||||
</parameters>
|
||||
</constructor>
|
||||
</object>
|
||||
<constant name="EEK_CLUTTER_DRAWING_CONTEXT_H" type="int" value="1"/>
|
||||
<constant name="EEK_CLUTTER_KEYBOARD_H" type="int" value="1"/>
|
||||
<constant name="EEK_CLUTTER_KEY_H" type="int" value="1"/>
|
||||
<constant name="EEK_CLUTTER_SECTION_H" type="int" value="1"/>
|
||||
</namespace>
|
||||
</api>
|
||||
|
||||
2
bindings/vala/eek-gtk-0.90/eek-gtk-0.90.defines
Normal file
2
bindings/vala/eek-gtk-0.90/eek-gtk-0.90.defines
Normal file
@ -0,0 +1,2 @@
|
||||
-DEEK_COMPILATION=1
|
||||
|
||||
@ -1,3 +1,2 @@
|
||||
include/eek-0.1/eek/eek-gtk-keyboard.h
|
||||
include/eek-0.1/eek/eek-gtk.h
|
||||
include/eek-0.90/eek/eek-gtk-keyboard.h
|
||||
lib/libeek-gtk.so
|
||||
|
||||
@ -1,18 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<api version="1.0">
|
||||
<namespace name="EekGtk">
|
||||
<object name="EekGtkKeyboard" parent="EekKeyboard" type-name="EekGtkKeyboard" get-type="eek_gtk_keyboard_get_type">
|
||||
<method name="get_widget" symbol="eek_gtk_keyboard_get_widget">
|
||||
<object name="EekGtkKeyboard" parent="GtkDrawingArea" type-name="EekGtkKeyboard" get-type="eek_gtk_keyboard_get_type">
|
||||
<implements>
|
||||
<interface name="AtkImplementor"/>
|
||||
<interface name="GtkBuildable"/>
|
||||
</implements>
|
||||
<constructor name="new" symbol="eek_gtk_keyboard_new">
|
||||
<return-type type="GtkWidget*"/>
|
||||
<parameters>
|
||||
<parameter name="keyboard" type="EekKeyboard*"/>
|
||||
</parameters>
|
||||
</constructor>
|
||||
<method name="set_theme" symbol="eek_gtk_keyboard_set_theme">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="keyboard" type="EekGtkKeyboard*"/>
|
||||
<parameter name="theme" type="EekTheme*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<constructor name="new" symbol="eek_gtk_keyboard_new">
|
||||
<return-type type="EekKeyboard*"/>
|
||||
</constructor>
|
||||
<property name="keyboard" type="EekKeyboard*" readable="0" writable="1" construct="0" construct-only="1"/>
|
||||
</object>
|
||||
<constant name="EEK_GTK_H" type="int" value="1"/>
|
||||
<constant name="EEK_GTK_KEYBOARD_H" type="int" value="1"/>
|
||||
</namespace>
|
||||
</api>
|
||||
|
||||
2
bindings/vala/eek-xkb-0.90/eek-xkb-0.90.defines
Normal file
2
bindings/vala/eek-xkb-0.90/eek-xkb-0.90.defines
Normal file
@ -0,0 +1,2 @@
|
||||
-DEEK_COMPILATION=1
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
include/eek-0.1/eek/eek-xkb-layout.h
|
||||
include/eek-0.90/eek/eek-xkb-layout.h
|
||||
lib/libeek-xkb.so
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<api version="1.0">
|
||||
<namespace name="EekXkb">
|
||||
<object name="EekXkbLayout" parent="GInitiallyUnowned" type-name="EekXkbLayout" get-type="eek_xkb_layout_get_type">
|
||||
<implements>
|
||||
<interface name="EekLayout"/>
|
||||
</implements>
|
||||
<object name="EekXkbLayout" parent="EekLayout" type-name="EekXkbLayout" get-type="eek_xkb_layout_get_type">
|
||||
<method name="get_geometry" symbol="eek_xkb_layout_get_geometry">
|
||||
<return-type type="gchar*"/>
|
||||
<parameters>
|
||||
@ -40,7 +37,6 @@
|
||||
<parameter name="keycodes" type="gchar*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<!--
|
||||
<method name="set_names" symbol="eek_xkb_layout_set_names">
|
||||
<return-type type="gboolean"/>
|
||||
<parameters>
|
||||
@ -48,7 +44,19 @@
|
||||
<parameter name="names" type="XkbComponentNamesRec*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
-->
|
||||
<method name="set_names_full" symbol="eek_xkb_layout_set_names_full">
|
||||
<return-type type="gboolean"/>
|
||||
<parameters>
|
||||
<parameter name="layout" type="EekXkbLayout*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="set_names_full_valist" symbol="eek_xkb_layout_set_names_full_valist">
|
||||
<return-type type="gboolean"/>
|
||||
<parameters>
|
||||
<parameter name="layout" type="EekXkbLayout*"/>
|
||||
<parameter name="var_args" type="va_list"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="set_symbols" symbol="eek_xkb_layout_set_symbols">
|
||||
<return-type type="gboolean"/>
|
||||
<parameters>
|
||||
|
||||
@ -1 +1,2 @@
|
||||
EekXkb cheader_filename="eek/eek-xkb.h"
|
||||
eek_xkb_layout_set_names hidden="1"
|
||||
|
||||
2
bindings/vala/eek-xkl-0.90/eek-xkl-0.90.defines
Normal file
2
bindings/vala/eek-xkl-0.90/eek-xkl-0.90.defines
Normal file
@ -0,0 +1,2 @@
|
||||
-DEEK_COMPILATION=1
|
||||
|
||||
@ -1,3 +1,2 @@
|
||||
include/eek-0.1/eek/eek-xkl-layout.h
|
||||
include/eek-0.90/eek/eek-xkl-layout.h
|
||||
lib/libeek-xkl.so
|
||||
|
||||
|
||||
@ -2,9 +2,6 @@
|
||||
<api version="1.0">
|
||||
<namespace name="EekXkl">
|
||||
<object name="EekXklLayout" parent="EekXkbLayout" type-name="EekXklLayout" get-type="eek_xkl_layout_get_type">
|
||||
<implements>
|
||||
<interface name="EekLayout"/>
|
||||
</implements>
|
||||
<method name="disable_option" symbol="eek_xkl_layout_disable_option">
|
||||
<return-type type="gboolean"/>
|
||||
<parameters>
|
||||
@ -53,6 +50,23 @@
|
||||
<constructor name="new" symbol="eek_xkl_layout_new">
|
||||
<return-type type="EekLayout*"/>
|
||||
</constructor>
|
||||
<method name="set_config" symbol="eek_xkl_layout_set_config">
|
||||
<return-type type="gboolean"/>
|
||||
<parameters>
|
||||
<parameter name="layout" type="EekXklLayout*"/>
|
||||
<parameter name="config" type="XklConfigRec*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="set_config_full" symbol="eek_xkl_layout_set_config_full">
|
||||
<return-type type="gboolean"/>
|
||||
<parameters>
|
||||
<parameter name="layout" type="EekXklLayout*"/>
|
||||
<parameter name="model" type="gchar*"/>
|
||||
<parameter name="layouts" type="gchar**"/>
|
||||
<parameter name="variants" type="gchar**"/>
|
||||
<parameter name="options" type="gchar**"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="set_layouts" symbol="eek_xkl_layout_set_layouts">
|
||||
<return-type type="gboolean"/>
|
||||
<parameters>
|
||||
|
||||
@ -1 +1,2 @@
|
||||
EekXkl cheader_filename="eek/eek-xkl.h"
|
||||
eek_xkl_layout_set_config hidden="1"
|
||||
|
||||
2
bindings/vala/eekboard-0.90/eekboard-0.90.defines
Normal file
2
bindings/vala/eekboard-0.90/eekboard-0.90.defines
Normal file
@ -0,0 +1,2 @@
|
||||
-DEEKBOARD_COMPILATION
|
||||
|
||||
2
bindings/vala/eekboard-0.90/eekboard-0.90.files
Normal file
2
bindings/vala/eekboard-0.90/eekboard-0.90.files
Normal file
@ -0,0 +1,2 @@
|
||||
include/eekboard-0.90/eekboard
|
||||
lib/libeekboard.so
|
||||
340
bindings/vala/eekboard-0.90/eekboard-0.90.gi
Normal file
340
bindings/vala/eekboard-0.90/eekboard-0.90.gi
Normal file
@ -0,0 +1,340 @@
|
||||
<?xml version="1.0"?>
|
||||
<api version="1.0">
|
||||
<namespace name="Eekboard">
|
||||
<function name="xkl_config_rec_from_string" symbol="eekboard_xkl_config_rec_from_string">
|
||||
<return-type type="XklConfigRec*"/>
|
||||
<parameters>
|
||||
<parameter name="layouts" type="gchar*"/>
|
||||
</parameters>
|
||||
</function>
|
||||
<function name="xkl_config_rec_to_string" symbol="eekboard_xkl_config_rec_to_string">
|
||||
<return-type type="gchar*"/>
|
||||
<parameters>
|
||||
<parameter name="rec" type="XklConfigRec*"/>
|
||||
</parameters>
|
||||
</function>
|
||||
<function name="xkl_list_layout_variants" symbol="eekboard_xkl_list_layout_variants">
|
||||
<return-type type="GSList*"/>
|
||||
<parameters>
|
||||
<parameter name="registry" type="XklConfigRegistry*"/>
|
||||
<parameter name="layout" type="gchar*"/>
|
||||
</parameters>
|
||||
</function>
|
||||
<function name="xkl_list_layouts" symbol="eekboard_xkl_list_layouts">
|
||||
<return-type type="GSList*"/>
|
||||
<parameters>
|
||||
<parameter name="registry" type="XklConfigRegistry*"/>
|
||||
</parameters>
|
||||
</function>
|
||||
<function name="xkl_list_models" symbol="eekboard_xkl_list_models">
|
||||
<return-type type="GSList*"/>
|
||||
<parameters>
|
||||
<parameter name="registry" type="XklConfigRegistry*"/>
|
||||
</parameters>
|
||||
</function>
|
||||
<function name="xkl_list_option_groups" symbol="eekboard_xkl_list_option_groups">
|
||||
<return-type type="GSList*"/>
|
||||
<parameters>
|
||||
<parameter name="registry" type="XklConfigRegistry*"/>
|
||||
</parameters>
|
||||
</function>
|
||||
<function name="xkl_list_options" symbol="eekboard_xkl_list_options">
|
||||
<return-type type="GSList*"/>
|
||||
<parameters>
|
||||
<parameter name="registry" type="XklConfigRegistry*"/>
|
||||
<parameter name="group" type="gchar*"/>
|
||||
</parameters>
|
||||
</function>
|
||||
<object name="EekboardClient" parent="GDBusProxy" type-name="EekboardClient" get-type="eekboard_client_get_type">
|
||||
<implements>
|
||||
<interface name="GInitable"/>
|
||||
<interface name="GAsyncInitable"/>
|
||||
</implements>
|
||||
<method name="create_context" symbol="eekboard_client_create_context">
|
||||
<return-type type="EekboardContext*"/>
|
||||
<parameters>
|
||||
<parameter name="eekboard" type="EekboardClient*"/>
|
||||
<parameter name="client_name" type="gchar*"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="destroy_context" symbol="eekboard_client_destroy_context">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="eekboard" type="EekboardClient*"/>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<constructor name="new" symbol="eekboard_client_new">
|
||||
<return-type type="EekboardClient*"/>
|
||||
<parameters>
|
||||
<parameter name="connection" type="GDBusConnection*"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</constructor>
|
||||
<method name="pop_context" symbol="eekboard_client_pop_context">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="eekboard" type="EekboardClient*"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="push_context" symbol="eekboard_client_push_context">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="eekboard" type="EekboardClient*"/>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<signal name="destroyed" when="LAST">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="self" type="EekboardClient*"/>
|
||||
</parameters>
|
||||
</signal>
|
||||
</object>
|
||||
<object name="EekboardContext" parent="GDBusProxy" type-name="EekboardContext" get-type="eekboard_context_get_type">
|
||||
<implements>
|
||||
<interface name="GInitable"/>
|
||||
<interface name="GAsyncInitable"/>
|
||||
</implements>
|
||||
<method name="add_keyboard" symbol="eekboard_context_add_keyboard">
|
||||
<return-type type="guint"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
<parameter name="keyboard" type="gchar*"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="get_group" symbol="eekboard_context_get_group">
|
||||
<return-type type="gint"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="hide_keyboard" symbol="eekboard_context_hide_keyboard">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="is_enabled" symbol="eekboard_context_is_enabled">
|
||||
<return-type type="gboolean"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="is_keyboard_visible" symbol="eekboard_context_is_keyboard_visible">
|
||||
<return-type type="gboolean"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<constructor name="new" symbol="eekboard_context_new">
|
||||
<return-type type="EekboardContext*"/>
|
||||
<parameters>
|
||||
<parameter name="connection" type="GDBusConnection*"/>
|
||||
<parameter name="object_path" type="gchar*"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</constructor>
|
||||
<method name="press_keycode" symbol="eekboard_context_press_keycode">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
<parameter name="keycode" type="guint"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="release_keycode" symbol="eekboard_context_release_keycode">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
<parameter name="keycode" type="guint"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="remove_keyboard" symbol="eekboard_context_remove_keyboard">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
<parameter name="keyboard_id" type="guint"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="set_enabled" symbol="eekboard_context_set_enabled">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
<parameter name="enabled" type="gboolean"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="set_fullscreen" symbol="eekboard_context_set_fullscreen">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
<parameter name="fullscreen" type="gboolean"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="set_group" symbol="eekboard_context_set_group">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
<parameter name="group" type="gint"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="set_keyboard" symbol="eekboard_context_set_keyboard">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
<parameter name="keyboard_id" type="guint"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="show_keyboard" symbol="eekboard_context_show_keyboard">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContext*"/>
|
||||
<parameter name="cancellable" type="GCancellable*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<property name="visible" type="gboolean" readable="1" writable="0" construct="0" construct-only="0"/>
|
||||
<signal name="destroyed" when="LAST">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="self" type="EekboardContext*"/>
|
||||
</parameters>
|
||||
</signal>
|
||||
<signal name="disabled" when="LAST">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="self" type="EekboardContext*"/>
|
||||
</parameters>
|
||||
</signal>
|
||||
<signal name="enabled" when="LAST">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="self" type="EekboardContext*"/>
|
||||
</parameters>
|
||||
</signal>
|
||||
<signal name="key-pressed" when="LAST">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="self" type="EekboardContext*"/>
|
||||
<parameter name="keyname" type="char*"/>
|
||||
<parameter name="symbol" type="GObject*"/>
|
||||
<parameter name="modifiers" type="guint"/>
|
||||
</parameters>
|
||||
</signal>
|
||||
</object>
|
||||
<object name="EekboardContextService" parent="GObject" type-name="EekboardContextService" get-type="eekboard_context_service_get_type">
|
||||
<method name="disable" symbol="eekboard_context_service_disable">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContextService*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="enable" symbol="eekboard_context_service_enable">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContextService*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="get_client_name" symbol="eekboard_context_service_get_client_name">
|
||||
<return-type type="gchar*"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContextService*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="get_fullscreen" symbol="eekboard_context_service_get_fullscreen">
|
||||
<return-type type="gboolean"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContextService*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="get_keyboard" symbol="eekboard_context_service_get_keyboard">
|
||||
<return-type type="EekKeyboard*"/>
|
||||
<parameters>
|
||||
<parameter name="context" type="EekboardContextService*"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<property name="client-name" type="char*" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||
<property name="connection" type="GDBusConnection*" readable="1" writable="1" construct="1" construct-only="0"/>
|
||||
<property name="fullscreen" type="gboolean" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||
<property name="keyboard" type="EekKeyboard*" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||
<property name="object-path" type="char*" readable="1" writable="1" construct="1" construct-only="0"/>
|
||||
<property name="visible" type="gboolean" readable="1" writable="1" construct="0" construct-only="0"/>
|
||||
<signal name="disabled" when="LAST">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="self" type="EekboardContextService*"/>
|
||||
</parameters>
|
||||
</signal>
|
||||
<signal name="enabled" when="LAST">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="self" type="EekboardContextService*"/>
|
||||
</parameters>
|
||||
</signal>
|
||||
<vfunc name="create_keyboard">
|
||||
<return-type type="EekKeyboard*"/>
|
||||
<parameters>
|
||||
<parameter name="self" type="EekboardContextService*"/>
|
||||
<parameter name="keyboard_type" type="gchar*"/>
|
||||
</parameters>
|
||||
</vfunc>
|
||||
<vfunc name="hide_keyboard">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="self" type="EekboardContextService*"/>
|
||||
</parameters>
|
||||
</vfunc>
|
||||
<vfunc name="show_keyboard">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="self" type="EekboardContextService*"/>
|
||||
</parameters>
|
||||
</vfunc>
|
||||
</object>
|
||||
<object name="EekboardService" parent="GObject" type-name="EekboardService" get-type="eekboard_service_get_type">
|
||||
<constructor name="new" symbol="eekboard_service_new">
|
||||
<return-type type="EekboardService*"/>
|
||||
<parameters>
|
||||
<parameter name="object_path" type="gchar*"/>
|
||||
<parameter name="connection" type="GDBusConnection*"/>
|
||||
</parameters>
|
||||
</constructor>
|
||||
<property name="connection" type="GDBusConnection*" readable="1" writable="1" construct="1" construct-only="0"/>
|
||||
<property name="object-path" type="char*" readable="1" writable="1" construct="1" construct-only="0"/>
|
||||
<signal name="destroyed" when="LAST">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter name="object" type="EekboardService*"/>
|
||||
</parameters>
|
||||
</signal>
|
||||
<vfunc name="create_context">
|
||||
<return-type type="EekboardContextService*"/>
|
||||
<parameters>
|
||||
<parameter name="self" type="EekboardService*"/>
|
||||
<parameter name="client_name" type="gchar*"/>
|
||||
<parameter name="object_path" type="gchar*"/>
|
||||
</parameters>
|
||||
</vfunc>
|
||||
</object>
|
||||
<constant name="EEKBOARD_CLIENT_H" type="int" value="1"/>
|
||||
<constant name="EEKBOARD_CONTEXT_H" type="int" value="1"/>
|
||||
<constant name="EEKBOARD_CONTEXT_SERVICE_H" type="int" value="1"/>
|
||||
<constant name="EEKBOARD_CONTEXT_SERVICE_INTERFACE" type="char*" value="org.fedorahosted.Eekboard.Context"/>
|
||||
<constant name="EEKBOARD_CONTEXT_SERVICE_PATH" type="char*" value="/org/fedorahosted/Eekboard/Context_%d"/>
|
||||
<constant name="EEKBOARD_SERVICE_H" type="int" value="1"/>
|
||||
<constant name="EEKBOARD_SERVICE_INTERFACE" type="char*" value="org.fedorahosted.Eekboard"/>
|
||||
<constant name="EEKBOARD_SERVICE_PATH" type="char*" value="/org/fedorahosted/Eekboard"/>
|
||||
<constant name="EEKBOARD_XKLUTIL_H" type="int" value="1"/>
|
||||
</namespace>
|
||||
</api>
|
||||
1
bindings/vala/eekboard-0.90/eekboard-0.90.metadata
Normal file
1
bindings/vala/eekboard-0.90/eekboard-0.90.metadata
Normal file
@ -0,0 +1 @@
|
||||
Eekboard cheader_filename="eekboard/eekboard.h"
|
||||
1
bindings/vala/eekboard-0.90/eekboard-0.90.namespace
Normal file
1
bindings/vala/eekboard-0.90/eekboard-0.90.namespace
Normal file
@ -0,0 +1 @@
|
||||
Eekboard
|
||||
262
configure.ac
262
configure.ac
@ -20,7 +20,7 @@ AC_PREREQ(2.63)
|
||||
dnl AC_CONFIG_SRCDIR([configure.ac])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_INIT([eekboard], [0.90.3], [ueno@unixuser.org])
|
||||
AC_INIT([eekboard], [1.0.2], [ueno@unixuser.org])
|
||||
|
||||
dnl Init automake
|
||||
AM_INIT_AUTOMAKE
|
||||
@ -46,12 +46,12 @@ IT_PROG_INTLTOOL([0.35.0])
|
||||
|
||||
AC_MSG_CHECKING([which gtk+ version to compile against])
|
||||
AC_ARG_WITH([gtk],
|
||||
[AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 2.0)])],
|
||||
[AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 3.0)])],
|
||||
[case "$with_gtk" in
|
||||
2.0|3.0) ;;
|
||||
*) AC_MSG_ERROR([invalid gtk version specified]) ;;
|
||||
esac],
|
||||
[with_gtk=2.0])
|
||||
[with_gtk=3.0])
|
||||
AC_MSG_RESULT([$with_gtk])
|
||||
|
||||
case "$with_gtk" in
|
||||
@ -85,131 +85,228 @@ AM_CONDITIONAL([HAVE_GTK_2],[test "$with_gtk" = "2.0"])
|
||||
AM_CONDITIONAL([HAVE_GTK_3],[test "$with_gtk" = "3.0"])
|
||||
|
||||
AM_PATH_GLIB_2_0
|
||||
PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= 2.25.4], ,
|
||||
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([GCONF2], [gconf-2.0], ,
|
||||
[AC_MSG_ERROR([GConf not found])])
|
||||
PKG_CHECK_MODULES([XKB], [x11], ,
|
||||
[AC_MSG_ERROR([XKB support 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 libfakekey to generate key events
|
||||
AC_MSG_CHECKING([whether you enable fakekey])
|
||||
AC_ARG_ENABLE(fakekey,
|
||||
AS_HELP_STRING([--enable-fakekey=no/yes],
|
||||
[Enable fakekey default=yes]),,
|
||||
enable_fakekey=yes)
|
||||
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_fakekey = xyes; then
|
||||
PKG_CHECK_MODULES([FAKEKEY], [libfakekey], ,
|
||||
[AC_MSG_ERROR([fakekey not found])])
|
||||
AC_DEFINE([HAVE_FAKEKEY], [1], [Define if fakekey is found])
|
||||
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_FAKEKEY, [test x$enable_fakekey = xyes])
|
||||
AC_MSG_RESULT($enable_fakekey)
|
||||
AM_CONDITIONAL(ENABLE_XTEST, [test x$enable_xtest = xyes])
|
||||
AC_MSG_RESULT($enable_xtest)
|
||||
|
||||
dnl use AT-SPI to capture focus/keystroke events
|
||||
AC_MSG_CHECKING([whether you enable AT-SPI event handling])
|
||||
AC_ARG_ENABLE(cspi,
|
||||
AS_HELP_STRING([--enable-cspi=no/yes],
|
||||
[Enable AT-SPI event handling default=yes]),,
|
||||
enable_cspi=yes)
|
||||
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_cspi = xyes; then
|
||||
PKG_CHECK_MODULES([CSPI], [cspi-1.0], ,
|
||||
[AC_MSG_ERROR([AT-SPI C not found])])
|
||||
AC_DEFINE([HAVE_CSPI], [1], [Define if CSPI is found])
|
||||
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=""
|
||||
keystroke_listeners=""
|
||||
|
||||
focus_listeners=""
|
||||
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])
|
||||
|
||||
dnl use IBus to capture focus events
|
||||
AC_MSG_CHECKING([whether you enable IBus focus tracking])
|
||||
AC_ARG_ENABLE(ibus,
|
||||
AS_HELP_STRING([--enable-ibus=no/yes],
|
||||
[Enable IBus focus tracking default=yes]),
|
||||
enable_ibus=$enableval,
|
||||
enable_ibus=yes)
|
||||
|
||||
if test x$enable_ibus = xyes; then
|
||||
PKG_CHECK_MODULES([IBUS], [ibus-1.0 >= 1.3.99], , enable_ibus=no)
|
||||
if test x$enable_ibus = xyes; then
|
||||
AC_DEFINE([HAVE_IBUS], [1], [Define if IBus is found])
|
||||
focus_listeners="ibus $focus_listeners"
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT($enable_ibus)
|
||||
AM_CONDITIONAL(ENABLE_IBUS, [test x$enable_ibus = xyes])
|
||||
|
||||
if test -n "$focus_listeners"; then
|
||||
AC_DEFINE(ENABLE_FOCUS_LISTENER, [1], [Define if eekboard can follow focus changes])
|
||||
fi
|
||||
AC_MSG_RESULT($enable_cspi)
|
||||
AM_CONDITIONAL(ENABLE_CSPI, [test x$enable_cspi = xyes])
|
||||
|
||||
dnl Python language binding
|
||||
AC_MSG_CHECKING([whether you enable Python language support])
|
||||
AC_ARG_ENABLE(python,
|
||||
AS_HELP_STRING([--enable-python=no/yes],
|
||||
[Enable Python language binding default=yes]),,
|
||||
[Enable Python language binding default=yes]),
|
||||
enable_python=$enableval,
|
||||
enable_python=yes)
|
||||
AC_MSG_RESULT($enable_python)
|
||||
AM_CONDITIONAL(ENABLE_PYTHON, [test x$enable_python = xyes])
|
||||
|
||||
dnl check python unconditionally to re-generate
|
||||
dnl eek/*-keysym-labels.txt when maintainer-mode enabled
|
||||
AM_PATH_PYTHON([2.5], , enable_python=no)
|
||||
|
||||
if test x"$enable_python" = x"yes"; then
|
||||
# check python
|
||||
AM_PATH_PYTHON([2.5])
|
||||
AC_PATH_PROG(PYTHON_CONFIG, python$PYTHON_VERSION-config)
|
||||
if test x"$PYTHON_CONFIG" = x""; then
|
||||
AC_PATH_PROG(PYTHON_CONFIG, python-config)
|
||||
fi
|
||||
if test x$enable_python = xyes; then
|
||||
AC_PATH_PROGS(PYTHON_CONFIG, [python$PYTHON_VERSION-config python-config])
|
||||
if test x"$PYTHON_CONFIG" != x""; then
|
||||
PYTHON_CFLAGS=`$PYTHON_CONFIG --includes`
|
||||
PYTHON_LIBS=`$PYTHON_CONFIG --libs`
|
||||
PYTHON_CFLAGS=`$PYTHON_CONFIG --includes`
|
||||
PYTHON_LIBS=`$PYTHON_CONFIG --libs`
|
||||
else
|
||||
PYTHON_CFLAGS=`$PYTHON $srcdir/python-config.py --includes`
|
||||
PYTHON_LIBS=`$PYTHON $srcdir/python-config.py --libs`
|
||||
PYTHON_CFLAGS=`$PYTHON $srcdir/python-config.py --includes`
|
||||
PYTHON_LIBS=`$PYTHON $srcdir/python-config.py --libs`
|
||||
fi
|
||||
PYTHON_INCLUDES="$PYTHON_CFLAGS"
|
||||
AC_SUBST(PYTHON_CFLAGS)
|
||||
AC_SUBST(PYTHON_INCLUDES)
|
||||
AC_SUBST(PYTHON_LIBS)
|
||||
else
|
||||
enable_python="no (disabled, use --enable-python to enable)"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT($enable_python)
|
||||
AM_CONDITIONAL(ENABLE_PYTHON, [test x$enable_python = xyes])
|
||||
|
||||
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 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 standalone application
|
||||
AC_MSG_CHECKING([whether you enable eekboard])
|
||||
AC_ARG_ENABLE(eekboard,
|
||||
AS_HELP_STRING([--enable-eekboard=no/yes],
|
||||
[Build standalone application "ekboard" default=yes]),,
|
||||
enable_eekboard=yes)
|
||||
AC_MSG_RESULT($enable_eekboard)
|
||||
AM_CONDITIONAL(ENABLE_EEKBOARD, [test x$enable_eekboard = xyes])
|
||||
|
||||
dnl Clutter
|
||||
AC_MSG_CHECKING([whether you enable Clutter])
|
||||
dnl clutter
|
||||
AC_MSG_CHECKING([whether you enable clutter])
|
||||
AC_ARG_ENABLE(clutter,
|
||||
AS_HELP_STRING([--enable-clutter=no/yes],
|
||||
[Enable Clutter user interface default=yes]),,
|
||||
[Enable clutter user interface default=no]),
|
||||
enable_clutter=$enableval,
|
||||
enable_clutter=no)
|
||||
AC_MSG_RESULT($enable_clutter)
|
||||
|
||||
if test x$enable_clutter = xyes; then
|
||||
PKG_CHECK_MODULES([CLUTTER], [clutter-1.0], ,
|
||||
[AC_MSG_ERROR([Clutter not found -- install it or add --disable-clutter])])
|
||||
AC_DEFINE([HAVE_CLUTTER], [1], [Define if Clutter is found])
|
||||
have_clutter_gtk=0
|
||||
need_swap_event_workaround=0
|
||||
PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-1.0], [have_clutter_gtk=1],
|
||||
[PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-0.10 clutter-x11-1.0],
|
||||
[have_clutter_gtk=1; need_swap_event_workaround=1])])
|
||||
AC_DEFINE_UNQUOTED([HAVE_CLUTTER_GTK], $have_clutter_gtk,
|
||||
[Define if Clutter-Gtk is found])
|
||||
AC_DEFINE_UNQUOTED([NEED_SWAP_EVENT_WORKAROUND], $need_swap_event_workaround,
|
||||
[Define if GLX_INTEL_swap_event work around is needed])
|
||||
PKG_CHECK_MODULES([CLUTTER], [clutter-1.0], , enable_clutter=no)
|
||||
if test x$enable_clutter = xyes; then
|
||||
AC_DEFINE([HAVE_CLUTTER], [1], [Define if clutter is found])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_CLUTTER, [test x$enable_clutter = xyes])
|
||||
AC_MSG_RESULT($enable_clutter)
|
||||
|
||||
dnl clutter-gtk
|
||||
if test x$enable_clutter = xyes; then
|
||||
AC_MSG_CHECKING([whether you enable clutter-gtk])
|
||||
AC_ARG_ENABLE(clutter-gtk,
|
||||
AS_HELP_STRING([--enable-clutter-gtk=no/yes],
|
||||
[Enable clutter user interface default=yes]),
|
||||
enable_clutter_gtk=$enableval,
|
||||
enable_clutter_gtk=yes)
|
||||
|
||||
if test x$enable_clutter_gtk = xyes; then
|
||||
PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-1.0], ,
|
||||
enable_clutter_gtk=no)
|
||||
if test x$enable_clutter_gtk = xyes; then
|
||||
AC_DEFINE([HAVE_CLUTTER_GTK], [1], [Define if Clutter-Gtk is found])
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT($enable_clutter_gtk)
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_CLUTTER_GTK, [test x$enable_clutter_gtk = xyes])
|
||||
|
||||
dnl libcanberra
|
||||
AC_MSG_CHECKING([whether you enable libcanberra])
|
||||
AC_ARG_ENABLE(libcanberra,
|
||||
AS_HELP_STRING([--enable-libcanberra=no/yes],
|
||||
[Enable clutter 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 to re-generate eek/*-keysym-labels.txt
|
||||
AC_CHECK_PROGS([PYTHON], [python])
|
||||
|
||||
dnl define GETTEXT_* variables
|
||||
GETTEXT_PACKAGE=$PACKAGE
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
@ -217,8 +314,6 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the read-only
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
AM_GLIB_DEFINE_LOCALEDIR(EEKBOARD_LOCALEDIR)
|
||||
|
||||
GOBJECT_INTROSPECTION_CHECK([0.6.7])
|
||||
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_FILES([Makefile
|
||||
eek/Makefile
|
||||
@ -242,6 +337,11 @@ 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/eekxml/Makefile
|
||||
examples/simple-client/Makefile
|
||||
eek/eek-${EEK_API_VERSION}.pc
|
||||
eek/eek-clutter-${EEK_API_VERSION}.pc
|
||||
eek/eek-gtk-${EEK_API_VERSION}.pc
|
||||
@ -256,6 +356,14 @@ Build options:
|
||||
Build shared libs $enable_shared
|
||||
Build static libs $enable_static
|
||||
CFLAGS $CFLAGS
|
||||
Build vala binding $enable_vala
|
||||
GTK version $with_gtk
|
||||
Build Clutter UI $enable_clutter
|
||||
Build Vala binding $enable_vala
|
||||
Build Python binding $enable_python
|
||||
Sound support $enable_libcanberra
|
||||
Build document $enable_gtk_doc
|
||||
Focus listeners $focus_listeners
|
||||
Keystroke listeners $keystroke_listeners
|
||||
])
|
||||
|
||||
|
||||
|
||||
@ -1 +1,34 @@
|
||||
SUBDIRS = icons
|
||||
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
|
||||
|
||||
|
||||
6
data/eekboard-autostart.desktop.in
Normal file
6
data/eekboard-autostart.desktop.in
Normal file
@ -0,0 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Name=Eekboard
|
||||
Exec=eekboard -f
|
||||
Type=Application
|
||||
#AutostartCondition=GSettings org.gnome.desktop.a11y.applications screen-keyboard-enabled
|
||||
X-GNOME-AutoRestart=true
|
||||
@ -1,3 +1,3 @@
|
||||
[D-BUS Service]
|
||||
Name=com.redhat.Eekboard.Server
|
||||
Name=org.fedorahosted.Eekboard
|
||||
Exec=@bindir@/eekboard-server
|
||||
9
data/eekboard.desktop.in
Normal file
9
data/eekboard.desktop.in
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=Eekboard
|
||||
GenericName=Eekboard Virtual Keyboard
|
||||
Comment=Virtual Keyboard
|
||||
Exec=eekboard
|
||||
Icon=eekboard
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GTK;Utility;
|
||||
2
data/keyboards/Makefile.am
Normal file
2
data/keyboards/Makefile.am
Normal file
@ -0,0 +1,2 @@
|
||||
keyboarddir = $(pkgdatadir)/keyboards
|
||||
dist_keyboard_DATA = us.xml th.xml jp-kana.xml
|
||||
697
data/keyboards/jp-kana.xml
Normal file
697
data/keyboards/jp-kana.xml
Normal file
@ -0,0 +1,697 @@
|
||||
<?xml version="1.0"?>
|
||||
<keyboard version="0.90">
|
||||
<bounds>0.000000,0.000000,640.000000,296.585366</bounds>
|
||||
<section name="LeftModifiers">
|
||||
<bounds>16.000000,78.048780,94.000000,202.000000</bounds>
|
||||
<angle>0</angle>
|
||||
<row>
|
||||
<columns>5</columns>
|
||||
<orientation>0</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>5</columns>
|
||||
<orientation>0</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>5</columns>
|
||||
<orientation>0</orientation>
|
||||
</row>
|
||||
<key id="keycode61" name="TAB" column="1" row="0">
|
||||
<bounds>4.000000,43.000000,80.000000,38.000000</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="65289">Tab</keysym>
|
||||
<keysym keyval="65056">ISO_Left_Tab</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode56" name="CAPS" column="2" row="0">
|
||||
<bounds>4.000000,83.000000,80.000000,38.000000</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65507">Control_L</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode57" name="LFSH" column="3" row="0">
|
||||
<bounds>4.000000,122.000000,80.000000,38.000000</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65505">Shift_L</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode58" name="LCTL" column="4" row="0">
|
||||
<bounds>4.000000,162.341463,57.000000,38.000000</bounds>
|
||||
<oref>outline9</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol label="⌨" icon="input-keyboard-symbolic">cycle-keyboard</symbol>
|
||||
<symbol label="☺" icon="preferences-system-symbolic">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode60" name="BKSP" column="1" row="1">
|
||||
<bounds>517.000000,44.000000,80.000000,38.000000</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65288">BackSpace</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode62" name="RTRN" column="1" row="1">
|
||||
<bounds>517.000000,83.000000,80.000000,38.000000</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65293">Return</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode63" name="RTSH" column="2" row="1">
|
||||
<bounds>517.000000,122.000000,80.000000,38.000000</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65506">Shift_R</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode65" name="keycode65" column="0" row="2">
|
||||
<bounds>165.463415,162.341463,238.829268,37.463415</bounds>
|
||||
<oref>outline14</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="32">space</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode108" name="keycode108" column="1" row="2">
|
||||
<bounds>407.414634,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline10</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65361">Left</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode134" name="keycode134" column="2" row="2">
|
||||
<bounds>458.926829,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline10</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65362">Up</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode135" name="keycode135" column="3" row="2">
|
||||
<bounds>508.878049,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline10</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65364">Down</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode105" name="keycode105" column="4" row="2">
|
||||
<bounds>560.390244,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline10</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65363">Right</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
</section>
|
||||
<section name="Alpha">
|
||||
<bounds>99.000000,16.000000,469.000000,202.000000</bounds>
|
||||
<angle>0</angle>
|
||||
<row>
|
||||
<columns>5</columns>
|
||||
<orientation>0</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>5</columns>
|
||||
<orientation>0</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>5</columns>
|
||||
<orientation>0</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>5</columns>
|
||||
<orientation>0</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>5</columns>
|
||||
<orientation>0</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>5</columns>
|
||||
<orientation>0</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>5</columns>
|
||||
<orientation>0</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>5</columns>
|
||||
<orientation>0</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>5</columns>
|
||||
<orientation>0</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>5</columns>
|
||||
<orientation>0</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>5</columns>
|
||||
<orientation>0</orientation>
|
||||
</row>
|
||||
<key id="keycode1" name="AE03" column="0" row="0">
|
||||
<bounds>4.000000,4.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="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>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode2" name="AD03" column="1" row="0">
|
||||
<bounds>4.000000,43.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="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>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode3" name="AE04" column="2" row="0">
|
||||
<bounds>4.000000,82.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="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>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode4" name="AE05" column="3" row="0">
|
||||
<bounds>4.000000,121.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="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>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode5" name="AE06" column="4" row="0">
|
||||
<bounds>4.000000,160.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="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>
|
||||
</symbols>
|
||||
</key>
|
||||
|
||||
<key id="keycode6" name="AE03" column="0" row="1">
|
||||
<bounds>43.000000,4.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="116" label="か">t</keysym>
|
||||
<keysym keyval="116" label="カ">t</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode7" name="AD03" column="1" row="1">
|
||||
<bounds>43.000000,43.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="103" label="き">g</keysym>
|
||||
<keysym keyval="103" label="キ">g</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode8" name="AE04" column="2" row="1">
|
||||
<bounds>43.000000,82.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="104" label="く">h</keysym>
|
||||
<keysym keyval="104" label="ク">h</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode9" name="AE05" column="3" row="1">
|
||||
<bounds>43.000000,121.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="58" label="け">colon</keysym>
|
||||
<keysym keyval="58" label="ケ">colon</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode10" name="AE06" column="4" row="1">
|
||||
<bounds>43.000000,160.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="98" label="こ">b</keysym>
|
||||
<keysym keyval="98" label="コ">b</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
|
||||
<key id="keycode11" name="AE03" column="0" row="2">
|
||||
<bounds>82.000000,4.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="120" label="さ">x</keysym>
|
||||
<keysym keyval="120" label="サ">x</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode12" name="AD03" column="1" row="2">
|
||||
<bounds>82.000000,43.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="100" label="し">d</keysym>
|
||||
<keysym keyval="100" label="シ">d</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode13" name="AE04" column="2" row="0">
|
||||
<bounds>82.000000,82.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="114" label="す">r</keysym>
|
||||
<keysym keyval="114" label="ス">r</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode14" name="AE05" column="3" row="2">
|
||||
<bounds>82.000000,121.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="112" label="せ">p</keysym>
|
||||
<keysym keyval="112" label="セ">p</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode15" name="AE06" column="4" row="2">
|
||||
<bounds>82.000000,160.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="99" label="そ">c</keysym>
|
||||
<keysym keyval="99" label="ソ">c</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
|
||||
<key id="keycode16" name="AE03" column="0" row="3">
|
||||
<bounds>121.000000,4.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="113" label="た">q</keysym>
|
||||
<keysym keyval="113" label="タ">q</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode17" name="AD03" column="1" row="3">
|
||||
<bounds>121.000000,43.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="97" label="ち">a</keysym>
|
||||
<keysym keyval="97" label="チ">a</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode18" name="AE04" column="2" row="3">
|
||||
<bounds>121.000000,82.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="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>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode19" name="AE05" column="3" row="3">
|
||||
<bounds>121.000000,121.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="119" label="て">w</keysym>
|
||||
<keysym keyval="119" label="テ">w</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode20" name="AE06" column="4" row="3">
|
||||
<bounds>121.000000,160.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="115" label="と">s</keysym>
|
||||
<keysym keyval="115" label="ト">s</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
|
||||
<key id="keycode21" name="AE03" column="0" row="4">
|
||||
<bounds>160.000000,4.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="117" label="な">u</keysym>
|
||||
<keysym keyval="117" label="ナ">u</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode22" name="AD03" column="1" row="4">
|
||||
<bounds>160.000000,43.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="105" label="に">i</keysym>
|
||||
<keysym keyval="105" label="ニ">i</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode23" name="AE04" column="2" row="4">
|
||||
<bounds>160.000000,82.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="33" label="ぬ">exclam</keysym>
|
||||
<keysym keyval="33" label="ヌ">exclam</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode24" name="AE05" column="3" row="4">
|
||||
<bounds>160.000000,121.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="44" label="ね">comma</keysym>
|
||||
<keysym keyval="44" label="ネ">comma</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode25" name="AE06" column="4" row="4">
|
||||
<bounds>160.000000,160.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="107" label="の">k</keysym>
|
||||
<keysym keyval="107" label="ノ">k</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
|
||||
<key id="keycode26" name="AE03" column="0" row="5">
|
||||
<bounds>199.000000,4.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="102" label="は">f</keysym>
|
||||
<keysym keyval="102" label="ハ">f</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode27" name="AD03" column="1" row="5">
|
||||
<bounds>199.000000,43.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="118" label="ひ">v</keysym>
|
||||
<keysym keyval="118" label="ヒ">v</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode28" name="AE04" column="2" row="5">
|
||||
<bounds>199.000000,82.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="34" label="ふ">quotedbl</keysym>
|
||||
<keysym keyval="34" label="フ">quotedbl</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode29" name="AE05" column="3" row="5">
|
||||
<bounds>199.000000,121.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="94" label="へ">asciicircum</keysym>
|
||||
<keysym keyval="94" label="ヘ">asciicircum</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode30" name="AE06" column="4" row="5">
|
||||
<bounds>199.000000,160.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="61" label="ほ">equal</keysym>
|
||||
<keysym keyval="61" label="ホ">equal</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
|
||||
<key id="keycode31" name="AE03" column="0" row="6">
|
||||
<bounds>238.000000,4.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="106" label="ま">j</keysym>
|
||||
<keysym keyval="106" label="マ">j</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode32" name="AD03" column="1" row="6">
|
||||
<bounds>238.000000,43.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="110" label="み">n</keysym>
|
||||
<keysym keyval="110" label="ミ">n</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode33" name="AE04" column="2" row="6">
|
||||
<bounds>238.000000,82.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="93" label="む">bracketright</keysym>
|
||||
<keysym keyval="93" label="ム">bracketright</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode34" name="AE05" column="3" row="6">
|
||||
<bounds>238.000000,121.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="47" label="め">slash</keysym>
|
||||
<keysym keyval="47" label="メ">slash</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode35" name="AE06" column="4" row="6">
|
||||
<bounds>238.000000,160.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="109" label="も">m</keysym>
|
||||
<keysym keyval="109" label="モ">m</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
|
||||
<key id="keycode36" name="AE03" column="0" row="7">
|
||||
<bounds>277.000000,4.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="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>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode37" name="AD03" column="1" row="7">
|
||||
<bounds>277.000000,43.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="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>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode38" name="AE04" column="2" row="7">
|
||||
<bounds>277.000000,82.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="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>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode41" name="AE03" column="0" row="8">
|
||||
<bounds>316.000000,4.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="111" label="ら">o</keysym>
|
||||
<keysym keyval="111" label="ラ">o</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode42" name="AD03" column="1" row="8">
|
||||
<bounds>316.000000,43.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="108" label="り">l</keysym>
|
||||
<keysym keyval="108" label="リ">l</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode43" name="AE04" column="2" row="8">
|
||||
<bounds>316.000000,82.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="46" label="る">period</keysym>
|
||||
<keysym keyval="46" label="ル">period</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode44" name="AE05" column="3" row="8">
|
||||
<bounds>316.000000,121.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="59" label="れ">semicolon</keysym>
|
||||
<keysym keyval="59" label="レ">semicolon</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode45" name="AE06" column="4" row="8">
|
||||
<bounds>316.000000,160.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="92" label="ろ">backslash</keysym>
|
||||
<keysym keyval="92" label="ロ">backslash</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
|
||||
<key id="keycode46" name="AE03" column="0" row="9">
|
||||
<bounds>355.000000,4.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="48" label="わ">0</keysym>
|
||||
<keysym keyval="48" label="ワ">0</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode47" name="AD03" column="1" row="9">
|
||||
<bounds>355.000000,43.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="126" label="を">asciitilde</keysym>
|
||||
<keysym keyval="126" label="ヲ">asciitilde</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode48" name="AE04" column="2" row="9">
|
||||
<bounds>355.000000,82.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="121" label="ん">y</keysym>
|
||||
<keysym keyval="121" label="ン">y</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode49" name="AE05" column="3" row="9">
|
||||
<bounds>355.000000,121.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="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>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode50" name="AE06" column="4" row="9">
|
||||
<bounds>355.000000,160.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="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>
|
||||
</symbols>
|
||||
</key>
|
||||
|
||||
<key id="keycode51" name="AE03" column="0" row="10">
|
||||
<bounds>394.000000,4.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="64" label="゛">at</keysym>
|
||||
<keysym keyval="64" label="゛">at</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode52" name="AD03" column="1" row="10">
|
||||
<bounds>394.000000,43.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="91" label="゜">bracketleft</keysym>
|
||||
<keysym keyval="91" label="゜">bracketleft</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode53" name="AE04" column="2" row="10">
|
||||
<bounds>394.000000,82.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="124" label="ー">bar</keysym>
|
||||
<keysym keyval="124" label="ー">bar</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode54" name="AE05" column="3" row="10">
|
||||
<bounds>394.000000,121.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="1">
|
||||
<keysym keyval="60" label="、">less</keysym>
|
||||
<keysym keyval="60" label="、">less</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode55" name="AE06" column="4" row="10">
|
||||
<bounds>394.000000,160.000000,38.000000,38.000000</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="2" levels="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>
|
||||
</symbols>
|
||||
</key>
|
||||
</section>
|
||||
<outline id="outline1">
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>38.000000,0.000000</point>
|
||||
<point>38.000000,38.000000</point>
|
||||
<point>0.000000,38.000000</point>
|
||||
</outline>
|
||||
<outline id="outline3">
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>60.000000,0.000000</point>
|
||||
<point>60.000000,38.000000</point>
|
||||
<point>0.000000,38.000000</point>
|
||||
</outline>
|
||||
<outline id="outline4">
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>60.000000,0.000000</point>
|
||||
<point>60.000000,38.000000</point>
|
||||
<point>0.000000,38.000000</point>
|
||||
</outline>
|
||||
<outline id="outline5">
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>69.000000,0.000000</point>
|
||||
<point>69.000000,38.000000</point>
|
||||
<point>0.000000,38.000000</point>
|
||||
</outline>
|
||||
<outline id="outline6">
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>89.000000,0.000000</point>
|
||||
<point>89.000000,38.000000</point>
|
||||
<point>0.000000,38.000000</point>
|
||||
</outline>
|
||||
<outline id="outline7">
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>89.000000,0.000000</point>
|
||||
<point>89.000000,38.000000</point>
|
||||
<point>0.000000,38.000000</point>
|
||||
</outline>
|
||||
<outline id="outline8">
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>110.000000,0.000000</point>
|
||||
<point>110.000000,38.000000</point>
|
||||
<point>0.000000,38.000000</point>
|
||||
</outline>
|
||||
<outline id="outline9">
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>57.000000,0.000000</point>
|
||||
<point>57.000000,38.000000</point>
|
||||
<point>0.000000,38.000000</point>
|
||||
</outline>
|
||||
<outline id="outline10">
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>49.000000,0.000000</point>
|
||||
<point>49.000000,38.000000</point>
|
||||
<point>0.000000,38.000000</point>
|
||||
</outline>
|
||||
<outline id="outline11">
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>239.000000,0.000000</point>
|
||||
<point>239.000000,38.000000</point>
|
||||
<point>0.000000,38.000000</point>
|
||||
</outline>
|
||||
<outline id="outline12">
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>38.000000,0.000000</point>
|
||||
<point>38.000000,79.000000</point>
|
||||
<point>0.000000,79.000000</point>
|
||||
</outline>
|
||||
<outline id="outline13">
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>79.000000,0.000000</point>
|
||||
<point>79.000000,38.000000</point>
|
||||
<point>0.000000,38.000000</point>
|
||||
</outline>
|
||||
<outline id="outline2">
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>80.000000,0.000000</point>
|
||||
<point>80.000000,38.000000</point>
|
||||
<point>0.000000,38.000000</point>
|
||||
</outline>
|
||||
<outline id="outline14">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>238.829268,0.000000</point>
|
||||
<point>238.829268,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
</keyboard>
|
||||
|
||||
681
data/keyboards/th.xml
Normal file
681
data/keyboards/th.xml
Normal file
@ -0,0 +1,681 @@
|
||||
<?xml version="1.0"?>
|
||||
<keyboard version="0.90">
|
||||
<bounds>0.000000,0.000000,640.000000,296.585366</bounds>
|
||||
<section>
|
||||
<bounds>15.609756,15.609756,640.000000,39.024390</bounds>
|
||||
<angle>0</angle>
|
||||
<row>
|
||||
<columns>16</columns>
|
||||
<orientation>1</orientation>
|
||||
</row>
|
||||
<key id="keycode9" name="keycode9" column="0" row="0">
|
||||
<bounds>3.121951,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65307">Escape</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode67" name="keycode67" column="1" row="0">
|
||||
<bounds>84.292683,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65470">F1</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode68" name="keycode68" column="2" row="0">
|
||||
<bounds>124.878049,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65471">F2</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode69" name="keycode69" column="3" row="0">
|
||||
<bounds>165.463415,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65472">F3</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode70" name="keycode70" column="4" row="0">
|
||||
<bounds>206.048780,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65473">F4</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode71" name="keycode71" column="5" row="0">
|
||||
<bounds>266.926829,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65474">F5</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode72" name="keycode72" column="6" row="0">
|
||||
<bounds>307.512195,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65475">F6</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode73" name="keycode73" column="7" row="0">
|
||||
<bounds>348.097561,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65476">F7</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode74" name="keycode74" column="8" row="0">
|
||||
<bounds>388.682927,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65477">F8</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode75" name="keycode75" column="9" row="0">
|
||||
<bounds>449.560976,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65478">F9</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode76" name="keycode76" column="10" row="0">
|
||||
<bounds>490.146341,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65479">F10</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode95" name="keycode95" column="11" row="0">
|
||||
<bounds>530.731707,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65480">F11</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode96" name="keycode96" column="12" row="0">
|
||||
<bounds>571.317073,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65481">F12</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
</section>
|
||||
<section>
|
||||
<bounds>15.609756,78.048780,608.780488,201.365854</bounds>
|
||||
<angle>0</angle>
|
||||
<row>
|
||||
<columns>14</columns>
|
||||
<orientation>1</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>14</columns>
|
||||
<orientation>1</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>13</columns>
|
||||
<orientation>1</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>12</columns>
|
||||
<orientation>1</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>8</columns>
|
||||
<orientation>1</orientation>
|
||||
</row>
|
||||
<key id="keycode49" name="keycode49" column="0" row="0">
|
||||
<bounds>3.121951,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="95">underscore</keysym>
|
||||
<keysym keyval="37">percent</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode10" name="keycode10" column="1" row="0">
|
||||
<bounds>43.707317,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3557">Thai_lakkhangyao</keysym>
|
||||
<keysym keyval="43">plus</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode11" name="keycode11" column="2" row="0">
|
||||
<bounds>84.292683,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="47">slash</keysym>
|
||||
<keysym keyval="3569">Thai_leknung</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode12" name="keycode12" column="3" row="0">
|
||||
<bounds>124.878049,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="45">minus</keysym>
|
||||
<keysym keyval="3570">Thai_leksong</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode13" name="keycode13" column="4" row="0">
|
||||
<bounds>165.463415,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3520">Thai_phosamphao</keysym>
|
||||
<keysym keyval="3571">Thai_leksam</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode14" name="keycode14" column="5" row="0">
|
||||
<bounds>206.048780,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3510">Thai_thothung</keysym>
|
||||
<keysym keyval="3572">Thai_leksi</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode15" name="keycode15" column="6" row="0">
|
||||
<bounds>245.073171,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3544">Thai_sarau</keysym>
|
||||
<keysym keyval="3545">Thai_sarauu</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode16" name="keycode16" column="7" row="0">
|
||||
<bounds>285.658537,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3542">Thai_saraue</keysym>
|
||||
<keysym keyval="3551">Thai_baht</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode17" name="keycode17" column="8" row="0">
|
||||
<bounds>326.243902,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3492">Thai_khokhwai</keysym>
|
||||
<keysym keyval="3573">Thai_lekha</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode18" name="keycode18" column="9" row="0">
|
||||
<bounds>366.829268,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3509">Thai_totao</keysym>
|
||||
<keysym keyval="3574">Thai_lekhok</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode19" name="keycode19" column="10" row="0">
|
||||
<bounds>407.414634,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3496">Thai_chochan</keysym>
|
||||
<keysym keyval="3575">Thai_lekchet</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode20" name="keycode20" column="11" row="0">
|
||||
<bounds>448.000000,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3490">Thai_khokhai</keysym>
|
||||
<keysym keyval="3576">Thai_lekpaet</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode21" name="keycode21" column="12" row="0">
|
||||
<bounds>488.585366,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3498">Thai_chochang</keysym>
|
||||
<keysym keyval="3577">Thai_lekkao</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode22" name="keycode22" column="13" row="0">
|
||||
<bounds>529.170732,1.560976,79.609756,37.463415</bounds>
|
||||
<oref>outline13</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65288">BackSpace</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode23" name="keycode23" column="0" row="1">
|
||||
<bounds>3.121951,42.146341,59.317073,37.463415</bounds>
|
||||
<oref>outline4</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="65289">Tab</keysym>
|
||||
<keysym keyval="65056">ISO_Left_Tab</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode24" name="keycode24" column="1" row="1">
|
||||
<bounds>65.560976,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3558">Thai_maiyamok</keysym>
|
||||
<keysym keyval="3568">Thai_leksun</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode25" name="keycode25" column="2" row="1">
|
||||
<bounds>106.146341,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3556">Thai_saraaimaimalai</keysym>
|
||||
<keysym keyval="34">quotedbl</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode26" name="keycode26" column="3" row="1">
|
||||
<bounds>145.170732,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3539">Thai_saraam</keysym>
|
||||
<keysym keyval="3502">Thai_dochada</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode27" name="keycode27" column="4" row="1">
|
||||
<bounds>185.756098,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3518">Thai_phophan</keysym>
|
||||
<keysym keyval="3505">Thai_thonangmontho</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode28" name="keycode28" column="5" row="1">
|
||||
<bounds>226.341463,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3536">Thai_saraa</keysym>
|
||||
<keysym keyval="3512">Thai_thothong</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode29" name="keycode29" column="6" row="1">
|
||||
<bounds>266.926829,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3537">Thai_maihanakat</keysym>
|
||||
<keysym keyval="3565">Thai_nikhahit</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode30" name="keycode30" column="7" row="1">
|
||||
<bounds>307.512195,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3541">Thai_saraii</keysym>
|
||||
<keysym keyval="3562">Thai_maitri</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode31" name="keycode31" column="8" row="1">
|
||||
<bounds>348.097561,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3523">Thai_rorua</keysym>
|
||||
<keysym keyval="3507">Thai_nonen</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode32" name="keycode32" column="9" row="1">
|
||||
<bounds>388.682927,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3513">Thai_nonu</keysym>
|
||||
<keysym keyval="3535">Thai_paiyannoi</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode33" name="keycode33" column="10" row="1">
|
||||
<bounds>429.268293,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3522">Thai_yoyak</keysym>
|
||||
<keysym keyval="3501">Thai_yoying</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode34" name="keycode34" column="11" row="1">
|
||||
<bounds>468.292683,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3514">Thai_bobaimai</keysym>
|
||||
<keysym keyval="3504">Thai_thothan</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode35" name="keycode35" column="12" row="1">
|
||||
<bounds>508.878049,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3525">Thai_loling</keysym>
|
||||
<keysym keyval="44">comma</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode51" name="keycode51" column="13" row="1">
|
||||
<bounds>549.463415,42.146341,59.317073,37.463415</bounds>
|
||||
<oref>outline5</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3491">Thai_khokhuat</keysym>
|
||||
<keysym keyval="3493">Thai_khokhon</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode66" name="keycode66" column="0" row="2">
|
||||
<bounds>3.121951,82.731707,68.682927,37.463415</bounds>
|
||||
<oref>outline6</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65027">ISO_Level3_Shift</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode38" name="keycode38" column="1" row="2">
|
||||
<bounds>76.487805,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3519">Thai_fofan</keysym>
|
||||
<keysym keyval="3524">Thai_ru</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode39" name="keycode39" column="2" row="2">
|
||||
<bounds>115.512195,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3531">Thai_hohip</keysym>
|
||||
<keysym keyval="3494">Thai_khorakhang</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode40" name="keycode40" column="3" row="2">
|
||||
<bounds>156.097561,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3489">Thai_kokai</keysym>
|
||||
<keysym keyval="3503">Thai_topatak</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode41" name="keycode41" column="4" row="2">
|
||||
<bounds>196.682927,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3508">Thai_dodek</keysym>
|
||||
<keysym keyval="3554">Thai_sarao</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode42" name="keycode42" column="5" row="2">
|
||||
<bounds>237.268293,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3552">Thai_sarae</keysym>
|
||||
<keysym keyval="3500">Thai_chochoe</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode43" name="keycode43" column="6" row="2">
|
||||
<bounds>277.853659,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3561">Thai_maitho</keysym>
|
||||
<keysym keyval="3559">Thai_maitaikhu</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode44" name="keycode44" column="7" row="2">
|
||||
<bounds>318.439024,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3560">Thai_maiek</keysym>
|
||||
<keysym keyval="3563">Thai_maichattawa</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode45" name="keycode45" column="8" row="2">
|
||||
<bounds>359.024390,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3538">Thai_saraaa</keysym>
|
||||
<keysym keyval="3529">Thai_sorusi</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode46" name="keycode46" column="9" row="2">
|
||||
<bounds>399.609756,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3530">Thai_sosua</keysym>
|
||||
<keysym keyval="3528">Thai_sosala</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode47" name="keycode47" column="10" row="2">
|
||||
<bounds>438.634146,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3527">Thai_wowaen</keysym>
|
||||
<keysym keyval="3499">Thai_soso</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode48" name="keycode48" column="11" row="2">
|
||||
<bounds>479.219512,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3495">Thai_ngongu</keysym>
|
||||
<keysym keyval="46">period</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode36" name="keycode36" column="12" row="2">
|
||||
<bounds>519.804878,82.731707,88.975610,37.463415</bounds>
|
||||
<oref>outline7</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65293">Return</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode50" name="keycode50" column="0" row="3">
|
||||
<bounds>3.121951,121.756098,88.975610,37.463415</bounds>
|
||||
<oref>outline8</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65505">Shift_L</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode52" name="keycode52" column="1" row="3">
|
||||
<bounds>95.219512,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3516">Thai_phophung</keysym>
|
||||
<keysym keyval="40">parenleft</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode53" name="keycode53" column="2" row="3">
|
||||
<bounds>135.804878,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3515">Thai_popla</keysym>
|
||||
<keysym keyval="41">parenright</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode54" name="keycode54" column="3" row="3">
|
||||
<bounds>176.390244,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3553">Thai_saraae</keysym>
|
||||
<keysym keyval="3497">Thai_choching</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode55" name="keycode55" column="4" row="3">
|
||||
<bounds>215.414634,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3533">Thai_oang</keysym>
|
||||
<keysym keyval="3534">Thai_honokhuk</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode56" name="keycode56" column="5" row="3">
|
||||
<bounds>256.000000,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3540">Thai_sarai</keysym>
|
||||
<keysym keyval="3546">Thai_phinthu</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode57" name="keycode57" column="6" row="3">
|
||||
<bounds>296.585366,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3543">Thai_sarauee</keysym>
|
||||
<keysym keyval="3564">Thai_thanthakhat</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode58" name="keycode58" column="7" row="3">
|
||||
<bounds>337.170732,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3511">Thai_thothahan</keysym>
|
||||
<keysym keyval="63">question</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode59" name="keycode59" column="8" row="3">
|
||||
<bounds>377.756098,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3521">Thai_moma</keysym>
|
||||
<keysym keyval="3506">Thai_thophuthao</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode60" name="keycode60" column="9" row="3">
|
||||
<bounds>418.341463,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3555">Thai_saraaimaimuan</keysym>
|
||||
<keysym keyval="3532">Thai_lochula</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode61" name="keycode61" column="10" row="3">
|
||||
<bounds>458.926829,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="3517">Thai_fofa</keysym>
|
||||
<keysym keyval="3526">Thai_lu</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode62" name="keycode62" column="11" row="3">
|
||||
<bounds>499.512195,121.756098,109.268293,37.463415</bounds>
|
||||
<oref>outline9</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65506">Shift_R</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode37" name="keycode37" column="0" row="4">
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline10</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol label="⌨" icon="input-keyboard-symbolic">cycle-keyboard</symbol>
|
||||
<symbol label="☺" icon="preferences-system-symbolic">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
<bounds>62.439024,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65507">Control_L</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode64" name="keycode64" column="2" row="4">
|
||||
<bounds>113.951220,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="65513">Alt_L</keysym>
|
||||
<keysym keyval="65511">Meta_L</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode65" name="keycode65" column="3" row="4">
|
||||
<bounds>165.463415,162.341463,238.829268,37.463415</bounds>
|
||||
<oref>outline3</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="32">space</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode108" name="keycode108" column="4" row="4">
|
||||
<bounds>407.414634,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65361">Left</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode134" name="keycode134" column="5" row="4">
|
||||
<bounds>458.926829,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65362">Up</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode135" name="keycode135" column="6" row="4">
|
||||
<bounds>508.878049,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65364">Down</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode105" name="keycode105" column="7" row="4">
|
||||
<bounds>560.390244,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65363">Right</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
</section>
|
||||
<outline id="outline2">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>37.463415,0.000000</point>
|
||||
<point>37.463415,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline1">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>48.390244,0.000000</point>
|
||||
<point>48.390244,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline4">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>59.317073,0.000000</point>
|
||||
<point>59.317073,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline5">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>59.317073,0.000000</point>
|
||||
<point>59.317073,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline6">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>68.682927,0.000000</point>
|
||||
<point>68.682927,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline7">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>88.975610,0.000000</point>
|
||||
<point>88.975610,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline8">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>88.975610,0.000000</point>
|
||||
<point>88.975610,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline9">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>109.268293,0.000000</point>
|
||||
<point>109.268293,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline10">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>56.195122,0.000000</point>
|
||||
<point>56.195122,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline13">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>79.609756,0.000000</point>
|
||||
<point>79.609756,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline3">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>238.829268,0.000000</point>
|
||||
<point>238.829268,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
</keyboard>
|
||||
682
data/keyboards/us.xml
Normal file
682
data/keyboards/us.xml
Normal file
@ -0,0 +1,682 @@
|
||||
<?xml version="1.0"?>
|
||||
<keyboard version="0.90">
|
||||
<bounds>0.000000,0.000000,640.000000,296.585366</bounds>
|
||||
<section>
|
||||
<bounds>15.609756,15.609756,640.000000,39.024390</bounds>
|
||||
<angle>0</angle>
|
||||
<row>
|
||||
<columns>16</columns>
|
||||
<orientation>1</orientation>
|
||||
</row>
|
||||
<key id="keycode9" name="keycode9" column="0" row="0">
|
||||
<bounds>3.121951,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65307">Escape</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode67" name="keycode67" column="1" row="0">
|
||||
<bounds>84.292683,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65470">F1</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode68" name="keycode68" column="2" row="0">
|
||||
<bounds>124.878049,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65471">F2</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode69" name="keycode69" column="3" row="0">
|
||||
<bounds>165.463415,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65472">F3</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode70" name="keycode70" column="4" row="0">
|
||||
<bounds>206.048780,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65473">F4</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode71" name="keycode71" column="5" row="0">
|
||||
<bounds>266.926829,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65474">F5</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode72" name="keycode72" column="6" row="0">
|
||||
<bounds>307.512195,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65475">F6</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode73" name="keycode73" column="7" row="0">
|
||||
<bounds>348.097561,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65476">F7</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode74" name="keycode74" column="8" row="0">
|
||||
<bounds>388.682927,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65477">F8</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode75" name="keycode75" column="9" row="0">
|
||||
<bounds>449.560976,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65478">F9</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode76" name="keycode76" column="10" row="0">
|
||||
<bounds>490.146341,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65479">F10</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode95" name="keycode95" column="11" row="0">
|
||||
<bounds>530.731707,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65480">F11</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode96" name="keycode96" column="12" row="0">
|
||||
<bounds>571.317073,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65481">F12</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
</section>
|
||||
<section>
|
||||
<bounds>15.609756,78.048780,608.780488,201.365854</bounds>
|
||||
<angle>0</angle>
|
||||
<row>
|
||||
<columns>14</columns>
|
||||
<orientation>1</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>14</columns>
|
||||
<orientation>1</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>13</columns>
|
||||
<orientation>1</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>12</columns>
|
||||
<orientation>1</orientation>
|
||||
</row>
|
||||
<row>
|
||||
<columns>8</columns>
|
||||
<orientation>1</orientation>
|
||||
</row>
|
||||
<key id="keycode49" name="keycode49" column="0" row="0">
|
||||
<bounds>3.121951,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="96">quoteleft</keysym>
|
||||
<keysym keyval="126">asciitilde</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode10" name="keycode10" column="1" row="0">
|
||||
<bounds>43.707317,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="49">1</keysym>
|
||||
<keysym keyval="33">exclam</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode11" name="keycode11" column="2" row="0">
|
||||
<bounds>84.292683,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="50">2</keysym>
|
||||
<keysym keyval="64">at</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode12" name="keycode12" column="3" row="0">
|
||||
<bounds>124.878049,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="51">3</keysym>
|
||||
<keysym keyval="35">numbersign</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode13" name="keycode13" column="4" row="0">
|
||||
<bounds>165.463415,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="52">4</keysym>
|
||||
<keysym keyval="36">dollar</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode14" name="keycode14" column="5" row="0">
|
||||
<bounds>206.048780,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="3">
|
||||
<keysym keyval="53">5</keysym>
|
||||
<keysym keyval="37">percent</keysym>
|
||||
<keysym keyval="8364">EuroSign</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode15" name="keycode15" column="6" row="0">
|
||||
<bounds>245.073171,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="54">6</keysym>
|
||||
<keysym keyval="94">asciicircum</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode16" name="keycode16" column="7" row="0">
|
||||
<bounds>285.658537,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="55">7</keysym>
|
||||
<keysym keyval="38">ampersand</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode17" name="keycode17" column="8" row="0">
|
||||
<bounds>326.243902,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="56">8</keysym>
|
||||
<keysym keyval="42">asterisk</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode18" name="keycode18" column="9" row="0">
|
||||
<bounds>366.829268,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="57">9</keysym>
|
||||
<keysym keyval="40">parenleft</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode19" name="keycode19" column="10" row="0">
|
||||
<bounds>407.414634,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="48">0</keysym>
|
||||
<keysym keyval="41">parenright</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode20" name="keycode20" column="11" row="0">
|
||||
<bounds>448.000000,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="45">minus</keysym>
|
||||
<keysym keyval="95">underscore</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode21" name="keycode21" column="12" row="0">
|
||||
<bounds>488.585366,1.560976,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="61">equal</keysym>
|
||||
<keysym keyval="43">plus</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode22" name="keycode22" column="13" row="0">
|
||||
<bounds>529.170732,1.560976,79.609756,37.463415</bounds>
|
||||
<oref>outline13</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65288">BackSpace</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode23" name="keycode23" column="0" row="1">
|
||||
<bounds>3.121951,42.146341,59.317073,37.463415</bounds>
|
||||
<oref>outline4</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="65289">Tab</keysym>
|
||||
<keysym keyval="65056">ISO_Left_Tab</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode24" name="keycode24" column="1" row="1">
|
||||
<bounds>65.560976,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="113">q</keysym>
|
||||
<keysym keyval="81">Q</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode25" name="keycode25" column="2" row="1">
|
||||
<bounds>106.146341,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="119">w</keysym>
|
||||
<keysym keyval="87">W</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode26" name="keycode26" column="3" row="1">
|
||||
<bounds>145.170732,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="101">e</keysym>
|
||||
<keysym keyval="69">E</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode27" name="keycode27" column="4" row="1">
|
||||
<bounds>185.756098,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="114">r</keysym>
|
||||
<keysym keyval="82">R</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode28" name="keycode28" column="5" row="1">
|
||||
<bounds>226.341463,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="116">t</keysym>
|
||||
<keysym keyval="84">T</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode29" name="keycode29" column="6" row="1">
|
||||
<bounds>266.926829,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="121">y</keysym>
|
||||
<keysym keyval="89">Y</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode30" name="keycode30" column="7" row="1">
|
||||
<bounds>307.512195,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="117">u</keysym>
|
||||
<keysym keyval="85">U</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode31" name="keycode31" column="8" row="1">
|
||||
<bounds>348.097561,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="105">i</keysym>
|
||||
<keysym keyval="73">I</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode32" name="keycode32" column="9" row="1">
|
||||
<bounds>388.682927,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="111">o</keysym>
|
||||
<keysym keyval="79">O</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode33" name="keycode33" column="10" row="1">
|
||||
<bounds>429.268293,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="112">p</keysym>
|
||||
<keysym keyval="80">P</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode34" name="keycode34" column="11" row="1">
|
||||
<bounds>468.292683,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="91">bracketleft</keysym>
|
||||
<keysym keyval="123">braceleft</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode35" name="keycode35" column="12" row="1">
|
||||
<bounds>508.878049,42.146341,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="93">bracketright</keysym>
|
||||
<keysym keyval="125">braceright</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode51" name="keycode51" column="13" row="1">
|
||||
<bounds>549.463415,42.146341,59.317073,37.463415</bounds>
|
||||
<oref>outline5</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="92">backslash</keysym>
|
||||
<keysym keyval="124">bar</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode66" name="keycode66" column="0" row="2">
|
||||
<bounds>3.121951,82.731707,68.682927,37.463415</bounds>
|
||||
<oref>outline6</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65027">ISO_Level3_Shift</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode38" name="keycode38" column="1" row="2">
|
||||
<bounds>76.487805,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="97">a</keysym>
|
||||
<keysym keyval="65">A</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode39" name="keycode39" column="2" row="2">
|
||||
<bounds>115.512195,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="115">s</keysym>
|
||||
<keysym keyval="83">S</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode40" name="keycode40" column="3" row="2">
|
||||
<bounds>156.097561,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="100">d</keysym>
|
||||
<keysym keyval="68">D</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode41" name="keycode41" column="4" row="2">
|
||||
<bounds>196.682927,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="102">f</keysym>
|
||||
<keysym keyval="70">F</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode42" name="keycode42" column="5" row="2">
|
||||
<bounds>237.268293,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="103">g</keysym>
|
||||
<keysym keyval="71">G</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode43" name="keycode43" column="6" row="2">
|
||||
<bounds>277.853659,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="104">h</keysym>
|
||||
<keysym keyval="72">H</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode44" name="keycode44" column="7" row="2">
|
||||
<bounds>318.439024,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="106">j</keysym>
|
||||
<keysym keyval="74">J</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode45" name="keycode45" column="8" row="2">
|
||||
<bounds>359.024390,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="107">k</keysym>
|
||||
<keysym keyval="75">K</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode46" name="keycode46" column="9" row="2">
|
||||
<bounds>399.609756,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="108">l</keysym>
|
||||
<keysym keyval="76">L</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode47" name="keycode47" column="10" row="2">
|
||||
<bounds>438.634146,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="59">semicolon</keysym>
|
||||
<keysym keyval="58">colon</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode48" name="keycode48" column="11" row="2">
|
||||
<bounds>479.219512,82.731707,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="39">quoteright</keysym>
|
||||
<keysym keyval="34">quotedbl</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode36" name="keycode36" column="12" row="2">
|
||||
<bounds>519.804878,82.731707,88.975610,37.463415</bounds>
|
||||
<oref>outline7</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65293">Return</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode50" name="keycode50" column="0" row="3">
|
||||
<bounds>3.121951,121.756098,88.975610,37.463415</bounds>
|
||||
<oref>outline8</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65505">Shift_L</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode52" name="keycode52" column="1" row="3">
|
||||
<bounds>95.219512,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="122">z</keysym>
|
||||
<keysym keyval="90">Z</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode53" name="keycode53" column="2" row="3">
|
||||
<bounds>135.804878,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="120">x</keysym>
|
||||
<keysym keyval="88">X</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode54" name="keycode54" column="3" row="3">
|
||||
<bounds>176.390244,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="99">c</keysym>
|
||||
<keysym keyval="67">C</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode55" name="keycode55" column="4" row="3">
|
||||
<bounds>215.414634,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="118">v</keysym>
|
||||
<keysym keyval="86">V</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode56" name="keycode56" column="5" row="3">
|
||||
<bounds>256.000000,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="98">b</keysym>
|
||||
<keysym keyval="66">B</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode57" name="keycode57" column="6" row="3">
|
||||
<bounds>296.585366,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="110">n</keysym>
|
||||
<keysym keyval="78">N</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode58" name="keycode58" column="7" row="3">
|
||||
<bounds>337.170732,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="109">m</keysym>
|
||||
<keysym keyval="77">M</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode59" name="keycode59" column="8" row="3">
|
||||
<bounds>377.756098,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="44">comma</keysym>
|
||||
<keysym keyval="60">less</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode60" name="keycode60" column="9" row="3">
|
||||
<bounds>418.341463,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="46">period</keysym>
|
||||
<keysym keyval="62">greater</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode61" name="keycode61" column="10" row="3">
|
||||
<bounds>458.926829,121.756098,37.463415,37.463415</bounds>
|
||||
<oref>outline2</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="47">slash</keysym>
|
||||
<keysym keyval="63">question</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode62" name="keycode62" column="11" row="3">
|
||||
<bounds>499.512195,121.756098,109.268293,37.463415</bounds>
|
||||
<oref>outline9</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65506">Shift_R</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode37" name="keycode37" column="0" row="4">
|
||||
<bounds>3.121951,162.341463,56.195122,37.463415</bounds>
|
||||
<oref>outline10</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<symbol label="⌨" icon="input-keyboard-symbolic">cycle-keyboard</symbol>
|
||||
<symbol label="☺" icon="preferences-system-symbolic">preferences</symbol>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode133" name="keycode133" column="1" row="4">
|
||||
<bounds>62.439024,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65507">Control_L</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode64" name="keycode64" column="2" row="4">
|
||||
<bounds>113.951220,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="2">
|
||||
<keysym keyval="65513">Alt_L</keysym>
|
||||
<keysym keyval="65511">Meta_L</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode65" name="keycode65" column="3" row="4">
|
||||
<bounds>165.463415,162.341463,238.829268,37.463415</bounds>
|
||||
<oref>outline3</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="32">space</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode108" name="keycode108" column="4" row="4">
|
||||
<bounds>407.414634,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65361">Left</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode134" name="keycode134" column="5" row="4">
|
||||
<bounds>458.926829,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65362">Up</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode135" name="keycode135" column="6" row="4">
|
||||
<bounds>508.878049,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65364">Down</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
<key id="keycode105" name="keycode105" column="7" row="4">
|
||||
<bounds>560.390244,162.341463,48.390244,37.463415</bounds>
|
||||
<oref>outline1</oref>
|
||||
<symbols groups="1" levels="1">
|
||||
<keysym keyval="65363">Right</keysym>
|
||||
</symbols>
|
||||
</key>
|
||||
</section>
|
||||
<outline id="outline2">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>37.463415,0.000000</point>
|
||||
<point>37.463415,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline1">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>48.390244,0.000000</point>
|
||||
<point>48.390244,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline4">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>59.317073,0.000000</point>
|
||||
<point>59.317073,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline5">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>59.317073,0.000000</point>
|
||||
<point>59.317073,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline6">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>68.682927,0.000000</point>
|
||||
<point>68.682927,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline7">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>88.975610,0.000000</point>
|
||||
<point>88.975610,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline8">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>88.975610,0.000000</point>
|
||||
<point>88.975610,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline9">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>109.268293,0.000000</point>
|
||||
<point>109.268293,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline10">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>56.195122,0.000000</point>
|
||||
<point>56.195122,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline13">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>79.609756,0.000000</point>
|
||||
<point>79.609756,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
<outline id="outline3">
|
||||
<corner-radius>1.000000</corner-radius>
|
||||
<point>0.000000,0.000000</point>
|
||||
<point>238.829268,0.000000</point>
|
||||
<point>238.829268,37.463415</point>
|
||||
<point>0.000000,37.463415</point>
|
||||
</outline>
|
||||
</keyboard>
|
||||
55
data/org.fedorahosted.eekboard.gschema.xml.in
Normal file
55
data/org.fedorahosted.eekboard.gschema.xml.in
Normal file
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0"?>
|
||||
<schemalist>
|
||||
<schema id="org.fedorahosted.eekboard" path="/org/fedorahosted/eekboard/">
|
||||
<key name="keyboard" type="s">
|
||||
<default>'us'</default>
|
||||
<summary>Keyboard types</summary>
|
||||
<description>keyboard types (comma separated).</description>
|
||||
</key>
|
||||
<key name="ui-toolkit" type="s">
|
||||
<default>'gtk'</default>
|
||||
<summary>GUI toolkit used to render keyboard</summary>
|
||||
<description>The name of GUI toolkit (either 'gtk' or 'clutter') used to render keyboard on screen.</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="theme" type="s">
|
||||
<default>'default'</default>
|
||||
<summary>Theme</summary>
|
||||
<description>Base name of the theme to apply.</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
||||
2
data/themes/Makefile.am
Normal file
2
data/themes/Makefile.am
Normal file
@ -0,0 +1,2 @@
|
||||
themedir = $(pkgdatadir)/themes
|
||||
dist_theme_DATA = default.css
|
||||
22
data/themes/default.css
Normal file
22
data/themes/default.css
Normal file
@ -0,0 +1,22 @@
|
||||
.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);
|
||||
}
|
||||
@ -47,7 +47,7 @@ SCANGOBJ_OPTIONS=
|
||||
|
||||
# Extra options to supply to gtkdoc-scan.
|
||||
# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
|
||||
SCAN_OPTIONS=--rebuild-types
|
||||
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
|
||||
@ -82,7 +82,10 @@ IGNORE_HFILES = \
|
||||
eek-clutter-renderer.h \
|
||||
eek-clutter-section.h \
|
||||
eek-clutter-key.h \
|
||||
eek-gtk-renderer.h
|
||||
eek-gtk-renderer.h \
|
||||
eek-theme.h \
|
||||
eek-theme-node.h \
|
||||
eek-enumtypes.h
|
||||
if !ENABLE_CLUTTER
|
||||
IGNORE_HFILES += eek-clutter-keyboard.h eek-clutter.h
|
||||
endif
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
<title>API Manual</title>
|
||||
<chapter>
|
||||
<title>Base Classes, Interfaces, and Utilities</title>
|
||||
<xi:include href="xml/eek.xml"/>
|
||||
<xi:include href="xml/eek-serializable.xml"/>
|
||||
<xi:include href="xml/eek-element.xml"/>
|
||||
<xi:include href="xml/eek-container.xml"/>
|
||||
@ -49,12 +50,12 @@
|
||||
<xi:include href="xml/eek-types.xml"/>
|
||||
</chapter>
|
||||
<chapter>
|
||||
<title>Clutter Keyboard</title>
|
||||
<xi:include href="xml/eek-clutter-keyboard.xml"/>
|
||||
<title>GTK Adapter</title>
|
||||
<xi:include href="xml/eek-gtk-keyboard.xml"/>
|
||||
</chapter>
|
||||
<chapter>
|
||||
<title>GTK Keyboard</title>
|
||||
<xi:include href="xml/eek-gtk-keyboard.xml"/>
|
||||
<title>Clutter Adapter</title>
|
||||
<xi:include href="xml/eek-clutter-keyboard.xml"/>
|
||||
</chapter>
|
||||
<chapter>
|
||||
<title>Libxklavier Layout Engine</title>
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<SECTION>
|
||||
<FILE>eek-keyboard</FILE>
|
||||
<TITLE>EekKeyboard</TITLE>
|
||||
EekKeyboardClass
|
||||
EekKeyboardPrivate
|
||||
EekKeyboard
|
||||
EekKeyboardClass
|
||||
EekModifierKey
|
||||
eek_keyboard_new
|
||||
eek_keyboard_get_layout
|
||||
eek_keyboard_get_size
|
||||
@ -16,11 +16,19 @@ eek_keyboard_get_group
|
||||
eek_keyboard_get_level
|
||||
eek_keyboard_set_modifier_behavior
|
||||
eek_keyboard_get_modifier_behavior
|
||||
eek_keyboard_set_modifiers
|
||||
eek_keyboard_get_modifiers
|
||||
eek_keyboard_create_section
|
||||
eek_keyboard_find_key_by_keycode
|
||||
eek_keyboard_add_outline
|
||||
eek_keyboard_get_outline
|
||||
eek_keyboard_set_num_lock_mask
|
||||
eek_keyboard_get_num_lock_mask
|
||||
eek_keyboard_set_alt_gr_mask
|
||||
eek_keyboard_get_alt_gr_mask
|
||||
eek_keyboard_get_pressed_keys
|
||||
eek_keyboard_get_locked_keys
|
||||
EekKeyboardPrivate
|
||||
<SUBSECTION Standard>
|
||||
EEK_KEYBOARD
|
||||
EEK_IS_KEYBOARD
|
||||
@ -34,8 +42,8 @@ EEK_KEYBOARD_GET_CLASS
|
||||
<SECTION>
|
||||
<FILE>eek-layout</FILE>
|
||||
<TITLE>EekLayout</TITLE>
|
||||
EekLayoutClass
|
||||
EekLayout
|
||||
EekLayoutClass
|
||||
<SUBSECTION Standard>
|
||||
EEK_LAYOUT
|
||||
EEK_IS_LAYOUT
|
||||
@ -51,8 +59,9 @@ EEK_LAYOUT_GET_CLASS
|
||||
<TITLE>EekGtkKeyboard</TITLE>
|
||||
EekGtkKeyboard
|
||||
EekGtkKeyboardClass
|
||||
EekGtkKeyboardPrivate
|
||||
eek_gtk_keyboard_new
|
||||
eek_gtk_keyboard_set_theme
|
||||
EekGtkKeyboardPrivate
|
||||
<SUBSECTION Standard>
|
||||
EEK_GTK_KEYBOARD
|
||||
EEK_IS_GTK_KEYBOARD
|
||||
@ -66,9 +75,8 @@ EEK_GTK_KEYBOARD_GET_CLASS
|
||||
<SECTION>
|
||||
<FILE>eek-section</FILE>
|
||||
<TITLE>EekSection</TITLE>
|
||||
EekSectionClass
|
||||
EekSectionPrivate
|
||||
EekSection
|
||||
EekSectionClass
|
||||
eek_section_set_angle
|
||||
eek_section_get_angle
|
||||
eek_section_get_n_rows
|
||||
@ -76,6 +84,7 @@ eek_section_add_row
|
||||
eek_section_get_row
|
||||
eek_section_create_key
|
||||
eek_section_find_key_by_keycode
|
||||
EekSectionPrivate
|
||||
<SUBSECTION Standard>
|
||||
EEK_SECTION
|
||||
EEK_IS_SECTION
|
||||
@ -86,17 +95,39 @@ EEK_IS_SECTION_CLASS
|
||||
EEK_SECTION_GET_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>eek-theme-context</FILE>
|
||||
eek_theme_context_new
|
||||
eek_theme_context_set_theme
|
||||
eek_theme_context_get_theme
|
||||
eek_theme_context_set_resolution
|
||||
eek_theme_context_set_default_resolution
|
||||
eek_theme_context_get_resolution
|
||||
eek_theme_context_set_font
|
||||
eek_theme_context_get_font
|
||||
eek_theme_context_get_root_node
|
||||
EekThemeContextClass
|
||||
<SUBSECTION Standard>
|
||||
EEK_THEME_CONTEXT
|
||||
EEK_IS_THEME_CONTEXT
|
||||
EEK_TYPE_THEME_CONTEXT
|
||||
eek_theme_context_get_type
|
||||
EEK_THEME_CONTEXT_CLASS
|
||||
EEK_IS_THEME_CONTEXT_CLASS
|
||||
EEK_THEME_CONTEXT_GET_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>eek-container</FILE>
|
||||
<TITLE>EekContainer</TITLE>
|
||||
EekContainerClass
|
||||
EekContainerPrivate
|
||||
EekCallback
|
||||
EekCompareFunc
|
||||
EekContainer
|
||||
EekContainerClass
|
||||
eek_container_foreach_child
|
||||
eek_container_find
|
||||
eek_container_add_child
|
||||
EekContainerPrivate
|
||||
<SUBSECTION Standard>
|
||||
EEK_CONTAINER
|
||||
EEK_IS_CONTAINER
|
||||
@ -107,13 +138,30 @@ EEK_IS_CONTAINER_CLASS
|
||||
EEK_CONTAINER_GET_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>eek-clutter-keyboard</FILE>
|
||||
<TITLE>EekClutterKeyboard</TITLE>
|
||||
EekClutterKeyboard
|
||||
EekClutterKeyboardClass
|
||||
eek_clutter_keyboard_new
|
||||
eek_clutter_keyboard_set_theme
|
||||
EekClutterKeyboardPrivate
|
||||
<SUBSECTION Standard>
|
||||
EEK_CLUTTER_KEYBOARD
|
||||
EEK_IS_CLUTTER_KEYBOARD
|
||||
EEK_TYPE_CLUTTER_KEYBOARD
|
||||
eek_clutter_keyboard_get_type
|
||||
EEK_CLUTTER_KEYBOARD_CLASS
|
||||
EEK_IS_CLUTTER_KEYBOARD_CLASS
|
||||
EEK_CLUTTER_KEYBOARD_GET_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>eek-symbol</FILE>
|
||||
<TITLE>EekSymbol</TITLE>
|
||||
EekSymbolCategory
|
||||
EekSymbolClass
|
||||
EekSymbolPrivate
|
||||
EekSymbol
|
||||
EekSymbolClass
|
||||
eek_symbol_new
|
||||
eek_symbol_set_name
|
||||
eek_symbol_get_name
|
||||
@ -126,6 +174,7 @@ eek_symbol_set_modifier_mask
|
||||
eek_symbol_is_modifier
|
||||
eek_symbol_set_icon_name
|
||||
eek_symbol_get_icon_name
|
||||
EekSymbolPrivate
|
||||
<SUBSECTION Standard>
|
||||
EEK_SYMBOL
|
||||
EEK_IS_SYMBOL
|
||||
@ -141,7 +190,6 @@ EEK_SYMBOL_GET_CLASS
|
||||
<TITLE>EekXklLayout</TITLE>
|
||||
EekXklLayout
|
||||
EekXklLayoutClass
|
||||
EekXklLayoutPrivate
|
||||
eek_xkl_layout_new
|
||||
eek_xkl_layout_set_config
|
||||
eek_xkl_layout_set_config_full
|
||||
@ -156,6 +204,7 @@ eek_xkl_layout_get_layouts
|
||||
eek_xkl_layout_get_variants
|
||||
eek_xkl_layout_get_options
|
||||
eek_xkl_layout_get_option
|
||||
EekXklLayoutPrivate
|
||||
<SUBSECTION Standard>
|
||||
EEK_XKL_LAYOUT
|
||||
EEK_IS_XKL_LAYOUT
|
||||
@ -171,7 +220,6 @@ EEK_XKL_LAYOUT_GET_CLASS
|
||||
<TITLE>EekXkbLayout</TITLE>
|
||||
EekXkbLayout
|
||||
EekXkbLayoutClass
|
||||
EekXkbLayoutPrivate
|
||||
eek_xkb_layout_new
|
||||
eek_xkb_layout_set_names
|
||||
eek_xkb_layout_set_names_full
|
||||
@ -182,6 +230,7 @@ eek_xkb_layout_set_symbols
|
||||
eek_xkb_layout_get_keycodes
|
||||
eek_xkb_layout_get_geometry
|
||||
eek_xkb_layout_get_symbols
|
||||
EekXkbLayoutPrivate
|
||||
<SUBSECTION Standard>
|
||||
EEK_XKB_LAYOUT
|
||||
EEK_IS_XKB_LAYOUT
|
||||
@ -195,9 +244,8 @@ EEK_XKB_LAYOUT_GET_CLASS
|
||||
<SECTION>
|
||||
<FILE>eek-key</FILE>
|
||||
<TITLE>EekKey</TITLE>
|
||||
EekKeyClass
|
||||
EekKeyPrivate
|
||||
EekKey
|
||||
EekKeyClass
|
||||
eek_key_set_keycode
|
||||
eek_key_get_keycode
|
||||
eek_key_set_symbol_matrix
|
||||
@ -210,6 +258,8 @@ eek_key_get_index
|
||||
eek_key_set_oref
|
||||
eek_key_get_oref
|
||||
eek_key_is_pressed
|
||||
eek_key_is_locked
|
||||
EekKeyPrivate
|
||||
<SUBSECTION Standard>
|
||||
EEK_KEY
|
||||
EEK_IS_KEY
|
||||
@ -223,7 +273,6 @@ EEK_KEY_GET_CLASS
|
||||
<SECTION>
|
||||
<FILE>eek-serializable</FILE>
|
||||
<TITLE>EekSerializable</TITLE>
|
||||
EekSerializable
|
||||
EekSerializableIface
|
||||
eek_serializable_serialize
|
||||
eek_serializable_deserialize
|
||||
@ -238,9 +287,8 @@ EEK_SERIALIZABLE_GET_IFACE
|
||||
<SECTION>
|
||||
<FILE>eek-element</FILE>
|
||||
<TITLE>EekElement</TITLE>
|
||||
EekElementClass
|
||||
EekElementPrivate
|
||||
EekElement
|
||||
EekElementClass
|
||||
eek_element_set_parent
|
||||
eek_element_get_parent
|
||||
eek_element_set_name
|
||||
@ -256,6 +304,7 @@ eek_element_set_group
|
||||
eek_element_set_level
|
||||
eek_element_get_group
|
||||
eek_element_get_level
|
||||
EekElementPrivate
|
||||
<SUBSECTION Standard>
|
||||
EEK_ELEMENT
|
||||
EEK_IS_ELEMENT
|
||||
@ -271,10 +320,10 @@ EEK_ELEMENT_GET_CLASS
|
||||
<TITLE>EekXmlLayout</TITLE>
|
||||
EekXmlLayout
|
||||
EekXmlLayoutClass
|
||||
EekXmlLayoutPrivate
|
||||
eek_xml_layout_new
|
||||
eek_xml_layout_set_source
|
||||
eek_xml_layout_get_source
|
||||
EekXmlLayoutPrivate
|
||||
<SUBSECTION Standard>
|
||||
EEK_XML_LAYOUT
|
||||
EEK_IS_XML_LAYOUT
|
||||
@ -289,12 +338,13 @@ EEK_XML_LAYOUT_GET_CLASS
|
||||
<FILE>eek-keysym</FILE>
|
||||
<TITLE>EekKeysym</TITLE>
|
||||
EEK_KEYSYM
|
||||
EekKeysymClass
|
||||
EekKeysymPrivate
|
||||
EekKeysym
|
||||
EekKeysymClass
|
||||
eek_keysym_new
|
||||
eek_keysym_get_xkeysym
|
||||
eek_keysym_new_from_name
|
||||
eek_keysym_new_with_modifier
|
||||
EekKeysymPrivate
|
||||
<SUBSECTION Standard>
|
||||
EEK_INVALID_KEYSYM
|
||||
EEK_IS_KEYSYM
|
||||
@ -314,7 +364,6 @@ eek_keyboard_output
|
||||
<SECTION>
|
||||
<FILE>eek-types</FILE>
|
||||
I_
|
||||
EEK_TYPE_SYMBOL_MATRIX
|
||||
EEK_TYPE_POINT
|
||||
EEK_TYPE_BOUNDS
|
||||
EEK_TYPE_OUTLINE
|
||||
@ -323,23 +372,42 @@ EekOrientation
|
||||
EekModifierBehavior
|
||||
EekModifierType
|
||||
EEK_INVALID_KEYCODE
|
||||
EekSymbolMatrix
|
||||
EekPoint
|
||||
eek_point_get_type
|
||||
eek_point_copy
|
||||
eek_point_free
|
||||
eek_point_rotate
|
||||
EekBounds
|
||||
eek_bounds_get_type
|
||||
eek_bounds_copy
|
||||
eek_bounds_free
|
||||
eek_bounds_long_side
|
||||
EekOutline
|
||||
eek_outline_get_type
|
||||
eek_outline_copy
|
||||
eek_outline_free
|
||||
EekColor
|
||||
eek_color_get_type
|
||||
eek_color_new
|
||||
eek_color_copy
|
||||
eek_color_free
|
||||
EekGradientType
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>eek</FILE>
|
||||
eek_init
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>eek-symbol-matrix</FILE>
|
||||
EekSymbolMatrix
|
||||
EEK_TYPE_SYMBOL_MATRIX
|
||||
eek_symbol_matrix_get_type
|
||||
eek_symbol_matrix_new
|
||||
eek_symbol_matrix_copy
|
||||
eek_symbol_matrix_free
|
||||
eek_point_get_type
|
||||
eek_point_rotate
|
||||
eek_bounds_get_type
|
||||
eek_bounds_long_side
|
||||
eek_outline_get_type
|
||||
eek_outline_copy
|
||||
eek_outline_free
|
||||
eek_color_get_type
|
||||
eek_color_new
|
||||
eek_symbol_matrix_set_symbol
|
||||
eek_symbol_matrix_get_symbol
|
||||
</SECTION>
|
||||
|
||||
|
||||
@ -35,10 +35,15 @@
|
||||
<part id="apireference">
|
||||
<title>API Manual</title>
|
||||
<chapter>
|
||||
<title>D-Bus client interface to eekboard-server</title>
|
||||
<xi:include href="xml/eekboard-eekboard.xml"/>
|
||||
<title>Client interface to eekboard-server</title>
|
||||
<xi:include href="xml/eekboard-client.xml"/>
|
||||
<xi:include href="xml/eekboard-context.xml"/>
|
||||
</chapter>
|
||||
<chapter>
|
||||
<title>Server interface to implement custom eekboard-server</title>
|
||||
<xi:include href="xml/eekboard-service.xml"/>
|
||||
<xi:include href="xml/eekboard-context-service.xml"/>
|
||||
</chapter>
|
||||
<chapter id="object-tree">
|
||||
<title>Object Hierarchy</title>
|
||||
<xi:include href="xml/tree_index.sgml"/>
|
||||
|
||||
@ -1,22 +1,41 @@
|
||||
<SECTION>
|
||||
<FILE>eekboard-eekboard</FILE>
|
||||
<TITLE>EekboardEekboard</TITLE>
|
||||
EekboardEekboard
|
||||
EekboardEekboardClass
|
||||
EekboardEekboardPrivate
|
||||
eekboard_eekboard_new
|
||||
eekboard_eekboard_create_context
|
||||
eekboard_eekboard_push_context
|
||||
eekboard_eekboard_pop_context
|
||||
eekboard_eekboard_destroy_context
|
||||
<FILE>eekboard-client</FILE>
|
||||
<TITLE>EekboardClient</TITLE>
|
||||
EekboardClient
|
||||
EekboardClientClass
|
||||
eekboard_client_new
|
||||
eekboard_client_create_context
|
||||
eekboard_client_push_context
|
||||
eekboard_client_pop_context
|
||||
eekboard_client_destroy_context
|
||||
EekboardClientPrivate
|
||||
<SUBSECTION Standard>
|
||||
EEKBOARD_EEKBOARD
|
||||
EEKBOARD_IS_EEKBOARD
|
||||
EEKBOARD_TYPE_EEKBOARD
|
||||
eekboard_eekboard_get_type
|
||||
EEKBOARD_EEKBOARD_CLASS
|
||||
EEKBOARD_IS_EEKBOARD_CLASS
|
||||
EEKBOARD_EEKBOARD_GET_CLASS
|
||||
EEKBOARD_CLIENT
|
||||
EEKBOARD_IS_CLIENT
|
||||
EEKBOARD_TYPE_CLIENT
|
||||
eekboard_client_get_type
|
||||
EEKBOARD_CLIENT_CLASS
|
||||
EEKBOARD_IS_CLIENT_CLASS
|
||||
EEKBOARD_CLIENT_GET_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>eekboard-service</FILE>
|
||||
<TITLE>EekboardService</TITLE>
|
||||
EEKBOARD_SERVICE_PATH
|
||||
EEKBOARD_SERVICE_INTERFACE
|
||||
EekboardService
|
||||
EekboardServiceClass
|
||||
eekboard_service_new
|
||||
EekboardServicePrivate
|
||||
<SUBSECTION Standard>
|
||||
EEKBOARD_SERVICE
|
||||
EEKBOARD_IS_SERVICE
|
||||
EEKBOARD_TYPE_SERVICE
|
||||
eekboard_service_get_type
|
||||
EEKBOARD_SERVICE_CLASS
|
||||
EEKBOARD_IS_SERVICE_CLASS
|
||||
EEKBOARD_SERVICE_GET_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@ -24,17 +43,21 @@ EEKBOARD_EEKBOARD_GET_CLASS
|
||||
<TITLE>EekboardContext</TITLE>
|
||||
EekboardContext
|
||||
EekboardContextClass
|
||||
EekboardContextPrivate
|
||||
eekboard_context_new
|
||||
eekboard_context_add_keyboard
|
||||
eekboard_context_remove_keyboard
|
||||
eekboard_context_set_keyboard
|
||||
eekboard_context_show_keyboard
|
||||
eekboard_context_hide_keyboard
|
||||
eekboard_context_set_group
|
||||
eekboard_context_press_key
|
||||
eekboard_context_release_key
|
||||
eekboard_context_get_group
|
||||
eekboard_context_press_keycode
|
||||
eekboard_context_release_keycode
|
||||
eekboard_context_is_keyboard_visible
|
||||
eekboard_context_set_enabled
|
||||
eekboard_context_is_enabled
|
||||
eekboard_context_set_fullscreen
|
||||
EekboardContextPrivate
|
||||
<SUBSECTION Standard>
|
||||
EEKBOARD_CONTEXT
|
||||
EEKBOARD_IS_CONTEXT
|
||||
@ -45,3 +68,37 @@ EEKBOARD_IS_CONTEXT_CLASS
|
||||
EEKBOARD_CONTEXT_GET_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>eekboard-context-service</FILE>
|
||||
<TITLE>EekboardContextService</TITLE>
|
||||
EEKBOARD_CONTEXT_SERVICE_PATH
|
||||
EEKBOARD_CONTEXT_SERVICE_INTERFACE
|
||||
EekboardContextService
|
||||
EekboardContextServiceClass
|
||||
eekboard_context_service_enable
|
||||
eekboard_context_service_disable
|
||||
eekboard_context_service_get_keyboard
|
||||
eekboard_context_service_get_fullscreen
|
||||
eekboard_context_service_get_client_name
|
||||
EekboardContextServicePrivate
|
||||
<SUBSECTION Standard>
|
||||
EEKBOARD_CONTEXT_SERVICE
|
||||
EEKBOARD_IS_CONTEXT_SERVICE
|
||||
EEKBOARD_TYPE_CONTEXT_SERVICE
|
||||
eekboard_context_service_get_type
|
||||
EEKBOARD_CONTEXT_SERVICE_CLASS
|
||||
EEKBOARD_IS_CONTEXT_SERVICE_CLASS
|
||||
EEKBOARD_CONTEXT_SERVICE_GET_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>eekboard-xklutil</FILE>
|
||||
eekboard_xkl_config_rec_from_string
|
||||
eekboard_xkl_config_rec_to_string
|
||||
eekboard_xkl_list_models
|
||||
eekboard_xkl_list_layouts
|
||||
eekboard_xkl_list_option_groups
|
||||
eekboard_xkl_list_layout_variants
|
||||
eekboard_xkl_list_options
|
||||
</SECTION>
|
||||
|
||||
|
||||
@ -1,2 +1,4 @@
|
||||
eekboard_client_get_type
|
||||
eekboard_context_get_type
|
||||
eekboard_eekboard_get_type
|
||||
eekboard_context_service_get_type
|
||||
eekboard_service_get_type
|
||||
|
||||
@ -35,10 +35,12 @@ libeek_public_headers = \
|
||||
$(srcdir)/eek-key.h \
|
||||
$(srcdir)/eek-symbol.h \
|
||||
$(srcdir)/eek-keysym.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 = \
|
||||
@ -46,15 +48,20 @@ libeek_private_headers = \
|
||||
$(srcdir)/eek-special-keysym-entries.h \
|
||||
$(srcdir)/eek-unicode-keysym-entries.h \
|
||||
$(srcdir)/eek-xkeysym-keysym-entries.h \
|
||||
$(srcdir)/eek-marshalers.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-types.c \
|
||||
@ -62,7 +69,10 @@ libeek_sources = \
|
||||
$(srcdir)/eek-xml.c \
|
||||
$(srcdir)/eek-xml-layout.c \
|
||||
$(srcdir)/eek-renderer.c \
|
||||
$(srcdir)/eek-keyboard-drawing.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 \
|
||||
@ -79,14 +89,16 @@ libeek_marshalers_sources = \
|
||||
|
||||
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 = $(GIO2_CFLAGS) $(PANGOCAIRO_CFLAGS)
|
||||
libeek_la_LIBADD = $(GIO2_LIBS) $(PANGOCAIRO_LIBS) -lm
|
||||
libeek_la_CFLAGS = -DEEK_COMPILATION=1 $(GIO2_CFLAGS) $(PANGOCAIRO_CFLAGS) $(LIBCROCO_CFLAGS)
|
||||
libeek_la_LIBADD = $(GIO2_LIBS) $(PANGOCAIRO_LIBS) $(LIBCROCO_LIBS) -lm
|
||||
|
||||
if ENABLE_CLUTTER
|
||||
libeek_clutter_public_headers = \
|
||||
@ -105,7 +117,7 @@ libeek_clutter_sources = \
|
||||
$(srcdir)/eek-clutter-renderer.c
|
||||
|
||||
libeek_clutter_la_SOURCES = $(libeek_clutter_sources)
|
||||
libeek_clutter_la_CFLAGS = $(CLUTTER_CFLAGS)
|
||||
libeek_clutter_la_CFLAGS = -DEEK_COMPILATION=1 $(CLUTTER_CFLAGS)
|
||||
libeek_clutter_la_LIBADD = libeek.la $(CLUTTER_LIBS)
|
||||
endif
|
||||
|
||||
@ -119,8 +131,8 @@ libeek_gtk_sources = \
|
||||
$(srcdir)/eek-gtk-renderer.c
|
||||
|
||||
libeek_gtk_la_SOURCES = $(libeek_gtk_sources)
|
||||
libeek_gtk_la_CFLAGS = $(GTK_CFLAGS)
|
||||
libeek_gtk_la_LIBADD = libeek.la $(GTK_LIBS)
|
||||
libeek_gtk_la_CFLAGS = -DEEK_COMPILATION=1 $(GTK_CFLAGS) $(LIBCANBERRA_CFLAGS)
|
||||
libeek_gtk_la_LIBADD = libeek.la $(GTK_LIBS) $(LIBCANBERRA_LIBS)
|
||||
|
||||
libeek_xkb_public_headers = \
|
||||
$(srcdir)/eek-xkb-layout.h \
|
||||
@ -130,7 +142,7 @@ libeek_xkb_sources = \
|
||||
$(srcdir)/eek-xkb-layout.c
|
||||
|
||||
libeek_xkb_la_SOURCES = $(libeek_xkb_sources)
|
||||
libeek_xkb_la_CFLAGS = $(XKB_CFLAGS) $(GTK_CFLAGS)
|
||||
libeek_xkb_la_CFLAGS = -DEEK_COMPILATION=1 $(XKB_CFLAGS) $(GTK_CFLAGS)
|
||||
libeek_xkb_la_LIBADD = libeek.la $(XKB_LIBS) $(GTK_LIBS)
|
||||
|
||||
libeek_xkl_public_headers = \
|
||||
@ -141,12 +153,13 @@ libeek_xkl_sources = \
|
||||
$(srcdir)/eek-xkl-layout.c
|
||||
|
||||
libeek_xkl_la_SOURCES = $(libeek_xkl_sources)
|
||||
libeek_xkl_la_CFLAGS = $(LIBXKLAVIER_CFLAGS) $(GTK_CFLAGS)
|
||||
libeek_xkl_la_CFLAGS = -DEEK_COMPILATION=1 $(LIBXKLAVIER_CFLAGS) $(GTK_CFLAGS)
|
||||
libeek_xkl_la_LIBADD = libeek-xkb.la $(LIBXKLAVIER_LIBS) $(GTK_LIBS)
|
||||
|
||||
eekdir = $(includedir)/eek-$(EEK_API_VERSION)/eek
|
||||
eek_HEADERS = \
|
||||
$(libeek_public_headers) \
|
||||
$(srcdir)/eek-enumtypes.h \
|
||||
$(libeek_clutter_public_headers) \
|
||||
$(libeek_gtk_public_headers) \
|
||||
$(libeek_xkb_public_headers) \
|
||||
@ -160,11 +173,24 @@ noinst_HEADERS = \
|
||||
$(libeek_xkl_private_headers)
|
||||
|
||||
eek-special-keysym-entries.h: special-keysym-entries.txt
|
||||
$(PYTHON) ./gen-keysym-entries.py special_keysym_entries < $< > $@
|
||||
$(AM_V_GEN) $(PYTHON) ./gen-keysym-entries.py special_keysym_entries \
|
||||
< $< > $@
|
||||
eek-unicode-keysym-entries.h: unicode-keysym-entries.txt
|
||||
$(PYTHON) ./gen-keysym-entries.py unicode_keysym_entries < $< > $@
|
||||
$(AM_V_GEN) $(PYTHON) ./gen-keysym-entries.py unicode_keysym_entries \
|
||||
< $< > $@
|
||||
eek-xkeysym-keysym-entries.h: xkeysym-keysym-entries.txt
|
||||
$(PYTHON) ./gen-keysym-entries.py xkeysym_keysym_entries < $< > $@
|
||||
$(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
|
||||
@ -198,6 +224,8 @@ EXTRA_DIST = \
|
||||
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)
|
||||
@ -212,7 +240,7 @@ Eek@EEK_LIBRARY_SUFFIX_U@_gir_SCANNERFLAGS = --strip-prefix=Eek --pkg=glib-2.0
|
||||
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)
|
||||
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_INCLUDES = GObject-2.0 Gtk-@GTK_API_VERSION@ Eek@EEK_LIBRARY_SUFFIX@
|
||||
|
||||
@ -23,8 +23,8 @@ includedir=@includedir@
|
||||
|
||||
Name: EEK
|
||||
Description: A Library to Create Keyboard-like UI
|
||||
URL: http://ueno.github.com/eekboard/
|
||||
URL: http://fedorahosted.org/eekboard/
|
||||
Version: @VERSION@
|
||||
Requires: gobject-2.0
|
||||
Requires: gobject-2.0 gio-2.0
|
||||
Libs: -L${libdir} -leek
|
||||
Cflags: -I${includedir}/eek-@EEK_API_VERSION@
|
||||
|
||||
@ -23,7 +23,7 @@ includedir=@includedir@
|
||||
|
||||
Name: libeek-clutter
|
||||
Description: A Library to Create Keyboard-like UI (Clutter Support)
|
||||
URL: http://ueno.github.com/eekboard/
|
||||
URL: http://fedorahosted.org/eekboard/
|
||||
Version: @VERSION@
|
||||
Requires: eek-@EEK_API_VERSION@ clutter-1.0
|
||||
Libs: -L${libdir} -leek-clutter
|
||||
|
||||
@ -22,13 +22,14 @@
|
||||
* SECTION:eek-clutter-keyboard
|
||||
* @short_description: a #ClutterActor displaying #EekKeyboard
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "eek-clutter-keyboard.h"
|
||||
#include "eek-clutter-section.h"
|
||||
#include "eek-clutter-renderer.h"
|
||||
@ -49,6 +50,7 @@ struct _EekClutterKeyboardPrivate
|
||||
{
|
||||
EekKeyboard *keyboard;
|
||||
EekClutterRenderer *renderer;
|
||||
EekTheme *theme;
|
||||
};
|
||||
|
||||
struct _CreateSectionCallbackData {
|
||||
@ -77,6 +79,9 @@ eek_clutter_keyboard_real_realize (ClutterActor *self)
|
||||
|
||||
priv = EEK_CLUTTER_KEYBOARD_GET_PRIVATE(self);
|
||||
|
||||
if (priv->theme)
|
||||
eek_renderer_set_theme (EEK_RENDERER(priv->renderer), priv->theme);
|
||||
|
||||
scale = eek_renderer_get_scale (EEK_RENDERER(priv->renderer));
|
||||
clutter_actor_set_position (CLUTTER_ACTOR(self),
|
||||
bounds.x * scale,
|
||||
@ -125,7 +130,6 @@ eek_clutter_keyboard_real_allocate (ClutterActor *self,
|
||||
{
|
||||
EekClutterKeyboardPrivate *priv = EEK_CLUTTER_KEYBOARD_GET_PRIVATE(self);
|
||||
|
||||
g_assert (priv->renderer);
|
||||
eek_renderer_set_allocation_size (EEK_RENDERER(priv->renderer),
|
||||
box->x2 - box->x1,
|
||||
box->y2 - box->y1);
|
||||
@ -192,6 +196,11 @@ eek_clutter_keyboard_dispose (GObject *object)
|
||||
priv->keyboard = NULL;
|
||||
}
|
||||
|
||||
if (priv->theme) {
|
||||
g_object_unref (priv->theme);
|
||||
priv->keyboard = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (eek_clutter_keyboard_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
@ -248,3 +257,16 @@ eek_clutter_keyboard_new (EekKeyboard *keyboard)
|
||||
{
|
||||
return g_object_new (EEK_TYPE_CLUTTER_KEYBOARD, "keyboard", keyboard, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
eek_clutter_keyboard_set_theme (EekClutterKeyboard *keyboard,
|
||||
EekTheme *theme)
|
||||
{
|
||||
EekClutterKeyboardPrivate *priv;
|
||||
|
||||
g_return_if_fail (EEK_IS_CLUTTER_KEYBOARD(keyboard));
|
||||
g_return_if_fail (EEK_IS_THEME(theme));
|
||||
|
||||
priv = EEK_CLUTTER_KEYBOARD_GET_PRIVATE(keyboard);
|
||||
priv->theme = g_object_ref (theme);
|
||||
}
|
||||
|
||||
@ -17,6 +17,11 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek-clutter.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef EEK_CLUTTER_KEYBOARD_H
|
||||
#define EEK_CLUTTER_KEYBOARD_H 1
|
||||
|
||||
@ -54,7 +59,9 @@ struct _EekClutterKeyboardClass
|
||||
};
|
||||
|
||||
GType eek_clutter_keyboard_get_type (void) G_GNUC_CONST;
|
||||
ClutterActor *eek_clutter_keyboard_new (EekKeyboard *keyboard);
|
||||
ClutterActor *eek_clutter_keyboard_new (EekKeyboard *keyboard);
|
||||
void eek_clutter_keyboard_set_theme (EekClutterKeyboard *keyboard,
|
||||
EekTheme *theme);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEK_CLUTTER_KEYBOARD_H */
|
||||
|
||||
@ -18,16 +18,16 @@
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#include <cogl/cogl.h>
|
||||
#include <cogl/cogl-pango.h>
|
||||
#include <clutter/clutter.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include "eek-clutter-renderer.h"
|
||||
#include "eek-key.h"
|
||||
|
||||
@ -77,6 +77,14 @@ cairo_pixels_to_pixbuf (guint8 *pixels,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
eek_clutter_renderer_finalize (GObject *object)
|
||||
{
|
||||
EekClutterRendererPrivate *priv = EEK_CLUTTER_RENDERER_GET_PRIVATE(object);
|
||||
g_hash_table_destroy (priv->outline_texture_cache);
|
||||
G_OBJECT_CLASS (eek_clutter_renderer_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
eek_clutter_renderer_class_init (EekClutterRendererClass *klass)
|
||||
{
|
||||
@ -84,6 +92,8 @@ eek_clutter_renderer_class_init (EekClutterRendererClass *klass)
|
||||
|
||||
g_type_class_add_private (gobject_class,
|
||||
sizeof (EekClutterRendererPrivate));
|
||||
|
||||
gobject_class->finalize = eek_clutter_renderer_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -109,7 +119,8 @@ eek_clutter_renderer_render_key (EekClutterRenderer *renderer,
|
||||
CoglHandle *outline_texture;
|
||||
PangoLayout *layout;
|
||||
PangoRectangle extents = { 0, };
|
||||
CoglColor color = { 0x00, 0x00, 0x00, 0xFF };
|
||||
EekColor foreground;
|
||||
CoglColor color;
|
||||
ClutterGeometry geom;
|
||||
gulong oref;
|
||||
EekKeyboard *keyboard;
|
||||
@ -190,6 +201,17 @@ eek_clutter_renderer_render_key (EekClutterRenderer *renderer,
|
||||
layout = eek_renderer_create_pango_layout (EEK_RENDERER(renderer));
|
||||
eek_renderer_render_key_label (EEK_RENDERER(renderer), layout, key);
|
||||
pango_layout_get_extents (layout, NULL, &extents);
|
||||
|
||||
eek_renderer_get_foreground_color (EEK_RENDERER(renderer),
|
||||
EEK_ELEMENT(key),
|
||||
&foreground);
|
||||
|
||||
cogl_color_set_from_4f (&color,
|
||||
foreground.red,
|
||||
foreground.green,
|
||||
foreground.blue,
|
||||
foreground.alpha);
|
||||
|
||||
cogl_pango_render_layout (layout,
|
||||
(geom.width - extents.width / PANGO_SCALE) / 2,
|
||||
(geom.height - extents.height / PANGO_SCALE) / 2,
|
||||
|
||||
@ -53,7 +53,8 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (EekContainer, eek_container, EEK_TYPE_ELEMENT,
|
||||
|
||||
struct _EekContainerPrivate
|
||||
{
|
||||
GSList *children;
|
||||
GList *head;
|
||||
GList *last;
|
||||
};
|
||||
|
||||
static EekSerializableIface *eek_container_parent_serializable_iface;
|
||||
@ -63,13 +64,13 @@ eek_container_real_serialize (EekSerializable *self,
|
||||
GVariantBuilder *builder)
|
||||
{
|
||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
|
||||
GSList *head;
|
||||
GList *head;
|
||||
GVariantBuilder array;
|
||||
|
||||
eek_container_parent_serializable_iface->serialize (self, builder);
|
||||
|
||||
g_variant_builder_init (&array, G_VARIANT_TYPE("av"));
|
||||
for (head = priv->children; head; head = g_slist_next (head)) {
|
||||
for (head = priv->head; head; head = g_list_next (head)) {
|
||||
GVariant *variant =
|
||||
eek_serializable_serialize (EEK_SERIALIZABLE(head->data));
|
||||
g_variant_builder_add (&array, "v", variant);
|
||||
@ -119,7 +120,12 @@ eek_container_real_add_child (EekContainer *self,
|
||||
g_return_if_fail (EEK_IS_ELEMENT(child));
|
||||
g_object_ref (child);
|
||||
|
||||
priv->children = g_slist_prepend (priv->children, child);
|
||||
if (!priv->head) {
|
||||
priv->head = priv->last = g_list_prepend (priv->head, child);
|
||||
} else {
|
||||
priv->last->next = g_list_prepend (priv->last->next, child);
|
||||
priv->last = priv->last->next;
|
||||
}
|
||||
eek_element_set_parent (child, EEK_ELEMENT(self));
|
||||
g_signal_emit_by_name (self, "child-added", child);
|
||||
}
|
||||
@ -129,13 +135,15 @@ eek_container_real_remove_child (EekContainer *self,
|
||||
EekElement *child)
|
||||
{
|
||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
|
||||
GSList *head;
|
||||
GList *head;
|
||||
|
||||
g_return_if_fail (EEK_IS_ELEMENT(child));
|
||||
head = g_slist_find (priv->children, child);
|
||||
head = g_list_find (priv->head, child);
|
||||
g_return_if_fail (head);
|
||||
g_object_unref (child);
|
||||
priv->children = g_slist_remove_link (priv->children, head);
|
||||
if (head == priv->last)
|
||||
priv->last = g_list_previous (priv->last);
|
||||
priv->head = g_list_remove_link (priv->head, head);
|
||||
eek_element_set_parent (child, NULL);
|
||||
g_signal_emit_by_name (self, "child-removed", child);
|
||||
}
|
||||
@ -146,9 +154,9 @@ eek_container_real_foreach_child (EekContainer *self,
|
||||
gpointer user_data)
|
||||
{
|
||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
|
||||
GSList *head;
|
||||
GList *head;
|
||||
|
||||
for (head = priv->children; head; head = g_slist_next (head))
|
||||
for (head = priv->head; head; head = g_list_next (head))
|
||||
(*callback) (EEK_ELEMENT(head->data), user_data);
|
||||
}
|
||||
|
||||
@ -158,9 +166,9 @@ eek_container_real_find (EekContainer *self,
|
||||
gpointer user_data)
|
||||
{
|
||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
|
||||
GSList *head;
|
||||
GList *head;
|
||||
|
||||
head = g_slist_find_custom (priv->children, user_data, (GCompareFunc)func);
|
||||
head = g_list_find_custom (priv->head, user_data, (GCompareFunc)func);
|
||||
if (head)
|
||||
return head->data;
|
||||
return NULL;
|
||||
@ -170,12 +178,12 @@ static void
|
||||
eek_container_dispose (GObject *object)
|
||||
{
|
||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(object);
|
||||
GSList *head;
|
||||
GList *head;
|
||||
|
||||
for (head = priv->children; head; head = priv->children) {
|
||||
for (head = priv->head; head; head = priv->head) {
|
||||
g_object_unref (head->data);
|
||||
priv->children = g_slist_next (head);
|
||||
g_slist_free1 (head);
|
||||
priv->head = g_list_next (head);
|
||||
g_list_free1 (head);
|
||||
}
|
||||
G_OBJECT_CLASS(eek_container_parent_class)->dispose (object);
|
||||
}
|
||||
@ -240,16 +248,13 @@ eek_container_class_init (EekContainerClass *klass)
|
||||
static void
|
||||
eek_container_init (EekContainer *self)
|
||||
{
|
||||
EekContainerPrivate *priv;
|
||||
|
||||
priv = self->priv = EEK_CONTAINER_GET_PRIVATE(self);
|
||||
priv->children = NULL;
|
||||
self->priv = EEK_CONTAINER_GET_PRIVATE(self);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_container_foreach_child:
|
||||
* @container: an #EekContainer
|
||||
* @callback: an #EekCallback
|
||||
* @callback: (scope call): an #EekCallback
|
||||
* @user_data: additional data passed to @callback
|
||||
*
|
||||
* Enumerate children of @container and run @callback with each child.
|
||||
|
||||
@ -17,6 +17,11 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef EEK_CONTAINER_H
|
||||
#define EEK_CONTAINER_H 1
|
||||
|
||||
@ -34,6 +39,14 @@ G_BEGIN_DECLS
|
||||
typedef struct _EekContainerClass EekContainerClass;
|
||||
typedef struct _EekContainerPrivate EekContainerPrivate;
|
||||
|
||||
/**
|
||||
* EekCallback:
|
||||
* @element: an #EekElement
|
||||
* @user_data: user-supplied data
|
||||
*
|
||||
* The type of the callback function used for iterating over the
|
||||
* children of a container, see eek_container_foreach_child().
|
||||
*/
|
||||
typedef void (*EekCallback) (EekElement *element, gpointer user_data);
|
||||
typedef gint (*EekCompareFunc) (EekElement *element, gpointer user_data);
|
||||
|
||||
|
||||
@ -26,12 +26,12 @@
|
||||
* shall be used to implement #EekKeyboard, #EekSection, or #EekKey.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "eek-element.h"
|
||||
#include "eek-container.h"
|
||||
#include "eek-marshalers.h"
|
||||
@ -404,8 +404,6 @@ eek_element_init (EekElement *self)
|
||||
EekElementPrivate *priv;
|
||||
|
||||
priv = self->priv = EEK_ELEMENT_GET_PRIVATE(self);
|
||||
priv->name = NULL;
|
||||
memset (&priv->bounds, 0, sizeof priv->bounds);
|
||||
priv->group = -1;
|
||||
priv->level = -1;
|
||||
}
|
||||
@ -489,7 +487,7 @@ eek_element_set_bounds (EekElement *element,
|
||||
/**
|
||||
* eek_element_get_bounds:
|
||||
* @element: an #EekElement
|
||||
* @bounds: pointer where bounding box of @element will be stored
|
||||
* @bounds: (out): pointer where bounding box of @element will be stored
|
||||
*
|
||||
* Get the bounding box of @element. Note that if @element has
|
||||
* parent, position of @bounds are relative to the parent. To obtain
|
||||
|
||||
@ -17,6 +17,11 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef EEK_ELEMENT_H
|
||||
#define EEK_ELEMENT_H 1
|
||||
|
||||
|
||||
36
eek/eek-enumtypes.c.template
Normal file
36
eek/eek-enumtypes.c.template
Normal file
@ -0,0 +1,36 @@
|
||||
/*** BEGIN file-header ***/
|
||||
#include "eek.h"
|
||||
|
||||
/*** END file-header ***/
|
||||
|
||||
/*** BEGIN file-production ***/
|
||||
/* enumerations from "@filename@" */
|
||||
/*** END file-production ***/
|
||||
|
||||
/*** BEGIN value-header ***/
|
||||
GType
|
||||
@enum_name@_get_type (void)
|
||||
{
|
||||
static volatile gsize g_define_type_id__volatile = 0;
|
||||
|
||||
if (g_once_init_enter (&g_define_type_id__volatile))
|
||||
{
|
||||
static const G@Type@Value values[] = {
|
||||
/*** END value-header ***/
|
||||
|
||||
/*** BEGIN value-production ***/
|
||||
{ @VALUENAME@, "@VALUENAME@", "@valuenick@" },
|
||||
/*** END value-production ***/
|
||||
|
||||
/*** BEGIN value-tail ***/
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
GType g_define_type_id =
|
||||
g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
|
||||
g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
|
||||
}
|
||||
|
||||
return g_define_type_id__volatile;
|
||||
}
|
||||
|
||||
/*** END value-tail ***/
|
||||
29
eek/eek-enumtypes.h.template
Normal file
29
eek/eek-enumtypes.h.template
Normal file
@ -0,0 +1,29 @@
|
||||
/*** BEGIN file-header ***/
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __EEK_ENUMTYPES_H__
|
||||
#define __EEK_ENUMTYPES_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
/*** END file-header ***/
|
||||
|
||||
/*** BEGIN file-production ***/
|
||||
|
||||
/* enumerations from "@filename@" */
|
||||
/*** END file-production ***/
|
||||
|
||||
/*** BEGIN value-header ***/
|
||||
GType @enum_name@_get_type (void) G_GNUC_CONST;
|
||||
#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
|
||||
/*** END value-header ***/
|
||||
|
||||
/*** BEGIN file-tail ***/
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __EEK_ENUMTYPES_H__ */
|
||||
/*** END file-tail ***/
|
||||
@ -23,7 +23,7 @@ includedir=@includedir@
|
||||
|
||||
Name: libeek-gtk
|
||||
Description: A Library to Create Keyboard-like UI (GTK Support)
|
||||
URL: http://ueno.github.com/eekboard/
|
||||
URL: http://fedorahosted.org/eekboard/
|
||||
Version: @VERSION@
|
||||
Requires: eek-@EEK_API_VERSION@ gtk+-@GTK_API_VERSION@
|
||||
Libs: -L${libdir} -leek-gtk
|
||||
|
||||
@ -22,12 +22,17 @@
|
||||
* SECTION:eek-gtk-keyboard
|
||||
* @short_description: a #GtkWidget displaying #EekKeyboard
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#ifdef HAVE_LIBCANBERRA
|
||||
#include <canberra-gtk.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "eek-gtk-keyboard.h"
|
||||
#include "eek-gtk-renderer.h"
|
||||
#include "eek-keyboard.h"
|
||||
@ -56,10 +61,13 @@ struct _EekGtkKeyboardPrivate
|
||||
{
|
||||
EekRenderer *renderer;
|
||||
EekKeyboard *keyboard;
|
||||
EekKey *dragged_key;
|
||||
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;
|
||||
};
|
||||
|
||||
static EekColor * color_from_gdk_color (GdkColor *gdk_color);
|
||||
@ -69,12 +77,25 @@ static void on_key_pressed (EekKeyboard *keyboard,
|
||||
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);
|
||||
static void render_pressed_key (GtkWidget *widget,
|
||||
EekKey *key);
|
||||
static void render_locked_key (GtkWidget *widget,
|
||||
EekKey *key);
|
||||
static void render_released_key (GtkWidget *widget,
|
||||
EekKey *key);
|
||||
|
||||
static void
|
||||
eek_gtk_keyboard_real_realize (GtkWidget *self)
|
||||
@ -85,7 +106,8 @@ eek_gtk_keyboard_real_realize (GtkWidget *self)
|
||||
GDK_KEY_PRESS_MASK |
|
||||
GDK_KEY_RELEASE_MASK |
|
||||
GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK);
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_BUTTON_MOTION_MASK);
|
||||
|
||||
GTK_WIDGET_CLASS (eek_gtk_keyboard_parent_class)->realize (self);
|
||||
}
|
||||
@ -96,6 +118,8 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
GtkAllocation allocation;
|
||||
EekColor background;
|
||||
GList *head;
|
||||
|
||||
gtk_widget_get_allocation (self, &allocation);
|
||||
|
||||
@ -103,9 +127,12 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
|
||||
GtkStyle *style;
|
||||
GtkStateType state;
|
||||
PangoContext *pcontext;
|
||||
EekColor *color;
|
||||
|
||||
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);
|
||||
|
||||
eek_renderer_set_allocation_size (priv->renderer,
|
||||
allocation.width,
|
||||
@ -114,19 +141,39 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
|
||||
style = gtk_widget_get_style (self);
|
||||
state = gtk_widget_get_state (self);
|
||||
|
||||
eek_renderer_set_foreground
|
||||
(priv->renderer,
|
||||
color_from_gdk_color (&style->fg[state]));
|
||||
eek_renderer_set_background
|
||||
(priv->renderer,
|
||||
color_from_gdk_color (&style->bg[state]));
|
||||
color = color_from_gdk_color (&style->fg[state]);
|
||||
eek_renderer_set_default_foreground_color (priv->renderer, color);
|
||||
eek_color_free (color);
|
||||
|
||||
color = color_from_gdk_color (&style->bg[state]);
|
||||
eek_renderer_set_default_background_color (priv->renderer, color);
|
||||
eek_color_free (color);
|
||||
}
|
||||
|
||||
/* 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 dragged key */
|
||||
if (priv->dragged_key)
|
||||
render_pressed_key (self, priv->dragged_key);
|
||||
/* redraw pressed key */
|
||||
head = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
for (; head; head = g_list_next (head)) {
|
||||
render_pressed_key (self, head->data);
|
||||
}
|
||||
|
||||
/* redraw locked key */
|
||||
head = eek_keyboard_get_locked_keys (priv->keyboard);
|
||||
for (; head; head = g_list_next (head)) {
|
||||
render_locked_key (self, ((EekModifierKey *)head->data)->key);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@ -172,14 +219,8 @@ eek_gtk_keyboard_real_button_press_event (GtkWidget *self,
|
||||
key = eek_renderer_find_key_by_position (priv->renderer,
|
||||
(gdouble)event->x,
|
||||
(gdouble)event->y);
|
||||
|
||||
if (priv->dragged_key && priv->dragged_key != key)
|
||||
g_signal_emit_by_name (priv->dragged_key, "released", priv->keyboard);
|
||||
if (key && !eek_key_is_pressed (key)) {
|
||||
priv->dragged_key = key;
|
||||
if (key)
|
||||
g_signal_emit_by_name (key, "pressed", priv->keyboard);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -188,13 +229,55 @@ eek_gtk_keyboard_real_button_release_event (GtkWidget *self,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
GList *head;
|
||||
|
||||
if (priv->dragged_key) {
|
||||
g_signal_emit_by_name (priv->dragged_key, "released", priv->keyboard);
|
||||
priv->dragged_key = NULL;
|
||||
head = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
for (; head; head = g_list_next (head)) {
|
||||
g_signal_emit_by_name (head->data, "released", priv->keyboard);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
eek_gtk_keyboard_real_motion_notify_event (GtkWidget *self,
|
||||
GdkEventMotion *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) {
|
||||
GList *head = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
gboolean found = FALSE;
|
||||
for (; head; head = g_list_next (head)) {
|
||||
if (head->data == key)
|
||||
found = TRUE;
|
||||
else
|
||||
g_signal_emit_by_name (head->data, "cancelled", priv->keyboard);
|
||||
}
|
||||
if (!found)
|
||||
g_signal_emit_by_name (key, "pressed", priv->keyboard);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_gtk_keyboard_real_unmap (GtkWidget *self)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
|
||||
if (priv->keyboard) {
|
||||
GList *head;
|
||||
|
||||
head = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
for (; head; head = g_list_next (head)) {
|
||||
g_signal_emit_by_name (head->data, "released", priv->keyboard);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
GTK_WIDGET_CLASS (eek_gtk_keyboard_parent_class)->unmap (self);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -210,6 +293,15 @@ eek_gtk_keyboard_set_keyboard (EekGtkKeyboard *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);
|
||||
@ -255,22 +347,39 @@ eek_gtk_keyboard_dispose (GObject *object)
|
||||
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);
|
||||
|
||||
if (priv->dragged_key) {
|
||||
g_signal_emit_by_name (priv->dragged_key,
|
||||
"released",
|
||||
priv->keyboard);
|
||||
priv->dragged_key = NULL;
|
||||
GList *head;
|
||||
|
||||
head = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||
for (; head; head = g_list_next (head)) {
|
||||
g_signal_emit_by_name (head->data, "released", priv->keyboard);
|
||||
}
|
||||
|
||||
g_object_unref (priv->keyboard);
|
||||
priv->keyboard = NULL;
|
||||
}
|
||||
|
||||
|
||||
if (priv->theme) {
|
||||
g_object_unref (priv->theme);
|
||||
priv->theme = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (eek_gtk_keyboard_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
@ -285,6 +394,7 @@ eek_gtk_keyboard_class_init (EekGtkKeyboardClass *klass)
|
||||
sizeof (EekGtkKeyboardPrivate));
|
||||
|
||||
widget_class->realize = eek_gtk_keyboard_real_realize;
|
||||
widget_class->unmap = eek_gtk_keyboard_real_unmap;
|
||||
#if GTK_CHECK_VERSION (2, 91, 2)
|
||||
widget_class->draw = eek_gtk_keyboard_real_draw;
|
||||
#else /* GTK_CHECK_VERSION (2, 91, 2) */
|
||||
@ -295,6 +405,8 @@ eek_gtk_keyboard_class_init (EekGtkKeyboardClass *klass)
|
||||
eek_gtk_keyboard_real_button_press_event;
|
||||
widget_class->button_release_event =
|
||||
eek_gtk_keyboard_real_button_release_event;
|
||||
widget_class->motion_notify_event =
|
||||
eek_gtk_keyboard_real_motion_notify_event;
|
||||
|
||||
gobject_class->set_property = eek_gtk_keyboard_set_property;
|
||||
gobject_class->dispose = eek_gtk_keyboard_dispose;
|
||||
@ -312,12 +424,7 @@ eek_gtk_keyboard_class_init (EekGtkKeyboardClass *klass)
|
||||
static void
|
||||
eek_gtk_keyboard_init (EekGtkKeyboard *self)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv;
|
||||
|
||||
priv = self->priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
priv->renderer = NULL;
|
||||
priv->keyboard = NULL;
|
||||
priv->dragged_key = NULL;
|
||||
self->priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -336,26 +443,33 @@ eek_gtk_keyboard_new (EekKeyboard *keyboard)
|
||||
static EekColor *
|
||||
color_from_gdk_color (GdkColor *gdk_color)
|
||||
{
|
||||
EekColor *color;
|
||||
|
||||
color = g_slice_new (EekColor);
|
||||
color->red = gdk_color->red / (gdouble)0xFFFF;
|
||||
color->green = gdk_color->green / (gdouble)0xFFFF;
|
||||
color->blue = gdk_color->blue / (gdouble)0xFFFF;
|
||||
color->alpha = 1.0;
|
||||
return 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 (EekBounds *bounds, EekBounds *large_bounds, gdouble scale)
|
||||
magnify_bounds (GtkWidget *self,
|
||||
EekBounds *bounds,
|
||||
EekBounds *large_bounds,
|
||||
gdouble scale)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
gdouble x, y;
|
||||
|
||||
g_assert (scale >= 1.0);
|
||||
|
||||
gtk_widget_get_allocation (self, &allocation);
|
||||
|
||||
large_bounds->width = bounds->width * scale;
|
||||
large_bounds->height = bounds->height * scale;
|
||||
|
||||
large_bounds->x = bounds->x - (large_bounds->width - bounds->width) / 2;
|
||||
large_bounds->y = bounds->y - (large_bounds->height - bounds->height) / 2;
|
||||
x = bounds->x - (large_bounds->width - bounds->width) / 2;
|
||||
y = bounds->y - large_bounds->height;
|
||||
|
||||
large_bounds->x = CLAMP(x, 0, allocation.width - large_bounds->width);
|
||||
large_bounds->y = CLAMP(y, 0, allocation.height - large_bounds->height);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -369,10 +483,63 @@ render_pressed_key (GtkWidget *widget,
|
||||
cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (widget)));
|
||||
|
||||
eek_renderer_get_key_bounds (priv->renderer, key, &bounds, TRUE);
|
||||
magnify_bounds (&bounds, &large_bounds, 1.5);
|
||||
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);
|
||||
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
static void
|
||||
render_locked_key (GtkWidget *widget,
|
||||
EekKey *key)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
|
||||
EekBounds bounds;
|
||||
cairo_t *cr;
|
||||
|
||||
cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (widget)));
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
static void
|
||||
render_released_key (GtkWidget *widget,
|
||||
EekKey *key)
|
||||
{
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
|
||||
EekBounds bounds, large_bounds;
|
||||
cairo_t *cr;
|
||||
|
||||
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);
|
||||
|
||||
eek_renderer_render_keyboard (priv->renderer, cr);
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
@ -389,6 +556,14 @@ on_key_pressed (EekKeyboard *keyboard,
|
||||
return;
|
||||
|
||||
render_pressed_key (widget, key);
|
||||
|
||||
#if HAVE_LIBCANBERRA
|
||||
ca_gtk_play_for_widget (widget, 0,
|
||||
CA_PROP_EVENT_ID, "button-pressed",
|
||||
CA_PROP_EVENT_DESCRIPTION, "virtual key pressed",
|
||||
CA_PROP_APPLICATION_ID, "org.fedorahosted.Eekboard",
|
||||
NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
@ -398,25 +573,65 @@ on_key_released (EekKeyboard *keyboard,
|
||||
{
|
||||
GtkWidget *widget = user_data;
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
|
||||
cairo_t *cr;
|
||||
EekBounds bounds, large_bounds;
|
||||
|
||||
/* renderer may have not been set yet if the widget is a popup */
|
||||
if (!priv->renderer)
|
||||
return;
|
||||
|
||||
cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (widget)));
|
||||
render_released_key (widget, key);
|
||||
|
||||
eek_renderer_get_key_bounds (priv->renderer, key, &bounds, TRUE);
|
||||
magnify_bounds (&bounds, &large_bounds, 2.0);
|
||||
cairo_rectangle (cr,
|
||||
large_bounds.x,
|
||||
large_bounds.y,
|
||||
large_bounds.width,
|
||||
large_bounds.height);
|
||||
cairo_clip (cr);
|
||||
eek_renderer_render_keyboard (priv->renderer, cr);
|
||||
cairo_destroy (cr);
|
||||
#if HAVE_LIBCANBERRA
|
||||
ca_gtk_play_for_widget (widget, 0,
|
||||
CA_PROP_EVENT_ID, "button-released",
|
||||
CA_PROP_EVENT_DESCRIPTION, "virtual key pressed",
|
||||
CA_PROP_APPLICATION_ID, "org.fedorahosted.Eekboard",
|
||||
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
|
||||
@ -429,3 +644,16 @@ on_symbol_index_changed (EekKeyboard *keyboard,
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -17,6 +17,11 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek-gtk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef EEK_GTK_KEYBOARD_H
|
||||
#define EEK_GTK_KEYBOARD_H 1
|
||||
|
||||
@ -55,8 +60,10 @@ struct _EekGtkKeyboardClass
|
||||
gpointer pdummy[24];
|
||||
};
|
||||
|
||||
GType eek_gtk_keyboard_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget *eek_gtk_keyboard_new (EekKeyboard *keyboard);
|
||||
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 */
|
||||
|
||||
@ -51,57 +51,27 @@ pixbuf_to_cairo_surface (GdkPixbuf *pixbuf)
|
||||
return surface;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_gtk_renderer_real_render_key_icon (EekRenderer *self,
|
||||
cairo_t *cr,
|
||||
EekKey *key,
|
||||
gdouble scale,
|
||||
gboolean rotate)
|
||||
static cairo_surface_t *
|
||||
eek_gtk_renderer_real_get_icon_surface (EekRenderer *self,
|
||||
const gchar *icon_name,
|
||||
gint size)
|
||||
{
|
||||
EekBounds bounds;
|
||||
EekSymbol *symbol;
|
||||
const gchar *icon_name;
|
||||
GdkPixbuf *pixbuf;
|
||||
cairo_surface_t *surface;
|
||||
GError *error;
|
||||
gint width, height;
|
||||
|
||||
symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
||||
g_return_if_fail (symbol);
|
||||
|
||||
icon_name = eek_symbol_get_icon_name (symbol);
|
||||
g_return_if_fail (icon_name);
|
||||
|
||||
eek_element_get_bounds (EEK_ELEMENT(key), &bounds);
|
||||
bounds.width *= scale;
|
||||
bounds.height *= scale;
|
||||
cairo_surface_t *surface;
|
||||
|
||||
error = NULL;
|
||||
pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
|
||||
icon_name,
|
||||
MIN(bounds.width, bounds.height),
|
||||
size,
|
||||
0,
|
||||
&error);
|
||||
g_return_if_fail (pixbuf);
|
||||
if (pixbuf == NULL)
|
||||
return NULL;
|
||||
|
||||
width = gdk_pixbuf_get_width (pixbuf);
|
||||
height = gdk_pixbuf_get_height (pixbuf);
|
||||
|
||||
if (bounds.width * height < bounds.height * width)
|
||||
scale = bounds.width / width;
|
||||
else
|
||||
scale = bounds.height / height;
|
||||
|
||||
cairo_save (cr);
|
||||
cairo_translate (cr,
|
||||
(bounds.width - width * scale) / 2,
|
||||
(bounds.height - height * scale) / 2);
|
||||
|
||||
eek_renderer_apply_transformation_for_key (self, cr, key, scale, rotate);
|
||||
surface = pixbuf_to_cairo_surface (pixbuf);
|
||||
cairo_set_source_surface (cr, surface, 0.0, 0.0);
|
||||
cairo_paint (cr);
|
||||
cairo_restore (cr);
|
||||
g_object_unref (pixbuf);
|
||||
return surface;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -109,7 +79,7 @@ eek_gtk_renderer_class_init (EekGtkRendererClass *klass)
|
||||
{
|
||||
EekRendererClass *renderer_class = EEK_RENDERER_CLASS (klass);
|
||||
|
||||
renderer_class->render_key_icon = eek_gtk_renderer_real_render_key_icon;
|
||||
renderer_class->get_icon_surface = eek_gtk_renderer_real_get_icon_surface;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
242
eek/eek-key.c
242
eek/eek-key.c
@ -25,20 +25,20 @@
|
||||
* 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
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
#include "eek-key.h"
|
||||
#include "eek-section.h"
|
||||
#include "eek-keyboard.h"
|
||||
#include "eek-symbol.h"
|
||||
#include "eek-serializable.h"
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
@ -53,16 +53,15 @@ enum {
|
||||
enum {
|
||||
PRESSED,
|
||||
RELEASED,
|
||||
LOCKED,
|
||||
UNLOCKED,
|
||||
CANCELLED,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0, };
|
||||
|
||||
static void eek_serializable_iface_init (EekSerializableIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (EekKey, eek_key, EEK_TYPE_ELEMENT,
|
||||
G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
|
||||
eek_serializable_iface_init));
|
||||
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))
|
||||
@ -76,105 +75,9 @@ struct _EekKeyPrivate
|
||||
gint row;
|
||||
gulong oref;
|
||||
gboolean is_pressed;
|
||||
gboolean is_locked;
|
||||
};
|
||||
|
||||
static EekSerializableIface *eek_key_parent_serializable_iface;
|
||||
|
||||
static GVariant *
|
||||
_g_variant_new_symbol_matrix (EekSymbolMatrix *symbol_matrix)
|
||||
{
|
||||
GVariantBuilder builder, array;
|
||||
gint i, num_symbols = symbol_matrix->num_groups * symbol_matrix->num_levels;
|
||||
|
||||
g_variant_builder_init (&builder, G_VARIANT_TYPE ("(iiv)"));
|
||||
g_variant_builder_add (&builder, "i", symbol_matrix->num_groups);
|
||||
g_variant_builder_add (&builder, "i", symbol_matrix->num_levels);
|
||||
g_variant_builder_init (&array, G_VARIANT_TYPE ("av"));
|
||||
for (i = 0; i < num_symbols; i++) {
|
||||
GVariant *symbol = eek_serializable_serialize
|
||||
(EEK_SERIALIZABLE(symbol_matrix->data[i]));
|
||||
g_variant_builder_add (&array, "v", symbol);
|
||||
}
|
||||
g_variant_builder_add (&builder, "v", g_variant_builder_end (&array));
|
||||
return g_variant_builder_end (&builder);
|
||||
}
|
||||
|
||||
static EekSymbolMatrix *
|
||||
_g_variant_get_symbol_matrix (GVariant *variant)
|
||||
{
|
||||
gint num_groups, num_levels, i;
|
||||
EekSymbolMatrix *symbol_matrix;
|
||||
GVariant *array, *child;
|
||||
GVariantIter iter;
|
||||
|
||||
g_variant_get_child (variant, 0, "i", &num_groups);
|
||||
g_variant_get_child (variant, 1, "i", &num_levels);
|
||||
symbol_matrix = eek_symbol_matrix_new (num_groups, num_levels);
|
||||
|
||||
g_variant_get_child (variant, 2, "v", &array);
|
||||
g_variant_iter_init (&iter, array);
|
||||
for (i = 0; i < num_groups * num_levels; i++) {
|
||||
EekSerializable *serializable;
|
||||
|
||||
if (!g_variant_iter_next (&iter, "v", &child)) {
|
||||
eek_symbol_matrix_free (symbol_matrix);
|
||||
g_return_val_if_reached (NULL);
|
||||
}
|
||||
|
||||
serializable = eek_serializable_deserialize (child);
|
||||
symbol_matrix->data[i] = EEK_SYMBOL(serializable);
|
||||
}
|
||||
return symbol_matrix;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_key_real_serialize (EekSerializable *self,
|
||||
GVariantBuilder *builder)
|
||||
{
|
||||
EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(self);
|
||||
|
||||
eek_key_parent_serializable_iface->serialize (self, builder);
|
||||
|
||||
g_variant_builder_add (builder, "u", priv->keycode);
|
||||
g_variant_builder_add (builder, "v",
|
||||
_g_variant_new_symbol_matrix (priv->symbol_matrix));
|
||||
g_variant_builder_add (builder, "i", priv->column);
|
||||
g_variant_builder_add (builder, "i", priv->row);
|
||||
g_variant_builder_add (builder, "u", priv->oref);
|
||||
}
|
||||
|
||||
static gsize
|
||||
eek_key_real_deserialize (EekSerializable *self,
|
||||
GVariant *variant,
|
||||
gsize index)
|
||||
{
|
||||
EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(self);
|
||||
GVariant *symbol_matrix;
|
||||
|
||||
index = eek_key_parent_serializable_iface->deserialize (self,
|
||||
variant,
|
||||
index);
|
||||
|
||||
g_variant_get_child (variant, index++, "u", &priv->keycode);
|
||||
g_variant_get_child (variant, index++, "v", &symbol_matrix);
|
||||
priv->symbol_matrix = _g_variant_get_symbol_matrix (symbol_matrix);
|
||||
g_variant_get_child (variant, index++, "i", &priv->column);
|
||||
g_variant_get_child (variant, index++, "i", &priv->row);
|
||||
g_variant_get_child (variant, index++, "u", &priv->oref);
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_serializable_iface_init (EekSerializableIface *iface)
|
||||
{
|
||||
eek_key_parent_serializable_iface =
|
||||
g_type_interface_peek_parent (iface);
|
||||
|
||||
iface->serialize = eek_key_real_serialize;
|
||||
iface->deserialize = eek_key_real_deserialize;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_key_real_set_keycode (EekKey *self, guint keycode)
|
||||
{
|
||||
@ -252,6 +155,13 @@ eek_key_real_is_pressed (EekKey *self)
|
||||
return priv->is_pressed;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
eek_key_real_is_locked (EekKey *self)
|
||||
{
|
||||
EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(self);
|
||||
return priv->is_locked;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_key_real_pressed (EekKey *self)
|
||||
{
|
||||
@ -274,6 +184,39 @@ eek_key_real_released (EekKey *self)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
eek_key_real_locked (EekKey *self)
|
||||
{
|
||||
EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(self);
|
||||
|
||||
priv->is_locked = TRUE;
|
||||
#if DEBUG
|
||||
g_debug ("locked %X", eek_key_get_keycode (self));
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
eek_key_real_unlocked (EekKey *self)
|
||||
{
|
||||
EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(self);
|
||||
|
||||
priv->is_locked = FALSE;
|
||||
#if DEBUG
|
||||
g_debug ("unlocked %X", eek_key_get_keycode (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)
|
||||
{
|
||||
@ -372,6 +315,7 @@ eek_key_class_init (EekKeyClass *klass)
|
||||
klass->set_oref = eek_key_real_set_oref;
|
||||
klass->get_oref = eek_key_real_get_oref;
|
||||
klass->is_pressed = eek_key_real_is_pressed;
|
||||
klass->is_locked = eek_key_real_is_locked;
|
||||
|
||||
gobject_class->set_property = eek_key_set_property;
|
||||
gobject_class->get_property = eek_key_get_property;
|
||||
@ -380,6 +324,9 @@ eek_key_class_init (EekKeyClass *klass)
|
||||
/* 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:
|
||||
@ -446,12 +393,14 @@ eek_key_class_init (EekKeyClass *klass)
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::pressed signal is emitted each time @key is shifted to
|
||||
* the pressed state.
|
||||
* 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_LAST,
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(EekKeyClass, pressed),
|
||||
NULL,
|
||||
NULL,
|
||||
@ -474,6 +423,59 @@ eek_key_class_init (EekKeyClass *klass)
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
/**
|
||||
* EekKey::locked:
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::locked signal is emitted each time @key is shifted to
|
||||
* the locked state. The class handler runs before signal
|
||||
* handlers to allow signal handlers to read the status of @key
|
||||
* with eek_key_is_locked().
|
||||
*/
|
||||
signals[LOCKED] =
|
||||
g_signal_new (I_("locked"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET(EekKeyClass, locked),
|
||||
NULL,
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
/**
|
||||
* EekKey::unlocked:
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::unlocked signal is emitted each time @key is shifted to
|
||||
* the unlocked state.
|
||||
*/
|
||||
signals[UNLOCKED] =
|
||||
g_signal_new (I_("unlocked"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(EekKeyClass, unlocked),
|
||||
NULL,
|
||||
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
|
||||
@ -482,10 +484,7 @@ eek_key_init (EekKey *self)
|
||||
EekKeyPrivate *priv;
|
||||
|
||||
priv = self->priv = EEK_KEY_GET_PRIVATE(self);
|
||||
priv->keycode = 0;
|
||||
priv->symbol_matrix = eek_symbol_matrix_new (0, 0);
|
||||
priv->column = priv->row = 0;
|
||||
priv->oref = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -541,7 +540,7 @@ eek_key_set_symbol_matrix (EekKey *key,
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* Get the symbol matrix of @key.
|
||||
* Returns: #EekSymbolMatrix or %NULL
|
||||
* Returns: (transfer none): #EekSymbolMatrix or %NULL
|
||||
*/
|
||||
EekSymbolMatrix *
|
||||
eek_key_get_symbol_matrix (EekKey *key)
|
||||
@ -553,9 +552,9 @@ eek_key_get_symbol_matrix (EekKey *key)
|
||||
/**
|
||||
* eek_key_get_symbol:
|
||||
* @key: an #EekKey
|
||||
* @returns: (transfer none): the current #EekSymbol or %NULL on failure
|
||||
*
|
||||
* Get the current symbol of @key.
|
||||
* Return value: (transfer none): the current #EekSymbol or %NULL on failure
|
||||
*/
|
||||
EekSymbol *
|
||||
eek_key_get_symbol (EekKey *key)
|
||||
@ -568,9 +567,9 @@ eek_key_get_symbol (EekKey *key)
|
||||
* @key: an #EekKey
|
||||
* @fallback_group: fallback group index
|
||||
* @fallback_level: fallback level index
|
||||
* @returns: (transfer none): the current #EekSymbol or %NULL on failure
|
||||
*
|
||||
* Get the current symbol of @key.
|
||||
* Return value: (transfer none): the current #EekSymbol or %NULL on failure
|
||||
*/
|
||||
EekSymbol *
|
||||
eek_key_get_symbol_with_fallback (EekKey *key,
|
||||
@ -624,9 +623,9 @@ eek_key_get_symbol_with_fallback (EekKey *key,
|
||||
* @level: level index of the symbol matrix
|
||||
* @fallback_group: fallback group index
|
||||
* @fallback_level: fallback level index
|
||||
* @returns: (transfer none): an #EekSymbol at (@group, @level), or %NULL
|
||||
*
|
||||
* Get the symbol at (@group, @level) in the symbol matrix of @key.
|
||||
* Return value: (transfer none): an #EekSymbol at (@group, @level), or %NULL
|
||||
*/
|
||||
EekSymbol *
|
||||
eek_key_get_symbol_at_index (EekKey *key,
|
||||
@ -745,3 +744,16 @@ eek_key_is_pressed (EekKey *key)
|
||||
g_assert (EEK_IS_KEY(key));
|
||||
return EEK_KEY_GET_CLASS(key)->is_pressed (key);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_key_is_locked:
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* Return %TRUE if key is marked as locked.
|
||||
*/
|
||||
gboolean
|
||||
eek_key_is_locked (EekKey *key)
|
||||
{
|
||||
g_assert (EEK_IS_KEY(key));
|
||||
return EEK_KEY_GET_CLASS(key)->is_locked (key);
|
||||
}
|
||||
|
||||
@ -17,12 +17,16 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef EEK_KEY_H
|
||||
#define EEK_KEY_H 1
|
||||
|
||||
#include <glib-object.h>
|
||||
#include "eek-element.h"
|
||||
#include "eek-types.h"
|
||||
#include "eek-symbol-matrix.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -36,6 +40,12 @@ G_BEGIN_DECLS
|
||||
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 >*/
|
||||
@ -58,7 +68,11 @@ struct _EekKey
|
||||
* @get_oref: virtual function for getting outline id of the key
|
||||
* @pressed: class handler for #EekKey::pressed signal
|
||||
* @released: class handler for #EekKey::released signal
|
||||
* @locked: class handler for #EekKey::locked signal
|
||||
* @unlocked: class handler for #EekKey::unlocked signal
|
||||
* @cancelled: class handler for #EekKey::cancelled signal
|
||||
* @is_pressed: virtual function for getting whether the key is pressed
|
||||
* @is_locked: virtual function for getting whether the key is locked
|
||||
*/
|
||||
struct _EekKeyClass
|
||||
{
|
||||
@ -86,13 +100,18 @@ struct _EekKeyClass
|
||||
|
||||
gboolean (* is_pressed) (EekKey *self);
|
||||
|
||||
/* signals */
|
||||
void (* pressed) (EekKey *key);
|
||||
void (* released) (EekKey *key);
|
||||
|
||||
gboolean (* is_locked) (EekKey *self);
|
||||
|
||||
void (* locked) (EekKey *key);
|
||||
void (* unlocked) (EekKey *key);
|
||||
void (* cancelled) (EekKey *key);
|
||||
|
||||
/*< private >*/
|
||||
/* padding */
|
||||
gpointer pdummy[24];
|
||||
gpointer pdummy[20];
|
||||
};
|
||||
|
||||
GType eek_key_get_type (void) G_GNUC_CONST;
|
||||
@ -126,6 +145,7 @@ void eek_key_set_oref (EekKey *key,
|
||||
gulong eek_key_get_oref (EekKey *key);
|
||||
|
||||
gboolean eek_key_is_pressed (EekKey *key);
|
||||
gboolean eek_key_is_locked (EekKey *key);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEK_KEY_H */
|
||||
|
||||
@ -17,13 +17,13 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <pango/pangocairo.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <math.h>
|
||||
#include <pango/pangocairo.h>
|
||||
|
||||
#include "eek-types.h"
|
||||
|
||||
static gdouble
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
#include "eek-section.h"
|
||||
#include "eek-key.h"
|
||||
#include "eek-symbol.h"
|
||||
#include "eek-serializable.h"
|
||||
#include "eek-enumtypes.h"
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
@ -47,140 +47,33 @@ enum {
|
||||
enum {
|
||||
KEY_PRESSED,
|
||||
KEY_RELEASED,
|
||||
KEY_LOCKED,
|
||||
KEY_UNLOCKED,
|
||||
KEY_CANCELLED,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0, };
|
||||
|
||||
static void eek_serializable_iface_init (EekSerializableIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (EekKeyboard, eek_keyboard, EEK_TYPE_CONTAINER,
|
||||
G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
|
||||
eek_serializable_iface_init));
|
||||
G_DEFINE_TYPE (EekKeyboard, eek_keyboard, EEK_TYPE_CONTAINER);
|
||||
|
||||
#define EEK_KEYBOARD_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_KEYBOARD, EekKeyboardPrivate))
|
||||
|
||||
|
||||
struct _EekKeyboardPrivate
|
||||
{
|
||||
EekLayout *layout;
|
||||
EekModifierBehavior modifier_behavior;
|
||||
EekModifierType modifiers;
|
||||
GList *pressed_keys;
|
||||
GList *locked_keys;
|
||||
GArray *outline_array;
|
||||
|
||||
/* modifiers dynamically assigned at run time */
|
||||
EekModifierType num_lock_mask;
|
||||
EekModifierType alt_gr_mask;
|
||||
};
|
||||
|
||||
static EekSerializableIface *eek_keyboard_parent_serializable_iface;
|
||||
|
||||
static GVariant *_g_variant_new_outline (EekOutline *outline);
|
||||
static EekOutline *_g_variant_get_outline (GVariant *variant);
|
||||
|
||||
static GVariant *
|
||||
_g_variant_new_outline (EekOutline *outline)
|
||||
{
|
||||
GVariantBuilder builder, array;
|
||||
gint i;
|
||||
|
||||
g_variant_builder_init (&builder, G_VARIANT_TYPE ("(div)"));
|
||||
g_variant_builder_add (&builder, "d", outline->corner_radius);
|
||||
g_variant_builder_add (&builder, "i", outline->num_points);
|
||||
g_variant_builder_init (&array, G_VARIANT_TYPE ("a(dd)"));
|
||||
for (i = 0; i < outline->num_points; i++)
|
||||
g_variant_builder_add (&array,
|
||||
"(dd)",
|
||||
outline->points[i].x,
|
||||
outline->points[i].y);
|
||||
g_variant_builder_add (&builder, "v", g_variant_builder_end (&array));
|
||||
return g_variant_builder_end (&builder);
|
||||
}
|
||||
|
||||
static EekOutline *
|
||||
_g_variant_get_outline (GVariant *variant)
|
||||
{
|
||||
EekOutline *outline;
|
||||
GVariant *array;
|
||||
GVariantIter iter;
|
||||
gdouble x, y;
|
||||
gint i;
|
||||
|
||||
outline = g_slice_new0 (EekOutline);
|
||||
|
||||
g_variant_get_child (variant, 0, "d", &outline->corner_radius);
|
||||
g_variant_get_child (variant, 1, "i", &outline->num_points);
|
||||
|
||||
outline->points = g_slice_alloc0 (sizeof (EekPoint) * outline->num_points);
|
||||
|
||||
g_variant_get_child (variant, 2, "v", &array);
|
||||
g_variant_iter_init (&iter, array);
|
||||
for (i = 0; i < outline->num_points; i++) {
|
||||
if (!g_variant_iter_next (&iter, "(dd)", &x, &y)) {
|
||||
eek_outline_free (outline);
|
||||
g_return_val_if_reached (NULL);
|
||||
}
|
||||
outline->points[i].x = x;
|
||||
outline->points[i].y = y;
|
||||
}
|
||||
|
||||
return outline;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_keyboard_real_serialize (EekSerializable *self,
|
||||
GVariantBuilder *builder)
|
||||
{
|
||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(self);
|
||||
GVariantBuilder array;
|
||||
guint i;
|
||||
|
||||
eek_keyboard_parent_serializable_iface->serialize (self, builder);
|
||||
|
||||
g_variant_builder_init (&array, G_VARIANT_TYPE ("av"));
|
||||
for (i = 0; i < priv->outline_array->len; i++) {
|
||||
EekOutline *outline =
|
||||
eek_keyboard_get_outline (EEK_KEYBOARD(self), i + 1);
|
||||
g_variant_builder_add (&array, "v",
|
||||
_g_variant_new_outline (outline));
|
||||
}
|
||||
g_variant_builder_add (builder, "v", g_variant_builder_end (&array));
|
||||
g_variant_builder_add (builder, "u", priv->num_lock_mask);
|
||||
}
|
||||
|
||||
static gsize
|
||||
eek_keyboard_real_deserialize (EekSerializable *self,
|
||||
GVariant *variant,
|
||||
gsize index)
|
||||
{
|
||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(self);
|
||||
GVariant *array, *outline;
|
||||
GVariantIter iter;
|
||||
|
||||
index = eek_keyboard_parent_serializable_iface->deserialize (self,
|
||||
variant,
|
||||
index);
|
||||
|
||||
g_variant_get_child (variant, index++, "v", &array);
|
||||
|
||||
g_variant_iter_init (&iter, array);
|
||||
while (g_variant_iter_next (&iter, "v", &outline)) {
|
||||
EekOutline *_outline = _g_variant_get_outline (outline);
|
||||
g_array_append_val (priv->outline_array, *_outline);
|
||||
}
|
||||
g_variant_get_child (variant, index++, "u", &priv->num_lock_mask);
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_serializable_iface_init (EekSerializableIface *iface)
|
||||
{
|
||||
eek_keyboard_parent_serializable_iface =
|
||||
g_type_interface_peek_parent (iface);
|
||||
|
||||
iface->serialize = eek_keyboard_real_serialize;
|
||||
iface->deserialize = eek_keyboard_real_deserialize;
|
||||
}
|
||||
|
||||
static void
|
||||
on_key_pressed (EekSection *section,
|
||||
EekKey *key,
|
||||
@ -197,6 +90,30 @@ on_key_released (EekSection *section,
|
||||
g_signal_emit_by_name (keyboard, "key-released", key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_key_locked (EekSection *section,
|
||||
EekKey *key,
|
||||
EekKeyboard *keyboard)
|
||||
{
|
||||
g_signal_emit_by_name (keyboard, "key-locked", key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_key_unlocked (EekSection *section,
|
||||
EekKey *key,
|
||||
EekKeyboard *keyboard)
|
||||
{
|
||||
g_signal_emit_by_name (keyboard, "key-unlocked", key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_key_cancelled (EekSection *section,
|
||||
EekKey *key,
|
||||
EekKeyboard *keyboard)
|
||||
{
|
||||
g_signal_emit_by_name (keyboard, "key-cancelled", key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_symbol_index_changed (EekSection *section,
|
||||
gint group,
|
||||
@ -267,7 +184,7 @@ eek_keyboard_set_property (GObject *object,
|
||||
break;
|
||||
case PROP_MODIFIER_BEHAVIOR:
|
||||
eek_keyboard_set_modifier_behavior (EEK_KEYBOARD(object),
|
||||
g_value_get_int (value));
|
||||
g_value_get_enum (value));
|
||||
break;
|
||||
default:
|
||||
g_object_set_property (object,
|
||||
@ -290,8 +207,8 @@ eek_keyboard_get_property (GObject *object,
|
||||
g_value_set_object (value, priv->layout);
|
||||
break;
|
||||
case PROP_MODIFIER_BEHAVIOR:
|
||||
g_value_set_int (value,
|
||||
eek_keyboard_get_modifier_behavior (EEK_KEYBOARD(object)));
|
||||
g_value_set_enum (value,
|
||||
eek_keyboard_get_modifier_behavior (EEK_KEYBOARD(object)));
|
||||
break;
|
||||
default:
|
||||
g_object_get_property (object,
|
||||
@ -307,13 +224,52 @@ set_level_from_modifiers (EekKeyboard *self)
|
||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(self);
|
||||
gint level = 0;
|
||||
|
||||
if (priv->modifiers & EEK_MOD5_MASK)
|
||||
if (priv->modifiers & priv->alt_gr_mask)
|
||||
level |= 2;
|
||||
if (priv->modifiers & EEK_SHIFT_MASK)
|
||||
level |= 1;
|
||||
eek_element_set_level (EEK_ELEMENT(self), level);
|
||||
}
|
||||
|
||||
static void
|
||||
set_modifiers_with_key (EekKeyboard *self,
|
||||
EekKey *key,
|
||||
EekModifierType modifiers)
|
||||
{
|
||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(self);
|
||||
EekModifierType enabled = (priv->modifiers ^ modifiers) & modifiers;
|
||||
EekModifierType disabled = (priv->modifiers ^ modifiers) & priv->modifiers;
|
||||
|
||||
if (enabled != 0) {
|
||||
if (priv->modifier_behavior != EEK_MODIFIER_BEHAVIOR_NONE) {
|
||||
EekModifierKey *modifier_key = g_slice_new (EekModifierKey);
|
||||
modifier_key->modifiers = enabled;
|
||||
modifier_key->key = key;
|
||||
priv->locked_keys =
|
||||
g_list_prepend (priv->locked_keys, modifier_key);
|
||||
g_signal_emit_by_name (modifier_key->key, "locked");
|
||||
}
|
||||
} else {
|
||||
if (priv->modifier_behavior != EEK_MODIFIER_BEHAVIOR_NONE) {
|
||||
GList *head;
|
||||
for (head = priv->locked_keys; head; ) {
|
||||
EekModifierKey *modifier_key = head->data;
|
||||
if (modifier_key->modifiers & disabled) {
|
||||
GList *next = g_list_next (head);
|
||||
priv->locked_keys =
|
||||
g_list_remove_link (priv->locked_keys, head);
|
||||
g_signal_emit_by_name (modifier_key->key, "unlocked");
|
||||
g_list_free1 (head);
|
||||
head = next;
|
||||
} else
|
||||
head = g_list_next (head);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
priv->modifiers = modifiers;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_keyboard_real_key_pressed (EekKeyboard *self,
|
||||
EekKey *key)
|
||||
@ -322,23 +278,17 @@ eek_keyboard_real_key_pressed (EekKeyboard *self,
|
||||
EekSymbol *symbol;
|
||||
EekModifierType modifier;
|
||||
|
||||
priv->pressed_keys = g_list_prepend (priv->pressed_keys, 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:
|
||||
priv->modifiers |= modifier;
|
||||
break;
|
||||
case EEK_MODIFIER_BEHAVIOR_LOCK:
|
||||
priv->modifiers ^= modifier;
|
||||
break;
|
||||
case EEK_MODIFIER_BEHAVIOR_LATCH:
|
||||
priv->modifiers = (priv->modifiers ^ modifier) & modifier;
|
||||
break;
|
||||
if (priv->modifier_behavior == EEK_MODIFIER_BEHAVIOR_NONE) {
|
||||
set_modifiers_with_key (self, key, priv->modifiers | modifier);
|
||||
set_level_from_modifiers (self);
|
||||
}
|
||||
set_level_from_modifiers (self);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -349,18 +299,51 @@ eek_keyboard_real_key_released (EekKeyboard *self,
|
||||
EekSymbol *symbol;
|
||||
EekModifierType modifier;
|
||||
|
||||
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);
|
||||
if (modifier != 0) {
|
||||
if (priv->modifier_behavior == EEK_MODIFIER_BEHAVIOR_NONE)
|
||||
priv->modifiers &= ~modifier;
|
||||
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; ) {
|
||||
EekKey *pressed_key = head->data;
|
||||
if (pressed_key == key) {
|
||||
GList *next = g_list_next (head);
|
||||
priv->pressed_keys =
|
||||
g_list_remove_link (priv->pressed_keys, head);
|
||||
g_list_free1 (head);
|
||||
head = next;
|
||||
} else
|
||||
head = g_list_next (head);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
eek_keyboard_dispose (GObject *object)
|
||||
{
|
||||
@ -380,6 +363,9 @@ eek_keyboard_finalize (GObject *object)
|
||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(object);
|
||||
gint i;
|
||||
|
||||
g_list_free (priv->pressed_keys);
|
||||
g_list_free (priv->locked_keys);
|
||||
|
||||
for (i = 0; i < priv->outline_array->len; i++) {
|
||||
EekOutline *outline = &g_array_index (priv->outline_array,
|
||||
EekOutline,
|
||||
@ -400,6 +386,12 @@ eek_keyboard_real_child_added (EekContainer *self,
|
||||
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);
|
||||
}
|
||||
@ -410,6 +402,9 @@ eek_keyboard_real_child_removed (EekContainer *self,
|
||||
{
|
||||
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
|
||||
@ -428,6 +423,7 @@ eek_keyboard_class_init (EekKeyboardClass *klass)
|
||||
/* 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;
|
||||
@ -456,11 +452,12 @@ eek_keyboard_class_init (EekKeyboardClass *klass)
|
||||
*
|
||||
* The modifier handling mode of #EekKeyboard.
|
||||
*/
|
||||
pspec = g_param_spec_int ("modifier-behavior",
|
||||
"Modifier behavior",
|
||||
"Modifier handling mode of the keyboard",
|
||||
0, G_MAXINT, EEK_MODIFIER_BEHAVIOR_NONE,
|
||||
G_PARAM_READWRITE);
|
||||
pspec = g_param_spec_enum ("modifier-behavior",
|
||||
"Modifier behavior",
|
||||
"Modifier handling mode of the keyboard",
|
||||
EEK_TYPE_MODIFIER_BEHAVIOR,
|
||||
EEK_MODIFIER_BEHAVIOR_NONE,
|
||||
G_PARAM_READWRITE);
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_MODIFIER_BEHAVIOR,
|
||||
pspec);
|
||||
@ -504,6 +501,66 @@ eek_keyboard_class_init (EekKeyboardClass *klass)
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
EEK_TYPE_KEY);
|
||||
|
||||
/**
|
||||
* EekKeyboard::key-locked:
|
||||
* @keyboard: an #EekKeyboard
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::key-locked signal is emitted each time a key in @keyboard
|
||||
* is shifted to the locked state.
|
||||
*/
|
||||
signals[KEY_LOCKED] =
|
||||
g_signal_new (I_("key-locked"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(EekKeyboardClass, key_locked),
|
||||
NULL,
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
EEK_TYPE_KEY);
|
||||
|
||||
/**
|
||||
* EekKeyboard::key-unlocked:
|
||||
* @keyboard: an #EekKeyboard
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::key-unlocked signal is emitted each time a key in @keyboard
|
||||
* is shifted to the unlocked state.
|
||||
*/
|
||||
signals[KEY_UNLOCKED] =
|
||||
g_signal_new (I_("key-unlocked"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(EekKeyboardClass, key_unlocked),
|
||||
NULL,
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
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
|
||||
@ -512,11 +569,8 @@ eek_keyboard_init (EekKeyboard *self)
|
||||
EekKeyboardPrivate *priv;
|
||||
|
||||
priv = self->priv = EEK_KEYBOARD_GET_PRIVATE(self);
|
||||
priv->layout = NULL;
|
||||
priv->modifier_behavior = EEK_MODIFIER_BEHAVIOR_NONE;
|
||||
priv->modifiers = 0;
|
||||
priv->outline_array = g_array_new (FALSE, TRUE, sizeof (EekOutline));
|
||||
priv->num_lock_mask = 0;
|
||||
eek_element_set_symbol_index (EEK_ELEMENT(self), 0, 0);
|
||||
}
|
||||
|
||||
@ -649,9 +703,9 @@ eek_keyboard_create_section (EekKeyboard *keyboard)
|
||||
* eek_keyboard_find_key_by_keycode:
|
||||
* @keyboard: an #EekKeyboard
|
||||
* @keycode: a keycode
|
||||
* @returns: (transfer none): #EekKey whose keycode is @keycode
|
||||
*
|
||||
* Find an #EekKey whose keycode is @keycode.
|
||||
* Return value: (transfer none): #EekKey whose keycode is @keycode
|
||||
*/
|
||||
EekKey *
|
||||
eek_keyboard_find_key_by_keycode (EekKeyboard *keyboard,
|
||||
@ -737,6 +791,19 @@ eek_keyboard_get_modifier_behavior (EekKeyboard *keyboard)
|
||||
return priv->modifier_behavior;
|
||||
}
|
||||
|
||||
void
|
||||
eek_keyboard_set_modifiers (EekKeyboard *keyboard,
|
||||
EekModifierType modifiers)
|
||||
{
|
||||
EekKeyboardPrivate *priv;
|
||||
|
||||
g_assert (EEK_IS_KEYBOARD(keyboard));
|
||||
priv = EEK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||
|
||||
priv->modifiers = modifiers;
|
||||
set_level_from_modifiers (keyboard);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_keyboard_get_modifiers:
|
||||
* @keyboard: an #EekKeyboard
|
||||
@ -775,6 +842,8 @@ eek_keyboard_add_outline (EekKeyboard *keyboard,
|
||||
|
||||
_outline = eek_outline_copy (outline);
|
||||
g_array_append_val (priv->outline_array, *_outline);
|
||||
/* don't use eek_outline_free here, so as to keep _outline->points */
|
||||
g_slice_free (EekOutline, _outline);
|
||||
return priv->outline_array->len;
|
||||
}
|
||||
|
||||
@ -801,6 +870,13 @@ eek_keyboard_get_outline (EekKeyboard *keyboard,
|
||||
return &g_array_index (priv->outline_array, EekOutline, oref - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_keyboard_set_num_lock_mask:
|
||||
* @keyboard: an #EekKeyboard
|
||||
* @num_lock_mask: an #EekModifierType
|
||||
*
|
||||
* Set modifier mask used as Num_Lock.
|
||||
*/
|
||||
void
|
||||
eek_keyboard_set_num_lock_mask (EekKeyboard *keyboard,
|
||||
EekModifierType num_lock_mask)
|
||||
@ -813,6 +889,13 @@ eek_keyboard_set_num_lock_mask (EekKeyboard *keyboard,
|
||||
priv->num_lock_mask = num_lock_mask;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_keyboard_get_num_lock_mask:
|
||||
* @keyboard: an #EekKeyboard
|
||||
*
|
||||
* Get modifier mask used as Num_Lock.
|
||||
* Returns: an #EekModifierType
|
||||
*/
|
||||
EekModifierType
|
||||
eek_keyboard_get_num_lock_mask (EekKeyboard *keyboard)
|
||||
{
|
||||
@ -823,3 +906,78 @@ eek_keyboard_get_num_lock_mask (EekKeyboard *keyboard)
|
||||
|
||||
return priv->num_lock_mask;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_keyboard_set_alt_gr_mask:
|
||||
* @keyboard: an #EekKeyboard
|
||||
* @alt_gr_mask: an #EekModifierType
|
||||
*
|
||||
* Set modifier mask used as Alt_Gr.
|
||||
*/
|
||||
void
|
||||
eek_keyboard_set_alt_gr_mask (EekKeyboard *keyboard,
|
||||
EekModifierType alt_gr_mask)
|
||||
{
|
||||
EekKeyboardPrivate *priv;
|
||||
|
||||
g_assert (EEK_IS_KEYBOARD(keyboard));
|
||||
priv = EEK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||
|
||||
priv->alt_gr_mask = alt_gr_mask;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_keyboard_get_alt_gr_mask:
|
||||
* @keyboard: an #EekKeyboard
|
||||
*
|
||||
* Get modifier mask used as Alt_Gr.
|
||||
* Returns: an #EekModifierType
|
||||
*/
|
||||
EekModifierType
|
||||
eek_keyboard_get_alt_gr_mask (EekKeyboard *keyboard)
|
||||
{
|
||||
EekKeyboardPrivate *priv;
|
||||
|
||||
g_assert (EEK_IS_KEYBOARD(keyboard));
|
||||
priv = EEK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||
|
||||
return priv->alt_gr_mask;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_keyboard_get_pressed_keys:
|
||||
* @keyboard: an #EekKeyboard
|
||||
*
|
||||
* Get pressed keys.
|
||||
* Returns: (transfer container) (element-type EekKey): A list of
|
||||
* pressed keys.
|
||||
*/
|
||||
GList *
|
||||
eek_keyboard_get_pressed_keys (EekKeyboard *keyboard)
|
||||
{
|
||||
EekKeyboardPrivate *priv;
|
||||
|
||||
g_assert (EEK_IS_KEYBOARD(keyboard));
|
||||
priv = EEK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||
|
||||
return priv->pressed_keys;
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_keyboard_get_locked_keys:
|
||||
* @keyboard: an #EekKeyboard
|
||||
*
|
||||
* Get locked keys.
|
||||
* Returns: (transfer container) (element-type EekModifierKey): A list
|
||||
* of locked keys.
|
||||
*/
|
||||
GList *
|
||||
eek_keyboard_get_locked_keys (EekKeyboard *keyboard)
|
||||
{
|
||||
EekKeyboardPrivate *priv;
|
||||
|
||||
g_assert (EEK_IS_KEYBOARD(keyboard));
|
||||
priv = EEK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||
|
||||
return priv->locked_keys;
|
||||
}
|
||||
|
||||
@ -17,6 +17,11 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef EEK_KEYBOARD_H
|
||||
#define EEK_KEYBOARD_H 1
|
||||
|
||||
@ -58,6 +63,9 @@ struct _EekKeyboard
|
||||
* keyboard by keycode
|
||||
* @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
|
||||
* @key_unlocked: class handler for #EekKeyboard::key-unlocked signal
|
||||
* @key_cancelled: class handler for #EekKeyboard::key-cancelled signal
|
||||
*/
|
||||
struct _EekKeyboardClass
|
||||
{
|
||||
@ -69,25 +77,50 @@ struct _EekKeyboardClass
|
||||
gpointer get_symbol_index;
|
||||
|
||||
/*< public >*/
|
||||
EekSection *(* create_section) (EekKeyboard *self);
|
||||
EekSection *(* create_section) (EekKeyboard *self);
|
||||
|
||||
EekKey *(* find_key_by_keycode) (EekKeyboard *self,
|
||||
guint keycode);
|
||||
EekKey *(* find_key_by_keycode) (EekKeyboard *self,
|
||||
guint keycode);
|
||||
|
||||
/* signals */
|
||||
void (* key_pressed) (EekKeyboard *self,
|
||||
EekKey *key);
|
||||
void (* key_released) (EekKeyboard *self,
|
||||
EekKey *key);
|
||||
void (* key_pressed) (EekKeyboard *self,
|
||||
EekKey *key);
|
||||
void (* key_released) (EekKeyboard *self,
|
||||
EekKey *key);
|
||||
|
||||
/*< private >*/
|
||||
/* obsolete members moved to EekElement */
|
||||
gpointer symbol_index_changed;
|
||||
|
||||
/*< public >*/
|
||||
/* signals */
|
||||
void (* key_locked) (EekKeyboard *self,
|
||||
EekKey *key);
|
||||
void (* key_unlocked) (EekKeyboard *self,
|
||||
EekKey *key);
|
||||
void (* key_cancelled) (EekKeyboard *self,
|
||||
EekKey *key);
|
||||
|
||||
/*< private >*/
|
||||
/* padding */
|
||||
gpointer pdummy[24];
|
||||
gpointer pdummy[21];
|
||||
};
|
||||
|
||||
/**
|
||||
* EekModifierKey:
|
||||
* @modifiers: an #EekModifierType which @key triggers
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* Entry which associates modifier mask to a key. This is returned by
|
||||
* eek_keyboard_get_locked_keys().
|
||||
*/
|
||||
struct _EekModifierKey {
|
||||
/*< public >*/
|
||||
EekModifierType modifiers;
|
||||
EekKey *key;
|
||||
};
|
||||
typedef struct _EekModifierKey EekModifierKey;
|
||||
|
||||
GType eek_keyboard_get_type
|
||||
(void) G_GNUC_CONST;
|
||||
|
||||
@ -104,6 +137,7 @@ void eek_keyboard_set_size
|
||||
(EekKeyboard *keyboard,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
#ifndef EEK_DISABLE_DEPRECATED
|
||||
void eek_keyboard_set_symbol_index
|
||||
(EekKeyboard *keyboard,
|
||||
gint group,
|
||||
@ -112,7 +146,6 @@ void eek_keyboard_get_symbol_index
|
||||
(EekKeyboard *keyboard,
|
||||
gint *group,
|
||||
gint *level);
|
||||
|
||||
void eek_keyboard_set_group
|
||||
(EekKeyboard *keyboard,
|
||||
gint group);
|
||||
@ -123,12 +156,16 @@ gint eek_keyboard_get_group
|
||||
(EekKeyboard *keyboard);
|
||||
gint eek_keyboard_get_level
|
||||
(EekKeyboard *keyboard);
|
||||
#endif /* EEK_DISABLE_DEPRECATED */
|
||||
|
||||
void eek_keyboard_set_modifier_behavior
|
||||
(EekKeyboard *keyboard,
|
||||
EekModifierBehavior modifier_behavior);
|
||||
EekModifierBehavior eek_keyboard_get_modifier_behavior
|
||||
(EekKeyboard *keyboard);
|
||||
void eek_keyboard_set_modifiers
|
||||
(EekKeyboard *keyboard,
|
||||
EekModifierType modifiers);
|
||||
EekModifierType eek_keyboard_get_modifiers
|
||||
(EekKeyboard *keyboard);
|
||||
|
||||
@ -153,5 +190,16 @@ void eek_keyboard_set_num_lock_mask
|
||||
EekModifierType eek_keyboard_get_num_lock_mask
|
||||
(EekKeyboard *keyboard);
|
||||
|
||||
void eek_keyboard_set_alt_gr_mask
|
||||
(EekKeyboard *keyboard,
|
||||
EekModifierType alt_gr_mask);
|
||||
EekModifierType eek_keyboard_get_alt_gr_mask
|
||||
(EekKeyboard *keyboard);
|
||||
|
||||
GList *eek_keyboard_get_pressed_keys
|
||||
(EekKeyboard *keyboard);
|
||||
GList *eek_keyboard_get_locked_keys
|
||||
(EekKeyboard *keyboard);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEK_KEYBOARD_H */
|
||||
|
||||
@ -23,13 +23,13 @@
|
||||
* @short_description: an #EekSymbol represents an X keysym
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "eek-keysym.h"
|
||||
#include "eek-serializable.h"
|
||||
|
||||
@ -208,10 +208,7 @@ eek_keysym_class_init (EekKeysymClass *klass)
|
||||
static void
|
||||
eek_keysym_init (EekKeysym *self)
|
||||
{
|
||||
EekKeysymPrivate *priv;
|
||||
|
||||
priv = self->priv = EEK_KEYSYM_GET_PRIVATE(self);
|
||||
priv->xkeysym = EEK_INVALID_KEYSYM;
|
||||
self->priv = EEK_KEYSYM_GET_PRIVATE(self);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -223,7 +220,8 @@ eek_keysym_init (EekKeysym *self)
|
||||
* modifier @modifier_mask.
|
||||
*/
|
||||
EekKeysym *
|
||||
eek_keysym_new_with_modifier (guint xkeysym, EekModifierType modifier_mask)
|
||||
eek_keysym_new_with_modifier (guint xkeysym,
|
||||
EekModifierType modifier_mask)
|
||||
{
|
||||
EekKeysym *keysym;
|
||||
EekKeysymPrivate *priv;
|
||||
|
||||
@ -17,6 +17,11 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef EEK_KEYSYM_H
|
||||
#define EEK_KEYSYM_H 1
|
||||
|
||||
@ -42,6 +47,12 @@ G_BEGIN_DECLS
|
||||
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;
|
||||
@ -60,7 +71,7 @@ guint eek_keysym_get_xkeysym (EekKeysym *keysym);
|
||||
|
||||
EekKeysym *eek_keysym_new_from_name (const gchar *name);
|
||||
EekKeysym *eek_keysym_new_with_modifier (guint xkeysym,
|
||||
EekModifierType modifier);
|
||||
EekModifierType modifier_mask);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
@ -18,6 +18,10 @@
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef EEK_LAYOUT_H
|
||||
#define EEK_LAYOUT_H 1
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -25,6 +25,8 @@
|
||||
#include "eek-keyboard.h"
|
||||
#include "eek-keysym.h"
|
||||
#include "eek-types.h"
|
||||
#include "eek-theme.h"
|
||||
#include "eek-theme-context.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -49,97 +51,112 @@ struct _EekRendererClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
void (* render_key_label) (EekRenderer *self,
|
||||
PangoLayout *layout,
|
||||
EekKey *key);
|
||||
void (* render_key_label) (EekRenderer *self,
|
||||
PangoLayout *layout,
|
||||
EekKey *key);
|
||||
|
||||
void (* render_key_outline) (EekRenderer *self,
|
||||
cairo_t *cr,
|
||||
EekKey *key,
|
||||
gdouble scale,
|
||||
gboolean rotate);
|
||||
void (* render_key_outline) (EekRenderer *self,
|
||||
cairo_t *cr,
|
||||
EekKey *key,
|
||||
gdouble scale,
|
||||
gboolean rotate);
|
||||
|
||||
void (* render_key) (EekRenderer *self,
|
||||
cairo_t *cr,
|
||||
EekKey *key,
|
||||
gdouble scale,
|
||||
gboolean rotate);
|
||||
void (* render_key) (EekRenderer *self,
|
||||
cairo_t *cr,
|
||||
EekKey *key,
|
||||
gdouble scale,
|
||||
gboolean rotate);
|
||||
|
||||
void (* render_keyboard) (EekRenderer *self,
|
||||
cairo_t *cr);
|
||||
void (* render_keyboard) (EekRenderer *self,
|
||||
cairo_t *cr);
|
||||
|
||||
void (* render_key_icon) (EekRenderer *self,
|
||||
cairo_t *cr,
|
||||
EekKey *key,
|
||||
gdouble scale,
|
||||
gboolean rotate);
|
||||
cairo_surface_t *(* get_icon_surface) (EekRenderer *self,
|
||||
const gchar *icon_name,
|
||||
gint size);
|
||||
|
||||
/*< private >*/
|
||||
/* padding */
|
||||
gpointer pdummy[23];
|
||||
};
|
||||
|
||||
GType eek_renderer_get_type (void) G_GNUC_CONST;
|
||||
EekRenderer *eek_renderer_new (EekKeyboard *keyboard,
|
||||
PangoContext *pcontext);
|
||||
void eek_renderer_set_allocation_size (EekRenderer *renderer,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void eek_renderer_get_size (EekRenderer *renderer,
|
||||
gdouble *width,
|
||||
gdouble *height);
|
||||
void eek_renderer_get_key_bounds (EekRenderer *renderer,
|
||||
EekKey *key,
|
||||
EekBounds *bounds,
|
||||
gboolean rotate);
|
||||
GType eek_renderer_get_type (void) G_GNUC_CONST;
|
||||
EekRenderer *eek_renderer_new (EekKeyboard *keyboard,
|
||||
PangoContext *pcontext);
|
||||
void eek_renderer_set_allocation_size
|
||||
(EekRenderer *renderer,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void eek_renderer_get_size (EekRenderer *renderer,
|
||||
gdouble *width,
|
||||
gdouble *height);
|
||||
void eek_renderer_get_key_bounds (EekRenderer *renderer,
|
||||
EekKey *key,
|
||||
EekBounds *bounds,
|
||||
gboolean rotate);
|
||||
|
||||
gdouble eek_renderer_get_scale (EekRenderer *renderer);
|
||||
gdouble eek_renderer_get_scale (EekRenderer *renderer);
|
||||
|
||||
PangoLayout *eek_renderer_create_pango_layout (EekRenderer *renderer);
|
||||
void eek_renderer_render_key_label (EekRenderer *renderer,
|
||||
PangoLayout *layout,
|
||||
EekKey *key);
|
||||
PangoLayout *eek_renderer_create_pango_layout
|
||||
(EekRenderer *renderer);
|
||||
void eek_renderer_render_key_label (EekRenderer *renderer,
|
||||
PangoLayout *layout,
|
||||
EekKey *key);
|
||||
|
||||
void eek_renderer_render_key_outline (EekRenderer *renderer,
|
||||
cairo_t *cr,
|
||||
EekKey *key,
|
||||
gdouble scale,
|
||||
gboolean rotate);
|
||||
void eek_renderer_render_key_outline
|
||||
(EekRenderer *renderer,
|
||||
cairo_t *cr,
|
||||
EekKey *key,
|
||||
gdouble scale,
|
||||
gboolean rotate);
|
||||
|
||||
void eek_renderer_render_key (EekRenderer *renderer,
|
||||
cairo_t *cr,
|
||||
EekKey *key,
|
||||
gdouble scale,
|
||||
gboolean rotate);
|
||||
void eek_renderer_render_key (EekRenderer *renderer,
|
||||
cairo_t *cr,
|
||||
EekKey *key,
|
||||
gdouble scale,
|
||||
gboolean rotate);
|
||||
|
||||
void eek_renderer_render_key_icon (EekRenderer *renderer,
|
||||
cairo_t *cr,
|
||||
EekKey *key,
|
||||
gdouble scale,
|
||||
gboolean rotate);
|
||||
cairo_surface_t *eek_renderer_get_icon_surface (EekRenderer *renderer,
|
||||
const gchar *icon_name,
|
||||
gint size);
|
||||
|
||||
void eek_renderer_render_keyboard (EekRenderer *renderer,
|
||||
cairo_t *cr);
|
||||
void eek_renderer_render_keyboard (EekRenderer *renderer,
|
||||
cairo_t *cr);
|
||||
|
||||
void eek_renderer_set_foreground (EekRenderer *renderer,
|
||||
EekColor *foreground);
|
||||
void eek_renderer_set_background (EekRenderer *renderer,
|
||||
EekColor *background);
|
||||
void eek_renderer_get_foreground (EekRenderer *renderer,
|
||||
EekColor *foreground);
|
||||
void eek_renderer_get_background (EekRenderer *renderer,
|
||||
EekColor *background);
|
||||
void eek_renderer_set_border_width (EekRenderer *renderer,
|
||||
gdouble border_width);
|
||||
EekKey *eek_renderer_find_key_by_position (EekRenderer *renderer,
|
||||
gdouble x,
|
||||
gdouble y);
|
||||
void eek_renderer_apply_transformation_for_key
|
||||
(EekRenderer *renderer,
|
||||
cairo_t *cr,
|
||||
EekKey *key,
|
||||
gdouble scale,
|
||||
gboolean rotate);
|
||||
void eek_renderer_set_default_foreground_color
|
||||
(EekRenderer *renderer,
|
||||
const EekColor *color);
|
||||
void eek_renderer_set_default_background_color
|
||||
(EekRenderer *renderer,
|
||||
const EekColor *color);
|
||||
void eek_renderer_get_foreground_color
|
||||
(EekRenderer *renderer,
|
||||
EekElement *element,
|
||||
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
|
||||
(EekRenderer *renderer,
|
||||
gdouble x,
|
||||
gdouble y);
|
||||
void eek_renderer_apply_transformation_for_key
|
||||
(EekRenderer *renderer,
|
||||
cairo_t *cr,
|
||||
EekKey *key,
|
||||
gdouble scale,
|
||||
gboolean rotate);
|
||||
|
||||
void eek_renderer_set_theme (EekRenderer *renderer,
|
||||
EekTheme *theme);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEK_RENDERER_H */
|
||||
|
||||
@ -27,16 +27,16 @@
|
||||
* of one or more keys of the #EekKeyClass class.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "eek-keyboard.h"
|
||||
#include "eek-section.h"
|
||||
#include "eek-key.h"
|
||||
#include "eek-symbol.h"
|
||||
#include "eek-serializable.h"
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
@ -47,16 +47,15 @@ enum {
|
||||
enum {
|
||||
KEY_PRESSED,
|
||||
KEY_RELEASED,
|
||||
KEY_LOCKED,
|
||||
KEY_UNLOCKED,
|
||||
KEY_CANCELLED,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0, };
|
||||
|
||||
static void eek_serializable_iface_init (EekSerializableIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (EekSection, eek_section, EEK_TYPE_CONTAINER,
|
||||
G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
|
||||
eek_serializable_iface_init));
|
||||
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))
|
||||
@ -76,80 +75,6 @@ struct _EekSectionPrivate
|
||||
EekModifierType modifiers;
|
||||
};
|
||||
|
||||
static EekSerializableIface *eek_section_parent_serializable_iface;
|
||||
|
||||
static GVariant *
|
||||
_g_variant_new_row (EekRow *row)
|
||||
{
|
||||
GVariantBuilder builder;
|
||||
|
||||
g_variant_builder_init (&builder, G_VARIANT_TYPE ("(iu)"));
|
||||
g_variant_builder_add (&builder, "i", row->num_columns);
|
||||
g_variant_builder_add (&builder, "u", row->orientation);
|
||||
|
||||
return g_variant_builder_end (&builder);
|
||||
}
|
||||
|
||||
static EekRow *
|
||||
_g_variant_get_row (GVariant *variant)
|
||||
{
|
||||
EekRow *row = g_slice_new (EekRow);
|
||||
g_variant_get_child (variant, 0, "i", &row->num_columns);
|
||||
g_variant_get_child (variant, 1, "u", &row->orientation);
|
||||
return row;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_section_real_serialize (EekSerializable *self,
|
||||
GVariantBuilder *builder)
|
||||
{
|
||||
EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
|
||||
GSList *head;
|
||||
GVariantBuilder array;
|
||||
|
||||
eek_section_parent_serializable_iface->serialize (self, builder);
|
||||
|
||||
g_variant_builder_add (builder, "i", priv->angle);
|
||||
|
||||
g_variant_builder_init (&array, G_VARIANT_TYPE("av"));
|
||||
for (head = priv->rows; head; head = g_slist_next (head))
|
||||
g_variant_builder_add (&array, "v", _g_variant_new_row (head->data));
|
||||
g_variant_builder_add (builder, "v", g_variant_builder_end (&array));
|
||||
}
|
||||
|
||||
static gsize
|
||||
eek_section_real_deserialize (EekSerializable *self,
|
||||
GVariant *variant,
|
||||
gsize index)
|
||||
{
|
||||
EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
|
||||
GVariant *array, *child;
|
||||
GVariantIter iter;
|
||||
|
||||
index = eek_section_parent_serializable_iface->deserialize (self,
|
||||
variant,
|
||||
index);
|
||||
|
||||
g_variant_get_child (variant, index++, "i", &priv->angle);
|
||||
g_variant_get_child (variant, index++, "v", &array);
|
||||
g_variant_iter_init (&iter, array);
|
||||
while (g_variant_iter_next (&iter, "v", &child))
|
||||
priv->rows = g_slist_prepend (priv->rows, _g_variant_get_row (child));
|
||||
priv->rows = g_slist_reverse (priv->rows);
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_serializable_iface_init (EekSerializableIface *iface)
|
||||
{
|
||||
eek_section_parent_serializable_iface =
|
||||
g_type_interface_peek_parent (iface);
|
||||
|
||||
iface->serialize = eek_section_real_serialize;
|
||||
iface->deserialize = eek_section_real_deserialize;
|
||||
}
|
||||
|
||||
static void
|
||||
eek_section_real_set_angle (EekSection *self,
|
||||
gint angle)
|
||||
@ -222,6 +147,27 @@ on_released (EekKey *key,
|
||||
g_signal_emit_by_name (section, "key-released", key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_locked (EekKey *key,
|
||||
EekSection *section)
|
||||
{
|
||||
g_signal_emit_by_name (section, "key-locked", key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_unlocked (EekKey *key,
|
||||
EekSection *section)
|
||||
{
|
||||
g_signal_emit_by_name (section, "key-unlocked", key);
|
||||
}
|
||||
|
||||
static void
|
||||
on_cancelled (EekKey *key,
|
||||
EekSection *section)
|
||||
{
|
||||
g_signal_emit_by_name (section, "key-cancelled", key);
|
||||
}
|
||||
|
||||
static EekKey *
|
||||
eek_section_real_create_key (EekSection *self,
|
||||
gint column,
|
||||
@ -265,6 +211,21 @@ eek_section_real_find_key_by_keycode (EekSection *self,
|
||||
(gpointer)(long)keycode);
|
||||
}
|
||||
|
||||
static void
|
||||
set_level_from_modifiers (EekSection *self)
|
||||
{
|
||||
EekSectionPrivate *priv = EEK_SECTION_GET_PRIVATE(self);
|
||||
EekKeyboard *keyboard;
|
||||
EekModifierType num_lock_mask;
|
||||
gint level = -1;
|
||||
|
||||
keyboard = EEK_KEYBOARD(eek_element_get_parent (EEK_ELEMENT(self)));
|
||||
num_lock_mask = eek_keyboard_get_num_lock_mask (keyboard);
|
||||
if (priv->modifiers & num_lock_mask)
|
||||
level = 1;
|
||||
eek_element_set_level (EEK_ELEMENT(self), level);
|
||||
}
|
||||
|
||||
static void
|
||||
eek_section_real_key_pressed (EekSection *self, EekKey *key)
|
||||
{
|
||||
@ -273,8 +234,6 @@ eek_section_real_key_pressed (EekSection *self, EekKey *key)
|
||||
EekKeyboard *keyboard;
|
||||
EekModifierBehavior behavior;
|
||||
EekModifierType modifier;
|
||||
EekModifierType num_lock_mask;
|
||||
gint level = -1;
|
||||
|
||||
symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
||||
if (!symbol)
|
||||
@ -283,22 +242,10 @@ eek_section_real_key_pressed (EekSection *self, EekKey *key)
|
||||
keyboard = EEK_KEYBOARD(eek_element_get_parent (EEK_ELEMENT(self)));
|
||||
behavior = eek_keyboard_get_modifier_behavior (keyboard);
|
||||
modifier = eek_symbol_get_modifier_mask (symbol);
|
||||
switch (behavior) {
|
||||
case EEK_MODIFIER_BEHAVIOR_NONE:
|
||||
if (behavior == EEK_MODIFIER_BEHAVIOR_NONE) {
|
||||
priv->modifiers |= modifier;
|
||||
break;
|
||||
case EEK_MODIFIER_BEHAVIOR_LOCK:
|
||||
priv->modifiers ^= modifier;
|
||||
break;
|
||||
case EEK_MODIFIER_BEHAVIOR_LATCH:
|
||||
priv->modifiers = (priv->modifiers ^ modifier) & modifier;
|
||||
break;
|
||||
set_level_from_modifiers (self);
|
||||
}
|
||||
|
||||
num_lock_mask = eek_keyboard_get_num_lock_mask (keyboard);
|
||||
if (priv->modifiers & num_lock_mask)
|
||||
level = 1;
|
||||
eek_element_set_level (EEK_ELEMENT(self), level);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -309,8 +256,6 @@ eek_section_real_key_released (EekSection *self, EekKey *key)
|
||||
EekKeyboard *keyboard;
|
||||
EekModifierBehavior behavior;
|
||||
EekModifierType modifier;
|
||||
EekModifierType num_lock_mask;
|
||||
gint level = -1;
|
||||
|
||||
symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
||||
if (!symbol)
|
||||
@ -319,15 +264,18 @@ eek_section_real_key_released (EekSection *self, EekKey *key)
|
||||
keyboard = EEK_KEYBOARD(eek_element_get_parent (EEK_ELEMENT(self)));
|
||||
behavior = eek_keyboard_get_modifier_behavior (keyboard);
|
||||
modifier = eek_symbol_get_modifier_mask (symbol);
|
||||
if (modifier != 0) {
|
||||
if (behavior == EEK_MODIFIER_BEHAVIOR_NONE)
|
||||
priv->modifiers &= ~modifier;
|
||||
switch (behavior) {
|
||||
case EEK_MODIFIER_BEHAVIOR_NONE:
|
||||
priv->modifiers &= ~modifier;
|
||||
break;
|
||||
case EEK_MODIFIER_BEHAVIOR_LOCK:
|
||||
priv->modifiers ^= modifier;
|
||||
break;
|
||||
case EEK_MODIFIER_BEHAVIOR_LATCH:
|
||||
priv->modifiers = (priv->modifiers ^ modifier) & modifier;
|
||||
break;
|
||||
}
|
||||
|
||||
num_lock_mask = eek_keyboard_get_num_lock_mask (keyboard);
|
||||
if (priv->modifiers & num_lock_mask)
|
||||
level = 1;
|
||||
eek_element_set_level (EEK_ELEMENT(self), level);
|
||||
set_level_from_modifiers (self);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -386,6 +334,9 @@ eek_section_real_child_added (EekContainer *self,
|
||||
{
|
||||
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
|
||||
@ -394,6 +345,9 @@ eek_section_real_child_removed (EekContainer *self,
|
||||
{
|
||||
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
|
||||
@ -477,17 +431,72 @@ eek_section_class_init (EekSectionClass *klass)
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
EEK_TYPE_KEY);
|
||||
|
||||
/**
|
||||
* EekSection::key-locked:
|
||||
* @section: an #EekSection
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::key-locked signal is emitted each time a key in @section
|
||||
* is shifted to the locked state.
|
||||
*/
|
||||
signals[KEY_LOCKED] =
|
||||
g_signal_new (I_("key-locked"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(EekSectionClass, key_locked),
|
||||
NULL,
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
EEK_TYPE_KEY);
|
||||
|
||||
/**
|
||||
* EekSection::key-unlocked:
|
||||
* @section: an #EekSection
|
||||
* @key: an #EekKey
|
||||
*
|
||||
* The ::key-unlocked signal is emitted each time a key in @section
|
||||
* is shifted to the unlocked state.
|
||||
*/
|
||||
signals[KEY_UNLOCKED] =
|
||||
g_signal_new (I_("key-unlocked"),
|
||||
G_TYPE_FROM_CLASS(gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET(EekSectionClass, key_unlocked),
|
||||
NULL,
|
||||
NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
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)
|
||||
{
|
||||
EekSectionPrivate *priv;
|
||||
|
||||
priv = self->priv = EEK_SECTION_GET_PRIVATE (self);
|
||||
priv->angle = 0;
|
||||
priv->rows = NULL;
|
||||
priv->modifiers = 0;
|
||||
self->priv = EEK_SECTION_GET_PRIVATE (self);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -17,6 +17,11 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef EEK_SECTION_H
|
||||
#define EEK_SECTION_H 1
|
||||
|
||||
@ -36,6 +41,12 @@ G_BEGIN_DECLS
|
||||
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 >*/
|
||||
@ -54,6 +65,11 @@ struct _EekSection
|
||||
* @create_key: virtual function for creating key in the section
|
||||
* @find_key_by_keycode: virtual function for accessing a key in the
|
||||
* section by keycode
|
||||
* @key_pressed: class handler for #EekSection::key-pressed signal
|
||||
* @key_released: class handler for #EekSection::key-released signal
|
||||
* @key_locked: class handler for #EekSection::key-locked signal
|
||||
* @key_unlocked: class handler for #EekSection::key-unlocked signal
|
||||
* @key_cancelled: class handler for #EekSection::key-cancelled signal
|
||||
*/
|
||||
struct _EekSectionClass
|
||||
{
|
||||
@ -86,10 +102,16 @@ struct _EekSectionClass
|
||||
EekKey *key);
|
||||
void (* key_released) (EekSection *self,
|
||||
EekKey *key);
|
||||
void (* key_locked) (EekSection *self,
|
||||
EekKey *key);
|
||||
void (* key_unlocked) (EekSection *self,
|
||||
EekKey *key);
|
||||
void (* key_cancelled) (EekSection *self,
|
||||
EekKey *key);
|
||||
|
||||
/*< private >*/
|
||||
/* padding */
|
||||
gpointer pdummy[22];
|
||||
gpointer pdummy[19];
|
||||
};
|
||||
|
||||
GType eek_section_get_type (void) G_GNUC_CONST;
|
||||
|
||||
@ -20,11 +20,11 @@
|
||||
|
||||
/**
|
||||
* SECTION:eek-serializable
|
||||
* @short_description: Interface implemented by #EekElement to
|
||||
* serialize it to #GVariant
|
||||
* @short_description: Interface which provides object serialization
|
||||
* into #GVariant
|
||||
*
|
||||
* The #EekSerializableIface interface defines serialize/deserialize
|
||||
* method of #EekElement.
|
||||
* method.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
||||
@ -16,6 +16,10 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef EEK_SERIALIZABLE_H
|
||||
#define EEK_SERIALIZABLE_H 1
|
||||
|
||||
|
||||
105
eek/eek-symbol-matrix.c
Normal file
105
eek/eek-symbol-matrix.c
Normal file
@ -0,0 +1,105 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
#include "eek-symbol-matrix.h"
|
||||
|
||||
EekSymbolMatrix *
|
||||
eek_symbol_matrix_new (gint num_groups,
|
||||
gint num_levels)
|
||||
{
|
||||
EekSymbolMatrix *matrix = g_slice_new (EekSymbolMatrix);
|
||||
|
||||
matrix->num_groups = num_groups;
|
||||
matrix->num_levels = num_levels;
|
||||
matrix->data = g_slice_alloc0 (sizeof (EekSymbol *) *
|
||||
num_groups * num_levels);
|
||||
return matrix;
|
||||
}
|
||||
|
||||
EekSymbolMatrix *
|
||||
eek_symbol_matrix_copy (const EekSymbolMatrix *matrix)
|
||||
{
|
||||
EekSymbolMatrix *retval;
|
||||
gint i, 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]);
|
||||
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]);
|
||||
g_slice_free1 (sizeof (EekSymbol *) * num_symbols, matrix->data);
|
||||
g_slice_free (EekSymbolMatrix, matrix);
|
||||
}
|
||||
|
||||
GType
|
||||
eek_symbol_matrix_get_type (void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type =
|
||||
g_boxed_type_register_static ("EekSymbolMatrix",
|
||||
(GBoxedCopyFunc)eek_symbol_matrix_copy,
|
||||
(GBoxedFreeFunc)eek_symbol_matrix_free);
|
||||
return our_type;
|
||||
}
|
||||
|
||||
void
|
||||
eek_symbol_matrix_set_symbol (EekSymbolMatrix *matrix,
|
||||
gint group,
|
||||
gint level,
|
||||
EekSymbol *symbol)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* eek_symbol_matrix_get_symbol:
|
||||
* @matrix: an #EekSymbolMatrix
|
||||
* @group: group index of @matrix
|
||||
* @level: level index of @matrix
|
||||
*
|
||||
* Get an #EekSymbol stored in the cell selected by (@group, @level)
|
||||
* in @matrix.
|
||||
*
|
||||
* Return value: (transfer none): an #EekSymbol.
|
||||
*/
|
||||
EekSymbol *
|
||||
eek_symbol_matrix_get_symbol (EekSymbolMatrix *matrix,
|
||||
gint group,
|
||||
gint level)
|
||||
{
|
||||
g_return_val_if_fail (group >= 0 && group < matrix->num_groups, NULL);
|
||||
g_return_val_if_fail (level >= 0 && level < matrix->num_levels, NULL);
|
||||
return matrix->data[group * matrix->num_levels + level];
|
||||
}
|
||||
62
eek/eek-symbol-matrix.h
Normal file
62
eek/eek-symbol-matrix.h
Normal file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
#ifndef EEK_SYMBOL_MATRIX_H
|
||||
#define EEK_SYMBOL_MATRIX_H 1
|
||||
|
||||
#include "eek-symbol.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* EekSymbolMatrix:
|
||||
* @data: array of symbols
|
||||
* @num_groups: the number of groups (rows)
|
||||
* @num_levels: the number of levels (columns)
|
||||
*
|
||||
* Symbol matrix of a key.
|
||||
*/
|
||||
struct _EekSymbolMatrix
|
||||
{
|
||||
/*< public >*/
|
||||
gint num_groups;
|
||||
gint num_levels;
|
||||
EekSymbol **data;
|
||||
};
|
||||
|
||||
#define EEK_TYPE_SYMBOL_MATRIX (eek_symbol_matrix_get_type ())
|
||||
GType eek_symbol_matrix_get_type (void) G_GNUC_CONST;
|
||||
EekSymbolMatrix *eek_symbol_matrix_new (gint num_groups,
|
||||
gint num_levels);
|
||||
EekSymbolMatrix *eek_symbol_matrix_copy (const EekSymbolMatrix *matrix);
|
||||
void eek_symbol_matrix_free (EekSymbolMatrix *matrix);
|
||||
|
||||
void eek_symbol_matrix_set_symbol
|
||||
(EekSymbolMatrix *matrix,
|
||||
gint group,
|
||||
gint level,
|
||||
EekSymbol *symbol);
|
||||
EekSymbol *eek_symbol_matrix_get_symbol
|
||||
(EekSymbolMatrix *matrix,
|
||||
gint group,
|
||||
gint level);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* EEK_SYMBOL_MATRIX_H */
|
||||
@ -31,6 +31,7 @@
|
||||
|
||||
#include "eek-symbol.h"
|
||||
#include "eek-serializable.h"
|
||||
#include "eek-enumtypes.h"
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
@ -110,11 +111,11 @@ eek_symbol_set_property (GObject *object,
|
||||
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_uint (value));
|
||||
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_uint (value));
|
||||
g_value_get_flags (value));
|
||||
break;
|
||||
case PROP_ICON_NAME:
|
||||
eek_symbol_set_icon_name (EEK_SYMBOL(object),
|
||||
@ -142,11 +143,11 @@ eek_symbol_get_property (GObject *object,
|
||||
g_value_set_string (value, eek_symbol_get_label (EEK_SYMBOL(object)));
|
||||
break;
|
||||
case PROP_CATEGORY:
|
||||
g_value_set_uint (value, eek_symbol_get_category (EEK_SYMBOL(object)));
|
||||
g_value_set_enum (value, eek_symbol_get_category (EEK_SYMBOL(object)));
|
||||
break;
|
||||
case PROP_MODIFIER_MASK:
|
||||
g_value_set_uint (value,
|
||||
eek_symbol_get_modifier_mask (EEK_SYMBOL(object)));
|
||||
g_value_set_flags (value,
|
||||
eek_symbol_get_modifier_mask (EEK_SYMBOL(object)));
|
||||
break;
|
||||
case PROP_ICON_NAME:
|
||||
g_value_set_string (value,
|
||||
@ -197,18 +198,20 @@ eek_symbol_class_init (EekSymbolClass *klass)
|
||||
G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
|
||||
g_object_class_install_property (gobject_class, PROP_LABEL, pspec);
|
||||
|
||||
pspec = g_param_spec_uint ("category",
|
||||
pspec = g_param_spec_enum ("category",
|
||||
"Category",
|
||||
"Category of the symbol",
|
||||
0, G_MAXUINT, 0,
|
||||
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_uint ("modifier-mask",
|
||||
"Modifier mask",
|
||||
"Modifier mask of the symbol",
|
||||
0, G_MAXUINT, 0,
|
||||
G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
|
||||
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",
|
||||
@ -225,11 +228,7 @@ eek_symbol_init (EekSymbol *self)
|
||||
EekSymbolPrivate *priv;
|
||||
|
||||
priv = self->priv = EEK_SYMBOL_GET_PRIVATE(self);
|
||||
priv->name = NULL;
|
||||
priv->label = NULL;
|
||||
priv->icon_name = NULL;
|
||||
priv->category = EEK_SYMBOL_CATEGORY_UNKNOWN;
|
||||
priv->modifier_mask = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -241,7 +240,7 @@ eek_symbol_init (EekSymbol *self)
|
||||
EekSymbol *
|
||||
eek_symbol_new (const gchar *name)
|
||||
{
|
||||
return g_object_new (EEK_TYPE_SYMBOL, "name", name);
|
||||
return g_object_new (EEK_TYPE_SYMBOL, "name", name, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -361,8 +360,9 @@ eek_symbol_get_category (EekSymbol *symbol)
|
||||
/**
|
||||
* eek_symbol_set_modifier_mask:
|
||||
* @symbol: an #EekSymbol
|
||||
* @mask: an #EekModifierType
|
||||
*
|
||||
* Set modifier mask @symbol can trigger.
|
||||
* Set modifier mask that @symbol can trigger.
|
||||
*/
|
||||
void
|
||||
eek_symbol_set_modifier_mask (EekSymbol *symbol,
|
||||
@ -380,7 +380,7 @@ eek_symbol_set_modifier_mask (EekSymbol *symbol,
|
||||
* eek_symbol_get_modifier_mask:
|
||||
* @symbol: an #EekSymbol
|
||||
*
|
||||
* Get modifier mask @symbol can trigger.
|
||||
* Get modifier mask that @symbol can trigger.
|
||||
*/
|
||||
EekModifierType
|
||||
eek_symbol_get_modifier_mask (EekSymbol *symbol)
|
||||
|
||||
@ -17,10 +17,14 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef EEK_SYMBOL_H
|
||||
#define EEK_SYMBOL_H 1
|
||||
|
||||
#include <glib-object.h>
|
||||
#include "eek-types.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
@ -37,6 +41,7 @@ G_BEGIN_DECLS
|
||||
* @EEK_SYMBOL_CATEGORY_USER3: reserved for future use
|
||||
* @EEK_SYMBOL_CATEGORY_USER4: reserved for future use
|
||||
* @EEK_SYMBOL_CATEGORY_UNKNOWN: used for error reporting
|
||||
* @EEK_SYMBOL_CATEGORY_LAST: the last symbol category
|
||||
*
|
||||
* Category of the key symbols.
|
||||
*/
|
||||
@ -50,7 +55,6 @@ typedef enum {
|
||||
EEK_SYMBOL_CATEGORY_USER3,
|
||||
EEK_SYMBOL_CATEGORY_USER4,
|
||||
EEK_SYMBOL_CATEGORY_UNKNOWN,
|
||||
/*< private >*/
|
||||
EEK_SYMBOL_CATEGORY_LAST = EEK_SYMBOL_CATEGORY_UNKNOWN
|
||||
} EekSymbolCategory;
|
||||
|
||||
@ -98,9 +102,9 @@ void eek_symbol_set_category (EekSymbol *symbol,
|
||||
EekSymbolCategory category);
|
||||
EekSymbolCategory eek_symbol_get_category (EekSymbol *symbol);
|
||||
EekModifierType eek_symbol_get_modifier_mask
|
||||
(EekSymbol *keysym);
|
||||
(EekSymbol *symbol);
|
||||
void eek_symbol_set_modifier_mask
|
||||
(EekSymbol *keysym,
|
||||
(EekSymbol *symbol,
|
||||
EekModifierType mask);
|
||||
gboolean eek_symbol_is_modifier (EekSymbol *symbol);
|
||||
void eek_symbol_set_icon_name (EekSymbol *symbol,
|
||||
|
||||
289
eek/eek-theme-context.c
Normal file
289
eek/eek-theme-context.c
Normal file
@ -0,0 +1,289 @@
|
||||
/* -*- 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;
|
||||
}
|
||||
78
eek/eek-theme-context.h
Normal file
78
eek/eek-theme-context.h
Normal file
@ -0,0 +1,78 @@
|
||||
/* -*- 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
Normal file
1869
eek/eek-theme-node.c
Normal file
File diff suppressed because it is too large
Load Diff
141
eek/eek-theme-node.h
Normal file
141
eek/eek-theme-node.h
Normal file
@ -0,0 +1,141 @@
|
||||
/*
|
||||
* 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__ */
|
||||
22
eek/eek-theme-private.h
Normal file
22
eek/eek-theme-private.h
Normal file
@ -0,0 +1,22 @@
|
||||
/* -*- 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
Normal file
1133
eek/eek-theme.c
Normal file
File diff suppressed because it is too large
Load Diff
49
eek/eek-theme.h
Normal file
49
eek/eek-theme.h
Normal file
@ -0,0 +1,49 @@
|
||||
/* -*- 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__ */
|
||||
129
eek/eek-types.c
129
eek/eek-types.c
@ -20,7 +20,8 @@
|
||||
|
||||
/**
|
||||
* SECTION:eek-types
|
||||
* @short_description: Miscellaneous types
|
||||
* @title: Miscellaneous Types
|
||||
* @short_description: Miscellaneous types used in Libeek
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -32,84 +33,21 @@
|
||||
|
||||
#include "eek-types.h"
|
||||
|
||||
/* EekSymbolMatrix */
|
||||
EekSymbolMatrix *
|
||||
eek_symbol_matrix_new (gint num_groups, gint num_levels)
|
||||
{
|
||||
EekSymbolMatrix *matrix = g_slice_new (EekSymbolMatrix);
|
||||
|
||||
matrix->num_groups = num_groups;
|
||||
matrix->num_levels = num_levels;
|
||||
matrix->data = g_slice_alloc0 (sizeof (EekSymbol *) *
|
||||
num_groups * num_levels);
|
||||
return matrix;
|
||||
}
|
||||
|
||||
EekSymbolMatrix *
|
||||
eek_symbol_matrix_copy (const EekSymbolMatrix *matrix)
|
||||
{
|
||||
EekSymbolMatrix *retval;
|
||||
gint i, 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]);
|
||||
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]);
|
||||
g_slice_free1 (sizeof (EekSymbol *) * num_symbols, matrix->data);
|
||||
g_slice_free (EekSymbolMatrix, matrix);
|
||||
}
|
||||
|
||||
GType
|
||||
eek_symbol_matrix_get_type (void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type =
|
||||
g_boxed_type_register_static ("EekSymbolMatrix",
|
||||
(GBoxedCopyFunc)eek_symbol_matrix_copy,
|
||||
(GBoxedFreeFunc)eek_symbol_matrix_free);
|
||||
return our_type;
|
||||
}
|
||||
|
||||
/* EekPoint */
|
||||
static EekPoint *
|
||||
G_DEFINE_BOXED_TYPE(EekPoint, eek_point, eek_point_copy, eek_point_free);
|
||||
|
||||
EekPoint *
|
||||
eek_point_copy (const EekPoint *point)
|
||||
{
|
||||
return g_slice_dup (EekPoint, point);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
eek_point_free (EekPoint *point)
|
||||
{
|
||||
g_slice_free (EekPoint, point);
|
||||
}
|
||||
|
||||
GType
|
||||
eek_point_get_type (void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type =
|
||||
g_boxed_type_register_static ("EekPoint",
|
||||
(GBoxedCopyFunc)eek_point_copy,
|
||||
(GBoxedFreeFunc)eek_point_free);
|
||||
return our_type;
|
||||
}
|
||||
|
||||
void
|
||||
eek_point_rotate (EekPoint *point, gint angle)
|
||||
{
|
||||
@ -123,36 +61,29 @@ eek_point_rotate (EekPoint *point, gint angle)
|
||||
}
|
||||
|
||||
/* EekBounds */
|
||||
static EekBounds *
|
||||
G_DEFINE_BOXED_TYPE(EekBounds, eek_bounds, eek_bounds_copy, eek_bounds_free);
|
||||
|
||||
EekBounds *
|
||||
eek_bounds_copy (const EekBounds *bounds)
|
||||
{
|
||||
return g_slice_dup (EekBounds, bounds);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
eek_bounds_free (EekBounds *bounds)
|
||||
{
|
||||
g_slice_free (EekBounds, bounds);
|
||||
}
|
||||
|
||||
GType
|
||||
eek_bounds_get_type (void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type =
|
||||
g_boxed_type_register_static ("EekBounds",
|
||||
(GBoxedCopyFunc)eek_bounds_copy,
|
||||
(GBoxedFreeFunc)eek_bounds_free);
|
||||
return our_type;
|
||||
}
|
||||
|
||||
/* EekOutline */
|
||||
G_DEFINE_BOXED_TYPE(EekOutline, eek_outline,
|
||||
eek_outline_copy, eek_outline_free);
|
||||
|
||||
EekOutline *
|
||||
eek_outline_copy (const EekOutline *outline)
|
||||
{
|
||||
EekOutline *_outline = g_slice_dup (EekOutline, outline);
|
||||
_outline->corner_radius = outline->corner_radius;
|
||||
_outline->num_points = outline->num_points;
|
||||
_outline->points = g_slice_alloc0 (sizeof (EekPoint) * outline->num_points);
|
||||
memcpy (_outline->points, outline->points, sizeof (EekPoint) * outline->num_points);
|
||||
@ -166,45 +97,21 @@ eek_outline_free (EekOutline *outline)
|
||||
g_slice_free (EekOutline, outline);
|
||||
}
|
||||
|
||||
GType
|
||||
eek_outline_get_type (void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type =
|
||||
g_boxed_type_register_static ("EekOutline",
|
||||
(GBoxedCopyFunc)eek_outline_copy,
|
||||
(GBoxedFreeFunc)eek_outline_free);
|
||||
return our_type;
|
||||
}
|
||||
|
||||
/* EekColor */
|
||||
static EekColor *
|
||||
G_DEFINE_BOXED_TYPE(EekColor, eek_color, eek_color_copy, eek_color_free);
|
||||
|
||||
EekColor *
|
||||
eek_color_copy (const EekColor *color)
|
||||
{
|
||||
return g_slice_dup (EekColor, color);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
eek_color_free (EekColor *color)
|
||||
{
|
||||
g_slice_free (EekColor, color);
|
||||
}
|
||||
|
||||
GType
|
||||
eek_color_get_type (void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type =
|
||||
g_boxed_type_register_static ("EekColor",
|
||||
(GBoxedCopyFunc)eek_color_copy,
|
||||
(GBoxedFreeFunc)eek_color_free);
|
||||
return our_type;
|
||||
}
|
||||
|
||||
EekColor *
|
||||
eek_color_new (gdouble red,
|
||||
gdouble green,
|
||||
|
||||
@ -17,6 +17,11 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef EEK_TYPES_H
|
||||
#define EEK_TYPES_H 1
|
||||
|
||||
@ -26,7 +31,6 @@ G_BEGIN_DECLS
|
||||
|
||||
#define I_(string) g_intern_static_string (string)
|
||||
|
||||
#define EEK_TYPE_SYMBOL_MATRIX (eek_symbol_matrix_get_type ())
|
||||
#define EEK_TYPE_POINT (eek_point_get_type ())
|
||||
#define EEK_TYPE_BOUNDS (eek_bounds_get_type ())
|
||||
#define EEK_TYPE_OUTLINE (eek_outline_get_type ())
|
||||
@ -136,35 +140,15 @@ typedef struct _EekSection EekSection;
|
||||
typedef struct _EekKeyboard EekKeyboard;
|
||||
typedef struct _EekSymbol EekSymbol;
|
||||
typedef struct _EekKeysym EekKeysym;
|
||||
typedef struct _EekTheme EekTheme;
|
||||
typedef struct _EekThemeContext EekThemeContext;
|
||||
typedef struct _EekThemeNode EekThemeNode;
|
||||
|
||||
typedef struct _EekSymbolMatrix EekSymbolMatrix;
|
||||
typedef struct _EekPoint EekPoint;
|
||||
typedef struct _EekBounds EekBounds;
|
||||
typedef struct _EekOutline EekOutline;
|
||||
typedef struct _EekColor EekColor;
|
||||
|
||||
/**
|
||||
* EekSymbolMatrix:
|
||||
* @data: array of symbols
|
||||
* @num_groups: the number of groups (rows)
|
||||
* @num_levels: the number of levels (columns)
|
||||
*
|
||||
* Symbol matrix of a key.
|
||||
*/
|
||||
struct _EekSymbolMatrix
|
||||
{
|
||||
gint num_groups;
|
||||
gint num_levels;
|
||||
EekSymbol **data;
|
||||
};
|
||||
|
||||
GType eek_symbol_matrix_get_type
|
||||
(void) G_GNUC_CONST;
|
||||
EekSymbolMatrix * eek_symbol_matrix_new (gint num_groups,
|
||||
gint num_levels);
|
||||
EekSymbolMatrix *eek_symbol_matrix_copy (const EekSymbolMatrix *matrix);
|
||||
void eek_symbol_matrix_free (EekSymbolMatrix *matrix);
|
||||
|
||||
/**
|
||||
* EekPoint:
|
||||
* @x: X coordinate of the point
|
||||
@ -172,15 +156,19 @@ void eek_symbol_matrix_free (EekSymbolMatrix *matrix);
|
||||
*
|
||||
* 2D vertex
|
||||
*/
|
||||
typedef struct _EekPoint EekPoint;
|
||||
struct _EekPoint
|
||||
{
|
||||
/*< public >*/
|
||||
gdouble x;
|
||||
gdouble y;
|
||||
};
|
||||
|
||||
GType eek_point_get_type (void) G_GNUC_CONST;
|
||||
void eek_point_rotate (EekPoint *point,
|
||||
gint angle);
|
||||
GType eek_point_get_type (void) G_GNUC_CONST;
|
||||
EekPoint *eek_point_copy (const EekPoint *point);
|
||||
void eek_point_free (EekPoint *point);
|
||||
void eek_point_rotate (EekPoint *point,
|
||||
gint angle);
|
||||
|
||||
/**
|
||||
* EekBounds:
|
||||
@ -200,7 +188,9 @@ struct _EekBounds
|
||||
gdouble height;
|
||||
};
|
||||
|
||||
GType eek_bounds_get_type (void) G_GNUC_CONST;
|
||||
GType eek_bounds_get_type (void) G_GNUC_CONST;
|
||||
EekBounds *eek_bounds_copy (const EekBounds *bounds);
|
||||
void eek_bounds_free (EekBounds *bounds);
|
||||
|
||||
G_INLINE_FUNC gdouble
|
||||
eek_bounds_long_side (EekBounds *bounds)
|
||||
@ -218,6 +208,7 @@ eek_bounds_long_side (EekBounds *bounds)
|
||||
*/
|
||||
struct _EekOutline
|
||||
{
|
||||
/*< public >*/
|
||||
gdouble corner_radius;
|
||||
EekPoint *points;
|
||||
gint num_points;
|
||||
@ -238,6 +229,7 @@ void eek_outline_free (EekOutline *outline);
|
||||
*/
|
||||
struct _EekColor
|
||||
{
|
||||
/*< public >*/
|
||||
gdouble red;
|
||||
gdouble green;
|
||||
gdouble blue;
|
||||
@ -246,10 +238,19 @@ struct _EekColor
|
||||
|
||||
GType eek_color_get_type (void) G_GNUC_CONST;
|
||||
|
||||
EekColor *eek_color_new (gdouble red,
|
||||
gdouble green,
|
||||
gdouble blue,
|
||||
gdouble alpha);
|
||||
EekColor *eek_color_new (gdouble red,
|
||||
gdouble green,
|
||||
gdouble blue,
|
||||
gdouble alpha);
|
||||
EekColor *eek_color_copy (const EekColor *color);
|
||||
void eek_color_free (EekColor *color);
|
||||
|
||||
typedef enum {
|
||||
EEK_GRADIENT_NONE,
|
||||
EEK_GRADIENT_VERTICAL,
|
||||
EEK_GRADIENT_HORIZONTAL,
|
||||
EEK_GRADIENT_RADIAL
|
||||
} EekGradientType;
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEK_TYPES_H */
|
||||
|
||||
@ -23,7 +23,7 @@ includedir=@includedir@
|
||||
|
||||
Name: libeek-xkb
|
||||
Description: A Library to Create Keyboard-like UI (XKB Support)
|
||||
URL: http://ueno.github.com/eekboard/
|
||||
URL: http://fedorahosted.org/eekboard/
|
||||
Version: @VERSION@
|
||||
Requires: eek-@EEK_API_VERSION@ gtk+-x11-@GTK_API_VERSION@
|
||||
Libs: -L${libdir} -leek-xkb
|
||||
|
||||
@ -27,16 +27,16 @@
|
||||
* elements using XKB.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <gdk/gdkx.h>
|
||||
#include <X11/XKBlib.h>
|
||||
#include <X11/extensions/XKBgeom.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include "eek-xkb-layout.h"
|
||||
#include "eek-keyboard.h"
|
||||
#include "eek-section.h"
|
||||
@ -127,7 +127,7 @@ create_key (EekXkbLayout *layout,
|
||||
EekSymbolMatrix *matrix = NULL;
|
||||
gchar name[XkbKeyNameLength + 1];
|
||||
KeyCode keycode;
|
||||
gint num_groups, num_levels, num_symbols;
|
||||
gint num_groups, num_levels;
|
||||
gulong oref;
|
||||
|
||||
xkbgeometry = priv->xkb->geom;
|
||||
@ -176,6 +176,7 @@ create_key (EekXkbLayout *layout,
|
||||
}
|
||||
}
|
||||
oref = eek_keyboard_add_outline (keyboard, outline);
|
||||
eek_outline_free (outline);
|
||||
g_hash_table_insert (priv->shape_oref_hash, xkbshape, (gpointer)oref);
|
||||
}
|
||||
|
||||
@ -198,7 +199,6 @@ create_key (EekXkbLayout *layout,
|
||||
|
||||
num_groups = XkbKeyNumGroups (priv->xkb, keycode);
|
||||
num_levels = XkbKeyGroupsWidth (priv->xkb, keycode);
|
||||
num_symbols = num_groups * num_levels;
|
||||
matrix = eek_symbol_matrix_new (num_groups, num_levels);
|
||||
for (i = 0; i < num_groups; i++)
|
||||
for (j = 0; j < num_levels; j++) {
|
||||
@ -324,9 +324,13 @@ eek_xkb_layout_real_create_keyboard (EekLayout *self,
|
||||
bounds.height = initial_height;
|
||||
eek_element_set_bounds (EEK_ELEMENT(keyboard), &bounds);
|
||||
|
||||
/* resolve modifiers dynamically assigned at run time */
|
||||
eek_keyboard_set_num_lock_mask (keyboard,
|
||||
XkbKeysymToModifiers (priv->display,
|
||||
XK_Num_Lock));
|
||||
eek_keyboard_set_alt_gr_mask (keyboard,
|
||||
XkbKeysymToModifiers (priv->display,
|
||||
XK_ISO_Level3_Shift));
|
||||
|
||||
if (priv->shape_oref_hash)
|
||||
g_hash_table_destroy (priv->shape_oref_hash);
|
||||
@ -453,7 +457,6 @@ eek_xkb_layout_init (EekXkbLayout *self)
|
||||
EekXkbLayoutPrivate *priv;
|
||||
|
||||
priv = self->priv = EEK_XKB_LAYOUT_GET_PRIVATE (self);
|
||||
memset (&priv->names, 0, sizeof priv->names);
|
||||
|
||||
priv->display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
g_return_if_fail (priv->display);
|
||||
|
||||
@ -17,6 +17,11 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||
#error "Only <eek/eek-xkb.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef EEK_XKB_LAYOUT_H
|
||||
#define EEK_XKB_LAYOUT_H 1
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ includedir=@includedir@
|
||||
|
||||
Name: libeek-xkl
|
||||
Description: A Library to Create Keyboard-like UI (Libxklavier Support)
|
||||
URL: http://ueno.github.com/eekboard/
|
||||
URL: http://fedorahosted.org/eekboard/
|
||||
Version: @VERSION@
|
||||
Requires: eek-xkb-@EEK_API_VERSION@ libxklavier
|
||||
Libs: -L${libdir} -leek-xkl
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user