-
Notifications
You must be signed in to change notification settings - Fork 4
/
evdi.h
37 lines (31 loc) · 967 Bytes
/
evdi.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
#pragma once
#ifndef EVDI_LIB_H
struct evdi_rect {
int x1, y1, x2, y2;
};
#endif
struct evdi_update {
unsigned char *fb;
struct evdi_rect *rects;
int num_rects;
};
/*
* setup_evdi creates a virtual display and framebuffers. Returns 0 on success
* and an exit code >0 on failure. If return value is 0, cleanup_evdi MUST be
* called before program exit. If return value is nonzero, cleanup_evdi doesn't
* need to be called, but it shouldn't cause nasty behavior.
*/
int evdi_setup(void);
/*
* evdi_cleanup deregisters EVDI objects and deallocates their memory.
* Redundant calls are safe.
*/
void evdi_cleanup(void);
/*
* evdi_get gets the next available frame update from EVDI. Returns 0 on
* success and an exit code >0 on failure. Tries to get an immediately ready
* framebuffer, otherwise waits until one is ready. evdi_setup() must already
* have been called.
*/
int evdi_get(struct evdi_update *update);
/* vi: set ts=8 sts=8 sw=8 noet: */