screen.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. typedef struct Cursor Cursor;
  2. typedef struct LCDmode LCDmode;
  3. typedef struct LCDparam LCDparam;
  4. typedef struct Vdisplay Vdisplay;
  5. typedef struct Vmode Vmode;
  6. #define CURSWID 16
  7. #define CURSHGT 16
  8. struct Cursor {
  9. Point offset;
  10. uchar clr[CURSWID/BI2BY*CURSHGT];
  11. uchar set[CURSWID/BI2BY*CURSHGT];
  12. };
  13. struct Vmode {
  14. int x; /* 0 -> default or any match for all fields */
  15. int y;
  16. uchar depth;
  17. uchar hz;
  18. };
  19. struct Vdisplay {
  20. uchar* fb; /* frame buffer */
  21. ulong colormap[256][3];
  22. int bwid;
  23. Lock;
  24. Vmode;
  25. };
  26. struct LCDparam {
  27. uchar pbs;
  28. uchar dual;
  29. uchar mono;
  30. uchar active;
  31. uchar hsync_wid;
  32. uchar sol_wait;
  33. uchar eol_wait;
  34. uchar vsync_hgt;
  35. uchar sof_wait;
  36. uchar eof_wait;
  37. uchar lines_per_int;
  38. uchar palette_delay;
  39. uchar acbias_lines;
  40. uchar obits;
  41. uchar vsynclow;
  42. uchar hsynclow;
  43. };
  44. struct LCDmode {
  45. Vmode;
  46. LCDparam;
  47. };
  48. int archlcdmode(LCDmode*);
  49. Vdisplay *lcd_init(LCDmode*);
  50. void lcd_setcolor(ulong, ulong, ulong, ulong);
  51. void lcd_flush(void);
  52. extern void blankscreen(int);
  53. extern void drawblankscreen(int);
  54. extern ulong blanktime;
  55. extern Point mousexy(void);