25#include <libnsfb_plot.h>
26#include <libnsfb_event.h>
27#include <libnsfb_cursor.h>
50 { 0, 0, 20, 15,
"`", NSFB_KEY_BACKQUOTE},
51 { 20, 0, 20, 15,
"1", NSFB_KEY_1},
52 { 40, 0, 20, 15,
"2", NSFB_KEY_2},
53 { 60, 0, 20, 15,
"3", NSFB_KEY_3},
54 { 80, 0, 20, 15,
"4", NSFB_KEY_4},
55 { 100, 0, 20, 15,
"5", NSFB_KEY_5},
56 { 120, 0, 20, 15,
"6", NSFB_KEY_6},
57 { 140, 0, 20, 15,
"7", NSFB_KEY_7},
58 { 160, 0, 20, 15,
"8", NSFB_KEY_8},
59 { 180, 0, 20, 15,
"9", NSFB_KEY_9},
60 { 200, 0, 20, 15,
"0", NSFB_KEY_0},
61 { 220, 0, 20, 15,
"-", NSFB_KEY_MINUS},
62 { 240, 0, 20, 15,
"=", NSFB_KEY_EQUALS},
63 { 260, 0, 40, 15,
"\xe2\x8c\xab", NSFB_KEY_BACKSPACE},
64 { 0, 15, 30, 15,
"\xe2\x86\xb9", NSFB_KEY_TAB},
65 { 30, 15, 20, 15,
"q", NSFB_KEY_q},
66 { 50, 15, 20, 15,
"w", NSFB_KEY_w},
67 { 70, 15, 20, 15,
"e", NSFB_KEY_e},
68 { 90, 15, 20, 15,
"r", NSFB_KEY_r},
69 { 110, 15, 20, 15,
"t", NSFB_KEY_t},
70 { 130, 15, 20, 15,
"y", NSFB_KEY_y},
71 { 150, 15, 20, 15,
"u", NSFB_KEY_u},
72 { 170, 15, 20, 15,
"i", NSFB_KEY_i},
73 { 190, 15, 20, 15,
"o", NSFB_KEY_o},
74 { 210, 15, 20, 15,
"p", NSFB_KEY_p},
75 { 230, 15, 20, 15,
"[", NSFB_KEY_LEFTBRACKET},
76 { 250, 15, 20, 15,
"]", NSFB_KEY_RIGHTBRACKET},
77 { 275, 15, 25, 30,
"\xe2\x8f\x8e", NSFB_KEY_RETURN},
78 { 35, 30, 20, 15,
"a", NSFB_KEY_a},
79 { 55, 30, 20, 15,
"s", NSFB_KEY_s},
80 { 75, 30, 20, 15,
"d", NSFB_KEY_d},
81 { 95, 30, 20, 15,
"f", NSFB_KEY_f},
82 { 115, 30, 20, 15,
"g", NSFB_KEY_g},
83 { 135, 30, 20, 15,
"h", NSFB_KEY_h},
84 { 155, 30, 20, 15,
"j", NSFB_KEY_j},
85 { 175, 30, 20, 15,
"k", NSFB_KEY_k},
86 { 195, 30, 20, 15,
"l", NSFB_KEY_l},
87 { 215, 30, 20, 15,
";", NSFB_KEY_SEMICOLON},
88 { 235, 30, 20, 15,
"'", NSFB_KEY_l},
89 { 255, 30, 20, 15,
"#", NSFB_KEY_HASH},
90 { 0, 45, 25, 15,
"\xe2\x87\xa7", NSFB_KEY_LSHIFT},
91 { 25, 45, 20, 15,
"\\", NSFB_KEY_SLASH},
92 { 45, 45, 20, 15,
"z", NSFB_KEY_z},
93 { 65, 45, 20, 15,
"x", NSFB_KEY_x},
94 { 85, 45, 20, 15,
"c", NSFB_KEY_c},
95 { 105, 45, 20, 15,
"v", NSFB_KEY_v},
96 { 125, 45, 20, 15,
"b", NSFB_KEY_b},
97 { 145, 45, 20, 15,
"n", NSFB_KEY_n},
98 { 165, 45, 20, 15,
"m", NSFB_KEY_m},
99 { 185, 45, 20, 15,
",", NSFB_KEY_COMMA},
100 { 205, 45, 20, 15,
".", NSFB_KEY_PERIOD},
101 { 225, 45, 20, 15,
"/", NSFB_KEY_BACKSLASH},
102 { 245, 45, 55, 15,
"\xe2\x87\xa7", NSFB_KEY_RSHIFT},
103 { 40, 67, 185, 15,
"", NSFB_KEY_SPACE},
104 { 250, 60, 20, 15,
"\xe2\x96\xb2", NSFB_KEY_UP},
105 { 230, 67, 20, 15,
"\xe2\x97\x80", NSFB_KEY_LEFT},
106 { 270, 67, 20, 15,
"\xe2\x96\xb6", NSFB_KEY_RIGHT},
107 { 250, 75, 20, 15,
"\xe2\x96\xbc", NSFB_KEY_DOWN},
115 if (cbi->
event->type != NSFB_EVENT_KEY_UP)
129 event.type = cbi->
event->type;
130 event.value.keycode = kbd_button->
keycode;
147 int furniture_width = 18;
149 for (kloop=0; kloop <
KEYCOUNT; kloop++) {
159 wh = (maxy * ww) / maxx;
163 for (kloop=0; kloop <
KEYCOUNT; kloop++) {
Browser window creation and manipulation interface.
fbtk_widget_t * fbtk_get_root_widget(fbtk_widget_t *widget)
find the root widget from any widget in the toolkit hierarchy.
int fbtk_set_mapping(fbtk_widget_t *widget, bool mapped)
Map a widget and request it is redrawn.
int fbtk_get_width(fbtk_widget_t *widget)
Get a widget's width.
int fbtk_set_zorder(fbtk_widget_t *widget, int z)
Set the z order of a widget.
fbtk_widget_t * fbtk_create_window(fbtk_widget_t *parent, int x, int y, int width, int height, colour bg)
Create a window widget.
fbtk_widget_t * fbtk_create_text_button(fbtk_widget_t *window, int x, int y, int width, int height, colour bg, colour fg, fbtk_callback click, void *pw)
Create a button with text.
void fbtk_set_text(fbtk_widget_t *widget, const char *text)
Change the text of a text widget.
fbtk_widget_t * fbtk_create_button(fbtk_widget_t *window, int x, int y, int width, int height, colour c, struct fbtk_bitmap *image, fbtk_callback click, void *pw)
Create a button widget with an image.
int fbtk_get_height(fbtk_widget_t *widget)
Get a widget's height.
void fbtk_input(fbtk_widget_t *widget, nsfb_event_t *event)
Insert input into toolkit.
static struct directory * root
struct fbtk_bitmap osk_image
static struct kbd_button_s kbdbase[KEYCOUNT]
static int osk_click(fbtk_widget_t *widget, fbtk_callback_info *cbi)
static int osk_close(fbtk_widget_t *widget, fbtk_callback_info *cbi)
void map_osk(void)
show the osk.
void fbtk_enable_oskb(fbtk_widget_t *fbtk)
enable the on screen keyboard for input
static fbtk_widget_t * osk
widget callback information