Compare commits
105 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 |
11
.gitignore
vendored
11
.gitignore
vendored
@ -4,6 +4,7 @@
|
|||||||
*.o
|
*.o
|
||||||
*.so
|
*.so
|
||||||
*~
|
*~
|
||||||
|
*.pyc
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
.deps
|
.deps
|
||||||
@ -41,13 +42,12 @@ eek/*.typelib
|
|||||||
eekboard/*.pc
|
eekboard/*.pc
|
||||||
eekboard/*.gir
|
eekboard/*.gir
|
||||||
eekboard/*.typelib
|
eekboard/*.typelib
|
||||||
|
eekboard/eekboard-marshalers.[ch]
|
||||||
tests/eek-simple-test
|
tests/eek-simple-test
|
||||||
tests/eek-xkb-test
|
tests/eek-xkb-test
|
||||||
tests/eek-xml-test
|
tests/eek-xml-test
|
||||||
src/eekboard
|
src/eekboard
|
||||||
src/eekboard-server
|
src/eekboard-server
|
||||||
src/eekboard-xml
|
|
||||||
src/eekboard-server.service
|
|
||||||
docs/reference/eek/*.stamp
|
docs/reference/eek/*.stamp
|
||||||
docs/reference/eek/*.txt
|
docs/reference/eek/*.txt
|
||||||
docs/reference/eek/eek.types
|
docs/reference/eek/eek.types
|
||||||
@ -76,6 +76,9 @@ po/stamp-it
|
|||||||
po/.intltool-merge-cache
|
po/.intltool-merge-cache
|
||||||
bindings/vala/*.vapi
|
bindings/vala/*.vapi
|
||||||
py-compile
|
py-compile
|
||||||
|
data/org.fedorahosted.eekboard.gschema.xml
|
||||||
|
data/org.fedorahosted.eekboard.gschema.valid
|
||||||
|
data/eekboard-server.service
|
||||||
data/*.desktop
|
data/*.desktop
|
||||||
examples/eekboard-inscript/eekboard-inscript
|
examples/eekxml/eekxml
|
||||||
examples/simple-client/simple-client
|
|
||||||
|
|||||||
57
README
57
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
|
eekboard is a virtual keyboard software package, including a set of
|
||||||
tools to implement desktop virtual keyboards.
|
tools to implement desktop virtual keyboards.
|
||||||
|
|
||||||
* How to build
|
* Building
|
||||||
|
|
||||||
** Dependencies
|
** Dependencies
|
||||||
|
|
||||||
REQUIRED: GLib2, GTK, PangoCairo, libxklavier, libcroco
|
REQUIRED: GLib2, GTK, PangoCairo, libxklavier, libcroco
|
||||||
OPTIONAL: fakekey, at-spi2-core, Clutter, Clutter-Gtk, Python, Vala, gobject-introspection
|
OPTIONAL: libXtst, at-spi2-core, IBus, Clutter, Clutter-Gtk, Python, Vala, gobject-introspection, libcanberra
|
||||||
|
|
||||||
** Build from git repo
|
** Build from git repo
|
||||||
|
|
||||||
@ -24,55 +24,12 @@ OPTIONAL: fakekey, at-spi2-core, Clutter, Clutter-Gtk, Python, Vala, gobject-int
|
|||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
|
|
||||||
* Using command-line tools
|
* Running
|
||||||
|
|
||||||
eekboard currently includes 3 tools to implement your own virtual
|
|
||||||
keyboard.
|
|
||||||
|
|
||||||
** eekboard-server
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
eekboard 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
|
$ eekboard
|
||||||
|
$ eekboard -f # show/hide automatically based on focus-in/focus-out events
|
||||||
|
|
||||||
By default it renders current system keyboard layout. To read custom
|
Even though eekboard -f watches a11y events by default, it currently
|
||||||
keyboard layout, specify --keyboard option like:
|
works better with IBus. To use IBus, do:
|
||||||
|
|
||||||
$ eekboard --keyboard /usr/share/eekboard/keyboards/us-qwerty.xml
|
$ gsettings set org.fedorahosted.eekboard focus-listener 'ibus'
|
||||||
|
|
||||||
** eekboard-xml
|
|
||||||
|
|
||||||
eekboard-xml is a tool to manipulate XML keyboard description read by
|
|
||||||
eekboard if --keyboard option is specified.
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
* Using library
|
|
||||||
|
|
||||||
eekboard currently includes two libraries. One is to access
|
|
||||||
eekboard-server via D-Bus and another is to manually render on-screen
|
|
||||||
keyboards.
|
|
||||||
|
|
||||||
For the former, see
|
|
||||||
file:docs/reference/eekboard/html/index.html
|
|
||||||
|
|
||||||
For the latter, see
|
|
||||||
See file:docs/reference/eek/html/index.html
|
|
||||||
|
|||||||
@ -17,5 +17,8 @@
|
|||||||
|
|
||||||
pkgpython_PYTHON = \
|
pkgpython_PYTHON = \
|
||||||
__init__.py \
|
__init__.py \
|
||||||
eekboard.py \
|
serializable.py \
|
||||||
|
symbol.py \
|
||||||
|
keysym.py \
|
||||||
|
client.py \
|
||||||
context.py
|
context.py
|
||||||
|
|||||||
@ -15,53 +15,8 @@
|
|||||||
# along with this program. If not, see
|
# along with this program. If not, see
|
||||||
# <http://www.gnu.org/licenses/>.
|
# <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from gi.repository import Eek, EekXkl, Gio
|
from symbol import *
|
||||||
|
from keysym import *
|
||||||
from eekboard import Eekboard
|
from serializable import *
|
||||||
from context import Context
|
from client import *
|
||||||
|
from context import *
|
||||||
Keyboard = Eek.Keyboard
|
|
||||||
Section = Eek.Section
|
|
||||||
Key = Eek.Key
|
|
||||||
Symbol = Eek.Symbol
|
|
||||||
Keysym = Eek.Keysym
|
|
||||||
SymbolMatrix = Eek.SymbolMatrix
|
|
||||||
|
|
||||||
MODIFIER_BEHAVIOR_NONE, \
|
|
||||||
MODIFIER_BEHAVIOR_LOCK, \
|
|
||||||
MODIFIER_BEHAVIOR_LATCH = \
|
|
||||||
(Eek.ModifierBehavior.NONE,
|
|
||||||
Eek.ModifierBehavior.LOCK,
|
|
||||||
Eek.ModifierBehavior.LATCH)
|
|
||||||
|
|
||||||
SymbolCategory = Eek.SymbolCategory
|
|
||||||
|
|
||||||
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)
|
|
||||||
keyboard.set_alt_gr_mask(Eek.ModifierType.MOD5_MASK)
|
|
||||||
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']
|
|
||||||
|
|||||||
@ -15,13 +15,15 @@
|
|||||||
# along with this program. If not, see
|
# along with this program. If not, see
|
||||||
# <http://www.gnu.org/licenses/>.
|
# <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from gi.repository import Gio
|
import dbus
|
||||||
import gi.repository
|
import dbus.mainloop.glib
|
||||||
import gobject
|
import gobject
|
||||||
from context import Context
|
from context import Context
|
||||||
|
|
||||||
class Eekboard(gobject.GObject):
|
dbus.mainloop.glib.DBusGMainLoop(set_as_default = True)
|
||||||
__gtype_name__ = "PYEekboardEekboard"
|
|
||||||
|
class Client(gobject.GObject):
|
||||||
|
__gtype_name__ = "PYEekboardClient"
|
||||||
__gsignals__ = {
|
__gsignals__ = {
|
||||||
'destroyed': (
|
'destroyed': (
|
||||||
gobject.SIGNAL_RUN_LAST,
|
gobject.SIGNAL_RUN_LAST,
|
||||||
@ -30,20 +32,25 @@ class Eekboard(gobject.GObject):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(Eekboard, self).__init__()
|
super(Client, self).__init__()
|
||||||
self.__connection = Gio.bus_get_sync(Gio.BusType.SESSION, None)
|
self.__bus = dbus.SessionBus()
|
||||||
self.__eekboard = gi.repository.Eekboard.Eekboard.new(self.__connection, None);
|
_service = self.__bus.get_object("org.fedorahosted.Eekboard",
|
||||||
self.__eekboard.connect('destroyed', lambda *args: self.emit('destroyed'))
|
"/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):
|
def create_context(self, client_name):
|
||||||
context = self.__eekboard.create_context(client_name, None)
|
object_path = self.__service.CreateContext(client_name)
|
||||||
return Context(context)
|
return Context(self.__bus, object_path)
|
||||||
|
|
||||||
def push_context(self, context):
|
def push_context(self, context):
|
||||||
self.__eekboard.push_context(context.get_giobject(), None)
|
self.__service.PushContext(context.object_path)
|
||||||
|
|
||||||
def pop_context(self):
|
def pop_context(self):
|
||||||
self.__eekboard.pop_context(None)
|
self.__service.PopContext()
|
||||||
|
|
||||||
def destroy_context(self, context):
|
def destroy_context(self, context):
|
||||||
self.__eekboard.destroy_context(context.get_giobject(), None)
|
self.__service.DestroyContext(context.object_path)
|
||||||
@ -15,8 +15,9 @@
|
|||||||
# along with this program. If not, see
|
# along with this program. If not, see
|
||||||
# <http://www.gnu.org/licenses/>.
|
# <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from gi.repository import Eekboard
|
import dbus
|
||||||
import gobject
|
import gobject
|
||||||
|
import serializable
|
||||||
|
|
||||||
class Context(gobject.GObject):
|
class Context(gobject.GObject):
|
||||||
__gtype_name__ = "PYEekboardContext"
|
__gtype_name__ = "PYEekboardContext"
|
||||||
@ -32,11 +33,7 @@ class Context(gobject.GObject):
|
|||||||
'key-pressed': (
|
'key-pressed': (
|
||||||
gobject.SIGNAL_RUN_LAST,
|
gobject.SIGNAL_RUN_LAST,
|
||||||
gobject.TYPE_NONE,
|
gobject.TYPE_NONE,
|
||||||
(gobject.TYPE_UINT,)),
|
(gobject.TYPE_STRING, gobject.TYPE_PYOBJECT, gobject.TYPE_UINT)),
|
||||||
'key-released': (
|
|
||||||
gobject.SIGNAL_RUN_LAST,
|
|
||||||
gobject.TYPE_NONE,
|
|
||||||
(gobject.TYPE_UINT,)),
|
|
||||||
'destroyed': (
|
'destroyed': (
|
||||||
gobject.SIGNAL_RUN_LAST,
|
gobject.SIGNAL_RUN_LAST,
|
||||||
gobject.TYPE_NONE,
|
gobject.TYPE_NONE,
|
||||||
@ -44,19 +41,59 @@ class Context(gobject.GObject):
|
|||||||
}
|
}
|
||||||
|
|
||||||
__gproperties__ = {
|
__gproperties__ = {
|
||||||
'keyboard-visible': (bool, None, None, False, gobject.PARAM_READWRITE),
|
'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, giobject):
|
def __init__(self, bus, object_path):
|
||||||
super(Context, self).__init__()
|
super(Context, self).__init__()
|
||||||
self.__properties = dict()
|
self.__bus = bus
|
||||||
self.__giobject = giobject
|
self.__object_path = object_path
|
||||||
self.__giobject.connect('enabled', lambda *args: self.emit('enabled'))
|
self.__properties = {}
|
||||||
self.__giobject.connect('disabled', lambda *args: self.emit('disabled'))
|
_context = self.__bus.get_object("org.fedorahosted.Eekboard",
|
||||||
self.__giobject.connect('key-pressed', lambda *args: self.emit('key-pressed', args[1]))
|
object_path)
|
||||||
self.__giobject.connect('key-released', lambda *args: self.emit('key-released', args[1]))
|
self.__context = dbus.Interface(_context, dbus_interface="org.fedorahosted.Eekboard.Context")
|
||||||
self.__giobject.connect('destroyed', lambda *args: self.emit('destroyed'))
|
|
||||||
self.__giobject.connect('notify::keyboard-visible', self.__notify_keyboard_visible_cb)
|
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)
|
||||||
|
|
||||||
|
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):
|
def do_set_property(self, pspec, value):
|
||||||
self.__properties[pspec.name] = value
|
self.__properties[pspec.name] = value
|
||||||
@ -64,37 +101,26 @@ class Context(gobject.GObject):
|
|||||||
def do_get_property(self, pspec):
|
def do_get_property(self, pspec):
|
||||||
return self.__properties[pspec.name]
|
return self.__properties[pspec.name]
|
||||||
|
|
||||||
def __notify_keyboard_visible_cb(self, *args):
|
def add_keyboard(self, keyboard_type):
|
||||||
self.set_property('keyboard-visible',
|
return self.__context.AddKeyboard(keyboard_type)
|
||||||
self.__giobject.get_property(args[1].name))
|
|
||||||
self.notify('keyboard-visible')
|
|
||||||
|
|
||||||
def get_giobject(self):
|
|
||||||
return self.__giobject
|
|
||||||
|
|
||||||
def add_keyboard(self, keyboard):
|
|
||||||
return self.__giobject.add_keyboard(keyboard, None)
|
|
||||||
|
|
||||||
def remove_keyboard(self, keyboard_id):
|
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):
|
def set_keyboard(self, keyboard_id):
|
||||||
self.__giobject.set_keyboard(keyboard_id, None)
|
self.__context.SetKeyboard(keyboard_id)
|
||||||
|
|
||||||
def show_keyboard(self):
|
def show_keyboard(self):
|
||||||
self.__giobject.show_keyboard(None)
|
self.__context.ShowKeyboard()
|
||||||
|
|
||||||
def hide_keyboard(self):
|
def hide_keyboard(self):
|
||||||
self.__giobject.hide_keyboard(None)
|
self.__context.HideKeyboard()
|
||||||
|
|
||||||
def set_group(self, group):
|
def set_group(self, group):
|
||||||
self.__giobject.set_group(group, None)
|
self.__context.SetGroup(group)
|
||||||
|
|
||||||
def press_key(self, keycode):
|
def press_keycode(self, keycode):
|
||||||
self.__giobject.press_key(keycode, None)
|
self.__context.PressKeycode(keycode)
|
||||||
|
|
||||||
def release_key(self, keycode):
|
def release_keycode(self, keycode):
|
||||||
self.__giobject.release_key(keycode, None)
|
self.__context.ReleaseKeycode(keycode)
|
||||||
|
|
||||||
def is_enabled(self):
|
|
||||||
return self.__giobject.is_enabled()
|
|
||||||
|
|||||||
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)
|
MAINTAINERCLEANFILES = $(dist_vapi_DATA)
|
||||||
|
|
||||||
eek-$(EEK_API_VERSION).vapi:
|
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-$(EEK_API_VERSION)/eek-$(EEK_API_VERSION).gi
|
||||||
|
|
||||||
eek-clutter-$(EEK_API_VERSION).vapi: eek-$(EEK_API_VERSION).vapi
|
eek-clutter-$(EEK_API_VERSION).vapi: eek-$(EEK_API_VERSION).vapi
|
||||||
vapigen --vapidir=$(builddir) --library eek-clutter-$(EEK_API_VERSION) \
|
$(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \
|
||||||
--pkg eek-$(EEK_API_VERSION) --pkg clutter-1.0 \
|
--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-clutter-$(EEK_API_VERSION)/eek-clutter-$(EEK_API_VERSION).gi
|
||||||
|
|
||||||
eek-gtk-$(EEK_API_VERSION).vapi: eek-$(EEK_API_VERSION).vapi
|
eek-gtk-$(EEK_API_VERSION).vapi: eek-$(EEK_API_VERSION).vapi
|
||||||
vapigen --vapidir=$(builddir) --library eek-gtk-$(EEK_API_VERSION) \
|
$(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \
|
||||||
--pkg eek-$(EEK_API_VERSION) --pkg gtk+-2.0 \
|
--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-gtk-$(EEK_API_VERSION)/eek-gtk-$(EEK_API_VERSION).gi
|
||||||
|
|
||||||
eek-xkb-$(EEK_API_VERSION).vapi: eek-$(EEK_API_VERSION).vapi
|
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 eek-$(EEK_API_VERSION) \
|
||||||
|
--pkg gio-2.0 \
|
||||||
eek-xkb-$(EEK_API_VERSION)/eek-xkb-$(EEK_API_VERSION).gi
|
eek-xkb-$(EEK_API_VERSION)/eek-xkb-$(EEK_API_VERSION).gi
|
||||||
|
|
||||||
eek-xkl-$(EEK_API_VERSION).vapi: eek-xkb-$(EEK_API_VERSION).vapi
|
eek-xkl-$(EEK_API_VERSION).vapi: eek-xkb-$(EEK_API_VERSION).vapi
|
||||||
vapigen --vapidir=$(builddir) --library eek-xkl-$(EEK_API_VERSION) \
|
$(VAPIGEN_V)$(VAPIGEN) --vapidir=$(builddir) \
|
||||||
--pkg eek-$(EEK_API_VERSION) --pkg eek-xkb-$(EEK_API_VERSION) \
|
--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
|
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.90/eek/eek-container.h
|
||||||
include/eek-0.1/eek/eek-element.h
|
include/eek-0.90/eek/eek-element.h
|
||||||
include/eek-0.1/eek/eek-container.h
|
include/eek-0.90/eek/eek-enumtypes.h
|
||||||
include/eek-0.1/eek/eek-keyboard.h
|
include/eek-0.90/eek/eek-keyboard.h
|
||||||
include/eek-0.1/eek/eek-section.h
|
include/eek-0.90/eek/eek-key.h
|
||||||
include/eek-0.1/eek/eek-key.h
|
include/eek-0.90/eek/eek-keysym.h
|
||||||
include/eek-0.1/eek/eek-types.h
|
include/eek-0.90/eek/eek-layout.h
|
||||||
include/eek-0.1/eek/eek-keysym.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
|
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.90/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
|
|
||||||
lib/libeek-clutter.so
|
lib/libeek-clutter.so
|
||||||
|
|
||||||
|
|||||||
@ -1,85 +1,28 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<api version="1.0">
|
<api version="1.0">
|
||||||
<namespace name="EekClutter">
|
<namespace name="EekClutter">
|
||||||
<object name="EekClutterDrawingContext" parent="GInitiallyUnowned" type-name="EekClutterDrawingContext" get-type="eek_clutter_drawing_context_get_type">
|
<object name="EekClutterKeyboard" parent="ClutterGroup" type-name="EekClutterKeyboard" get-type="eek_clutter_keyboard_get_type">
|
||||||
<method name="get_category_font" symbol="eek_clutter_drawing_context_get_category_font">
|
<implements>
|
||||||
<return-type type="PangoFontDescription*"/>
|
<interface name="ClutterScriptable"/>
|
||||||
<parameters>
|
<interface name="ClutterAnimatable"/>
|
||||||
<parameter name="context" type="EekClutterDrawingContext*"/>
|
<interface name="AtkImplementor"/>
|
||||||
<parameter name="category" type="EekKeysymCategory"/>
|
<interface name="ClutterContainer"/>
|
||||||
</parameters>
|
</implements>
|
||||||
</method>
|
<constructor name="new" symbol="eek_clutter_keyboard_new">
|
||||||
<method name="get_outline_texture" symbol="eek_clutter_drawing_context_get_outline_texture">
|
|
||||||
<return-type type="ClutterActor*"/>
|
<return-type type="ClutterActor*"/>
|
||||||
<parameters>
|
<parameters>
|
||||||
<parameter name="context" type="EekClutterDrawingContext*"/>
|
<parameter name="keyboard" type="EekKeyboard*"/>
|
||||||
<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"/>
|
|
||||||
</parameters>
|
</parameters>
|
||||||
</constructor>
|
</constructor>
|
||||||
</object>
|
<method name="set_theme" symbol="eek_clutter_keyboard_set_theme">
|
||||||
<object name="EekClutterKeyboard" parent="EekKeyboard" type-name="EekClutterKeyboard" get-type="eek_clutter_keyboard_get_type">
|
<return-type type="void"/>
|
||||||
<method name="get_actor" symbol="eek_clutter_keyboard_get_actor">
|
|
||||||
<return-type type="ClutterActor*"/>
|
|
||||||
<parameters>
|
<parameters>
|
||||||
<parameter name="keyboard" type="EekClutterKeyboard*"/>
|
<parameter name="keyboard" type="EekClutterKeyboard*"/>
|
||||||
|
<parameter name="theme" type="EekTheme*"/>
|
||||||
</parameters>
|
</parameters>
|
||||||
</method>
|
</method>
|
||||||
<constructor name="new" symbol="eek_clutter_keyboard_new">
|
<property name="keyboard" type="EekKeyboard*" readable="0" writable="1" construct="0" construct-only="1"/>
|
||||||
<return-type type="EekKeyboard*"/>
|
|
||||||
</constructor>
|
|
||||||
</object>
|
</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_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>
|
</namespace>
|
||||||
</api>
|
</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.90/eek/eek-gtk-keyboard.h
|
||||||
include/eek-0.1/eek/eek-gtk.h
|
|
||||||
lib/libeek-gtk.so
|
lib/libeek-gtk.so
|
||||||
|
|||||||
@ -1,18 +1,26 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<api version="1.0">
|
<api version="1.0">
|
||||||
<namespace name="EekGtk">
|
<namespace name="EekGtk">
|
||||||
<object name="EekGtkKeyboard" parent="EekKeyboard" type-name="EekGtkKeyboard" get-type="eek_gtk_keyboard_get_type">
|
<object name="EekGtkKeyboard" parent="GtkDrawingArea" type-name="EekGtkKeyboard" get-type="eek_gtk_keyboard_get_type">
|
||||||
<method name="get_widget" symbol="eek_gtk_keyboard_get_widget">
|
<implements>
|
||||||
|
<interface name="AtkImplementor"/>
|
||||||
|
<interface name="GtkBuildable"/>
|
||||||
|
</implements>
|
||||||
|
<constructor name="new" symbol="eek_gtk_keyboard_new">
|
||||||
<return-type type="GtkWidget*"/>
|
<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>
|
<parameters>
|
||||||
<parameter name="keyboard" type="EekGtkKeyboard*"/>
|
<parameter name="keyboard" type="EekGtkKeyboard*"/>
|
||||||
|
<parameter name="theme" type="EekTheme*"/>
|
||||||
</parameters>
|
</parameters>
|
||||||
</method>
|
</method>
|
||||||
<constructor name="new" symbol="eek_gtk_keyboard_new">
|
<property name="keyboard" type="EekKeyboard*" readable="0" writable="1" construct="0" construct-only="1"/>
|
||||||
<return-type type="EekKeyboard*"/>
|
|
||||||
</constructor>
|
|
||||||
</object>
|
</object>
|
||||||
<constant name="EEK_GTK_H" type="int" value="1"/>
|
|
||||||
<constant name="EEK_GTK_KEYBOARD_H" type="int" value="1"/>
|
<constant name="EEK_GTK_KEYBOARD_H" type="int" value="1"/>
|
||||||
</namespace>
|
</namespace>
|
||||||
</api>
|
</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
|
lib/libeek-xkb.so
|
||||||
|
|||||||
@ -1,10 +1,7 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<api version="1.0">
|
<api version="1.0">
|
||||||
<namespace name="EekXkb">
|
<namespace name="EekXkb">
|
||||||
<object name="EekXkbLayout" parent="GInitiallyUnowned" type-name="EekXkbLayout" get-type="eek_xkb_layout_get_type">
|
<object name="EekXkbLayout" parent="EekLayout" type-name="EekXkbLayout" get-type="eek_xkb_layout_get_type">
|
||||||
<implements>
|
|
||||||
<interface name="EekLayout"/>
|
|
||||||
</implements>
|
|
||||||
<method name="get_geometry" symbol="eek_xkb_layout_get_geometry">
|
<method name="get_geometry" symbol="eek_xkb_layout_get_geometry">
|
||||||
<return-type type="gchar*"/>
|
<return-type type="gchar*"/>
|
||||||
<parameters>
|
<parameters>
|
||||||
@ -40,7 +37,6 @@
|
|||||||
<parameter name="keycodes" type="gchar*"/>
|
<parameter name="keycodes" type="gchar*"/>
|
||||||
</parameters>
|
</parameters>
|
||||||
</method>
|
</method>
|
||||||
<!--
|
|
||||||
<method name="set_names" symbol="eek_xkb_layout_set_names">
|
<method name="set_names" symbol="eek_xkb_layout_set_names">
|
||||||
<return-type type="gboolean"/>
|
<return-type type="gboolean"/>
|
||||||
<parameters>
|
<parameters>
|
||||||
@ -48,7 +44,19 @@
|
|||||||
<parameter name="names" type="XkbComponentNamesRec*"/>
|
<parameter name="names" type="XkbComponentNamesRec*"/>
|
||||||
</parameters>
|
</parameters>
|
||||||
</method>
|
</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">
|
<method name="set_symbols" symbol="eek_xkb_layout_set_symbols">
|
||||||
<return-type type="gboolean"/>
|
<return-type type="gboolean"/>
|
||||||
<parameters>
|
<parameters>
|
||||||
|
|||||||
@ -1 +1,2 @@
|
|||||||
EekXkb cheader_filename="eek/eek-xkb.h"
|
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
|
lib/libeek-xkl.so
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,6 @@
|
|||||||
<api version="1.0">
|
<api version="1.0">
|
||||||
<namespace name="EekXkl">
|
<namespace name="EekXkl">
|
||||||
<object name="EekXklLayout" parent="EekXkbLayout" type-name="EekXklLayout" get-type="eek_xkl_layout_get_type">
|
<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">
|
<method name="disable_option" symbol="eek_xkl_layout_disable_option">
|
||||||
<return-type type="gboolean"/>
|
<return-type type="gboolean"/>
|
||||||
<parameters>
|
<parameters>
|
||||||
@ -53,6 +50,23 @@
|
|||||||
<constructor name="new" symbol="eek_xkl_layout_new">
|
<constructor name="new" symbol="eek_xkl_layout_new">
|
||||||
<return-type type="EekLayout*"/>
|
<return-type type="EekLayout*"/>
|
||||||
</constructor>
|
</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">
|
<method name="set_layouts" symbol="eek_xkl_layout_set_layouts">
|
||||||
<return-type type="gboolean"/>
|
<return-type type="gboolean"/>
|
||||||
<parameters>
|
<parameters>
|
||||||
|
|||||||
@ -1 +1,2 @@
|
|||||||
EekXkl cheader_filename="eek/eek-xkl.h"
|
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
|
||||||
225
configure.ac
225
configure.ac
@ -20,7 +20,7 @@ AC_PREREQ(2.63)
|
|||||||
dnl AC_CONFIG_SRCDIR([configure.ac])
|
dnl AC_CONFIG_SRCDIR([configure.ac])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
AC_INIT([eekboard], [0.90.7], [ueno@unixuser.org])
|
AC_INIT([eekboard], [1.0.2], [ueno@unixuser.org])
|
||||||
|
|
||||||
dnl Init automake
|
dnl Init automake
|
||||||
AM_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_MSG_CHECKING([which gtk+ version to compile against])
|
||||||
AC_ARG_WITH([gtk],
|
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
|
[case "$with_gtk" in
|
||||||
2.0|3.0) ;;
|
2.0|3.0) ;;
|
||||||
*) AC_MSG_ERROR([invalid gtk version specified]) ;;
|
*) AC_MSG_ERROR([invalid gtk version specified]) ;;
|
||||||
esac],
|
esac],
|
||||||
[with_gtk=2.0])
|
[with_gtk=3.0])
|
||||||
AC_MSG_RESULT([$with_gtk])
|
AC_MSG_RESULT([$with_gtk])
|
||||||
|
|
||||||
case "$with_gtk" in
|
case "$with_gtk" in
|
||||||
@ -89,6 +89,8 @@ PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= 2.26.0], ,
|
|||||||
[AC_MSG_ERROR([GLib2 not found])])
|
[AC_MSG_ERROR([GLib2 not found])])
|
||||||
PKG_CHECK_MODULES([GIO2], [gio-2.0], ,
|
PKG_CHECK_MODULES([GIO2], [gio-2.0], ,
|
||||||
[AC_MSG_ERROR([Gio2 not found])])
|
[AC_MSG_ERROR([Gio2 not found])])
|
||||||
|
GLIB_GSETTINGS
|
||||||
|
|
||||||
PKG_CHECK_MODULES([PANGOCAIRO], [pangocairo], ,
|
PKG_CHECK_MODULES([PANGOCAIRO], [pangocairo], ,
|
||||||
[AC_MSG_ERROR([PangoCairo not found])])
|
[AC_MSG_ERROR([PangoCairo not found])])
|
||||||
PKG_CHECK_MODULES([GTK], [
|
PKG_CHECK_MODULES([GTK], [
|
||||||
@ -102,52 +104,102 @@ PKG_CHECK_MODULES([LIBXKLAVIER], [libxklavier x11], ,
|
|||||||
PKG_CHECK_MODULES([LIBCROCO], [libcroco-0.6], ,
|
PKG_CHECK_MODULES([LIBCROCO], [libcroco-0.6], ,
|
||||||
[AC_MSG_ERROR([libcroco not found])])
|
[AC_MSG_ERROR([libcroco not found])])
|
||||||
|
|
||||||
dnl use libfakekey to generate key events
|
dnl use XTest to generate key events
|
||||||
AC_MSG_CHECKING([whether you enable fakekey])
|
AC_MSG_CHECKING([whether you enable XTest])
|
||||||
AC_ARG_ENABLE(fakekey,
|
AC_ARG_ENABLE(xtest,
|
||||||
AS_HELP_STRING([--enable-fakekey=no/yes],
|
AS_HELP_STRING([--enable-xtest=no/yes],
|
||||||
[Enable fakekey default=yes]),,
|
[Enable XTest default=yes]),
|
||||||
enable_fakekey=yes)
|
enable_xtest=$enableval,
|
||||||
|
enable_xtest=yes)
|
||||||
|
|
||||||
if test x$enable_fakekey = xyes; then
|
if test x$enable_xtest = xyes; then
|
||||||
PKG_CHECK_MODULES([FAKEKEY], [libfakekey], ,
|
PKG_CHECK_MODULES([XTEST], [xtst], , enable_xtest=no)
|
||||||
[AC_MSG_ERROR([fakekey not found])])
|
if test x$enable_xtest = xyes; then
|
||||||
AC_DEFINE([HAVE_FAKEKEY], [1], [Define if fakekey is found])
|
AC_DEFINE([HAVE_XTEST], [1], [Define if XTest is found])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(ENABLE_FAKEKEY, [test x$enable_fakekey = xyes])
|
AM_CONDITIONAL(ENABLE_XTEST, [test x$enable_xtest = xyes])
|
||||||
AC_MSG_RESULT($enable_fakekey)
|
AC_MSG_RESULT($enable_xtest)
|
||||||
|
|
||||||
|
dnl use X to mark the fullscreen window as dock
|
||||||
|
AC_MSG_CHECKING([whether you enable X dock])
|
||||||
|
AC_ARG_ENABLE(x-dock,
|
||||||
|
AS_HELP_STRING([--enable-x-dock=no/yes],
|
||||||
|
[Enable X dock default=yes]),
|
||||||
|
enable_x_dock=$enableval,
|
||||||
|
enable_x_dock=yes)
|
||||||
|
|
||||||
|
if test x$enable_x_dock = xyes; then
|
||||||
|
PKG_CHECK_MODULES([XDOCK], [x11], , enable_x_dock=no)
|
||||||
|
if test x$enable_x_dock = xyes; then
|
||||||
|
AC_DEFINE([HAVE_XDOCK], [1], [Define if X dock is found])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(ENABLE_XDOCK, [test x$enable_x_dock = xyes])
|
||||||
|
AC_MSG_RESULT($enable_x_dock)
|
||||||
|
|
||||||
|
focus_listeners=""
|
||||||
|
keystroke_listeners=""
|
||||||
|
|
||||||
|
focus_listeners=""
|
||||||
|
keystroke_listeners=""
|
||||||
|
|
||||||
dnl use AT-SPI 2 to capture focus/keystroke events
|
dnl use AT-SPI 2 to capture focus/keystroke events
|
||||||
AC_MSG_CHECKING([whether you enable AT-SPI 2 event handling])
|
AC_MSG_CHECKING([whether you enable AT-SPI 2 event handling])
|
||||||
AC_ARG_ENABLE(atspi,
|
AC_ARG_ENABLE(atspi,
|
||||||
AS_HELP_STRING([--enable-atspi=no/yes],
|
AS_HELP_STRING([--enable-atspi=no/yes],
|
||||||
[Enable AT-SPI 2 event handling default=no]),,
|
[Enable AT-SPI 2 event handling default=yes]),
|
||||||
enable_atspi=no)
|
enable_atspi=$enableval,
|
||||||
|
enable_atspi=yes)
|
||||||
|
|
||||||
if test x$enable_atspi = xyes; then
|
if test x$enable_atspi = xyes; then
|
||||||
PKG_CHECK_MODULES([ATSPI2], [atspi-2 dbus-glib-1], ,
|
PKG_CHECK_MODULES([ATSPI2], [atspi-2 dbus-glib-1], , enable_atspi=no)
|
||||||
[AC_MSG_ERROR([AT-SPI 2 not found])])
|
if test x$enable_atspi = xyes; then
|
||||||
AC_DEFINE([HAVE_ATSPI], [1], [Define if AT-SPI 2 is found])
|
AC_DEFINE([HAVE_ATSPI], [1], [Define if AT-SPI 2 is found])
|
||||||
|
focus_listeners="atspi $focus_listeners"
|
||||||
|
keystroke_listeners="atspi $keystroke_listeners"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT($enable_atspi)
|
AC_MSG_RESULT($enable_atspi)
|
||||||
AM_CONDITIONAL(ENABLE_ATSPI, [test x$enable_atspi = xyes])
|
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
|
||||||
|
|
||||||
dnl Python language binding
|
dnl Python language binding
|
||||||
AC_MSG_CHECKING([whether you enable Python language support])
|
AC_MSG_CHECKING([whether you enable Python language support])
|
||||||
AC_ARG_ENABLE(python,
|
AC_ARG_ENABLE(python,
|
||||||
AS_HELP_STRING([--enable-python=no/yes],
|
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)
|
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
|
if test x"$enable_python" = x"yes"; then
|
||||||
# check python
|
if test x$enable_python = xyes; then
|
||||||
AM_PATH_PYTHON([2.5])
|
AC_PATH_PROGS(PYTHON_CONFIG, [python$PYTHON_VERSION-config python-config])
|
||||||
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"$PYTHON_CONFIG" != x""; then
|
if test x"$PYTHON_CONFIG" != x""; then
|
||||||
PYTHON_CFLAGS=`$PYTHON_CONFIG --includes`
|
PYTHON_CFLAGS=`$PYTHON_CONFIG --includes`
|
||||||
PYTHON_LIBS=`$PYTHON_CONFIG --libs`
|
PYTHON_LIBS=`$PYTHON_CONFIG --libs`
|
||||||
@ -159,57 +211,102 @@ if test x"$enable_python" = x"yes"; then
|
|||||||
AC_SUBST(PYTHON_CFLAGS)
|
AC_SUBST(PYTHON_CFLAGS)
|
||||||
AC_SUBST(PYTHON_INCLUDES)
|
AC_SUBST(PYTHON_INCLUDES)
|
||||||
AC_SUBST(PYTHON_LIBS)
|
AC_SUBST(PYTHON_LIBS)
|
||||||
else
|
fi
|
||||||
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
|
dnl Vala langauge binding
|
||||||
AC_MSG_CHECKING([whether you enable Vala language support])
|
AC_MSG_CHECKING([whether you enable Vala language support])
|
||||||
AC_ARG_ENABLE(vala,
|
AC_ARG_ENABLE(vala,
|
||||||
AS_HELP_STRING([--enable-vala=no/yes],
|
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)
|
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)
|
AC_MSG_RESULT($enable_vala)
|
||||||
AM_CONDITIONAL(ENABLE_VALA, [test x$enable_vala = xyes])
|
AM_CONDITIONAL(ENABLE_VALA, [test x$enable_vala = xyes])
|
||||||
|
|
||||||
dnl standalone application
|
dnl clutter
|
||||||
AC_MSG_CHECKING([whether you enable eekboard])
|
AC_MSG_CHECKING([whether you enable clutter])
|
||||||
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])
|
|
||||||
AC_ARG_ENABLE(clutter,
|
AC_ARG_ENABLE(clutter,
|
||||||
AS_HELP_STRING([--enable-clutter=no/yes],
|
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)
|
enable_clutter=no)
|
||||||
AC_MSG_RESULT($enable_clutter)
|
|
||||||
|
|
||||||
if test x$enable_clutter = xyes; then
|
if test x$enable_clutter = xyes; then
|
||||||
PKG_CHECK_MODULES([CLUTTER], [clutter-1.0], ,
|
PKG_CHECK_MODULES([CLUTTER], [clutter-1.0], , enable_clutter=no)
|
||||||
[AC_MSG_ERROR([Clutter not found -- install it or add --disable-clutter])])
|
if test x$enable_clutter = xyes; then
|
||||||
AC_DEFINE([HAVE_CLUTTER], [1], [Define if Clutter is found])
|
AC_DEFINE([HAVE_CLUTTER], [1], [Define if clutter is found])
|
||||||
have_clutter_gtk=0
|
fi
|
||||||
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])
|
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(ENABLE_CLUTTER, [test x$enable_clutter = xyes])
|
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])
|
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
|
dnl define GETTEXT_* variables
|
||||||
GETTEXT_PACKAGE=$PACKAGE
|
GETTEXT_PACKAGE=$PACKAGE
|
||||||
AC_SUBST(GETTEXT_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_GNU_GETTEXT
|
||||||
AM_GLIB_DEFINE_LOCALEDIR(EEKBOARD_LOCALEDIR)
|
AM_GLIB_DEFINE_LOCALEDIR(EEKBOARD_LOCALEDIR)
|
||||||
|
|
||||||
GOBJECT_INTROSPECTION_CHECK([0.9.0])
|
|
||||||
|
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AC_CONFIG_FILES([Makefile
|
AC_CONFIG_FILES([Makefile
|
||||||
eek/Makefile
|
eek/Makefile
|
||||||
@ -245,7 +340,7 @@ data/icons/scalable/Makefile
|
|||||||
data/themes/Makefile
|
data/themes/Makefile
|
||||||
data/keyboards/Makefile
|
data/keyboards/Makefile
|
||||||
examples/Makefile
|
examples/Makefile
|
||||||
examples/eekboard-inscript/Makefile
|
examples/eekxml/Makefile
|
||||||
examples/simple-client/Makefile
|
examples/simple-client/Makefile
|
||||||
eek/eek-${EEK_API_VERSION}.pc
|
eek/eek-${EEK_API_VERSION}.pc
|
||||||
eek/eek-clutter-${EEK_API_VERSION}.pc
|
eek/eek-clutter-${EEK_API_VERSION}.pc
|
||||||
@ -265,6 +360,10 @@ Build options:
|
|||||||
Build Clutter UI $enable_clutter
|
Build Clutter UI $enable_clutter
|
||||||
Build Vala binding $enable_vala
|
Build Vala binding $enable_vala
|
||||||
Build Python binding $enable_python
|
Build Python binding $enable_python
|
||||||
|
Sound support $enable_libcanberra
|
||||||
Build document $enable_gtk_doc
|
Build document $enable_gtk_doc
|
||||||
Support accessibility $enable_atspi
|
Focus listeners $focus_listeners
|
||||||
|
Keystroke listeners $keystroke_listeners
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,17 @@
|
|||||||
SUBDIRS = icons themes keyboards
|
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
|
desktopdir = $(datadir)/applications
|
||||||
desktop_in_files = eekboard.desktop.in
|
desktop_in_files = eekboard.desktop.in
|
||||||
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
|
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
|
||||||
@ -12,8 +24,8 @@ endif
|
|||||||
|
|
||||||
@INTLTOOL_DESKTOP_RULE@
|
@INTLTOOL_DESKTOP_RULE@
|
||||||
|
|
||||||
CLEANFILES = $(desktop_DATA)
|
CLEANFILES = $(service_DATA) $(desktop_DATA) $(gsettings_SCHEMAS)
|
||||||
EXTRA_DIST = $(desktop_in_files)
|
EXTRA_DIST = $(service_in_files) $(desktop_in_files) $(gsettings_schemas_in_files)
|
||||||
|
|
||||||
if ENABLE_ATSPI
|
if ENABLE_ATSPI
|
||||||
CLEANFILES += $(autostart_DATA)
|
CLEANFILES += $(autostart_DATA)
|
||||||
|
|||||||
@ -2,5 +2,5 @@
|
|||||||
Name=Eekboard
|
Name=Eekboard
|
||||||
Exec=eekboard -f
|
Exec=eekboard -f
|
||||||
Type=Application
|
Type=Application
|
||||||
AutostartCondition=GSettings org.gnome.desktop.a11y.applications screen-keyboard-enabled
|
#AutostartCondition=GSettings org.gnome.desktop.a11y.applications screen-keyboard-enabled
|
||||||
X-GNOME-AutoRestart=true
|
X-GNOME-AutoRestart=true
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
[D-BUS Service]
|
[D-BUS Service]
|
||||||
Name=com.redhat.Eekboard.Server
|
Name=org.fedorahosted.Eekboard
|
||||||
Exec=@bindir@/eekboard-server
|
Exec=@bindir@/eekboard-server
|
||||||
@ -1,2 +1,2 @@
|
|||||||
keyboarddir = $(pkgdatadir)/keyboards
|
keyboarddir = $(pkgdatadir)/keyboards
|
||||||
dist_keyboard_DATA = us-qwerty.xml
|
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>
|
||||||
@ -1,707 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<keyboard version="0.90">
|
|
||||||
<bounds>0.000000,0.000000,410.000000,190.000000</bounds>
|
|
||||||
<section name="Alpha">
|
|
||||||
<bounds>10.000000,50.000000,390.000000,129.000000</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="keycode105" name="RCTL" column="7" row="4">
|
|
||||||
<bounds>359.000000,104.000000,31.000000,24.000000</bounds>
|
|
||||||
<oref>outline10</oref>
|
|
||||||
<symbols groups="1" levels="1">
|
|
||||||
<keysym keyval="65508">Control_R</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode135" name="MENU" column="6" row="4">
|
|
||||||
<bounds>326.000000,104.000000,31.000000,24.000000</bounds>
|
|
||||||
<oref>outline10</oref>
|
|
||||||
<symbols groups="1" levels="1">
|
|
||||||
<keysym keyval="65383">Menu</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode134" name="RWIN" column="5" row="4">
|
|
||||||
<bounds>294.000000,104.000000,31.000000,24.000000</bounds>
|
|
||||||
<oref>outline10</oref>
|
|
||||||
<symbols groups="1" levels="1">
|
|
||||||
<keysym keyval="65516">Super_R</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode108" name="RALT" column="4" row="4">
|
|
||||||
<bounds>261.000000,104.000000,31.000000,24.000000</bounds>
|
|
||||||
<oref>outline10</oref>
|
|
||||||
<symbols groups="1" levels="1">
|
|
||||||
<keysym keyval="65027">ISO_Level3_Shift</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode65" name="SPCE" column="3" row="4">
|
|
||||||
<bounds>106.000000,104.000000,153.000000,24.000000</bounds>
|
|
||||||
<oref>outline11</oref>
|
|
||||||
<symbols groups="1" levels="1">
|
|
||||||
<keysym keyval="32">space</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode64" name="LALT" column="2" row="4">
|
|
||||||
<bounds>73.000000,104.000000,31.000000,24.000000</bounds>
|
|
||||||
<oref>outline10</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65513">Alt_L</keysym>
|
|
||||||
<keysym keyval="65511">Meta_L</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode133" name="LWIN" column="1" row="4">
|
|
||||||
<bounds>40.000000,104.000000,31.000000,24.000000</bounds>
|
|
||||||
<oref>outline10</oref>
|
|
||||||
<symbols groups="1" levels="1">
|
|
||||||
<keysym keyval="65515">Super_L</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode37" name="LCTL" column="0" row="4">
|
|
||||||
<bounds>2.000000,104.000000,36.000000,24.000000</bounds>
|
|
||||||
<oref>outline9</oref>
|
|
||||||
<symbols groups="1" levels="1">
|
|
||||||
<keysym keyval="65507">Control_L</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode62" name="RTSH" column="11" row="3">
|
|
||||||
<bounds>320.000000,78.000000,70.000000,24.000000</bounds>
|
|
||||||
<oref>outline8</oref>
|
|
||||||
<symbols groups="1" levels="1">
|
|
||||||
<keysym keyval="65506">Shift_R</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode61" name="AB10" column="10" row="3">
|
|
||||||
<bounds>294.000000,78.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="47">slash</keysym>
|
|
||||||
<keysym keyval="63">question</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode60" name="AB09" column="9" row="3">
|
|
||||||
<bounds>268.000000,78.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="46">period</keysym>
|
|
||||||
<keysym keyval="62">greater</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode59" name="AB08" column="8" row="3">
|
|
||||||
<bounds>242.000000,78.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="44">comma</keysym>
|
|
||||||
<keysym keyval="60">less</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode58" name="AB07" column="7" row="3">
|
|
||||||
<bounds>216.000000,78.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="109">m</keysym>
|
|
||||||
<keysym keyval="77">M</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode57" name="AB06" column="6" row="3">
|
|
||||||
<bounds>190.000000,78.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="110">n</keysym>
|
|
||||||
<keysym keyval="78">N</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode56" name="AB05" column="5" row="3">
|
|
||||||
<bounds>164.000000,78.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="98">b</keysym>
|
|
||||||
<keysym keyval="66">B</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode55" name="AB04" column="4" row="3">
|
|
||||||
<bounds>138.000000,78.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="118">v</keysym>
|
|
||||||
<keysym keyval="86">V</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode54" name="AB03" column="3" row="3">
|
|
||||||
<bounds>113.000000,78.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="99">c</keysym>
|
|
||||||
<keysym keyval="67">C</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode53" name="AB02" column="2" row="3">
|
|
||||||
<bounds>87.000000,78.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="120">x</keysym>
|
|
||||||
<keysym keyval="88">X</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode52" name="AB01" column="1" row="3">
|
|
||||||
<bounds>61.000000,78.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="122">z</keysym>
|
|
||||||
<keysym keyval="90">Z</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode50" name="LFSH" column="0" row="3">
|
|
||||||
<bounds>2.000000,78.000000,57.000000,24.000000</bounds>
|
|
||||||
<oref>outline7</oref>
|
|
||||||
<symbols groups="1" levels="1">
|
|
||||||
<keysym keyval="65505">Shift_L</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode36" name="RTRN" column="12" row="2">
|
|
||||||
<bounds>333.000000,53.000000,57.000000,24.000000</bounds>
|
|
||||||
<oref>outline6</oref>
|
|
||||||
<symbols groups="1" levels="1">
|
|
||||||
<keysym keyval="65293">Return</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode48" name="AC11" column="11" row="2">
|
|
||||||
<bounds>307.000000,53.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="39">quoteright</keysym>
|
|
||||||
<keysym keyval="34">quotedbl</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode47" name="AC10" column="10" row="2">
|
|
||||||
<bounds>281.000000,53.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="59">semicolon</keysym>
|
|
||||||
<keysym keyval="58">colon</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode46" name="AC09" column="9" row="2">
|
|
||||||
<bounds>256.000000,53.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="108">l</keysym>
|
|
||||||
<keysym keyval="76">L</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode45" name="AC08" column="8" row="2">
|
|
||||||
<bounds>230.000000,53.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="107">k</keysym>
|
|
||||||
<keysym keyval="75">K</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode44" name="AC07" column="7" row="2">
|
|
||||||
<bounds>204.000000,53.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="106">j</keysym>
|
|
||||||
<keysym keyval="74">J</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode43" name="AC06" column="6" row="2">
|
|
||||||
<bounds>178.000000,53.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="104">h</keysym>
|
|
||||||
<keysym keyval="72">H</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode42" name="AC05" column="5" row="2">
|
|
||||||
<bounds>152.000000,53.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="103">g</keysym>
|
|
||||||
<keysym keyval="71">G</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode41" name="AC04" column="4" row="2">
|
|
||||||
<bounds>126.000000,53.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="102">f</keysym>
|
|
||||||
<keysym keyval="70">F</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode40" name="AC03" column="3" row="2">
|
|
||||||
<bounds>100.000000,53.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="100">d</keysym>
|
|
||||||
<keysym keyval="68">D</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode39" name="AC02" column="2" row="2">
|
|
||||||
<bounds>74.000000,53.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="115">s</keysym>
|
|
||||||
<keysym keyval="83">S</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode38" name="AC01" column="1" row="2">
|
|
||||||
<bounds>49.000000,53.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="97">a</keysym>
|
|
||||||
<keysym keyval="65">A</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode66" name="CAPS" column="0" row="2">
|
|
||||||
<bounds>2.000000,53.000000,44.000000,24.000000</bounds>
|
|
||||||
<oref>outline5</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65507">Control_L</keysym>
|
|
||||||
<keysym keyval="65507">Control_L</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode51" name="BKSL" column="13" row="1">
|
|
||||||
<bounds>352.000000,27.000000,38.000000,24.000000</bounds>
|
|
||||||
<oref>outline4</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="92">backslash</keysym>
|
|
||||||
<keysym keyval="124">bar</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode35" name="AD12" column="12" row="1">
|
|
||||||
<bounds>326.000000,27.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="93">bracketright</keysym>
|
|
||||||
<keysym keyval="125">braceright</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode34" name="AD11" column="11" row="1">
|
|
||||||
<bounds>300.000000,27.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="91">bracketleft</keysym>
|
|
||||||
<keysym keyval="123">braceleft</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode33" name="AD10" column="10" row="1">
|
|
||||||
<bounds>275.000000,27.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="112">p</keysym>
|
|
||||||
<keysym keyval="80">P</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode32" name="AD09" column="9" row="1">
|
|
||||||
<bounds>249.000000,27.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="111">o</keysym>
|
|
||||||
<keysym keyval="79">O</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode31" name="AD08" column="8" row="1">
|
|
||||||
<bounds>223.000000,27.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="105">i</keysym>
|
|
||||||
<keysym keyval="73">I</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode30" name="AD07" column="7" row="1">
|
|
||||||
<bounds>197.000000,27.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="117">u</keysym>
|
|
||||||
<keysym keyval="85">U</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode29" name="AD06" column="6" row="1">
|
|
||||||
<bounds>171.000000,27.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="121">y</keysym>
|
|
||||||
<keysym keyval="89">Y</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode28" name="AD05" column="5" row="1">
|
|
||||||
<bounds>145.000000,27.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="116">t</keysym>
|
|
||||||
<keysym keyval="84">T</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode27" name="AD04" column="4" row="1">
|
|
||||||
<bounds>119.000000,27.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="114">r</keysym>
|
|
||||||
<keysym keyval="82">R</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode26" name="AD03" column="3" row="1">
|
|
||||||
<bounds>93.000000,27.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="101">e</keysym>
|
|
||||||
<keysym keyval="69">E</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode25" name="AD02" column="2" row="1">
|
|
||||||
<bounds>68.000000,27.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="119">w</keysym>
|
|
||||||
<keysym keyval="87">W</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode24" name="AD01" column="1" row="1">
|
|
||||||
<bounds>42.000000,27.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="113">q</keysym>
|
|
||||||
<keysym keyval="81">Q</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode23" name="TAB" column="0" row="1">
|
|
||||||
<bounds>2.000000,27.000000,38.000000,24.000000</bounds>
|
|
||||||
<oref>outline3</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65289">Tab</keysym>
|
|
||||||
<keysym keyval="65056">ISO_Left_Tab</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode22" name="BKSP" column="13" row="0">
|
|
||||||
<bounds>339.000000,1.000000,51.000000,24.000000</bounds>
|
|
||||||
<oref>outline2</oref>
|
|
||||||
<symbols groups="1" levels="1">
|
|
||||||
<keysym keyval="65288">BackSpace</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode21" name="AE12" column="12" row="0">
|
|
||||||
<bounds>313.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="61">equal</keysym>
|
|
||||||
<keysym keyval="43">plus</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode20" name="AE11" column="11" row="0">
|
|
||||||
<bounds>287.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="45">minus</keysym>
|
|
||||||
<keysym keyval="95">underscore</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode19" name="AE10" column="10" row="0">
|
|
||||||
<bounds>261.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="48">0</keysym>
|
|
||||||
<keysym keyval="41">parenright</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode18" name="AE09" column="9" row="0">
|
|
||||||
<bounds>235.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="57">9</keysym>
|
|
||||||
<keysym keyval="40">parenleft</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode17" name="AE08" column="8" row="0">
|
|
||||||
<bounds>209.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="56">8</keysym>
|
|
||||||
<keysym keyval="42">asterisk</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode16" name="AE07" column="7" row="0">
|
|
||||||
<bounds>183.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="55">7</keysym>
|
|
||||||
<keysym keyval="38">ampersand</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode15" name="AE06" column="6" row="0">
|
|
||||||
<bounds>157.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="54">6</keysym>
|
|
||||||
<keysym keyval="94">asciicircum</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode14" name="AE05" column="5" row="0">
|
|
||||||
<bounds>132.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="53">5</keysym>
|
|
||||||
<keysym keyval="37">percent</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode13" name="AE04" column="4" row="0">
|
|
||||||
<bounds>106.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="52">4</keysym>
|
|
||||||
<keysym keyval="36">dollar</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode12" name="AE03" column="3" row="0">
|
|
||||||
<bounds>80.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="51">3</keysym>
|
|
||||||
<keysym keyval="35">numbersign</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode11" name="AE02" column="2" row="0">
|
|
||||||
<bounds>54.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="50">2</keysym>
|
|
||||||
<keysym keyval="64">at</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode10" name="AE01" column="1" row="0">
|
|
||||||
<bounds>28.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="49">1</keysym>
|
|
||||||
<keysym keyval="33">exclam</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode49" name="TLDE" column="0" row="0">
|
|
||||||
<bounds>2.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="96">quoteleft</keysym>
|
|
||||||
<keysym keyval="126">asciitilde</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
</section>
|
|
||||||
<section name="Function">
|
|
||||||
<bounds>10.000000,10.000000,410.000000,25.000000</bounds>
|
|
||||||
<angle>0</angle>
|
|
||||||
<row>
|
|
||||||
<columns>16</columns>
|
|
||||||
<orientation>1</orientation>
|
|
||||||
</row>
|
|
||||||
<key id="keycode96" name="FK12" column="12" row="0">
|
|
||||||
<bounds>366.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65481">F12</keysym>
|
|
||||||
<keysym keyval="269024780">(null)</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode95" name="FK11" column="11" row="0">
|
|
||||||
<bounds>340.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65480">F11</keysym>
|
|
||||||
<keysym keyval="269024779">(null)</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode76" name="FK10" column="10" row="0">
|
|
||||||
<bounds>314.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65479">F10</keysym>
|
|
||||||
<keysym keyval="269024778">(null)</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode75" name="FK09" column="9" row="0">
|
|
||||||
<bounds>288.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65478">F9</keysym>
|
|
||||||
<keysym keyval="269024777">(null)</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode74" name="FK08" column="8" row="0">
|
|
||||||
<bounds>249.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65477">F8</keysym>
|
|
||||||
<keysym keyval="269024776">(null)</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode73" name="FK07" column="7" row="0">
|
|
||||||
<bounds>223.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65476">F7</keysym>
|
|
||||||
<keysym keyval="269024775">(null)</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode72" name="FK06" column="6" row="0">
|
|
||||||
<bounds>197.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65475">F6</keysym>
|
|
||||||
<keysym keyval="269024774">(null)</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode71" name="FK05" column="5" row="0">
|
|
||||||
<bounds>171.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65474">F5</keysym>
|
|
||||||
<keysym keyval="269024773">(null)</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode70" name="FK04" column="4" row="0">
|
|
||||||
<bounds>132.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65473">F4</keysym>
|
|
||||||
<keysym keyval="269024772">(null)</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode69" name="FK03" column="3" row="0">
|
|
||||||
<bounds>106.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65472">F3</keysym>
|
|
||||||
<keysym keyval="269024771">(null)</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode68" name="FK02" column="2" row="0">
|
|
||||||
<bounds>80.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65471">F2</keysym>
|
|
||||||
<keysym keyval="269024770">(null)</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode67" name="FK01" column="1" row="0">
|
|
||||||
<bounds>54.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="2">
|
|
||||||
<keysym keyval="65470">F1</keysym>
|
|
||||||
<keysym keyval="269024769">(null)</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
<key id="keycode9" name="ESC" column="0" row="0">
|
|
||||||
<bounds>2.000000,1.000000,24.000000,24.000000</bounds>
|
|
||||||
<oref>outline1</oref>
|
|
||||||
<symbols groups="1" levels="1">
|
|
||||||
<keysym keyval="65307">Escape</keysym>
|
|
||||||
</symbols>
|
|
||||||
</key>
|
|
||||||
</section>
|
|
||||||
<outline id="outline1">
|
|
||||||
<corner-radius>1.000000</corner-radius>
|
|
||||||
<point>0.000000,0.000000</point>
|
|
||||||
<point>24.000000,0.000000</point>
|
|
||||||
<point>24.000000,24.000000</point>
|
|
||||||
<point>0.000000,24.000000</point>
|
|
||||||
</outline>
|
|
||||||
<outline id="outline3">
|
|
||||||
<corner-radius>1.000000</corner-radius>
|
|
||||||
<point>0.000000,0.000000</point>
|
|
||||||
<point>38.000000,0.000000</point>
|
|
||||||
<point>38.000000,24.000000</point>
|
|
||||||
<point>0.000000,24.000000</point>
|
|
||||||
</outline>
|
|
||||||
<outline id="outline4">
|
|
||||||
<corner-radius>1.000000</corner-radius>
|
|
||||||
<point>0.000000,0.000000</point>
|
|
||||||
<point>38.000000,0.000000</point>
|
|
||||||
<point>38.000000,24.000000</point>
|
|
||||||
<point>0.000000,24.000000</point>
|
|
||||||
</outline>
|
|
||||||
<outline id="outline5">
|
|
||||||
<corner-radius>1.000000</corner-radius>
|
|
||||||
<point>0.000000,0.000000</point>
|
|
||||||
<point>44.000000,0.000000</point>
|
|
||||||
<point>44.000000,24.000000</point>
|
|
||||||
<point>0.000000,24.000000</point>
|
|
||||||
</outline>
|
|
||||||
<outline id="outline6">
|
|
||||||
<corner-radius>1.000000</corner-radius>
|
|
||||||
<point>0.000000,0.000000</point>
|
|
||||||
<point>57.000000,0.000000</point>
|
|
||||||
<point>57.000000,24.000000</point>
|
|
||||||
<point>0.000000,24.000000</point>
|
|
||||||
</outline>
|
|
||||||
<outline id="outline7">
|
|
||||||
<corner-radius>1.000000</corner-radius>
|
|
||||||
<point>0.000000,0.000000</point>
|
|
||||||
<point>57.000000,0.000000</point>
|
|
||||||
<point>57.000000,24.000000</point>
|
|
||||||
<point>0.000000,24.000000</point>
|
|
||||||
</outline>
|
|
||||||
<outline id="outline8">
|
|
||||||
<corner-radius>1.000000</corner-radius>
|
|
||||||
<point>0.000000,0.000000</point>
|
|
||||||
<point>70.000000,0.000000</point>
|
|
||||||
<point>70.000000,24.000000</point>
|
|
||||||
<point>0.000000,24.000000</point>
|
|
||||||
</outline>
|
|
||||||
<outline id="outline9">
|
|
||||||
<corner-radius>1.000000</corner-radius>
|
|
||||||
<point>0.000000,0.000000</point>
|
|
||||||
<point>36.000000,0.000000</point>
|
|
||||||
<point>36.000000,24.000000</point>
|
|
||||||
<point>0.000000,24.000000</point>
|
|
||||||
</outline>
|
|
||||||
<outline id="outline10">
|
|
||||||
<corner-radius>1.000000</corner-radius>
|
|
||||||
<point>0.000000,0.000000</point>
|
|
||||||
<point>31.000000,0.000000</point>
|
|
||||||
<point>31.000000,24.000000</point>
|
|
||||||
<point>0.000000,24.000000</point>
|
|
||||||
</outline>
|
|
||||||
<outline id="outline11">
|
|
||||||
<corner-radius>1.000000</corner-radius>
|
|
||||||
<point>0.000000,0.000000</point>
|
|
||||||
<point>153.000000,0.000000</point>
|
|
||||||
<point>153.000000,24.000000</point>
|
|
||||||
<point>0.000000,24.000000</point>
|
|
||||||
</outline>
|
|
||||||
<outline id="outline12">
|
|
||||||
<corner-radius>1.000000</corner-radius>
|
|
||||||
<point>0.000000,0.000000</point>
|
|
||||||
<point>24.000000,0.000000</point>
|
|
||||||
<point>24.000000,50.000000</point>
|
|
||||||
<point>0.000000,50.000000</point>
|
|
||||||
</outline>
|
|
||||||
<outline id="outline13">
|
|
||||||
<corner-radius>1.000000</corner-radius>
|
|
||||||
<point>0.000000,0.000000</point>
|
|
||||||
<point>50.000000,0.000000</point>
|
|
||||||
<point>50.000000,24.000000</point>
|
|
||||||
<point>0.000000,24.000000</point>
|
|
||||||
</outline>
|
|
||||||
<outline id="outline2">
|
|
||||||
<corner-radius>1.000000</corner-radius>
|
|
||||||
<point>0.000000,0.000000</point>
|
|
||||||
<point>51.000000,0.000000</point>
|
|
||||||
<point>51.000000,24.000000</point>
|
|
||||||
<point>0.000000,24.000000</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>
|
||||||
@ -83,6 +83,8 @@ IGNORE_HFILES = \
|
|||||||
eek-clutter-section.h \
|
eek-clutter-section.h \
|
||||||
eek-clutter-key.h \
|
eek-clutter-key.h \
|
||||||
eek-gtk-renderer.h \
|
eek-gtk-renderer.h \
|
||||||
|
eek-theme.h \
|
||||||
|
eek-theme-node.h \
|
||||||
eek-enumtypes.h
|
eek-enumtypes.h
|
||||||
if !ENABLE_CLUTTER
|
if !ENABLE_CLUTTER
|
||||||
IGNORE_HFILES += eek-clutter-keyboard.h eek-clutter.h
|
IGNORE_HFILES += eek-clutter-keyboard.h eek-clutter.h
|
||||||
|
|||||||
@ -37,6 +37,7 @@
|
|||||||
<title>API Manual</title>
|
<title>API Manual</title>
|
||||||
<chapter>
|
<chapter>
|
||||||
<title>Base Classes, Interfaces, and Utilities</title>
|
<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-serializable.xml"/>
|
||||||
<xi:include href="xml/eek-element.xml"/>
|
<xi:include href="xml/eek-element.xml"/>
|
||||||
<xi:include href="xml/eek-container.xml"/>
|
<xi:include href="xml/eek-container.xml"/>
|
||||||
@ -49,12 +50,12 @@
|
|||||||
<xi:include href="xml/eek-types.xml"/>
|
<xi:include href="xml/eek-types.xml"/>
|
||||||
</chapter>
|
</chapter>
|
||||||
<chapter>
|
<chapter>
|
||||||
<title>Clutter Keyboard</title>
|
<title>GTK Adapter</title>
|
||||||
<xi:include href="xml/eek-clutter-keyboard.xml"/>
|
<xi:include href="xml/eek-gtk-keyboard.xml"/>
|
||||||
</chapter>
|
</chapter>
|
||||||
<chapter>
|
<chapter>
|
||||||
<title>GTK Keyboard</title>
|
<title>Clutter Adapter</title>
|
||||||
<xi:include href="xml/eek-gtk-keyboard.xml"/>
|
<xi:include href="xml/eek-clutter-keyboard.xml"/>
|
||||||
</chapter>
|
</chapter>
|
||||||
<chapter>
|
<chapter>
|
||||||
<title>Libxklavier Layout Engine</title>
|
<title>Libxklavier Layout Engine</title>
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
<TITLE>EekKeyboard</TITLE>
|
<TITLE>EekKeyboard</TITLE>
|
||||||
EekKeyboard
|
EekKeyboard
|
||||||
EekKeyboardClass
|
EekKeyboardClass
|
||||||
|
EekModifierKey
|
||||||
eek_keyboard_new
|
eek_keyboard_new
|
||||||
eek_keyboard_get_layout
|
eek_keyboard_get_layout
|
||||||
eek_keyboard_get_size
|
eek_keyboard_get_size
|
||||||
@ -15,6 +16,7 @@ eek_keyboard_get_group
|
|||||||
eek_keyboard_get_level
|
eek_keyboard_get_level
|
||||||
eek_keyboard_set_modifier_behavior
|
eek_keyboard_set_modifier_behavior
|
||||||
eek_keyboard_get_modifier_behavior
|
eek_keyboard_get_modifier_behavior
|
||||||
|
eek_keyboard_set_modifiers
|
||||||
eek_keyboard_get_modifiers
|
eek_keyboard_get_modifiers
|
||||||
eek_keyboard_create_section
|
eek_keyboard_create_section
|
||||||
eek_keyboard_find_key_by_keycode
|
eek_keyboard_find_key_by_keycode
|
||||||
@ -24,6 +26,8 @@ eek_keyboard_set_num_lock_mask
|
|||||||
eek_keyboard_get_num_lock_mask
|
eek_keyboard_get_num_lock_mask
|
||||||
eek_keyboard_set_alt_gr_mask
|
eek_keyboard_set_alt_gr_mask
|
||||||
eek_keyboard_get_alt_gr_mask
|
eek_keyboard_get_alt_gr_mask
|
||||||
|
eek_keyboard_get_pressed_keys
|
||||||
|
eek_keyboard_get_locked_keys
|
||||||
EekKeyboardPrivate
|
EekKeyboardPrivate
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
EEK_KEYBOARD
|
EEK_KEYBOARD
|
||||||
@ -68,37 +72,6 @@ EEK_IS_GTK_KEYBOARD_CLASS
|
|||||||
EEK_GTK_KEYBOARD_GET_CLASS
|
EEK_GTK_KEYBOARD_GET_CLASS
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
|
||||||
<FILE>eek-theme-node</FILE>
|
|
||||||
EekSide
|
|
||||||
EekCorner
|
|
||||||
eek_theme_node_new
|
|
||||||
eek_theme_node_get_parent
|
|
||||||
eek_theme_node_get_theme
|
|
||||||
eek_theme_node_get_element_type
|
|
||||||
eek_theme_node_get_element_id
|
|
||||||
eek_theme_node_get_element_class
|
|
||||||
eek_theme_node_get_pseudo_class
|
|
||||||
eek_theme_node_get_color
|
|
||||||
eek_theme_node_get_background_color
|
|
||||||
eek_theme_node_get_foreground_color
|
|
||||||
eek_theme_node_get_background_gradient
|
|
||||||
eek_theme_node_get_border_width
|
|
||||||
eek_theme_node_get_border_radius
|
|
||||||
eek_theme_node_get_border_color
|
|
||||||
eek_theme_node_get_font
|
|
||||||
EekThemeNodePrivate
|
|
||||||
EekThemeNodeClass
|
|
||||||
<SUBSECTION Standard>
|
|
||||||
EEK_THEME_NODE
|
|
||||||
EEK_IS_THEME_NODE
|
|
||||||
EEK_TYPE_THEME_NODE
|
|
||||||
eek_theme_node_get_type
|
|
||||||
EEK_THEME_NODE_CLASS
|
|
||||||
EEK_IS_THEME_NODE_CLASS
|
|
||||||
EEK_THEME_NODE_GET_CLASS
|
|
||||||
</SECTION>
|
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>eek-section</FILE>
|
<FILE>eek-section</FILE>
|
||||||
<TITLE>EekSection</TITLE>
|
<TITLE>EekSection</TITLE>
|
||||||
@ -285,6 +258,7 @@ eek_key_get_index
|
|||||||
eek_key_set_oref
|
eek_key_set_oref
|
||||||
eek_key_get_oref
|
eek_key_get_oref
|
||||||
eek_key_is_pressed
|
eek_key_is_pressed
|
||||||
|
eek_key_is_locked
|
||||||
EekKeyPrivate
|
EekKeyPrivate
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
EEK_KEY
|
EEK_KEY
|
||||||
@ -360,22 +334,6 @@ EEK_IS_XML_LAYOUT_CLASS
|
|||||||
EEK_XML_LAYOUT_GET_CLASS
|
EEK_XML_LAYOUT_GET_CLASS
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
|
||||||
<FILE>eek-theme</FILE>
|
|
||||||
eek_theme_new
|
|
||||||
eek_theme_load_stylesheet
|
|
||||||
eek_theme_unload_stylesheet
|
|
||||||
EekThemeClass
|
|
||||||
<SUBSECTION Standard>
|
|
||||||
EEK_THEME
|
|
||||||
EEK_IS_THEME
|
|
||||||
EEK_TYPE_THEME
|
|
||||||
eek_theme_get_type
|
|
||||||
EEK_THEME_CLASS
|
|
||||||
EEK_IS_THEME_CLASS
|
|
||||||
EEK_THEME_GET_CLASS
|
|
||||||
</SECTION>
|
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>eek-keysym</FILE>
|
<FILE>eek-keysym</FILE>
|
||||||
<TITLE>EekKeysym</TITLE>
|
<TITLE>EekKeysym</TITLE>
|
||||||
@ -434,9 +392,11 @@ eek_color_new
|
|||||||
eek_color_copy
|
eek_color_copy
|
||||||
eek_color_free
|
eek_color_free
|
||||||
EekGradientType
|
EekGradientType
|
||||||
EekThemeNode
|
</SECTION>
|
||||||
EekThemeContext
|
|
||||||
EekTheme
|
<SECTION>
|
||||||
|
<FILE>eek</FILE>
|
||||||
|
eek_init
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
|
|||||||
@ -35,10 +35,15 @@
|
|||||||
<part id="apireference">
|
<part id="apireference">
|
||||||
<title>API Manual</title>
|
<title>API Manual</title>
|
||||||
<chapter>
|
<chapter>
|
||||||
<title>D-Bus client interface to eekboard-server</title>
|
<title>Client interface to eekboard-server</title>
|
||||||
<xi:include href="xml/eekboard-eekboard.xml"/>
|
<xi:include href="xml/eekboard-client.xml"/>
|
||||||
<xi:include href="xml/eekboard-context.xml"/>
|
<xi:include href="xml/eekboard-context.xml"/>
|
||||||
</chapter>
|
</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">
|
<chapter id="object-tree">
|
||||||
<title>Object Hierarchy</title>
|
<title>Object Hierarchy</title>
|
||||||
<xi:include href="xml/tree_index.sgml"/>
|
<xi:include href="xml/tree_index.sgml"/>
|
||||||
|
|||||||
@ -1,22 +1,41 @@
|
|||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>eekboard-eekboard</FILE>
|
<FILE>eekboard-client</FILE>
|
||||||
<TITLE>EekboardEekboard</TITLE>
|
<TITLE>EekboardClient</TITLE>
|
||||||
EekboardEekboard
|
EekboardClient
|
||||||
EekboardEekboardClass
|
EekboardClientClass
|
||||||
EekboardEekboardPrivate
|
eekboard_client_new
|
||||||
eekboard_eekboard_new
|
eekboard_client_create_context
|
||||||
eekboard_eekboard_create_context
|
eekboard_client_push_context
|
||||||
eekboard_eekboard_push_context
|
eekboard_client_pop_context
|
||||||
eekboard_eekboard_pop_context
|
eekboard_client_destroy_context
|
||||||
eekboard_eekboard_destroy_context
|
EekboardClientPrivate
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
EEKBOARD_EEKBOARD
|
EEKBOARD_CLIENT
|
||||||
EEKBOARD_IS_EEKBOARD
|
EEKBOARD_IS_CLIENT
|
||||||
EEKBOARD_TYPE_EEKBOARD
|
EEKBOARD_TYPE_CLIENT
|
||||||
eekboard_eekboard_get_type
|
eekboard_client_get_type
|
||||||
EEKBOARD_EEKBOARD_CLASS
|
EEKBOARD_CLIENT_CLASS
|
||||||
EEKBOARD_IS_EEKBOARD_CLASS
|
EEKBOARD_IS_CLIENT_CLASS
|
||||||
EEKBOARD_EEKBOARD_GET_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>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
@ -24,17 +43,21 @@ EEKBOARD_EEKBOARD_GET_CLASS
|
|||||||
<TITLE>EekboardContext</TITLE>
|
<TITLE>EekboardContext</TITLE>
|
||||||
EekboardContext
|
EekboardContext
|
||||||
EekboardContextClass
|
EekboardContextClass
|
||||||
EekboardContextPrivate
|
|
||||||
eekboard_context_new
|
eekboard_context_new
|
||||||
|
eekboard_context_add_keyboard
|
||||||
|
eekboard_context_remove_keyboard
|
||||||
eekboard_context_set_keyboard
|
eekboard_context_set_keyboard
|
||||||
eekboard_context_show_keyboard
|
eekboard_context_show_keyboard
|
||||||
eekboard_context_hide_keyboard
|
eekboard_context_hide_keyboard
|
||||||
eekboard_context_set_group
|
eekboard_context_set_group
|
||||||
eekboard_context_press_key
|
eekboard_context_get_group
|
||||||
eekboard_context_release_key
|
eekboard_context_press_keycode
|
||||||
|
eekboard_context_release_keycode
|
||||||
eekboard_context_is_keyboard_visible
|
eekboard_context_is_keyboard_visible
|
||||||
eekboard_context_set_enabled
|
eekboard_context_set_enabled
|
||||||
eekboard_context_is_enabled
|
eekboard_context_is_enabled
|
||||||
|
eekboard_context_set_fullscreen
|
||||||
|
EekboardContextPrivate
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
EEKBOARD_CONTEXT
|
EEKBOARD_CONTEXT
|
||||||
EEKBOARD_IS_CONTEXT
|
EEKBOARD_IS_CONTEXT
|
||||||
@ -45,3 +68,37 @@ EEKBOARD_IS_CONTEXT_CLASS
|
|||||||
EEKBOARD_CONTEXT_GET_CLASS
|
EEKBOARD_CONTEXT_GET_CLASS
|
||||||
</SECTION>
|
</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_context_get_type
|
||||||
eekboard_eekboard_get_type
|
eekboard_context_service_get_type
|
||||||
|
eekboard_service_get_type
|
||||||
|
|||||||
@ -54,6 +54,7 @@ libeek_private_headers = \
|
|||||||
$(srcdir)/eek-theme-node.h
|
$(srcdir)/eek-theme-node.h
|
||||||
|
|
||||||
libeek_sources = \
|
libeek_sources = \
|
||||||
|
$(srcdir)/eek.c \
|
||||||
$(srcdir)/eek-layout.c \
|
$(srcdir)/eek-layout.c \
|
||||||
$(srcdir)/eek-element.c \
|
$(srcdir)/eek-element.c \
|
||||||
$(srcdir)/eek-container.c \
|
$(srcdir)/eek-container.c \
|
||||||
@ -96,7 +97,7 @@ libeek_la_SOURCES = \
|
|||||||
$(srcdir)/eek-enumtypes.c \
|
$(srcdir)/eek-enumtypes.c \
|
||||||
$(srcdir)/eek-marshalers.c
|
$(srcdir)/eek-marshalers.c
|
||||||
|
|
||||||
libeek_la_CFLAGS = $(GIO2_CFLAGS) $(PANGOCAIRO_CFLAGS) $(LIBCROCO_CFLAGS)
|
libeek_la_CFLAGS = -DEEK_COMPILATION=1 $(GIO2_CFLAGS) $(PANGOCAIRO_CFLAGS) $(LIBCROCO_CFLAGS)
|
||||||
libeek_la_LIBADD = $(GIO2_LIBS) $(PANGOCAIRO_LIBS) $(LIBCROCO_LIBS) -lm
|
libeek_la_LIBADD = $(GIO2_LIBS) $(PANGOCAIRO_LIBS) $(LIBCROCO_LIBS) -lm
|
||||||
|
|
||||||
if ENABLE_CLUTTER
|
if ENABLE_CLUTTER
|
||||||
@ -116,7 +117,7 @@ libeek_clutter_sources = \
|
|||||||
$(srcdir)/eek-clutter-renderer.c
|
$(srcdir)/eek-clutter-renderer.c
|
||||||
|
|
||||||
libeek_clutter_la_SOURCES = $(libeek_clutter_sources)
|
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)
|
libeek_clutter_la_LIBADD = libeek.la $(CLUTTER_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -130,8 +131,8 @@ libeek_gtk_sources = \
|
|||||||
$(srcdir)/eek-gtk-renderer.c
|
$(srcdir)/eek-gtk-renderer.c
|
||||||
|
|
||||||
libeek_gtk_la_SOURCES = $(libeek_gtk_sources)
|
libeek_gtk_la_SOURCES = $(libeek_gtk_sources)
|
||||||
libeek_gtk_la_CFLAGS = $(GTK_CFLAGS)
|
libeek_gtk_la_CFLAGS = -DEEK_COMPILATION=1 $(GTK_CFLAGS) $(LIBCANBERRA_CFLAGS)
|
||||||
libeek_gtk_la_LIBADD = libeek.la $(GTK_LIBS)
|
libeek_gtk_la_LIBADD = libeek.la $(GTK_LIBS) $(LIBCANBERRA_LIBS)
|
||||||
|
|
||||||
libeek_xkb_public_headers = \
|
libeek_xkb_public_headers = \
|
||||||
$(srcdir)/eek-xkb-layout.h \
|
$(srcdir)/eek-xkb-layout.h \
|
||||||
@ -141,7 +142,7 @@ libeek_xkb_sources = \
|
|||||||
$(srcdir)/eek-xkb-layout.c
|
$(srcdir)/eek-xkb-layout.c
|
||||||
|
|
||||||
libeek_xkb_la_SOURCES = $(libeek_xkb_sources)
|
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_xkb_la_LIBADD = libeek.la $(XKB_LIBS) $(GTK_LIBS)
|
||||||
|
|
||||||
libeek_xkl_public_headers = \
|
libeek_xkl_public_headers = \
|
||||||
@ -152,7 +153,7 @@ libeek_xkl_sources = \
|
|||||||
$(srcdir)/eek-xkl-layout.c
|
$(srcdir)/eek-xkl-layout.c
|
||||||
|
|
||||||
libeek_xkl_la_SOURCES = $(libeek_xkl_sources)
|
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)
|
libeek_xkl_la_LIBADD = libeek-xkb.la $(LIBXKLAVIER_LIBS) $(GTK_LIBS)
|
||||||
|
|
||||||
eekdir = $(includedir)/eek-$(EEK_API_VERSION)/eek
|
eekdir = $(includedir)/eek-$(EEK_API_VERSION)/eek
|
||||||
@ -172,11 +173,14 @@ noinst_HEADERS = \
|
|||||||
$(libeek_xkl_private_headers)
|
$(libeek_xkl_private_headers)
|
||||||
|
|
||||||
eek-special-keysym-entries.h: special-keysym-entries.txt
|
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
|
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
|
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
|
eek-enumtypes.h: $(libeek_public_headers) eek-enumtypes.h.template
|
||||||
$(AM_V_GEN) $(GLIB_MKENUMS) --template eek-enumtypes.h.template \
|
$(AM_V_GEN) $(GLIB_MKENUMS) --template eek-enumtypes.h.template \
|
||||||
|
|||||||
@ -23,8 +23,8 @@ includedir=@includedir@
|
|||||||
|
|
||||||
Name: EEK
|
Name: EEK
|
||||||
Description: A Library to Create Keyboard-like UI
|
Description: A Library to Create Keyboard-like UI
|
||||||
URL: http://ueno.github.com/eekboard/
|
URL: http://fedorahosted.org/eekboard/
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Requires: gobject-2.0
|
Requires: gobject-2.0 gio-2.0
|
||||||
Libs: -L${libdir} -leek
|
Libs: -L${libdir} -leek
|
||||||
Cflags: -I${includedir}/eek-@EEK_API_VERSION@
|
Cflags: -I${includedir}/eek-@EEK_API_VERSION@
|
||||||
|
|||||||
@ -23,7 +23,7 @@ includedir=@includedir@
|
|||||||
|
|
||||||
Name: libeek-clutter
|
Name: libeek-clutter
|
||||||
Description: A Library to Create Keyboard-like UI (Clutter Support)
|
Description: A Library to Create Keyboard-like UI (Clutter Support)
|
||||||
URL: http://ueno.github.com/eekboard/
|
URL: http://fedorahosted.org/eekboard/
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Requires: eek-@EEK_API_VERSION@ clutter-1.0
|
Requires: eek-@EEK_API_VERSION@ clutter-1.0
|
||||||
Libs: -L${libdir} -leek-clutter
|
Libs: -L${libdir} -leek-clutter
|
||||||
|
|||||||
@ -17,6 +17,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
* 02110-1301 USA
|
* 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
|
#ifndef EEK_CLUTTER_KEYBOARD_H
|
||||||
#define EEK_CLUTTER_KEYBOARD_H 1
|
#define EEK_CLUTTER_KEYBOARD_H 1
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,8 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (EekContainer, eek_container, EEK_TYPE_ELEMENT,
|
|||||||
|
|
||||||
struct _EekContainerPrivate
|
struct _EekContainerPrivate
|
||||||
{
|
{
|
||||||
GSList *children;
|
GList *head;
|
||||||
|
GList *last;
|
||||||
};
|
};
|
||||||
|
|
||||||
static EekSerializableIface *eek_container_parent_serializable_iface;
|
static EekSerializableIface *eek_container_parent_serializable_iface;
|
||||||
@ -63,13 +64,13 @@ eek_container_real_serialize (EekSerializable *self,
|
|||||||
GVariantBuilder *builder)
|
GVariantBuilder *builder)
|
||||||
{
|
{
|
||||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
|
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
|
||||||
GSList *head;
|
GList *head;
|
||||||
GVariantBuilder array;
|
GVariantBuilder array;
|
||||||
|
|
||||||
eek_container_parent_serializable_iface->serialize (self, builder);
|
eek_container_parent_serializable_iface->serialize (self, builder);
|
||||||
|
|
||||||
g_variant_builder_init (&array, G_VARIANT_TYPE("av"));
|
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 =
|
GVariant *variant =
|
||||||
eek_serializable_serialize (EEK_SERIALIZABLE(head->data));
|
eek_serializable_serialize (EEK_SERIALIZABLE(head->data));
|
||||||
g_variant_builder_add (&array, "v", variant);
|
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_return_if_fail (EEK_IS_ELEMENT(child));
|
||||||
g_object_ref (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));
|
eek_element_set_parent (child, EEK_ELEMENT(self));
|
||||||
g_signal_emit_by_name (self, "child-added", child);
|
g_signal_emit_by_name (self, "child-added", child);
|
||||||
}
|
}
|
||||||
@ -129,13 +135,15 @@ eek_container_real_remove_child (EekContainer *self,
|
|||||||
EekElement *child)
|
EekElement *child)
|
||||||
{
|
{
|
||||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
|
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
|
||||||
GSList *head;
|
GList *head;
|
||||||
|
|
||||||
g_return_if_fail (EEK_IS_ELEMENT(child));
|
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_return_if_fail (head);
|
||||||
g_object_unref (child);
|
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);
|
eek_element_set_parent (child, NULL);
|
||||||
g_signal_emit_by_name (self, "child-removed", child);
|
g_signal_emit_by_name (self, "child-removed", child);
|
||||||
}
|
}
|
||||||
@ -146,9 +154,9 @@ eek_container_real_foreach_child (EekContainer *self,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
|
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);
|
(*callback) (EEK_ELEMENT(head->data), user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,9 +166,9 @@ eek_container_real_find (EekContainer *self,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(self);
|
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)
|
if (head)
|
||||||
return head->data;
|
return head->data;
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -170,12 +178,12 @@ static void
|
|||||||
eek_container_dispose (GObject *object)
|
eek_container_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
EekContainerPrivate *priv = EEK_CONTAINER_GET_PRIVATE(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);
|
g_object_unref (head->data);
|
||||||
priv->children = g_slist_next (head);
|
priv->head = g_list_next (head);
|
||||||
g_slist_free1 (head);
|
g_list_free1 (head);
|
||||||
}
|
}
|
||||||
G_OBJECT_CLASS(eek_container_parent_class)->dispose (object);
|
G_OBJECT_CLASS(eek_container_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
@ -240,10 +248,7 @@ eek_container_class_init (EekContainerClass *klass)
|
|||||||
static void
|
static void
|
||||||
eek_container_init (EekContainer *self)
|
eek_container_init (EekContainer *self)
|
||||||
{
|
{
|
||||||
EekContainerPrivate *priv;
|
self->priv = EEK_CONTAINER_GET_PRIVATE(self);
|
||||||
|
|
||||||
priv = self->priv = EEK_CONTAINER_GET_PRIVATE(self);
|
|
||||||
priv->children = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -17,6 +17,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
* 02110-1301 USA
|
* 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
|
#ifndef EEK_CONTAINER_H
|
||||||
#define EEK_CONTAINER_H 1
|
#define EEK_CONTAINER_H 1
|
||||||
|
|
||||||
|
|||||||
@ -404,8 +404,6 @@ eek_element_init (EekElement *self)
|
|||||||
EekElementPrivate *priv;
|
EekElementPrivate *priv;
|
||||||
|
|
||||||
priv = self->priv = EEK_ELEMENT_GET_PRIVATE(self);
|
priv = self->priv = EEK_ELEMENT_GET_PRIVATE(self);
|
||||||
priv->name = NULL;
|
|
||||||
memset (&priv->bounds, 0, sizeof priv->bounds);
|
|
||||||
priv->group = -1;
|
priv->group = -1;
|
||||||
priv->level = -1;
|
priv->level = -1;
|
||||||
}
|
}
|
||||||
@ -489,7 +487,7 @@ eek_element_set_bounds (EekElement *element,
|
|||||||
/**
|
/**
|
||||||
* eek_element_get_bounds:
|
* eek_element_get_bounds:
|
||||||
* @element: an #EekElement
|
* @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
|
* Get the bounding box of @element. Note that if @element has
|
||||||
* parent, position of @bounds are relative to the parent. To obtain
|
* parent, position of @bounds are relative to the parent. To obtain
|
||||||
|
|||||||
@ -17,6 +17,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
* 02110-1301 USA
|
* 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
|
#ifndef EEK_ELEMENT_H
|
||||||
#define EEK_ELEMENT_H 1
|
#define EEK_ELEMENT_H 1
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
/*** BEGIN file-header ***/
|
/*** 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__
|
#ifndef __EEK_ENUMTYPES_H__
|
||||||
#define __EEK_ENUMTYPES_H__
|
#define __EEK_ENUMTYPES_H__
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ includedir=@includedir@
|
|||||||
|
|
||||||
Name: libeek-gtk
|
Name: libeek-gtk
|
||||||
Description: A Library to Create Keyboard-like UI (GTK Support)
|
Description: A Library to Create Keyboard-like UI (GTK Support)
|
||||||
URL: http://ueno.github.com/eekboard/
|
URL: http://fedorahosted.org/eekboard/
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Requires: eek-@EEK_API_VERSION@ gtk+-@GTK_API_VERSION@
|
Requires: eek-@EEK_API_VERSION@ gtk+-@GTK_API_VERSION@
|
||||||
Libs: -L${libdir} -leek-gtk
|
Libs: -L${libdir} -leek-gtk
|
||||||
|
|||||||
@ -27,6 +27,10 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif /* HAVE_CONFIG_H */
|
#endif /* HAVE_CONFIG_H */
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBCANBERRA
|
||||||
|
#include <canberra-gtk.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "eek-gtk-keyboard.h"
|
#include "eek-gtk-keyboard.h"
|
||||||
@ -57,9 +61,11 @@ struct _EekGtkKeyboardPrivate
|
|||||||
{
|
{
|
||||||
EekRenderer *renderer;
|
EekRenderer *renderer;
|
||||||
EekKeyboard *keyboard;
|
EekKeyboard *keyboard;
|
||||||
EekKey *dragged_key;
|
|
||||||
gulong key_pressed_handler;
|
gulong key_pressed_handler;
|
||||||
gulong key_released_handler;
|
gulong key_released_handler;
|
||||||
|
gulong key_locked_handler;
|
||||||
|
gulong key_unlocked_handler;
|
||||||
|
gulong key_cancelled_handler;
|
||||||
gulong symbol_index_changed_handler;
|
gulong symbol_index_changed_handler;
|
||||||
EekTheme *theme;
|
EekTheme *theme;
|
||||||
};
|
};
|
||||||
@ -71,12 +77,25 @@ static void on_key_pressed (EekKeyboard *keyboard,
|
|||||||
static void on_key_released (EekKeyboard *keyboard,
|
static void on_key_released (EekKeyboard *keyboard,
|
||||||
EekKey *key,
|
EekKey *key,
|
||||||
gpointer user_data);
|
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,
|
static void on_symbol_index_changed (EekKeyboard *keyboard,
|
||||||
gint group,
|
gint group,
|
||||||
gint level,
|
gint level,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
static void render_pressed_key (GtkWidget *widget,
|
static void render_pressed_key (GtkWidget *widget,
|
||||||
EekKey *key);
|
EekKey *key);
|
||||||
|
static void render_locked_key (GtkWidget *widget,
|
||||||
|
EekKey *key);
|
||||||
|
static void render_released_key (GtkWidget *widget,
|
||||||
|
EekKey *key);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eek_gtk_keyboard_real_realize (GtkWidget *self)
|
eek_gtk_keyboard_real_realize (GtkWidget *self)
|
||||||
@ -87,7 +106,8 @@ eek_gtk_keyboard_real_realize (GtkWidget *self)
|
|||||||
GDK_KEY_PRESS_MASK |
|
GDK_KEY_PRESS_MASK |
|
||||||
GDK_KEY_RELEASE_MASK |
|
GDK_KEY_RELEASE_MASK |
|
||||||
GDK_BUTTON_PRESS_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);
|
GTK_WIDGET_CLASS (eek_gtk_keyboard_parent_class)->realize (self);
|
||||||
}
|
}
|
||||||
@ -99,6 +119,7 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
|
|||||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||||
GtkAllocation allocation;
|
GtkAllocation allocation;
|
||||||
EekColor background;
|
EekColor background;
|
||||||
|
GList *head;
|
||||||
|
|
||||||
gtk_widget_get_allocation (self, &allocation);
|
gtk_widget_get_allocation (self, &allocation);
|
||||||
|
|
||||||
@ -142,9 +163,17 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
|
|||||||
|
|
||||||
eek_renderer_render_keyboard (priv->renderer, cr);
|
eek_renderer_render_keyboard (priv->renderer, cr);
|
||||||
|
|
||||||
/* redraw dragged key */
|
/* redraw pressed key */
|
||||||
if (priv->dragged_key)
|
head = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||||
render_pressed_key (self, priv->dragged_key);
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -190,14 +219,8 @@ eek_gtk_keyboard_real_button_press_event (GtkWidget *self,
|
|||||||
key = eek_renderer_find_key_by_position (priv->renderer,
|
key = eek_renderer_find_key_by_position (priv->renderer,
|
||||||
(gdouble)event->x,
|
(gdouble)event->x,
|
||||||
(gdouble)event->y);
|
(gdouble)event->y);
|
||||||
|
if (key)
|
||||||
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;
|
|
||||||
g_signal_emit_by_name (key, "pressed", priv->keyboard);
|
g_signal_emit_by_name (key, "pressed", priv->keyboard);
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,13 +229,55 @@ eek_gtk_keyboard_real_button_release_event (GtkWidget *self,
|
|||||||
GdkEventButton *event)
|
GdkEventButton *event)
|
||||||
{
|
{
|
||||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||||
|
GList *head;
|
||||||
|
|
||||||
if (priv->dragged_key) {
|
head = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||||
g_signal_emit_by_name (priv->dragged_key, "released", priv->keyboard);
|
for (; head; head = g_list_next (head)) {
|
||||||
priv->dragged_key = NULL;
|
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
|
static void
|
||||||
@ -228,6 +293,15 @@ eek_gtk_keyboard_set_keyboard (EekGtkKeyboard *self,
|
|||||||
priv->key_released_handler =
|
priv->key_released_handler =
|
||||||
g_signal_connect (priv->keyboard, "key-released",
|
g_signal_connect (priv->keyboard, "key-released",
|
||||||
G_CALLBACK(on_key_released), self);
|
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 =
|
priv->symbol_index_changed_handler =
|
||||||
g_signal_connect (priv->keyboard, "symbol-index-changed",
|
g_signal_connect (priv->keyboard, "symbol-index-changed",
|
||||||
G_CALLBACK(on_symbol_index_changed), self);
|
G_CALLBACK(on_symbol_index_changed), self);
|
||||||
@ -273,16 +347,28 @@ eek_gtk_keyboard_dispose (GObject *object)
|
|||||||
priv->key_released_handler))
|
priv->key_released_handler))
|
||||||
g_signal_handler_disconnect (priv->keyboard,
|
g_signal_handler_disconnect (priv->keyboard,
|
||||||
priv->key_released_handler);
|
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,
|
if (g_signal_handler_is_connected (priv->keyboard,
|
||||||
priv->symbol_index_changed_handler))
|
priv->symbol_index_changed_handler))
|
||||||
g_signal_handler_disconnect (priv->keyboard,
|
g_signal_handler_disconnect (priv->keyboard,
|
||||||
priv->symbol_index_changed_handler);
|
priv->symbol_index_changed_handler);
|
||||||
|
|
||||||
if (priv->dragged_key) {
|
GList *head;
|
||||||
g_signal_emit_by_name (priv->dragged_key,
|
|
||||||
"released",
|
head = eek_keyboard_get_pressed_keys (priv->keyboard);
|
||||||
priv->keyboard);
|
for (; head; head = g_list_next (head)) {
|
||||||
priv->dragged_key = NULL;
|
g_signal_emit_by_name (head->data, "released", priv->keyboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_unref (priv->keyboard);
|
g_object_unref (priv->keyboard);
|
||||||
@ -308,6 +394,7 @@ eek_gtk_keyboard_class_init (EekGtkKeyboardClass *klass)
|
|||||||
sizeof (EekGtkKeyboardPrivate));
|
sizeof (EekGtkKeyboardPrivate));
|
||||||
|
|
||||||
widget_class->realize = eek_gtk_keyboard_real_realize;
|
widget_class->realize = eek_gtk_keyboard_real_realize;
|
||||||
|
widget_class->unmap = eek_gtk_keyboard_real_unmap;
|
||||||
#if GTK_CHECK_VERSION (2, 91, 2)
|
#if GTK_CHECK_VERSION (2, 91, 2)
|
||||||
widget_class->draw = eek_gtk_keyboard_real_draw;
|
widget_class->draw = eek_gtk_keyboard_real_draw;
|
||||||
#else /* GTK_CHECK_VERSION (2, 91, 2) */
|
#else /* GTK_CHECK_VERSION (2, 91, 2) */
|
||||||
@ -318,6 +405,8 @@ eek_gtk_keyboard_class_init (EekGtkKeyboardClass *klass)
|
|||||||
eek_gtk_keyboard_real_button_press_event;
|
eek_gtk_keyboard_real_button_press_event;
|
||||||
widget_class->button_release_event =
|
widget_class->button_release_event =
|
||||||
eek_gtk_keyboard_real_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->set_property = eek_gtk_keyboard_set_property;
|
||||||
gobject_class->dispose = eek_gtk_keyboard_dispose;
|
gobject_class->dispose = eek_gtk_keyboard_dispose;
|
||||||
@ -335,12 +424,7 @@ eek_gtk_keyboard_class_init (EekGtkKeyboardClass *klass)
|
|||||||
static void
|
static void
|
||||||
eek_gtk_keyboard_init (EekGtkKeyboard *self)
|
eek_gtk_keyboard_init (EekGtkKeyboard *self)
|
||||||
{
|
{
|
||||||
EekGtkKeyboardPrivate *priv;
|
self->priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
||||||
|
|
||||||
priv = self->priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
|
|
||||||
priv->renderer = NULL;
|
|
||||||
priv->keyboard = NULL;
|
|
||||||
priv->dragged_key = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -366,15 +450,26 @@ color_from_gdk_color (GdkColor *gdk_color)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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);
|
g_assert (scale >= 1.0);
|
||||||
|
|
||||||
|
gtk_widget_get_allocation (self, &allocation);
|
||||||
|
|
||||||
large_bounds->width = bounds->width * scale;
|
large_bounds->width = bounds->width * scale;
|
||||||
large_bounds->height = bounds->height * scale;
|
large_bounds->height = bounds->height * scale;
|
||||||
|
|
||||||
large_bounds->x = bounds->x - (large_bounds->width - bounds->width) / 2;
|
x = bounds->x - (large_bounds->width - bounds->width) / 2;
|
||||||
large_bounds->y = bounds->y - (large_bounds->height - bounds->height) / 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
|
static void
|
||||||
@ -388,10 +483,63 @@ render_pressed_key (GtkWidget *widget,
|
|||||||
cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (widget)));
|
cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (widget)));
|
||||||
|
|
||||||
eek_renderer_get_key_bounds (priv->renderer, key, &bounds, TRUE);
|
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);
|
cairo_translate (cr, large_bounds.x, large_bounds.y);
|
||||||
eek_renderer_render_key (priv->renderer, cr, key, 1.5, TRUE);
|
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);
|
cairo_destroy (cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,6 +556,14 @@ on_key_pressed (EekKeyboard *keyboard,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
render_pressed_key (widget, key);
|
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
|
static void
|
||||||
@ -417,26 +573,65 @@ on_key_released (EekKeyboard *keyboard,
|
|||||||
{
|
{
|
||||||
GtkWidget *widget = user_data;
|
GtkWidget *widget = user_data;
|
||||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(widget);
|
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 */
|
/* renderer may have not been set yet if the widget is a popup */
|
||||||
if (!priv->renderer)
|
if (!priv->renderer)
|
||||||
return;
|
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);
|
#if HAVE_LIBCANBERRA
|
||||||
magnify_bounds (&bounds, &large_bounds, 2.0);
|
ca_gtk_play_for_widget (widget, 0,
|
||||||
cairo_rectangle (cr,
|
CA_PROP_EVENT_ID, "button-released",
|
||||||
large_bounds.x,
|
CA_PROP_EVENT_DESCRIPTION, "virtual key pressed",
|
||||||
large_bounds.y,
|
CA_PROP_APPLICATION_ID, "org.fedorahosted.Eekboard",
|
||||||
large_bounds.width,
|
NULL);
|
||||||
large_bounds.height);
|
#endif
|
||||||
cairo_clip (cr);
|
}
|
||||||
eek_renderer_render_keyboard (priv->renderer, cr);
|
|
||||||
cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
|
static void
|
||||||
cairo_destroy (cr);
|
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
|
static void
|
||||||
|
|||||||
@ -17,6 +17,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
* 02110-1301 USA
|
* 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
|
#ifndef EEK_GTK_KEYBOARD_H
|
||||||
#define EEK_GTK_KEYBOARD_H 1
|
#define EEK_GTK_KEYBOARD_H 1
|
||||||
|
|
||||||
|
|||||||
@ -51,58 +51,27 @@ pixbuf_to_cairo_surface (GdkPixbuf *pixbuf)
|
|||||||
return surface;
|
return surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static cairo_surface_t *
|
||||||
eek_gtk_renderer_real_render_key_icon (EekRenderer *self,
|
eek_gtk_renderer_real_get_icon_surface (EekRenderer *self,
|
||||||
cairo_t *cr,
|
const gchar *icon_name,
|
||||||
EekKey *key,
|
gint size)
|
||||||
gdouble scale,
|
|
||||||
gboolean rotate)
|
|
||||||
{
|
{
|
||||||
EekBounds bounds;
|
|
||||||
EekSymbol *symbol;
|
|
||||||
const gchar *icon_name;
|
|
||||||
GdkPixbuf *pixbuf;
|
GdkPixbuf *pixbuf;
|
||||||
cairo_surface_t *surface;
|
|
||||||
GError *error;
|
GError *error;
|
||||||
gint width, height;
|
cairo_surface_t *surface;
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
error = NULL;
|
error = NULL;
|
||||||
pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
|
pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
|
||||||
icon_name,
|
icon_name,
|
||||||
MIN(bounds.width, bounds.height),
|
size,
|
||||||
0,
|
0,
|
||||||
&error);
|
&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);
|
surface = pixbuf_to_cairo_surface (pixbuf);
|
||||||
g_object_unref (pixbuf);
|
g_object_unref (pixbuf);
|
||||||
cairo_set_source_surface (cr, surface, 0.0, 0.0);
|
return surface;
|
||||||
cairo_paint (cr);
|
|
||||||
cairo_restore (cr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -110,7 +79,7 @@ eek_gtk_renderer_class_init (EekGtkRendererClass *klass)
|
|||||||
{
|
{
|
||||||
EekRendererClass *renderer_class = EEK_RENDERER_CLASS (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
|
static void
|
||||||
|
|||||||
224
eek/eek-key.c
224
eek/eek-key.c
@ -39,7 +39,6 @@
|
|||||||
#include "eek-section.h"
|
#include "eek-section.h"
|
||||||
#include "eek-keyboard.h"
|
#include "eek-keyboard.h"
|
||||||
#include "eek-symbol.h"
|
#include "eek-symbol.h"
|
||||||
#include "eek-serializable.h"
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PROP_0,
|
PROP_0,
|
||||||
@ -54,16 +53,15 @@ enum {
|
|||||||
enum {
|
enum {
|
||||||
PRESSED,
|
PRESSED,
|
||||||
RELEASED,
|
RELEASED,
|
||||||
|
LOCKED,
|
||||||
|
UNLOCKED,
|
||||||
|
CANCELLED,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
static guint signals[LAST_SIGNAL] = { 0, };
|
static guint signals[LAST_SIGNAL] = { 0, };
|
||||||
|
|
||||||
static void eek_serializable_iface_init (EekSerializableIface *iface);
|
G_DEFINE_TYPE (EekKey, eek_key, EEK_TYPE_ELEMENT);
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (EekKey, eek_key, EEK_TYPE_ELEMENT,
|
|
||||||
G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
|
|
||||||
eek_serializable_iface_init));
|
|
||||||
|
|
||||||
#define EEK_KEY_GET_PRIVATE(obj) \
|
#define EEK_KEY_GET_PRIVATE(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_KEY, EekKeyPrivate))
|
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_KEY, EekKeyPrivate))
|
||||||
@ -77,106 +75,9 @@ struct _EekKeyPrivate
|
|||||||
gint row;
|
gint row;
|
||||||
gulong oref;
|
gulong oref;
|
||||||
gboolean is_pressed;
|
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);
|
|
||||||
eek_symbol_matrix_free (priv->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
|
static void
|
||||||
eek_key_real_set_keycode (EekKey *self, guint keycode)
|
eek_key_real_set_keycode (EekKey *self, guint keycode)
|
||||||
{
|
{
|
||||||
@ -254,6 +155,13 @@ eek_key_real_is_pressed (EekKey *self)
|
|||||||
return priv->is_pressed;
|
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
|
static void
|
||||||
eek_key_real_pressed (EekKey *self)
|
eek_key_real_pressed (EekKey *self)
|
||||||
{
|
{
|
||||||
@ -276,6 +184,39 @@ eek_key_real_released (EekKey *self)
|
|||||||
#endif
|
#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
|
static void
|
||||||
eek_key_finalize (GObject *object)
|
eek_key_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
@ -374,6 +315,7 @@ eek_key_class_init (EekKeyClass *klass)
|
|||||||
klass->set_oref = eek_key_real_set_oref;
|
klass->set_oref = eek_key_real_set_oref;
|
||||||
klass->get_oref = eek_key_real_get_oref;
|
klass->get_oref = eek_key_real_get_oref;
|
||||||
klass->is_pressed = eek_key_real_is_pressed;
|
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->set_property = eek_key_set_property;
|
||||||
gobject_class->get_property = eek_key_get_property;
|
gobject_class->get_property = eek_key_get_property;
|
||||||
@ -382,6 +324,9 @@ eek_key_class_init (EekKeyClass *klass)
|
|||||||
/* signals */
|
/* signals */
|
||||||
klass->pressed = eek_key_real_pressed;
|
klass->pressed = eek_key_real_pressed;
|
||||||
klass->released = eek_key_real_released;
|
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:
|
* EekKey:keycode:
|
||||||
@ -478,6 +423,59 @@ eek_key_class_init (EekKeyClass *klass)
|
|||||||
NULL,
|
NULL,
|
||||||
g_cclosure_marshal_VOID__VOID,
|
g_cclosure_marshal_VOID__VOID,
|
||||||
G_TYPE_NONE, 0);
|
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
|
static void
|
||||||
@ -486,10 +484,7 @@ eek_key_init (EekKey *self)
|
|||||||
EekKeyPrivate *priv;
|
EekKeyPrivate *priv;
|
||||||
|
|
||||||
priv = self->priv = EEK_KEY_GET_PRIVATE(self);
|
priv = self->priv = EEK_KEY_GET_PRIVATE(self);
|
||||||
priv->keycode = 0;
|
|
||||||
priv->symbol_matrix = eek_symbol_matrix_new (0, 0);
|
priv->symbol_matrix = eek_symbol_matrix_new (0, 0);
|
||||||
priv->column = priv->row = 0;
|
|
||||||
priv->oref = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -545,7 +540,7 @@ eek_key_set_symbol_matrix (EekKey *key,
|
|||||||
* @key: an #EekKey
|
* @key: an #EekKey
|
||||||
*
|
*
|
||||||
* Get the symbol matrix of @key.
|
* Get the symbol matrix of @key.
|
||||||
* Returns: #EekSymbolMatrix or %NULL
|
* Returns: (transfer none): #EekSymbolMatrix or %NULL
|
||||||
*/
|
*/
|
||||||
EekSymbolMatrix *
|
EekSymbolMatrix *
|
||||||
eek_key_get_symbol_matrix (EekKey *key)
|
eek_key_get_symbol_matrix (EekKey *key)
|
||||||
@ -749,3 +744,16 @@ eek_key_is_pressed (EekKey *key)
|
|||||||
g_assert (EEK_IS_KEY(key));
|
g_assert (EEK_IS_KEY(key));
|
||||||
return EEK_KEY_GET_CLASS(key)->is_pressed (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,6 +17,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
* 02110-1301 USA
|
* 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
|
#ifndef EEK_KEY_H
|
||||||
#define EEK_KEY_H 1
|
#define EEK_KEY_H 1
|
||||||
|
|
||||||
@ -35,6 +40,12 @@ G_BEGIN_DECLS
|
|||||||
typedef struct _EekKeyClass EekKeyClass;
|
typedef struct _EekKeyClass EekKeyClass;
|
||||||
typedef struct _EekKeyPrivate EekKeyPrivate;
|
typedef struct _EekKeyPrivate EekKeyPrivate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekKey:
|
||||||
|
*
|
||||||
|
* The #EekKey structure contains only private data and should only be
|
||||||
|
* accessed using the provided API.
|
||||||
|
*/
|
||||||
struct _EekKey
|
struct _EekKey
|
||||||
{
|
{
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
@ -57,7 +68,11 @@ struct _EekKey
|
|||||||
* @get_oref: virtual function for getting outline id of the key
|
* @get_oref: virtual function for getting outline id of the key
|
||||||
* @pressed: class handler for #EekKey::pressed signal
|
* @pressed: class handler for #EekKey::pressed signal
|
||||||
* @released: class handler for #EekKey::released 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_pressed: virtual function for getting whether the key is pressed
|
||||||
|
* @is_locked: virtual function for getting whether the key is locked
|
||||||
*/
|
*/
|
||||||
struct _EekKeyClass
|
struct _EekKeyClass
|
||||||
{
|
{
|
||||||
@ -85,13 +100,18 @@ struct _EekKeyClass
|
|||||||
|
|
||||||
gboolean (* is_pressed) (EekKey *self);
|
gboolean (* is_pressed) (EekKey *self);
|
||||||
|
|
||||||
/* signals */
|
|
||||||
void (* pressed) (EekKey *key);
|
void (* pressed) (EekKey *key);
|
||||||
void (* released) (EekKey *key);
|
void (* released) (EekKey *key);
|
||||||
|
|
||||||
|
gboolean (* is_locked) (EekKey *self);
|
||||||
|
|
||||||
|
void (* locked) (EekKey *key);
|
||||||
|
void (* unlocked) (EekKey *key);
|
||||||
|
void (* cancelled) (EekKey *key);
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
/* padding */
|
/* padding */
|
||||||
gpointer pdummy[24];
|
gpointer pdummy[20];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType eek_key_get_type (void) G_GNUC_CONST;
|
GType eek_key_get_type (void) G_GNUC_CONST;
|
||||||
@ -125,6 +145,7 @@ void eek_key_set_oref (EekKey *key,
|
|||||||
gulong eek_key_get_oref (EekKey *key);
|
gulong eek_key_get_oref (EekKey *key);
|
||||||
|
|
||||||
gboolean eek_key_is_pressed (EekKey *key);
|
gboolean eek_key_is_pressed (EekKey *key);
|
||||||
|
gboolean eek_key_is_locked (EekKey *key);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* EEK_KEY_H */
|
#endif /* EEK_KEY_H */
|
||||||
|
|||||||
@ -35,7 +35,6 @@
|
|||||||
#include "eek-section.h"
|
#include "eek-section.h"
|
||||||
#include "eek-key.h"
|
#include "eek-key.h"
|
||||||
#include "eek-symbol.h"
|
#include "eek-symbol.h"
|
||||||
#include "eek-serializable.h"
|
|
||||||
#include "eek-enumtypes.h"
|
#include "eek-enumtypes.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@ -48,26 +47,26 @@ enum {
|
|||||||
enum {
|
enum {
|
||||||
KEY_PRESSED,
|
KEY_PRESSED,
|
||||||
KEY_RELEASED,
|
KEY_RELEASED,
|
||||||
|
KEY_LOCKED,
|
||||||
|
KEY_UNLOCKED,
|
||||||
|
KEY_CANCELLED,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
static guint signals[LAST_SIGNAL] = { 0, };
|
static guint signals[LAST_SIGNAL] = { 0, };
|
||||||
|
|
||||||
static void eek_serializable_iface_init (EekSerializableIface *iface);
|
G_DEFINE_TYPE (EekKeyboard, eek_keyboard, EEK_TYPE_CONTAINER);
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (EekKeyboard, eek_keyboard, EEK_TYPE_CONTAINER,
|
|
||||||
G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
|
|
||||||
eek_serializable_iface_init));
|
|
||||||
|
|
||||||
#define EEK_KEYBOARD_GET_PRIVATE(obj) \
|
#define EEK_KEYBOARD_GET_PRIVATE(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_KEYBOARD, EekKeyboardPrivate))
|
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_KEYBOARD, EekKeyboardPrivate))
|
||||||
|
|
||||||
|
|
||||||
struct _EekKeyboardPrivate
|
struct _EekKeyboardPrivate
|
||||||
{
|
{
|
||||||
EekLayout *layout;
|
EekLayout *layout;
|
||||||
EekModifierBehavior modifier_behavior;
|
EekModifierBehavior modifier_behavior;
|
||||||
EekModifierType modifiers;
|
EekModifierType modifiers;
|
||||||
|
GList *pressed_keys;
|
||||||
|
GList *locked_keys;
|
||||||
GArray *outline_array;
|
GArray *outline_array;
|
||||||
|
|
||||||
/* modifiers dynamically assigned at run time */
|
/* modifiers dynamically assigned at run time */
|
||||||
@ -75,120 +74,6 @@ struct _EekKeyboardPrivate
|
|||||||
EekModifierType alt_gr_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);
|
|
||||||
g_variant_builder_add (builder, "u", priv->alt_gr_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);
|
|
||||||
/* don't use eek_outline_free here, so as to keep _outline->points */
|
|
||||||
g_slice_free (EekOutline, _outline);
|
|
||||||
}
|
|
||||||
g_variant_get_child (variant, index++, "u", &priv->num_lock_mask);
|
|
||||||
g_variant_get_child (variant, index++, "u", &priv->alt_gr_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
|
static void
|
||||||
on_key_pressed (EekSection *section,
|
on_key_pressed (EekSection *section,
|
||||||
EekKey *key,
|
EekKey *key,
|
||||||
@ -205,6 +90,30 @@ on_key_released (EekSection *section,
|
|||||||
g_signal_emit_by_name (keyboard, "key-released", key);
|
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
|
static void
|
||||||
on_symbol_index_changed (EekSection *section,
|
on_symbol_index_changed (EekSection *section,
|
||||||
gint group,
|
gint group,
|
||||||
@ -322,6 +231,45 @@ set_level_from_modifiers (EekKeyboard *self)
|
|||||||
eek_element_set_level (EEK_ELEMENT(self), level);
|
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
|
static void
|
||||||
eek_keyboard_real_key_pressed (EekKeyboard *self,
|
eek_keyboard_real_key_pressed (EekKeyboard *self,
|
||||||
EekKey *key)
|
EekKey *key)
|
||||||
@ -330,13 +278,15 @@ eek_keyboard_real_key_pressed (EekKeyboard *self,
|
|||||||
EekSymbol *symbol;
|
EekSymbol *symbol;
|
||||||
EekModifierType modifier;
|
EekModifierType modifier;
|
||||||
|
|
||||||
|
priv->pressed_keys = g_list_prepend (priv->pressed_keys, key);
|
||||||
|
|
||||||
symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
||||||
if (!symbol)
|
if (!symbol)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
modifier = eek_symbol_get_modifier_mask (symbol);
|
modifier = eek_symbol_get_modifier_mask (symbol);
|
||||||
if (priv->modifier_behavior == EEK_MODIFIER_BEHAVIOR_NONE) {
|
if (priv->modifier_behavior == EEK_MODIFIER_BEHAVIOR_NONE) {
|
||||||
priv->modifiers |= modifier;
|
set_modifiers_with_key (self, key, priv->modifiers | modifier);
|
||||||
set_level_from_modifiers (self);
|
set_level_from_modifiers (self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -349,6 +299,8 @@ eek_keyboard_real_key_released (EekKeyboard *self,
|
|||||||
EekSymbol *symbol;
|
EekSymbol *symbol;
|
||||||
EekModifierType modifier;
|
EekModifierType modifier;
|
||||||
|
|
||||||
|
EEK_KEYBOARD_GET_CLASS (self)->key_cancelled (self, key);
|
||||||
|
|
||||||
symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
||||||
if (!symbol)
|
if (!symbol)
|
||||||
return;
|
return;
|
||||||
@ -356,21 +308,42 @@ eek_keyboard_real_key_released (EekKeyboard *self,
|
|||||||
modifier = eek_symbol_get_modifier_mask (symbol);
|
modifier = eek_symbol_get_modifier_mask (symbol);
|
||||||
switch (priv->modifier_behavior) {
|
switch (priv->modifier_behavior) {
|
||||||
case EEK_MODIFIER_BEHAVIOR_NONE:
|
case EEK_MODIFIER_BEHAVIOR_NONE:
|
||||||
priv->modifiers &= ~modifier;
|
set_modifiers_with_key (self, key, priv->modifiers & ~modifier);
|
||||||
break;
|
break;
|
||||||
case EEK_MODIFIER_BEHAVIOR_LOCK:
|
case EEK_MODIFIER_BEHAVIOR_LOCK:
|
||||||
priv->modifiers ^= modifier;
|
priv->modifiers ^= modifier;
|
||||||
break;
|
break;
|
||||||
case EEK_MODIFIER_BEHAVIOR_LATCH:
|
case EEK_MODIFIER_BEHAVIOR_LATCH:
|
||||||
if (modifier == priv->alt_gr_mask || modifier == EEK_SHIFT_MASK)
|
if (modifier)
|
||||||
priv->modifiers ^= modifier;
|
set_modifiers_with_key (self, key, priv->modifiers ^ modifier);
|
||||||
else
|
else
|
||||||
priv->modifiers = (priv->modifiers ^ modifier) & modifier;
|
set_modifiers_with_key (self, key,
|
||||||
|
(priv->modifiers ^ modifier) & modifier);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
set_level_from_modifiers (self);
|
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
|
static void
|
||||||
eek_keyboard_dispose (GObject *object)
|
eek_keyboard_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
@ -390,6 +363,9 @@ eek_keyboard_finalize (GObject *object)
|
|||||||
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(object);
|
EekKeyboardPrivate *priv = EEK_KEYBOARD_GET_PRIVATE(object);
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
|
g_list_free (priv->pressed_keys);
|
||||||
|
g_list_free (priv->locked_keys);
|
||||||
|
|
||||||
for (i = 0; i < priv->outline_array->len; i++) {
|
for (i = 0; i < priv->outline_array->len; i++) {
|
||||||
EekOutline *outline = &g_array_index (priv->outline_array,
|
EekOutline *outline = &g_array_index (priv->outline_array,
|
||||||
EekOutline,
|
EekOutline,
|
||||||
@ -410,6 +386,12 @@ eek_keyboard_real_child_added (EekContainer *self,
|
|||||||
G_CALLBACK(on_key_pressed), self);
|
G_CALLBACK(on_key_pressed), self);
|
||||||
g_signal_connect (element, "key-released",
|
g_signal_connect (element, "key-released",
|
||||||
G_CALLBACK(on_key_released), self);
|
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_signal_connect (element, "symbol-index-changed",
|
||||||
G_CALLBACK(on_symbol_index_changed), self);
|
G_CALLBACK(on_symbol_index_changed), self);
|
||||||
}
|
}
|
||||||
@ -420,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_pressed, self);
|
||||||
g_signal_handlers_disconnect_by_func (element, on_key_released, 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
|
static void
|
||||||
@ -438,6 +423,7 @@ eek_keyboard_class_init (EekKeyboardClass *klass)
|
|||||||
/* signals */
|
/* signals */
|
||||||
klass->key_pressed = eek_keyboard_real_key_pressed;
|
klass->key_pressed = eek_keyboard_real_key_pressed;
|
||||||
klass->key_released = eek_keyboard_real_key_released;
|
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_added = eek_keyboard_real_child_added;
|
||||||
container_class->child_removed = eek_keyboard_real_child_removed;
|
container_class->child_removed = eek_keyboard_real_child_removed;
|
||||||
@ -515,6 +501,66 @@ eek_keyboard_class_init (EekKeyboardClass *klass)
|
|||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
1,
|
1,
|
||||||
EEK_TYPE_KEY);
|
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
|
static void
|
||||||
@ -523,11 +569,8 @@ eek_keyboard_init (EekKeyboard *self)
|
|||||||
EekKeyboardPrivate *priv;
|
EekKeyboardPrivate *priv;
|
||||||
|
|
||||||
priv = self->priv = EEK_KEYBOARD_GET_PRIVATE(self);
|
priv = self->priv = EEK_KEYBOARD_GET_PRIVATE(self);
|
||||||
priv->layout = NULL;
|
|
||||||
priv->modifier_behavior = EEK_MODIFIER_BEHAVIOR_NONE;
|
priv->modifier_behavior = EEK_MODIFIER_BEHAVIOR_NONE;
|
||||||
priv->modifiers = 0;
|
|
||||||
priv->outline_array = g_array_new (FALSE, TRUE, sizeof (EekOutline));
|
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);
|
eek_element_set_symbol_index (EEK_ELEMENT(self), 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -748,6 +791,19 @@ eek_keyboard_get_modifier_behavior (EekKeyboard *keyboard)
|
|||||||
return priv->modifier_behavior;
|
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:
|
* eek_keyboard_get_modifiers:
|
||||||
* @keyboard: an #EekKeyboard
|
* @keyboard: an #EekKeyboard
|
||||||
@ -887,3 +943,41 @@ eek_keyboard_get_alt_gr_mask (EekKeyboard *keyboard)
|
|||||||
|
|
||||||
return priv->alt_gr_mask;
|
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
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
* 02110-1301 USA
|
* 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
|
#ifndef EEK_KEYBOARD_H
|
||||||
#define EEK_KEYBOARD_H 1
|
#define EEK_KEYBOARD_H 1
|
||||||
|
|
||||||
@ -58,6 +63,9 @@ struct _EekKeyboard
|
|||||||
* keyboard by keycode
|
* keyboard by keycode
|
||||||
* @key_pressed: class handler for #EekKeyboard::key-pressed signal
|
* @key_pressed: class handler for #EekKeyboard::key-pressed signal
|
||||||
* @key_released: class handler for #EekKeyboard::key-released 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
|
struct _EekKeyboardClass
|
||||||
{
|
{
|
||||||
@ -84,10 +92,35 @@ struct _EekKeyboardClass
|
|||||||
/* obsolete members moved to EekElement */
|
/* obsolete members moved to EekElement */
|
||||||
gpointer symbol_index_changed;
|
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 */
|
/* 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
|
GType eek_keyboard_get_type
|
||||||
(void) G_GNUC_CONST;
|
(void) G_GNUC_CONST;
|
||||||
|
|
||||||
@ -130,6 +163,9 @@ void eek_keyboard_set_modifier_behavior
|
|||||||
EekModifierBehavior modifier_behavior);
|
EekModifierBehavior modifier_behavior);
|
||||||
EekModifierBehavior eek_keyboard_get_modifier_behavior
|
EekModifierBehavior eek_keyboard_get_modifier_behavior
|
||||||
(EekKeyboard *keyboard);
|
(EekKeyboard *keyboard);
|
||||||
|
void eek_keyboard_set_modifiers
|
||||||
|
(EekKeyboard *keyboard,
|
||||||
|
EekModifierType modifiers);
|
||||||
EekModifierType eek_keyboard_get_modifiers
|
EekModifierType eek_keyboard_get_modifiers
|
||||||
(EekKeyboard *keyboard);
|
(EekKeyboard *keyboard);
|
||||||
|
|
||||||
@ -160,5 +196,10 @@ void eek_keyboard_set_alt_gr_mask
|
|||||||
EekModifierType eek_keyboard_get_alt_gr_mask
|
EekModifierType eek_keyboard_get_alt_gr_mask
|
||||||
(EekKeyboard *keyboard);
|
(EekKeyboard *keyboard);
|
||||||
|
|
||||||
|
GList *eek_keyboard_get_pressed_keys
|
||||||
|
(EekKeyboard *keyboard);
|
||||||
|
GList *eek_keyboard_get_locked_keys
|
||||||
|
(EekKeyboard *keyboard);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* EEK_KEYBOARD_H */
|
#endif /* EEK_KEYBOARD_H */
|
||||||
|
|||||||
@ -208,10 +208,7 @@ eek_keysym_class_init (EekKeysymClass *klass)
|
|||||||
static void
|
static void
|
||||||
eek_keysym_init (EekKeysym *self)
|
eek_keysym_init (EekKeysym *self)
|
||||||
{
|
{
|
||||||
EekKeysymPrivate *priv;
|
self->priv = EEK_KEYSYM_GET_PRIVATE(self);
|
||||||
|
|
||||||
priv = self->priv = EEK_KEYSYM_GET_PRIVATE(self);
|
|
||||||
priv->xkeysym = EEK_INVALID_KEYSYM;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -17,6 +17,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
* 02110-1301 USA
|
* 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
|
#ifndef EEK_KEYSYM_H
|
||||||
#define EEK_KEYSYM_H 1
|
#define EEK_KEYSYM_H 1
|
||||||
|
|
||||||
@ -42,6 +47,12 @@ G_BEGIN_DECLS
|
|||||||
typedef struct _EekKeysymClass EekKeysymClass;
|
typedef struct _EekKeysymClass EekKeysymClass;
|
||||||
typedef struct _EekKeysymPrivate EekKeysymPrivate;
|
typedef struct _EekKeysymPrivate EekKeysymPrivate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekKeysym:
|
||||||
|
*
|
||||||
|
* The #EekKeysym structure contains only private data and should only
|
||||||
|
* be accessed using the provided API.
|
||||||
|
*/
|
||||||
struct _EekKeysym {
|
struct _EekKeysym {
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
EekSymbol parent;
|
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_from_name (const gchar *name);
|
||||||
EekKeysym *eek_keysym_new_with_modifier (guint xkeysym,
|
EekKeysym *eek_keysym_new_with_modifier (guint xkeysym,
|
||||||
EekModifierType modifier);
|
EekModifierType modifier_mask);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,10 @@
|
|||||||
* 02110-1301 USA
|
* 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
|
#ifndef EEK_LAYOUT_H
|
||||||
#define EEK_LAYOUT_H 1
|
#define EEK_LAYOUT_H 1
|
||||||
|
|
||||||
|
|||||||
@ -87,7 +87,8 @@ static void eek_renderer_real_render_key_label (EekRenderer *self,
|
|||||||
static void invalidate (EekRenderer *renderer);
|
static void invalidate (EekRenderer *renderer);
|
||||||
static void render_key (EekRenderer *self,
|
static void render_key (EekRenderer *self,
|
||||||
cairo_t *cr,
|
cairo_t *cr,
|
||||||
EekKey *key);
|
EekKey *key,
|
||||||
|
gboolean active);
|
||||||
static void on_symbol_index_changed (EekKeyboard *keyboard,
|
static void on_symbol_index_changed (EekKeyboard *keyboard,
|
||||||
gint group,
|
gint group,
|
||||||
gint level,
|
gint level,
|
||||||
@ -117,7 +118,7 @@ create_keyboard_surface_key_callback (EekElement *element,
|
|||||||
bounds.width * priv->scale,
|
bounds.width * priv->scale,
|
||||||
bounds.height * priv->scale);
|
bounds.height * priv->scale);
|
||||||
cairo_clip (data->cr);
|
cairo_clip (data->cr);
|
||||||
render_key (data->renderer, data->cr, EEK_KEY(element));
|
render_key (data->renderer, data->cr, EEK_KEY(element), FALSE);
|
||||||
|
|
||||||
cairo_restore (data->cr);
|
cairo_restore (data->cr);
|
||||||
}
|
}
|
||||||
@ -197,7 +198,8 @@ create_keyboard_surface (EekRenderer *renderer)
|
|||||||
static void
|
static void
|
||||||
render_key_outline (EekRenderer *renderer,
|
render_key_outline (EekRenderer *renderer,
|
||||||
cairo_t *cr,
|
cairo_t *cr,
|
||||||
EekKey *key)
|
EekKey *key,
|
||||||
|
gboolean active)
|
||||||
{
|
{
|
||||||
EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(renderer);
|
EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(renderer);
|
||||||
EekOutline *outline;
|
EekOutline *outline;
|
||||||
@ -215,10 +217,10 @@ render_key_outline (EekRenderer *renderer,
|
|||||||
if (oref == 0)
|
if (oref == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (eek_key_is_pressed (key))
|
theme_node = g_object_get_data (G_OBJECT(key),
|
||||||
theme_node = g_object_get_data (G_OBJECT(key), "theme-node-pressed");
|
active ?
|
||||||
else
|
"theme-node-pressed" :
|
||||||
theme_node = g_object_get_data (G_OBJECT(key), "theme-node");
|
"theme-node");
|
||||||
if (theme_node) {
|
if (theme_node) {
|
||||||
eek_theme_node_get_foreground_color (theme_node, &foreground);
|
eek_theme_node_get_foreground_color (theme_node, &foreground);
|
||||||
eek_theme_node_get_background_color (theme_node, &background);
|
eek_theme_node_get_background_color (theme_node, &background);
|
||||||
@ -428,7 +430,8 @@ calculate_font_size (EekRenderer *renderer,
|
|||||||
static void
|
static void
|
||||||
render_key (EekRenderer *self,
|
render_key (EekRenderer *self,
|
||||||
cairo_t *cr,
|
cairo_t *cr,
|
||||||
EekKey *key)
|
EekKey *key,
|
||||||
|
gboolean active)
|
||||||
{
|
{
|
||||||
EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(self);
|
EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(self);
|
||||||
EekOutline *outline;
|
EekOutline *outline;
|
||||||
@ -437,13 +440,20 @@ render_key (EekRenderer *self,
|
|||||||
gulong oref;
|
gulong oref;
|
||||||
EekSymbol *symbol;
|
EekSymbol *symbol;
|
||||||
GHashTable *outline_surface_cache;
|
GHashTable *outline_surface_cache;
|
||||||
|
PangoLayout *layout;
|
||||||
|
PangoRectangle extents = { 0, };
|
||||||
|
EekColor foreground;
|
||||||
|
|
||||||
|
/* render outline */
|
||||||
eek_element_get_bounds (EEK_ELEMENT(key), &bounds);
|
eek_element_get_bounds (EEK_ELEMENT(key), &bounds);
|
||||||
|
bounds.width *= priv->scale;
|
||||||
|
bounds.height *= priv->scale;
|
||||||
|
|
||||||
oref = eek_key_get_oref (key);
|
oref = eek_key_get_oref (key);
|
||||||
if (oref == 0)
|
if (oref == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (eek_key_is_pressed (key))
|
if (active)
|
||||||
outline_surface_cache = priv->active_outline_surface_cache;
|
outline_surface_cache = priv->active_outline_surface_cache;
|
||||||
else
|
else
|
||||||
outline_surface_cache = priv->outline_surface_cache;
|
outline_surface_cache = priv->outline_surface_cache;
|
||||||
@ -455,15 +465,19 @@ render_key (EekRenderer *self,
|
|||||||
|
|
||||||
outline_surface =
|
outline_surface =
|
||||||
cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||||
bounds.width * priv->scale,
|
bounds.width,
|
||||||
bounds.height * priv->scale);
|
bounds.height);
|
||||||
cr = cairo_create (outline_surface);
|
cr = cairo_create (outline_surface);
|
||||||
|
|
||||||
/* blank background */
|
/* blank background */
|
||||||
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0);
|
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0);
|
||||||
cairo_paint (cr);
|
cairo_paint (cr);
|
||||||
|
|
||||||
eek_renderer_render_key_outline (self, cr, key, 1.0, 0);
|
cairo_save (cr);
|
||||||
|
eek_renderer_apply_transformation_for_key (self, cr, key, 1.0, FALSE);
|
||||||
|
render_key_outline (self, cr, key, active);
|
||||||
|
cairo_restore (cr);
|
||||||
|
|
||||||
cairo_destroy (cr);
|
cairo_destroy (cr);
|
||||||
|
|
||||||
g_hash_table_insert (outline_surface_cache,
|
g_hash_table_insert (outline_surface_cache,
|
||||||
@ -474,15 +488,46 @@ render_key (EekRenderer *self,
|
|||||||
cairo_set_source_surface (cr, outline_surface, 0.0, 0.0);
|
cairo_set_source_surface (cr, outline_surface, 0.0, 0.0);
|
||||||
cairo_paint (cr);
|
cairo_paint (cr);
|
||||||
|
|
||||||
|
/* render icon (if any) */
|
||||||
symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
||||||
if (EEK_RENDERER_GET_CLASS(self)->render_key_icon &&
|
if (!symbol)
|
||||||
symbol && eek_symbol_get_icon_name (symbol)) {
|
return;
|
||||||
eek_renderer_render_key_icon (self, cr, key, 1.0, 0);
|
|
||||||
} else {
|
|
||||||
PangoLayout *layout;
|
|
||||||
PangoRectangle extents = { 0, };
|
|
||||||
EekColor foreground;
|
|
||||||
|
|
||||||
|
if (eek_symbol_get_icon_name (symbol)) {
|
||||||
|
cairo_surface_t *icon_surface =
|
||||||
|
eek_renderer_get_icon_surface (self,
|
||||||
|
eek_symbol_get_icon_name (symbol),
|
||||||
|
MIN(bounds.width, bounds.height));
|
||||||
|
if (icon_surface) {
|
||||||
|
gint width = cairo_image_surface_get_width (icon_surface);
|
||||||
|
gint height = cairo_image_surface_get_height (icon_surface);
|
||||||
|
gdouble scale;
|
||||||
|
|
||||||
|
if (height * bounds.width / width <= bounds.height)
|
||||||
|
scale = bounds.width / width;
|
||||||
|
else if (width * bounds.height / height <= bounds.width)
|
||||||
|
scale = bounds.height / height;
|
||||||
|
else {
|
||||||
|
if (width * bounds.height < height * bounds.width)
|
||||||
|
scale = width / bounds.width;
|
||||||
|
else
|
||||||
|
scale = height / bounds.height;
|
||||||
|
}
|
||||||
|
|
||||||
|
cairo_save (cr);
|
||||||
|
cairo_translate (cr,
|
||||||
|
(bounds.width - width * scale) / 2,
|
||||||
|
(bounds.height - height * scale) / 2);
|
||||||
|
cairo_rectangle (cr, 0, 0, width, height);
|
||||||
|
cairo_clip (cr);
|
||||||
|
cairo_set_source_surface (cr, icon_surface, 0.0, 0.0);
|
||||||
|
cairo_paint (cr);
|
||||||
|
cairo_restore (cr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* render label */
|
||||||
layout = pango_cairo_create_layout (cr);
|
layout = pango_cairo_create_layout (cr);
|
||||||
eek_renderer_render_key_label (self, layout, key);
|
eek_renderer_render_key_label (self, layout, key);
|
||||||
pango_layout_get_extents (layout, NULL, &extents);
|
pango_layout_get_extents (layout, NULL, &extents);
|
||||||
@ -490,8 +535,8 @@ render_key (EekRenderer *self,
|
|||||||
cairo_save (cr);
|
cairo_save (cr);
|
||||||
cairo_move_to
|
cairo_move_to
|
||||||
(cr,
|
(cr,
|
||||||
(bounds.width * priv->scale - extents.width / PANGO_SCALE) / 2,
|
(bounds.width - extents.width / PANGO_SCALE) / 2,
|
||||||
(bounds.height * priv->scale - extents.height / PANGO_SCALE) / 2);
|
(bounds.height - extents.height / PANGO_SCALE) / 2);
|
||||||
|
|
||||||
eek_renderer_get_foreground_color (self, EEK_ELEMENT(key), &foreground);
|
eek_renderer_get_foreground_color (self, EEK_ELEMENT(key), &foreground);
|
||||||
cairo_set_source_rgba (cr,
|
cairo_set_source_rgba (cr,
|
||||||
@ -503,7 +548,6 @@ render_key (EekRenderer *self,
|
|||||||
pango_cairo_show_layout (cr, layout);
|
pango_cairo_show_layout (cr, layout);
|
||||||
cairo_restore (cr);
|
cairo_restore (cr);
|
||||||
g_object_unref (layout);
|
g_object_unref (layout);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -625,7 +669,7 @@ eek_renderer_real_render_key_outline (EekRenderer *self,
|
|||||||
{
|
{
|
||||||
cairo_save (cr);
|
cairo_save (cr);
|
||||||
eek_renderer_apply_transformation_for_key (self, cr, key, scale, rotate);
|
eek_renderer_apply_transformation_for_key (self, cr, key, scale, rotate);
|
||||||
render_key_outline (self, cr, key);
|
render_key_outline (self, cr, key, eek_key_is_pressed (key) || eek_key_is_locked (key));
|
||||||
cairo_restore (cr);
|
cairo_restore (cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -638,7 +682,7 @@ eek_renderer_real_render_key (EekRenderer *self,
|
|||||||
{
|
{
|
||||||
cairo_save (cr);
|
cairo_save (cr);
|
||||||
eek_renderer_apply_transformation_for_key (self, cr, key, scale, rotate);
|
eek_renderer_apply_transformation_for_key (self, cr, key, scale, rotate);
|
||||||
render_key (self, cr, key);
|
render_key (self, cr, key, eek_key_is_pressed (key) || eek_key_is_locked (key));
|
||||||
cairo_restore (cr);
|
cairo_restore (cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -647,6 +691,7 @@ eek_renderer_real_render_keyboard (EekRenderer *self,
|
|||||||
cairo_t *cr)
|
cairo_t *cr)
|
||||||
{
|
{
|
||||||
EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(self);
|
EekRendererPrivate *priv = EEK_RENDERER_GET_PRIVATE(self);
|
||||||
|
cairo_pattern_t *source;
|
||||||
|
|
||||||
g_return_if_fail (priv->keyboard);
|
g_return_if_fail (priv->keyboard);
|
||||||
g_return_if_fail (priv->allocation_width > 0.0);
|
g_return_if_fail (priv->allocation_width > 0.0);
|
||||||
@ -656,6 +701,8 @@ eek_renderer_real_render_keyboard (EekRenderer *self,
|
|||||||
priv->keyboard_surface = create_keyboard_surface (self);
|
priv->keyboard_surface = create_keyboard_surface (self);
|
||||||
|
|
||||||
cairo_set_source_surface (cr, priv->keyboard_surface, 0.0, 0.0);
|
cairo_set_source_surface (cr, priv->keyboard_surface, 0.0, 0.0);
|
||||||
|
source = cairo_get_source (cr);
|
||||||
|
cairo_pattern_set_extend (source, CAIRO_EXTEND_PAD);
|
||||||
cairo_paint (cr);
|
cairo_paint (cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -870,8 +917,17 @@ eek_renderer_set_allocation_size (EekRenderer *renderer,
|
|||||||
priv->allocation_height = height;
|
priv->allocation_height = height;
|
||||||
|
|
||||||
eek_element_get_bounds (EEK_ELEMENT(priv->keyboard), &bounds);
|
eek_element_get_bounds (EEK_ELEMENT(priv->keyboard), &bounds);
|
||||||
scale = width > height ? height / bounds.height :
|
|
||||||
width / bounds.width;
|
if (bounds.height * width / bounds.width <= height)
|
||||||
|
scale = width / bounds.width;
|
||||||
|
else if (bounds.width * height / bounds.height <= width)
|
||||||
|
scale = height / bounds.height;
|
||||||
|
else {
|
||||||
|
if (bounds.width * height < bounds.height * width)
|
||||||
|
scale = bounds.width / width;
|
||||||
|
else
|
||||||
|
scale = bounds.height / height;
|
||||||
|
}
|
||||||
|
|
||||||
if (scale != priv->scale) {
|
if (scale != priv->scale) {
|
||||||
priv->scale = scale;
|
priv->scale = scale;
|
||||||
@ -1021,22 +1077,19 @@ eek_renderer_render_key_outline (EekRenderer *renderer,
|
|||||||
rotate);
|
rotate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
cairo_surface_t *
|
||||||
eek_renderer_render_key_icon (EekRenderer *renderer,
|
eek_renderer_get_icon_surface (EekRenderer *renderer,
|
||||||
cairo_t *cr,
|
const gchar *icon_name,
|
||||||
EekKey *key,
|
gint size)
|
||||||
gdouble scale,
|
|
||||||
gboolean rotate)
|
|
||||||
{
|
{
|
||||||
g_return_if_fail (EEK_IS_RENDERER(renderer));
|
EekRendererClass *klass;
|
||||||
g_return_if_fail (EEK_IS_KEY(key));
|
|
||||||
g_return_if_fail (scale >= 0.0);
|
|
||||||
|
|
||||||
EEK_RENDERER_GET_CLASS(renderer)->render_key_icon (renderer,
|
g_return_val_if_fail (EEK_IS_RENDERER(renderer), NULL);
|
||||||
cr,
|
|
||||||
key,
|
klass = EEK_RENDERER_GET_CLASS(renderer);
|
||||||
scale,
|
if (klass->get_icon_surface)
|
||||||
rotate);
|
return klass->get_icon_surface (renderer, icon_name, size);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@ -70,11 +70,9 @@ struct _EekRendererClass
|
|||||||
void (* render_keyboard) (EekRenderer *self,
|
void (* render_keyboard) (EekRenderer *self,
|
||||||
cairo_t *cr);
|
cairo_t *cr);
|
||||||
|
|
||||||
void (* render_key_icon) (EekRenderer *self,
|
cairo_surface_t *(* get_icon_surface) (EekRenderer *self,
|
||||||
cairo_t *cr,
|
const gchar *icon_name,
|
||||||
EekKey *key,
|
gint size);
|
||||||
gdouble scale,
|
|
||||||
gboolean rotate);
|
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
/* padding */
|
/* padding */
|
||||||
@ -84,7 +82,8 @@ struct _EekRendererClass
|
|||||||
GType eek_renderer_get_type (void) G_GNUC_CONST;
|
GType eek_renderer_get_type (void) G_GNUC_CONST;
|
||||||
EekRenderer *eek_renderer_new (EekKeyboard *keyboard,
|
EekRenderer *eek_renderer_new (EekKeyboard *keyboard,
|
||||||
PangoContext *pcontext);
|
PangoContext *pcontext);
|
||||||
void eek_renderer_set_allocation_size (EekRenderer *renderer,
|
void eek_renderer_set_allocation_size
|
||||||
|
(EekRenderer *renderer,
|
||||||
gdouble width,
|
gdouble width,
|
||||||
gdouble height);
|
gdouble height);
|
||||||
void eek_renderer_get_size (EekRenderer *renderer,
|
void eek_renderer_get_size (EekRenderer *renderer,
|
||||||
@ -97,12 +96,14 @@ void eek_renderer_get_key_bounds (EekRenderer *renderer,
|
|||||||
|
|
||||||
gdouble eek_renderer_get_scale (EekRenderer *renderer);
|
gdouble eek_renderer_get_scale (EekRenderer *renderer);
|
||||||
|
|
||||||
PangoLayout *eek_renderer_create_pango_layout (EekRenderer *renderer);
|
PangoLayout *eek_renderer_create_pango_layout
|
||||||
|
(EekRenderer *renderer);
|
||||||
void eek_renderer_render_key_label (EekRenderer *renderer,
|
void eek_renderer_render_key_label (EekRenderer *renderer,
|
||||||
PangoLayout *layout,
|
PangoLayout *layout,
|
||||||
EekKey *key);
|
EekKey *key);
|
||||||
|
|
||||||
void eek_renderer_render_key_outline (EekRenderer *renderer,
|
void eek_renderer_render_key_outline
|
||||||
|
(EekRenderer *renderer,
|
||||||
cairo_t *cr,
|
cairo_t *cr,
|
||||||
EekKey *key,
|
EekKey *key,
|
||||||
gdouble scale,
|
gdouble scale,
|
||||||
@ -114,11 +115,9 @@ void eek_renderer_render_key (EekRenderer *renderer,
|
|||||||
gdouble scale,
|
gdouble scale,
|
||||||
gboolean rotate);
|
gboolean rotate);
|
||||||
|
|
||||||
void eek_renderer_render_key_icon (EekRenderer *renderer,
|
cairo_surface_t *eek_renderer_get_icon_surface (EekRenderer *renderer,
|
||||||
cairo_t *cr,
|
const gchar *icon_name,
|
||||||
EekKey *key,
|
gint size);
|
||||||
gdouble scale,
|
|
||||||
gboolean rotate);
|
|
||||||
|
|
||||||
void eek_renderer_render_keyboard (EekRenderer *renderer,
|
void eek_renderer_render_keyboard (EekRenderer *renderer,
|
||||||
cairo_t *cr);
|
cairo_t *cr);
|
||||||
@ -129,10 +128,12 @@ void eek_renderer_set_default_foreground_color
|
|||||||
void eek_renderer_set_default_background_color
|
void eek_renderer_set_default_background_color
|
||||||
(EekRenderer *renderer,
|
(EekRenderer *renderer,
|
||||||
const EekColor *color);
|
const EekColor *color);
|
||||||
void eek_renderer_get_foreground_color (EekRenderer *renderer,
|
void eek_renderer_get_foreground_color
|
||||||
|
(EekRenderer *renderer,
|
||||||
EekElement *element,
|
EekElement *element,
|
||||||
EekColor *color);
|
EekColor *color);
|
||||||
void eek_renderer_get_background_color (EekRenderer *renderer,
|
void eek_renderer_get_background_color
|
||||||
|
(EekRenderer *renderer,
|
||||||
EekElement *element,
|
EekElement *element,
|
||||||
EekColor *color);
|
EekColor *color);
|
||||||
void eek_renderer_get_background_gradient
|
void eek_renderer_get_background_gradient
|
||||||
@ -143,7 +144,8 @@ void eek_renderer_get_background_gradient
|
|||||||
EekColor *end);
|
EekColor *end);
|
||||||
void eek_renderer_set_border_width (EekRenderer *renderer,
|
void eek_renderer_set_border_width (EekRenderer *renderer,
|
||||||
gdouble border_width);
|
gdouble border_width);
|
||||||
EekKey *eek_renderer_find_key_by_position (EekRenderer *renderer,
|
EekKey *eek_renderer_find_key_by_position
|
||||||
|
(EekRenderer *renderer,
|
||||||
gdouble x,
|
gdouble x,
|
||||||
gdouble y);
|
gdouble y);
|
||||||
void eek_renderer_apply_transformation_for_key
|
void eek_renderer_apply_transformation_for_key
|
||||||
|
|||||||
@ -37,7 +37,6 @@
|
|||||||
#include "eek-section.h"
|
#include "eek-section.h"
|
||||||
#include "eek-key.h"
|
#include "eek-key.h"
|
||||||
#include "eek-symbol.h"
|
#include "eek-symbol.h"
|
||||||
#include "eek-serializable.h"
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PROP_0,
|
PROP_0,
|
||||||
@ -48,16 +47,15 @@ enum {
|
|||||||
enum {
|
enum {
|
||||||
KEY_PRESSED,
|
KEY_PRESSED,
|
||||||
KEY_RELEASED,
|
KEY_RELEASED,
|
||||||
|
KEY_LOCKED,
|
||||||
|
KEY_UNLOCKED,
|
||||||
|
KEY_CANCELLED,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
static guint signals[LAST_SIGNAL] = { 0, };
|
static guint signals[LAST_SIGNAL] = { 0, };
|
||||||
|
|
||||||
static void eek_serializable_iface_init (EekSerializableIface *iface);
|
G_DEFINE_TYPE (EekSection, eek_section, EEK_TYPE_CONTAINER);
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (EekSection, eek_section, EEK_TYPE_CONTAINER,
|
|
||||||
G_IMPLEMENT_INTERFACE (EEK_TYPE_SERIALIZABLE,
|
|
||||||
eek_serializable_iface_init));
|
|
||||||
|
|
||||||
#define EEK_SECTION_GET_PRIVATE(obj) \
|
#define EEK_SECTION_GET_PRIVATE(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_SECTION, EekSectionPrivate))
|
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_SECTION, EekSectionPrivate))
|
||||||
@ -77,80 +75,6 @@ struct _EekSectionPrivate
|
|||||||
EekModifierType modifiers;
|
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
|
static void
|
||||||
eek_section_real_set_angle (EekSection *self,
|
eek_section_real_set_angle (EekSection *self,
|
||||||
gint angle)
|
gint angle)
|
||||||
@ -223,6 +147,27 @@ on_released (EekKey *key,
|
|||||||
g_signal_emit_by_name (section, "key-released", 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 *
|
static EekKey *
|
||||||
eek_section_real_create_key (EekSection *self,
|
eek_section_real_create_key (EekSection *self,
|
||||||
gint column,
|
gint column,
|
||||||
@ -389,6 +334,9 @@ eek_section_real_child_added (EekContainer *self,
|
|||||||
{
|
{
|
||||||
g_signal_connect (element, "pressed", G_CALLBACK(on_pressed), 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, "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
|
static void
|
||||||
@ -397,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_pressed, self);
|
||||||
g_signal_handlers_disconnect_by_func (element, on_released, 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
|
static void
|
||||||
@ -480,17 +431,72 @@ eek_section_class_init (EekSectionClass *klass)
|
|||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
1,
|
1,
|
||||||
EEK_TYPE_KEY);
|
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
|
static void
|
||||||
eek_section_init (EekSection *self)
|
eek_section_init (EekSection *self)
|
||||||
{
|
{
|
||||||
EekSectionPrivate *priv;
|
self->priv = EEK_SECTION_GET_PRIVATE (self);
|
||||||
|
|
||||||
priv = self->priv = EEK_SECTION_GET_PRIVATE (self);
|
|
||||||
priv->angle = 0;
|
|
||||||
priv->rows = NULL;
|
|
||||||
priv->modifiers = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -17,6 +17,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
* 02110-1301 USA
|
* 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
|
#ifndef EEK_SECTION_H
|
||||||
#define EEK_SECTION_H 1
|
#define EEK_SECTION_H 1
|
||||||
|
|
||||||
@ -36,6 +41,12 @@ G_BEGIN_DECLS
|
|||||||
typedef struct _EekSectionClass EekSectionClass;
|
typedef struct _EekSectionClass EekSectionClass;
|
||||||
typedef struct _EekSectionPrivate EekSectionPrivate;
|
typedef struct _EekSectionPrivate EekSectionPrivate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekSection:
|
||||||
|
*
|
||||||
|
* The #EekSection structure contains only private data and should
|
||||||
|
* only be accessed using the provided API.
|
||||||
|
*/
|
||||||
struct _EekSection
|
struct _EekSection
|
||||||
{
|
{
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
@ -56,6 +67,9 @@ struct _EekSection
|
|||||||
* section by keycode
|
* section by keycode
|
||||||
* @key_pressed: class handler for #EekSection::key-pressed signal
|
* @key_pressed: class handler for #EekSection::key-pressed signal
|
||||||
* @key_released: class handler for #EekSection::key-released 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
|
struct _EekSectionClass
|
||||||
{
|
{
|
||||||
@ -88,10 +102,16 @@ struct _EekSectionClass
|
|||||||
EekKey *key);
|
EekKey *key);
|
||||||
void (* key_released) (EekSection *self,
|
void (* key_released) (EekSection *self,
|
||||||
EekKey *key);
|
EekKey *key);
|
||||||
|
void (* key_locked) (EekSection *self,
|
||||||
|
EekKey *key);
|
||||||
|
void (* key_unlocked) (EekSection *self,
|
||||||
|
EekKey *key);
|
||||||
|
void (* key_cancelled) (EekSection *self,
|
||||||
|
EekKey *key);
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
/* padding */
|
/* padding */
|
||||||
gpointer pdummy[22];
|
gpointer pdummy[19];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType eek_section_get_type (void) G_GNUC_CONST;
|
GType eek_section_get_type (void) G_GNUC_CONST;
|
||||||
|
|||||||
@ -20,11 +20,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:eek-serializable
|
* SECTION:eek-serializable
|
||||||
* @short_description: Interface implemented by #EekElement to
|
* @short_description: Interface which provides object serialization
|
||||||
* serialize it to #GVariant
|
* into #GVariant
|
||||||
*
|
*
|
||||||
* The #EekSerializableIface interface defines serialize/deserialize
|
* The #EekSerializableIface interface defines serialize/deserialize
|
||||||
* method of #EekElement.
|
* method.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
|||||||
@ -16,6 +16,10 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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
|
#ifndef EEK_SERIALIZABLE_H
|
||||||
#define EEK_SERIALIZABLE_H 1
|
#define EEK_SERIALIZABLE_H 1
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,7 @@ G_BEGIN_DECLS
|
|||||||
*/
|
*/
|
||||||
struct _EekSymbolMatrix
|
struct _EekSymbolMatrix
|
||||||
{
|
{
|
||||||
|
/*< public >*/
|
||||||
gint num_groups;
|
gint num_groups;
|
||||||
gint num_levels;
|
gint num_levels;
|
||||||
EekSymbol **data;
|
EekSymbol **data;
|
||||||
|
|||||||
@ -228,11 +228,7 @@ eek_symbol_init (EekSymbol *self)
|
|||||||
EekSymbolPrivate *priv;
|
EekSymbolPrivate *priv;
|
||||||
|
|
||||||
priv = self->priv = EEK_SYMBOL_GET_PRIVATE(self);
|
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->category = EEK_SYMBOL_CATEGORY_UNKNOWN;
|
||||||
priv->modifier_mask = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -244,7 +240,7 @@ eek_symbol_init (EekSymbol *self)
|
|||||||
EekSymbol *
|
EekSymbol *
|
||||||
eek_symbol_new (const gchar *name)
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -17,6 +17,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
* 02110-1301 USA
|
* 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
|
#ifndef EEK_SYMBOL_H
|
||||||
#define EEK_SYMBOL_H 1
|
#define EEK_SYMBOL_H 1
|
||||||
|
|
||||||
@ -97,9 +102,9 @@ void eek_symbol_set_category (EekSymbol *symbol,
|
|||||||
EekSymbolCategory category);
|
EekSymbolCategory category);
|
||||||
EekSymbolCategory eek_symbol_get_category (EekSymbol *symbol);
|
EekSymbolCategory eek_symbol_get_category (EekSymbol *symbol);
|
||||||
EekModifierType eek_symbol_get_modifier_mask
|
EekModifierType eek_symbol_get_modifier_mask
|
||||||
(EekSymbol *keysym);
|
(EekSymbol *symbol);
|
||||||
void eek_symbol_set_modifier_mask
|
void eek_symbol_set_modifier_mask
|
||||||
(EekSymbol *keysym,
|
(EekSymbol *symbol,
|
||||||
EekModifierType mask);
|
EekModifierType mask);
|
||||||
gboolean eek_symbol_is_modifier (EekSymbol *symbol);
|
gboolean eek_symbol_is_modifier (EekSymbol *symbol);
|
||||||
void eek_symbol_set_icon_name (EekSymbol *symbol,
|
void eek_symbol_set_icon_name (EekSymbol *symbol,
|
||||||
|
|||||||
@ -489,11 +489,11 @@ eek_theme_get_property (GObject *object,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* eek_theme_new:
|
* eek_theme_new:
|
||||||
* @application_stylesheet: The highest priority stylesheet, representing application-specific
|
* @application_stylesheet: (allow-none): The highest priority stylesheet, representing application-specific
|
||||||
* styling; this is associated with the CSS "author" stylesheet, may be %NULL
|
* styling; this is associated with the CSS "author" stylesheet, may be %NULL
|
||||||
* @theme_stylesheet: The second priority stylesheet, representing theme-specific styling ;
|
* @theme_stylesheet: (allow-none): The second priority stylesheet, representing theme-specific styling ;
|
||||||
* this is associated with the CSS "user" stylesheet, may be %NULL
|
* this is associated with the CSS "user" stylesheet, may be %NULL
|
||||||
* @default_stylesheet: The lowest priority stylesheet, representing global default styling;
|
* @default_stylesheet: (allow-none): The lowest priority stylesheet, representing global default styling;
|
||||||
* this is associated with the CSS "user agent" stylesheet, may be %NULL
|
* this is associated with the CSS "user agent" stylesheet, may be %NULL
|
||||||
*
|
*
|
||||||
* Return value: the newly created theme object
|
* Return value: the newly created theme object
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
/* -*- 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__
|
#ifndef __EEK_THEME_H__
|
||||||
#define __EEK_THEME_H__
|
#define __EEK_THEME_H__
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,8 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:eek-types
|
* SECTION:eek-types
|
||||||
* @short_description: Miscellaneous types
|
* @title: Miscellaneous Types
|
||||||
|
* @short_description: Miscellaneous types used in Libeek
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
|||||||
@ -17,6 +17,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
* 02110-1301 USA
|
* 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
|
#ifndef EEK_TYPES_H
|
||||||
#define EEK_TYPES_H 1
|
#define EEK_TYPES_H 1
|
||||||
|
|
||||||
@ -154,6 +159,7 @@ typedef struct _EekColor EekColor;
|
|||||||
typedef struct _EekPoint EekPoint;
|
typedef struct _EekPoint EekPoint;
|
||||||
struct _EekPoint
|
struct _EekPoint
|
||||||
{
|
{
|
||||||
|
/*< public >*/
|
||||||
gdouble x;
|
gdouble x;
|
||||||
gdouble y;
|
gdouble y;
|
||||||
};
|
};
|
||||||
@ -175,6 +181,7 @@ void eek_point_rotate (EekPoint *point,
|
|||||||
*/
|
*/
|
||||||
struct _EekBounds
|
struct _EekBounds
|
||||||
{
|
{
|
||||||
|
/*< public >*/
|
||||||
gdouble x;
|
gdouble x;
|
||||||
gdouble y;
|
gdouble y;
|
||||||
gdouble width;
|
gdouble width;
|
||||||
@ -201,6 +208,7 @@ eek_bounds_long_side (EekBounds *bounds)
|
|||||||
*/
|
*/
|
||||||
struct _EekOutline
|
struct _EekOutline
|
||||||
{
|
{
|
||||||
|
/*< public >*/
|
||||||
gdouble corner_radius;
|
gdouble corner_radius;
|
||||||
EekPoint *points;
|
EekPoint *points;
|
||||||
gint num_points;
|
gint num_points;
|
||||||
@ -221,6 +229,7 @@ void eek_outline_free (EekOutline *outline);
|
|||||||
*/
|
*/
|
||||||
struct _EekColor
|
struct _EekColor
|
||||||
{
|
{
|
||||||
|
/*< public >*/
|
||||||
gdouble red;
|
gdouble red;
|
||||||
gdouble green;
|
gdouble green;
|
||||||
gdouble blue;
|
gdouble blue;
|
||||||
|
|||||||
@ -23,7 +23,7 @@ includedir=@includedir@
|
|||||||
|
|
||||||
Name: libeek-xkb
|
Name: libeek-xkb
|
||||||
Description: A Library to Create Keyboard-like UI (XKB Support)
|
Description: A Library to Create Keyboard-like UI (XKB Support)
|
||||||
URL: http://ueno.github.com/eekboard/
|
URL: http://fedorahosted.org/eekboard/
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Requires: eek-@EEK_API_VERSION@ gtk+-x11-@GTK_API_VERSION@
|
Requires: eek-@EEK_API_VERSION@ gtk+-x11-@GTK_API_VERSION@
|
||||||
Libs: -L${libdir} -leek-xkb
|
Libs: -L${libdir} -leek-xkb
|
||||||
|
|||||||
@ -457,7 +457,6 @@ eek_xkb_layout_init (EekXkbLayout *self)
|
|||||||
EekXkbLayoutPrivate *priv;
|
EekXkbLayoutPrivate *priv;
|
||||||
|
|
||||||
priv = self->priv = EEK_XKB_LAYOUT_GET_PRIVATE (self);
|
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 ());
|
priv->display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||||
g_return_if_fail (priv->display);
|
g_return_if_fail (priv->display);
|
||||||
|
|||||||
@ -17,6 +17,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
* 02110-1301 USA
|
* 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
|
#ifndef EEK_XKB_LAYOUT_H
|
||||||
#define EEK_XKB_LAYOUT_H 1
|
#define EEK_XKB_LAYOUT_H 1
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ includedir=@includedir@
|
|||||||
|
|
||||||
Name: libeek-xkl
|
Name: libeek-xkl
|
||||||
Description: A Library to Create Keyboard-like UI (Libxklavier Support)
|
Description: A Library to Create Keyboard-like UI (Libxklavier Support)
|
||||||
URL: http://ueno.github.com/eekboard/
|
URL: http://fedorahosted.org/eekboard/
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Requires: eek-xkb-@EEK_API_VERSION@ libxklavier
|
Requires: eek-xkb-@EEK_API_VERSION@ libxklavier
|
||||||
Libs: -L${libdir} -leek-xkl
|
Libs: -L${libdir} -leek-xkl
|
||||||
|
|||||||
@ -84,11 +84,6 @@ eek_xkl_layout_dispose (GObject *object)
|
|||||||
priv->config = NULL;
|
priv->config = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->engine) {
|
|
||||||
g_object_unref (priv->engine);
|
|
||||||
priv->engine = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (eek_xkl_layout_parent_class)->dispose (object);
|
G_OBJECT_CLASS (eek_xkl_layout_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
* 02110-1301 USA
|
* 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if !defined(__EEK_H_INSIDE__) && !defined(EEK_COMPILATION)
|
||||||
|
#error "Only <eek/eek-xkl.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef EEK_XKL_LAYOUT_H
|
#ifndef EEK_XKL_LAYOUT_H
|
||||||
#define EEK_XKL_LAYOUT_H 1
|
#define EEK_XKL_LAYOUT_H 1
|
||||||
|
|
||||||
|
|||||||
@ -94,9 +94,7 @@ static const gchar *valid_path_list[] = {
|
|||||||
"groups/symbols/key/section/keyboard",
|
"groups/symbols/key/section/keyboard",
|
||||||
"levels/symbols/key/section/keyboard",
|
"levels/symbols/key/section/keyboard",
|
||||||
"keysym/symbols/key/section/keyboard",
|
"keysym/symbols/key/section/keyboard",
|
||||||
"custom/symbols/key/section/keyboard",
|
"symbol/symbols/key/section/keyboard",
|
||||||
"text/symbols/key/section/keyboard",
|
|
||||||
"icon/symbols/key/section/keyboard",
|
|
||||||
"invalid/symbols/key/section/keyboard",
|
"invalid/symbols/key/section/keyboard",
|
||||||
"index/key/section/keyboard",
|
"index/key/section/keyboard",
|
||||||
"point/outline/keyboard",
|
"point/outline/keyboard",
|
||||||
@ -229,9 +227,11 @@ start_element_callback (GMarkupParseContext *pcontext,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_strcmp0 (element_name, "keysym") == 0) {
|
if (g_strcmp0 (element_name, "symbol") == 0 ||
|
||||||
|
g_strcmp0 (element_name, "keysym") == 0) {
|
||||||
data->label = g_strdup (label);
|
data->label = g_strdup (label);
|
||||||
data->icon = g_strdup (icon);
|
data->icon = g_strdup (icon);
|
||||||
|
if (g_strcmp0 (element_name, "keysym") == 0)
|
||||||
data->keyval = keyval;
|
data->keyval = keyval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,23 +410,32 @@ end_element_callback (GMarkupParseContext *pcontext,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_strcmp0 (element_name, "symbol") == 0 ||
|
||||||
|
g_strcmp0 (element_name, "keysym") == 0) {
|
||||||
|
EekSymbol *symbol;
|
||||||
|
|
||||||
if (g_strcmp0 (element_name, "keysym") == 0) {
|
if (g_strcmp0 (element_name, "keysym") == 0) {
|
||||||
EekKeysym *keysym;
|
EekKeysym *keysym;
|
||||||
|
if (data->keyval != EEK_INVALID_KEYSYM)
|
||||||
if (data->keyval != EEK_INVALID_KEYSYM) {
|
|
||||||
keysym = eek_keysym_new (data->keyval);
|
keysym = eek_keysym_new (data->keyval);
|
||||||
//g_debug ("%u %s", data->keyval, eek_symbol_get_label (EEK_SYMBOL(keysym)));
|
else
|
||||||
} else
|
|
||||||
keysym = eek_keysym_new_from_name (text);
|
keysym = eek_keysym_new_from_name (text);
|
||||||
|
symbol = EEK_SYMBOL(keysym);
|
||||||
|
} else {
|
||||||
|
symbol = eek_symbol_new (text);
|
||||||
|
eek_symbol_set_category (symbol, EEK_SYMBOL_CATEGORY_KEYNAME);
|
||||||
|
}
|
||||||
|
|
||||||
if (data->label) {
|
if (data->label) {
|
||||||
eek_symbol_set_label (EEK_SYMBOL(keysym), data->label);
|
eek_symbol_set_label (symbol, data->label);
|
||||||
g_free (data->label);
|
g_free (data->label);
|
||||||
}
|
}
|
||||||
if (data->icon) {
|
if (data->icon) {
|
||||||
eek_symbol_set_icon_name (EEK_SYMBOL(keysym), data->icon);
|
eek_symbol_set_icon_name (symbol, data->icon);
|
||||||
g_free (data->icon);
|
g_free (data->icon);
|
||||||
}
|
}
|
||||||
data->symbols = g_slist_prepend (data->symbols, keysym);
|
|
||||||
|
data->symbols = g_slist_prepend (data->symbols, symbol);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -676,10 +685,7 @@ eek_xml_layout_class_init (EekXmlLayoutClass *klass)
|
|||||||
static void
|
static void
|
||||||
eek_xml_layout_init (EekXmlLayout *self)
|
eek_xml_layout_init (EekXmlLayout *self)
|
||||||
{
|
{
|
||||||
EekXmlLayoutPrivate *priv;
|
self->priv = EEK_XML_LAYOUT_GET_PRIVATE (self);
|
||||||
|
|
||||||
priv = self->priv = EEK_XML_LAYOUT_GET_PRIVATE (self);
|
|
||||||
priv->source = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EekLayout *
|
EekLayout *
|
||||||
|
|||||||
@ -16,6 +16,10 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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_XML_LAYOUT_H
|
#ifndef EEK_XML_LAYOUT_H
|
||||||
#define EEK_XML_LAYOUT_H 1
|
#define EEK_XML_LAYOUT_H 1
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION: eek-xml
|
* SECTION: eek-xml
|
||||||
|
* @title: XML Conversion Utilities
|
||||||
* @short_description: #EekKeyboard to XML conversion utilities
|
* @short_description: #EekKeyboard to XML conversion utilities
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,10 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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_XML_H
|
#ifndef EEK_XML_H
|
||||||
#define EEK_XML_H 1
|
#define EEK_XML_H 1
|
||||||
|
|
||||||
|
|||||||
45
eek/eek.c
Normal file
45
eek/eek.c
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SECTION:eek
|
||||||
|
* @title: Library Initialization
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif /* HAVE_CONFIG_H */
|
||||||
|
|
||||||
|
#include "eek.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* eek_init:
|
||||||
|
*
|
||||||
|
* Initialize the Libeek library. This must be called before using
|
||||||
|
* functions provided by Libeek.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
eek_init (void)
|
||||||
|
{
|
||||||
|
g_type_init ();
|
||||||
|
|
||||||
|
g_type_class_ref (EEK_TYPE_SYMBOL);
|
||||||
|
g_type_class_ref (EEK_TYPE_KEYSYM);
|
||||||
|
}
|
||||||
@ -20,6 +20,8 @@
|
|||||||
#ifndef EEK_H
|
#ifndef EEK_H
|
||||||
#define EEK_H 1
|
#define EEK_H 1
|
||||||
|
|
||||||
|
#define __EEK_H_INSIDE__ 1
|
||||||
|
|
||||||
#include "eek-keyboard.h"
|
#include "eek-keyboard.h"
|
||||||
#include "eek-section.h"
|
#include "eek-section.h"
|
||||||
#include "eek-key.h"
|
#include "eek-key.h"
|
||||||
@ -30,4 +32,6 @@
|
|||||||
#include "eek-serializable.h"
|
#include "eek-serializable.h"
|
||||||
#include "eek-theme.h"
|
#include "eek-theme.h"
|
||||||
|
|
||||||
|
void eek_init (void);
|
||||||
|
|
||||||
#endif /* EEK_H */
|
#endif /* EEK_H */
|
||||||
|
|||||||
@ -30,9 +30,9 @@
|
|||||||
0xFF9E "Ins" EEK_SYMBOL_CATEGORY_FUNCTION
|
0xFF9E "Ins" EEK_SYMBOL_CATEGORY_FUNCTION
|
||||||
0xFF9F "Del" EEK_SYMBOL_CATEGORY_FUNCTION
|
0xFF9F "Del" EEK_SYMBOL_CATEGORY_FUNCTION
|
||||||
# aliases
|
# aliases
|
||||||
0xFE03 "AltGr" EEK_SYMBOL_CATEGORY_KEYNAME
|
0xFE03 "⇮" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||||
0xFE04 "AltGr" EEK_SYMBOL_CATEGORY_KEYNAME
|
0xFE04 "⇮" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||||
0xFE05 "AltGr" EEK_SYMBOL_CATEGORY_KEYNAME
|
0xFE05 "⇮" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||||
0xFE08 "Next" EEK_SYMBOL_CATEGORY_KEYNAME
|
0xFE08 "Next" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||||
0xFE0A "Prev" EEK_SYMBOL_CATEGORY_KEYNAME
|
0xFE0A "Prev" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||||
0xFF08 "←" EEK_SYMBOL_CATEGORY_KEYNAME
|
0xFF08 "←" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||||
@ -47,6 +47,8 @@
|
|||||||
0xFFE5 "⇪" EEK_SYMBOL_CATEGORY_KEYNAME
|
0xFFE5 "⇪" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||||
0xFFE9 "Alt" EEK_SYMBOL_CATEGORY_KEYNAME
|
0xFFE9 "Alt" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||||
0xFFEA "Alt" EEK_SYMBOL_CATEGORY_KEYNAME
|
0xFFEA "Alt" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||||
|
0xFFE7 "Meta" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||||
|
0xFFE8 "Meta" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||||
0xFFEB "Super" EEK_SYMBOL_CATEGORY_KEYNAME
|
0xFFEB "Super" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||||
0xFFEC "Super" EEK_SYMBOL_CATEGORY_KEYNAME
|
0xFFEC "Super" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||||
0xFFED "Hyper" EEK_SYMBOL_CATEGORY_KEYNAME
|
0xFFED "Hyper" EEK_SYMBOL_CATEGORY_KEYNAME
|
||||||
|
|||||||
@ -19,16 +19,42 @@
|
|||||||
lib_LTLIBRARIES = libeekboard.la
|
lib_LTLIBRARIES = libeekboard.la
|
||||||
|
|
||||||
libeekboard_headers = \
|
libeekboard_headers = \
|
||||||
eekboard.h \
|
eekboard-service.h \
|
||||||
eekboard-eekboard.h \
|
eekboard-context-service.h \
|
||||||
eekboard-context.h
|
eekboard-client.h \
|
||||||
|
eekboard-context.h \
|
||||||
|
eekboard-xklutil.h
|
||||||
|
libeekboard_private_headers = \
|
||||||
|
eekboard-marshalers.h
|
||||||
libeekboard_sources = \
|
libeekboard_sources = \
|
||||||
eekboard-eekboard.c \
|
eekboard-service.c \
|
||||||
eekboard-context.c
|
eekboard-context-service.c \
|
||||||
|
eekboard-client.c \
|
||||||
|
eekboard-context.c \
|
||||||
|
eekboard-xklutil.c
|
||||||
|
|
||||||
libeekboard_la_SOURCES = $(libeekboard_sources)
|
libeekboard_marshalers_sources = \
|
||||||
libeekboard_la_CFLAGS = -I$(top_srcdir) $(GIO2_CFLAGS)
|
eekboard-marshalers.c \
|
||||||
libeekboard_la_LIBADD = $(top_builddir)/eek/libeek.la $(GIO2_LIBS)
|
eekboard-marshalers.h
|
||||||
|
|
||||||
|
BUILT_SOURCES = \
|
||||||
|
$(libeekboard_marshalers_sources)
|
||||||
|
|
||||||
|
libeekboard_la_SOURCES = \
|
||||||
|
$(libeekboard_sources) \
|
||||||
|
eekboard-marshalers.c
|
||||||
|
|
||||||
|
libeekboard_la_CFLAGS = \
|
||||||
|
-DEEKBOARD_COMPILATION=1 \
|
||||||
|
-DKEYBOARDDIR=\"$(pkgdatadir)/keyboards\" \
|
||||||
|
-I$(top_srcdir) \
|
||||||
|
$(GIO2_CFLAGS) \
|
||||||
|
$(LIBXKLAVIER_CFLAGS)
|
||||||
|
libeekboard_la_LIBADD = \
|
||||||
|
$(top_builddir)/eek/libeek.la \
|
||||||
|
$(top_builddir)/eek/libeek-xkl.la \
|
||||||
|
$(GIO2_LIBS) \
|
||||||
|
$(LIBXKLAVIER_LIBS)
|
||||||
|
|
||||||
eekboarddir = $(includedir)/eekboard-$(EEK_API_VERSION)/eekboard
|
eekboarddir = $(includedir)/eekboard-$(EEK_API_VERSION)/eekboard
|
||||||
eekboard_HEADERS = $(libeekboard_headers)
|
eekboard_HEADERS = $(libeekboard_headers)
|
||||||
@ -37,10 +63,23 @@ pkgconfigdir = $(libdir)/pkgconfig
|
|||||||
pkgconfig_DATA = \
|
pkgconfig_DATA = \
|
||||||
eekboard-$(EEK_API_VERSION).pc
|
eekboard-$(EEK_API_VERSION).pc
|
||||||
DISTCLEANFILES = \
|
DISTCLEANFILES = \
|
||||||
|
$(BUILT_SOURCES) \
|
||||||
$(pkgconfig_DATA)
|
$(pkgconfig_DATA)
|
||||||
|
|
||||||
CLEANFILES =
|
CLEANFILES =
|
||||||
|
|
||||||
|
EXTRA_DIST = eekboard-marshalers.list
|
||||||
|
|
||||||
|
# gen marshal
|
||||||
|
eekboard-marshalers.h: eekboard-marshalers.list
|
||||||
|
$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_eekboard_marshal $(srcdir)/eekboard-marshalers.list --header --internal > $@.tmp && \
|
||||||
|
mv $@.tmp $@
|
||||||
|
|
||||||
|
eekboard-marshalers.c: eekboard-marshalers.list eekboard-marshalers.h
|
||||||
|
$(AM_V_GEN) (echo "#include \"eekboard-marshalers.h\""; \
|
||||||
|
$(GLIB_GENMARSHAL) --prefix=_eekboard_marshal $(srcdir)/eekboard-marshalers.list --body --internal) > $@.tmp && \
|
||||||
|
mv $@.tmp $@
|
||||||
|
|
||||||
-include $(INTROSPECTION_MAKEFILE)
|
-include $(INTROSPECTION_MAKEFILE)
|
||||||
INTROSPECTION_GIRS =
|
INTROSPECTION_GIRS =
|
||||||
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(builddir) --add-include-path=$(top_builddir)/eek
|
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(builddir) --add-include-path=$(top_builddir)/eek
|
||||||
|
|||||||
@ -25,6 +25,6 @@ Name: Eekboard
|
|||||||
Description: A Library to Create Keyboard-like UI
|
Description: A Library to Create Keyboard-like UI
|
||||||
URL: http://ueno.github.com/eekboard/
|
URL: http://ueno.github.com/eekboard/
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Requires: gobject-2.0
|
Requires: eek-@EEK_API_VERSION@
|
||||||
Libs: -L${libdir} -leek
|
Libs: -L${libdir} -leek
|
||||||
Cflags: -I${includedir}/eekboard-@EEK_API_VERSION@
|
Cflags: -I${includedir}/eekboard-@EEK_API_VERSION@
|
||||||
|
|||||||
@ -17,17 +17,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:eekboard-eekboard
|
* SECTION:eekboard-client
|
||||||
* @short_description: D-Bus proxy of eekboard-server
|
* @short_description: client interface of eekboard service
|
||||||
*
|
*
|
||||||
* The #EekboardEekboard class provides a client side access to eekboard-server.
|
* The #EekboardClient class provides a client side access to eekboard-server.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif /* HAVE_CONFIG_H */
|
#endif /* HAVE_CONFIG_H */
|
||||||
|
|
||||||
#include "eekboard/eekboard-eekboard.h"
|
#include "eekboard/eekboard-client.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
DESTROYED,
|
DESTROYED,
|
||||||
@ -36,53 +36,53 @@ enum {
|
|||||||
|
|
||||||
static guint signals[LAST_SIGNAL] = { 0, };
|
static guint signals[LAST_SIGNAL] = { 0, };
|
||||||
|
|
||||||
G_DEFINE_TYPE (EekboardEekboard, eekboard_eekboard, G_TYPE_DBUS_PROXY);
|
G_DEFINE_TYPE (EekboardClient, eekboard_client, G_TYPE_DBUS_PROXY);
|
||||||
|
|
||||||
#define EEKBOARD_EEKBOARD_GET_PRIVATE(obj) \
|
#define EEKBOARD_CLIENT_GET_PRIVATE(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEKBOARD_TYPE_EEKBOARD, EekboardEekboardPrivate))
|
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEKBOARD_TYPE_CLIENT, EekboardClientPrivate))
|
||||||
|
|
||||||
struct _EekboardEekboardPrivate
|
struct _EekboardClientPrivate
|
||||||
{
|
{
|
||||||
GHashTable *context_hash;
|
GHashTable *context_hash;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eekboard_eekboard_real_destroyed (EekboardEekboard *self)
|
eekboard_client_real_destroyed (EekboardClient *self)
|
||||||
{
|
{
|
||||||
EekboardEekboardPrivate *priv = EEKBOARD_EEKBOARD_GET_PRIVATE(self);
|
EekboardClientPrivate *priv = EEKBOARD_CLIENT_GET_PRIVATE(self);
|
||||||
|
|
||||||
// g_debug ("eekboard_eekboard_real_destroyed");
|
// g_debug ("eekboard_client_real_destroyed");
|
||||||
g_hash_table_remove_all (priv->context_hash);
|
g_hash_table_remove_all (priv->context_hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eekboard_eekboard_dispose (GObject *object)
|
eekboard_client_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
EekboardEekboardPrivate *priv = EEKBOARD_EEKBOARD_GET_PRIVATE(object);
|
EekboardClientPrivate *priv = EEKBOARD_CLIENT_GET_PRIVATE(object);
|
||||||
|
|
||||||
if (priv->context_hash) {
|
if (priv->context_hash) {
|
||||||
g_hash_table_destroy (priv->context_hash);
|
g_hash_table_destroy (priv->context_hash);
|
||||||
priv->context_hash = NULL;
|
priv->context_hash = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
G_OBJECT_CLASS (eekboard_eekboard_parent_class)->dispose (object);
|
G_OBJECT_CLASS (eekboard_client_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eekboard_eekboard_class_init (EekboardEekboardClass *klass)
|
eekboard_client_class_init (EekboardClientClass *klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
g_type_class_add_private (gobject_class,
|
g_type_class_add_private (gobject_class,
|
||||||
sizeof (EekboardEekboardPrivate));
|
sizeof (EekboardClientPrivate));
|
||||||
|
|
||||||
klass->destroyed = eekboard_eekboard_real_destroyed;
|
klass->destroyed = eekboard_client_real_destroyed;
|
||||||
|
|
||||||
gobject_class->dispose = eekboard_eekboard_dispose;
|
gobject_class->dispose = eekboard_client_dispose;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EekboardEekboard::destroyed:
|
* EekboardClient::destroyed:
|
||||||
* @eekboard: an #EekboardEekboard
|
* @eekboard: an #EekboardClient
|
||||||
*
|
*
|
||||||
* The ::destroyed signal is emitted each time the name of remote
|
* The ::destroyed signal is emitted each time the name of remote
|
||||||
* end is vanished.
|
* end is vanished.
|
||||||
@ -91,7 +91,7 @@ eekboard_eekboard_class_init (EekboardEekboardClass *klass)
|
|||||||
g_signal_new (I_("destroyed"),
|
g_signal_new (I_("destroyed"),
|
||||||
G_TYPE_FROM_CLASS(gobject_class),
|
G_TYPE_FROM_CLASS(gobject_class),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET(EekboardEekboardClass, destroyed),
|
G_STRUCT_OFFSET(EekboardClientClass, destroyed),
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
g_cclosure_marshal_VOID__VOID,
|
g_cclosure_marshal_VOID__VOID,
|
||||||
@ -100,11 +100,11 @@ eekboard_eekboard_class_init (EekboardEekboardClass *klass)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eekboard_eekboard_init (EekboardEekboard *self)
|
eekboard_client_init (EekboardClient *self)
|
||||||
{
|
{
|
||||||
EekboardEekboardPrivate *priv;
|
EekboardClientPrivate *priv;
|
||||||
|
|
||||||
priv = self->priv = EEKBOARD_EEKBOARD_GET_PRIVATE(self);
|
priv = self->priv = EEKBOARD_CLIENT_GET_PRIVATE(self);
|
||||||
priv->context_hash =
|
priv->context_hash =
|
||||||
g_hash_table_new_full (g_str_hash,
|
g_hash_table_new_full (g_str_hash,
|
||||||
g_str_equal,
|
g_str_equal,
|
||||||
@ -117,19 +117,19 @@ eekboard_name_vanished_callback (GDBusConnection *connection,
|
|||||||
const gchar *name,
|
const gchar *name,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
EekboardEekboard *eekboard = user_data;
|
EekboardClient *client = user_data;
|
||||||
g_signal_emit_by_name (eekboard, "destroyed", NULL);
|
g_signal_emit_by_name (client, "destroyed", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* eekboard_eekboard_new:
|
* eekboard_client_new:
|
||||||
* @connection: a #GDBusConnection
|
* @connection: a #GDBusConnection
|
||||||
* @cancellable: a #GCancellable
|
* @cancellable: a #GCancellable
|
||||||
*
|
*
|
||||||
* Create a D-Bus proxy of eekboard-eekboard.
|
* Create a client.
|
||||||
*/
|
*/
|
||||||
EekboardEekboard *
|
EekboardClient *
|
||||||
eekboard_eekboard_new (GDBusConnection *connection,
|
eekboard_client_new (GDBusConnection *connection,
|
||||||
GCancellable *cancellable)
|
GCancellable *cancellable)
|
||||||
{
|
{
|
||||||
GInitable *initable;
|
GInitable *initable;
|
||||||
@ -139,19 +139,19 @@ eekboard_eekboard_new (GDBusConnection *connection,
|
|||||||
|
|
||||||
error = NULL;
|
error = NULL;
|
||||||
initable =
|
initable =
|
||||||
g_initable_new (EEKBOARD_TYPE_EEKBOARD,
|
g_initable_new (EEKBOARD_TYPE_CLIENT,
|
||||||
cancellable,
|
cancellable,
|
||||||
&error,
|
&error,
|
||||||
"g-connection", connection,
|
"g-connection", connection,
|
||||||
"g-name", "com.redhat.Eekboard.Server",
|
"g-name", "org.fedorahosted.Eekboard",
|
||||||
"g-interface-name", "com.redhat.Eekboard.Server",
|
"g-interface-name", "org.fedorahosted.Eekboard",
|
||||||
"g-object-path", "/com/redhat/Eekboard/Server",
|
"g-object-path", "/org/fedorahosted/Eekboard",
|
||||||
NULL);
|
NULL);
|
||||||
if (initable != NULL) {
|
if (initable != NULL) {
|
||||||
EekboardEekboard *eekboard = EEKBOARD_EEKBOARD (initable);
|
EekboardClient *client = EEKBOARD_CLIENT (initable);
|
||||||
gchar *name_owner = g_dbus_proxy_get_name_owner (G_DBUS_PROXY(eekboard));
|
gchar *name_owner = g_dbus_proxy_get_name_owner (G_DBUS_PROXY(client));
|
||||||
if (name_owner == NULL) {
|
if (name_owner == NULL) {
|
||||||
g_object_unref (eekboard);
|
g_object_unref (client);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,11 +161,11 @@ eekboard_eekboard_new (GDBusConnection *connection,
|
|||||||
G_BUS_NAME_WATCHER_FLAGS_NONE,
|
G_BUS_NAME_WATCHER_FLAGS_NONE,
|
||||||
NULL,
|
NULL,
|
||||||
eekboard_name_vanished_callback,
|
eekboard_name_vanished_callback,
|
||||||
eekboard,
|
client,
|
||||||
NULL);
|
NULL);
|
||||||
g_free (name_owner);
|
g_free (name_owner);
|
||||||
|
|
||||||
return eekboard;
|
return client;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -174,16 +174,16 @@ static void
|
|||||||
on_context_destroyed (EekboardContext *context,
|
on_context_destroyed (EekboardContext *context,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
EekboardEekboard *eekboard = user_data;
|
EekboardClient *client = user_data;
|
||||||
EekboardEekboardPrivate *priv = EEKBOARD_EEKBOARD_GET_PRIVATE(eekboard);
|
EekboardClientPrivate *priv = EEKBOARD_CLIENT_GET_PRIVATE(client);
|
||||||
|
|
||||||
g_hash_table_remove (priv->context_hash,
|
g_hash_table_remove (priv->context_hash,
|
||||||
g_dbus_proxy_get_object_path (G_DBUS_PROXY(context)));
|
g_dbus_proxy_get_object_path (G_DBUS_PROXY(context)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* eekboard_eekboard_create_context:
|
* eekboard_client_create_context:
|
||||||
* @eekboard: an #EekboardEekboard
|
* @eekboard: an #EekboardClient
|
||||||
* @client_name: name of the client
|
* @client_name: name of the client
|
||||||
* @cancellable: a #GCancellable
|
* @cancellable: a #GCancellable
|
||||||
*
|
*
|
||||||
@ -192,22 +192,22 @@ on_context_destroyed (EekboardContext *context,
|
|||||||
* Return value: (transfer full): a newly created #EekboardContext.
|
* Return value: (transfer full): a newly created #EekboardContext.
|
||||||
*/
|
*/
|
||||||
EekboardContext *
|
EekboardContext *
|
||||||
eekboard_eekboard_create_context (EekboardEekboard *eekboard,
|
eekboard_client_create_context (EekboardClient *client,
|
||||||
const gchar *client_name,
|
const gchar *client_name,
|
||||||
GCancellable *cancellable)
|
GCancellable *cancellable)
|
||||||
{
|
{
|
||||||
GVariant *variant;
|
GVariant *variant;
|
||||||
const gchar *object_path;
|
const gchar *object_path;
|
||||||
EekboardContext *context;
|
EekboardContext *context;
|
||||||
EekboardEekboardPrivate *priv;
|
EekboardClientPrivate *priv;
|
||||||
GError *error;
|
GError *error;
|
||||||
GDBusConnection *connection;
|
GDBusConnection *connection;
|
||||||
|
|
||||||
g_assert (EEKBOARD_IS_EEKBOARD(eekboard));
|
g_assert (EEKBOARD_IS_CLIENT(client));
|
||||||
g_assert (client_name);
|
g_assert (client_name);
|
||||||
|
|
||||||
error = NULL;
|
error = NULL;
|
||||||
variant = g_dbus_proxy_call_sync (G_DBUS_PROXY(eekboard),
|
variant = g_dbus_proxy_call_sync (G_DBUS_PROXY(client),
|
||||||
"CreateContext",
|
"CreateContext",
|
||||||
g_variant_new ("(s)", client_name),
|
g_variant_new ("(s)", client_name),
|
||||||
G_DBUS_CALL_FLAGS_NONE,
|
G_DBUS_CALL_FLAGS_NONE,
|
||||||
@ -218,19 +218,19 @@ eekboard_eekboard_create_context (EekboardEekboard *eekboard,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
g_variant_get (variant, "(&s)", &object_path);
|
g_variant_get (variant, "(&s)", &object_path);
|
||||||
connection = g_dbus_proxy_get_connection (G_DBUS_PROXY(eekboard));
|
connection = g_dbus_proxy_get_connection (G_DBUS_PROXY(client));
|
||||||
context = eekboard_context_new (connection, object_path, cancellable);
|
context = eekboard_context_new (connection, object_path, cancellable);
|
||||||
if (!context) {
|
if (!context) {
|
||||||
g_variant_unref (variant);
|
g_variant_unref (variant);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv = EEKBOARD_EEKBOARD_GET_PRIVATE(eekboard);
|
priv = EEKBOARD_CLIENT_GET_PRIVATE(client);
|
||||||
g_hash_table_insert (priv->context_hash,
|
g_hash_table_insert (priv->context_hash,
|
||||||
g_strdup (object_path),
|
g_strdup (object_path),
|
||||||
g_object_ref (context));
|
g_object_ref (context));
|
||||||
g_signal_connect (context, "destroyed",
|
g_signal_connect (context, "destroyed",
|
||||||
G_CALLBACK(on_context_destroyed), eekboard);
|
G_CALLBACK(on_context_destroyed), client);
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,33 +250,33 @@ eekboard_async_ready_callback (GObject *source_object,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* eekboard_eekboard_push_context:
|
* eekboard_client_push_context:
|
||||||
* @eekboard: an #EekboardEekboard
|
* @eekboard: an #EekboardClient
|
||||||
* @context: an #EekboardContext
|
* @context: an #EekboardContext
|
||||||
* @cancellable: a #GCancellable
|
* @cancellable: a #GCancellable
|
||||||
*
|
*
|
||||||
* Enable the input context @context and disable the others.
|
* Enable the input context @context and disable the others.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
eekboard_eekboard_push_context (EekboardEekboard *eekboard,
|
eekboard_client_push_context (EekboardClient *client,
|
||||||
EekboardContext *context,
|
EekboardContext *context,
|
||||||
GCancellable *cancellable)
|
GCancellable *cancellable)
|
||||||
{
|
{
|
||||||
EekboardEekboardPrivate *priv;
|
EekboardClientPrivate *priv;
|
||||||
const gchar *object_path;
|
const gchar *object_path;
|
||||||
|
|
||||||
g_return_if_fail (EEKBOARD_IS_EEKBOARD(eekboard));
|
g_return_if_fail (EEKBOARD_IS_CLIENT(client));
|
||||||
g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
|
g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
|
||||||
|
|
||||||
object_path = g_dbus_proxy_get_object_path (G_DBUS_PROXY(context));
|
object_path = g_dbus_proxy_get_object_path (G_DBUS_PROXY(context));
|
||||||
|
|
||||||
priv = EEKBOARD_EEKBOARD_GET_PRIVATE(eekboard);
|
priv = EEKBOARD_CLIENT_GET_PRIVATE(client);
|
||||||
context = g_hash_table_lookup (priv->context_hash, object_path);
|
context = g_hash_table_lookup (priv->context_hash, object_path);
|
||||||
if (!context)
|
if (!context)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
eekboard_context_set_enabled (context, TRUE);
|
eekboard_context_set_enabled (context, TRUE);
|
||||||
g_dbus_proxy_call (G_DBUS_PROXY(eekboard),
|
g_dbus_proxy_call (G_DBUS_PROXY(client),
|
||||||
"PushContext",
|
"PushContext",
|
||||||
g_variant_new ("(s)", object_path),
|
g_variant_new ("(s)", object_path),
|
||||||
G_DBUS_CALL_FLAGS_NONE,
|
G_DBUS_CALL_FLAGS_NONE,
|
||||||
@ -287,19 +287,19 @@ eekboard_eekboard_push_context (EekboardEekboard *eekboard,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* eekboard_eekboard_pop_context:
|
* eekboard_client_pop_context:
|
||||||
* @eekboard: an #EekboardEekboard
|
* @eekboard: an #EekboardClient
|
||||||
* @cancellable: a #GCancellable
|
* @cancellable: a #GCancellable
|
||||||
*
|
*
|
||||||
* Disable the current input context and enable the previous one.
|
* Disable the current input context and enable the previous one.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
eekboard_eekboard_pop_context (EekboardEekboard *eekboard,
|
eekboard_client_pop_context (EekboardClient *client,
|
||||||
GCancellable *cancellable)
|
GCancellable *cancellable)
|
||||||
{
|
{
|
||||||
g_return_if_fail (EEKBOARD_IS_EEKBOARD(eekboard));
|
g_return_if_fail (EEKBOARD_IS_CLIENT(client));
|
||||||
|
|
||||||
g_dbus_proxy_call (G_DBUS_PROXY(eekboard),
|
g_dbus_proxy_call (G_DBUS_PROXY(client),
|
||||||
"PopContext",
|
"PopContext",
|
||||||
NULL,
|
NULL,
|
||||||
G_DBUS_CALL_FLAGS_NONE,
|
G_DBUS_CALL_FLAGS_NONE,
|
||||||
@ -310,30 +310,29 @@ eekboard_eekboard_pop_context (EekboardEekboard *eekboard,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* eekboard_eekboard_destroy_context:
|
* eekboard_client_destroy_context:
|
||||||
* @eekboard: an #EekboardEekboard
|
* @eekboard: an #EekboardClient
|
||||||
* @context: an #EekboardContext
|
* @context: an #EekboardContext
|
||||||
* @cancellable: a #GCancellable
|
* @cancellable: a #GCancellable
|
||||||
*
|
*
|
||||||
* Remove @context from @eekboard.
|
* Remove @context from @eekboard.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
eekboard_eekboard_destroy_context (EekboardEekboard *eekboard,
|
eekboard_client_destroy_context (EekboardClient *client,
|
||||||
EekboardContext *context,
|
EekboardContext *context,
|
||||||
GCancellable *cancellable)
|
GCancellable *cancellable)
|
||||||
{
|
{
|
||||||
EekboardEekboardPrivate *priv;
|
EekboardClientPrivate *priv;
|
||||||
const gchar *object_path;
|
const gchar *object_path;
|
||||||
|
|
||||||
g_return_if_fail (EEKBOARD_IS_EEKBOARD(eekboard));
|
g_return_if_fail (EEKBOARD_IS_CLIENT(client));
|
||||||
g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
|
g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
|
||||||
|
|
||||||
priv = EEKBOARD_EEKBOARD_GET_PRIVATE(eekboard);
|
priv = EEKBOARD_CLIENT_GET_PRIVATE(client);
|
||||||
|
|
||||||
object_path = g_dbus_proxy_get_object_path (G_DBUS_PROXY(context));
|
object_path = g_dbus_proxy_get_object_path (G_DBUS_PROXY(context));
|
||||||
g_hash_table_remove (priv->context_hash, object_path);
|
g_hash_table_remove (priv->context_hash, object_path);
|
||||||
|
|
||||||
g_dbus_proxy_call (G_DBUS_PROXY(eekboard),
|
g_dbus_proxy_call (G_DBUS_PROXY(client),
|
||||||
"DestroyContext",
|
"DestroyContext",
|
||||||
g_variant_new ("(s)", object_path),
|
g_variant_new ("(s)", object_path),
|
||||||
G_DBUS_CALL_FLAGS_NONE,
|
G_DBUS_CALL_FLAGS_NONE,
|
||||||
75
eekboard/eekboard-client.h
Normal file
75
eekboard/eekboard-client.h
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||||
|
* Copyright (C) 2010-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/>.
|
||||||
|
*/
|
||||||
|
#ifndef EEKBOARD_CLIENT_H
|
||||||
|
#define EEKBOARD_CLIENT_H 1
|
||||||
|
|
||||||
|
#define __EEKBOARD_CLIENT_H_INSIDE__ 1
|
||||||
|
|
||||||
|
#include <gio/gio.h>
|
||||||
|
#include "eekboard/eekboard-context.h"
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define EEKBOARD_TYPE_CLIENT (eekboard_client_get_type())
|
||||||
|
#define EEKBOARD_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEKBOARD_TYPE_CLIENT, EekboardClient))
|
||||||
|
#define EEKBOARD_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEKBOARD_TYPE_CLIENT, EekboardClientClass))
|
||||||
|
#define EEKBOARD_IS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEKBOARD_TYPE_CLIENT))
|
||||||
|
#define EEKBOARD_IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEKBOARD_TYPE_CLIENT))
|
||||||
|
#define EEKBOARD_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEKBOARD_TYPE_CLIENT, EekboardClientClass))
|
||||||
|
|
||||||
|
typedef struct _EekboardClient EekboardClient;
|
||||||
|
typedef struct _EekboardClientClass EekboardClientClass;
|
||||||
|
typedef struct _EekboardClientPrivate EekboardClientPrivate;
|
||||||
|
|
||||||
|
struct _EekboardClient {
|
||||||
|
/*< private >*/
|
||||||
|
GDBusProxy parent;
|
||||||
|
|
||||||
|
EekboardClientPrivate *priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _EekboardClientClass {
|
||||||
|
/*< private >*/
|
||||||
|
GDBusProxyClass parent_class;
|
||||||
|
|
||||||
|
/* signals */
|
||||||
|
void (* destroyed) (EekboardClient *self);
|
||||||
|
|
||||||
|
/*< private >*/
|
||||||
|
/* padding */
|
||||||
|
gpointer pdummy[23];
|
||||||
|
};
|
||||||
|
|
||||||
|
GType eekboard_client_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
EekboardClient *eekboard_client_new (GDBusConnection *connection,
|
||||||
|
GCancellable *cancellable);
|
||||||
|
EekboardContext *eekboard_client_create_context (EekboardClient *eekboard,
|
||||||
|
const gchar *client_name,
|
||||||
|
GCancellable *cancellable);
|
||||||
|
void eekboard_client_push_context (EekboardClient *eekboard,
|
||||||
|
EekboardContext *context,
|
||||||
|
GCancellable *cancellable);
|
||||||
|
void eekboard_client_pop_context (EekboardClient *eekboard,
|
||||||
|
GCancellable *cancellable);
|
||||||
|
void eekboard_client_destroy_context (EekboardClient *eekboard,
|
||||||
|
EekboardContext *context,
|
||||||
|
GCancellable *cancellable);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
#endif /* EEKBOARD_CLIENT_H */
|
||||||
996
eekboard/eekboard-context-service.c
Normal file
996
eekboard/eekboard-context-service.c
Normal file
@ -0,0 +1,996 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||||
|
* Copyright (C) 2010-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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SECTION:eekboard-context-service
|
||||||
|
* @short_description: base server implementation of eekboard input
|
||||||
|
* context service
|
||||||
|
*
|
||||||
|
* The #EekboardService class provides a base server side
|
||||||
|
* implementation of eekboard input context service.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif /* HAVE_CONFIG_H */
|
||||||
|
|
||||||
|
#include "eekboard/eekboard-context-service.h"
|
||||||
|
#include "eekboard/eekboard-xklutil.h"
|
||||||
|
#include "eek/eek-xkl.h"
|
||||||
|
|
||||||
|
#define CSW 640
|
||||||
|
#define CSH 480
|
||||||
|
|
||||||
|
enum {
|
||||||
|
PROP_0,
|
||||||
|
PROP_OBJECT_PATH,
|
||||||
|
PROP_CONNECTION,
|
||||||
|
PROP_CLIENT_NAME,
|
||||||
|
PROP_KEYBOARD,
|
||||||
|
PROP_VISIBLE,
|
||||||
|
PROP_FULLSCREEN,
|
||||||
|
PROP_LAST
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
ENABLED,
|
||||||
|
DISABLED,
|
||||||
|
LAST_SIGNAL
|
||||||
|
};
|
||||||
|
|
||||||
|
static guint signals[LAST_SIGNAL] = { 0, };
|
||||||
|
|
||||||
|
#define EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(obj) \
|
||||||
|
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEKBOARD_TYPE_CONTEXT_SERVICE, EekboardContextServicePrivate))
|
||||||
|
|
||||||
|
struct _EekboardContextServicePrivate {
|
||||||
|
GDBusConnection *connection;
|
||||||
|
GDBusNodeInfo *introspection_data;
|
||||||
|
guint registration_id;
|
||||||
|
char *object_path;
|
||||||
|
char *client_name;
|
||||||
|
|
||||||
|
gboolean enabled;
|
||||||
|
gboolean visible;
|
||||||
|
gboolean fullscreen;
|
||||||
|
|
||||||
|
EekKeyboard *keyboard;
|
||||||
|
GHashTable *keyboard_hash;
|
||||||
|
|
||||||
|
gulong key_pressed_handler;
|
||||||
|
gulong key_released_handler;
|
||||||
|
|
||||||
|
EekKey *repeat_key;
|
||||||
|
guint repeat_timeout_id;
|
||||||
|
gboolean repeat_triggered;
|
||||||
|
|
||||||
|
GSettings *settings;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (EekboardContextService, eekboard_context_service, G_TYPE_OBJECT);
|
||||||
|
|
||||||
|
static const gchar introspection_xml[] =
|
||||||
|
"<node>"
|
||||||
|
" <interface name='org.fedorahosted.Eekboard.Context'>"
|
||||||
|
" <method name='AddKeyboard'>"
|
||||||
|
" <arg direction='in' type='s' name='keyboard'/>"
|
||||||
|
" <arg direction='out' type='u' name='keyboard_id'/>"
|
||||||
|
" </method>"
|
||||||
|
" <method name='RemoveKeyboard'>"
|
||||||
|
" <arg direction='in' type='u' name='keyboard_id'/>"
|
||||||
|
" </method>"
|
||||||
|
" <method name='SetKeyboard'>"
|
||||||
|
" <arg type='u' name='keyboard_id'/>"
|
||||||
|
" </method>"
|
||||||
|
" <method name='SetFullscreen'>"
|
||||||
|
" <arg type='b' name='fullscreen'/>"
|
||||||
|
" </method>"
|
||||||
|
" <method name='ShowKeyboard'/>"
|
||||||
|
" <method name='HideKeyboard'/>"
|
||||||
|
" <method name='SetGroup'>"
|
||||||
|
" <arg type='i' name='group'/>"
|
||||||
|
" </method>"
|
||||||
|
" <method name='PressKeycode'>"
|
||||||
|
" <arg type='u' name='keycode'/>"
|
||||||
|
" </method>"
|
||||||
|
" <method name='ReleaseKeycode'>"
|
||||||
|
" <arg type='u' name='keycode'/>"
|
||||||
|
" </method>"
|
||||||
|
/* signals */
|
||||||
|
" <signal name='Enabled'/>"
|
||||||
|
" <signal name='Disabled'/>"
|
||||||
|
" <signal name='KeyPressed'>"
|
||||||
|
" <arg type='s' name='keyname'/>"
|
||||||
|
" <arg type='v' name='symbol'/>"
|
||||||
|
" <arg type='u' name='modifiers'/>"
|
||||||
|
" </signal>"
|
||||||
|
" <signal name='VisibilityChanged'>"
|
||||||
|
" <arg type='b' name='visible'/>"
|
||||||
|
" </signal>"
|
||||||
|
" <signal name='KeyboardChanged'>"
|
||||||
|
" <arg type='u' name='keyboard_id'/>"
|
||||||
|
" </signal>"
|
||||||
|
" <signal name='GroupChanged'>"
|
||||||
|
" <arg type='i' name='group'/>"
|
||||||
|
" </signal>"
|
||||||
|
" </interface>"
|
||||||
|
"</node>";
|
||||||
|
|
||||||
|
static void connect_keyboard_signals (EekboardContextService *context);
|
||||||
|
static void disconnect_keyboard_signals
|
||||||
|
(EekboardContextService *context);
|
||||||
|
static void handle_method_call (GDBusConnection *connection,
|
||||||
|
const gchar *sender,
|
||||||
|
const gchar *object_path,
|
||||||
|
const gchar *interface_name,
|
||||||
|
const gchar *method_name,
|
||||||
|
GVariant *parameters,
|
||||||
|
GDBusMethodInvocation *invocation,
|
||||||
|
gpointer user_data);
|
||||||
|
static void emit_visibility_changed_signal
|
||||||
|
(EekboardContextService *context,
|
||||||
|
gboolean visible);
|
||||||
|
|
||||||
|
static const GDBusInterfaceVTable interface_vtable =
|
||||||
|
{
|
||||||
|
handle_method_call,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static EekKeyboard *
|
||||||
|
eekboard_context_service_real_create_keyboard (EekboardContextService *self,
|
||||||
|
const gchar *keyboard_type)
|
||||||
|
{
|
||||||
|
EekKeyboard *keyboard;
|
||||||
|
EekLayout *layout;
|
||||||
|
|
||||||
|
if (g_str_has_prefix (keyboard_type, "xkb:")) {
|
||||||
|
XklConfigRec *rec =
|
||||||
|
eekboard_xkl_config_rec_from_string (&keyboard_type[4]);
|
||||||
|
|
||||||
|
layout = eek_xkl_layout_new ();
|
||||||
|
if (!eek_xkl_layout_set_config (EEK_XKL_LAYOUT(layout), rec)) {
|
||||||
|
g_object_unref (layout);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
gchar *path;
|
||||||
|
GFile *file;
|
||||||
|
GFileInputStream *input;
|
||||||
|
GError *error;
|
||||||
|
|
||||||
|
path = g_strdup_printf ("%s/%s.xml", KEYBOARDDIR, keyboard_type);
|
||||||
|
file = g_file_new_for_path (path);
|
||||||
|
g_free (path);
|
||||||
|
|
||||||
|
error = NULL;
|
||||||
|
input = g_file_read (file, NULL, &error);
|
||||||
|
g_object_unref (file);
|
||||||
|
if (input == NULL)
|
||||||
|
return NULL;
|
||||||
|
layout = eek_xml_layout_new (G_INPUT_STREAM(input));
|
||||||
|
}
|
||||||
|
keyboard = eek_keyboard_new (layout, CSW, CSH);
|
||||||
|
g_object_unref (layout);
|
||||||
|
|
||||||
|
return keyboard;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
eekboard_context_service_set_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
EekboardContextService *context = EEKBOARD_CONTEXT_SERVICE(object);
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
GDBusConnection *connection;
|
||||||
|
gboolean was_visible;
|
||||||
|
|
||||||
|
switch (prop_id) {
|
||||||
|
case PROP_OBJECT_PATH:
|
||||||
|
if (priv->object_path)
|
||||||
|
g_free (priv->object_path);
|
||||||
|
priv->object_path = g_strdup (g_value_get_string (value));
|
||||||
|
break;
|
||||||
|
case PROP_CONNECTION:
|
||||||
|
connection = g_value_get_object (value);
|
||||||
|
if (priv->connection)
|
||||||
|
g_object_unref (priv->connection);
|
||||||
|
priv->connection = g_object_ref (connection);
|
||||||
|
break;
|
||||||
|
case PROP_CLIENT_NAME:
|
||||||
|
if (priv->client_name)
|
||||||
|
g_free (priv->client_name);
|
||||||
|
priv->client_name = g_strdup (g_value_get_string (value));
|
||||||
|
break;
|
||||||
|
case PROP_KEYBOARD:
|
||||||
|
if (priv->keyboard)
|
||||||
|
g_object_unref (priv->keyboard);
|
||||||
|
priv->keyboard = g_value_get_object (value);
|
||||||
|
break;
|
||||||
|
case PROP_VISIBLE:
|
||||||
|
was_visible = priv->visible;
|
||||||
|
priv->visible = g_value_get_boolean (value);
|
||||||
|
if (was_visible != priv->visible)
|
||||||
|
emit_visibility_changed_signal (EEKBOARD_CONTEXT_SERVICE(object),
|
||||||
|
priv->visible);
|
||||||
|
break;
|
||||||
|
case PROP_FULLSCREEN:
|
||||||
|
priv->fullscreen = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
g_object_set_property (object,
|
||||||
|
g_param_spec_get_name (pspec),
|
||||||
|
value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
eekboard_context_service_get_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
EekboardContextService *context = EEKBOARD_CONTEXT_SERVICE(object);
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
|
||||||
|
switch (prop_id) {
|
||||||
|
case PROP_OBJECT_PATH:
|
||||||
|
g_value_set_string (value, priv->object_path);
|
||||||
|
break;
|
||||||
|
case PROP_CONNECTION:
|
||||||
|
g_value_set_object (value, priv->connection);
|
||||||
|
break;
|
||||||
|
case PROP_CLIENT_NAME:
|
||||||
|
g_value_set_string (value, priv->client_name);
|
||||||
|
break;
|
||||||
|
case PROP_KEYBOARD:
|
||||||
|
g_value_set_object (value, priv->keyboard);
|
||||||
|
break;
|
||||||
|
case PROP_VISIBLE:
|
||||||
|
g_value_set_boolean (value, priv->visible);
|
||||||
|
break;
|
||||||
|
case PROP_FULLSCREEN:
|
||||||
|
g_value_set_boolean (value, priv->fullscreen);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
g_object_set_property (object,
|
||||||
|
g_param_spec_get_name (pspec),
|
||||||
|
value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
eekboard_context_service_dispose (GObject *object)
|
||||||
|
{
|
||||||
|
EekboardContextService *context = EEKBOARD_CONTEXT_SERVICE(object);
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
|
||||||
|
if (priv->keyboard_hash) {
|
||||||
|
g_hash_table_destroy (priv->keyboard_hash);
|
||||||
|
priv->keyboard_hash = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (priv->connection) {
|
||||||
|
if (priv->registration_id > 0) {
|
||||||
|
g_dbus_connection_unregister_object (priv->connection,
|
||||||
|
priv->registration_id);
|
||||||
|
priv->registration_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_object_unref (priv->connection);
|
||||||
|
priv->connection = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (priv->introspection_data) {
|
||||||
|
g_dbus_node_info_unref (priv->introspection_data);
|
||||||
|
priv->introspection_data = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (eekboard_context_service_parent_class)->dispose (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
eekboard_context_service_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
EekboardContextService *context = EEKBOARD_CONTEXT_SERVICE(object);
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
|
||||||
|
g_free (priv->object_path);
|
||||||
|
g_free (priv->client_name);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (eekboard_context_service_parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
eekboard_context_service_constructed (GObject *object)
|
||||||
|
{
|
||||||
|
EekboardContextService *context = EEKBOARD_CONTEXT_SERVICE (object);
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
|
||||||
|
if (priv->connection && priv->object_path) {
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
priv->registration_id = g_dbus_connection_register_object
|
||||||
|
(priv->connection,
|
||||||
|
priv->object_path,
|
||||||
|
priv->introspection_data->interfaces[0],
|
||||||
|
&interface_vtable,
|
||||||
|
context,
|
||||||
|
NULL,
|
||||||
|
&error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
eekboard_context_service_class_init (EekboardContextServiceClass *klass)
|
||||||
|
{
|
||||||
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
|
GParamSpec *pspec;
|
||||||
|
|
||||||
|
g_type_class_add_private (gobject_class,
|
||||||
|
sizeof (EekboardContextServicePrivate));
|
||||||
|
|
||||||
|
klass->create_keyboard = eekboard_context_service_real_create_keyboard;
|
||||||
|
klass->show_keyboard = NULL;
|
||||||
|
klass->hide_keyboard = NULL;
|
||||||
|
|
||||||
|
gobject_class->constructed = eekboard_context_service_constructed;
|
||||||
|
gobject_class->set_property = eekboard_context_service_set_property;
|
||||||
|
gobject_class->get_property = eekboard_context_service_get_property;
|
||||||
|
gobject_class->dispose = eekboard_context_service_dispose;
|
||||||
|
gobject_class->finalize = eekboard_context_service_finalize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekboardContextService::enabled:
|
||||||
|
* @context: an #EekboardContextService
|
||||||
|
*
|
||||||
|
* Emitted when @context is enabled.
|
||||||
|
*/
|
||||||
|
signals[ENABLED] =
|
||||||
|
g_signal_new (I_("enabled"),
|
||||||
|
G_TYPE_FROM_CLASS(gobject_class),
|
||||||
|
G_SIGNAL_RUN_LAST,
|
||||||
|
G_STRUCT_OFFSET(EekboardContextServiceClass, enabled),
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
g_cclosure_marshal_VOID__VOID,
|
||||||
|
G_TYPE_NONE,
|
||||||
|
0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekboardContextService::disabled:
|
||||||
|
* @context: an #EekboardContextService
|
||||||
|
*
|
||||||
|
* Emitted when @context is enabled.
|
||||||
|
*/
|
||||||
|
signals[DISABLED] =
|
||||||
|
g_signal_new (I_("disabled"),
|
||||||
|
G_TYPE_FROM_CLASS(gobject_class),
|
||||||
|
G_SIGNAL_RUN_LAST,
|
||||||
|
G_STRUCT_OFFSET(EekboardContextServiceClass, disabled),
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
g_cclosure_marshal_VOID__VOID,
|
||||||
|
G_TYPE_NONE,
|
||||||
|
0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekboardContextService:object-path:
|
||||||
|
*
|
||||||
|
* D-Bus object path.
|
||||||
|
*/
|
||||||
|
pspec = g_param_spec_string ("object-path",
|
||||||
|
"Object-path",
|
||||||
|
"Object-path",
|
||||||
|
NULL,
|
||||||
|
G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_OBJECT_PATH,
|
||||||
|
pspec);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekboardContextService:connection:
|
||||||
|
*
|
||||||
|
* D-Bus connection.
|
||||||
|
*/
|
||||||
|
pspec = g_param_spec_object ("connection",
|
||||||
|
"Connection",
|
||||||
|
"Connection",
|
||||||
|
G_TYPE_DBUS_CONNECTION,
|
||||||
|
G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_CONNECTION,
|
||||||
|
pspec);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekboardContextService:client-name:
|
||||||
|
*
|
||||||
|
* Name of a client who created this context service.
|
||||||
|
*/
|
||||||
|
pspec = g_param_spec_string ("client-name",
|
||||||
|
"Client-name",
|
||||||
|
"Client-name",
|
||||||
|
NULL,
|
||||||
|
G_PARAM_READWRITE);
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_CLIENT_NAME,
|
||||||
|
pspec);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekboardContextService:keyboard:
|
||||||
|
*
|
||||||
|
* An #EekKeyboard currently active in this context.
|
||||||
|
*/
|
||||||
|
pspec = g_param_spec_object ("keyboard",
|
||||||
|
"Keyboard",
|
||||||
|
"Keyboard",
|
||||||
|
EEK_TYPE_KEYBOARD,
|
||||||
|
G_PARAM_READWRITE);
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_KEYBOARD,
|
||||||
|
pspec);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekboardContextService:visible:
|
||||||
|
*
|
||||||
|
* Flag to indicate if keyboard is visible or not.
|
||||||
|
*/
|
||||||
|
pspec = g_param_spec_boolean ("visible",
|
||||||
|
"Visible",
|
||||||
|
"Visible",
|
||||||
|
FALSE,
|
||||||
|
G_PARAM_READWRITE);
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_VISIBLE,
|
||||||
|
pspec);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekboardContextService:fullscreen:
|
||||||
|
*
|
||||||
|
* Flag to indicate if keyboard is rendered in fullscreen mode.
|
||||||
|
*/
|
||||||
|
pspec = g_param_spec_boolean ("fullscreen",
|
||||||
|
"Fullscreen",
|
||||||
|
"Fullscreen",
|
||||||
|
FALSE,
|
||||||
|
G_PARAM_READWRITE);
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_FULLSCREEN,
|
||||||
|
pspec);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
eekboard_context_service_init (EekboardContextService *context)
|
||||||
|
{
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
GError *error;
|
||||||
|
|
||||||
|
error = NULL;
|
||||||
|
priv->introspection_data =
|
||||||
|
g_dbus_node_info_new_for_xml (introspection_xml, &error);
|
||||||
|
g_assert (priv->introspection_data != NULL);
|
||||||
|
|
||||||
|
priv->keyboard_hash =
|
||||||
|
g_hash_table_new_full (g_direct_hash,
|
||||||
|
g_direct_equal,
|
||||||
|
NULL,
|
||||||
|
(GDestroyNotify)g_object_unref);
|
||||||
|
|
||||||
|
priv->settings = g_settings_new ("org.fedorahosted.eekboard");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
disconnect_keyboard_signals (EekboardContextService *context)
|
||||||
|
{
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
|
||||||
|
if (g_signal_handler_is_connected (priv->keyboard,
|
||||||
|
priv->key_pressed_handler))
|
||||||
|
g_signal_handler_disconnect (priv->keyboard,
|
||||||
|
priv->key_pressed_handler);
|
||||||
|
if (g_signal_handler_is_connected (priv->keyboard,
|
||||||
|
priv->key_released_handler))
|
||||||
|
g_signal_handler_disconnect (priv->keyboard,
|
||||||
|
priv->key_released_handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
emit_visibility_changed_signal (EekboardContextService *context,
|
||||||
|
gboolean visible)
|
||||||
|
{
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
|
||||||
|
if (priv->connection && priv->enabled) {
|
||||||
|
GError *error = NULL;
|
||||||
|
g_dbus_connection_emit_signal (priv->connection,
|
||||||
|
NULL,
|
||||||
|
priv->object_path,
|
||||||
|
EEKBOARD_CONTEXT_SERVICE_INTERFACE,
|
||||||
|
"VisibilityChanged",
|
||||||
|
g_variant_new ("(b)", visible),
|
||||||
|
&error);
|
||||||
|
g_assert_no_error (error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
emit_group_changed_signal (EekboardContextService *context,
|
||||||
|
gint group)
|
||||||
|
{
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
|
||||||
|
if (priv->connection && priv->enabled) {
|
||||||
|
GError *error = NULL;
|
||||||
|
g_dbus_connection_emit_signal (priv->connection,
|
||||||
|
NULL,
|
||||||
|
priv->object_path,
|
||||||
|
EEKBOARD_CONTEXT_SERVICE_INTERFACE,
|
||||||
|
"GroupChanged",
|
||||||
|
g_variant_new ("(i)", group),
|
||||||
|
&error);
|
||||||
|
g_assert_no_error (error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
emit_key_pressed_dbus_signal (EekboardContextService *context,
|
||||||
|
EekKey *key)
|
||||||
|
{
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
|
||||||
|
if (priv->connection && priv->enabled) {
|
||||||
|
const gchar *keyname = eek_element_get_name (EEK_ELEMENT(key));
|
||||||
|
EekSymbol *symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
|
||||||
|
guint modifiers = eek_keyboard_get_modifiers (priv->keyboard);
|
||||||
|
GVariant *variant;
|
||||||
|
GError *error;
|
||||||
|
|
||||||
|
variant = eek_serializable_serialize (EEK_SERIALIZABLE(symbol));
|
||||||
|
|
||||||
|
error = NULL;
|
||||||
|
g_dbus_connection_emit_signal (priv->connection,
|
||||||
|
NULL,
|
||||||
|
priv->object_path,
|
||||||
|
EEKBOARD_CONTEXT_SERVICE_INTERFACE,
|
||||||
|
"KeyPressed",
|
||||||
|
g_variant_new ("(svu)",
|
||||||
|
keyname,
|
||||||
|
variant,
|
||||||
|
modifiers),
|
||||||
|
&error);
|
||||||
|
g_variant_unref (variant);
|
||||||
|
g_assert_no_error (error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean on_repeat_timeout (EekboardContextService *context);
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
on_repeat_timeout (EekboardContextService *context)
|
||||||
|
{
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
guint delay;
|
||||||
|
|
||||||
|
g_settings_get (priv->settings, "repeat-interval", "u", &delay);
|
||||||
|
|
||||||
|
emit_key_pressed_dbus_signal (context, priv->repeat_key);
|
||||||
|
|
||||||
|
priv->repeat_timeout_id =
|
||||||
|
g_timeout_add (delay,
|
||||||
|
(GSourceFunc)on_repeat_timeout,
|
||||||
|
context);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
on_repeat_timeout_init (EekboardContextService *context)
|
||||||
|
{
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
|
||||||
|
emit_key_pressed_dbus_signal (context, priv->repeat_key);
|
||||||
|
|
||||||
|
/* FIXME: clear modifiers for further key repeat; better not
|
||||||
|
depend on modifier behavior is LATCH */
|
||||||
|
eek_keyboard_set_modifiers (priv->keyboard, 0);
|
||||||
|
|
||||||
|
/* reschedule repeat timeout only when "repeat" option is set */
|
||||||
|
if (g_settings_get_boolean (priv->settings, "repeat")) {
|
||||||
|
guint delay;
|
||||||
|
|
||||||
|
g_settings_get (priv->settings, "repeat-interval", "u", &delay);
|
||||||
|
priv->repeat_timeout_id =
|
||||||
|
g_timeout_add (delay,
|
||||||
|
(GSourceFunc)on_repeat_timeout,
|
||||||
|
context);
|
||||||
|
} else
|
||||||
|
priv->repeat_timeout_id = 0;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
on_key_pressed (EekKeyboard *keyboard,
|
||||||
|
EekKey *key,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
EekboardContextService *context = user_data;
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
guint delay;
|
||||||
|
|
||||||
|
g_settings_get (priv->settings, "repeat-delay", "u", &delay);
|
||||||
|
|
||||||
|
if (priv->repeat_timeout_id) {
|
||||||
|
g_source_remove (priv->repeat_timeout_id);
|
||||||
|
priv->repeat_timeout_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
priv->repeat_key = key;
|
||||||
|
priv->repeat_timeout_id =
|
||||||
|
g_timeout_add (delay,
|
||||||
|
(GSourceFunc)on_repeat_timeout_init,
|
||||||
|
context);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
on_key_released (EekKeyboard *keyboard,
|
||||||
|
EekKey *key,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
EekboardContextService *context = user_data;
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
|
||||||
|
if (priv->repeat_timeout_id > 0) {
|
||||||
|
g_source_remove (priv->repeat_timeout_id);
|
||||||
|
priv->repeat_timeout_id = 0;
|
||||||
|
|
||||||
|
/* KeyPressed signal has not been emitted in repeat handler */
|
||||||
|
emit_key_pressed_dbus_signal (context, priv->repeat_key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
connect_keyboard_signals (EekboardContextService *context)
|
||||||
|
{
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
|
||||||
|
priv->key_pressed_handler =
|
||||||
|
g_signal_connect (priv->keyboard, "key-pressed",
|
||||||
|
G_CALLBACK(on_key_pressed),
|
||||||
|
context);
|
||||||
|
priv->key_released_handler =
|
||||||
|
g_signal_connect (priv->keyboard, "key-released",
|
||||||
|
G_CALLBACK(on_key_released),
|
||||||
|
context);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
handle_method_call (GDBusConnection *connection,
|
||||||
|
const gchar *sender,
|
||||||
|
const gchar *object_path,
|
||||||
|
const gchar *interface_name,
|
||||||
|
const gchar *method_name,
|
||||||
|
GVariant *parameters,
|
||||||
|
GDBusMethodInvocation *invocation,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
EekboardContextService *context = user_data;
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
EekboardContextServiceClass *klass = EEKBOARD_CONTEXT_SERVICE_GET_CLASS(context);
|
||||||
|
|
||||||
|
if (g_strcmp0 (method_name, "AddKeyboard") == 0) {
|
||||||
|
const gchar *keyboard_type;
|
||||||
|
static guint keyboard_id = 0;
|
||||||
|
EekKeyboard *keyboard;
|
||||||
|
|
||||||
|
g_variant_get (parameters, "(&s)", &keyboard_type);
|
||||||
|
keyboard = klass->create_keyboard (context, keyboard_type);
|
||||||
|
|
||||||
|
if (keyboard == NULL) {
|
||||||
|
g_dbus_method_invocation_return_error (invocation,
|
||||||
|
G_IO_ERROR,
|
||||||
|
G_IO_ERROR_FAILED_HANDLED,
|
||||||
|
"can't create a keyboard");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
eek_keyboard_set_modifier_behavior (keyboard,
|
||||||
|
EEK_MODIFIER_BEHAVIOR_LATCH);
|
||||||
|
|
||||||
|
keyboard_id++;
|
||||||
|
g_hash_table_insert (priv->keyboard_hash,
|
||||||
|
GUINT_TO_POINTER(keyboard_id),
|
||||||
|
keyboard);
|
||||||
|
g_object_set_data (G_OBJECT(keyboard),
|
||||||
|
"keyboard-id",
|
||||||
|
GUINT_TO_POINTER(keyboard_id));
|
||||||
|
g_dbus_method_invocation_return_value (invocation,
|
||||||
|
g_variant_new ("(u)",
|
||||||
|
keyboard_id));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_strcmp0 (method_name, "RemoveKeyboard") == 0) {
|
||||||
|
guint keyboard_id, current_keyboard_id;
|
||||||
|
|
||||||
|
g_variant_get (parameters, "(u)", &keyboard_id);
|
||||||
|
|
||||||
|
current_keyboard_id =
|
||||||
|
GPOINTER_TO_UINT (g_object_get_data (G_OBJECT(priv->keyboard),
|
||||||
|
"keyboard-id"));
|
||||||
|
if (keyboard_id == current_keyboard_id) {
|
||||||
|
disconnect_keyboard_signals (context);
|
||||||
|
priv->keyboard = NULL;
|
||||||
|
g_object_notify (G_OBJECT(context), "keyboard");
|
||||||
|
}
|
||||||
|
|
||||||
|
g_hash_table_remove (priv->keyboard_hash,
|
||||||
|
GUINT_TO_POINTER(keyboard_id));
|
||||||
|
g_dbus_method_invocation_return_value (invocation, NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_strcmp0 (method_name, "SetKeyboard") == 0) {
|
||||||
|
EekKeyboard *keyboard;
|
||||||
|
guint keyboard_id;
|
||||||
|
gint group;
|
||||||
|
|
||||||
|
g_variant_get (parameters, "(u)", &keyboard_id);
|
||||||
|
|
||||||
|
keyboard = g_hash_table_lookup (priv->keyboard_hash,
|
||||||
|
GUINT_TO_POINTER(keyboard_id));
|
||||||
|
if (!keyboard) {
|
||||||
|
g_dbus_method_invocation_return_error (invocation,
|
||||||
|
G_IO_ERROR,
|
||||||
|
G_IO_ERROR_FAILED_HANDLED,
|
||||||
|
"no such keyboard");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyboard == priv->keyboard) {
|
||||||
|
g_dbus_method_invocation_return_value (invocation, NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (priv->keyboard)
|
||||||
|
disconnect_keyboard_signals (context);
|
||||||
|
|
||||||
|
priv->keyboard = keyboard;
|
||||||
|
connect_keyboard_signals (context);
|
||||||
|
|
||||||
|
g_dbus_method_invocation_return_value (invocation, NULL);
|
||||||
|
|
||||||
|
group = eek_element_get_group (EEK_ELEMENT(priv->keyboard));
|
||||||
|
emit_group_changed_signal (context, group);
|
||||||
|
|
||||||
|
g_object_notify (G_OBJECT(context), "keyboard");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_strcmp0 (method_name, "SetFullscreen") == 0) {
|
||||||
|
gboolean fullscreen;
|
||||||
|
|
||||||
|
g_variant_get (parameters, "(b)", &fullscreen);
|
||||||
|
|
||||||
|
if (priv->fullscreen == fullscreen) {
|
||||||
|
g_dbus_method_invocation_return_value (invocation, NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
priv->fullscreen = fullscreen;
|
||||||
|
g_dbus_method_invocation_return_value (invocation, NULL);
|
||||||
|
|
||||||
|
g_object_notify (G_OBJECT(context), "fullscreen");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_strcmp0 (method_name, "SetGroup") == 0) {
|
||||||
|
gint group;
|
||||||
|
|
||||||
|
if (!priv->keyboard) {
|
||||||
|
g_dbus_method_invocation_return_error (invocation,
|
||||||
|
G_IO_ERROR,
|
||||||
|
G_IO_ERROR_FAILED_HANDLED,
|
||||||
|
"keyboard is not set");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_variant_get (parameters, "(i)", &group);
|
||||||
|
eek_element_set_group (EEK_ELEMENT(priv->keyboard), group);
|
||||||
|
g_dbus_method_invocation_return_value (invocation, NULL);
|
||||||
|
emit_group_changed_signal (context, group);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_strcmp0 (method_name, "ShowKeyboard") == 0) {
|
||||||
|
if (!priv->keyboard) {
|
||||||
|
g_dbus_method_invocation_return_error (invocation,
|
||||||
|
G_IO_ERROR,
|
||||||
|
G_IO_ERROR_FAILED_HANDLED,
|
||||||
|
"keyboard is not set");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (klass->show_keyboard)
|
||||||
|
klass->show_keyboard (context);
|
||||||
|
g_dbus_method_invocation_return_value (invocation, NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_strcmp0 (method_name, "HideKeyboard") == 0) {
|
||||||
|
if (klass->hide_keyboard)
|
||||||
|
klass->hide_keyboard (context);
|
||||||
|
g_dbus_method_invocation_return_value (invocation, NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_strcmp0 (method_name, "PressKeycode") == 0 ||
|
||||||
|
g_strcmp0 (method_name, "ReleaseKeycode") == 0) {
|
||||||
|
EekKey *key;
|
||||||
|
guint keycode;
|
||||||
|
|
||||||
|
if (!priv->keyboard) {
|
||||||
|
g_dbus_method_invocation_return_error (invocation,
|
||||||
|
G_IO_ERROR,
|
||||||
|
G_IO_ERROR_FAILED_HANDLED,
|
||||||
|
"keyboard is not set");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_variant_get (parameters, "(u)", &keycode);
|
||||||
|
key = eek_keyboard_find_key_by_keycode (priv->keyboard, keycode);
|
||||||
|
|
||||||
|
if (!key) {
|
||||||
|
g_dbus_method_invocation_return_error (invocation,
|
||||||
|
G_IO_ERROR,
|
||||||
|
G_IO_ERROR_FAILED_HANDLED,
|
||||||
|
"key for %u is not found",
|
||||||
|
keycode);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_strcmp0 (method_name, "PressKeycode") == 0) {
|
||||||
|
g_signal_handler_block (priv->keyboard,
|
||||||
|
priv->key_pressed_handler);
|
||||||
|
g_signal_emit_by_name (key, "pressed");
|
||||||
|
g_signal_handler_unblock (priv->keyboard,
|
||||||
|
priv->key_pressed_handler);
|
||||||
|
} else {
|
||||||
|
g_signal_handler_block (priv->keyboard,
|
||||||
|
priv->key_released_handler);
|
||||||
|
g_signal_emit_by_name (key, "released");
|
||||||
|
g_signal_handler_unblock (priv->keyboard,
|
||||||
|
priv->key_released_handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_dbus_method_invocation_return_value (invocation, NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_return_if_reached ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* eekboard_context_service_enable:
|
||||||
|
* @context: an #EekboardContextService
|
||||||
|
*
|
||||||
|
* Enable @context. This function is called when @context is pushed
|
||||||
|
* by eekboard_service_push_context().
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
eekboard_context_service_enable (EekboardContextService *context)
|
||||||
|
{
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
GError *error;
|
||||||
|
|
||||||
|
g_return_if_fail (EEKBOARD_IS_CONTEXT_SERVICE(context));
|
||||||
|
g_return_if_fail (priv->connection);
|
||||||
|
|
||||||
|
if (!priv->enabled) {
|
||||||
|
priv->enabled = TRUE;
|
||||||
|
|
||||||
|
error = NULL;
|
||||||
|
g_dbus_connection_emit_signal (priv->connection,
|
||||||
|
NULL,
|
||||||
|
priv->object_path,
|
||||||
|
EEKBOARD_CONTEXT_SERVICE_INTERFACE,
|
||||||
|
"Enabled",
|
||||||
|
NULL,
|
||||||
|
&error);
|
||||||
|
g_assert_no_error (error);
|
||||||
|
g_signal_emit_by_name (context, "enabled", NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* eekboard_context_service_disable:
|
||||||
|
* @context: an #EekboardContextService
|
||||||
|
*
|
||||||
|
* Disable @context. This function is called when @context is pushed
|
||||||
|
* by eekboard_service_pop_context().
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
eekboard_context_service_disable (EekboardContextService *context)
|
||||||
|
{
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
GError *error;
|
||||||
|
|
||||||
|
g_return_if_fail (EEKBOARD_IS_CONTEXT_SERVICE(context));
|
||||||
|
g_return_if_fail (priv->connection);
|
||||||
|
|
||||||
|
if (priv->enabled) {
|
||||||
|
priv->enabled = FALSE;
|
||||||
|
|
||||||
|
error = NULL;
|
||||||
|
g_dbus_connection_emit_signal (priv->connection,
|
||||||
|
NULL,
|
||||||
|
priv->object_path,
|
||||||
|
EEKBOARD_CONTEXT_SERVICE_INTERFACE,
|
||||||
|
"Disabled",
|
||||||
|
NULL,
|
||||||
|
&error);
|
||||||
|
g_assert_no_error (error);
|
||||||
|
g_signal_emit_by_name (context, "disabled", NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* eekboard_context_service_get_keyboard:
|
||||||
|
* @context: an #EekboardContextService
|
||||||
|
*
|
||||||
|
* Get keyboard currently active in @context.
|
||||||
|
* Returns: (transfer none): an #EekKeyboard
|
||||||
|
*/
|
||||||
|
EekKeyboard *
|
||||||
|
eekboard_context_service_get_keyboard (EekboardContextService *context)
|
||||||
|
{
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
return priv->keyboard;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* eekboard_context_service_get_fullscreen:
|
||||||
|
* @context: an #EekboardContextService
|
||||||
|
*
|
||||||
|
* Check if keyboard is rendered in fullscreen mode in @context.
|
||||||
|
* Returns: %TRUE or %FALSE
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
eekboard_context_service_get_fullscreen (EekboardContextService *context)
|
||||||
|
{
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
return priv->fullscreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* eekboard_context_service_get_client_name:
|
||||||
|
* @context: an #EekboardContextService
|
||||||
|
*
|
||||||
|
* Get the name of client which created @context.
|
||||||
|
* Returns: (transfer none): a string
|
||||||
|
*/
|
||||||
|
const gchar *
|
||||||
|
eekboard_context_service_get_client_name (EekboardContextService *context)
|
||||||
|
{
|
||||||
|
EekboardContextServicePrivate *priv = EEKBOARD_CONTEXT_SERVICE_GET_PRIVATE(context);
|
||||||
|
return priv->client_name;
|
||||||
|
}
|
||||||
94
eekboard/eekboard-context-service.h
Normal file
94
eekboard/eekboard-context-service.h
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
|
||||||
|
* Copyright (C) 2010-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/>.
|
||||||
|
*/
|
||||||
|
#if !defined(__EEKBOARD_SERVICE_H_INSIDE__) && !defined(EEKBOARD_COMPILATION)
|
||||||
|
#error "Only <eekboard/eekboard-service.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef EEKBOARD_CONTEXT_SERVICE_H
|
||||||
|
#define EEKBOARD_CONTEXT_SERVICE_H 1
|
||||||
|
|
||||||
|
#include <eek/eek.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define EEKBOARD_CONTEXT_SERVICE_PATH "/org/fedorahosted/Eekboard/Context_%d"
|
||||||
|
#define EEKBOARD_CONTEXT_SERVICE_INTERFACE "org.fedorahosted.Eekboard.Context"
|
||||||
|
|
||||||
|
#define EEKBOARD_TYPE_CONTEXT_SERVICE (eekboard_context_service_get_type())
|
||||||
|
#define EEKBOARD_CONTEXT_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEKBOARD_TYPE_CONTEXT_SERVICE, EekboardContextService))
|
||||||
|
#define EEKBOARD_CONTEXT_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEKBOARD_TYPE_CONTEXT_SERVICE, EekboardContextServiceClass))
|
||||||
|
#define EEKBOARD_IS_CONTEXT_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEKBOARD_TYPE_CONTEXT_SERVICE))
|
||||||
|
#define EEKBOARD_IS_CONTEXT_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEKBOARD_TYPE_CONTEXT_SERVICE))
|
||||||
|
#define EEKBOARD_CONTEXT_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEKBOARD_TYPE_CONTEXT_SERVICE, EekboardContextServiceClass))
|
||||||
|
|
||||||
|
typedef struct _EekboardContextService EekboardContextService;
|
||||||
|
typedef struct _EekboardContextServiceClass EekboardContextServiceClass;
|
||||||
|
typedef struct _EekboardContextServicePrivate EekboardContextServicePrivate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekboardContextService:
|
||||||
|
*
|
||||||
|
* The #EekboardContextService structure contains only private data
|
||||||
|
* and should only be accessed using the provided API.
|
||||||
|
*/
|
||||||
|
struct _EekboardContextService {
|
||||||
|
GObject parent;
|
||||||
|
|
||||||
|
EekboardContextServicePrivate *priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekboardContextServiceClass:
|
||||||
|
* @create_keyboard: virtual function for create a keyboard from string
|
||||||
|
* @show_keyboard: virtual function for show a keyboard
|
||||||
|
* @hide_keyboard: virtual function for hide a keyboard
|
||||||
|
* @enabled: class handler for #EekboardContextService::enabled signal
|
||||||
|
* @disabled: class handler for #EekboardContextService::disabled signal
|
||||||
|
*/
|
||||||
|
struct _EekboardContextServiceClass {
|
||||||
|
/*< private >*/
|
||||||
|
GObjectClass parent_class;
|
||||||
|
|
||||||
|
/*< public >*/
|
||||||
|
EekKeyboard *(*create_keyboard) (EekboardContextService *self,
|
||||||
|
const gchar *keyboard_type);
|
||||||
|
void (*show_keyboard) (EekboardContextService *self);
|
||||||
|
void (*hide_keyboard) (EekboardContextService *self);
|
||||||
|
|
||||||
|
/* signals */
|
||||||
|
void (*enabled) (EekboardContextService *self);
|
||||||
|
void (*disabled) (EekboardContextService *self);
|
||||||
|
|
||||||
|
/*< private >*/
|
||||||
|
/* padding */
|
||||||
|
gpointer pdummy[24];
|
||||||
|
};
|
||||||
|
|
||||||
|
GType eekboard_context_service_get_type
|
||||||
|
(void) G_GNUC_CONST;
|
||||||
|
void eekboard_context_service_enable (EekboardContextService *context);
|
||||||
|
void eekboard_context_service_disable (EekboardContextService *context);
|
||||||
|
EekKeyboard *eekboard_context_service_get_keyboard
|
||||||
|
(EekboardContextService *context);
|
||||||
|
gboolean eekboard_context_service_get_fullscreen
|
||||||
|
(EekboardContextService *context);
|
||||||
|
const gchar * eekboard_context_service_get_client_name
|
||||||
|
(EekboardContextService *context);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
#endif /* EEKBOARD_CONTEXT_SERVICE_H */
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user