2016-11-04 17:50:33 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <xcb/xcb.h>
|
|
|
|
|
|
|
|
#include "common.hpp"
|
2016-11-26 05:13:20 +00:00
|
|
|
#include "x11/connection.hpp"
|
2016-11-04 17:50:33 +00:00
|
|
|
|
2016-11-19 05:22:44 +00:00
|
|
|
POLYBAR_NS
|
2016-11-04 17:50:33 +00:00
|
|
|
|
|
|
|
namespace graphics_util {
|
|
|
|
struct root_pixmap {
|
2017-01-19 10:11:28 +00:00
|
|
|
unsigned char depth{0};
|
|
|
|
unsigned short int width{0};
|
|
|
|
unsigned short int height{0};
|
|
|
|
short int x{0};
|
|
|
|
short int y{0};
|
2016-11-04 17:50:33 +00:00
|
|
|
xcb_pixmap_t pixmap{0};
|
|
|
|
};
|
|
|
|
|
2017-01-19 10:11:28 +00:00
|
|
|
bool create_window(connection& conn, xcb_window_t* win, short int x = 0, short int y = 0, unsigned short int w = 1, unsigned short int h = 1,
|
2016-11-25 07:42:31 +00:00
|
|
|
xcb_window_t root = 0);
|
2017-01-19 10:11:28 +00:00
|
|
|
bool create_pixmap(connection& conn, xcb_drawable_t dst, unsigned short int w, unsigned short int h, xcb_pixmap_t* pixmap);
|
|
|
|
bool create_pixmap(connection& conn, xcb_drawable_t dst, unsigned short int w, unsigned short int h, unsigned char d, xcb_pixmap_t* pixmap);
|
2016-11-12 08:40:14 +00:00
|
|
|
bool create_gc(connection& conn, xcb_drawable_t drawable, xcb_gcontext_t* gc);
|
2016-11-04 17:50:33 +00:00
|
|
|
|
2016-11-12 08:40:14 +00:00
|
|
|
bool get_root_pixmap(connection& conn, root_pixmap* rpix);
|
2016-11-04 17:50:33 +00:00
|
|
|
}
|
|
|
|
|
2016-11-19 05:22:44 +00:00
|
|
|
POLYBAR_NS_END
|