draw.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef NULLSOFT_DRAWH
  2. #define NULLSOFT_DRAWH
  3. #include <windows.h>
  4. #include "Main.h"
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. #ifdef DEBUG_DRAW
  9. #define setSrcBM(x) _setSrcBM(x,#x)
  10. #define unsetSrcBM() _setSrcBM(0, 0)
  11. #else
  12. #define setSrcBM(x) _setSrcBM(x)
  13. #define unsetSrcBM() _setSrcBM(0)
  14. #endif
  15. #define OSD_TEXT_SIZE 28
  16. #ifdef DEBUG_DRAW
  17. void _setSrcBM(HBITMAP hbm, char *a);
  18. #else
  19. void _setSrcBM(HBITMAP hbm);
  20. #endif
  21. #define update_rect(r) update_area((r).left,(r).top,(r).right-(r).left,(r).bottom-(r).top)
  22. void update_area(int x1, int y1, int w, int h);
  23. HBITMAP draw_LBitmap(LPCTSTR bmname, const wchar_t *filename);
  24. HDC draw_GetWindowDC(HWND hwnd);
  25. int draw_ReleaseDC(HWND hwnd, HDC hdc);
  26. void getXYfromChar(wchar_t ic, int *x, int *y);
  27. void do_palmode(HDC hdc);
  28. extern COLORREF mfont_bgcolor, mfont_fgcolor;
  29. extern unsigned char *specData;
  30. extern int sa_safe;
  31. extern int disable_skin_borders;
  32. extern int mfont_height;
  33. extern int g_has_deleted_current;
  34. extern volatile int draw_initted;
  35. extern HFONT font, mfont, shadefont, osdFontText;
  36. extern HBRUSH selbrush, normbrush, mfont_bgbrush;
  37. extern HBITMAP fontBM, embedBM, panBM, shufflerepeatBM, tbBM,
  38. cbuttonsBM, volBM,mainBM2, oldmainBM2, numbersBM,
  39. numbersBM_ex, playpauseBM, posbarBM, monostereoBM;
  40. extern HDC bmDC, mainDC, specDC, mainDC2;
  41. extern CRITICAL_SECTION g_mainwndcs, g_srcdccs;
  42. extern int titlebar_font_offsets[26];
  43. extern int titlebar_font_widths[26];
  44. extern int titlebar_font_num_offsets[12];
  45. extern int titlebar_font_num_widths[12];
  46. extern int titlebar_font_unknown_width;
  47. extern int updateen;
  48. #ifdef __cplusplus
  49. }
  50. #endif
  51. #endif