diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkZinc.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/generic/tkZinc.h b/generic/tkZinc.h index 5bc84e1..cd052be 100644 --- a/generic/tkZinc.h +++ b/generic/tkZinc.h @@ -35,6 +35,31 @@ #include "List.h" #include "MapInfo.h" +typedef struct _TagSearch { + WidgetInfo *wi; + Item current; /* Pointer to last item returned. */ + Item previous; /* The item right before the current + * is tracked so if the current is + * deleted we don't have to start from the + * beginning. */ + ZnBool over; /* Non-zero means NextItem should always + * return NULL. */ + int type; /* search type */ + int id; /* item id for searches by id */ + + char *tag; /* tag expression string */ + int tag_index; /* current position in string scan */ + int tag_len; /* length of tag expression string */ + + char *rewrite_buf; /* tag string (after removing escapes) */ + unsigned int rewrite_buf_alloc; /* available space for rewrites */ + + struct _TagSearchExpr *expr; /* compiled tag expression */ + GroupItem group; + ZnBool recursive; + ZnList item_stack; +} TagSearch; + #ifdef PTK Tcl_Obj *NewLongObj(long val); Tcl_Obj *NewBooleanObj(ZnBool val); @@ -50,8 +75,9 @@ void SetStringObj(Tcl_Obj *o, char *val); char *Tcl_GetString(Tcl_Obj *obj); #endif -int ZnItemsWithTagOrId(WidgetInfo *wi, Tcl_Obj *tag_or_id, Item *item, - Item **item_list); +int ZnItemWithTagOrId(WidgetInfo *wi, Tcl_Obj *tag_or_id, Item group, + ZnBool recursive, Item *item, TagSearch **search_var); +void ZnTagSearchDestroy(TagSearch *search); int ParseCoordList(WidgetInfo *wi, Tcl_Obj *arg, ZnPoint **pts, int *num_pts); void DoItem(Tcl_Interp *interp, Item item, int part, Tk_Uid tag_uid); |