OSDN Git Service

71720c5319db08ff85c7fb9c83745309025d667e
[mingw/mingw-org-wsl.git] / w32api / include / gdiplus / gdiplusbase.h
1 /*\r
2  * gdiplusbase.h\r
3  *\r
4  * GDI+ base class\r
5  *\r
6  * This file is part of the w32api package.\r
7  *\r
8  * Contributors:\r
9  *   Created by Markus Koenig <markus@stber-koenig.de>\r
10  *\r
11  * THIS SOFTWARE IS NOT COPYRIGHTED\r
12  *\r
13  * This source code is offered for use in the public domain. You may\r
14  * use, modify or distribute it freely.\r
15  *\r
16  * This code is distributed in the hope that it will be useful but\r
17  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY\r
18  * DISCLAIMED. This includes but is not limited to warranties of\r
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r
20  *\r
21  */\r
22 \r
23 #ifndef __GDIPLUS_BASE_H\r
24 #define __GDIPLUS_BASE_H\r
25 #if __GNUC__ >=3\r
26 #pragma GCC system_header\r
27 #endif\r
28 \r
29 #ifndef __cplusplus\r
30 #error "A C++ compiler is required to include gdiplusbase.h."\r
31 #endif\r
32 \r
33 class GdiplusBase\r
34 {\r
35 public:\r
36         static void* operator new(size_t in_size)\r
37         {\r
38                 return DllExports::GdipAlloc(in_size);\r
39         }\r
40         static void* operator new[](size_t in_size)\r
41         {\r
42                 return DllExports::GdipAlloc(in_size);\r
43         }\r
44         static void operator delete(void *in_pVoid)\r
45         {\r
46                 DllExports::GdipFree(in_pVoid);\r
47         }\r
48         static void operator delete[](void *in_pVoid)\r
49         {\r
50                 DllExports::GdipFree(in_pVoid);\r
51         }\r
52 };\r
53 \r
54 #endif /* __GDIPLUS_BASE_H */\r