aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2019-01-17 10:26:42 +0100
committerLibravatar emersion <contact@emersion.fr>2019-01-17 10:26:42 +0100
commitb29d19bf0dc405ec85c517e02298e6dffabfaeb5 (patch)
treea1901e641a8bc1f6c2ffdb60860934df5375c517 /include
parentFixes for small existing bugs. (diff)
downloadsway-b29d19bf0dc405ec85c517e02298e6dffabfaeb5.tar.gz
sway-b29d19bf0dc405ec85c517e02298e6dffabfaeb5.tar.zst
sway-b29d19bf0dc405ec85c517e02298e6dffabfaeb5.zip
Remove swaylock headers
Diffstat (limited to 'include')
-rw-r--r--include/swaylock/seat.h21
-rw-r--r--include/swaylock/swaylock.h117
2 files changed, 0 insertions, 138 deletions
diff --git a/include/swaylock/seat.h b/include/swaylock/seat.h
deleted file mode 100644
index c79afcd0..00000000
--- a/include/swaylock/seat.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef _SWAYLOCK_SEAT_H
2#define _SWAYLOCK_SEAT_H
3#include <xkbcommon/xkbcommon.h>
4
5struct swaylock_xkb {
6 bool caps_lock;
7 bool control;
8 struct xkb_state *state;
9 struct xkb_context *context;
10 struct xkb_keymap *keymap;
11};
12
13struct swaylock_seat {
14 struct swaylock_state *state;
15 struct wl_pointer *pointer;
16 struct wl_keyboard *keyboard;
17};
18
19extern const struct wl_seat_listener seat_listener;
20
21#endif
diff --git a/include/swaylock/swaylock.h b/include/swaylock/swaylock.h
deleted file mode 100644
index 516a56f4..00000000
--- a/include/swaylock/swaylock.h
+++ /dev/null
@@ -1,117 +0,0 @@
1#ifndef _SWAYLOCK_H
2#define _SWAYLOCK_H
3#include <stdbool.h>
4#include <stdint.h>
5#include <wayland-client.h>
6#include "background-image.h"
7#include "cairo.h"
8#include "pool-buffer.h"
9#include "swaylock/seat.h"
10#include "wlr-layer-shell-unstable-v1-client-protocol.h"
11
12enum auth_state {
13 AUTH_STATE_IDLE,
14 AUTH_STATE_CLEAR,
15 AUTH_STATE_INPUT,
16 AUTH_STATE_INPUT_NOP,
17 AUTH_STATE_BACKSPACE,
18 AUTH_STATE_VALIDATING,
19 AUTH_STATE_INVALID,
20};
21
22struct swaylock_colorset {
23 uint32_t input;
24 uint32_t cleared;
25 uint32_t caps_lock;
26 uint32_t verifying;
27 uint32_t wrong;
28};
29
30struct swaylock_colors {
31 uint32_t background;
32 uint32_t bs_highlight;
33 uint32_t key_highlight;
34 uint32_t caps_lock_bs_highlight;
35 uint32_t caps_lock_key_highlight;
36 uint32_t separator;
37 struct swaylock_colorset inside;
38 struct swaylock_colorset line;
39 struct swaylock_colorset ring;
40 struct swaylock_colorset text;
41};
42
43struct swaylock_args {
44 struct swaylock_colors colors;
45 enum background_mode mode;
46 char *font;
47 uint32_t radius;
48 uint32_t thickness;
49 bool ignore_empty;
50 bool show_indicator;
51 bool show_caps_lock_text;
52 bool show_caps_lock_indicator;
53 bool daemonize;
54};
55
56struct swaylock_password {
57 size_t len;
58 char buffer[1024];
59};
60
61struct swaylock_state {
62 struct loop *eventloop;
63 struct loop_timer *clear_indicator_timer; // clears the indicator
64 struct loop_timer *clear_password_timer; // clears the password buffer
65 struct loop_timer *verify_password_timer;
66 struct wl_display *display;
67 struct wl_compositor *compositor;
68 struct zwlr_layer_shell_v1 *layer_shell;
69 struct zwlr_input_inhibit_manager_v1 *input_inhibit_manager;
70 struct wl_shm *shm;
71 struct wl_list surfaces;
72 struct wl_list images;
73 struct swaylock_args args;
74 struct swaylock_password password;
75 struct swaylock_xkb xkb;
76 enum auth_state auth_state;
77 bool run_display;
78 struct zxdg_output_manager_v1 *zxdg_output_manager;
79};
80
81struct swaylock_surface {
82 cairo_surface_t *image;
83 struct swaylock_state *state;
84 struct wl_output *output;
85 uint32_t output_global_name;
86 struct zxdg_output_v1 *xdg_output;
87 struct wl_surface *surface;
88 struct zwlr_layer_surface_v1 *layer_surface;
89 struct pool_buffer buffers[2];
90 struct pool_buffer *current_buffer;
91 bool frame_pending, dirty;
92 uint32_t width, height;
93 int32_t scale;
94 enum wl_output_subpixel subpixel;
95 char *output_name;
96 struct wl_list link;
97};
98
99// There is exactly one swaylock_image for each -i argument
100struct swaylock_image {
101 char *path;
102 char *output_name;
103 cairo_surface_t *cairo_surface;
104 struct wl_list link;
105};
106
107void swaylock_handle_key(struct swaylock_state *state,
108 xkb_keysym_t keysym, uint32_t codepoint);
109void render_frame(struct swaylock_surface *surface);
110void render_frames(struct swaylock_state *state);
111void damage_surface(struct swaylock_surface *surface);
112void damage_state(struct swaylock_state *state);
113void initialize_pw_backend(void);
114bool attempt_password(struct swaylock_password *pw);
115void clear_password_buffer(struct swaylock_password *pw);
116
117#endif