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/Wasabi/api/wnd/wndclass/qpaintwnd.h | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/Wasabi/api/wnd/wndclass/qpaintwnd.h')
-rw-r--r-- | Src/Wasabi/api/wnd/wndclass/qpaintwnd.h | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/Src/Wasabi/api/wnd/wndclass/qpaintwnd.h b/Src/Wasabi/api/wnd/wndclass/qpaintwnd.h new file mode 100644 index 00000000..b758d440 --- /dev/null +++ b/Src/Wasabi/api/wnd/wndclass/qpaintwnd.h @@ -0,0 +1,154 @@ +#ifndef __QPAINTWND_H +#define __QPAINTWND_H + +#include <api/wnd/wndclass/guiobjwnd.h> +#include <api/service/svcs/svc_skinfilter.h> + +#define QUICKPAINTWND_PARENT GuiObjectWnd + +/** + class QuickPaintWnd . + + @short + @author Nullsoft + @ver 1.0 + @see + @cat BFC +*/ +class QuickPaintContext; +class QuickPaintWnd : public QUICKPAINTWND_PARENT { + + public: + /** + QuickPaintWnd constructor . + + @see ~QuickPaintWnd() + */ + QuickPaintWnd(); + + /** + Destructor for QuickPaintWnd . + + @see QuickPaintWnd() + */ + virtual ~QuickPaintWnd(); + + /** + QuickPaintWnd method onInit . + + @ret 1 + */ + virtual int onInit(); + virtual int onPaint(Canvas *c); + + /** + QuickPaintWnd method timerCallback . + + @param id Identifies requested action + */ + virtual void timerCallback(int id); + virtual void onSetVisible(int show); + + /** + QuickPaintWnd method setRealtime . + + @see getRealtime() + @param rt + */ + virtual void setRealtime(int rt); + int getRealtime() const; + + /** + QuickPaintWnd method setSpeed sets the timer interval in milliseconds. + + @see getSpeed() + @param ms The timer interval in milliseconds. + */ + virtual void setSpeed(int ms); + + /** + QuickPaintWnd method getSpeed gets the timer interval in milliseconds. + + @see setSpeed() + @param ms The timer interval in milliseconds. + */ + virtual int getSpeed(); + + /** + QuickPaintWnd method startQuickPaint . + */ + virtual void startQuickPaint(); + + /** + QuickPaintWnd method stopQuickPaint . + */ + virtual void stopQuickPaint(); + + /** + QuickPaintWnd method isQuickPainting . + */ + virtual int isQuickPainting(); + + virtual int onQuickPaint(BltCanvas *c, int w, int h, int newone) { return 0; } // return 1 if your content has changed, or 0 to cancel update of your buffer to the window + virtual int wantEvenAlignment() { return 0; } // if you need even coordinates for your framebuffer, return 1 here + + /** + QuickPaintWnd method getQuickPaintSize gets the client area width and + height. + + @param w A pointer to the width to fill. + @param h A pointer to the height to fill. + */ + virtual void getQuickPaintSize(int *w, int *h); // by default returns client width/height + + /** + QuickPaintWnd method getQuickPaintSource . + + @see getQuickPaintSize() + @assert r exists. + @ret None + @except + @param r + */ + virtual void getQuickPaintSource(RECT *r); // by default returns the size of the quickpaint canvas + + /** + QuickPaintWnd method getQuickPaintDest . + + @see getQuickPaintSource() + @assert r exists. + @param r + */ + virtual void getQuickPaintDest(RECT *r); // by default returns the size of client area + virtual int wantNegativeHeight() { return 0; } + virtual int wantFilters() { return 0; } + virtual const wchar_t *getFiltersGroup() { return L"Vis/Eq"; } + + protected: +int invalidated; + private: + /** + QuickPaintWnd method quickPaint . + */ + friend class QuickPaintContext; + int quickPaint(); + void KillThread(); + void CreateRenderThread(); + int realtime; + volatile LONG invalidates_required; + BltCanvas *render_canvas1, *render_canvas2, *paint_canvas; + void SetPaintingCanvas(BltCanvas *c); + BltCanvas *&GetDrawingConvas(); + int canvas_w, canvas_h; + int speed; + int timerset; + int enabled; + + + PtrList<svc_skinFilter>filters; + SkinFilterEnum sfe; + QuickPaintContext *thread_context; +}; + + +#endif |