backBuffer.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef _NULLSOFT_WINAMP_ML_DEVICES_BACK_BUFFER_HEADER
  2. #define _NULLSOFT_WINAMP_ML_DEVICES_BACK_BUFFER_HEADER
  3. typedef struct BackBuffer
  4. {
  5. HBITMAP bitmap;
  6. HWND hwnd;
  7. HDC hdc;
  8. HBITMAP previous;
  9. } BackBuffer;
  10. BOOL
  11. BackBuffer_Initialize(BackBuffer *self, HWND hwnd);
  12. void
  13. BackBuffer_Uninitialize(BackBuffer *self);
  14. BOOL
  15. BackBuffer_EnsureSize(BackBuffer *self,
  16. long width,
  17. long height);
  18. BOOL
  19. BackBuffer_EnsureSizeEx(BackBuffer *self,
  20. long width,
  21. long height,
  22. long allocWidth,
  23. long allocHeight);
  24. HDC
  25. BackBuffer_GetDC(BackBuffer *self);
  26. BOOL
  27. BackBuffer_Copy(BackBuffer *self,
  28. HDC hdc,
  29. long x,
  30. long y,
  31. long width,
  32. long height);
  33. void
  34. BackBuffer_Reset(BackBuffer *self);
  35. BOOL
  36. BackBuffer_DrawText(BackBuffer *self,
  37. HDC hdc,
  38. const wchar_t *string,
  39. int length,
  40. RECT *rect,
  41. unsigned int format);
  42. BOOL
  43. BackBuffer_DrawTextEx(BackBuffer *self,
  44. HDC hdc,
  45. const wchar_t *string,
  46. int length,
  47. RECT *rect,
  48. unsigned int format,
  49. HFONT font,
  50. COLORREF backColor,
  51. COLORREF textColor,
  52. int backMode);
  53. #endif //_NULLSOFT_WINAMP_ML_DEVICES_BACK_BUFFER_HEADER