aboutsummaryrefslogtreecommitdiff
path: root/include/swaynagbar/nagbar.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/swaynagbar/nagbar.h')
-rw-r--r--include/swaynagbar/nagbar.h27
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 @@
#define NAGBAR_BAR_BORDER_THICKNESS 2
#define NAGBAR_MESSAGE_PADDING 8
+#define NAGBAR_DETAILS_BORDER_THICKNESS 3
#define NAGBAR_BUTTON_BORDER_THICKNESS 3
#define NAGBAR_BUTTON_GAP 20
#define NAGBAR_BUTTON_GAP_CLOSE 15
#define NAGBAR_BUTTON_MARGIN_RIGHT 2
#define NAGBAR_BUTTON_PADDING 3
+#define NAGBAR_MAX_HEIGHT 500
+
enum sway_nagbar_type {
NAGBAR_ERROR,
NAGBAR_WARNING,
};
+enum sway_nagbar_action_type {
+ NAGBAR_ACTION_DISMISS,
+ NAGBAR_ACTION_EXPAND,
+ NAGBAR_ACTION_COMMAND,
+};
+
struct sway_nagbar_colors {
uint32_t button_background;
uint32_t background;
@@ -43,6 +52,7 @@ struct sway_nagbar_output {
struct sway_nagbar_button {
char *text;
+ enum sway_nagbar_action_type type;
char *action;
int x;
int y;
@@ -50,6 +60,22 @@ struct sway_nagbar_button {
int height;
};
+struct sway_nagbar_details {
+ bool visible;
+ char *message;
+
+ int x;
+ int y;
+ int width;
+ int height;
+
+ int offset;
+ int visible_lines;
+ int total_lines;
+ struct sway_nagbar_button button_up;
+ struct sway_nagbar_button button_down;
+};
+
struct sway_nagbar {
bool run_display;
int querying_outputs;
@@ -77,6 +103,7 @@ struct sway_nagbar {
char *message;
char *font;
list_t *buttons;
+ struct sway_nagbar_details details;
};
void nagbar_setup(struct sway_nagbar *nagbar);