aboutsummaryrefslogtreecommitdiffstats
path: root/include/swaybar/bar.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/swaybar/bar.h')
-rw-r--r--include/swaybar/bar.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h
index 57c5114e..e377b8de 100644
--- a/include/swaybar/bar.h
+++ b/include/swaybar/bar.h
@@ -1,6 +1,7 @@
1#ifndef _SWAYBAR_BAR_H 1#ifndef _SWAYBAR_BAR_H
2#define _SWAYBAR_BAR_H 2#define _SWAYBAR_BAR_H
3#include <wayland-client.h> 3#include <wayland-client.h>
4#include "config.h"
4#include "input.h" 5#include "input.h"
5#include "pool-buffer.h" 6#include "pool-buffer.h"
6#include "wlr-layer-shell-unstable-v1-client-protocol.h" 7#include "wlr-layer-shell-unstable-v1-client-protocol.h"
@@ -8,6 +9,9 @@
8 9
9struct swaybar_config; 10struct swaybar_config;
10struct swaybar_output; 11struct swaybar_output;
12#if HAVE_TRAY
13struct swaybar_tray;
14#endif
11struct swaybar_workspace; 15struct swaybar_workspace;
12struct loop; 16struct loop;
13 17
@@ -38,6 +42,10 @@ struct swaybar {
38 int ipc_socketfd; 42 int ipc_socketfd;
39 43
40 struct wl_list outputs; // swaybar_output::link 44 struct wl_list outputs; // swaybar_output::link
45
46#if HAVE_TRAY
47 struct swaybar_tray *tray;
48#endif
41}; 49};
42 50
43struct swaybar_output { 51struct swaybar_output {
@@ -62,6 +70,8 @@ struct swaybar_output {
62 struct pool_buffer *current_buffer; 70 struct pool_buffer *current_buffer;
63 bool dirty; 71 bool dirty;
64 bool frame_scheduled; 72 bool frame_scheduled;
73
74 uint32_t output_height, output_width, output_x, output_y;
65}; 75};
66 76
67struct swaybar_workspace { 77struct swaybar_workspace {
@@ -78,6 +88,8 @@ bool bar_setup(struct swaybar *bar, const char *socket_path);
78void bar_run(struct swaybar *bar); 88void bar_run(struct swaybar *bar);
79void bar_teardown(struct swaybar *bar); 89void bar_teardown(struct swaybar *bar);
80 90
91void set_bar_dirty(struct swaybar *bar);
92
81/* 93/*
82 * Determines whether the bar should be visible and changes it to be so. 94 * Determines whether the bar should be visible and changes it to be so.
83 * If the current visibility of the bar is the different to what it should be, 95 * If the current visibility of the bar is the different to what it should be,