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, ncolors;
44 uint32_t rmask, gmask, bmask;
45 int rshift, gshift, bshift;
47 int win_size, win_gran;
51 struct vid_driver *drv;
52 struct vid_gfxops ops;
56 void vid_cleanup(void);
58 int vid_curmode(void);
59 void *vid_setmode(int mode);
60 int vid_findmode(int xsz, int ysz, int bpp);
61 struct vid_modeinfo *vid_modeinfo(int mode);
65 /* current mode functions */
66 void vid_setpal(int idx, int count, const struct vid_color *col);
67 void vid_getpal(int idx, int count, struct vid_color *col);
69 #endif /* VIDSYS_VIDEO_H_ */