aboutsummaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
authorspv <spv@spv.sh>2025-11-17 16:47:32 -0500
committerspv <spv@spv.sh>2025-11-17 16:47:32 -0500
commit6f2cd6be1d44fb13d75f66418c9a27b01b77a53d (patch)
tree7ba44fa400145e77ef487b9fd1de36d692e7cd9f /src/common.h
parent6f010046f0f17a5684a0f30423e2b3c6a41099d1 (diff)
add WIP report gen, systemd user service, work time tracker, sig handling
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
new file mode 100644
index 0000000..6562643
--- /dev/null
+++ b/src/common.h
@@ -0,0 +1,24 @@
+#ifndef COMMON_H
+#define COMMON_H
+
+#include <sys/time.h>
+#include <stdint.h>
+
+#include "config.h"
+#include "logger.h"
+
+typedef struct {
+ double when;
+ int64_t what;
+} keypress_t;
+
+typedef struct {
+ keypress_t* keys;
+ unsigned int length;
+ unsigned int size;
+} keypresses_t;
+
+#define KEYPRESSES_START_SIZE 0x1000 // one page
+#define KEYPRESSES_ADDITIONAL_SIZE 0x1000 // one page
+
+#endif