blob: af80faa7f52d967ce7555d7a50a33fba8d15cae9 (
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
43
44
45
46
47
48
|
#define VL_INTERNAL
#include "vl_display.h"
#include <assert.h>
#include <stdlib.h>
int vlCreateDisplay
(
vlNativeDisplay native_display,
struct vlDisplay **display
)
{
struct vlDisplay *dpy;
assert(native_display);
assert(display);
dpy = calloc(1, sizeof(struct vlDisplay));
if (!dpy)
return 1;
dpy->native = native_display;
*display = dpy;
return 0;
}
int vlDestroyDisplay
(
struct vlDisplay *display
)
{
assert(display);
free(display);
return 0;
}
vlNativeDisplay vlGetNativeDisplay
(
struct vlDisplay *display
)
{
assert(display);
return display->native;
}
|