don't force double buffering
[sdl_omap.git] / src / video / omapdss / omapsdl.h
CommitLineData
f641fccb 1/*
0bb19c41 2 * (C) GraÅžvydas "notaz" Ignotas, 2010, 2011
f641fccb 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
7b66578c 10#define err(fmt, ...) \
11 fprintf(stderr, "omapsdl: " fmt "\n", ##__VA_ARGS__)
12#define err_perror(fmt, ...) do { \
13 fprintf(stderr, "omapsdl: " fmt ": ", ##__VA_ARGS__); \
14 perror(NULL); \
15} while (0)
16#define log(fmt, ...) \
17 fprintf(stdout, "omapsdl: " fmt "\n", ##__VA_ARGS__)
18#define not_supported() \
19 fprintf(stderr, "omapsdl: %s not supported\n", __FUNCTION__)
0aab059f 20#if 0
b78828bf 21#define trace(fmt, ...) printf(" %s(" fmt ")\n", __FUNCTION__, ##__VA_ARGS__)
22#define dbg err
23#else
24#define trace(...)
25#define dbg(...)
26#endif
27
f641fccb 28struct SDL_PrivateVideoData {
29 struct vout_fbdev *fbdev;
30 void *saved_layer;
b9a19b44 31 int screen_w, screen_h;
f9b3f440 32 unsigned int xenv_up:1;
f641fccb 33};
34
0bb19c41 35int osdl_video_set_mode(struct SDL_PrivateVideoData *pdata,
36 int width, int height, int bpp, int doublebuf);
f641fccb 37void *osdl_video_flip(struct SDL_PrivateVideoData *pdata);
b9a19b44 38int osdl_video_detect_screen(struct SDL_PrivateVideoData *pdata);
f641fccb 39void osdl_video_finish(struct SDL_PrivateVideoData *pdata);
40
b78828bf 41void omapsdl_input_init(void);
42void omapsdl_input_bind(const char *kname, const char *sdlname);
17e19802 43int omapsdl_input_get_events(int timeout_ms,
44 int (*key_cb)(void *cb_arg, int sdl_kc, int is_pressed),
45 int (*ts_cb)(void *cb_arg, int x, int y, unsigned int pressure),
46 void *cb_arg);
47void omapsdl_input_finish(void);
b78828bf 48
49void omapsdl_config(void);
f641fccb 50void omapsdl_config_from_env(void);
b78828bf 51
52/* functions for standalone */
53void do_clut(void *dest, void *src, unsigned short *pal, int count);
0aab059f 54
55/* config */
56extern int gcfg_force_vsync;
0bb19c41 57extern int gcfg_force_doublebuf;