eb05362005-11-05Henrik Grubbström (Grubba) /* -*- C -*- */
08367e2005-11-04Lance Dillon require gtksourceview;
b1f1782011-10-30Henrik Grubbström (Grubba) not gtksourceview20;
08367e2005-11-04Lance Dillon  class GTK2.KeywordListTag; inherit GTK2.SourceTag; %{ #include "gtksourceview/gtksourceview.h" %} void create(string id, string name, array(string) keywords, int case_sensitive, int match_empty_string_at_beginning, int match_empty_string_at_end, string beginning_regex, string end_regex) //! Creates a new keyword list tag object with the provided arguments. {
ba9e802006-02-27Martin Stjernholm  pgtk2_verify_not_inited(); pgtk2_verify_setup();
08367e2005-11-04Lance Dillon  { GtkTextTag *gtt; char *id,*name,*begin,*end;
cac4202005-12-17Marcus Comstedt  INT_TYPE sense,matchb,matche;
08367e2005-11-04Lance Dillon  struct array *a; struct svalue *sv; GSList *gsl=NULL; int i;
96f5f42018-08-05Martin Nilsson  get_all_args(NULL,args,"%s%s%A%i%i%i%s%s",&id,&name,&a,&sense,
08367e2005-11-04Lance Dillon  &matchb,&matche,&begin,&end); if (a==NULL || a->size<1) { THIS->obj=0; push_int(0); return; } for (i=0; i<a->size; i++) {
5a17b52011-10-30Henrik Grubbström (Grubba)  if (TYPEOF(ITEM(a)[i]) != PIKE_T_STRING)
08367e2005-11-04Lance Dillon  continue; gsl=g_slist_prepend(gsl,STR0((ITEM(a)+i)->u.string)); } gtt=gtk_keyword_list_tag_new(id,name,gsl,sense,matchb,matche, begin,end); THIS->obj=G_OBJECT(gtt); }
ba9e802006-02-27Martin Stjernholm  pgtk2_pop_n_elems(args); pgtk2__init_this_object();
08367e2005-11-04Lance Dillon }