glk_set_style_stream(glk_data->current_stream, styl);
}
-#define NUM_STYLES 13
static const gchar* TAG_NAMES[] = {
"normal",
"emphasized",
"glk-user2"
};
+const gchar**
+style_get_tag_names()
+{
+ return TAG_NAMES;
+}
+
/* Internal function: mapping from style enum to tag name */
-static gchar*
+static const gchar*
get_tag_name(glui32 style)
{
- if(style >= NUM_STYLES) {
+ if(style >= CHIMARA_NUM_STYLES) {
WARNING("Unsupported style");
return "normal";
} else {
}
/* Internal function: mapping from glk style enum to tag name */
-static gchar*
+static const gchar*
get_glk_tag_name(glui32 style)
{
if(style >= style_NUMSTYLES) {
return;
flush_window_buffer(str->window);
- str->style = get_tag_name(styl);
- str->glk_style = get_glk_tag_name(styl);
+ str->style = (gchar*) get_tag_name(styl);
+ str->glk_style = (gchar*) get_glk_tag_name(styl);
}
/* Internal function: call this to initialize the layout of the 'more' prompt. */
);
}
}
+
+/* Update pager and reverse video tags */
+void
+style_update(ChimaraGlk *glk)
+{
+ CHIMARA_GLK_USE_PRIVATE(glk, priv);
+
+ GtkTextTag *pager_tag = GTK_TEXT_TAG( g_hash_table_lookup(priv->styles->text_buffer, "pager") );
+ text_tag_to_attr_list(pager_tag, priv->pager_attr_list);
+}