This commit is contained in:
Daiki Ueno
2011-02-24 10:35:22 +09:00
parent 798df5c136
commit d7554b9735
20 changed files with 312 additions and 130 deletions

View File

@ -76,7 +76,12 @@ EXTRA_HFILES=
# Header files to ignore when scanning. Use base file name, no paths # Header files to ignore when scanning. Use base file name, no paths
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
IGNORE_HFILES=config.h IGNORE_HFILES = \
config.h \
eek-renderer.h \
eek-clutter-renderer.h \
eek-clutter-section.h \
eek-clutter-key.h
# Images to copy into HTML directory. # Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
@ -98,16 +103,15 @@ expand_content_files=eek-overview.xml
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
GTKDOC_CFLAGS = $(GIO2_CFLAGS) GTKDOC_CFLAGS = $(GIO2_CFLAGS)
GTKDOC_LIBS = $(top_srcdir)/eek/libeek.la \ GTKDOC_LIBS = $(top_srcdir)/eek/libeek.la \
$(top_srcdir)/eek/libeek-clutter.la \
$(top_srcdir)/eek/libeek-gtk.la \ $(top_srcdir)/eek/libeek-gtk.la \
$(top_srcdir)/eek/libeek-xkb.la \ $(top_srcdir)/eek/libeek-xkb.la \
$(top_srcdir)/eek/libeek-xkl.la \ $(top_srcdir)/eek/libeek-xkl.la \
$(GIO2_LIBS) \ $(GIO2_LIBS) \
$(CLUTTER_LIBS) \
$(GTK_LIBS) \
$(XKB_LIBS) $(XKB_LIBS)
if ENABLE_CLUTTER
GTKDOC_LIBS += $(top_srcdir)/eek/libeek-clutter.la $(CLUTTER_LIBS)
endif
# This includes the standard gtk-doc make rules, copied by gtkdocize. # This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make include $(top_srcdir)/gtk-doc.make

View File

@ -37,14 +37,16 @@
<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-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"/>
<xi:include href="xml/eek-keyboard.xml"/> <xi:include href="xml/eek-keyboard.xml"/>
<xi:include href="xml/eek-section.xml"/> <xi:include href="xml/eek-section.xml"/>
<xi:include href="xml/eek-key.xml"/> <xi:include href="xml/eek-key.xml"/>
<xi:include href="xml/eek-symbol.xml"/>
<xi:include href="xml/eek-keysym.xml"/>
<xi:include href="xml/eek-layout.xml"/> <xi:include href="xml/eek-layout.xml"/>
<xi:include href="xml/eek-types.xml"/> <xi:include href="xml/eek-types.xml"/>
<xi:include href="xml/eek-keysym.xml"/>
</chapter> </chapter>
<chapter> <chapter>
<title>Clutter Keyboard</title> <title>Clutter Keyboard</title>
@ -62,6 +64,11 @@
<title>XKB Layout Engine</title> <title>XKB Layout Engine</title>
<xi:include href="xml/eek-xkb-layout.xml"/> <xi:include href="xml/eek-xkb-layout.xml"/>
</chapter> </chapter>
<chapter>
<title>XML Layout Engine</title>
<xi:include href="xml/eek-xml-layout.xml"/>
<xi:include href="xml/eek-xml.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"/>

View File

@ -43,19 +43,14 @@ clutter_group_add (CLUTTER_GROUP(stage), actor);
</programlisting> </programlisting>
</informalexample> </informalexample>
<para>The most interesting feature of libeek is that developer can <para>libeek currently supports GTK+ and Clutter as UI toolkits.
choose arbitrary combination of UI toolkits and layout engine To create a keyboard-like #GtkWidget instead of #ClutterActor,
supported by libeek. For example, to create a keyboard-like replace eek_clutter_keyboard_new() with eek_gtk_keyboard_new().
#GtkWidget instead of #ClutterActor, all you need is to replace Similarly, if you want to use XKB configuration directly (without
eek_clutter_keyboard_new() with eek_gtk_keyboard_new() and libxklavier), you will only need to replace eek_xkl_layout_new ()
eek_clutter_keyboard_get_actor() with with eek_xkb_layout_new().</para>
eek_gtk_keyboard_get_widget(). Similarly, if you want to use XKB
configuration directly (without libxklavier), you will only need to
replace eek_xkl_layout_new () with eek_xkb_layout_new().</para>
<para>To achieve portability across different UI toolkits, <para>In the above example, a keyboard is represented as a tree of
there is a seperate represention of keyboard elements apart from
the actual UI widgets. For example, a keyboard is represented as a tree of
#EekElement -- #EekKeyboard contains one or more #EekSection's and #EekElement -- #EekKeyboard contains one or more #EekSection's and
#EekSection contains one or more #EekKey's. Each element may emit #EekSection contains one or more #EekKey's. Each element may emit
events when user pushes the corresponding UI widget.</para> events when user pushes the corresponding UI widget.</para>

View File

@ -2,21 +2,25 @@
<FILE>eek-keyboard</FILE> <FILE>eek-keyboard</FILE>
<TITLE>EekKeyboard</TITLE> <TITLE>EekKeyboard</TITLE>
EekKeyboardClass EekKeyboardClass
EekKeyboardPrivate
EekKeyboard EekKeyboard
eek_keyboard_new eek_keyboard_new
eek_keyboard_get_layout eek_keyboard_get_layout
eek_keyboard_get_size
eek_keyboard_set_size
eek_keyboard_set_symbol_index eek_keyboard_set_symbol_index
eek_keyboard_get_symbol_index eek_keyboard_get_symbol_index
eek_keyboard_get_group
eek_keyboard_get_level
eek_keyboard_set_group eek_keyboard_set_group
eek_keyboard_set_level eek_keyboard_set_level
eek_keyboard_get_size eek_keyboard_get_group
eek_keyboard_get_modifier_behavior eek_keyboard_get_level
eek_keyboard_set_modifier_behavior eek_keyboard_set_modifier_behavior
eek_keyboard_get_modifier_behavior
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
eek_keyboard_add_outline
eek_keyboard_get_outline
<SUBSECTION Standard> <SUBSECTION Standard>
EEK_KEYBOARD EEK_KEYBOARD
EEK_IS_KEYBOARD EEK_IS_KEYBOARD
@ -38,6 +42,7 @@ EEK_IS_LAYOUT
EEK_TYPE_LAYOUT EEK_TYPE_LAYOUT
eek_layout_get_type eek_layout_get_type
EEK_LAYOUT_CLASS EEK_LAYOUT_CLASS
EEK_IS_LAYOUT_CLASS
EEK_LAYOUT_GET_CLASS EEK_LAYOUT_GET_CLASS
</SECTION> </SECTION>
@ -46,6 +51,7 @@ EEK_LAYOUT_GET_CLASS
<TITLE>EekGtkKeyboard</TITLE> <TITLE>EekGtkKeyboard</TITLE>
EekGtkKeyboard EekGtkKeyboard
EekGtkKeyboardClass EekGtkKeyboardClass
EekGtkKeyboardPrivate
eek_gtk_keyboard_new eek_gtk_keyboard_new
<SUBSECTION Standard> <SUBSECTION Standard>
EEK_GTK_KEYBOARD EEK_GTK_KEYBOARD
@ -61,6 +67,7 @@ EEK_GTK_KEYBOARD_GET_CLASS
<FILE>eek-section</FILE> <FILE>eek-section</FILE>
<TITLE>EekSection</TITLE> <TITLE>EekSection</TITLE>
EekSectionClass EekSectionClass
EekSectionPrivate
EekSection EekSection
eek_section_set_angle eek_section_set_angle
eek_section_get_angle eek_section_get_angle
@ -83,11 +90,13 @@ EEK_SECTION_GET_CLASS
<FILE>eek-container</FILE> <FILE>eek-container</FILE>
<TITLE>EekContainer</TITLE> <TITLE>EekContainer</TITLE>
EekContainerClass EekContainerClass
EekContainerPrivate
EekCallback EekCallback
EekCompareFunc EekCompareFunc
EekContainer EekContainer
eek_container_foreach_child eek_container_foreach_child
eek_container_find eek_container_find
eek_container_add_child
<SUBSECTION Standard> <SUBSECTION Standard>
EEK_CONTAINER EEK_CONTAINER
EEK_IS_CONTAINER EEK_IS_CONTAINER
@ -103,6 +112,7 @@ EEK_CONTAINER_GET_CLASS
<TITLE>EekClutterKeyboard</TITLE> <TITLE>EekClutterKeyboard</TITLE>
EekClutterKeyboard EekClutterKeyboard
EekClutterKeyboardClass EekClutterKeyboardClass
EekClutterKeyboardPrivate
eek_clutter_keyboard_new eek_clutter_keyboard_new
<SUBSECTION Standard> <SUBSECTION Standard>
EEK_CLUTTER_KEYBOARD EEK_CLUTTER_KEYBOARD
@ -114,11 +124,39 @@ EEK_IS_CLUTTER_KEYBOARD_CLASS
EEK_CLUTTER_KEYBOARD_GET_CLASS EEK_CLUTTER_KEYBOARD_GET_CLASS
</SECTION> </SECTION>
<SECTION>
<FILE>eek-symbol</FILE>
<TITLE>EekSymbol</TITLE>
EekSymbolCategory
EekSymbolClass
EekSymbolPrivate
EekSymbol
eek_symbol_new
eek_symbol_set_name
eek_symbol_get_name
eek_symbol_set_label
eek_symbol_get_label
eek_symbol_set_category
eek_symbol_get_category
eek_symbol_get_modifier_mask
eek_symbol_set_modifier_mask
eek_symbol_is_modifier
<SUBSECTION Standard>
EEK_SYMBOL
EEK_IS_SYMBOL
EEK_TYPE_SYMBOL
eek_symbol_get_type
EEK_SYMBOL_CLASS
EEK_IS_SYMBOL_CLASS
EEK_SYMBOL_GET_CLASS
</SECTION>
<SECTION> <SECTION>
<FILE>eek-xkl-layout</FILE> <FILE>eek-xkl-layout</FILE>
<TITLE>EekXklLayout</TITLE> <TITLE>EekXklLayout</TITLE>
EekXklLayout EekXklLayout
EekXklLayoutClass EekXklLayoutClass
EekXklLayoutPrivate
eek_xkl_layout_new eek_xkl_layout_new
eek_xkl_layout_set_config eek_xkl_layout_set_config
eek_xkl_layout_set_config_full eek_xkl_layout_set_config_full
@ -126,12 +164,12 @@ eek_xkl_layout_set_model
eek_xkl_layout_set_layouts eek_xkl_layout_set_layouts
eek_xkl_layout_set_variants eek_xkl_layout_set_variants
eek_xkl_layout_set_options eek_xkl_layout_set_options
eek_xkl_layout_enable_option
eek_xkl_layout_disable_option
eek_xkl_layout_get_model eek_xkl_layout_get_model
eek_xkl_layout_get_layouts eek_xkl_layout_get_layouts
eek_xkl_layout_get_variants eek_xkl_layout_get_variants
eek_xkl_layout_get_options eek_xkl_layout_get_options
eek_xkl_layout_disable_option
eek_xkl_layout_enable_option
eek_xkl_layout_get_option eek_xkl_layout_get_option
<SUBSECTION Standard> <SUBSECTION Standard>
EEK_XKL_LAYOUT EEK_XKL_LAYOUT
@ -143,30 +181,16 @@ EEK_IS_XKL_LAYOUT_CLASS
EEK_XKL_LAYOUT_GET_CLASS EEK_XKL_LAYOUT_GET_CLASS
</SECTION> </SECTION>
<SECTION>
<FILE>eek-xml-layout</FILE>
<TITLE>EekXmlLayout</TITLE>
eek_xml_layout_get_source
eek_xml_layout_new
eek_xml_layout_set_source
<SUBSECTION Standard>
EEK_XML_LAYOUT
EEK_IS_XML_LAYOUT
EEK_TYPE_XML_LAYOUT
eek_xml_layout_get_type
EEK_XML_LAYOUT_CLASS
EEK_IS_XML_LAYOUT_CLASS
EEK_XML_LAYOUT_GET_CLASS
</SECTION>
<SECTION> <SECTION>
<FILE>eek-xkb-layout</FILE> <FILE>eek-xkb-layout</FILE>
<TITLE>EekXkbLayout</TITLE> <TITLE>EekXkbLayout</TITLE>
EekXkbLayout EekXkbLayout
EekXkbLayoutClass EekXkbLayoutClass
EekXkbLayoutPrivate
eek_xkb_layout_new eek_xkb_layout_new
eek_xkb_layout_set_names eek_xkb_layout_set_names
eek_xkb_layout_set_names_full eek_xkb_layout_set_names_full
eek_xkb_layout_set_names_full_valist
eek_xkb_layout_set_keycodes eek_xkb_layout_set_keycodes
eek_xkb_layout_set_geometry eek_xkb_layout_set_geometry
eek_xkb_layout_set_symbols eek_xkb_layout_set_symbols
@ -187,18 +211,19 @@ EEK_XKB_LAYOUT_GET_CLASS
<FILE>eek-key</FILE> <FILE>eek-key</FILE>
<TITLE>EekKey</TITLE> <TITLE>EekKey</TITLE>
EekKeyClass EekKeyClass
EekKeyPrivate
EekKey EekKey
eek_key_set_keycode eek_key_set_keycode
eek_key_get_keycode eek_key_get_keycode
eek_key_set_symbol_matrix eek_key_set_symbol_matrix
eek_key_get_symbol_matrix eek_key_get_symbol_matrix
eek_key_get_symbol eek_key_get_symbol
eek_key_get_symbol_at_index
eek_key_get_symbol_with_fallback eek_key_get_symbol_with_fallback
eek_key_get_symbol_at_index
eek_key_set_index eek_key_set_index
eek_key_get_index eek_key_get_index
eek_key_set_outline eek_key_set_oref
eek_key_get_outline eek_key_get_oref
eek_key_is_pressed eek_key_is_pressed
<SUBSECTION Standard> <SUBSECTION Standard>
EEK_KEY EEK_KEY
@ -210,10 +235,26 @@ EEK_IS_KEY_CLASS
EEK_KEY_GET_CLASS EEK_KEY_GET_CLASS
</SECTION> </SECTION>
<SECTION>
<FILE>eek-serializable</FILE>
<TITLE>EekSerializable</TITLE>
EekSerializable
EekSerializableIface
eek_serializable_serialize
eek_serializable_deserialize
<SUBSECTION Standard>
EEK_SERIALIZABLE
EEK_IS_SERIALIZABLE
EEK_TYPE_SERIALIZABLE
eek_serializable_get_type
EEK_SERIALIZABLE_GET_IFACE
</SECTION>
<SECTION> <SECTION>
<FILE>eek-element</FILE> <FILE>eek-element</FILE>
<TITLE>EekElement</TITLE> <TITLE>EekElement</TITLE>
EekElementClass EekElementClass
EekElementPrivate
EekElement EekElement
eek_element_set_parent eek_element_set_parent
eek_element_get_parent eek_element_get_parent
@ -221,6 +262,8 @@ eek_element_set_name
eek_element_get_name eek_element_get_name
eek_element_set_bounds eek_element_set_bounds
eek_element_get_bounds eek_element_get_bounds
eek_element_set_position
eek_element_set_size
eek_element_get_absolute_position eek_element_get_absolute_position
<SUBSECTION Standard> <SUBSECTION Standard>
EEK_ELEMENT EEK_ELEMENT
@ -233,72 +276,36 @@ EEK_ELEMENT_GET_CLASS
</SECTION> </SECTION>
<SECTION> <SECTION>
<FILE>eek-symbol</FILE> <FILE>eek-xml-layout</FILE>
<TITLE>EekSymbol</TITLE> <TITLE>EekXmlLayout</TITLE>
EekSymbolClass EekXmlLayout
EekSymbol EekXmlLayoutClass
eek_symbol_new EekXmlLayoutPrivate
eek_symbol_set_name eek_xml_layout_new
eek_symbol_get_name eek_xml_layout_set_source
eek_symbol_set_label eek_xml_layout_get_source
eek_symbol_get_label
eek_symbol_set_category
eek_symbol_get_category
eek_symbol_set_modifier_mask
eek_symbol_get_modifier_mask
eek_symbol_is_modifier
<SUBSECTION Standard> <SUBSECTION Standard>
EEK_SYMBOL EEK_XML_LAYOUT
EEK_IS_SYMBOL EEK_IS_XML_LAYOUT
EEK_TYPE_SYMBOL EEK_TYPE_XML_LAYOUT
eek_symbol_get_type eek_xml_layout_get_type
EEK_SYMBOL_CLASS EEK_XML_LAYOUT_CLASS
EEK_IS_SYMBOL_CLASS EEK_IS_XML_LAYOUT_CLASS
EEK_SYMBOL_GET_CLASS EEK_XML_LAYOUT_GET_CLASS
</SECTION>
<SECTION>
<FILE>eek-types</FILE>
<TITLE>Basic Types</TITLE>
EekOrientation
EekModifierBehavior
EekModifierType
EekSymbolMatrix
EekSymbolCategory
EEK_TYPE_SYMBOL_MATRIX
eek_symbol_matrix_copy
eek_symbol_matrix_free
eek_symbol_matrix_get_type
eek_symbol_matrix_new
EekPoint
EEK_TYPE_POINT
eek_point_get_type
eek_point_rotate
EekBounds
EEK_TYPE_BOUNDS
eek_bounds_get_type
eek_bounds_long_side
EekOutline
EEK_TYPE_OUTLINE
eek_outline_get_type
EekColor
EEK_TYPE_COLOR
eek_color_get_type
eek_color_new
</SECTION> </SECTION>
<SECTION> <SECTION>
<FILE>eek-keysym</FILE> <FILE>eek-keysym</FILE>
<TITLE>EekKeysym</TITLE> <TITLE>EekKeysym</TITLE>
EEK_KEYSYM
EekKeysymClass EekKeysymClass
EekKeysymPrivate
EekKeysym EekKeysym
EEK_INVALID_KEYSYM
EEK_INVALID_KEYCODE
eek_keysym_get_xkeysym
eek_keysym_new eek_keysym_new
eek_keysym_get_xkeysym
eek_keysym_new_from_name eek_keysym_new_from_name
<SUBSECTION Standard> <SUBSECTION Standard>
EEK_KEYSYM EEK_INVALID_KEYSYM
EEK_IS_KEYSYM EEK_IS_KEYSYM
EEK_TYPE_KEYSYM EEK_TYPE_KEYSYM
eek_keysym_get_type eek_keysym_get_type
@ -306,3 +313,42 @@ EEK_KEYSYM_CLASS
EEK_IS_KEYSYM_CLASS EEK_IS_KEYSYM_CLASS
EEK_KEYSYM_GET_CLASS EEK_KEYSYM_GET_CLASS
</SECTION> </SECTION>
<SECTION>
<FILE>eek-xml</FILE>
EEK_XML_SCHEMA_VERSION
eek_keyboard_output
</SECTION>
<SECTION>
<FILE>eek-types</FILE>
I_
EEK_TYPE_SYMBOL_MATRIX
EEK_TYPE_POINT
EEK_TYPE_BOUNDS
EEK_TYPE_OUTLINE
EEK_TYPE_COLOR
EekOrientation
EekModifierBehavior
EekModifierType
EEK_INVALID_KEYCODE
EekSymbolMatrix
EekPoint
EekBounds
EekOutline
EekColor
eek_symbol_matrix_get_type
eek_symbol_matrix_new
eek_symbol_matrix_copy
eek_symbol_matrix_free
eek_point_get_type
eek_point_rotate
eek_bounds_get_type
eek_bounds_long_side
eek_outline_get_type
eek_outline_copy
eek_outline_free
eek_color_get_type
eek_color_new
</SECTION>

View File

@ -76,7 +76,7 @@ EXTRA_HFILES=
# Header files to ignore when scanning. Use base file name, no paths # Header files to ignore when scanning. Use base file name, no paths
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
IGNORE_HFILES=config.h IGNORE_HFILES=config.h eekboard.h
# Images to copy into HTML directory. # Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
@ -104,7 +104,7 @@ include $(top_srcdir)/gtk-doc.make
# Other files to distribute # Other files to distribute
# e.g. EXTRA_DIST += version.xml.in # e.g. EXTRA_DIST += version.xml.in
EXTRA_DIST += # EXTRA_DIST +=
# Files not to distribute # Files not to distribute
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types

View File

@ -35,8 +35,8 @@
<part id="apireference"> <part id="apireference">
<title>API Manual</title> <title>API Manual</title>
<chapter> <chapter>
<title>D-Bus proxy to eekboard-server</title> <title>D-Bus client interface to eekboard-server</title>
<xi:include href="xml/eekboard-server.xml"/> <xi:include href="xml/eekboard-eekboard.xml"/>
<xi:include href="xml/eekboard-context.xml"/> <xi:include href="xml/eekboard-context.xml"/>
</chapter> </chapter>
<chapter id="object-tree"> <chapter id="object-tree">

View File

@ -1,22 +1,22 @@
<SECTION> <SECTION>
<FILE>eekboard-server</FILE> <FILE>eekboard-eekboard</FILE>
<TITLE>EekboardServer</TITLE> <TITLE>EekboardEekboard</TITLE>
EekboardServer EekboardEekboard
EekboardServerClass EekboardEekboardClass
EekboardServerPrivate EekboardEekboardPrivate
eekboard_server_new eekboard_eekboard_new
eekboard_server_create_context eekboard_eekboard_create_context
eekboard_server_push_context eekboard_eekboard_push_context
eekboard_server_pop_context eekboard_eekboard_pop_context
eekboard_server_destroy_context eekboard_eekboard_destroy_context
<SUBSECTION Standard> <SUBSECTION Standard>
EEKBOARD_SERVER EEKBOARD_EEKBOARD
EEKBOARD_IS_SERVER EEKBOARD_IS_EEKBOARD
EEKBOARD_TYPE_SERVER EEKBOARD_TYPE_EEKBOARD
eekboard_server_get_type eekboard_eekboard_get_type
EEKBOARD_SERVER_CLASS EEKBOARD_EEKBOARD_CLASS
EEKBOARD_IS_SERVER_CLASS EEKBOARD_IS_EEKBOARD_CLASS
EEKBOARD_SERVER_GET_CLASS EEKBOARD_EEKBOARD_GET_CLASS
</SECTION> </SECTION>
<SECTION> <SECTION>

View File

@ -0,0 +1,2 @@
eekboard_context_get_type
eekboard_eekboard_get_type

View File

@ -738,7 +738,7 @@ eek_keyboard_create_section (EekKeyboard *keyboard)
* eek_keyboard_find_key_by_keycode: * eek_keyboard_find_key_by_keycode:
* @keyboard: an #EekKeyboard * @keyboard: an #EekKeyboard
* @keycode: a keycode * @keycode: a keycode
* @returns: (transfer none): #EeekKey whose keycode is @keycode * @returns: (transfer none): #EekKey whose keycode is @keycode
* *
* Find an #EekKey whose keycode is @keycode. * Find an #EekKey whose keycode is @keycode.
*/ */

View File

@ -37,6 +37,12 @@ G_BEGIN_DECLS
typedef struct _EekKeyboardClass EekKeyboardClass; typedef struct _EekKeyboardClass EekKeyboardClass;
typedef struct _EekKeyboardPrivate EekKeyboardPrivate; typedef struct _EekKeyboardPrivate EekKeyboardPrivate;
/**
* EekKeyboard:
*
* The #EekKeyboard structure contains only private data and should
* only be accessed using the provided API.
*/
struct _EekKeyboard struct _EekKeyboard
{ {
/*< private >*/ /*< private >*/
@ -47,16 +53,16 @@ struct _EekKeyboard
/** /**
* EekKeyboardClass: * EekKeyboardClass:
* @set_keysym_index: virtual function for setting group and level of * @set_symbol_index: virtual function for setting group and level of
* the entire keyboard * the entire keyboard
* @get_keysym_index: virtual function for getting group and level of * @get_symbol_index: virtual function for getting group and level of
* the entire keyboard * the entire keyboard
* @create_section: virtual function for creating a section * @create_section: virtual function for creating a section
* @find_key_by_keycode: virtual function for finding a key in the * @find_key_by_keycode: virtual function for finding a key in the
* 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
* @keysym_index_changed: class handler for #EekKeyboard::keysym-index-changed signal * @symbol_index_changed: class handler for #EekKeyboard::symbol-index-changed signal
*/ */
struct _EekKeyboardClass struct _EekKeyboardClass
{ {

View File

@ -17,6 +17,20 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
/**
* SECTION:eek-serializable
* @short_description: Interface implemented by #EekElement to
* serialize it to #GVariant
*
* The #EekSerializableIface interface defines serialize/deserialize
* method of #EekElement.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
#include "eek-serializable.h" #include "eek-serializable.h"
GType GType

View File

@ -31,6 +31,12 @@ G_BEGIN_DECLS
typedef struct _EekSerializable EekSerializable; typedef struct _EekSerializable EekSerializable;
typedef struct _EekSerializableIface EekSerializableIface; typedef struct _EekSerializableIface EekSerializableIface;
/**
* EekSerializableIface:
*
* @serialize: virtual function for serializing object into #GVariant
* @deserialize: virtual function for deserializing object from #GVariant
*/
struct _EekSerializableIface struct _EekSerializableIface
{ {
/*< private >*/ /*< private >*/
@ -41,8 +47,6 @@ struct _EekSerializableIface
gsize (* deserialize) (EekSerializable *object, gsize (* deserialize) (EekSerializable *object,
GVariant *variant, GVariant *variant,
gsize index); gsize index);
void (* copy) (EekSerializable *dest,
const EekSerializable *src);
/*< private >*/ /*< private >*/
/* padding */ /* padding */
@ -51,7 +55,6 @@ struct _EekSerializableIface
GType eek_serializable_get_type (void); GType eek_serializable_get_type (void);
EekSerializable *eek_serializable_copy (EekSerializable *object);
GVariant *eek_serializable_serialize (EekSerializable *object); GVariant *eek_serializable_serialize (EekSerializable *object);
EekSerializable *eek_serializable_deserialize (GVariant *variant); EekSerializable *eek_serializable_deserialize (GVariant *variant);

View File

@ -18,6 +18,13 @@
* 02110-1301 USA * 02110-1301 USA
*/ */
/**
* SECTION:eek-symbol
* @short_description: Base class of a symbol
*
* The #EekSymbolClass class represents a symbol assigned to a key.
*/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif /* HAVE_CONFIG_H */ #endif /* HAVE_CONFIG_H */
@ -256,6 +263,13 @@ eek_symbol_get_label (EekSymbol *symbol)
return g_strdup (priv->label); return g_strdup (priv->label);
} }
/**
* eek_symbol_set_category:
* @symbol: an #EekSymbol
* @category: an #EekSymbolCategory
*
* Set symbol category of @symbol to @category.
*/
void void
eek_symbol_set_category (EekSymbol *symbol, eek_symbol_set_category (EekSymbol *symbol,
EekSymbolCategory category) EekSymbolCategory category)
@ -268,6 +282,12 @@ eek_symbol_set_category (EekSymbol *symbol,
priv->category = category; priv->category = category;
} }
/**
* eek_symbol_get_category:
* @symbol: an #EekSymbol
*
* Returns symbol category of @symbol.
*/
EekSymbolCategory EekSymbolCategory
eek_symbol_get_category (EekSymbol *symbol) eek_symbol_get_category (EekSymbol *symbol)
{ {
@ -279,6 +299,12 @@ eek_symbol_get_category (EekSymbol *symbol)
return priv->category; return priv->category;
} }
/**
* eek_symbol_set_modifier_mask:
* @symbol: an #EekSymbol
*
* Set modifier mask @symbol can trigger.
*/
void void
eek_symbol_set_modifier_mask (EekSymbol *symbol, eek_symbol_set_modifier_mask (EekSymbol *symbol,
EekModifierType mask) EekModifierType mask)
@ -291,6 +317,12 @@ eek_symbol_set_modifier_mask (EekSymbol *symbol,
priv->modifier_mask = mask; priv->modifier_mask = mask;
} }
/**
* eek_symbol_get_modifier_mask:
* @symbol: an #EekSymbol
*
* Returns modifier mask @symbol can trigger.
*/
EekModifierType EekModifierType
eek_symbol_get_modifier_mask (EekSymbol *symbol) eek_symbol_get_modifier_mask (EekSymbol *symbol)
{ {

View File

@ -31,6 +31,11 @@ G_BEGIN_DECLS
* @EEK_SYMBOL_CATEGORY_FUNCTION: the symbol represents a function * @EEK_SYMBOL_CATEGORY_FUNCTION: the symbol represents a function
* @EEK_SYMBOL_CATEGORY_KEYNAME: the symbol does not have meaning but * @EEK_SYMBOL_CATEGORY_KEYNAME: the symbol does not have meaning but
* have a name * have a name
* @EEK_SYMBOL_CATEGORY_USER0: reserved for future use
* @EEK_SYMBOL_CATEGORY_USER1: reserved for future use
* @EEK_SYMBOL_CATEGORY_USER2: reserved for future use
* @EEK_SYMBOL_CATEGORY_USER3: reserved for future use
* @EEK_SYMBOL_CATEGORY_USER4: reserved for future use
* @EEK_SYMBOL_CATEGORY_UNKNOWN: used for error reporting * @EEK_SYMBOL_CATEGORY_UNKNOWN: used for error reporting
* *
* Category of the key symbols. * Category of the key symbols.
@ -59,6 +64,12 @@ typedef enum {
typedef struct _EekSymbolClass EekSymbolClass; typedef struct _EekSymbolClass EekSymbolClass;
typedef struct _EekSymbolPrivate EekSymbolPrivate; typedef struct _EekSymbolPrivate EekSymbolPrivate;
/**
* EekSymbol:
*
* The #EekSymbol structure contains only private data and should only
* be accessed using the provided API.
*/
struct _EekSymbol { struct _EekSymbol {
/*< private >*/ /*< private >*/
GObject parent; GObject parent;
@ -66,6 +77,9 @@ struct _EekSymbol {
EekSymbolPrivate *priv; EekSymbolPrivate *priv;
}; };
/**
* EekSymbolClass:
*/
struct _EekSymbolClass { struct _EekSymbolClass {
/*< private >*/ /*< private >*/
GObjectClass parent_class; GObjectClass parent_class;

View File

@ -64,6 +64,35 @@ typedef enum {
EEK_MODIFIER_BEHAVIOR_LATCH EEK_MODIFIER_BEHAVIOR_LATCH
} EekModifierBehavior; } EekModifierBehavior;
/**
* EekModifierType:
* @EEK_SHIFT_MASK: the Shift key.
* @EEK_LOCK_MASK: a Lock key (depending on the modifier mapping of the
* X server this may either be CapsLock or ShiftLock).
* @EEK_CONTROL_MASK: the Control key.
* @EEK_MOD1_MASK: the fourth modifier key (it depends on the modifier
* mapping of the X server which key is interpreted as this modifier, but
* normally it is the Alt key).
* @EEK_MOD2_MASK: the fifth modifier key (it depends on the modifier
* mapping of the X server which key is interpreted as this modifier).
* @EEK_MOD3_MASK: the sixth modifier key (it depends on the modifier
* mapping of the X server which key is interpreted as this modifier).
* @EEK_MOD4_MASK: the seventh modifier key (it depends on the modifier
* mapping of the X server which key is interpreted as this modifier).
* @EEK_MOD5_MASK: the eighth modifier key (it depends on the modifier
* mapping of the X server which key is interpreted as this modifier).
* @EEK_BUTTON1_MASK: the first mouse button.
* @EEK_BUTTON2_MASK: the second mouse button.
* @EEK_BUTTON3_MASK: the third mouse button.
* @EEK_BUTTON4_MASK: the fourth mouse button.
* @EEK_BUTTON5_MASK: the fifth mouse button.
* @EEK_SUPER_MASK: the Super modifier. Since 2.10
* @EEK_HYPER_MASK: the Hyper modifier. Since 2.10
* @EEK_META_MASK: the Meta modifier. Since 2.10
* @EEK_RELEASE_MASK: not used in EEK itself. GTK+ uses it to differentiate
* between (keyval, modifiers) pairs from key press and release events.
* @EEK_MODIFIER_MASK: a mask covering all modifier types.
*/
typedef enum typedef enum
{ {
EEK_SHIFT_MASK = 1 << 0, EEK_SHIFT_MASK = 1 << 0,

View File

@ -21,13 +21,13 @@
* @short_description: Layout engine which loads layout information from XML * @short_description: Layout engine which loads layout information from XML
*/ */
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif /* HAVE_CONFIG_H */ #endif /* HAVE_CONFIG_H */
#include <stdlib.h>
#include <string.h>
#include "eek-xml-layout.h" #include "eek-xml-layout.h"
#include "eek-keyboard.h" #include "eek-keyboard.h"
#include "eek-section.h" #include "eek-section.h"

View File

@ -35,6 +35,12 @@ typedef struct _EekXmlLayout EekXmlLayout;
typedef struct _EekXmlLayoutClass EekXmlLayoutClass; typedef struct _EekXmlLayoutClass EekXmlLayoutClass;
typedef struct _EekXmlLayoutPrivate EekXmlLayoutPrivate; typedef struct _EekXmlLayoutPrivate EekXmlLayoutPrivate;
/**
* EekXmlLayout:
*
* The #EekXmlLayout structure contains only private data and should
* only be accessed using the provided API.
*/
struct _EekXmlLayout struct _EekXmlLayout
{ {
/*< private >*/ /*< private >*/
@ -43,6 +49,9 @@ struct _EekXmlLayout
EekXmlLayoutPrivate *priv; EekXmlLayoutPrivate *priv;
}; };
/**
* EekXmlLayoutClass:
*/
struct _EekXmlLayoutClass struct _EekXmlLayoutClass
{ {
/*< private >*/ /*< private >*/

View File

@ -16,6 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/**
* SECTION: eek-xml
* @short_description: #EekKeyboard to XML conversion utilities
*/
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <glib/gprintf.h> #include <glib/gprintf.h>
@ -216,6 +221,14 @@ output_section_callback (EekElement *element, gpointer user_data)
g_string_markup_printf (data->output, "</section>\n"); g_string_markup_printf (data->output, "</section>\n");
} }
/**
* eek_keyboard_output:
* @keyboard: an #EekKeyboard
* @output: a GString
* @indent: an integer
*
* Convert @keyboard into the XML format and store it into @output.
*/
void void
eek_keyboard_output (EekKeyboard *keyboard, GString *output, gint indent) eek_keyboard_output (EekKeyboard *keyboard, GString *output, gint indent)
{ {

View File

@ -27,7 +27,9 @@ G_BEGIN_DECLS
#define EEK_XML_SCHEMA_VERSION "0.90" #define EEK_XML_SCHEMA_VERSION "0.90"
void eek_keyboard_output (EekKeyboard *keyboard, GString *output, gint indent); void eek_keyboard_output (EekKeyboard *keyboard,
GString *output,
gint indent);
G_END_DECLS G_END_DECLS
#endif /* EEK_XML_H */ #endif /* EEK_XML_H */

View File

@ -34,6 +34,12 @@ typedef struct _EekboardContext EekboardContext;
typedef struct _EekboardContextClass EekboardContextClass; typedef struct _EekboardContextClass EekboardContextClass;
typedef struct _EekboardContextPrivate EekboardContextPrivate; typedef struct _EekboardContextPrivate EekboardContextPrivate;
/**
* EekboardContext:
*
* The #EekboardContext structure contains only private data and
* should only be accessed using the provided API.
*/
struct _EekboardContext { struct _EekboardContext {
/*< private >*/ /*< private >*/
GDBusProxy parent; GDBusProxy parent;