You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
912 B
52 lines
912 B
9 years ago
|
#ifndef _SWAYBAR_STATUS_LINE_H
|
||
|
#define _SWAYBAR_STATUS_LINE_H
|
||
|
|
||
|
#include <stdint.h>
|
||
|
#include <stdbool.h>
|
||
|
|
||
|
#include "list.h"
|
||
9 years ago
|
#include "bar.h"
|
||
9 years ago
|
|
||
|
typedef enum {UNDEF, TEXT, I3BAR} command_protocol;
|
||
|
|
||
|
struct status_line {
|
||
|
list_t *block_line;
|
||
9 years ago
|
const char *text_line;
|
||
9 years ago
|
command_protocol protocol;
|
||
|
};
|
||
|
|
||
|
struct status_block {
|
||
|
char *full_text, *short_text, *align;
|
||
|
bool urgent;
|
||
|
uint32_t color;
|
||
|
int min_width;
|
||
|
char *name, *instance;
|
||
|
bool separator;
|
||
|
int separator_block_width;
|
||
9 years ago
|
bool markup;
|
||
9 years ago
|
// Airblader features
|
||
|
uint32_t background;
|
||
|
uint32_t border;
|
||
|
int border_top;
|
||
|
int border_bottom;
|
||
|
int border_left;
|
||
|
int border_right;
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* Initialize status line struct.
|
||
|
*/
|
||
|
struct status_line *init_status_line();
|
||
|
|
||
|
/**
|
||
|
* handle status line activity.
|
||
|
*/
|
||
9 years ago
|
bool handle_status_line(struct bar *bar);
|
||
9 years ago
|
|
||
9 years ago
|
/**
|
||
|
* Free status line struct.
|
||
|
*/
|
||
|
void free_status_line(struct status_line *line);
|
||
|
|
||
9 years ago
|
#endif /* _SWAYBAR_STATUS_LINE_H */
|