X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Ftext_object.h;h=60c5a70d21d960c9193cd7754714b4c59d41803b;hb=b516e1944055bb679e6dcafb4a386bc41b6e2cfd;hp=fb22ad391bf89c3db801b60a777f4e9f336e4adf;hpb=9a85812e06f8a278d36b988765c102eaf1c60f88;p=monky diff --git a/src/text_object.h b/src/text_object.h index fb22ad3..60c5a70 100644 --- a/src/text_object.h +++ b/src/text_object.h @@ -56,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, @@ -154,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, @@ -353,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 */ @@ -486,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 */