forked from external/yambar
Apply "clang-format" preferences globally
This commit is contained in:
parent
d841aeeecd
commit
b85ba99980
64 changed files with 1868 additions and 2678 deletions
|
@ -1,12 +1,13 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "../config.h"
|
||||
#include "../config-verify.h"
|
||||
#include "../config.h"
|
||||
#include "../decoration.h"
|
||||
#include "../plugin.h"
|
||||
|
||||
struct private {
|
||||
//struct rgba color;
|
||||
struct private
|
||||
{
|
||||
// struct rgba color;
|
||||
pixman_color_t color;
|
||||
};
|
||||
|
||||
|
@ -22,9 +23,7 @@ static void
|
|||
expose(const struct deco *deco, pixman_image_t *pix, int x, int y, int width, int height)
|
||||
{
|
||||
const struct private *d = deco->private;
|
||||
pixman_image_fill_rectangles(
|
||||
PIXMAN_OP_OVER, pix, &d->color, 1,
|
||||
&(pixman_rectangle16_t){x, y, width, height});
|
||||
pixman_image_fill_rectangles(PIXMAN_OP_OVER, pix, &d->color, 1, &(pixman_rectangle16_t){x, y, width, height});
|
||||
}
|
||||
|
||||
static struct deco *
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "../config.h"
|
||||
#include "../config-verify.h"
|
||||
#include "../config.h"
|
||||
#include "../decoration.h"
|
||||
#include "../plugin.h"
|
||||
|
||||
|
@ -12,7 +12,8 @@
|
|||
#define min(x, y) ((x) < (y) ? (x) : (y))
|
||||
#define max(x, y) ((x) > (y) ? (x) : (y))
|
||||
|
||||
struct private {
|
||||
struct private
|
||||
{
|
||||
pixman_color_t color;
|
||||
int size;
|
||||
};
|
||||
|
@ -29,21 +30,20 @@ static void
|
|||
expose(const struct deco *deco, pixman_image_t *pix, int x, int y, int width, int height)
|
||||
{
|
||||
const struct private *d = deco->private;
|
||||
pixman_image_fill_rectangles(
|
||||
PIXMAN_OP_OVER, pix, &d->color, 4,
|
||||
(pixman_rectangle16_t []){
|
||||
/* Top */
|
||||
{x, y, width, min(d->size, height)},
|
||||
pixman_image_fill_rectangles(PIXMAN_OP_OVER, pix, &d->color, 4,
|
||||
(pixman_rectangle16_t[]){
|
||||
/* Top */
|
||||
{x, y, width, min(d->size, height)},
|
||||
|
||||
/* Bottom */
|
||||
{x, max(y + height - d->size, y), width, min(d->size, height)},
|
||||
/* Bottom */
|
||||
{x, max(y + height - d->size, y), width, min(d->size, height)},
|
||||
|
||||
/* Left */
|
||||
{x, y, min(d->size, width), height},
|
||||
/* Left */
|
||||
{x, y, min(d->size, width), height},
|
||||
|
||||
/* Right */
|
||||
{max(x + width - d->size, x), y, min(d->size, width), height},
|
||||
});
|
||||
/* Right */
|
||||
{max(x + width - d->size, x), y, min(d->size, width), height},
|
||||
});
|
||||
}
|
||||
|
||||
static struct deco *
|
||||
|
@ -66,9 +66,7 @@ from_conf(const struct yml_node *node)
|
|||
{
|
||||
const struct yml_node *color = yml_get_value(node, "color");
|
||||
const struct yml_node *size = yml_get_value(node, "size");
|
||||
return border_new(
|
||||
conf_to_color(color),
|
||||
size != NULL ? yml_value_as_int(size) : 1);
|
||||
return border_new(conf_to_color(color), size != NULL ? yml_value_as_int(size) : 1);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "../config.h"
|
||||
#include "../config-verify.h"
|
||||
#include "../config.h"
|
||||
#include "../decoration.h"
|
||||
#include "../plugin.h"
|
||||
|
||||
struct private {
|
||||
struct private
|
||||
{
|
||||
int size;
|
||||
pixman_color_t color;
|
||||
};
|
||||
|
@ -22,9 +23,7 @@ static void
|
|||
expose(const struct deco *deco, pixman_image_t *pix, int x, int y, int width, int height)
|
||||
{
|
||||
const struct private *d = deco->private;
|
||||
pixman_image_fill_rectangles(
|
||||
PIXMAN_OP_OVER, pix, &d->color, 1,
|
||||
&(pixman_rectangle16_t){x, y, width, d->size});
|
||||
pixman_image_fill_rectangles(PIXMAN_OP_OVER, pix, &d->color, 1, &(pixman_rectangle16_t){x, y, width, d->size});
|
||||
}
|
||||
|
||||
static struct deco *
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#define LOG_MODULE "stack"
|
||||
#include "../log.h"
|
||||
#include "../config.h"
|
||||
#include "../config-verify.h"
|
||||
#include "../config.h"
|
||||
#include "../decoration.h"
|
||||
#include "../log.h"
|
||||
#include "../plugin.h"
|
||||
|
||||
struct private {
|
||||
struct private
|
||||
{
|
||||
struct deco **decos;
|
||||
size_t count;
|
||||
};
|
||||
|
@ -57,10 +58,7 @@ from_conf(const struct yml_node *node)
|
|||
struct deco *decos[count];
|
||||
size_t idx = 0;
|
||||
|
||||
for (struct yml_list_iter it = yml_list_iter(node);
|
||||
it.node != NULL;
|
||||
yml_list_next(&it), idx++)
|
||||
{
|
||||
for (struct yml_list_iter it = yml_list_iter(node); it.node != NULL; yml_list_next(&it), idx++) {
|
||||
decos[idx] = conf_to_deco(it.node);
|
||||
}
|
||||
|
||||
|
@ -75,10 +73,7 @@ verify_conf(keychain_t *chain, const struct yml_node *node)
|
|||
return false;
|
||||
}
|
||||
|
||||
for (struct yml_list_iter it = yml_list_iter(node);
|
||||
it.node != NULL;
|
||||
yml_list_next(&it))
|
||||
{
|
||||
for (struct yml_list_iter it = yml_list_iter(node); it.node != NULL; yml_list_next(&it)) {
|
||||
if (!conf_verify_decoration(chain, it.node))
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "../config.h"
|
||||
#include "../config-verify.h"
|
||||
#include "../config.h"
|
||||
#include "../decoration.h"
|
||||
#include "../plugin.h"
|
||||
|
||||
struct private {
|
||||
struct private
|
||||
{
|
||||
int size;
|
||||
pixman_color_t color;
|
||||
};
|
||||
|
@ -22,9 +23,8 @@ static void
|
|||
expose(const struct deco *deco, pixman_image_t *pix, int x, int y, int width, int height)
|
||||
{
|
||||
const struct private *d = deco->private;
|
||||
pixman_image_fill_rectangles(
|
||||
PIXMAN_OP_OVER, pix, &d->color, 1,
|
||||
&(pixman_rectangle16_t){x, y + height - d->size, width, d->size});
|
||||
pixman_image_fill_rectangles(PIXMAN_OP_OVER, pix, &d->color, 1,
|
||||
&(pixman_rectangle16_t){x, y + height - d->size, width, d->size});
|
||||
}
|
||||
|
||||
static struct deco *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue