mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
refactor: prefer static methods
This commit is contained in:
@ -20,6 +20,19 @@ namespace waybar {
|
||||
auto setWidth(int) -> void;
|
||||
auto toggle() -> void;
|
||||
private:
|
||||
static void _handleGeometry(void *data, struct wl_output *wl_output,
|
||||
int32_t x, int32_t y, int32_t physical_width, int32_t physical_height,
|
||||
int32_t subpixel, const char *make, const char *model, int32_t transform);
|
||||
static void _handleMode(void *data, struct wl_output *wl_output,
|
||||
uint32_t f, int32_t w, int32_t h, int32_t refresh);
|
||||
static void _handleDone(void *data, struct wl_output *);
|
||||
static void _handleScale(void *data, struct wl_output *wl_output,
|
||||
int32_t factor);
|
||||
static void _layerSurfaceHandleConfigure(void *data,
|
||||
struct zwlr_layer_surface_v1 *surface, uint32_t serial, uint32_t width,
|
||||
uint32_t height);
|
||||
static void _layerSurfaceHandleClosed(void *data,
|
||||
struct zwlr_layer_surface_v1 *surface);
|
||||
auto _setupConfig() -> void;
|
||||
auto _setupWidgets() -> void;
|
||||
auto _setupCss() -> void;
|
||||
|
@ -37,14 +37,14 @@ namespace waybar {
|
||||
struct wl_seat *seat;
|
||||
util::ptr_vec<Bar> bars;
|
||||
|
||||
struct {
|
||||
sigc::signal<void(int, int)> workspace_state;
|
||||
sigc::signal<void(std::string)> focused_window_name;
|
||||
} signals;
|
||||
|
||||
Client(int argc, char* argv[]);
|
||||
void bind_interfaces();
|
||||
auto setup_css();
|
||||
int main(int argc, char* argv[]);
|
||||
private:
|
||||
static void _handle_global(void *data, struct wl_registry *registry,
|
||||
uint32_t name, const char *interface, uint32_t version);
|
||||
static void _handle_global_remove(void *data,
|
||||
struct wl_registry *registry, uint32_t name);
|
||||
};
|
||||
}
|
||||
|
@ -12,13 +12,17 @@ namespace waybar::modules {
|
||||
public:
|
||||
Workspaces(waybar::Bar &bar);
|
||||
auto update() -> void;
|
||||
void updateThread();
|
||||
operator Gtk::Widget &();
|
||||
util::SleeperThread *thread;
|
||||
private:
|
||||
void _updateThread();
|
||||
static void _handle_idle(void *data,
|
||||
struct org_kde_kwin_idle_timeout *timer);
|
||||
static void _handle_resume(void *data,
|
||||
struct org_kde_kwin_idle_timeout *timer);
|
||||
void _addWorkspace(Json::Value node);
|
||||
Json::Value _getWorkspaces();
|
||||
Bar &_bar;
|
||||
util::SleeperThread *_thread;
|
||||
Gtk::Box *_box;
|
||||
std::unordered_map<int, Gtk::Button> _buttons;
|
||||
int _ipcSocketfd;
|
||||
|
Reference in New Issue
Block a user