eb05362005-11-05Henrik Grubbström (Grubba) /* -*- C -*- */
08367e2005-11-04Lance Dillon require gtksourceview; class GTK2.SourceStyleScheme;
7caac22014-09-05Chris Angelico //!
08367e2005-11-04Lance Dillon  %{ #include "gtksourceview/gtksourceview.h" %}
b1f1782011-10-30Henrik Grubbström (Grubba) not gtksourceview20;
08367e2005-11-04Lance Dillon mapping(string:mixed) get_tag_style(string name) //! Gets the tag associated with the given name in this style. {
ba9e802006-02-27Martin Stjernholm  pgtk2_verify_inited();
08367e2005-11-04Lance Dillon  { GtkSourceTagStyle *gs; char *name; GdkColor *fg,*bg;
96f5f42018-08-05Martin Nilsson  get_all_args(NULL,args,"%s",&name);
08367e2005-11-04Lance Dillon  gs=gtk_source_style_scheme_get_tag_style((GtkSourceStyleScheme *)THIS->obj, name);
ba9e802006-02-27Martin Stjernholm  pgtk2_pop_n_elems(args);
08367e2005-11-04Lance Dillon  if (gs) {
9fb5032006-01-14Martin Nilsson  ref_push_string(_STR("default")); push_int(gs->is_default); ref_push_string(_STR("mask")); push_int(gs->mask);
08367e2005-11-04Lance Dillon  fg=(GdkColor *)g_malloc(sizeof(GdkColor));
32353e2005-12-30Martin Nilsson  if (fg==NULL) SIMPLE_OUT_OF_MEMORY_ERROR("get_tag_style",sizeof(GdkColor));
08367e2005-11-04Lance Dillon  bg=(GdkColor *)g_malloc(sizeof(GdkColor));
32353e2005-12-30Martin Nilsson  if (bg==NULL)
08367e2005-11-04Lance Dillon  SIMPLE_OUT_OF_MEMORY_ERROR("get_tag_style",sizeof(GdkColor)); *fg=gs->foreground; *bg=gs->background;
e0b3b22008-01-30Per Hedbor  ref_push_string(_STR("foreground")); push_gdkobject(fg,color,1); ref_push_string(_STR("background")); push_gdkobject(bg,color,1);
9fb5032006-01-14Martin Nilsson  ref_push_string(_STR("italic")); push_int(gs->italic); ref_push_string(_STR("bold")); push_int(gs->bold); ref_push_string(_STR("underline")); push_int(gs->underline); ref_push_string(_STR("strikethrough")); push_int(gs->strikethrough);
08367e2005-11-04Lance Dillon  f_aggregate_mapping(16); } else push_int(0); } }
1745d52011-11-01Chris Angelico endnot;
08367e2005-11-04Lance Dillon  string get_name() //! Gets the name of this scheme. {
ba9e802006-02-27Martin Stjernholm  pgtk2_verify_inited(); pgtk2_pop_n_elems(args);
74a5dd2010-09-19Marcus Comstedt  PGTK_PUSH_GCHAR(gtk_source_style_scheme_get_name((GtkSourceStyleScheme *)THIS->obj));
08367e2005-11-04Lance Dillon }