-
Notifications
You must be signed in to change notification settings - Fork 1
/
wedge.h
50 lines (33 loc) · 815 Bytes
/
wedge.h
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
43
44
45
46
47
48
49
50
#ifndef _WEDGE_H
#define _WEDGE_H
#include <stdint.h>
#include <gtk/gtk.h>
#include "stream.h"
#define WEDGE_QUEUED 1
#define WEDGE_PROCESSING 2
#define WEDGE_DONE 3
typedef struct wedge_s wedge_t;
struct wedge_s {
volatile int64_t status;
// Callback number when this wedge was most recently used
uint64_t draw_cb;
stream_t *stream;
int width;
int height;
int stride;
int sx;
int sy;
int64_t start;
int64_t end;
int64_t skip;
unsigned char *data;
cairo_surface_t *surface;
void (*callback_fn)(wedge_t *, void *);
void *callback_data;
};
wedge_t *wedge_new(int width, int height);
void wedge_free(wedge_t *w);
void wedge_processing_init(void);
void wedge_processing_queue(wedge_t *w);
int wedge_processing_dequeue(wedge_t *w);
#endif