replace qt with cairo/pango/epoll
This commit is contained in:
parent
31c09e24d6
commit
3db22e4a71
6 changed files with 206 additions and 125 deletions
|
|
@ -3,16 +3,22 @@
|
|||
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <wayland-client.h>
|
||||
#include <linux/input-event-codes.h>
|
||||
#include <QColor>
|
||||
#include <QString>
|
||||
#include <cairo/cairo.h>
|
||||
#include <pango/pango.h>
|
||||
#include "wlr-layer-shell-unstable-v1-client-protocol.h"
|
||||
#include "net-tapesoftware-dwl-wm-unstable-v1-client-protocol.h"
|
||||
|
||||
struct Color {
|
||||
Color() {}
|
||||
constexpr Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a=255) : r(r), g(g), b(b), a(a) { }
|
||||
uint8_t r, g, b, a {255};
|
||||
};
|
||||
struct ColorScheme {
|
||||
QColor fg, bg;
|
||||
Color fg, bg;
|
||||
};
|
||||
union Arg {
|
||||
unsigned int ui;
|
||||
|
|
@ -32,8 +38,8 @@ extern wl_display *display;
|
|||
extern wl_compositor *compositor;
|
||||
extern wl_shm *shm;
|
||||
extern zwlr_layer_shell_v1 *wlrLayerShell;
|
||||
extern std::vector<QString> tagNames;
|
||||
extern std::vector<QString> layoutNames;
|
||||
extern std::vector<std::string> tagNames;
|
||||
extern std::vector<std::string> layoutNames;
|
||||
|
||||
void view(Monitor &m, const Arg &arg);
|
||||
void toggleview(Monitor &m, const Arg &arg);
|
||||
|
|
@ -57,3 +63,9 @@ WL_DELETER(wl_seat, wl_seat_release);
|
|||
WL_DELETER(wl_surface, wl_surface_destroy);
|
||||
WL_DELETER(znet_tapesoftware_dwl_wm_monitor_v1, znet_tapesoftware_dwl_wm_monitor_v1_release);
|
||||
WL_DELETER(zwlr_layer_surface_v1, zwlr_layer_surface_v1_destroy);
|
||||
|
||||
WL_DELETER(cairo_t, cairo_destroy);
|
||||
WL_DELETER(cairo_surface_t, cairo_surface_destroy);
|
||||
|
||||
WL_DELETER(PangoContext, g_object_unref);
|
||||
WL_DELETER(PangoLayout, g_object_unref);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue