diff options
Diffstat (limited to 'include/swaynagbar/nagbar.h')
-rw-r--r-- | include/swaynagbar/nagbar.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/swaynagbar/nagbar.h b/include/swaynagbar/nagbar.h index 07a0d51e..8b55e4fa 100644 --- a/include/swaynagbar/nagbar.h +++ b/include/swaynagbar/nagbar.h | |||
@@ -7,17 +7,26 @@ | |||
7 | 7 | ||
8 | #define NAGBAR_BAR_BORDER_THICKNESS 2 | 8 | #define NAGBAR_BAR_BORDER_THICKNESS 2 |
9 | #define NAGBAR_MESSAGE_PADDING 8 | 9 | #define NAGBAR_MESSAGE_PADDING 8 |
10 | #define NAGBAR_DETAILS_BORDER_THICKNESS 3 | ||
10 | #define NAGBAR_BUTTON_BORDER_THICKNESS 3 | 11 | #define NAGBAR_BUTTON_BORDER_THICKNESS 3 |
11 | #define NAGBAR_BUTTON_GAP 20 | 12 | #define NAGBAR_BUTTON_GAP 20 |
12 | #define NAGBAR_BUTTON_GAP_CLOSE 15 | 13 | #define NAGBAR_BUTTON_GAP_CLOSE 15 |
13 | #define NAGBAR_BUTTON_MARGIN_RIGHT 2 | 14 | #define NAGBAR_BUTTON_MARGIN_RIGHT 2 |
14 | #define NAGBAR_BUTTON_PADDING 3 | 15 | #define NAGBAR_BUTTON_PADDING 3 |
15 | 16 | ||
17 | #define NAGBAR_MAX_HEIGHT 500 | ||
18 | |||
16 | enum sway_nagbar_type { | 19 | enum sway_nagbar_type { |
17 | NAGBAR_ERROR, | 20 | NAGBAR_ERROR, |
18 | NAGBAR_WARNING, | 21 | NAGBAR_WARNING, |
19 | }; | 22 | }; |
20 | 23 | ||
24 | enum sway_nagbar_action_type { | ||
25 | NAGBAR_ACTION_DISMISS, | ||
26 | NAGBAR_ACTION_EXPAND, | ||
27 | NAGBAR_ACTION_COMMAND, | ||
28 | }; | ||
29 | |||
21 | struct sway_nagbar_colors { | 30 | struct sway_nagbar_colors { |
22 | uint32_t button_background; | 31 | uint32_t button_background; |
23 | uint32_t background; | 32 | uint32_t background; |
@@ -43,6 +52,7 @@ struct sway_nagbar_output { | |||
43 | 52 | ||
44 | struct sway_nagbar_button { | 53 | struct sway_nagbar_button { |
45 | char *text; | 54 | char *text; |
55 | enum sway_nagbar_action_type type; | ||
46 | char *action; | 56 | char *action; |
47 | int x; | 57 | int x; |
48 | int y; | 58 | int y; |
@@ -50,6 +60,22 @@ struct sway_nagbar_button { | |||
50 | int height; | 60 | int height; |
51 | }; | 61 | }; |
52 | 62 | ||
63 | struct sway_nagbar_details { | ||
64 | bool visible; | ||
65 | char *message; | ||
66 | |||
67 | int x; | ||
68 | int y; | ||
69 | int width; | ||
70 | int height; | ||
71 | |||
72 | int offset; | ||
73 | int visible_lines; | ||
74 | int total_lines; | ||
75 | struct sway_nagbar_button button_up; | ||
76 | struct sway_nagbar_button button_down; | ||
77 | }; | ||
78 | |||
53 | struct sway_nagbar { | 79 | struct sway_nagbar { |
54 | bool run_display; | 80 | bool run_display; |
55 | int querying_outputs; | 81 | int querying_outputs; |
@@ -77,6 +103,7 @@ struct sway_nagbar { | |||
77 | char *message; | 103 | char *message; |
78 | char *font; | 104 | char *font; |
79 | list_t *buttons; | 105 | list_t *buttons; |
106 | struct sway_nagbar_details details; | ||
80 | }; | 107 | }; |
81 | 108 | ||
82 | void nagbar_setup(struct sway_nagbar *nagbar); | 109 | void nagbar_setup(struct sway_nagbar *nagbar); |