GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_sdl.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_SDL_H
7#define BACKENDS_GP_SDL_H
8
9#include <stdint.h>
10#include <backends/gp_backend.h>
11
12enum gp_sdl_flags {
13 GP_SDL_FULLSCREEN = 0x01,
14 GP_SDL_RESIZABLE = 0x02,
15};
16
17/*
18 * Initalize SDL as drawing backend.
19 *
20 * * SDL doesn't expose file descriptors.
21 *
22 * * The backend is thread safe (the critical parts are guarded with a mutex)
23 *
24 * * The backend is singleton, you can't have two SDL backends running at the
25 * same time.
26 *
27 * * When backend is allready initalized, this function ignores it's parameters
28 * and returns pointer to allready initalized SDL backend.
29 *
30 * * The SDL backends (upon calling gp_backend_poll()) feeds keyboard and mouse
31 * events into global GP event queue (see input/GP_Event.h).
32 *
33 *
34 * The parameters w h and bpp are directly passed to SDL_SetVideoMode().
35 *
36 * * If w, h and/or bpp are set to zero, SDL tries to do best fit.
37 *
38 * * The gp_sdl_flags are converted into SDL equivalents.
39 *
40 * Upon failure, or if SDL wasn't compiled in, NULL is returned.
41 */
42gp_backend *gp_sdl_init(gp_size w, gp_size h, uint8_t bpp, uint8_t flags,
43 const char *caption);
44
45#endif /* BACKENDS_GP_SDL_H */
unsigned int gp_size
Integer type for sizes i.e. w, h, ...
Definition gp_types.h:24