video.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Wengier: MULTI-MONITOR support
  2. #ifndef _video_h
  3. #define _video_h
  4. #include <windows.h>
  5. #include "config.h"
  6. typedef struct {
  7. Bit8u r;
  8. Bit8u g;
  9. Bit8u b;
  10. Bit8u unused;
  11. } RGB_Color;
  12. typedef struct {
  13. Bit32u *colors;
  14. int w, h;
  15. void *pixels;
  16. } vSurface;
  17. typedef struct {
  18. bool active; // If this isn't set don't draw
  19. Bit32u hideTill;
  20. bool framed;
  21. int scalex;
  22. int scaley;
  23. Bit16u width;
  24. Bit16u height;
  25. vSurface *surface;
  26. } vWinSpecs;
  27. // The main window
  28. extern HWND vDosHwnd;
  29. extern vWinSpecs window;
  30. extern HBITMAP DIBSection;
  31. // Function prototypes
  32. void InitWindow(void);
  33. void VideoQuit(void);
  34. vSurface * SetVideoMode(RECT monrect, int width, int height, bool framed);
  35. void HandleUserActions(void);
  36. void SetVideoSize();
  37. bool StartVideoUpdate(void);
  38. void EndTextLines(void);
  39. int SetCodePage(int cp);
  40. vSurface * vCreateSurface(int width, int height, RGB_Color fg, RGB_Color bg);
  41. void vUpdateRect(Bit32s x, Bit32s y, Bit32u w, Bit32u h);
  42. void vUpdateWin(void);
  43. void vBlitSurface(vSurface *src, RECT *srcrect, RECT *dstrect);
  44. LRESULT CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  45. #endif