2016-11-02 15:22:45 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <X11/Xft/Xft.h>
|
|
|
|
|
|
|
|
#include "common.hpp"
|
|
|
|
#include "utils/color.hpp"
|
|
|
|
|
2016-11-19 00:22:44 -05:00
|
|
|
POLYBAR_NS
|
2016-11-02 15:22:45 -04:00
|
|
|
|
|
|
|
class color {
|
|
|
|
public:
|
|
|
|
explicit color(string hex);
|
|
|
|
|
|
|
|
string source() const;
|
|
|
|
|
|
|
|
operator XRenderColor() const;
|
|
|
|
operator string() const;
|
|
|
|
operator uint32_t() const;
|
|
|
|
|
|
|
|
static color parse(string input, color fallback);
|
|
|
|
static color parse(string input);
|
|
|
|
|
|
|
|
protected:
|
2016-11-04 13:54:33 -04:00
|
|
|
uint32_t m_value;
|
2016-11-02 15:22:45 -04:00
|
|
|
uint32_t m_color;
|
|
|
|
string m_source;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern map<string, class color> g_colorstore;
|
|
|
|
extern color g_colorempty;
|
|
|
|
extern color g_colorblack;
|
|
|
|
extern color g_colorwhite;
|
|
|
|
|
2016-11-19 00:22:44 -05:00
|
|
|
POLYBAR_NS_END
|