mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
initial commit: wip
This commit is contained in:
commit
8bf8a398b9
30 changed files with 2921 additions and 0 deletions
32
particle.h
Normal file
32
particle.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#include <cairo.h>
|
||||
#include "color.h"
|
||||
#include "font.h"
|
||||
#include "tag.h"
|
||||
|
||||
struct exposable;
|
||||
|
||||
struct particle {
|
||||
struct particle *parent;
|
||||
void *private;
|
||||
|
||||
int left_margin, right_margin;
|
||||
|
||||
void (*destroy)(struct particle *particle);
|
||||
struct exposable *(*instantiate)(const struct particle *particle,
|
||||
const struct tag_set *tags);
|
||||
};
|
||||
|
||||
|
||||
struct exposable {
|
||||
const struct particle *particle;
|
||||
void *private;
|
||||
|
||||
void (*destroy)(struct exposable *exposable);
|
||||
int (*begin_expose)(const struct exposable *exposable, cairo_t *cr);
|
||||
void (*expose)(const struct exposable *exposable, cairo_t *cr,
|
||||
int x, int y, int height);
|
||||
};
|
||||
|
||||
struct particle *particle_common_new(int left_margin, int right_margin);
|
Loading…
Add table
Add a link
Reference in a new issue