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);
65 void vid_vsync(void); /* defined in drv_vga.c */
66 int vid_setwin(int win, int pos); /* defined in drv_vbe.c */
68 /* current mode functions */
69 int vid_islinear(void);
70 int vid_isbanked(void);
72 void vid_setpal(int idx, int count, const struct vid_color *col);
73 void vid_getpal(int idx, int count, struct vid_color *col);
75 void vid_blit(int x, int y, int w, int h, void *src, int pitch);
76 void vid_blitfb(void *fb, int pitch);
77 void vid_blit32(int x, int y, int w, int h, uint32_t *src, int pitch);
78 void vid_blitfb32(uint32_t *fb, int pitch);
80 #endif /* VIDSYS_VIDEO_H_ */