40 lines
1.3 KiB
Plaintext
40 lines
1.3 KiB
Plaintext
eek - easy embedded keyboard
|
|
|
|
*NOTE* This is not usable by now. It has still a lot of bugs and lacks
|
|
many essentital features.
|
|
|
|
* How to test
|
|
|
|
$ git clone git://github.com/ueno/eek.git
|
|
$ cd eek
|
|
$ ./autogen.sh --prefix=/usr --enable-gtk-doc
|
|
$ make
|
|
$ ./examples/eek-clutter-xkb-test --geometry=winbook --symbols=in
|
|
|
|
* API
|
|
|
|
There are two kinds of objects in eek. One is "keyboard element" and
|
|
another is "keyboard layout engine". A keyboard element represents
|
|
either a keyboard, a section, or a key. Each element implements the
|
|
Builder pattern so that it can be converted into a UI widget
|
|
(ClutterActor, GTK+ button, ...). A keyboard layout engine arranges
|
|
keyboard elements using layout rules from external configuration
|
|
mechanisms (XKB, matchbox-keyboard layouts in XML, ...)
|
|
|
|
Here is a sample code which utilizes Clutter-based keyboard elements
|
|
and an XKB-based layout engine:
|
|
|
|
EekKeyboard *keyboard;
|
|
EekLayout *layout;
|
|
|
|
/* Create a keyboard layout from XKB configuration. */
|
|
layout = eek_xkb_layout_new (NULL, "winbook", "in");
|
|
|
|
/* Create a keyboard that is implemented as ClutterActor. */
|
|
keyboard = eek_clutter_keyboard_new ();
|
|
|
|
/* Apply the layout to the keyboard. */
|
|
eek_keyboard_set_layout (keyboard, layout);
|
|
|
|
clutter_group_add (CLUTTER_GROUP(stage), CLUTTER_ACTOR(keyboard));
|