File: operationqueue.h

package info (click to toggle)
libmypaint 1.3.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,560 kB
  • sloc: sh: 4,451; ansic: 4,199; makefile: 296; python: 208
file content (38 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download
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
#ifndef OPERATIONQUEUE_H
#define OPERATIONQUEUE_H

#include <stdint.h>
#include "tilemap.h"

typedef struct {
    float x;
    float y;
    float radius;
    uint16_t color_r;
    uint16_t color_g;
    uint16_t color_b;
    float color_a;
    float opaque;
    float hardness;
    float aspect_ratio;
    float angle;
    float normal;
    float lock_alpha;
    float colorize;
} OperationDataDrawDab;

typedef struct OperationQueue OperationQueue;

OperationQueue *operation_queue_new(void);
void operation_queue_free(OperationQueue *self);

int operation_queue_get_dirty_tiles(OperationQueue *self, TileIndex** tiles_out);
void operation_queue_clear_dirty_tiles(OperationQueue *self);

void operation_queue_add(OperationQueue *self, TileIndex index, OperationDataDrawDab *op);
OperationDataDrawDab *operation_queue_pop(OperationQueue *self, TileIndex index);

OperationDataDrawDab *operation_queue_peek_first(OperationQueue *self, TileIndex index);
OperationDataDrawDab *operation_queue_peek_last(OperationQueue *self, TileIndex index);

#endif // OPERATIONQUEUE_H