Patch to add $battery_short variable.
[monky] / src / text_object.h
index 0e3e216..60c5a70 100644 (file)
@@ -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 */