aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
authorlecoanet2000-06-21 15:12:04 +0000
committerlecoanet2000-06-21 15:12:04 +0000
commit856eaadedab9badcca413a9c286981e202d6208b (patch)
treeaded67e2a20b9cf38204e31a450e06c636dc1645 /generic
parent2cffe07e8de961a550450dfcfe0bb21abe3b93a8 (diff)
downloadtkzinc-856eaadedab9badcca413a9c286981e202d6208b.zip
tkzinc-856eaadedab9badcca413a9c286981e202d6208b.tar.gz
tkzinc-856eaadedab9badcca413a9c286981e202d6208b.tar.bz2
tkzinc-856eaadedab9badcca413a9c286981e202d6208b.tar.xz
Ajout de la structure TagSearch n�cessaire au nouveau
code de recherche des items/tags. Mise � jour des signatures des fonctions li�es aux recherches tag/item.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkZinc.h30
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);