GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_linux_fb.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2/*
3 * Copyright (C) 2009-2013 Cyril Hrubis <metan@ucw.cz>
4 */
5
6#ifndef BACKENDS_GP_FRAMEBUFFER_H
7#define BACKENDS_GP_FRAMEBUFFER_H
8
9#include <backends/gp_backend.h>
10
11enum gp_linux_fb_flags {
12 /*
13 * Use KBD to get input events
14 */
15 GP_FB_INPUT_KBD = 0x01,
16 /*
17 * Use shadow framebuffer for drawing.
18 */
19 GP_FB_SHADOW = 0x02,
20 /*
21 * Allocate new console, if not set current is used.
22 */
23 GP_FB_ALLOC_CON = 0x04,
24 /*
25 * Use Linux input
26 *
27 * Cannot be enabled together with KBD!
28 */
29 GP_FB_INPUT_LINUX = 0x08,
30};
31
32/*
33 * Initalize framebuffer.
34 *
35 * The path should point to framebuffer device eg. "/dev/fb0" for first
36 * framebuffer device.
37 *
38 * The gp_backend structure is allocated and returned, the resources are
39 * deinitalized and the structure is freed by backed->Exit(backend); call.
40 *
41 * Upon failure NULL is returned.
42 *
43 * If flag is set, the konsole kbd is used to push events into event queue.
44 */
45gp_backend *gp_linux_fb_init(const char *path, int flags);
46
47#endif /* BACKENDS_GP_FRAMEBUFFER_H */