The OpenD Programming Language

1 /**
2  * Windows API header module
3  *
4  * Translated from MinGW Windows headers
5  *
6  * Authors: Stewart Gordon
7  * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
8  * Source: $(DRUNTIMESRC core/sys/windows/_custcntl.d)
9  */
10 module core.sys.windows.custcntl;
11 version (Windows):
12 
13 version (ANSI) {} else version = Unicode;
14 
15 import core.sys.windows.windef;
16 
17 // FIXME: check type
18 enum CCF_NOTEXT = 1;
19 
20 enum size_t
21     CCHCCCLASS =  32,
22     CCHCCDESC  =  32,
23     CCHCCTEXT  = 256;
24 
25 struct CCSTYLEA {
26     DWORD           flStyle;
27     DWORD           flExtStyle;
28     CHAR[CCHCCTEXT] szText = 0;
29     LANGID          lgid;
30     WORD            wReserved1;
31 }
32 alias CCSTYLEA* LPCCSTYLEA;
33 
34 struct CCSTYLEW {
35     DWORD            flStyle;
36     DWORD            flExtStyle;
37     WCHAR[CCHCCTEXT] szText = 0;
38     LANGID           lgid;
39     WORD             wReserved1;
40 }
41 alias CCSTYLEW* LPCCSTYLEW;
42 
43 struct CCSTYLEFLAGA {
44     DWORD flStyle;
45     DWORD flStyleMask;
46     LPSTR pszStyle;
47 }
48 alias CCSTYLEFLAGA* LPCCSTYLEFLAGA;
49 
50 struct CCSTYLEFLAGW {
51     DWORD  flStyle;
52     DWORD  flStyleMask;
53     LPWSTR pszStyle;
54 }
55 alias CCSTYLEFLAGW* LPCCSTYLEFLAGW;
56 
57 struct CCINFOA {
58     CHAR[CCHCCCLASS]  szClass = 0;
59     DWORD             flOptions;
60     CHAR[CCHCCDESC]   szDesc = 0;
61     UINT              cxDefault;
62     UINT              cyDefault;
63     DWORD             flStyleDefault;
64     DWORD             flExtStyleDefault;
65     DWORD             flCtrlTypeMask;
66     CHAR[CCHCCTEXT]   szTextDefault = 0;
67     INT               cStyleFlags;
68     LPCCSTYLEFLAGA    aStyleFlags;
69     LPFNCCSTYLEA      lpfnStyle;
70     LPFNCCSIZETOTEXTA lpfnSizeToText;
71     DWORD             dwReserved1;
72     DWORD             dwReserved2;
73 }
74 alias CCINFOA* LPCCINFOA;
75 
76 struct CCINFOW {
77     WCHAR[CCHCCCLASS] szClass = 0;
78     DWORD             flOptions;
79     WCHAR[CCHCCDESC]  szDesc = 0;
80     UINT              cxDefault;
81     UINT              cyDefault;
82     DWORD             flStyleDefault;
83     DWORD             flExtStyleDefault;
84     DWORD             flCtrlTypeMask;
85     WCHAR[CCHCCTEXT]  szTextDefault = 0;
86     INT               cStyleFlags;
87     LPCCSTYLEFLAGW    aStyleFlags;
88     LPFNCCSTYLEW      lpfnStyle;
89     LPFNCCSIZETOTEXTW lpfnSizeToText;
90     DWORD             dwReserved1;
91     DWORD             dwReserved2;
92 }
93 alias CCINFOW* LPCCINFOW;
94 
95 extern (Windows) {
96     alias BOOL function(HWND, LPCCSTYLEA) LPFNCCSTYLEA;
97     alias BOOL function(HWND, LPCCSTYLEW) LPFNCCSTYLEW;
98     alias INT function(DWORD, DWORD, HFONT, LPSTR) LPFNCCSIZETOTEXTA;
99     alias INT function(DWORD, DWORD, HFONT, LPWSTR) LPFNCCSIZETOTEXTW;
100     alias UINT function(LPCCINFOA) LPFNCCINFOA;
101     alias UINT function(LPCCINFOW) LPFNCCINFOW;
102     UINT CustomControlInfoA(LPCCINFOA acci);
103     UINT CustomControlInfoW(LPCCINFOW acci);
104 }
105 
106 version (Unicode) {
107     alias CCSTYLEW CCSTYLE;
108     alias CCSTYLEFLAGW CCSTYLEFLAG;
109     alias CCINFOW CCINFO;
110     alias LPFNCCSTYLEW LPFNCCSTYLE;
111     alias LPFNCCSIZETOTEXTW LPFNCCSIZETOTEXT;
112     alias LPFNCCINFOW LPFNCCINFO;
113 } else {
114     alias CCSTYLEA CCSTYLE;
115     alias CCSTYLEFLAGA CCSTYLEFLAG;
116     alias CCINFOA CCINFO;
117     alias LPFNCCSTYLEA LPFNCCSTYLE;
118     alias LPFNCCSIZETOTEXTA LPFNCCSIZETOTEXT;
119     alias LPFNCCINFOA LPFNCCINFO;
120 }
121 
122 alias CCSTYLE* LPCCSTYLE;
123 alias CCSTYLEFLAG* LPCCSTYLEFLAG;
124 alias CCINFO* LPCCINFO;