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