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