diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-22 01:02:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-22 01:02:48 -0500 |
commit | f493fb526d3aabb4e756409a3a69e304759f4201 (patch) | |
tree | 239b2c3d5212a5663eb3c0868543f505b03d3953 /include | |
parent | swaybar: fix setting floating watcher slots (diff) | |
parent | Removed unused wlroots dependency for sway(bg|bar|msg|nag) (diff) | |
download | sway-f493fb526d3aabb4e756409a3a69e304759f4201.tar.gz sway-f493fb526d3aabb4e756409a3a69e304759f4201.tar.zst sway-f493fb526d3aabb4e756409a3a69e304759f4201.zip |
Merge pull request #3485 from mstoeckl/minimize-deps
Remove wlroots dependency for sway(bar|bg|msg|nag)
Diffstat (limited to 'include')
-rw-r--r-- | include/cairo.h | 2 | ||||
-rw-r--r-- | include/sway/input/keyboard.h | 21 | ||||
-rw-r--r-- | include/sway/output.h | 2 | ||||
-rw-r--r-- | include/util.h | 35 |
4 files changed, 25 insertions, 35 deletions
diff --git a/include/cairo.h b/include/cairo.h index f28c072f..d1b9b8d7 100644 --- a/include/cairo.h +++ b/include/cairo.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include "config.h" | 4 | #include "config.h" |
5 | #include <stdint.h> | 5 | #include <stdint.h> |
6 | #include <cairo/cairo.h> | 6 | #include <cairo/cairo.h> |
7 | #include <wlr/types/wlr_output.h> | 7 | #include <wayland-client-protocol.h> |
8 | #if HAVE_GDK_PIXBUF | 8 | #if HAVE_GDK_PIXBUF |
9 | #include <gdk-pixbuf/gdk-pixbuf.h> | 9 | #include <gdk-pixbuf/gdk-pixbuf.h> |
10 | #endif | 10 | #endif |
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 |