summaryrefslogtreecommitdiff
path: root/textscreen/txt_widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'textscreen/txt_widget.c')
-rw-r--r--textscreen/txt_widget.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/textscreen/txt_widget.c b/textscreen/txt_widget.c
index b0576a26..68e3d9b5 100644
--- a/textscreen/txt_widget.c
+++ b/textscreen/txt_widget.c
@@ -1,3 +1,4 @@
+#include <stdlib.h>
#include "txt_widget.h"
@@ -16,4 +17,12 @@ void TXT_DestroyWidget(txt_widget_t *widget)
widget->widget_class->destructor(widget);
}
+void TXT_WidgetKeyPress(txt_widget_t *widget, int key)
+{
+ if (widget->widget_class->key_press != NULL)
+ {
+ widget->widget_class->key_press(widget, key);
+ }
+}
+