levelkeyboard: Use a layer for managing keyboard views

This commit is contained in:
Dorota Czaplejewicz
2019-08-03 15:52:06 +00:00
parent 0b6935e50c
commit f371b14e89
22 changed files with 231 additions and 324 deletions

View File

@ -30,7 +30,7 @@ static void
test_output_parse (void)
{
EekLayout *layout;
EekKeyboard *keyboard;
LevelKeyboard *keyboard;
GError *error;
error = NULL;
@ -39,9 +39,9 @@ test_output_parse (void)
/* We don't need the context service to parse an XML file, so we can pass
NULL when creating a keyboard. */
keyboard = eek_keyboard_new (NULL, layout, 640, 480);
keyboard = eek_xml_layout_real_create_keyboard(layout, NULL);
g_object_unref (layout);
g_object_unref (keyboard);
level_keyboard_free(keyboard);
}
int

View File

@ -32,14 +32,14 @@ static void
test_check_xkb (void)
{
EekLayout *layout;
EekKeyboard *keyboard;
LevelKeyboard *keyboard;
GError *error;
error = NULL;
layout = eek_xml_layout_new ("us", &error);
g_assert_no_error (error);
keyboard = eek_keyboard_new (NULL, layout, 640, 480);
keyboard = eek_xml_layout_real_create_keyboard(layout, NULL);
gchar *keymap_str = eek_keyboard_get_keymap(keyboard);
struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
@ -58,7 +58,7 @@ test_check_xkb (void)
}
g_object_unref (layout);
g_object_unref (keyboard);
level_keyboard_free(keyboard);
}
int