X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Ftext_object.h;h=60c5a70d21d960c9193cd7754714b4c59d41803b;hb=b516e1944055bb679e6dcafb4a386bc41b6e2cfd;hp=27fa67aa665aa4585255e1095ae48c6b22f815fd;hpb=ec174bedf2e4af270945973ed851a75c4801333d;p=monky diff --git a/src/text_object.h b/src/text_object.h index 27fa67a..60c5a70 100644 --- a/src/text_object.h +++ b/src/text_object.h @@ -35,6 +35,7 @@ #endif #include "mail.h" /* local_mail_s */ +#include "fs.h" /* struct fs_stat */ #ifdef NVIDIA #include "nvidia.h" /* nvidia_s */ @@ -55,6 +56,7 @@ enum text_object_type { OBJ_battery_time, OBJ_battery_percent, OBJ_battery_bar, + OBJ_battery_short, #endif /* !__OpenBSD__ */ OBJ_buffers, OBJ_cached, @@ -153,11 +155,13 @@ enum text_object_type { OBJ_wireless_link_bar, #endif /* __linux__ */ OBJ_if_empty, + OBJ_if_match, OBJ_if_existing, OBJ_if_mounted, OBJ_if_running, OBJ_top, OBJ_top_mem, + OBJ_top_time, OBJ_tail, OBJ_head, OBJ_lines, @@ -352,6 +356,7 @@ enum text_object_type { struct text_object { struct text_object *next, *prev; /* doubly linked list of text objects */ + struct text_object *sub; /* for objects parsing text into objects */ union { char *s; /* some string */ int i; /* some integer */ @@ -485,10 +490,15 @@ struct text_object { /* text object list helpers */ int append_object(struct text_object *root, struct text_object *obj); -/* ifblock helpers */ -int obj_be_ifblock_if(struct text_object *); -int obj_be_ifblock_else(struct text_object *); -int obj_be_ifblock_endif(struct text_object *); -int ifblock_stack_empty(void); +/* ifblock helpers + * + * Opaque is a pointer to the address of the ifblock stack's top object. + * Calling clients should pass the address of a defined void pointer which + * was initialised to NULL (empty stack). + * */ +int obj_be_ifblock_if(void **opaque, struct text_object *); +int obj_be_ifblock_else(void **opaque, struct text_object *); +int obj_be_ifblock_endif(void **opaque, struct text_object *); +int ifblock_stack_empty(void **opaque); #endif /* _TEXT_OBJECT_H */