2016-06-15 05:32:35 +02:00
|
|
|
#pragma once
|
|
|
|
|
2016-11-27 00:46:41 +01:00
|
|
|
#include <xcb/xcb.h>
|
2016-11-26 06:13:20 +01:00
|
|
|
#include <xcb/xcb_aux.h>
|
|
|
|
|
2016-06-15 05:32:35 +02:00
|
|
|
#include "common.hpp"
|
2016-11-02 20:22:45 +01:00
|
|
|
#include "x11/connection.hpp"
|
2016-11-13 16:10:20 +01:00
|
|
|
#include "x11/randr.hpp"
|
2016-06-15 05:32:35 +02:00
|
|
|
|
2016-11-19 06:22:44 +01:00
|
|
|
POLYBAR_NS
|
2016-06-15 05:32:35 +02:00
|
|
|
|
|
|
|
using connection_t = connection;
|
|
|
|
|
|
|
|
class window : public xpp::window<connection_t&> {
|
|
|
|
public:
|
|
|
|
using xpp::window<connection_t&>::window;
|
|
|
|
|
2016-11-19 04:03:18 +01:00
|
|
|
explicit window(connection_t& conn) : xpp::window<connection_t&>(conn, XCB_NONE) {}
|
|
|
|
|
|
|
|
window& operator=(const xcb_window_t win) {
|
|
|
|
*this = window{connection(), win};
|
|
|
|
return *this;
|
|
|
|
}
|
2016-06-15 05:32:35 +02:00
|
|
|
|
2016-11-13 21:50:21 +01:00
|
|
|
window create_checked(
|
|
|
|
int16_t x, int16_t y, uint16_t w, uint16_t h, uint32_t mask = 0, const xcb_params_cw_t* p = nullptr);
|
2016-11-02 20:22:45 +01:00
|
|
|
|
2016-11-19 04:03:18 +01:00
|
|
|
window change_event_mask(uint32_t mask);
|
|
|
|
window ensure_event_mask(uint32_t event);
|
|
|
|
|
2016-11-12 12:56:39 +01:00
|
|
|
window reconfigure_geom(uint16_t w, uint16_t h, int16_t x = 0, int16_t y = 0);
|
|
|
|
window reconfigure_pos(int16_t x, int16_t y);
|
2016-11-13 21:50:21 +01:00
|
|
|
window reconfigure_struts(uint16_t w, uint16_t h, int16_t x, bool bottom = false);
|
2016-11-04 18:54:33 +01:00
|
|
|
|
2016-11-12 12:56:39 +01:00
|
|
|
void redraw();
|
2016-06-15 05:32:35 +02:00
|
|
|
};
|
|
|
|
|
2016-11-19 06:22:44 +01:00
|
|
|
POLYBAR_NS_END
|