aboutsummaryrefslogtreecommitdiff
path: root/src/c/event.h
diff options
context:
space:
mode:
authorReiner Herrmann <reiner@reiner-h.de>2026-04-16 23:32:12 +0200
committerReiner Herrmann <reiner@reiner-h.de>2026-04-16 23:33:24 +0200
commiteda36888fc9dd54ea7f8e16487626e97ac741869 (patch)
treea859eb87d6861f3188c197cb73a6b434e629c698 /src/c/event.h
initial commit
Diffstat (limited to 'src/c/event.h')
-rw-r--r--src/c/event.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/c/event.h b/src/c/event.h
new file mode 100644
index 0000000..b59a662
--- /dev/null
+++ b/src/c/event.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2026 Reiner Herrmann
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#ifndef EVENT_H
+#define EVENT_H
+
+#include <pebble.h>
+
+enum Category {
+ CORE = 0,
+ LWS1,
+ LWS2,
+ LWS3,
+ LWS4,
+ IBS,
+ HOT,
+ POF,
+ EOD,
+ SOTO,
+ JW,
+ VOE,
+};
+
+struct Gw2Event {
+ char name[32];
+ uint16_t utc_offset;
+ enum Category category;
+ char location[32];
+ uint8_t schedule_hours;
+ // uint16_t length; // TODO: to show currently running events
+};
+
+void init_events();
+void cleanup_events();
+void update_event_index();
+
+const struct Gw2Event *get_next_event(int offset);
+int minutes_to_event(const struct Gw2Event *event);
+
+GColor8 color_for_category(enum Category category);
+
+#endif