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