summaryrefslogtreecommitdiff
path: root/Fuse/fuse_backend.h
blob: 57f9f805599f0e06e9d60416e75f5e1a23f3bbdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef FUSE_BACKEND_H
#define FUSE_BACKEND_H

typedef enum {
    FUSE_CMD_CLIP = 0,
    FUSE_CMD_RECT,
    FUSE_CMD_LINE,
    FUSE_CMD_COUNT
} FuseCmdType;

typedef struct { 
    float x, y, w, h; 
} FuseClip;

typedef struct { 
    float x, y, w, h; 
    uint32_t color; 
} FuseRect;

typedef struct { 
    float x1, y1, x2, y2; 
    float thickness; 
    uint32_t color; 
} FuseLine;

typedef struct {
    union {
        FuseClip clip;
        FuseRect rect;
        FuseLine line;
    };
    uint8_t type;
} FuseCmd;


static const char* fuse_cmd_name[] = {
    [FUSE_CMD_RECT] = "RECT",
    [FUSE_CMD_CLIP] = "CLIP",
    [FUSE_CMD_LINE] = "LINE",
};

#endif