blob: b758d440dbb83bddcd235463598fdf0d46ed12ab (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
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
|