diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Winamp/VideoOSD.h | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/Winamp/VideoOSD.h')
-rw-r--r-- | Src/Winamp/VideoOSD.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Src/Winamp/VideoOSD.h b/Src/Winamp/VideoOSD.h new file mode 100644 index 00000000..fdc55041 --- /dev/null +++ b/Src/Winamp/VideoOSD.h @@ -0,0 +1,53 @@ +#ifndef NULLSOFT_VIDEOOSDH +#define NULLSOFT_VIDEOOSDH + +/* Video On Screen Display */ +#include <windows.h> + +#define NUM_WIDGETS 11 + +class IVideoOSD +{ +public: + IVideoOSD(); + ~IVideoOSD(); + void SetParent(HWND _parent) + { + parent=_parent; + } + bool Showing(); + bool Ready(); + void Show(); + void Hide(); + void Draw(); + int GetBarHeight(); + bool Mouse(int x, int y, WPARAM wParam, bool moving); // return true if we need to close because of this + + int ctrlrects_ready; + + virtual bool MouseDown(int x, int y, WPARAM wParam) {return false;}; + virtual bool MouseMove(int x, int y, WPARAM wParam) {return false;}; + virtual bool MouseUp(int x, int y, WPARAM wParam) {return false;}; + +protected: + HWND parent; +private: + bool CloseHitTest(int x, int y); + void HitTest(int x, int y, int dragging); + int osdLastClickItem; + + int osdMemBMW; // width of memory bitmap + int osdMemBMH; // height of memory bitmap + int osdLastMouseX; // for WM_MOUSEMOVE thresholding, so osd isn't spastic + int osdLastMouseY; // for WM_MOUSEMOVE thresholding, so osd isn't spastic + RECT ctrlrect[NUM_WIDGETS]; // relative to [i.e. (0,0) is] upper left corner of the black strip @ the bottom + RECT ctrlrect_all; // relative to [i.e. (0,0) is] upper left corner of the black strip @ the bottom + + bool show_osd; + + static void CALLBACK TimerCallback(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime); + int ignore_mousemove_count; + int last_close_height, last_close_width; +}; + +#endif
\ No newline at end of file |