style: spaces -> tabs
This commit is contained in:
parent
7b3700e730
commit
0f81338bb6
11 changed files with 876 additions and 876 deletions
96
src/bar.hpp
96
src/bar.hpp
|
|
@ -11,65 +11,65 @@
|
|||
#include "shm_buffer.hpp"
|
||||
|
||||
class BarComponent {
|
||||
std::unique_ptr<std::string> _text;
|
||||
std::unique_ptr<std::string> _text;
|
||||
public:
|
||||
BarComponent();
|
||||
explicit BarComponent(wl_unique_ptr<PangoLayout> layout);
|
||||
int width() const;
|
||||
void setText(const std::string& text);
|
||||
wl_unique_ptr<PangoLayout> pangoLayout;
|
||||
int x {0};
|
||||
BarComponent();
|
||||
explicit BarComponent(wl_unique_ptr<PangoLayout> layout);
|
||||
int width() const;
|
||||
void setText(const std::string& text);
|
||||
wl_unique_ptr<PangoLayout> pangoLayout;
|
||||
int x {0};
|
||||
};
|
||||
|
||||
struct Tag {
|
||||
znet_tapesoftware_dwl_wm_monitor_v1_tag_state state;
|
||||
int numClients;
|
||||
int focusedClient;
|
||||
BarComponent component;
|
||||
znet_tapesoftware_dwl_wm_monitor_v1_tag_state state;
|
||||
int numClients;
|
||||
int focusedClient;
|
||||
BarComponent component;
|
||||
};
|
||||
|
||||
struct Monitor;
|
||||
class Bar {
|
||||
static const zwlr_layer_surface_v1_listener _layerSurfaceListener;
|
||||
static const wl_callback_listener _frameListener;
|
||||
static const zwlr_layer_surface_v1_listener _layerSurfaceListener;
|
||||
static const wl_callback_listener _frameListener;
|
||||
|
||||
wl_unique_ptr<wl_surface> _surface;
|
||||
wl_unique_ptr<zwlr_layer_surface_v1> _layerSurface;
|
||||
wl_unique_ptr<PangoContext> _pangoContext;
|
||||
Monitor* _mon;
|
||||
std::optional<ShmBuffer> _bufs;
|
||||
std::vector<Tag> _tags;
|
||||
BarComponent _layoutCmp, _titleCmp, _statusCmp;
|
||||
bool _selected;
|
||||
bool _invalid {false};
|
||||
wl_unique_ptr<wl_surface> _surface;
|
||||
wl_unique_ptr<zwlr_layer_surface_v1> _layerSurface;
|
||||
wl_unique_ptr<PangoContext> _pangoContext;
|
||||
Monitor* _mon;
|
||||
std::optional<ShmBuffer> _bufs;
|
||||
std::vector<Tag> _tags;
|
||||
BarComponent _layoutCmp, _titleCmp, _statusCmp;
|
||||
bool _selected;
|
||||
bool _invalid {false};
|
||||
|
||||
// only vaild during render()
|
||||
cairo_t* _painter {nullptr};
|
||||
int _x;
|
||||
ColorScheme _colorScheme;
|
||||
// only vaild during render()
|
||||
cairo_t* _painter {nullptr};
|
||||
int _x;
|
||||
ColorScheme _colorScheme;
|
||||
|
||||
void layerSurfaceConfigure(uint32_t serial, uint32_t width, uint32_t height);
|
||||
void render();
|
||||
void renderTags();
|
||||
void renderStatus();
|
||||
void layerSurfaceConfigure(uint32_t serial, uint32_t width, uint32_t height);
|
||||
void render();
|
||||
void renderTags();
|
||||
void renderStatus();
|
||||
|
||||
// low-level rendering
|
||||
void setColorScheme(const ColorScheme& scheme, bool invert = false);
|
||||
void beginFg();
|
||||
void beginBg();
|
||||
void renderComponent(BarComponent& component);
|
||||
BarComponent createComponent(const std::string& initial = {});
|
||||
// low-level rendering
|
||||
void setColorScheme(const ColorScheme& scheme, bool invert = false);
|
||||
void beginFg();
|
||||
void beginBg();
|
||||
void renderComponent(BarComponent& component);
|
||||
BarComponent createComponent(const std::string& initial = {});
|
||||
public:
|
||||
Bar(Monitor *mon);
|
||||
const wl_surface* surface() const;
|
||||
bool visible() const;
|
||||
void show(wl_output* output);
|
||||
void hide();
|
||||
void setTag(int tag, znet_tapesoftware_dwl_wm_monitor_v1_tag_state state, int numClients, int focusedClient);
|
||||
void setSelected(bool selected);
|
||||
void setLayout(int layout);
|
||||
void setTitle(const std::string& title);
|
||||
void setStatus(const std::string& status);
|
||||
void invalidate();
|
||||
void click(int x, int y, int btn);
|
||||
Bar(Monitor *mon);
|
||||
const wl_surface* surface() const;
|
||||
bool visible() const;
|
||||
void show(wl_output* output);
|
||||
void hide();
|
||||
void setTag(int tag, znet_tapesoftware_dwl_wm_monitor_v1_tag_state state, int numClients, int focusedClient);
|
||||
void setSelected(bool selected);
|
||||
void setLayout(int layout);
|
||||
void setTitle(const std::string& title);
|
||||
void setStatus(const std::string& status);
|
||||
void invalidate();
|
||||
void click(int x, int y, int btn);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue