Backend support for using dynamic styles. See also Ticket #49.
[rodin/chimara.git] / tests / styletest.c
index 8165e448383f3b4fe4a139b14d4aa7828d6d51c9..8ed77372268c74d3662adc8a5222636a2942a70c 100644 (file)
@@ -16,6 +16,10 @@ void glk_main(void)
 {
        char stringbuffer[128];
     event_t ev;
+
+       /* Define some custom styles */
+       glk_stylehint_set(wintype_AllTypes, style_User1, stylehint_TextColor, 0x00FF0000);
+
     mainwin = glk_window_open(0, 0, 0, wintype_TextBuffer, 0);
     if(!mainwin)
         return;
@@ -28,7 +32,6 @@ void glk_main(void)
     assert(buffer);
     
     glk_put_string("Welcome to the style test\n");
-
     glk_request_line_event(mainwin, buffer, 255, 0);
     while(strncmp(buffer, "quit", 4)) 
     {
@@ -137,8 +140,11 @@ do_link_test() {
 
 void
 do_mouse_test() {
-       glk_request_mouse_event(mainwin);
+    glk_set_window(statuswin);
+       glk_window_move_cursor(statuswin, 0, 0);
+       glk_put_string("Click me......\n");
        glk_request_mouse_event(statuswin);
+       glk_set_window(mainwin);
 }
 
 void