Re-organize API.

EekGtkKeyboard is now a subclass of GtkWidget not EekKeyboard.  Widget
creation is done as follows:

layout = eek_xkl_layout_new (...);
keyboard = eek_keyboard_new (layout, 640, 480);
widget = eek_gtk_keyboard_new (keyboard);

Broken Clutter support is temporarily disabled.
This commit is contained in:
Daiki Ueno
2011-01-22 11:52:20 +09:00
parent cab893b4aa
commit a0167c4cc2
10 changed files with 388 additions and 930 deletions

View File

@ -22,6 +22,7 @@
#include <glib.h>
#include <gtk/gtk.h>
#include "eek-keyboard.h"
G_BEGIN_DECLS
@ -39,7 +40,7 @@ typedef struct _EekGtkKeyboardPrivate EekGtkKeyboardPrivate;
struct _EekGtkKeyboard
{
/*< private >*/
EekKeyboard parent;
GtkDrawingArea parent;
EekGtkKeyboardPrivate *priv;
};
@ -47,16 +48,15 @@ struct _EekGtkKeyboard
struct _EekGtkKeyboardClass
{
/*< private >*/
EekKeyboardClass parent_class;
GtkDrawingAreaClass parent_class;
/*< private >*/
/* padding */
gpointer pdummy[24];
};
GType eek_gtk_keyboard_get_type (void) G_GNUC_CONST;
EekKeyboard *eek_gtk_keyboard_new (void);
GtkWidget *eek_gtk_keyboard_get_widget (EekGtkKeyboard *keyboard);
GType eek_gtk_keyboard_get_type (void) G_GNUC_CONST;
GtkWidget *eek_gtk_keyboard_new (EekKeyboard *keyboard);
G_END_DECLS
#endif /* EEK_GTK_KEYBOARD_H */