34 #include "program-handler.h"
35 #include "contiki-net.h"
50 static char log[XSIZE * YSIZE];
51 static struct ctk_label loglabel =
56 telnetd_gui_output(
const char *str1,
int len1,
const char *str2,
int len2)
58 static unsigned int i;
60 for(i = 1; i < YSIZE; ++i) {
61 memcpy(&log[(i - 1) * XSIZE], &log[i * XSIZE], XSIZE);
64 strncpy(&log[(YSIZE - 1) * XSIZE], str1, XSIZE);
66 strncpy(&log[(YSIZE - 1) * XSIZE] + len1, str2, XSIZE - len1);
67 if(len1 + len2 < XSIZE) {
68 log[(YSIZE - 1) * XSIZE + len1 + len2] = 0;
76 telnetd_gui_quit(
void)
82 telnetd_gui_init(
void)
93 memset(log, 0,
sizeof(log));
98 telnetd_gui_eventhandler(process_event_t ev, process_data_t data)
#define CTK_WIDGET_ADD(win, widg)
Add a widget to a window.
process_event_t ctk_signal_window_close
Emitted when a window is closed.
void ctk_window_open(CC_REGISTER_ARG struct ctk_window *w)
Open a window, or bring window to front if already open.
void ctk_window_close(struct ctk_window *w)
Close a window if it is open.
Main header file for the Contiki shell
#define CTK_LABEL(x, y, w, h, text)
Instantiating macro for the ctk_label widget.
void ctk_window_new(struct ctk_window *window, unsigned char w, unsigned char h, char *title)
Create a new window.
PETSCII/ASCII conversion functions.
Representation of a CTK window.
#define CTK_WIDGET_REDRAW(widg)
Add a widget to the redraw queue.