mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
refactor: AModule
This commit is contained in:
@ -26,7 +26,6 @@ class Window : public ALabel, public sigc::trackable {
|
||||
void getTree();
|
||||
|
||||
const Bar& bar_;
|
||||
std::mutex mutex_;
|
||||
std::string window_;
|
||||
int windowId_;
|
||||
std::string app_id_;
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <fmt/format.h>
|
||||
#include <gtkmm/button.h>
|
||||
#include <gtkmm/label.h>
|
||||
#include "IModule.hpp"
|
||||
#include "AModule.hpp"
|
||||
#include "bar.hpp"
|
||||
#include "client.hpp"
|
||||
#include "modules/sway/ipc/client.hpp"
|
||||
@ -12,12 +12,11 @@
|
||||
|
||||
namespace waybar::modules::sway {
|
||||
|
||||
class Workspaces : public IModule, public sigc::trackable {
|
||||
class Workspaces : public AModule, public sigc::trackable {
|
||||
public:
|
||||
Workspaces(const std::string&, const waybar::Bar&, const Json::Value&);
|
||||
~Workspaces() = default;
|
||||
auto update() -> void;
|
||||
operator Gtk::Widget&();
|
||||
|
||||
private:
|
||||
void onCmd(const struct Ipc::ipc_response&);
|
||||
@ -33,15 +32,11 @@ class Workspaces : public IModule, public sigc::trackable {
|
||||
bool handleScroll(GdkEventScroll*);
|
||||
|
||||
const Bar& bar_;
|
||||
const Json::Value& config_;
|
||||
std::vector<Json::Value> workspaces_;
|
||||
std::vector<std::string> workspaces_order_;
|
||||
std::mutex mutex_;
|
||||
Gtk::Box box_;
|
||||
util::JsonParser parser_;
|
||||
bool scrolling_;
|
||||
std::unordered_map<std::string, Gtk::Button> buttons_;
|
||||
gdouble distance_scrolled_;
|
||||
|
||||
util::SleeperThread thread_;
|
||||
Ipc ipc_;
|
||||
|
Reference in New Issue
Block a user