From 0415004379587f156f828f535882dc28e95f0781 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 18 Jun 2010 17:24:11 +0900 Subject: [PATCH] doc: add overview --- docs/reference/eek/eek-docs.sgml | 101 +++++++----- docs/reference/eek/eek-overview.xml | 59 +++++++ docs/reference/eek/eek-sections.txt | 243 ++++++++++++++++++++++++++++ 3 files changed, 364 insertions(+), 39 deletions(-) create mode 100644 docs/reference/eek/eek-overview.xml create mode 100644 docs/reference/eek/eek-sections.txt diff --git a/docs/reference/eek/eek-docs.sgml b/docs/reference/eek/eek-docs.sgml index 90d0f297..a79ea9ca 100644 --- a/docs/reference/eek/eek-docs.sgml +++ b/docs/reference/eek/eek-docs.sgml @@ -6,46 +6,69 @@ ]> - eek Reference Manual + libeek Reference Manual - for eek 0.0.0. - + for libeek 0.0.0. + + + 2010 + Daiki Ueno + + + + 2010 + Red Hat, Inc. + + + + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover Texts and + no Back-Cover Texts. A copy of the license is included in the + section entitled "GNU Free Documentation License". + + - - Base classes and interfaces - - - - - - - - - - Clutter keyboard - - - - GTK keyboard - - - - XKB layout engine - - - - Libxklavier layout engine - - - - Object Hierarchy - - - - API Index - - - - + + + API Manual + + Base Classes, Interfaces, and Utilities + + + + + + + + + + + Clutter Keyboard + + + + GTK Keyboard + + + + Libxklavier Layout Engine + + + + XKB Layout Engine + + + + Object Hierarchy + + + + API Index + + + diff --git a/docs/reference/eek/eek-overview.xml b/docs/reference/eek/eek-overview.xml new file mode 100644 index 00000000..48f50e4e --- /dev/null +++ b/docs/reference/eek/eek-overview.xml @@ -0,0 +1,59 @@ + + Overview + + + libeek is a library to create keyboard-like user interface. + Since it is designed as simple as possible, it provides only two + kinds of objects. One is keyboard element + (derived from #EekElement) and another is keyboard + layout engine (which implements the #EekLayout + interface). + + A keyboard element represents either a keyboard + (#EekKeyboard), a section (#EekSection), or a key (#EekKey). Each + element implements the Builder design pattern so that it can be + converted into a UI widget (#ClutterActor, #GtkDrawingArea, + aso). + + A layout engine arranges keyboard elements using information + from external configuration mechanisms (libxklavier, XKB, + matchbox-keyboard layouts in XML, aso) + + Here is a sample code which creates a keyboard-like #ClutterActor using the system layout information from libxklavier: + + + +EekKeyboard *keyboard; +EekLayout *layout; + +/* Create a keyboard layout using libxklavier configuration. */ +layout = eek_xkl_layout_new (); + +/* Create a keyboard 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), + eek_clutter_keyboard_get_actor (EEK_CLUTTER_KEYBOARD(keyboard))); + + + + One of the most interesting features of libeek is that UI + backends can be switched easily. For example, to create a + keyboard-like #GtkWidget instead of #ClutterActor, all you need is + to replace eek_clutter_keyboard_new() with eek_gtk_keyboard_new() + and eek_clutter_keyboard_get_actor() with + eek_gtk_keyboard_get_widget(). + + Another interesting feature is that there is logical represention (model) of keyboard distinct from the UI widget (view). More precisely, #EekKeyboard contains one or more #EekSection's and #EekSection contains one or more #EekKey's, and each element may send events when a user clicked on the UI widget. For example, with the following code, when a user pushed a key widget with keycode 0x38 assigned, on_a_pressed will be called. + + +/* Find a key element in the logical keyboard. */ +EekKey *key = eek_keyboard_find_key_by_keycode (keyboard, 0x38); +g_signal_connect (key, "pressed", on_a_pressed); + + + + \ No newline at end of file diff --git a/docs/reference/eek/eek-sections.txt b/docs/reference/eek/eek-sections.txt new file mode 100644 index 00000000..356f8454 --- /dev/null +++ b/docs/reference/eek/eek-sections.txt @@ -0,0 +1,243 @@ +
+eek-keyboard +EekKeyboard +EekKeyboardClass +EekKeyboardPrivate +EekKeyboard +eek_keyboard_set_keysym_index +eek_keyboard_get_keysym_index +eek_keyboard_create_section +eek_keyboard_set_layout +eek_keyboard_realize +eek_keyboard_find_key_by_keycode + +EEK_KEYBOARD +EEK_IS_KEYBOARD +EEK_TYPE_KEYBOARD +eek_keyboard_get_type +EEK_KEYBOARD_CLASS +EEK_IS_KEYBOARD_CLASS +EEK_KEYBOARD_GET_CLASS +
+ +
+eek-layout +EekLayout +EekLayoutIface +EekLayout +eek_layout_apply +eek_layout_get_group + +EEK_LAYOUT +EEK_IS_LAYOUT +EEK_TYPE_LAYOUT +eek_layout_get_type +EEK_LAYOUT_GET_IFACE +
+ +
+eek-gtk-keyboard +EekGtkKeyboard +EekGtkKeyboard +EekGtkKeyboardClass +EekGtkKeyboardPrivate +eek_gtk_keyboard_new +eek_gtk_keyboard_get_widget + +EEK_GTK_KEYBOARD +EEK_IS_GTK_KEYBOARD +EEK_TYPE_GTK_KEYBOARD +eek_gtk_keyboard_get_type +EEK_GTK_KEYBOARD_CLASS +EEK_IS_GTK_KEYBOARD_CLASS +EEK_GTK_KEYBOARD_GET_CLASS +
+ +
+eek-section +EekSection +EekSectionClass +EekSectionPrivate +EekSection +eek_section_set_angle +eek_section_get_angle +eek_section_get_n_rows +eek_section_add_row +eek_section_get_row +eek_section_create_key +eek_section_find_key_by_keycode + +EEK_SECTION +EEK_IS_SECTION +EEK_TYPE_SECTION +eek_section_get_type +EEK_SECTION_CLASS +EEK_IS_SECTION_CLASS +EEK_SECTION_GET_CLASS +
+ +
+eek-container +EekContainer +EekContainerClass +EekContainerPrivate +EekCallback +EekCompareFunc +EekContainer +eek_container_foreach_child +eek_container_find +eek_container_find_by_position + +EEK_CONTAINER +EEK_IS_CONTAINER +EEK_TYPE_CONTAINER +eek_container_get_type +EEK_CONTAINER_CLASS +EEK_IS_CONTAINER_CLASS +EEK_CONTAINER_GET_CLASS +
+ +
+eek-clutter-keyboard +EekClutterKeyboard +EekClutterKeyboard +EekClutterKeyboardClass +EekClutterKeyboardPrivate +eek_clutter_keyboard_new +eek_clutter_keyboard_get_actor + +EEK_CLUTTER_KEYBOARD +EEK_IS_CLUTTER_KEYBOARD +EEK_TYPE_CLUTTER_KEYBOARD +eek_clutter_keyboard_get_type +EEK_CLUTTER_KEYBOARD_CLASS +EEK_IS_CLUTTER_KEYBOARD_CLASS +EEK_CLUTTER_KEYBOARD_GET_CLASS +
+ +
+eek-xkl-layout +EekXklLayout +EekXklLayout +EekXklLayoutClass +EekXklLayoutPrivate +eek_xkl_layout_new +eek_xkl_layout_set_config +eek_xkl_layout_set_model +eek_xkl_layout_set_layouts +eek_xkl_layout_set_variants +eek_xkl_layout_set_options +eek_xkl_layout_get_model +eek_xkl_layout_get_layouts +eek_xkl_layout_get_variants +eek_xkl_layout_get_options + +EEK_XKL_LAYOUT +EEK_IS_XKL_LAYOUT +EEK_TYPE_XKL_LAYOUT +eek_xkl_layout_get_type +EEK_XKL_LAYOUT_CLASS +EEK_IS_XKL_LAYOUT_CLASS +EEK_XKL_LAYOUT_GET_CLASS +
+ +
+eek-xkb-layout +EekXkbLayout +EekXkbLayout +EekXkbLayoutClass +EekXkbLayoutPrivate +eek_xkb_layout_new +eek_xkb_layout_set_names +eek_xkb_layout_set_keycodes +eek_xkb_layout_set_geometry +eek_xkb_layout_set_symbols +eek_xkb_layout_get_keycodes +eek_xkb_layout_get_geometry +eek_xkb_layout_get_symbols + +EEK_XKB_LAYOUT +EEK_IS_XKB_LAYOUT +EEK_TYPE_XKB_LAYOUT +eek_xkb_layout_get_type +EEK_XKB_LAYOUT_CLASS +EEK_IS_XKB_LAYOUT_CLASS +EEK_XKB_LAYOUT_GET_CLASS +
+ +
+eek-key +EekKey +EekKeyClass +EekKeyPrivate +EekKey +eek_key_set_keycode +eek_key_get_keycode +eek_key_set_keysyms +eek_key_get_keysyms +eek_key_get_keysym +eek_key_set_index +eek_key_get_index +eek_key_set_outline +eek_key_get_outline +eek_key_set_keysym_index +eek_key_get_keysym_index + +EEK_KEY +EEK_IS_KEY +EEK_TYPE_KEY +eek_key_get_type +EEK_KEY_CLASS +EEK_IS_KEY_CLASS +EEK_KEY_GET_CLASS +
+ +
+eek-element +EekElement +EekElementClass +EekElementPrivate +EekElement +eek_element_set_parent +eek_element_get_parent +eek_element_set_name +eek_element_get_name +eek_element_set_bounds +eek_element_get_bounds +eek_element_get_absolute_position + +EEK_ELEMENT +EEK_IS_ELEMENT +EEK_TYPE_ELEMENT +eek_element_get_type +EEK_ELEMENT_CLASS +EEK_IS_ELEMENT_CLASS +EEK_ELEMENT_GET_CLASS +
+ +
+eek-types +EekOrientation +EekKeysymMatrix +EEK_TYPE_KEYSYM_MATRIX +eek_keysym_matrix_get_type +EekPoint +EEK_TYPE_POINT +eek_point_get_type +EekBounds +EEK_TYPE_BOUNDS +eek_bounds_get_type +eek_bounds_long_side +EekOutline +EEK_TYPE_OUTLINE +eek_outline_get_type +
+ +
+eek-keysym +EEK_INVALID_KEYSYM +EEK_INVALID_KEYCODE +EekKeysymCategory +eek_keysym_to_string +eek_keysym_get_category +