diff options
Diffstat (limited to 'include/util.h')
-rw-r--r-- | include/util.h | 35 |
1 files changed, 1 insertions, 34 deletions
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 |