From eba48b7cec388325b237fd1b5a3c6d2e04deba12 Mon Sep 17 00:00:00 2001
From: Simeon Simeonov
Date: Thu, 19 Mar 2020 16:51:23 +0100
Subject: Initial merge i3lock-extended -> i3lock
---
extras.h | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 102 insertions(+)
create mode 100644 extras.h
(limited to 'extras.h')
diff --git a/extras.h b/extras.h
new file mode 100644
index 0000000..d4a353e
--- /dev/null
+++ b/extras.h
@@ -0,0 +1,102 @@
+/*
+ * This file is part of i3lock-extended
+ * Copyright (C) 2020 Simeon Simeonov
+
+ * i3lock-extended is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * i3lock-extended is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#ifndef EXTRAS_H
+#define EXTRAS_H
+
+#include
+
+
+#define I3LOCK_SCALE_LED_LENGTH 60
+#define I3LOCK_SCALE_LED_SPACING 30
+
+
+typedef enum {
+
+ I3LOCK_ALIGN_LEFT = 0,
+ I3LOCK_ALIGN_CENTER,
+ I3LOCK_ALIGN_RIGHT
+
+} i3lock_horizontal_alignment;
+
+
+typedef enum {
+
+ I3LOCK_ALIGN_TOP = 0,
+ I3LOCK_ALIGN_MIDDLE,
+ I3LOCK_ALIGN_BOTTOM
+
+} i3lock_vertical_alignment;
+
+
+typedef struct i3lock_digital_clock_t_ {
+
+ int text_size;
+ char color[7];
+ char *template;
+ i3lock_horizontal_alignment horizontal_alignment;
+ i3lock_vertical_alignment vertical_alignment;
+
+} i3lock_digital_clock_t;
+
+
+typedef struct i3lock_elapsed_time_t_ {
+
+ int text_size;
+ char color[7];
+ time_t start_time;
+ i3lock_horizontal_alignment horizontal_alignment;
+ i3lock_vertical_alignment vertical_alignment;
+
+} i3lock_elapsed_time_t;
+
+
+typedef struct i3lock_led_clock_t_ {
+
+ char led_on_color[7];
+ char led_off_color[7];
+ char led_border_color[7];
+ i3lock_horizontal_alignment horizontal_alignment;
+ i3lock_vertical_alignment vertical_alignment;
+
+} i3lock_led_clock_t;
+
+
+void i3lock_draw_digital_clock(cairo_t *cr,
+ const i3lock_digital_clock_t *dc,
+ const uint32_t *resolution,
+ const struct tm *brokentime);
+
+
+void i3lock_draw_elapsed_time(cairo_t *cr,
+ const i3lock_elapsed_time_t *et,
+ const uint32_t *resolution,
+ const time_t *now);
+
+
+void i3lock_draw_led_clock(cairo_t *cr,
+ const i3lock_led_clock_t *lc,
+ const uint32_t *resolution,
+ const struct tm *brokentime);
+
+
+void i3lock_draw_string(cairo_t *cr,
+ const char *formatted_string,
+ const i3lock_elapsed_time_t *et,
+ const uint32_t *resolution);
+#endif
--
cgit v1.3