GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_x11.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2/*
3 * Copyright (C) 2009-2012 Cyril Hrubis <metan@ucw.cz>
4 */
5
6#ifndef BACKENDS_GP_X11_H
7#define BACKENDS_GP_X11_H
8
9#include <backends/gp_backend.h>
10
11enum gp_x11_flags {
12 /* When set, w and h is ignored and root window is used */
13 GP_X11_USE_ROOT_WIN = 0x01,
14
15 /* Create new borderless window above the root window */
16 GP_X11_CREATE_ROOT_WIN = 0x02,
17
18 /* Start fullscreen */
19 GP_X11_FULLSCREEN = 0x04,
20
21 /* Do not use MIT SHM even if available */
22 GP_X11_DISABLE_SHM = 0x08,
23};
24
25
26/*
27 * Initalize X11 backend.
28 *
29 * The display may be NULL for default display ($DISPLAY shell variable will
30 * be used).
31 *
32 * The coordinates are position and geometry for newly created window.
33 *
34 * Upon failure NULL is returned.
35 */
36gp_backend *gp_x11_init(const char *display, int x, int y,
37 unsigned int w, unsigned int h,
38 const char *caption,
39 enum gp_x11_flags flags);
40
41/*
42 * Returns non-zero if backend is X11 backend
43 */
44int gp_backend_is_x11(gp_backend *self);
45
46#endif /* BACKENDS_GP_X11_H */