2018-07-29 05:15:12 +02:00
|
|
|
#ifndef _SWAYNAG_TYPES_H
|
|
|
|
#define _SWAYNAG_TYPES_H
|
2018-07-28 15:34:25 +02:00
|
|
|
|
2022-11-06 20:31:41 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <pango/pangocairo.h>
|
|
|
|
#include "list.h"
|
|
|
|
|
2018-07-29 05:15:12 +02:00
|
|
|
struct swaynag_type {
|
2018-07-28 15:34:25 +02:00
|
|
|
char *name;
|
2018-07-30 04:42:03 +02:00
|
|
|
|
2022-07-01 12:23:04 +02:00
|
|
|
PangoFontDescription *font_description;
|
2018-07-30 04:42:03 +02:00
|
|
|
char *output;
|
|
|
|
uint32_t anchors;
|
2021-03-17 16:55:21 +01:00
|
|
|
int32_t layer; // enum zwlr_layer_shell_v1_layer or -1 if unset
|
2018-07-30 04:42:03 +02:00
|
|
|
|
2019-04-20 04:44:11 +02:00
|
|
|
// Colors
|
2020-09-02 15:03:48 +02:00
|
|
|
uint32_t button_text;
|
2018-07-28 15:34:25 +02:00
|
|
|
uint32_t button_background;
|
2020-09-09 04:43:35 +02:00
|
|
|
uint32_t details_background;
|
2018-07-28 15:34:25 +02:00
|
|
|
uint32_t background;
|
|
|
|
uint32_t text;
|
|
|
|
uint32_t border;
|
|
|
|
uint32_t border_bottom;
|
2018-07-30 04:42:03 +02:00
|
|
|
|
2019-04-20 04:44:11 +02:00
|
|
|
// Sizing
|
|
|
|
ssize_t bar_border_thickness;
|
|
|
|
ssize_t message_padding;
|
|
|
|
ssize_t details_border_thickness;
|
|
|
|
ssize_t button_border_thickness;
|
|
|
|
ssize_t button_gap;
|
|
|
|
ssize_t button_gap_close;
|
|
|
|
ssize_t button_margin_right;
|
|
|
|
ssize_t button_padding;
|
2018-07-28 15:34:25 +02:00
|
|
|
};
|
|
|
|
|
2019-04-20 04:44:11 +02:00
|
|
|
struct swaynag_type *swaynag_type_new(const char *name);
|
|
|
|
|
2018-07-29 05:15:12 +02:00
|
|
|
void swaynag_types_add_default(list_t *types);
|
2018-07-28 15:34:25 +02:00
|
|
|
|
2018-07-29 05:15:12 +02:00
|
|
|
struct swaynag_type *swaynag_type_get(list_t *types, char *name);
|
2018-07-28 15:34:25 +02:00
|
|
|
|
2018-07-29 05:15:12 +02:00
|
|
|
struct swaynag_type *swaynag_type_clone(struct swaynag_type *type);
|
2018-07-28 15:34:25 +02:00
|
|
|
|
2018-07-30 04:42:03 +02:00
|
|
|
void swaynag_type_merge(struct swaynag_type *dest, struct swaynag_type *src);
|
|
|
|
|
2018-07-29 05:15:12 +02:00
|
|
|
void swaynag_type_free(struct swaynag_type *type);
|
2018-07-28 15:34:25 +02:00
|
|
|
|
2018-07-29 05:15:12 +02:00
|
|
|
void swaynag_types_free(list_t *types);
|
2018-07-28 15:34:25 +02:00
|
|
|
|
|
|
|
#endif
|