summaryrefslogtreecommitdiff
path: root/plugins/modernb/hdr/modern_layered_window_engine.h
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-05-15 10:38:20 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-05-15 10:38:20 +0000
commit48540940b6c28bb4378abfeb500ec45a625b37b6 (patch)
tree2ef294c0763e802f91d868bdef4229b6868527de /plugins/modernb/hdr/modern_layered_window_engine.h
parent5c350913f011e119127baeb32a6aedeb4f0d33bc (diff)
initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@2 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/modernb/hdr/modern_layered_window_engine.h')
-rw-r--r--plugins/modernb/hdr/modern_layered_window_engine.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/plugins/modernb/hdr/modern_layered_window_engine.h b/plugins/modernb/hdr/modern_layered_window_engine.h
new file mode 100644
index 0000000000..918bfabf37
--- /dev/null
+++ b/plugins/modernb/hdr/modern_layered_window_engine.h
@@ -0,0 +1,51 @@
+#pragma once
+#include "../m_api/m_skin_eng.h"
+
+// typedef int (/*__stdcall*/ *tPaintCallbackProc)(HWND hWnd, HDC hDC, RECT * rcPaint, HRGN rgnUpdate, DWORD dFlags, void * CallBackData);
+
+class CLayeredWindowEngine
+{
+private:
+ /*class CLweInfo
+ {
+ HWND hWnd;
+ HRGN hInvalidRgn;
+ };
+ */
+ //typedef std::map<HWND, CLweInfo> WndInfos;
+
+ enum { state_invalid, state_normal };
+
+ //WndInfos m_infos;
+ DWORD m_hValidatorThread;
+ CRITICAL_SECTION m_cs;
+ int m_state;
+ volatile bool m_invalid;
+
+public:
+ CLayeredWindowEngine(void);
+ ~CLayeredWindowEngine(void);
+
+ void _init();
+ void _deinit();
+
+ void lock() { EnterCriticalSection( &m_cs ); }
+ void unlock() { LeaveCriticalSection( &m_cs ); }
+
+ int get_state();
+
+public:
+ static void __cdecl LweValidatorProc();
+
+ void LweValidatorProcWorker();
+
+ void LweValidatorWorker();
+ int LweInvalidateRect( HWND hWnd, const RECT * rect, BOOL bErase );
+ // int LweValidateWindowRect( HWND hWnd, RECT * rect );
+ // int RegisterWindow( HWND hwnd, tPaintCallbackProc pPaintCallBackProc );
+
+};
+
+extern CLayeredWindowEngine _lwe;
+
+#define _InvalidateRect _lwe.LweInvalidateRect \ No newline at end of file