f641fccb |
1 | /* |
2 | * (C) GraÅžvydas "notaz" Ignotas, 2010 |
3 | * |
4 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. |
5 | * See the COPYING file in the top-level directory. |
6 | */ |
b78828bf |
7 | |
8 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) |
9 | |
10 | #define err(fmt, ...) fprintf(stderr, "omapsdl: " fmt "\n", ##__VA_ARGS__) |
11 | #define not_supported() fprintf(stderr, "omapsdl: %s not supported\n", __FUNCTION__) |
0aab059f |
12 | #if 0 |
b78828bf |
13 | #define trace(fmt, ...) printf(" %s(" fmt ")\n", __FUNCTION__, ##__VA_ARGS__) |
14 | #define dbg err |
15 | #else |
16 | #define trace(...) |
17 | #define dbg(...) |
18 | #endif |
19 | |
f641fccb |
20 | struct SDL_PrivateVideoData { |
21 | struct vout_fbdev *fbdev; |
22 | void *saved_layer; |
23 | unsigned int oshide_done:1; |
24 | }; |
25 | |
26 | int osdl_video_set_mode(struct SDL_PrivateVideoData *pdata, int width, int height, int bpp); |
27 | void *osdl_video_flip(struct SDL_PrivateVideoData *pdata); |
28 | void osdl_video_finish(struct SDL_PrivateVideoData *pdata); |
29 | |
b78828bf |
30 | void omapsdl_input_init(void); |
31 | void omapsdl_input_bind(const char *kname, const char *sdlname); |
17e19802 |
32 | int omapsdl_input_get_events(int timeout_ms, |
33 | int (*key_cb)(void *cb_arg, int sdl_kc, int is_pressed), |
34 | int (*ts_cb)(void *cb_arg, int x, int y, unsigned int pressure), |
35 | void *cb_arg); |
36 | void omapsdl_input_finish(void); |
b78828bf |
37 | |
38 | void omapsdl_config(void); |
f641fccb |
39 | void omapsdl_config_from_env(void); |
b78828bf |
40 | |
41 | /* functions for standalone */ |
42 | void do_clut(void *dest, void *src, unsigned short *pal, int count); |
0aab059f |
43 | |
44 | /* config */ |
45 | extern int gcfg_force_vsync; |