2017-01-18 23:38:42 -05:00
|
|
|
#pragma once
|
|
|
|
|
2017-01-25 17:30:41 -05:00
|
|
|
#include <cairo/cairo.h>
|
|
|
|
|
2017-01-18 23:38:42 -05:00
|
|
|
#include "common.hpp"
|
2017-03-21 09:49:33 -04:00
|
|
|
#include "components/types.hpp"
|
2017-01-18 23:38:42 -05:00
|
|
|
|
|
|
|
POLYBAR_NS
|
|
|
|
|
2017-01-19 09:05:26 -05:00
|
|
|
enum class alignment;
|
|
|
|
|
2017-01-18 23:38:42 -05:00
|
|
|
namespace cairo {
|
2017-01-24 00:59:58 -05:00
|
|
|
struct point {
|
|
|
|
double x;
|
|
|
|
double y;
|
|
|
|
};
|
2017-01-18 23:38:42 -05:00
|
|
|
struct abspos {
|
|
|
|
double x;
|
|
|
|
double y;
|
2017-01-19 09:05:26 -05:00
|
|
|
bool clear{true};
|
2017-01-18 23:38:42 -05:00
|
|
|
};
|
|
|
|
struct relpos {
|
|
|
|
double x;
|
|
|
|
double y;
|
|
|
|
};
|
|
|
|
struct rect {
|
|
|
|
double x;
|
|
|
|
double y;
|
|
|
|
double w;
|
|
|
|
double h;
|
|
|
|
};
|
|
|
|
struct line {
|
|
|
|
double x1;
|
|
|
|
double y1;
|
|
|
|
double x2;
|
|
|
|
double y2;
|
|
|
|
double w;
|
|
|
|
};
|
2017-01-25 03:54:18 -05:00
|
|
|
struct translate {
|
|
|
|
double x;
|
|
|
|
double y;
|
|
|
|
};
|
2017-01-18 23:38:42 -05:00
|
|
|
struct linear_gradient {
|
|
|
|
double x1;
|
|
|
|
double y1;
|
2017-01-24 00:59:58 -05:00
|
|
|
double x2;
|
|
|
|
double y2;
|
2019-10-27 17:27:58 -04:00
|
|
|
vector<rgba> steps;
|
2017-01-18 23:38:42 -05:00
|
|
|
};
|
2017-01-19 09:05:26 -05:00
|
|
|
struct rounded_corners {
|
|
|
|
double x;
|
|
|
|
double y;
|
|
|
|
double w;
|
|
|
|
double h;
|
2017-03-21 09:49:33 -04:00
|
|
|
struct radius radius;
|
2017-01-19 09:05:26 -05:00
|
|
|
};
|
2021-02-16 17:17:16 -05:00
|
|
|
struct circle_segment {
|
|
|
|
double x;
|
|
|
|
double y;
|
2021-03-29 10:47:46 -04:00
|
|
|
double w;
|
2021-02-16 17:17:16 -05:00
|
|
|
double angle_from;
|
|
|
|
double angle_to;
|
|
|
|
double radius;
|
|
|
|
};
|
2017-01-18 23:38:42 -05:00
|
|
|
struct textblock {
|
2017-01-19 09:05:26 -05:00
|
|
|
alignment align;
|
2017-01-18 23:38:42 -05:00
|
|
|
string contents;
|
2017-01-24 05:50:16 -05:00
|
|
|
int font;
|
2019-10-27 17:27:58 -04:00
|
|
|
rgba bg{};
|
2017-01-25 17:30:41 -05:00
|
|
|
cairo_operator_t bg_operator;
|
2017-01-24 00:59:58 -05:00
|
|
|
rect bg_rect;
|
2019-10-27 17:27:58 -04:00
|
|
|
double* x_advance;
|
|
|
|
double* y_advance;
|
2017-01-18 23:38:42 -05:00
|
|
|
};
|
2019-10-27 17:27:58 -04:00
|
|
|
} // namespace cairo
|
2017-01-18 23:38:42 -05:00
|
|
|
|
|
|
|
POLYBAR_NS_END
|