#include <stdlib.h>
#include <assert.h>
#include <libchimara/glk.h>
+#include <libchimara/garglk.h>
void print_help();
void do_style_test();
{
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;
assert(buffer);
glk_put_string("Welcome to the style test\n");
- glk_put_string("int finish_text_grid_line_input(winid_t win, gboolean\n 11 static void cancel_old_input_request(winid_t win);\n 12 \n 13 /* Internal function: code common to both flavors of char ev\n 14 void\n 15 request_char_event_common(winid_t win, gboolean unicode)\n 16 {\n 17 VALID_WINDOW(win, return);\n 18 g_return_if_fail(win->type != wintype_TextBuffer || win-\n 19 \n 20 cancel_old_input_request(win);\n 21 \n 22 flush_window_buffer(win);\n 23 \n 24 ChimaraGlkPrivate *glk_data = g_private_get(glk_data_key\n 25 \n 26 win->input_request_type = unicode? INPUT_REQUEST_CHARACT\n 27 g_signal_handler_unblock( win->widget, win->char_input_k\n 28 \n 29 gdk_threads_enter();\n 30 \n 31 /*\n 32 if(win->type == wintype_TextBuffer)\n 33 {\n 34 GtkTextBuffer *buffer = gtk_text_view_get_buffer( GT\n 35 GtkTextIter iter;\n 36 gtk_text_buffer_get_end_iter(buffer, &iter);\n 37 gtk_text_buffer_place_cursor(buffer, &iter);\n 38 gtk_text_view_scroll_mark_onscreen(GTK_TEXT_VIEW(win\n 39 // Why doesn't this always work?? \n 40 } */\n 41 \n 42 gtk_widget_grab_focus( GTK_WIDGET(win->widget) );\n 43 gdk_threads_leave();\n 44 \n 47 }\n 48 \n 49 /**\n 50 * glk_request_char_event:\n 51 * @win: A window to request char events from.\n 52 *\n 53 * Request input of a Latin-1 character or special key. A wi\n 54 * requests for both character and line input at the same ti\n 55 * requests for character input of both types (Latin-1 and U\n 56 * illegal to call glk_request_char_event() if the window al\n 57 * request for either character or\n");
glk_request_line_event(mainwin, buffer, 255, 0);
while(strncmp(buffer, "quit", 4))
{
glk_set_style(style_User2);
glk_put_string("User2\n");
+ glk_set_style(style_Header);
+ garglk_set_zcolors(0xFF0000, 0x00FFFF);
+ glk_put_string("Zcolor test\n");
+
glk_set_style(style_Normal);
+ garglk_set_zcolors(0x000000, 0xFFFFFF);
}
void