diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/input/keyboard.h | 21 | ||||
-rw-r--r-- | include/sway/output.h | 2 | ||||
-rw-r--r-- | include/util.h | 35 |
3 files changed, 24 insertions, 34 deletions
diff --git a/include/sway/input/keyboard.h b/include/sway/input/keyboard.h index 65137a08..0c8ada0f 100644 --- a/include/sway/input/keyboard.h +++ b/include/sway/input/keyboard.h | |||
@@ -5,6 +5,27 @@ | |||
5 | 5 | ||
6 | #define SWAY_KEYBOARD_PRESSED_KEYS_CAP 32 | 6 | #define SWAY_KEYBOARD_PRESSED_KEYS_CAP 32 |
7 | 7 | ||
8 | /** | ||
9 | * Get modifier mask from modifier name. | ||
10 | * | ||
11 | * Returns the modifer mask or 0 if the name isn't found. | ||
12 | */ | ||
13 | uint32_t get_modifier_mask_by_name(const char *name); | ||
14 | |||
15 | /** | ||
16 | * Get modifier name from modifier mask. | ||
17 | * | ||
18 | * Returns the modifier name or NULL if it isn't found. | ||
19 | */ | ||
20 | const char *get_modifier_name_by_mask(uint32_t modifier); | ||
21 | |||
22 | /** | ||
23 | * Get an array of modifier names from modifier_masks | ||
24 | * | ||
25 | * Populates the names array and return the number of names added. | ||
26 | */ | ||
27 | int get_modifier_names(const char **names, uint32_t modifier_masks); | ||
28 | |||
8 | struct sway_shortcut_state { | 29 | struct sway_shortcut_state { |
9 | /** | 30 | /** |
10 | * A list of pressed key ids (either keysyms or keycodes), | 31 | * A list of pressed key ids (either keysyms or keycodes), |
diff --git a/include/sway/output.h b/include/sway/output.h index 9ebdb6c1..479897ef 100644 --- a/include/sway/output.h +++ b/include/sway/output.h | |||
@@ -152,4 +152,6 @@ void premultiply_alpha(float color[4], float opacity); | |||
152 | 152 | ||
153 | void scale_box(struct wlr_box *box, float scale); | 153 | void scale_box(struct wlr_box *box, float scale); |
154 | 154 | ||
155 | enum wlr_direction opposite_direction(enum wlr_direction d); | ||
156 | |||
155 | #endif | 157 | #endif |
diff --git a/include/util.h b/include/util.h index 84318fe7..e3269d6b 100644 --- a/include/util.h +++ b/include/util.h | |||
@@ -3,9 +3,6 @@ | |||
3 | 3 | ||
4 | #include <stdint.h> | 4 | #include <stdint.h> |
5 | #include <stdbool.h> | 5 | #include <stdbool.h> |
6 | #include <unistd.h> | ||
7 | #include <wlr/types/wlr_output_layout.h> | ||
8 | #include <xkbcommon/xkbcommon.h> | ||
9 | 6 | ||
10 | /** | 7 | /** |
11 | * Wrap i into the range [0, max[ | 8 | * Wrap i into the range [0, max[ |
@@ -13,39 +10,11 @@ | |||
13 | int wrap(int i, int max); | 10 | int wrap(int i, int max); |
14 | 11 | ||
15 | /** | 12 | /** |
16 | * Count number of digits in int | 13 | * Count number of digits in int, including '-' sign if there is one |
17 | */ | 14 | */ |
18 | int numlen(int n); | 15 | int numlen(int n); |
19 | 16 | ||
20 | /** | 17 | /** |
21 | * Get modifier mask from modifier name. | ||
22 | * | ||
23 | * Returns the modifer mask or 0 if the name isn't found. | ||
24 | */ | ||
25 | uint32_t get_modifier_mask_by_name(const char *name); | ||
26 | |||
27 | /** | ||
28 | * Get modifier name from modifier mask. | ||
29 | * | ||
30 | * Returns the modifier name or NULL if it isn't found. | ||
31 | */ | ||
32 | const char *get_modifier_name_by_mask(uint32_t modifier); | ||
33 | |||
34 | /** | ||
35 | * Get an array of modifier names from modifier_masks | ||
36 | * | ||
37 | * Populates the names array and return the number of names added. | ||
38 | */ | ||
39 | int get_modifier_names(const char **names, uint32_t modifier_masks); | ||
40 | |||
41 | /** | ||
42 | * Get the pid of a parent process given the pid of a child process. | ||
43 | * | ||
44 | * Returns the parent pid or NULL if the parent pid cannot be determined. | ||
45 | */ | ||
46 | pid_t get_parent_pid(pid_t pid); | ||
47 | |||
48 | /** | ||
49 | * Given a string that represents an RGB(A) color, return a uint32_t | 18 | * Given a string that represents an RGB(A) color, return a uint32_t |
50 | * version of the color. | 19 | * version of the color. |
51 | */ | 20 | */ |
@@ -65,6 +34,4 @@ bool parse_boolean(const char *boolean, bool current); | |||
65 | */ | 34 | */ |
66 | float parse_float(const char *value); | 35 | float parse_float(const char *value); |
67 | 36 | ||
68 | enum wlr_direction opposite_direction(enum wlr_direction d); | ||
69 | |||
70 | #endif | 37 | #endif |