X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fvideo%2Fomapdss%2Fomapsdl.h;h=b34caa33bacaf2cb675bbabcaaf28913353c21b5;hb=7b66578c38502c173e310eb68f0cddc2e7b5031e;hp=f0f1ac4ca8321a30747f290c43606c93ef76f934;hpb=b78828bf6c654f3763394f153d31bab3fc5c8a64;p=sdl_omap.git diff --git a/src/video/omapdss/omapsdl.h b/src/video/omapdss/omapsdl.h index f0f1ac4..b34caa3 100644 --- a/src/video/omapdss/omapsdl.h +++ b/src/video/omapdss/omapsdl.h @@ -1,9 +1,23 @@ +/* + * (C) Gražvydas "notaz" Ignotas, 2010 + * + * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. + * See the COPYING file in the top-level directory. + */ #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) -#define err(fmt, ...) fprintf(stderr, "omapsdl: " fmt "\n", ##__VA_ARGS__) -#define not_supported() fprintf(stderr, "omapsdl: %s not supported\n", __FUNCTION__) -#if 1 +#define err(fmt, ...) \ + fprintf(stderr, "omapsdl: " fmt "\n", ##__VA_ARGS__) +#define err_perror(fmt, ...) do { \ + fprintf(stderr, "omapsdl: " fmt ": ", ##__VA_ARGS__); \ + perror(NULL); \ +} while (0) +#define log(fmt, ...) \ + fprintf(stdout, "omapsdl: " fmt "\n", ##__VA_ARGS__) +#define not_supported() \ + fprintf(stderr, "omapsdl: %s not supported\n", __FUNCTION__) +#if 0 #define trace(fmt, ...) printf(" %s(" fmt ")\n", __FUNCTION__, ##__VA_ARGS__) #define dbg err #else @@ -11,11 +25,29 @@ #define dbg(...) #endif +struct SDL_PrivateVideoData { + struct vout_fbdev *fbdev; + void *saved_layer; + unsigned int oshide_done:1; +}; + +int osdl_video_set_mode(struct SDL_PrivateVideoData *pdata, int width, int height, int bpp); +void *osdl_video_flip(struct SDL_PrivateVideoData *pdata); +void osdl_video_finish(struct SDL_PrivateVideoData *pdata); + void omapsdl_input_init(void); void omapsdl_input_bind(const char *kname, const char *sdlname); -int omapsdl_input_get_event(void *event_, int timeout); +int omapsdl_input_get_events(int timeout_ms, + int (*key_cb)(void *cb_arg, int sdl_kc, int is_pressed), + int (*ts_cb)(void *cb_arg, int x, int y, unsigned int pressure), + void *cb_arg); +void omapsdl_input_finish(void); void omapsdl_config(void); +void omapsdl_config_from_env(void); /* functions for standalone */ void do_clut(void *dest, void *src, unsigned short *pal, int count); + +/* config */ +extern int gcfg_force_vsync;