1 #ifndef VIDSYS_VIDEO_H_
2 #define VIDSYS_VIDEO_H_
14 void (*pack)(uint32_t *pix, int r, int g, int b);
15 void (*unpack)(uint32_t pix, int *r, int *g, int *b);
16 void (*setpal)(int idx, int count, const struct vid_color *col);
17 void (*getpal)(int idx, int count, struct vid_color *col);
20 void (*clear)(uint32_t color);
21 void (*blitfb)(void *fb, int pitch);
22 void (*flip)(int vsync);
24 void (*fill)(int x, int y, int w, int h, uint32_t color);
25 void (*blit)(int x, int y, int w, int h, void *img, int pitch);
26 void (*line)(int x0, int y0, int x1, int y1, uint32_t color);
27 void (*hline)(int x, int y, int len, uint32_t color);
28 void (*vline)(int x, int y, int len, uint32_t color);
35 struct vid_modeinfo *modes;
38 struct vid_drvops *ops;
43 int width, height, bpp, pitch;
45 uint32_t rmask, gmask, bmask;
46 int rshift, gshift, bshift;
48 int win_size, win_gran, win_step;
53 struct vid_driver *drv;
54 struct vid_gfxops ops;
58 void vid_cleanup(void);
60 int vid_curmode(void);
61 void *vid_setmode(int mode);
62 int vid_findmode(int xsz, int ysz, int bpp);
63 struct vid_modeinfo *vid_modeinfo(int mode);
67 /* current mode functions */
68 void vid_setpal(int idx, int count, const struct vid_color *col);
69 void vid_getpal(int idx, int count, struct vid_color *col);
71 #endif /* VIDSYS_VIDEO_H_ */