X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Ftext_object.h;h=60c5a70d21d960c9193cd7754714b4c59d41803b;hb=b516e1944055bb679e6dcafb4a386bc41b6e2cfd;hp=0e3e216b6e5efcd5f8ee0c6500ebafe6086ca595;hpb=ca66a26813d57dc37ba6a4609228111199e37e8e;p=monky diff --git a/src/text_object.h b/src/text_object.h index 0e3e216..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 */ @@ -482,4 +487,18 @@ struct text_object { char global_mode; }; +/* text object list helpers */ +int append_object(struct text_object *root, struct text_object *obj); + +/* 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 */