Basic FreeType renderer implementation.
[gdipp.git] / gdipp_lib / lock.h
blobfa6674d1b2b03ec42181c1d5474d22009b256bc9
1 #pragma once
3 #include "gdipp_lib/api.h"
5 namespace gdipp
8 class GDIPP_API lock
10 public:
11 enum LOCK_TYPE
13 CLIENT_COM_HOOK,
14 CLIENT_GAMMA,
15 CONFIG_RENDER_CACHE,
16 CONFIG_RENDER_CONFIG_DELTA_CACHE,
17 GLOBAL_DEBUG,
18 SERVER_DC_POOL,
19 SERVER_FONT_MGR,
20 SERVER_FREETYPE,
21 SERVER_GLYPH_CACHE,
22 SERVER_GLYPH_RUN_CACHE,
23 SERVER_LRU,
25 LAST_LOCK_TYPE
28 public:
29 static void initialize_locks();
30 static void destory_locks();
32 explicit lock(LOCK_TYPE lock_type);
33 ~lock();
35 private:
36 static std::vector<CRITICAL_SECTION> _locks;
38 CRITICAL_SECTION *_cs;