libeek: add field description for GTK-DOC
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@ -28,9 +28,6 @@ missing
|
|||||||
stamp-h1
|
stamp-h1
|
||||||
libkeyactor*.tar.*
|
libkeyactor*.tar.*
|
||||||
mkinstalldirs
|
mkinstalldirs
|
||||||
docs/reference/eek/eek-overrides.txt
|
|
||||||
docs/reference/eek/eek-sections.txt
|
|
||||||
docs/reference/eek/eek.types
|
|
||||||
m4/*.m4
|
m4/*.m4
|
||||||
gtk-doc.make
|
gtk-doc.make
|
||||||
eek/eek-special-keysym-labels.h
|
eek/eek-special-keysym-labels.h
|
||||||
@ -42,6 +39,7 @@ tests/eek-xkb-test
|
|||||||
src/eekboard
|
src/eekboard
|
||||||
docs/reference/eek/*.stamp
|
docs/reference/eek/*.stamp
|
||||||
docs/reference/eek/*.txt
|
docs/reference/eek/*.txt
|
||||||
|
!/docs/reference/eek/eek-sections.txt
|
||||||
docs/reference/eek/xml
|
docs/reference/eek/xml
|
||||||
docs/reference/eek/html
|
docs/reference/eek/html
|
||||||
docs/reference/eek/eek.signals
|
docs/reference/eek/eek.signals
|
||||||
|
|||||||
23
README
23
README
@ -20,22 +20,23 @@ lot of bugs and lacks documentation.
|
|||||||
|
|
||||||
* libeek API (not fixed)
|
* libeek API (not fixed)
|
||||||
|
|
||||||
libeek provides only two kinds of objects. One is "keyboard element"
|
Since libeek is designed as simple as possible, it provides only two
|
||||||
and another is "keyboard layout engine". A keyboard element
|
kinds of objects. One is "keyboard element" and another is "keyboard
|
||||||
represents either a keyboard, a section, or a key. Each element
|
layout engine". A keyboard element represents either a keyboard, a
|
||||||
implements the Builder pattern[1] so that it can be converted into a
|
section, or a key. Each element implements the Builder pattern[1] so
|
||||||
UI widget (ClutterActor, GTK+ button, ...). A layout engine arranges
|
that it can be converted into a UI widget (ClutterActor,
|
||||||
keyboard elements using information from external configuration
|
GtkDrawingArea, ...). A layout engine arranges keyboard elements
|
||||||
mechanisms (XKB, matchbox-keyboard layouts in XML, ...)
|
using information from external configuration mechanisms (libxklavier,
|
||||||
|
XKB, matchbox-keyboard layouts in XML, ...)
|
||||||
|
|
||||||
Here is a sample code which utilizes Clutter-based keyboard elements
|
Here is a sample code which utilizes Clutter keyboard elements
|
||||||
and an XKB-based layout engine:
|
and libxklavier layout engine:
|
||||||
|
|
||||||
1: EekKeyboard *keyboard;
|
1: EekKeyboard *keyboard;
|
||||||
2: EekLayout *layout;
|
2: EekLayout *layout;
|
||||||
3:
|
3:
|
||||||
4: /* Create a keyboard layout using XKB configuration. */
|
4: /* Create a keyboard layout using libxklavier configuration. */
|
||||||
5: layout = eek_xkb_layout_new (NULL, "kinesis", "in");
|
5: layout = eek_xkl_layout_new ();
|
||||||
6:
|
6:
|
||||||
7: /* Create a keyboard implemented as ClutterActor. */
|
7: /* Create a keyboard implemented as ClutterActor. */
|
||||||
8: keyboard = eek_clutter_keyboard_new (640, 480);
|
8: keyboard = eek_clutter_keyboard_new (640, 480);
|
||||||
|
|||||||
@ -77,9 +77,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= eek-private.h \
|
IGNORE_HFILES= eek-private.h \
|
||||||
eek-keysym.h \
|
eek-drawing.h \
|
||||||
config.h \
|
eek-clutter-key.h \
|
||||||
$(NULL)
|
eek-clutter-section.h \
|
||||||
|
eek-clutter-key-actor.h \
|
||||||
|
eek-clutter-drawing-context.h \
|
||||||
|
config.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
|
||||||
@ -107,8 +110,7 @@ GTKDOC_LIBS = $(top_srcdir)/eek/libeek.la \
|
|||||||
$(top_srcdir)/eek/libeek-xkl.la \
|
$(top_srcdir)/eek/libeek-xkl.la \
|
||||||
$(GOBJECT2_LIBS) \
|
$(GOBJECT2_LIBS) \
|
||||||
$(CLUTTER_LIBS) \
|
$(CLUTTER_LIBS) \
|
||||||
$(XKB_LIBS) \
|
$(XKB_LIBS)
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
# 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
|
||||||
|
|||||||
@ -23,10 +23,12 @@
|
|||||||
<xi:include href="xml/eek-types.xml"/>
|
<xi:include href="xml/eek-types.xml"/>
|
||||||
</chapter>
|
</chapter>
|
||||||
<chapter>
|
<chapter>
|
||||||
<title>Clutter keyboard elements</title>
|
<title>Clutter keyboard</title>
|
||||||
<xi:include href="xml/eek-clutter-keyboard.xml"/>
|
<xi:include href="xml/eek-clutter-keyboard.xml"/>
|
||||||
<xi:include href="xml/eek-clutter-section.xml"/>
|
</chapter>
|
||||||
<xi:include href="xml/eek-clutter-key.xml"/>
|
<chapter>
|
||||||
|
<title>GTK keyboard</title>
|
||||||
|
<xi:include href="xml/eek-gtk-keyboard.xml"/>
|
||||||
</chapter>
|
</chapter>
|
||||||
<chapter>
|
<chapter>
|
||||||
<title>XKB layout engine</title>
|
<title>XKB layout engine</title>
|
||||||
|
|||||||
@ -19,11 +19,6 @@
|
|||||||
* 02110-1301 USA
|
* 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* SECTION:eek-clutter-key-actor
|
|
||||||
* @short_description: Custom #ClutterActor drawing a key shape
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <cogl/cogl.h>
|
#include <cogl/cogl.h>
|
||||||
#include <cogl/cogl-pango.h>
|
#include <cogl/cogl-pango.h>
|
||||||
|
|
||||||
|
|||||||
@ -18,10 +18,6 @@
|
|||||||
* 02110-1301 USA
|
* 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* SECTION:eek-clutter-key
|
|
||||||
* @short_description: #EekKey embedding a #ClutterActor
|
|
||||||
*/
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif /* HAVE_CONFIG_H */
|
#endif /* HAVE_CONFIG_H */
|
||||||
|
|||||||
@ -18,10 +18,6 @@
|
|||||||
* 02110-1301 USA
|
* 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* SECTION:eek-clutter-section
|
|
||||||
* @short_description: #EekSection embedding a #ClutterActor
|
|
||||||
*/
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif /* HAVE_CONFIG_H */
|
#endif /* HAVE_CONFIG_H */
|
||||||
|
|||||||
@ -42,10 +42,16 @@ struct _EekContainer
|
|||||||
/*< private >*/
|
/*< private >*/
|
||||||
EekElement parent;
|
EekElement parent;
|
||||||
|
|
||||||
/*< public >*/
|
|
||||||
EekContainerPrivate *priv;
|
EekContainerPrivate *priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekContainerClass:
|
||||||
|
* @foreach_child: virtual function for iterating over the container's children
|
||||||
|
* @find: virtual function for looking up a child
|
||||||
|
* @child_added: class handler for #EekContainer::child-added
|
||||||
|
* @child_removed: class handler for #EekContainer::child-added
|
||||||
|
*/
|
||||||
struct _EekContainerClass
|
struct _EekContainerClass
|
||||||
{
|
{
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
@ -64,9 +70,6 @@ struct _EekContainerClass
|
|||||||
EekElement *(* find) (EekContainer *self,
|
EekElement *(* find) (EekContainer *self,
|
||||||
EekCompareFunc func,
|
EekCompareFunc func,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
EekElement *(* find_by_position) (EekContainer *self,
|
|
||||||
gdouble x,
|
|
||||||
gdouble y);
|
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (* child_added) (EekContainer *self,
|
void (* child_added) (EekContainer *self,
|
||||||
|
|||||||
@ -317,7 +317,7 @@ eek_element_set_bounds (EekElement *element,
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* the absolute position, use #eek_element_get_absolute_position().
|
* the absolute position, use eek_element_get_absolute_position().
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
eek_element_get_bounds (EekElement *element,
|
eek_element_get_bounds (EekElement *element,
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:eek-gtk-keyboard
|
* SECTION:eek-gtk-keyboard
|
||||||
* @short_description: #EekKeyboard embedding a #GtkActor
|
* @short_description: #EekKeyboard that can be converted into a #GtkWidget
|
||||||
*/
|
*/
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|||||||
@ -44,6 +44,24 @@ struct _EekKey
|
|||||||
EekKeyPrivate *priv;
|
EekKeyPrivate *priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekKeyClass:
|
||||||
|
* @set_keycode: virtual function for setting keycode of the key
|
||||||
|
* @get_keycode: virtual function for getting keycode of the key
|
||||||
|
* @set_keysyms: virtual function for setting symbol matrix of the key
|
||||||
|
* @get_keysyms: virtual function for getting symbol matrix of the key
|
||||||
|
* @get_keysym: virtual function for getting the current symbol of the key
|
||||||
|
* @set_index: virtual function for setting position of the key in the
|
||||||
|
* section
|
||||||
|
* @get_index: virtual function for getting position of the key in the
|
||||||
|
* section
|
||||||
|
* @set_outline: virtual function for setting outline shape of the key
|
||||||
|
* @get_outline: virtual function for getting outline shape of the key
|
||||||
|
* @set_keysym_index: virtual function for setting group and level of the key
|
||||||
|
* @get_keysym_index: virtual function for getting group and level of the key
|
||||||
|
* @pressed: class handler for #EekKey::pressed signal
|
||||||
|
* @released: class handler for #EekKey::released signal
|
||||||
|
*/
|
||||||
struct _EekKeyClass
|
struct _EekKeyClass
|
||||||
{
|
{
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
|
|||||||
@ -45,6 +45,18 @@ struct _EekKeyboard
|
|||||||
EekKeyboardPrivate *priv;
|
EekKeyboardPrivate *priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekKeyboardClass:
|
||||||
|
* @set_keysym_index: virtual function for setting group and level of
|
||||||
|
* the entire keyboard
|
||||||
|
* @get_keysym_index: virtual function for getting group and level of
|
||||||
|
* the entire keyboard
|
||||||
|
* @create_section: virtual function for creating a section
|
||||||
|
* @set_layout: virtual function for setting layout engine
|
||||||
|
* @find_key_by_keycode: virtual function for finding a key in the
|
||||||
|
* keyboard by keycode
|
||||||
|
* @realize: virtual function for applying a layout to the keyboard
|
||||||
|
*/
|
||||||
struct _EekKeyboardClass
|
struct _EekKeyboardClass
|
||||||
{
|
{
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
|
|||||||
@ -22,9 +22,30 @@
|
|||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EEK_INVALID_KEYSYM:
|
||||||
|
*
|
||||||
|
* Pseudo keysym used for error reporting.
|
||||||
|
*/
|
||||||
#define EEK_INVALID_KEYSYM ((guint)(-1))
|
#define EEK_INVALID_KEYSYM ((guint)(-1))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EEK_INVALID_KEYCODE:
|
||||||
|
*
|
||||||
|
* Pseudo keycode used for error reporting.
|
||||||
|
*/
|
||||||
#define EEK_INVALID_KEYCODE ((guint)(-1))
|
#define EEK_INVALID_KEYCODE ((guint)(-1))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekKeysymCategory:
|
||||||
|
* @EEK_KEYSYM_CATEGORY_LETTER: the symbol represents an alphabet letter
|
||||||
|
* @EEK_KEYSYM_CATEGORY_FUNCTION: the symbol represents a function
|
||||||
|
* @EEK_KEYSYM_CATEGORY_KEYNAME: the symbol does not have meaning but
|
||||||
|
* have a name
|
||||||
|
* @EEK_KEYSYM_CATEGORY_UNKNOWN: used for error reporting
|
||||||
|
*
|
||||||
|
* Category of the key symbols.
|
||||||
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
EEK_KEYSYM_CATEGORY_LETTER,
|
EEK_KEYSYM_CATEGORY_LETTER,
|
||||||
EEK_KEYSYM_CATEGORY_FUNCTION,
|
EEK_KEYSYM_CATEGORY_FUNCTION,
|
||||||
|
|||||||
@ -34,6 +34,14 @@ G_BEGIN_DECLS
|
|||||||
typedef struct _EekLayoutIface EekLayoutIface;
|
typedef struct _EekLayoutIface EekLayoutIface;
|
||||||
typedef struct _EekLayout EekLayout;
|
typedef struct _EekLayout EekLayout;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekLayoutIface:
|
||||||
|
* @apply: virtual function for applying the layout to a keyboard
|
||||||
|
* @get_group: virtual function for getting the current group setting
|
||||||
|
* of the layout
|
||||||
|
* @group_changed: class handler for #EekLayout::group-changed signal
|
||||||
|
* @changed: class handler for #EekLayout::changed signal
|
||||||
|
*/
|
||||||
struct _EekLayoutIface
|
struct _EekLayoutIface
|
||||||
{
|
{
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
|
|||||||
@ -44,6 +44,17 @@ struct _EekSection
|
|||||||
EekSectionPrivate *priv;
|
EekSectionPrivate *priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EekSectionClass:
|
||||||
|
* @set_angle: virtual function for setting rotation angle of the section
|
||||||
|
* @get_angle: virtual function for getting rotation angle of the section
|
||||||
|
* @get_n_rows: virtual function for getting the number of rows in the section
|
||||||
|
* @add_row: virtual function for adding a new row to the section
|
||||||
|
* @get_row: virtual function for accessing a row in the section
|
||||||
|
* @create_key: virtual function for creating key in the section
|
||||||
|
* @find_key_by_keycode: virtual function for accessing a key in the
|
||||||
|
* section by keycode
|
||||||
|
*/
|
||||||
struct _EekSectionClass
|
struct _EekSectionClass
|
||||||
{
|
{
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
|
|||||||
Reference in New Issue
Block a user