mirror of
https://github.com/labwc/labwc.git
synced 2026-04-07 08:21:20 -04:00
Initial use of a centralized caching border generator
This commit is contained in:
parent
c37f343377
commit
2a0ff0d5b4
7 changed files with 218 additions and 61 deletions
30
include/common/borderset.h
Normal file
30
include/common/borderset.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include <stdint.h>
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef LABWC_BORDERSET_H
|
||||
#define LABWC_BORDERSET_H
|
||||
|
||||
struct borderset {
|
||||
uint32_t id; // Base colour, but could be used as a tracking hash for images or whatever in the future
|
||||
int size; // width (since I suspect a 2px border scaled up to 20px might look weird)
|
||||
int type; // Single or double bevel
|
||||
uint32_t * top;
|
||||
uint32_t * left;
|
||||
uint32_t * right;
|
||||
uint32_t * bottom;
|
||||
uint32_t * tl;
|
||||
uint32_t * tr;
|
||||
uint32_t * bl;
|
||||
uint32_t * br;
|
||||
struct borderset * next;
|
||||
};
|
||||
|
||||
|
||||
extern struct borderset * borderCache;
|
||||
|
||||
struct borderset * getBorders(uint32_t id, int size, int type);
|
||||
|
||||
struct borderset * createBuffer(uint32_t id, int size, int type);
|
||||
|
||||
void clearBorderCache(struct borderset *borderset);
|
||||
|
||||
#endif /* LABWC_LAB_SCENE_RECT_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue