summaryrefslogtreecommitdiff
path: root/src/tofi.h
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2021-11-14 20:33:35 +0000
committerPhil Jones <philj56@gmail.com>2021-11-14 20:33:35 +0000
commit929bca3f70c6406e7edbaf42804d8e1d1d9958e2 (patch)
tree997cb414f93906f9bdae501fe0c5d5ea77206cb0 /src/tofi.h
parent9a0ee7624c19acf7fabb311e6c01c45cc72a1da3 (diff)
Rename main struct to tofi.
Diffstat (limited to 'src/tofi.h')
-rw-r--r--src/tofi.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/tofi.h b/src/tofi.h
new file mode 100644
index 0000000..6a8a457
--- /dev/null
+++ b/src/tofi.h
@@ -0,0 +1,63 @@
+#ifndef CLIENT_H
+#define CLIENT_H
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <xdg-shell.h>
+#include "color.h"
+#include "entry.h"
+#include "image.h"
+#include "surface.h"
+
+struct tofi {
+ /* Globals */
+ struct wl_display *wl_display;
+ struct wl_registry *wl_registry;
+ struct wl_compositor *wl_compositor;
+ struct wl_subcompositor *wl_subcompositor;
+ struct wl_seat *wl_seat;
+ struct wl_output *wl_output;
+ struct xdg_wm_base *xdg_wm_base;
+
+ uint32_t wl_display_name;
+ uint32_t wl_registry_name;
+ uint32_t wl_compositor_name;
+ uint32_t wl_subcompositor_name;
+ uint32_t wl_seat_name;
+ uint32_t wl_output_name;
+ uint32_t xdg_wm_base_name;
+
+ /* Objects */
+ struct wl_keyboard *wl_keyboard;
+ struct wl_pointer *wl_pointer;
+
+ /* State */
+ bool closed;
+ struct {
+ struct surface surface;
+ struct xdg_surface *xdg_surface;
+ struct xdg_toplevel *xdg_toplevel;
+ struct image background_image;
+ struct color background_color;
+ struct entry entry;
+ int32_t width;
+ int32_t height;
+ uint32_t scale;
+ bool resize;
+ } window;
+
+ /* Keyboard state */
+ struct xkb_state *xkb_state;
+ struct xkb_context *xkb_context;
+ struct xkb_keymap *xkb_keymap;
+
+ /* greetd state */
+ const char *username;
+ const char *command;
+ bool submit;
+
+ /* Options */
+ bool hide_cursor;
+};
+
+#endif /* CLIENT_H */