test_close_CFLAGS = @TEST_CFLAGS@ $(AM_CFLAGS)
test_close_LDADD = @TEST_LIBS@ $(top_builddir)/libchimara/libchimara.la
-noinst_LTLIBRARIES = first.la model.la gridtest.la splittest.la multiwin.la styletest.la
+noinst_LTLIBRARIES = first.la model.la gridtest.la splittest.la multiwin.la \
+ styletest.la test-userstyle.la
first_la_SOURCES = first.c
first_la_LDFLAGS = $(TEST_PLUGIN_LIBTOOL_FLAGS)
styletest_la_SOURCES = styletest.c
styletest_la_LDFLAGS = $(TEST_PLUGIN_LIBTOOL_FLAGS)
+
+test_userstyle_la_SOURCES = test-userstyle.c
+test_userstyle_la_LDFLAGS = $(TEST_PLUGIN_LIBTOOL_FLAGS)
--- /dev/null
+#include <libchimara/glk.h>
+
+winid_t mainwin;
+
+void
+glk_main(void)
+{
+ /* Create user style before creating windows */
+ glk_stylehint_set(wintype_AllTypes, style_User1, stylehint_Size, -1);
+ glk_stylehint_set(wintype_AllTypes, style_User2, stylehint_Size, 0);
+
+ mainwin = glk_window_open(0, 0, 0, wintype_TextBuffer, 0);
+ if(!mainwin)
+ return;
+ glk_set_window(mainwin);
+
+ glk_set_style(style_User1);
+ glk_put_string("This text is in User1 and slightly smaller");
+ glk_set_style(style_Normal);
+ glk_put_string(".\n");
+ glk_set_style(style_User2);
+ glk_put_string("This test is in User2 at normal size");
+ glk_set_style(style_Normal);
+ glk_put_string(".\n");
+}