blob: 1cc8b36c536d71e5004c99375b23d29e040e293a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#include "matchbox-keyboard.h"
struct MBKeyboardLayout
{
MBKeyboard *kbd;
char *id;
List *rows;
};
MBKeyboardLayout*
mb_kbd_layout_new(MBKeyboard *kbd, const char *id)
{
MBKeyboardLayout *layout = NULL;
layout = util_malloc0(sizeof(MBKeyboardLayout));
layout->kbd = kbd;
layout->id = strdup(id);
return layout;
}
void
mb_kbd_layout_append_row(MBKeyboardLayout *layout,
MBKeyboardRow *row)
{
layout->rows = util_list_append(layout->rows, (pointer)row);
}
List*
mb_kbd_layout_rows(MBKeyboardLayout *layout)
{
return util_list_get_first(layout->rows);
}
|