aboutsummaryrefslogtreecommitdiffstats
path: root/ctimeline.h
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-05-14 17:29:46 +0000
committerJoursoir <chat@joursoir.net>2021-05-14 17:29:46 +0000
commit47bfdd8fc6745228e53cf3d9584b030470de056b (patch)
treed7201b0292babb29b7f8f4161b53fdd8514dc64b /ctimeline.h
parent240b6b6e7fbb302a6e73c3d7aa5b2115ea84d83d (diff)
downloadctimeline-47bfdd8fc6745228e53cf3d9584b030470de056b.tar.gz
ctimeline-47bfdd8fc6745228e53cf3d9584b030470de056b.tar.bz2
ctimeline-47bfdd8fc6745228e53cf3d9584b030470de056b.zip
ctimeline: add context and its init
Context struct added to header file. Code have rewritten with use it.
Diffstat (limited to 'ctimeline.h')
-rw-r--r--ctimeline.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/ctimeline.h b/ctimeline.h
new file mode 100644
index 0000000..28bed28
--- /dev/null
+++ b/ctimeline.h
@@ -0,0 +1,32 @@
+#ifndef CTIMELINE_H
+#define CTIMELINE_H
+
+#include "xstring.h"
+
+struct ctimeline_branch {
+ string *name;
+ int age_from;
+ int age_to;
+ string *desc;
+};
+
+struct ctimeline_branch_list {
+ struct ctimeline_branch *list;
+ int count;
+ int capacity;
+};
+
+struct ctimeline_context {
+ char *head_title;
+ char *css;
+ // char *favicon;
+ char *header_title;
+ char *header_desc;
+
+ struct ctimeline_branch_list branches;
+ struct ctimeline_branch *cur_branch;
+};
+
+extern struct ctimeline_context ctx;
+
+#endif /* CTIMELINE_H */