2016-11-02 19:22:45 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
|
|
|
|
#include "common.hpp"
|
|
|
|
|
2016-11-19 05:22:44 +00:00
|
|
|
POLYBAR_NS
|
2016-11-02 19:22:45 +00:00
|
|
|
|
|
|
|
namespace xlib {
|
2016-12-21 22:22:02 +00:00
|
|
|
namespace detail {
|
|
|
|
/**
|
|
|
|
* RAII wrapper for Xlib display locking
|
|
|
|
*/
|
|
|
|
class display_lock {
|
|
|
|
public:
|
|
|
|
explicit display_lock(Display* display);
|
|
|
|
~display_lock();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Display* m_display;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
Display* get_display();
|
|
|
|
Visual* get_visual(int screen = 0, uint8_t depth = 32);
|
2016-12-14 14:09:11 +00:00
|
|
|
Colormap create_colormap(int screen = 0);
|
|
|
|
inline auto make_display_lock();
|
2016-11-02 19:22:45 +00:00
|
|
|
}
|
|
|
|
|
2016-11-19 05:22:44 +00:00
|
|
|
POLYBAR_NS_END
|