"user1",
"user2",
"hyperlink",
- "pager",
"default"
};
str->glk_style = (gchar*) get_glk_tag_name(styl);
}
-/* Internal function: call this to initialize the layout of the 'more' prompt. */
-void
-style_init_more_prompt(winid_t win)
-{
- ChimaraGlkPrivate *glk_data = g_private_get(glk_data_key);
-
- win->pager_layout = gtk_widget_create_pango_layout(win->widget, "More");
- pango_layout_set_attributes(win->pager_layout, glk_data->pager_attr_list);
-}
-
/* Internal function: call this to initialize the default styles to a textbuffer. */
void
style_init_textbuffer(GtkTextBuffer *buffer)
g_object_set(tag, "foreground", "#0000ff", "foreground-set", TRUE, "underline", PANGO_UNDERLINE_SINGLE, "underline-set", TRUE, NULL);
g_hash_table_insert(default_text_buffer_styles, "hyperlink", tag);
- GtkTextTag *pager_tag = gtk_text_tag_new("pager");
- g_object_set(pager_tag, "family", "Monospace", "family-set", TRUE, "foreground", "#ffffff", "foreground-set", TRUE, "background", "#000000", "background-set", TRUE, NULL);
- g_hash_table_insert(default_text_buffer_styles, "pager", pager_tag);
- text_tag_to_attr_list(pager_tag, priv->pager_attr_list);
-
priv->styles->text_grid = default_text_grid_styles;
priv->styles->text_buffer = default_text_buffer_styles;
-
/* Initialize the GLK styles to empty tags */
int i;
for(i=0; i<style_NUMSTYLES; i++) {
}
g_scanner_destroy(scanner);
-
- /* Update the pager prompt to the new style */
- style_update(glk);
}
/* Internal function: parses a token */
}
}
-/* Update pager tag */
-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);
-}
-
/* Determine the current colors used to render the text for a given stream.
* This can be set in a number of places */
static void
}
}
-/* Apply styles to a segment of text in a GtkTextBuffer
+/* Apply styles to a segment of text in a GtkTextBuffer, combining multiple
+ * GtkTextTags.
*/
void
style_apply(winid_t win, GtkTextIter *start, GtkTextIter *end)