diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-07-27 01:30:35 -0400 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2018-08-01 22:47:54 -0400 |
commit | 72db10c2f1a1a216c50f68461a840eea3948e878 (patch) | |
tree | 8517de29e9fda0823355a44edc1b81ae2b96f69e /include | |
parent | 88bc4b528ef3e1af3598b513dd5c1572dd09ec23 (diff) | |
download | sway-72db10c2f1a1a216c50f68461a840eea3948e878.tar.xz |
Support a detailed message in swaynagbar
Diffstat (limited to 'include')
-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 @@ #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); |