blob: c10699b539d7844a6f3cfd0b8c0aa800752b255d (
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
|
#include <stdlib.h>
#include "txt_widget.h"
void TXT_CalcWidgetSize(txt_widget_t *widget, int *w, int *h)
{
return widget->widget_class->size_calc(widget, w, h);
}
void TXT_DrawWidget(txt_widget_t *widget, int w, int selected)
{
widget->widget_class->drawer(widget, w, selected);
}
void TXT_DestroyWidget(txt_widget_t *widget)
{
widget->widget_class->destructor(widget);
}
int TXT_WidgetKeyPress(txt_widget_t *widget, int key)
{
if (widget->widget_class->key_press != NULL)
{
return widget->widget_class->key_press(widget, key);
}
return 0;
}
|