Mercurial > hg > xemacs-beta
annotate src/intl-encap-win32.c @ 5068:c673987f5f3d
dump make-coding-system
-------------------- ChangeLog entries follow: --------------------
lisp/ChangeLog addition:
2010-02-22 Ben Wing <ben@xemacs.org>
* mule/make-coding-system.el:
* mule/make-coding-system.el (fixed-width-generate-helper):
* mule/make-coding-system.el (fixed-width-private-use-start): Removed.
* mule/make-coding-system.el (fixed-width-create-decode-encode-tables):
* coding.el:
* coding.el (decode-char): New.
* coding.el (featurep):
* coding.el (encode-char): New.
* dumped-lisp.el (preloaded-file-list):
Dump make-coding-system. Aidan's hack to avoid dumping this file
never really worked right -- with some configurations (not clear
exactly which ones) `make-coding-system.el' gets dumped anyway due to
calls to `make-coding-system' in unicode.el, with the result that
the documentation of functions in make-coding-system.el gets lost.
Also needed to remove defvar fixed-width-private-use-start and
incorporate it inline, due to bootstrapping issues -- the call to
decode-char introduced a cross-dependency between unicode.el and
make-coding-system.el.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Mon, 22 Feb 2010 21:26:18 -0600 |
parents | 7eec2a1f3412 |
children | 308d34e9f07d |
rev | line source |
---|---|
771 | 1 /* Unicode-encapsulation of Win32 library functions. |
4875
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
2 Copyright (C) 2000, 2001, 2002, 2004, 2010 Ben Wing. |
771 | 3 |
4 This file is part of XEmacs. | |
5 | |
6 XEmacs is free software; you can redistribute it and/or modify it | |
7 under the terms of the GNU General Public License as published by the | |
8 Free Software Foundation; either version 2, or (at your option) any | |
9 later version. | |
10 | |
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with XEmacs; see the file COPYING. If not, write to | |
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
19 Boston, MA 02111-1307, USA. */ | |
20 | |
21 /* Synched up with: Not in FSF. */ | |
22 | |
23 /* Authorship: | |
24 | |
25 Current primary author: Ben Wing <ben@xemacs.org> | |
26 | |
27 Created summer 2000 by Ben Wing. Completed August 2001. Completely | |
28 written by Ben Wing. | |
29 */ | |
30 | |
31 #define NEED_MSWINDOWS_COMMCTRL | |
32 #define NEED_MSWINDOWS_SHLOBJ | |
33 | |
34 #include <config.h> | |
35 #include "lisp.h" | |
36 | |
37 #include "console-msw.h" | |
38 | |
39 int no_mswin_unicode_lib_calls; | |
40 | |
41 | |
42 /************************************************************************/ | |
43 /* auto-generation */ | |
44 /************************************************************************/ | |
45 | |
46 /* we use a simple script to control the auto-generation. | |
47 | |
48 \(The following is copied from lib-src/make-mswin-unicode.pl.) | |
49 | |
50 file specifies a file to start reading from. | |
51 yes indicates a function to be automatically Unicode-encapsulated. | |
52 (All parameters either need no special processing or are LPTSTR or | |
53 LPCTSTR.) | |
4911 | 54 override indidates a function where the prototype can be overridden |
55 due to errors in Cygwin or Visual Studio. | |
771 | 56 soon indicates a function that should be automatically Unicode-encapsulated, |
57 but we're not ready to process it yet. | |
58 no indicates a function we don't support (it will be #defined to cause | |
59 a compile error, with the text after the function included in the | |
60 erroneous definition to indicate why we don't support it). | |
4875
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
61 review indicates a function that we still need to review to determine whether |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
62 or how to support it. This has the same effect as `no', with a comment |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
63 indicating that the function needs review. |
771 | 64 skip indicates a function we support manually; only a comment about this |
65 will be generated. | |
66 split indicates a function with a split structure (different versions | |
67 for Unicode and ANSI), but where the only difference is in pointer | |
68 types, and the actual size does not differ. The structure name | |
69 should follow the function name, and it will be automatically | |
70 Unicode-encapsulated with appropriate casts. | |
71 begin-bracket indicates a #if statement to be inserted here. | |
72 end-bracket indicates the corresponding #endif statement. | |
73 blank lines and lines beginning with // are ignored. | |
74 | |
75 The generated files go into intl-auto-encap-win32.[ch]. | |
76 | |
77 To regenerate, go to the nt/ subdirectory and type | |
78 | |
79 nmake -f xemacs.mak unicode-encapsulate | |
80 | |
81 This does the following: | |
82 | |
83 cd $(SRC) | |
84 perl ../lib-src/make-mswin-unicode.pl --c-output intl-auto-encap-win32.c --h-output intl-auto-encap-win32.h intl-encap-win32.c | |
85 | |
86 */ | |
87 | |
88 /* | |
89 | |
90 terminology used below: | |
91 | |
92 "split-simple" means a structure where the A and W versions are the same | |
93 size, and the only differences are string pointer arguments. (This does NOT | |
94 include structures with a pointer to a split-sized structure within them.) | |
95 This can also refer to a function pointer whose only split arguments are | |
96 string pointers or split-simple structures. | |
97 | |
98 "split-sized" means a structure where the A and W versions are different | |
99 sizes (typically because of an inline string argument), or where there's a | |
100 pointer to another split-sized structure. | |
101 | |
102 "split-complex" | |
103 | |
104 begin-unicode-encapsulation-script | |
105 | |
800 | 106 // dir c:\Program Files\Microsoft Visual Studio\VC98\Include\ |
107 | |
3728 | 108 file ACLAPI.h |
109 | |
110 yes GetNamedSecurityInfo | |
4875
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
111 review BuildExplicitAccessWithName |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
112 review BuildSecurityDescriptor |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
113 review BuildTrusteeWithName |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
114 review BuildTrusteeWithObjectsAndName |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
115 review BuildTrusteeWithObjectsAndSid |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
116 review BuildTrusteeWithSid |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
117 review GetAuditedPermissionsFromAcl |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
118 review GetEffectiveRightsFromAcl |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
119 review GetExplicitEntriesFromAcl |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
120 review GetTrusteeForm |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
121 review GetTrusteeName |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
122 review GetTrusteeType |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
123 review LookupSecurityDescriptorParts |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
124 review SetEntriesInAcl |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
125 review SetNamedSecurityInfo |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
126 review BuildImpersonateExplicitAccessWithName |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
127 review BuildImpersonateTrustee |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
128 review GetMultipleTrustee |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
129 review GetMultipleTrusteeOperation |
3728 | 130 |
771 | 131 file WINBASE.H |
132 | |
133 yes GetBinaryType | |
134 yes GetShortPathName | |
1684 | 135 no GetLongPathName Win98/2K+ only |
827 | 136 skip GetEnvironmentStrings misnamed ANSI version of the function |
771 | 137 yes FreeEnvironmentStrings |
138 yes FormatMessage | |
139 yes CreateMailslot | |
140 begin-bracket !defined (CYGWIN_HEADERS) | |
778 | 141 no EncryptFile Win2K+ only |
142 no DecryptFile Win2K+ only | |
771 | 143 end-bracket |
144 no OpenRaw error "The procedure entry point OpenRawW could not be located in the dynamic link library ADVAPI32.dll." | |
145 no QueryRecoveryAgents split-sized LPRECOVERY_AGENT_INFORMATION | |
146 yes lstrcmp | |
147 yes lstrcmpi | |
148 yes lstrcpyn | |
149 yes lstrcpy | |
150 yes lstrcat | |
151 yes lstrlen | |
152 yes CreateMutex | |
153 yes OpenMutex | |
154 yes CreateEvent | |
155 yes OpenEvent | |
156 yes CreateSemaphore | |
157 yes OpenSemaphore | |
158 yes CreateWaitableTimer | |
159 yes OpenWaitableTimer | |
160 yes CreateFileMapping | |
161 yes OpenFileMapping | |
162 yes GetLogicalDriveStrings | |
163 yes LoadLibrary | |
164 yes LoadLibraryEx | |
165 yes GetModuleFileName | |
166 yes GetModuleHandle | |
167 split CreateProcess LPSTARTUPINFO | |
168 yes FatalAppExit | |
169 split GetStartupInfo LPSTARTUPINFO | |
170 yes GetCommandLine | |
171 yes GetEnvironmentVariable | |
172 yes SetEnvironmentVariable | |
173 yes ExpandEnvironmentStrings | |
174 yes OutputDebugString | |
175 yes FindResource | |
176 yes FindResourceEx | |
2500 | 177 skip EnumResourceTypes different prototypes in VC6 and VC7 |
178 skip EnumResourceNames different prototypes in VC6 and VC7 | |
179 skip EnumResourceLanguages different prototypes in VC6 and VC7 | |
771 | 180 yes BeginUpdateResource |
181 yes UpdateResource | |
182 yes EndUpdateResource | |
183 yes GlobalAddAtom | |
184 yes GlobalFindAtom | |
185 yes GlobalGetAtomName | |
186 yes AddAtom | |
187 yes FindAtom | |
188 yes GetAtomName | |
189 yes GetProfileInt | |
190 yes GetProfileString | |
191 yes WriteProfileString | |
192 yes GetProfileSection | |
193 yes WriteProfileSection | |
194 yes GetPrivateProfileInt | |
195 yes GetPrivateProfileString | |
196 yes WritePrivateProfileString | |
197 yes GetPrivateProfileSection | |
198 yes WritePrivateProfileSection | |
199 yes GetPrivateProfileSectionNames | |
200 yes GetPrivateProfileStruct | |
201 yes WritePrivateProfileStruct | |
202 yes GetDriveType | |
203 yes GetSystemDirectory | |
204 yes GetTempPath | |
205 yes GetTempFileName | |
206 yes GetWindowsDirectory | |
207 yes SetCurrentDirectory | |
208 yes GetCurrentDirectory | |
209 yes GetDiskFreeSpace | |
210 yes GetDiskFreeSpaceEx | |
211 yes CreateDirectory | |
212 yes CreateDirectoryEx | |
213 yes RemoveDirectory | |
214 yes GetFullPathName | |
215 yes DefineDosDevice | |
216 yes QueryDosDevice | |
217 yes CreateFile | |
218 yes SetFileAttributes | |
219 yes GetFileAttributes | |
220 yes GetFileAttributesEx | |
221 yes GetCompressedFileSize | |
222 yes DeleteFile | |
223 no FindFirstFileEx split-sized LPWIN32_FIND_DATA; not used, NT 4.0+ only | |
224 skip FindFirstFile split-sized LPWIN32_FIND_DATA | |
225 skip FindNextFile split-sized LPWIN32_FIND_DATA | |
226 yes SearchPath | |
227 yes CopyFile | |
228 yes CopyFileEx NT 4.0+ only | |
229 yes MoveFile | |
230 yes MoveFileEx | |
231 no MoveFileWithProgress NT 5.0+ only | |
232 no CreateHardLink NT 5.0+ only | |
233 yes CreateNamedPipe | |
234 yes GetNamedPipeHandleState | |
235 yes CallNamedPipe | |
236 yes WaitNamedPipe | |
237 yes SetVolumeLabel | |
238 yes GetVolumeInformation | |
239 yes ClearEventLog | |
240 yes BackupEventLog | |
241 yes OpenEventLog | |
242 yes RegisterEventSource | |
243 yes OpenBackupEventLog | |
244 yes ReadEventLog | |
245 yes ReportEvent | |
246 yes AccessCheckAndAuditAlarm | |
247 no AccessCheckByTypeAndAuditAlarm NT 5.0+ only | |
248 no AccessCheckByTypeResultListAndAuditAlarm NT 5.0+ only | |
249 yes ObjectOpenAuditAlarm | |
250 yes ObjectPrivilegeAuditAlarm | |
251 yes ObjectCloseAuditAlarm | |
252 yes ObjectDeleteAuditAlarm | |
253 yes PrivilegedServiceAuditAlarm | |
254 yes SetFileSecurity | |
255 yes GetFileSecurity | |
256 yes FindFirstChangeNotification | |
257 no ReadDirectoryChanges Unicode-only | |
258 yes IsBadStringPtr | |
259 yes LookupAccountSid | |
260 yes LookupAccountName | |
261 yes LookupPrivilegeValue | |
262 yes LookupPrivilegeName | |
263 yes LookupPrivilegeDisplayName | |
264 yes BuildCommDCB | |
265 yes BuildCommDCBAndTimeouts | |
266 yes CommConfigDialog | |
267 yes GetDefaultCommConfig | |
268 yes SetDefaultCommConfig | |
269 yes GetComputerName | |
270 yes SetComputerName | |
271 yes GetUserName | |
272 yes LogonUser | |
273 split CreateProcessAsUser LPSTARTUPINFO | |
274 no GetCurrentHwProfile split-sized LPHW_PROFILE_INFO; NT 4.0+ only | |
275 no GetVersionEx split-sized LPOSVERSIONINFO | |
276 no CreateJobObject NT 5.0+ only | |
277 no OpenJobObject NT 5.0+ only | |
4875
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
278 review CheckNameLegalDOS8Dot3 |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
279 review CreateActCtx |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
280 review CreateProcessWithLogon |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
281 review DeleteVolumeMountPoint |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
282 review DnsHostnameToComputerName |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
283 review FileEncryptionStatus |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
284 review FindActCtxSectionString |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
285 review FindFirstVolume |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
286 review FindFirstVolumeMountPoint |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
287 review FindNextVolume |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
288 review FindNextVolumeMountPoint |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
289 review GetFirmwareEnvironmentVariable |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
290 review GetComputerNameEx |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
291 review GetDllDirectory |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
292 review GetModuleHandleEx |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
293 review GetSystemWindowsDirectory |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
294 review GetSystemWow64Directory |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
295 review GetVolumeNameForVolumeMountPoint |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
296 review GetVolumePathName |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
297 review GetVolumePathNamesForVolumeName |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
298 review QueryActCtx |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
299 review ReplaceFile |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
300 review SetComputerNameEx |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
301 review SetDllDirectory |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
302 review SetFileShortName |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
303 review SetFirmwareEnvironmentVariable |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
304 review SetVolumeMountPoint |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
305 review VerifyVersionInfo |
771 | 306 |
307 file WINUSER.H | |
308 | |
309 skip MAKEINTRESOURCE macro | |
310 yes wvsprintf | |
311 no wsprintf varargs | |
312 yes LoadKeyboardLayout | |
313 yes GetKeyboardLayoutName | |
314 no CreateDesktop split-sized LPDEVMODE | |
315 yes OpenDesktop | |
316 split EnumDesktops DESKTOPENUMPROC // callback fun differs only in string pointer type | |
4903
70089046adef
fix compile problems in intl-encap* under VS6
Ben Wing <ben@xemacs.org>
parents:
4875
diff
changeset
|
317 override HWINSTA CreateWindowStationW(LPWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES); error arg 1, VS6 prototype, missing const |
771 | 318 yes OpenWindowStation |
319 split EnumWindowStations WINSTAENUMPROC // callback fun differs only in string pointer type | |
320 yes GetUserObjectInformation | |
321 yes SetUserObjectInformation | |
322 yes RegisterWindowMessage | |
323 yes GetMessage | |
324 yes DispatchMessage | |
325 yes PeekMessage | |
326 skip SendMessage split messages and structures | |
4903
70089046adef
fix compile problems in intl-encap* under VS6
Ben Wing <ben@xemacs.org>
parents:
4875
diff
changeset
|
327 no SendMessageTimeout VS6 has erroneous seventh parameter DWORD_PTR instead of PDWORD_PTR |
771 | 328 yes SendNotifyMessage |
329 yes SendMessageCallback | |
330 no BroadcastSystemMessage win95 version not split; NT 4.0+ only | |
331 no RegisterDeviceNotification NT 5.0+ only | |
332 yes PostMessage | |
333 yes PostThreadMessage | |
334 no PostAppMessage macro | |
335 skip DefWindowProc return value is conditionalized on _MAC, messes up parser | |
336 no CallWindowProc two versions, STRICT and non-STRICT | |
337 skip RegisterClass need to intercept so we can provide our own window procedure and handle split notify messages; split-simple WNDCLASS | |
338 skip UnregisterClass need to intercept for reasons related to RegisterClass | |
339 split GetClassInfo LPWNDCLASS | |
340 skip RegisterClassEx need to intercept so we can provide our own window procedure and handle split notify messages; split-simple WNDCLASSEX; NT 4.0+ only | |
341 split GetClassInfoEx LPWNDCLASSEX NT 4.0+ only | |
342 yes CreateWindowEx | |
343 skip CreateWindow macro | |
344 yes CreateDialogParam | |
345 split CreateDialogIndirectParam LPCDLGTEMPLATE error in Cygwin prototype (no split) but fixable with typedef | |
346 no CreateDialog macro | |
347 no CreateDialogIndirect macro w/split LPCDLGTEMPLATE | |
348 yes DialogBoxParam | |
349 split DialogBoxIndirectParam LPCDLGTEMPLATE error in Cygwin prototype (no split) but fixable with typedef | |
350 no DialogBox macro | |
351 no DialogBoxIndirect macro w/split LPCDLGTEMPLATE | |
352 yes SetDlgItemText | |
353 yes GetDlgItemText | |
354 yes SendDlgItemMessage | |
355 no DefDlgProc return value is conditionalized on _MAC, messes up parser | |
356 begin-bracket !defined (CYGWIN_HEADERS) | |
357 yes CallMsgFilter | |
358 end-bracket | |
359 yes RegisterClipboardFormat | |
360 yes GetClipboardFormatName | |
361 yes CharToOem | |
362 yes OemToChar | |
363 yes CharToOemBuff | |
364 yes OemToCharBuff | |
365 yes CharUpper | |
366 yes CharUpperBuff | |
367 yes CharLower | |
368 yes CharLowerBuff | |
369 yes CharNext | |
370 yes CharPrev | |
371 no IsCharAlpha split CHAR | |
372 no IsCharAlphaNumeric split CHAR | |
373 no IsCharUpper split CHAR | |
374 no IsCharLower split CHAR | |
375 yes GetKeyNameText | |
376 skip VkKeyScan split CHAR | |
377 no VkKeyScanEx split CHAR; NT 4.0+ only | |
378 yes MapVirtualKey | |
379 yes MapVirtualKeyEx NT 4.0+ only | |
380 yes LoadAccelerators | |
381 yes CreateAcceleratorTable | |
382 yes CopyAcceleratorTable | |
383 yes TranslateAccelerator | |
384 yes LoadMenu | |
385 split LoadMenuIndirect MENUTEMPLATE | |
386 yes ChangeMenu | |
387 yes GetMenuString | |
388 yes InsertMenu | |
389 yes AppendMenu | |
390 yes ModifyMenu | |
391 split InsertMenuItem LPCMENUITEMINFO NT 4.0+ only | |
392 split GetMenuItemInfo LPMENUITEMINFO NT 4.0+ only | |
393 split SetMenuItemInfo LPCMENUITEMINFO NT 4.0+ only | |
394 yes DrawText | |
395 yes DrawTextEx NT 4.0+ only | |
396 yes GrayString | |
397 yes DrawState NT 4.0+ only | |
398 yes TabbedTextOut | |
399 yes GetTabbedTextExtent | |
400 yes SetProp | |
401 yes GetProp | |
402 yes RemoveProp | |
403 split EnumPropsEx PROPENUMPROCEX // callback fun differs only in string pointer type | |
404 split EnumProps PROPENUMPROC // callback fun differs only in string pointer type | |
405 yes SetWindowText | |
406 yes GetWindowText | |
407 yes GetWindowTextLength | |
408 yes MessageBox | |
409 yes MessageBoxEx | |
4873
50861fea97f6
regenerate intl-auto-encap-win32.c, now possible from Cygwin /usr/include/w32api headers
Ben Wing <ben@xemacs.org>
parents:
4837
diff
changeset
|
410 // split MessageBoxIndirect LPMSGBOXPARAMS NT 4.0+ only |
50861fea97f6
regenerate intl-auto-encap-win32.c, now possible from Cygwin /usr/include/w32api headers
Ben Wing <ben@xemacs.org>
parents:
4837
diff
changeset
|
411 no MessageBoxIndirect Cygwin has split MSGBOXPARAMS* instead of LPMSGBOXPARAMS |
771 | 412 yes GetWindowLong |
413 yes SetWindowLong | |
414 yes GetClassLong | |
415 yes SetClassLong | |
416 yes FindWindow | |
417 yes FindWindowEx NT 4.0+ only | |
418 yes GetClassName | |
419 no SetWindowsHook obsolete; two versions, STRICT and non-STRICT | |
420 yes SetWindowsHookEx | |
421 yes LoadBitmap | |
422 yes LoadCursor | |
423 yes LoadCursorFromFile | |
424 yes LoadIcon | |
425 yes LoadImage NT 4.0+ only | |
426 yes LoadString | |
427 yes IsDialogMessage | |
428 yes DlgDirList | |
429 yes DlgDirSelectEx | |
430 yes DlgDirListComboBox | |
431 yes DlgDirSelectComboBoxEx | |
432 yes DefFrameProc | |
433 no DefMDIChildProc return value is conditionalized on _MAC, messes up parser | |
4911 | 434 override HWND CreateMDIWindowW(LPWSTR,LPWSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM); error arg 1, VS6 prototype, missing const |
771 | 435 yes WinHelp |
436 no ChangeDisplaySettings split-sized LPDEVMODE | |
437 no ChangeDisplaySettingsEx split-sized LPDEVMODE; NT 5.0/Win98+ only | |
438 no EnumDisplaySettings split-sized LPDEVMODE | |
439 no EnumDisplayDevices split-sized PDISPLAY_DEVICE; NT 5.0+ only, no Win98 | |
440 yes SystemParametersInfo probs w/ICONMETRICS, NONCLIENTMETRICS | |
441 no GetMonitorInfo NT 5.0/Win98+ only | |
442 no GetWindowModuleFileName NT 5.0+ only | |
443 no RealGetWindowClass NT 5.0+ only | |
444 no GetAltTabInfo NT 5.0+ only | |
4875
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
445 review BroadcastSystemMessageEx |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
446 review EnumDisplaySettingsEx |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
447 review GetClassLongPtr |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
448 review GetRawInputDeviceInfo |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
449 review GetWindowLongPtr |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
450 review SetClassLongPtr |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
451 review SetWindowLongPtr |
771 | 452 |
453 file WINGDI.H | |
454 | |
4873
50861fea97f6
regenerate intl-auto-encap-win32.c, now possible from Cygwin /usr/include/w32api headers
Ben Wing <ben@xemacs.org>
parents:
4837
diff
changeset
|
455 begin-bracket defined (HAVE_MS_WINDOWS) |
771 | 456 // split-sized LOGCOLORSPACE |
457 // split-sized TEXTMETRIC | |
458 // split-sized NEWTEXTMETRIC | |
459 // split-sized NEWTEXTMETRICEX | |
460 // split-sized LOGFONT | |
461 // split-sized ENUMLOGFONT | |
462 // split-sized ENUMLOGFONTEX | |
463 // split-sized EXTLOGFONT, used in EMREXTCREATEFONTINDIRECTW (Unicode-only) and (???) in DEVINFO (DDK structure) | |
464 // split-sized DEVMODE | |
465 // split-sized DISPLAY_DEVICE, used in EnumDisplayDevices | |
466 // split-sized OUTLINETEXTMETRIC | |
467 // split-simple POLYTEXT | |
468 // split-simple GCP_RESULTS | |
469 // split-sized function pointer OLDFONTENUMPROC, same as FONTENUMPROC | |
470 // split-sized function pointer FONTENUMPROC | |
471 yes AddFontResource | |
472 yes CopyMetaFile | |
473 skip CreateDC split-sized DEVMODE | |
474 skip CreateFontIndirect split-sized LOGFONT | |
475 yes CreateFont | |
476 skip CreateIC split-sized DEVMODE | |
477 yes CreateMetaFile | |
478 yes CreateScalableFontResource | |
479 skip DeviceCapabilities split-sized DEVMODE | |
480 skip EnumFontFamiliesEx split-complex FONTENUMPROC; NT 4.0+ only | |
481 no EnumFontFamilies split-complex FONTENUMPROC | |
482 no EnumFonts split-complex FONTENUMPROC | |
483 yes GetCharWidth | |
484 yes GetCharWidth32 | |
485 yes GetCharWidthFloat | |
486 yes GetCharABCWidths | |
487 yes GetCharABCWidthsFloat | |
488 yes GetGlyphOutline | |
489 yes GetMetaFile | |
490 no GetOutlineTextMetrics split-sized LPOUTLINETEXTMETRIC | |
491 yes GetTextExtentPoint | |
492 yes GetTextExtentPoint32 | |
493 yes GetTextExtentExPoint | |
494 split GetCharacterPlacement LPGCP_RESULTS NT 4.0+ only | |
495 no GetGlyphIndices NT 5.0+ only | |
496 no AddFontResourceEx NT 5.0+ only | |
497 no RemoveFontResourceEx NT 5.0+ only | |
498 // split-sized AXISINFO, used in AXESLIST; NT 5.0+ only | |
499 // split-sized AXESLIST, used in ENUMLOGFONTEXDV; NT 5.0+ only | |
500 // split-sized ENUMLOGFONTEXDV; NT 5.0+ only | |
501 no CreateFontIndirectEx split-sized ENUMLOGFONTEXDV; NT 5.0+ only | |
502 // split-sized ENUMTEXTMETRIC, returned in EnumFontFamExProc, on NT 5.0+; NT 5.0+ only | |
503 skip ResetDC split-sized DEVMODE | |
504 yes RemoveFontResource | |
505 yes CopyEnhMetaFile | |
506 yes CreateEnhMetaFile | |
507 yes GetEnhMetaFile | |
508 yes GetEnhMetaFileDescription | |
509 skip GetTextMetrics split-sized LPTEXTMETRIC | |
510 // split-simple DOCINFO | |
511 split StartDoc DOCINFO | |
512 skip GetObject split-sized LOGFONT | |
513 yes TextOut | |
514 yes ExtTextOut | |
515 split PolyTextOut POLYTEXT | |
516 yes GetTextFace | |
517 yes GetKerningPairs | |
518 // split-simple function pointer ICMENUMPROC | |
519 no GetLogColorSpace split-sized LPLOGCOLORSPACE; NT 4.0+ only | |
520 no CreateColorSpace split-sized LPLOGCOLORSPACE; NT 4.0+ only | |
4903
70089046adef
fix compile problems in intl-encap* under VS6
Ben Wing <ben@xemacs.org>
parents:
4875
diff
changeset
|
521 yes GetICMProfile NT 4.0+ only, former error in Cygwin prototype but no more (Cygwin 1.7, 1-30-10) |
771 | 522 yes SetICMProfile NT 4.0+ only |
523 split EnumICMProfiles ICMENUMPROC NT 4.0+ only | |
524 skip UpdateICMRegKey NT 4.0+ only, error in Cygwin prototype | |
525 // non-split EMREXTTEXTOUT (A and W versions identical) | |
526 // non-split EMRPOLYTEXTOUT (A and W versions identical) | |
527 // Unicode-only EMREXTCREATEFONTINDIRECTW | |
528 no wglUseFontBitmaps causes link error | |
529 no wglUseFontOutlines causes link error | |
4873
50861fea97f6
regenerate intl-auto-encap-win32.c, now possible from Cygwin /usr/include/w32api headers
Ben Wing <ben@xemacs.org>
parents:
4837
diff
changeset
|
530 end-bracket |
771 | 531 |
532 file WINSPOOL.H | |
533 | |
534 begin-bracket defined (HAVE_MS_WINDOWS) | |
535 yes EnumPrinters #### problems with DEVMODE pointer in PRINTER_INFO_2 | |
536 skip OpenPrinter split-sized DEVMODE pointer in split PRINTER_DEFAULTS | |
537 no ResetPrinter split-sized DEVMODE pointer in split PRINTER_DEFAULTS | |
538 no SetJob split-sized DEVMODE pointer in split JOB_INFO_2 | |
539 no GetJob split-sized DEVMODE pointer in split JOB_INFO_2 | |
540 no EnumJobs split-sized DEVMODE pointer in split JOB_INFO_2 | |
541 no AddPrinter split-sized DEVMODE pointer in split PRINTER_INFO_2 | |
542 no SetPrinter split-sized DEVMODE pointer in split PRINTER_INFO_2 | |
543 no GetPrinter split-sized DEVMODE pointer in split PRINTER_INFO_2 | |
544 // other than DocumentProperties below, we don't use any of the others, | |
545 // and they all pretty much have complicated interfaces with lots of | |
546 // split structures, etc. | |
547 no AddPrinterDriver not used, complicated interface with split structures | |
548 no AddPrinterDriverEx not used, complicated interface with split structures | |
549 no EnumPrinterDrivers not used, complicated interface with split structures | |
550 no GetPrinterDriver not used, complicated interface with split structures | |
551 no GetPrinterDriverDirectory not used, complicated interface with split structures | |
552 no DeletePrinterDriver not used, complicated interface with split structures | |
553 no DeletePrinterDriverEx not used, complicated interface with split structures | |
554 no AddPerMachineConnection not used, complicated interface with split structures | |
555 no DeletePerMachineConnection not used, complicated interface with split structures | |
556 no EnumPerMachineConnections not used, complicated interface with split structures | |
557 no AddPrintProcessor not used, complicated interface with split structures | |
558 no EnumPrintProcessors not used, complicated interface with split structures | |
559 no GetPrintProcessorDirectory not used, complicated interface with split structures | |
560 no EnumPrintProcessorDatatypes not used, complicated interface with split structures | |
561 no DeletePrintProcessor not used, complicated interface with split structures | |
562 no StartDocPrinter not used, complicated interface with split structures | |
563 no AddJob not used, complicated interface with split structures | |
564 skip DocumentProperties split-sized DEVMODE, error in Cygwin prototype | |
565 no AdvancedDocumentProperties not used, complicated interface with split structures | |
566 no GetPrinterData not used, complicated interface with split structures | |
567 no GetPrinterDataEx not used, complicated interface with split structures | |
568 no EnumPrinterData not used, complicated interface with split structures | |
569 no EnumPrinterDataEx not used, complicated interface with split structures | |
570 no EnumPrinterKey not used, complicated interface with split structures | |
571 no SetPrinterData not used, complicated interface with split structures | |
572 no SetPrinterDataEx not used, complicated interface with split structures | |
573 no DeletePrinterData not used, complicated interface with split structures | |
574 no DeletePrinterDataEx not used, complicated interface with split structures | |
575 no DeletePrinterKey not used, complicated interface with split structures | |
576 no PrinterMessageBox not used, complicated interface with split structures | |
577 no AddForm not used, complicated interface with split structures | |
578 no DeleteForm not used, complicated interface with split structures | |
579 no GetForm not used, complicated interface with split structures | |
580 no SetForm not used, complicated interface with split structures | |
581 no EnumForms not used, complicated interface with split structures | |
582 no EnumMonitors not used, complicated interface with split structures | |
583 no AddMonitor not used, complicated interface with split structures | |
584 no DeleteMonitor not used, complicated interface with split structures | |
585 no EnumPorts not used, complicated interface with split structures | |
586 no AddPort not used, complicated interface with split structures | |
587 no ConfigurePort not used, complicated interface with split structures | |
588 no DeletePort not used, complicated interface with split structures | |
589 no XcvData not used, complicated interface with split structures | |
590 no SetPort not used, complicated interface with split structures | |
591 no AddPrinterConnection not used, complicated interface with split structures | |
592 no DeletePrinterConnection not used, complicated interface with split structures | |
593 no AddPrintProvidor not used, complicated interface with split structures | |
594 no DeletePrintProvidor not used, complicated interface with split structures | |
595 no SetPrinterHTMLView not used, complicated interface with split structures | |
596 no GetPrinterHTMLView not used, complicated interface with split structures | |
4875
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
597 review GetDefaultPrinter |
771 | 598 end-bracket |
599 | |
600 file SHELLAPI.H | |
601 | |
602 yes DragQueryFile | |
603 yes ShellExecute | |
604 yes FindExecutable | |
605 no CommandLineToArgv Unicode-only | |
606 yes ShellAbout | |
4903
70089046adef
fix compile problems in intl-encap* under VS6
Ben Wing <ben@xemacs.org>
parents:
4875
diff
changeset
|
607 override HICON ExtractAssociatedIconW(HINSTANCE, LPWSTR, LPWORD); error arg2, Cygwin prototype, extra const |
771 | 608 yes ExtractIcon |
609 // split-simple DRAGINFO, used ??? (docs say "Not currently supported") | |
610 begin-bracket !defined (CYGWIN_HEADERS) | |
611 yes DoEnvironmentSubst NT 4.0+ only | |
612 end-bracket | |
613 no FindEnvironmentString causes link error; NT 4.0+ only | |
4903
70089046adef
fix compile problems in intl-encap* under VS6
Ben Wing <ben@xemacs.org>
parents:
4875
diff
changeset
|
614 yes ExtractIconEx NT 4.0+ only, former error in Cygwin prototype but no more (Cygwin 1.7, 1-30-10) |
771 | 615 // split-simple SHFILEOPSTRUCT, used in SHFileOperation |
616 // split-simple SHNAMEMAPPING, used in SHFileOperation | |
617 split SHFileOperation LPSHFILEOPSTRUCT NT 4.0+ only | |
618 // split-simple SHELLEXECUTEINFO, used in ShellExecuteEx | |
619 split ShellExecuteEx LPSHELLEXECUTEINFO NT 4.0+ only | |
620 no WinExecError causes link error; NT 4.0+ only | |
621 begin-bracket !defined (CYGWIN_HEADERS) | |
622 yes SHQueryRecycleBin NT 4.0+ only | |
623 yes SHEmptyRecycleBin NT 4.0+ only | |
624 end-bracket | |
625 // split-sized NOTIFYICONDATA, used in Shell_NotifyIcon | |
626 no Shell_NotifyIcon split-sized NOTIFYICONDATA, NT 4.0+ only | |
627 // split-sized SHFILEINFO, used in SHGetFileInfo | |
628 skip SHGetFileInfo split-sized SHFILEINFO, NT 4.0+ only | |
629 no SHGetDiskFreeSpace causes link error; NT 4.0+ only | |
630 begin-bracket !defined (CYGWIN_HEADERS) | |
631 yes SHGetNewLinkInfo NT 4.0+ only | |
632 yes SHInvokePrinterCommand NT 4.0+ only | |
633 end-bracket | |
634 | |
635 end-unicode-encapsulation-script | |
636 | |
637 file COMMCTRL.H | |
638 | |
639 yes ImageList_LoadImage | |
640 WC_HEADER | |
641 HDITEM | |
642 LPHDITEM | |
643 HDM_INSERTITEM | |
644 HDM_GETITEM | |
645 HDM_SETITEM | |
646 HDN_ITEMCHANGING | |
647 HDN_ITEMCHANGED | |
648 HDN_ITEMCLICK | |
649 HDN_ITEMDBLCLICK | |
650 HDN_DIVIDERDBLCLICK | |
651 HDN_BEGINTRACK | |
652 HDN_ENDTRACK | |
653 HDN_TRACK | |
654 HDN_GETDISPINFO | |
655 NMHEADER | |
656 LPNMHEADER | |
657 NMHDDISPINFO | |
658 LPNMHDDISPINFO | |
659 TOOLBARCLASSNAME | |
660 TBSAVEPARAMS | |
661 LPTBSAVEPARAMS | |
662 TB_GETBUTTONTEXT | |
663 TB_SAVERESTORE | |
664 TB_ADDSTRING | |
665 TBBUTTONINFO | |
666 LPTBBUTTONINFO | |
667 TB_GETBUTTONINFO | |
668 TB_SETBUTTONINFO | |
669 TB_INSERTBUTTON | |
670 TB_ADDBUTTONS | |
671 TBN_GETINFOTIP | |
672 NMTBGETINFOTIP | |
673 LPNMTBGETINFOTIP | |
674 TBN_GETDISPINFO | |
675 LPNMTBDISPINFO | |
676 TBN_GETBUTTONINFO | |
677 NMTOOLBAR | |
678 LPNMTOOLBAR | |
679 REBARCLASSNAME | |
680 REBARBANDINFO | |
681 LPREBARBANDINFO | |
682 LPCREBARBANDINFO | |
683 RB_INSERTBAND | |
684 RB_SETBANDINFO | |
685 RB_GETBANDINFO | |
686 TOOLTIPS_CLASS | |
687 TTTOOLINFO | |
688 PTOOLINFO | |
689 LPTTTOOLINFO | |
690 TTM_ADDTOOL | |
691 TTM_DELTOOL | |
692 TTM_NEWTOOLRECT | |
693 TTM_GETTOOLINFO | |
694 TTM_SETTOOLINFO | |
695 TTM_HITTEST | |
696 TTM_GETTEXT | |
697 TTM_UPDATETIPTEXT | |
698 TTM_ENUMTOOLS | |
699 TTM_GETCURRENTTOOL | |
700 TTHITTESTINFO | |
701 LPTTHITTESTINFO | |
702 TTN_GETDISPINFO | |
703 NMTTDISPINFO | |
704 LPNMTTDISPINFO | |
705 CreateStatusWindow | |
706 DrawStatusText | |
707 STATUSCLASSNAME | |
708 SB_GETTEXT | |
709 SB_SETTEXT | |
710 SB_GETTEXTLENGTH | |
711 SB_SETTIPTEXT | |
712 SB_GETTIPTEXT | |
713 TRACKBAR_CLASS | |
714 UPDOWN_CLASS | |
715 PROGRESS_CLASS | |
716 HOTKEY_CLASS | |
717 WC_LISTVIEW | |
718 LVITEM | |
719 LPLVITEM | |
720 LPSTR_TEXTCALLBACK | |
721 LVM_GETITEM | |
722 LVM_SETITEM | |
723 LVM_INSERTITEM | |
724 LVFINDINFO | |
725 LVM_FINDITEM | |
726 LVM_GETSTRINGWIDTH | |
727 LVM_EDITLABEL | |
728 LVCOLUMN | |
729 LPLVCOLUMN | |
730 LVM_GETCOLUMN | |
731 LVM_SETCOLUMN | |
732 LVM_GETITEMTEXT | |
733 LVM_SETITEMTEXT | |
734 LVM_GETISEARCHSTRING | |
735 LVBKIMAGE | |
736 LPLVBKIMAGE | |
737 LVM_SETBKIMAGE | |
738 LVM_GETBKIMAGE | |
739 LVN_ODFINDITEM | |
740 LVN_BEGINLABELEDIT | |
741 LVN_ENDLABELEDIT | |
742 LVN_GETDISPINFO | |
743 LVN_SETDISPINFO | |
744 NMLVDISPINFO | |
745 LVN_GETINFOTIP | |
746 NMLVGETINFOTIP | |
747 LPNMLVGETINFOTIP | |
748 WC_TREEVIEW | |
749 TVITEM | |
750 LPTVITEM | |
751 TVINSERTSTRUCT | |
752 LPTVINSERTSTRUCT | |
753 TVM_INSERTITEM | |
754 TVM_GETITEM | |
755 TVM_SETITEM | |
756 TVM_EDITLABEL | |
757 TVM_GETISEARCHSTRING | |
758 NMTREEVIEW | |
759 LPNMTREEVIEW | |
760 NMTVDISPINFO | |
761 LPNMTVDISPINFO | |
762 TVN_SELCHANGING | |
763 TVN_SELCHANGED | |
764 TVN_GETDISPINFO | |
765 TVN_SETDISPINFO | |
766 TVN_ITEMEXPANDING | |
767 TVN_ITEMEXPANDED | |
768 TVN_BEGINDRAG | |
769 TVN_BEGINRDRAG | |
770 TVN_DELETEITEM | |
771 TVN_BEGINLABELEDIT | |
772 TVN_ENDLABELEDIT | |
773 TVN_GETINFOTIP | |
774 NMTVGETINFOTIP | |
775 LPNMTVGETINFOTIP | |
776 WC_COMBOBOXEX | |
777 COMBOBOXEXITEM | |
778 PCOMBOBOXEXITEM | |
779 PCCOMBOBOXEXITEM | |
780 CBEM_INSERTITEM | |
781 CBEM_SETITEM | |
782 CBEM_GETITEM | |
783 NMCOMBOBOXEX | |
784 PNMCOMBOBOXEX | |
785 CBEN_GETDISPINFO | |
786 CBEN_DRAGBEGIN | |
787 CBEN_ENDEDIT | |
788 NMCBEDRAGBEGIN | |
789 LPNMCBEDRAGBEGIN | |
790 PNMCBEDRAGBEGIN | |
791 NMCBEENDEDIT | |
792 LPNMCBEENDEDIT | |
793 PNMCBEENDEDIT | |
794 WC_TABCONTROL | |
795 TCITEMHEADER | |
796 LPTCITEMHEADER | |
797 TCITEM | |
798 LPTCITEM | |
799 TCM_GETITEM | |
800 TCM_SETITEM | |
801 TCM_INSERTITEM | |
802 ANIMATE_CLASS | |
803 ACM_OPEN | |
804 MONTHCAL_CLASS | |
805 DATETIMEPICK_CLASS | |
806 DTM_SETFORMAT | |
807 DTN_USERSTRING | |
808 NMDATETIMESTRING | |
809 LPNMDATETIMESTRING | |
810 DTN_WMKEYDOWN | |
811 NMDATETIMEWMKEYDOWN | |
812 LPNMDATETIMEWMKEYDOWN | |
813 DTN_FORMAT | |
814 NMDATETIMEFORMAT | |
815 LPNMDATETIMEFORMAT | |
816 DTN_FORMATQUERY | |
817 NMDATETIMEFORMATQUERY | |
818 LPNMDATETIMEFORMATQUERY | |
819 WC_IPADDRESS | |
820 WC_PAGESCROLLER | |
821 WC_NATIVEFONTCTL | |
822 | |
823 begin-unicode-encapsulation-script | |
824 | |
825 file COMMDLG.H | |
826 | |
4873
50861fea97f6
regenerate intl-auto-encap-win32.c, now possible from Cygwin /usr/include/w32api headers
Ben Wing <ben@xemacs.org>
parents:
4837
diff
changeset
|
827 begin-bracket defined (HAVE_MS_WINDOWS) |
771 | 828 split GetOpenFileName LPOPENFILENAME |
829 split GetSaveFileName LPOPENFILENAME | |
830 yes GetFileTitle | |
831 no CommDlg_OpenSave_GetSpec macro | |
832 no CommDlg_OpenSave_GetFilePath macro | |
833 no CommDlg_OpenSave_GetFolderPath macro | |
834 split ChooseColor LPCHOOSECOLOR | |
835 split FindText LPFINDREPLACE | |
836 split ReplaceText LPFINDREPLACE | |
837 no AfxReplaceText mac only | |
838 no ChooseFont split-sized LPLOGFONT in LPCHOOSEFONT | |
839 // LBSELCHSTRING | |
840 // SHAREVISTRING | |
841 // FILEOKSTRING | |
842 // COLOROKSTRING | |
843 // SETRGBSTRING | |
844 // HELPMSGSTRING | |
845 // FINDMSGSTRING | |
846 skip PrintDlg LPPRINTDLG with split-sized DEVMODE handle | |
847 skip PageSetupDlg LPPAGESETUPDLG with split-sized DEVMODE handle | |
4875
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
848 review PrintDlgEx |
4873
50861fea97f6
regenerate intl-auto-encap-win32.c, now possible from Cygwin /usr/include/w32api headers
Ben Wing <ben@xemacs.org>
parents:
4837
diff
changeset
|
849 end-bracket |
771 | 850 |
851 file DDE.H | |
852 | |
853 // nothing | |
854 | |
855 file DDEML.H | |
856 | |
857 yes DdeInitialize | |
4903
70089046adef
fix compile problems in intl-encap* under VS6
Ben Wing <ben@xemacs.org>
parents:
4875
diff
changeset
|
858 yes DdeCreateStringHandle former error in Cygwin prototype, but no more (Cygwin 1.7, 1-30-10) |
771 | 859 yes DdeQueryString |
860 // #### split-sized (or split-simple??? not completely obvious) structure MONHSZSTRUCT, used when DDE event MF_HSZ_INFO is sent as part of the XTYP_MONITOR transaction sent to a DDE callback; not yet handled | |
861 | |
862 file IMM.H | |
863 | |
864 begin-bracket defined (HAVE_MS_WINDOWS) | |
865 yes ImmInstallIME | |
866 yes ImmGetDescription | |
867 yes ImmGetIMEFileName | |
868 yes ImmGetCompositionString | |
2500 | 869 skip ImmSetCompositionString different prototypes in VC6 and VC7 |
771 | 870 yes ImmGetCandidateListCount |
871 yes ImmGetCandidateList | |
872 yes ImmGetGuideLine | |
873 skip ImmGetCompositionFont split-sized LOGFONT | |
874 skip ImmSetCompositionFont split-sized LOGFONT | |
875 yes ImmConfigureIME // split-simple REGISTERWORD | |
876 yes ImmEscape // strings of various sorts | |
877 yes ImmGetConversionList | |
878 yes ImmIsUIMessage | |
879 yes ImmRegisterWord | |
880 yes ImmUnregisterWord | |
881 no ImmGetRegisterWordStyle split-sized STYLEBUF | |
882 split ImmEnumRegisterWord REGISTERWORDENUMPROC | |
883 no ImmGetImeMenuItems split-sized IMEMENUITEMINFO | |
884 end-bracket | |
885 | |
886 file MMSYSTEM.H | |
887 | |
888 yes sndPlaySound | |
889 yes PlaySound | |
890 no waveOutGetDevCaps split-sized LPWAVEOUTCAPS | |
891 yes waveOutGetErrorText | |
892 no waveInGetDevCaps split-sized LPWAVEINCAPS | |
893 yes waveInGetErrorText | |
894 no midiOutGetDevCaps split-sized LPMIDIOUTCAPS | |
895 yes midiOutGetErrorText | |
896 no midiInGetDevCaps split-sized LPMIDIOUTCAPS | |
897 yes midiInGetErrorText | |
898 no auxGetDevCaps split-sized LPAUXCAPS | |
899 no mixerGetDevCaps split-sized LPMIXERCAPS | |
900 no mixerGetLineInfo split-sized LPMIXERLINE | |
901 no mixerGetLineControls split-sized LPMIXERCONTROL | |
902 no mixerGetControlDetails split-sized LPMIXERCONTROL in LPMIXERLINECONTROLS in LPMIXERCONTROLDETAILS | |
903 no joyGetDevCaps split-sized LPJOYCAPS | |
904 yes mmioStringToFOURCC | |
905 yes mmioInstallIOProc | |
906 yes mmioOpen | |
907 yes mmioRename | |
908 yes mciSendCommand | |
909 yes mciSendString | |
910 yes mciGetDeviceID | |
911 begin-bracket !defined (MINGW) | |
778 | 912 no mciGetDeviceIDFromElementID missing from Win98se version of ADVAPI32.dll |
771 | 913 end-bracket |
914 yes mciGetErrorString | |
915 | |
916 file WINNETWK.H | |
917 | |
918 begin-bracket defined (HAVE_MS_WINDOWS) | |
919 yes WNetAddConnection | |
920 split WNetAddConnection2 LPNETRESOURCE | |
921 split WNetAddConnection3 LPNETRESOURCE | |
922 yes WNetCancelConnection | |
923 yes WNetCancelConnection2 | |
924 yes WNetGetConnection | |
925 split WNetUseConnection LPNETRESOURCE | |
926 split WNetConnectionDialog1 LPCONNECTDLGSTRUCT contains split-simple LPNETRESOURCE | |
927 split WNetDisconnectDialog1 LPDISCDLGSTRUCT | |
928 split WNetOpenEnum LPNETRESOURCE | |
929 yes WNetEnumResource | |
930 yes WNetGetUniversalName | |
931 yes WNetGetUser | |
932 yes WNetGetProviderName | |
933 yes WNetGetNetworkInformation | |
934 // split-simple function pointer PFNGETPROFILEPATH | |
935 // split-simple function pointer PFNRECONCILEPROFILE | |
936 // split-simple function pointer PFNPROCESSPOLICIES | |
937 yes WNetGetLastError | |
938 split MultinetGetConnectionPerformance LPNETRESOURCE | |
4875
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
939 review WNetSetConnection |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
940 review WNetGetResourceInformation |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
941 review WNetGetResourceParent |
771 | 942 end-bracket |
943 | |
4875
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
944 // file IME.H -- doesn't exist under Cygwin |
771 | 945 |
4875
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
946 no SendIMEMessageEx obsolete, no docs available |
771 | 947 |
948 file OBJBASE.H | |
949 | |
950 // nothing | |
951 | |
952 file SHLOBJ.H | |
953 | |
954 // #### split code for IContextMenu not yet written | |
955 // split flag constant GCS_VERB of IContextMenu::GetCommandString | |
956 // split flag constant GCS_HELPTEXT of IContextMenu::GetCommandString | |
957 // split flag constant GCS_VALIDATE of IContextMenu::GetCommandString | |
958 // split string constant CMDSTR_NEWFOLDER of CMINVOKECOMMANDINFO.lpVerb or CMINVOKECOMMANDINFOEX.lpVerbW of IContextMenu::InvokeCommand | |
959 // split string constant CMDSTR_VIEWLIST of same | |
960 // split string constant CMDSTR_VIEWDETAILS of same | |
961 // #### split code for IExtractIcon, IShellLink, IShellExecuteHook, INewShortcutHook, ICopyHook, IFileViewer not yet written | |
962 // split interface IExtractIcon | |
963 // split interface IShellLink | |
964 // split interface IShellExecuteHook | |
965 // split interface INewShortcutHook | |
966 // split interface ICopyHook | |
967 // split interface IFileViewer | |
968 yes SHGetPathFromIDList | |
969 skip SHGetSpecialFolderPath error in Cygwin prototype, missing from Cygwin libraries | |
970 // split-simple structure BROWSEINFO used in SHBrowseForFolder | |
971 skip SHBrowseForFolder need to intercept callback for SendMessage | |
972 // split message BFFM_SETSTATUSTEXT handled in qxeSendMessage | |
973 // split message BFFM_SETSELECTION handled in qxeSendMessage | |
974 // split message BFFM_VALIDATEFAILED handled in qxeSHBrowseForFolder intercept proc | |
975 // #### code to handle split clipboard formats not yet written. this will | |
976 // #### be tricky -- all functions that use such clipboard formats need to | |
977 // #### be split, and the data itself munged. this may be too much effort, | |
978 // #### and we may just need to require that the app itself does the | |
979 // #### splitting. | |
980 // split clipboard format CFSTR_FILEDESCRIPTOR | |
981 // split clipboard format CFSTR_FILENAME | |
982 // split clipboard format CFSTR_FILENAMEMAP | |
983 // split-sized structure FILEDESCRIPTOR | |
984 // split-sized structure FILEGROUPDESCRIPTOR | |
985 // split flag SHCNF_PATH; we intercept SHChangeNotify | |
986 // split flag SHCNF_PRINTER; we intercept SHChangeNotify | |
987 // split flag SHARD_PATH; we intercept SHAddToRecentDocs | |
988 skip SHGetDataFromIDList split-sized WIN32_FIND_DATA or split-simple NETRESOURCE, missing from Cygwin libraries | |
4875
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
989 review SHGetFolderPath |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
990 review SHGetIconOverlayIndex |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
991 review SHCreateDirectoryEx |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
992 review SHGetFolderPathAndSubDir |
771 | 993 |
994 file WINNLS.H | |
995 | |
798 | 996 no LOCALE_ENUMPROC not used, not examined yet |
997 no CODEPAGE_ENUMPROC not used, not examined yet | |
998 no DATEFMT_ENUMPROC not used, not examined yet | |
999 no DATEFMT_ENUMPROCEX not used, not examined yet | |
1000 no TIMEFMT_ENUMPROC not used, not examined yet | |
1001 no CALINFO_ENUMPROC not used, not examined yet | |
1002 no CALINFO_ENUMPROCEX not used, not examined yet | |
1003 no GetCPInfoEx not used, not examined yet | |
1004 no CompareString not used, not examined yet | |
1005 no LCMapString not used, not examined yet | |
1006 yes GetLocaleInfo | |
1007 yes SetLocaleInfo | |
1008 no GetTimeFormat not used, not examined yet | |
1009 no GetDateFormat not used, not examined yet | |
1010 no GetNumberFormat not used, not examined yet | |
1011 no GetCurrencyFormat not used, not examined yet | |
1012 no EnumCalendarInfo not used, not examined yet | |
1013 no EnumCalendarInfoEx not used, not examined yet | |
1014 no EnumTimeFormats not used, not examined yet | |
1015 no EnumDateFormats not used, not examined yet | |
1016 no EnumDateFormatsEx not used, not examined yet | |
1017 no GetStringTypeEx not used, not examined yet | |
800 | 1018 no GetStringType no such fun; A and W versions have different nos. of args |
798 | 1019 no FoldString not used, not examined yet |
1020 no EnumSystemLocales not used, not examined yet | |
1021 no EnumSystemCodePages not used, not examined yet | |
4875
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
1022 review GetCalendarInfo |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
1023 review GetGeoInfo |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
1024 review SetCalendarInfo |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
1025 review EnumSystemLanguageGroups |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
1026 review EnumLanguageGroupLocales |
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
1027 review EnumUILanguages |
798 | 1028 |
1029 end-unicode-encapsulation-script | |
771 | 1030 |
1031 file WINVER.H | |
1032 | |
1033 VerFindFile | |
1034 VerInstallFile | |
1035 GetFileVersionInfoSize | |
1036 GetFileVersionInfo | |
1037 VerLanguageName | |
1038 VerQueryValue | |
1039 | |
1040 begin-unicode-encapsulation-script | |
1041 | |
1042 file WINCON.H | |
1043 | |
1044 yes PeekConsoleInput | |
1045 yes ReadConsoleInput | |
1046 yes WriteConsoleInput | |
1047 yes ReadConsoleOutput | |
1048 yes WriteConsoleOutput | |
1049 yes ReadConsoleOutputCharacter | |
1050 yes WriteConsoleOutputCharacter | |
1051 no FillConsoleOutputCharacter split CHAR | |
1052 yes ScrollConsoleScreenBuffer | |
1053 yes GetConsoleTitle | |
1054 yes SetConsoleTitle | |
1055 yes ReadConsole | |
1056 yes WriteConsole | |
1057 | |
1058 file WINREG.H | |
1059 | |
4903
70089046adef
fix compile problems in intl-encap* under VS6
Ben Wing <ben@xemacs.org>
parents:
4875
diff
changeset
|
1060 yes RegConnectRegistry former error in Cygwin prototype, but no more (Cygwin 1.7, 1-30-10) |
771 | 1061 yes RegCreateKey |
1062 yes RegCreateKeyEx | |
1063 yes RegDeleteKey | |
1064 yes RegDeleteValue | |
1065 yes RegEnumKey | |
1066 yes RegEnumKeyEx | |
1067 yes RegEnumValue | |
1068 yes RegLoadKey | |
1069 yes RegOpenKey | |
1070 yes RegOpenKeyEx | |
1071 yes RegQueryInfoKey | |
1072 yes RegQueryValue | |
1073 split RegQueryMultipleValues PVALENT | |
1074 yes RegQueryValueEx | |
1075 yes RegReplaceKey | |
1076 yes RegRestoreKey | |
1077 yes RegSaveKey | |
1078 yes RegSetValue | |
1079 yes RegSetValueEx | |
1080 yes RegUnLoadKey | |
1081 yes InitiateSystemShutdown | |
4903
70089046adef
fix compile problems in intl-encap* under VS6
Ben Wing <ben@xemacs.org>
parents:
4875
diff
changeset
|
1082 override BOOL AbortSystemShutdownW(LPWSTR); error arg 1, Cygwin prototype, extra const |
4875
49de55c09f18
add "review" lines in intl-encap-win32.c for all unseen functions in processed headers
Ben Wing <ben@xemacs.org>
parents:
4873
diff
changeset
|
1083 review RegDeleteKeyEx |
771 | 1084 |
1085 file EXCPT.H | |
1086 | |
1087 // nothing | |
1088 | |
1089 file STDARG.H | |
1090 | |
1091 // nothing | |
1092 | |
1093 file CDERR.H | |
1094 | |
1095 // nothing | |
1096 | |
1097 file WINPERF.H | |
1098 | |
1099 // nothing | |
1100 | |
1101 file RPC.H | |
1102 | |
1103 // nothing | |
1104 | |
1105 file NB30.H | |
1106 | |
1107 // nothing | |
1108 | |
800 | 1109 end-unicode-encapsulation-script |
1110 | |
771 | 1111 file WINSOCK2.H |
1112 | |
1113 SO_PROTOCOL_INFO | |
1114 SERVICE_TYPE_VALUE_SAPID | |
1115 SERVICE_TYPE_VALUE_TCPPORT | |
1116 SERVICE_TYPE_VALUE_UDPPORT | |
1117 SERVICE_TYPE_VALUE_OBJECTID | |
1118 WSADuplicateSocket | |
1119 LPFN_WSADUPLICATESOCKET | |
1120 WSAEnumProtocols | |
1121 LPFN_WSAENUMPROTOCOLS | |
1122 WSASocket | |
1123 LPFN_WSASOCKET | |
1124 WSAAddressToString | |
1125 LPFN_WSAADDRESSTOSTRING | |
1126 WSAStringToAddress | |
1127 LPFN_WSASTRINGTOADDRESS | |
1128 WSALookupServiceBegin | |
1129 LPFN_WSALOOKUPSERVICEBEGIN | |
1130 WSALookupServiceNext | |
1131 LPFN_WSALOOKUPSERVICENEXT | |
1132 WSAInstallServiceClass | |
1133 LPFN_WSAINSTALLSERVICECLASS | |
1134 WSAGetServiceClassInfo | |
1135 LPFN_WSAGETSERVICECLASSINFO | |
1136 WSAEnumNameSpaceProviders | |
1137 LPFN_WSAENUMNAMESPACEPROVIDERS | |
1138 WSAGetServiceClassNameByClassId | |
1139 LPFN_WSAGETSERVICECLASSNAMEBYCLASSID | |
1140 WSASetService | |
1141 LPFN_WSASETSERVICE | |
1142 | |
1143 file WINCRYPT.H | |
1144 | |
1145 MS_DEF_PROV_ | |
1146 MS_ENHANCED_PROV_ | |
1147 MS_DEF_RSA_SIG_PROV_ | |
1148 MS_DEF_RSA_SCHANNEL_PROV_ | |
1149 MS_ENHANCED_RSA_SCHANNEL_PROV_ | |
1150 MS_DEF_DSS_PROV_ | |
1151 MS_DEF_DSS_DH_PROV_ | |
1152 CryptAcquireContext | |
1153 CryptSignHash | |
1154 CryptVerifySignature | |
1155 CryptSetProvider | |
1156 CryptSetProviderEx | |
1157 CryptGetDefaultProvider | |
1158 CryptEnumProviderTypes | |
1159 CryptEnumProviders | |
1160 CERT_STORE_PROV_FILENAME_ | |
1161 CERT_STORE_PROV_SYSTEM_ | |
1162 sz_CERT_STORE_PROV_FILENAME_ | |
1163 sz_CERT_STORE_PROV_SYSTEM_ | |
1164 CERT_STORE_SAVE_TO_FILENAME_ | |
1165 CERT_FIND_SUBJECT_STR_ | |
1166 CERT_FIND_ISSUER_STR_ | |
1167 CertRDNValueToStr | |
1168 CertNameToStr | |
1169 CertStrToName | |
1170 CertOpenSystemStore | |
1171 CertAddEncodedCertificateToSystemStore | |
1172 | |
1173 */ | |
1174 | |
1175 /* the functions below are examples of hand-written Unicode-splitting | |
1176 code. note that it needs to be written very carefully and with | |
1177 intimate knowledge of the structures involved, and can sometimes be | |
1178 very hairy (EnumFontFamiliesEx is the most extreme example). it can | |
1179 be argued with some justification that this behind-the-scenes magic | |
1180 is confusing and potentially dangerous, and shouldn't be done. but | |
1181 making the calling code deal with the results in extremely hard-to- | |
1182 read code and is very error-prone. */ | |
1183 | |
1184 | |
1185 /************************************************************************/ | |
1186 /* would be encapsulatable but for parsing problems */ | |
1187 /************************************************************************/ | |
1188 | |
1189 /* NOTE: return value is conditionalized on _MAC, messes up parser */ | |
1190 LRESULT | |
1191 qxeDefWindowProc (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) | |
1192 { | |
1193 if (XEUNICODE_P) | |
1194 return DefWindowProcW (hWnd, Msg, wParam, lParam); | |
1195 else | |
1196 return DefWindowProcA (hWnd, Msg, wParam, lParam); | |
1197 } | |
1198 | |
1199 | |
1200 /* NOTE: two versions, STRICT and non-STRICT */ | |
1201 LRESULT | |
1202 qxeCallWindowProc (WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) | |
1203 { | |
1204 if (XEUNICODE_P) | |
1205 return CallWindowProcW (lpPrevWndFunc, hWnd, Msg, wParam, lParam); | |
1206 else | |
1207 return CallWindowProcA (lpPrevWndFunc, hWnd, Msg, wParam, lParam); | |
1208 } | |
1209 | |
1210 /* NOTE: return value is conditionalized on _MAC, messes up parser */ | |
1211 LRESULT | |
1212 qxeDefDlgProc (HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam) | |
1213 { | |
1214 if (XEUNICODE_P) | |
1215 return DefDlgProcW (hDlg, Msg, wParam, lParam); | |
1216 else | |
1217 return DefDlgProcA (hDlg, Msg, wParam, lParam); | |
1218 } | |
1219 | |
1220 /* NOTE: return value is conditionalized on _MAC, messes up parser */ | |
1221 LRESULT | |
1222 qxeDefMDIChildProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) | |
1223 { | |
1224 if (XEUNICODE_P) | |
1225 return DefMDIChildProcW (hWnd, uMsg, wParam, lParam); | |
1226 else | |
1227 return DefMDIChildProcA (hWnd, uMsg, wParam, lParam); | |
1228 } | |
1229 | |
800 | 1230 /* This one has two entry points called GetEnvironmentStringsW and |
1231 GetEnvironmentStrings. (misnamed A version) */ | |
1232 Extbyte * | |
1233 qxeGetEnvironmentStrings (void) | |
1234 { | |
1235 if (XEUNICODE_P) | |
1236 return (Extbyte *) GetEnvironmentStringsW (); | |
1237 else | |
1238 return (Extbyte *) GetEnvironmentStrings (); | |
1239 } | |
1240 | |
771 | 1241 |
1242 /************************************************************************/ | |
1243 /* would be encapsulatable but for Cygwin problems */ | |
1244 /************************************************************************/ | |
1245 | |
4873
50861fea97f6
regenerate intl-auto-encap-win32.c, now possible from Cygwin /usr/include/w32api headers
Ben Wing <ben@xemacs.org>
parents:
4837
diff
changeset
|
1246 #ifdef HAVE_MS_WINDOWS |
50861fea97f6
regenerate intl-auto-encap-win32.c, now possible from Cygwin /usr/include/w32api headers
Ben Wing <ben@xemacs.org>
parents:
4837
diff
changeset
|
1247 |
771 | 1248 /* NOTE: NT 4.0+ only */ |
1249 BOOL | |
1250 qxeUpdateICMRegKey (DWORD arg1, Extbyte * arg2, Extbyte * arg3, UINT arg4) | |
1251 { | |
4837
493e2aa349fd
imported patch cygwin-headers-cosmetic-1-11-10
Ben Wing <ben@xemacs.org>
parents:
4824
diff
changeset
|
1252 #ifdef CYGWIN_HEADERS |
771 | 1253 /* Cygwin mistakenly declares the second argument as DWORD. */ |
1254 if (XEUNICODE_P) | |
1255 return UpdateICMRegKeyW (arg1, (DWORD) arg2, (LPWSTR) arg3, arg4); | |
1256 else | |
1257 return UpdateICMRegKeyA (arg1, (DWORD) arg2, (LPSTR) arg3, arg4); | |
1258 #else | |
1259 if (XEUNICODE_P) | |
1260 return UpdateICMRegKeyW (arg1, (LPWSTR) arg2, (LPWSTR) arg3, arg4); | |
1261 else | |
1262 return UpdateICMRegKeyA (arg1, (LPSTR) arg2, (LPSTR) arg3, arg4); | |
1263 #endif /* CYGWIN_HEADERS */ | |
1264 } | |
1265 | |
4873
50861fea97f6
regenerate intl-auto-encap-win32.c, now possible from Cygwin /usr/include/w32api headers
Ben Wing <ben@xemacs.org>
parents:
4837
diff
changeset
|
1266 #endif /* HAVE_MS_WINDOWS */ |
50861fea97f6
regenerate intl-auto-encap-win32.c, now possible from Cygwin /usr/include/w32api headers
Ben Wing <ben@xemacs.org>
parents:
4837
diff
changeset
|
1267 |
771 | 1268 #ifndef CYGWIN /* present in headers but missing in shell32.a */ |
1269 | |
1270 BOOL | |
1271 qxeSHGetSpecialFolderPath (HWND hwndOwner, Extbyte * lpszPath, int nFolder, BOOL fCreate) | |
1272 { | |
1273 #ifdef CYGWIN_HEADERS | |
1274 /* Cygwin mistakenly declares the second argument as LPSTR in both | |
1275 versions. */ | |
1276 if (XEUNICODE_P) | |
1277 return SHGetSpecialFolderPathW (hwndOwner, (LPSTR) lpszPath, nFolder, fCreate); | |
1278 else | |
1279 return SHGetSpecialFolderPathA (hwndOwner, (LPSTR) lpszPath, nFolder, fCreate); | |
1280 #else | |
1281 if (XEUNICODE_P) | |
1282 return SHGetSpecialFolderPathW (hwndOwner, (LPWSTR) lpszPath, nFolder, fCreate); | |
1283 else | |
1284 return SHGetSpecialFolderPathA (hwndOwner, (LPSTR) lpszPath, nFolder, fCreate); | |
1285 #endif | |
1286 } | |
1287 | |
1288 #endif /* not CYGWIN */ | |
1289 | |
2500 | 1290 /********************************************************************************/ |
1291 /* would be encapsulatable but for header changes in different versions of VC++ */ | |
1292 /********************************************************************************/ | |
1293 | |
1294 #if MSC_VERSION >= 1300 | |
1295 | |
1296 BOOL | |
1297 qxeEnumResourceTypes (HMODULE hModule, ENUMRESTYPEPROCW lpEnumFunc, LONG lParam) | |
1298 { | |
1299 if (XEUNICODE_P) | |
1300 return EnumResourceTypesW (hModule, lpEnumFunc, lParam); | |
1301 else | |
1302 return EnumResourceTypesA (hModule, (ENUMRESTYPEPROCA) lpEnumFunc, lParam); | |
1303 } | |
1304 | |
1305 BOOL | |
1306 qxeEnumResourceNames (HMODULE hModule, const Extbyte * lpType, ENUMRESNAMEPROCW lpEnumFunc, LONG lParam) | |
1307 { | |
1308 if (XEUNICODE_P) | |
1309 return EnumResourceNamesW (hModule, (LPCWSTR) lpType, lpEnumFunc, lParam); | |
1310 else | |
1311 return EnumResourceNamesA (hModule, (LPCSTR) lpType, (ENUMRESNAMEPROCA) lpEnumFunc, lParam); | |
1312 } | |
1313 | |
1314 BOOL | |
1315 qxeEnumResourceLanguages (HMODULE hModule, const Extbyte * lpType, const Extbyte * lpName, ENUMRESLANGPROCW lpEnumFunc, LONG lParam) | |
1316 { | |
1317 if (XEUNICODE_P) | |
1318 return EnumResourceLanguagesW (hModule, (LPCWSTR) lpType, (LPCWSTR) lpName, lpEnumFunc, lParam); | |
1319 else | |
1320 return EnumResourceLanguagesA (hModule, (LPCSTR) lpType, (LPCSTR) lpName, (ENUMRESLANGPROCA) lpEnumFunc, lParam); | |
1321 } | |
1322 | |
1323 #else | |
1324 | |
1325 BOOL | |
1326 qxeEnumResourceTypes (HMODULE hModule, ENUMRESTYPEPROC lpEnumFunc, LONG lParam) | |
1327 { | |
1328 if (XEUNICODE_P) | |
1329 return EnumResourceTypesW (hModule, lpEnumFunc, lParam); | |
1330 else | |
1331 return EnumResourceTypesA (hModule, lpEnumFunc, lParam); | |
1332 } | |
1333 | |
1334 BOOL | |
1335 qxeEnumResourceNames (HMODULE hModule, const Extbyte * lpType, ENUMRESNAMEPROC lpEnumFunc, LONG lParam) | |
1336 { | |
1337 if (XEUNICODE_P) | |
1338 return EnumResourceNamesW (hModule, (LPCWSTR) lpType, lpEnumFunc, lParam); | |
1339 else | |
1340 return EnumResourceNamesA (hModule, (LPCSTR) lpType, lpEnumFunc, lParam); | |
1341 } | |
1342 | |
1343 BOOL | |
1344 qxeEnumResourceLanguages (HMODULE hModule, const Extbyte * lpType, const Extbyte * lpName, ENUMRESLANGPROC lpEnumFunc, LONG lParam) | |
1345 { | |
1346 if (XEUNICODE_P) | |
1347 return EnumResourceLanguagesW (hModule, (LPCWSTR) lpType, (LPCWSTR) lpName, lpEnumFunc, lParam); | |
1348 else | |
1349 return EnumResourceLanguagesA (hModule, (LPCSTR) lpType, (LPCSTR) lpName, lpEnumFunc, lParam); | |
1350 } | |
1351 | |
1352 #endif /* MSC_VERSION >= 1300 */ | |
771 | 1353 |
1354 /************************************************************************/ | |
1355 /* files */ | |
1356 /************************************************************************/ | |
1357 | |
1358 static void | |
1359 copy_win32_find_dataa_to_win32_find_dataw (const WIN32_FIND_DATAA *pa, | |
1360 WIN32_FIND_DATAW *pw) | |
1361 { | |
1362 /* the layout of WIN32_FIND_DATA is | |
1363 | |
1364 non-split fields; | |
1365 TCHAR cFileName[...]; | |
1366 TCHAR cAlternateFileName[...]; | |
1367 */ | |
1368 | |
1369 xzero (*pw); | |
1370 memcpy (pw, pa, offsetof (WIN32_FIND_DATAA, cFileName)); | |
1371 memcpy (pw->cFileName, pa->cFileName, sizeof (pa->cFileName)); | |
1372 memcpy (pw->cAlternateFileName, pa->cAlternateFileName, | |
1373 sizeof (pa->cAlternateFileName)); | |
1374 } | |
1375 | |
1376 HANDLE | |
1377 qxeFindFirstFile (const Extbyte *lpFileName, | |
1378 WIN32_FIND_DATAW *lpFindFileData) | |
1379 { | |
1380 if (XEUNICODE_P) | |
1381 return FindFirstFileW ((LPCWSTR) lpFileName, lpFindFileData); | |
1382 else | |
1383 { | |
1384 WIN32_FIND_DATAA ansidat; | |
1385 HANDLE retval; | |
1386 | |
1387 retval = FindFirstFileA ((LPCSTR) lpFileName, &ansidat); | |
1388 if (retval != INVALID_HANDLE_VALUE) | |
1389 copy_win32_find_dataa_to_win32_find_dataw (&ansidat, lpFindFileData); | |
1390 return retval; | |
1391 } | |
1392 } | |
1393 | |
1394 BOOL | |
1395 qxeFindNextFile (HANDLE hFindFile, WIN32_FIND_DATAW *lpFindFileData) | |
1396 { | |
1397 if (XEUNICODE_P) | |
1398 return FindNextFileW (hFindFile, lpFindFileData); | |
1399 else | |
1400 { | |
1401 WIN32_FIND_DATAA ansidat; | |
1402 BOOL retval; | |
1403 | |
1404 retval = FindNextFileA (hFindFile, &ansidat); | |
1405 if (retval) | |
1406 copy_win32_find_dataa_to_win32_find_dataw (&ansidat, lpFindFileData); | |
1407 return retval; | |
1408 } | |
1409 } | |
1410 | |
1411 | |
1412 /************************************************************************/ | |
1413 /* shell */ | |
1414 /************************************************************************/ | |
1415 | |
1416 static void | |
1417 copy_shfileinfoa_to_shfileinfow (const SHFILEINFOA *pa, | |
778 | 1418 SHFILEINFOW *pw, UINT sz) |
771 | 1419 { |
1420 /* the layout of SHFILEINFO is | |
1421 | |
1422 non-split fields; | |
1423 TCHAR szDisplayName[...]; | |
1424 TCHAR szTypeName[...]; | |
1425 */ | |
1426 | |
778 | 1427 assert (sz >= sizeof (SHFILEINFOW)); |
771 | 1428 xzero (*pw); |
1429 memcpy (pw, pa, offsetof (SHFILEINFOA, szDisplayName)); | |
1430 memcpy (pw->szDisplayName, pa->szDisplayName, sizeof (pa->szDisplayName)); | |
1431 memcpy (pw->szTypeName, pa->szTypeName, sizeof (pa->szTypeName)); | |
1432 } | |
1433 | |
1434 DWORD | |
1435 qxeSHGetFileInfo (const Extbyte *pszPath, DWORD dwFileAttributes, | |
1436 SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags) | |
1437 { | |
1438 if (XEUNICODE_P) | |
1439 return SHGetFileInfoW ((LPCWSTR) pszPath, dwFileAttributes, | |
1440 psfi, cbFileInfo, uFlags); | |
1441 else | |
1442 { | |
1443 SHFILEINFOA ansidat; | |
1444 BOOL retval; | |
1445 | |
1446 retval = SHGetFileInfoA ((LPCSTR) pszPath, dwFileAttributes, | |
778 | 1447 (SHFILEINFOA FAR *) &ansidat, |
1448 cbFileInfo ? sizeof (ansidat) : 0, uFlags); | |
1449 if (retval && cbFileInfo) | |
1450 copy_shfileinfoa_to_shfileinfow (&ansidat, psfi, cbFileInfo); | |
771 | 1451 return retval; |
1452 } | |
1453 } | |
1454 | |
1455 struct intercepted_SHBrowseForFolder | |
1456 { | |
1457 BFFCALLBACK lpfn; | |
1458 LPARAM lParam; | |
1459 HWND hwnd; | |
1460 struct intercepted_SHBrowseForFolder *next; | |
1461 }; | |
1462 | |
1463 static struct intercepted_SHBrowseForFolder *SHBrowseForFolder_list; | |
1464 | |
1465 static int | |
1466 CALLBACK intercepted_SHBrowseForFolder_proc (HWND hwnd, UINT msg, | |
1467 LPARAM lParam, LPARAM lpData) | |
1468 { | |
1469 struct intercepted_SHBrowseForFolder *s = | |
1470 (struct intercepted_SHBrowseForFolder *) lpData; | |
1471 | |
1472 if (s->hwnd == 0) | |
1473 s->hwnd = hwnd; | |
1474 if (s->lpfn) | |
1475 { | |
1476 /* see below */ | |
1477 if (XEUNICODE_P && msg == BFFM_VALIDATEFAILEDW) | |
1478 msg = BFFM_VALIDATEFAILEDA; | |
1479 else if (!XEUNICODE_P && msg == BFFM_VALIDATEFAILEDA) | |
1480 msg = BFFM_VALIDATEFAILEDW; | |
1481 return (s->lpfn) (hwnd, msg, lParam, s->lParam); | |
1482 } | |
1483 else | |
1484 return 0; | |
1485 } | |
1486 | |
1204 | 1487 #ifdef HAVE_MS_WINDOWS |
1488 | |
771 | 1489 static int |
1490 is_SHBrowseForFolder (HWND hwnd) | |
1491 { | |
1492 struct intercepted_SHBrowseForFolder *s; | |
1493 | |
1494 for (s = SHBrowseForFolder_list; s; s = s->next) | |
1495 if (s->hwnd == hwnd) | |
1496 return 1; | |
1497 return 0; | |
1498 } | |
1499 | |
1204 | 1500 #endif /* HAVE_MS_WINDOWS */ |
1501 | |
771 | 1502 LPITEMIDLIST |
1503 qxeSHBrowseForFolder (LPBROWSEINFOW lpbi) | |
1504 { | |
1505 struct intercepted_SHBrowseForFolder s; | |
1506 LPITEMIDLIST retval; | |
1507 | |
1508 /* There are two outgoing Unicode-split messages: | |
1509 | |
1510 BFFM_SETSELECTION | |
1511 BFFM_SETSTATUSTEXT | |
1512 | |
1513 and one incoming: | |
1514 | |
1515 BFFM_VALIDATEFAILED | |
1516 | |
1517 To handle this, we need to intercept the callback. We handle the | |
1518 incoming message in the callback, and record the window; when | |
1519 qxeSendMessage() is called, we handle the outgoing messages. None of | |
1520 the messages have split-sized structures so we don't need to do | |
1521 anything complicated there. */ | |
1522 | |
1523 s.lParam = lpbi->lParam; | |
1524 s.lpfn = lpbi->lpfn; | |
1525 s.next = SHBrowseForFolder_list; | |
1526 s.hwnd = 0; | |
1527 SHBrowseForFolder_list = &s; | |
1528 | |
1529 lpbi->lpfn = intercepted_SHBrowseForFolder_proc; | |
1530 lpbi->lParam = (LPARAM) &s; | |
1531 | |
1532 if (XEUNICODE_P) | |
1533 retval = SHBrowseForFolderW (lpbi); | |
1534 else | |
1535 retval = SHBrowseForFolderA ((LPBROWSEINFOA) lpbi); | |
1536 SHBrowseForFolder_list = SHBrowseForFolder_list->next; | |
1537 return retval; | |
1538 } | |
1539 | |
1540 VOID | |
1541 qxeSHAddToRecentDocs (UINT uFlags, LPCVOID pv) | |
1542 { | |
1543 /* pv can be a string pointer; this is handled by Unicode-splitting the | |
1544 flag SHARD_PATH rather than the function itself. Fix up the flag to | |
1545 be correct. We write it symmetrically so it doesn't matter whether | |
1546 UNICODE is defined. */ | |
1547 if (XEUNICODE_P) | |
1548 { | |
1549 if (uFlags & SHARD_PATHA) | |
1550 { | |
1551 uFlags |= SHARD_PATHW; | |
1552 uFlags &= ~SHARD_PATHA; | |
1553 } | |
1554 } | |
1555 else | |
1556 { | |
1557 if (uFlags & SHARD_PATHW) | |
1558 { | |
1559 uFlags |= SHARD_PATHA; | |
1560 uFlags &= ~SHARD_PATHW; | |
1561 } | |
1562 } | |
1563 SHAddToRecentDocs (uFlags, pv); | |
1564 } | |
1565 | |
1566 VOID | |
1567 qxeSHChangeNotify (LONG wEventId, UINT uFlags, LPCVOID dwItem1, | |
1568 LPCVOID dwItem2) | |
1569 { | |
1570 /* works like SHAddToRecentDocs */ | |
1571 if (XEUNICODE_P) | |
1572 { | |
1573 if (uFlags & SHCNF_PATHA) | |
1574 { | |
1575 uFlags |= SHCNF_PATHW; | |
1576 uFlags &= ~SHCNF_PATHA; | |
1577 } | |
1578 if (uFlags & SHCNF_PRINTERA) | |
1579 { | |
1580 uFlags |= SHCNF_PRINTERW; | |
1581 uFlags &= ~SHCNF_PRINTERA; | |
1582 } | |
1583 } | |
1584 else | |
1585 { | |
1586 if (uFlags & SHCNF_PATHW) | |
1587 { | |
1588 uFlags |= SHCNF_PATHA; | |
1589 uFlags &= ~SHCNF_PATHW; | |
1590 } | |
1591 if (uFlags & SHCNF_PRINTERW) | |
1592 { | |
1593 uFlags |= SHCNF_PRINTERA; | |
1594 uFlags &= ~SHCNF_PRINTERW; | |
1595 } | |
1596 } | |
1597 SHChangeNotify (wEventId, uFlags, dwItem1, dwItem2); | |
1598 } | |
1599 | |
1600 #ifndef CYGWIN /* present in headers but missing in shell32.a */ | |
1601 | |
1602 HRESULT | |
1603 qxeSHGetDataFromIDList (IShellFolder *psf, LPCITEMIDLIST pidl, int nFormat, | |
1604 PVOID pv, int cb) | |
1605 { | |
1606 if (XEUNICODE_P) | |
1607 return SHGetDataFromIDListW (psf, pidl, nFormat, pv, cb); | |
1608 else if (nFormat == SHGDFIL_FINDDATA) | |
1609 { | |
1610 WIN32_FIND_DATAA ansidat; | |
1611 BOOL retval; | |
1612 | |
1613 retval = SHGetDataFromIDListA (psf, pidl, nFormat, &ansidat, cb); | |
1614 if (retval == NOERROR) | |
1204 | 1615 copy_win32_find_dataa_to_win32_find_dataw (&ansidat, |
1616 (WIN32_FIND_DATAW *) pv); | |
771 | 1617 return retval; |
1618 } | |
1619 else | |
1620 /* nFormat == SHGDFIL_NETRESOURCE, and pv is split-simple NETRESOURCE | |
1621 structure, but we don't need to worry about that currently since we | |
1622 don't translate strings */ | |
1623 return SHGetDataFromIDListA (psf, pidl, nFormat, pv, cb); | |
1624 } | |
1625 | |
1626 #endif /* not CYGWIN */ | |
1627 | |
1628 | |
1629 | |
1630 #ifdef HAVE_MS_WINDOWS | |
1631 | |
1632 /************************************************************************/ | |
1633 /* devmode */ | |
1634 /************************************************************************/ | |
1635 | |
1636 /* These functions return globally allocated blocks because some | |
1637 callers (e.g. qxePrintDlg) want this. */ | |
1638 | |
1639 static HGLOBAL | |
1640 copy_devmodew_to_devmodea (const DEVMODEW *src, DEVMODEA *dst) | |
1641 { | |
1642 /* the layout of DEVMODE is | |
1643 | |
1644 TCHAR dmDeviceName[...]; | |
1645 non-split fields, including dmSize (size of structure; differs between | |
1646 Unicode and ANSI) and dmDriverExtra; | |
1647 TCHAR dmFormName[...]; | |
1648 non-split fields; | |
1649 extra data, of size DEVMODE->dmDriverExtra | |
1650 */ | |
1651 HGLOBAL hdst = NULL; | |
1652 | |
1653 if (!dst) | |
1654 { | |
1655 hdst = GlobalAlloc (GHND, src->dmSize + src->dmDriverExtra - | |
1656 (sizeof (DEVMODEW) - sizeof (DEVMODEA))); | |
1657 dst = (DEVMODEA *) GlobalLock (hdst); | |
1658 } | |
1659 | |
1660 memcpy (dst->dmDeviceName, src->dmDeviceName, sizeof (dst->dmDeviceName)); | |
1661 memcpy ((char *) dst + sizeof (dst->dmDeviceName), | |
1662 (char *) src + sizeof (src->dmDeviceName), | |
1663 offsetof (DEVMODEA, dmFormName) - sizeof (dst->dmDeviceName)); | |
1664 dst->dmSize -= sizeof (DEVMODEW) - sizeof (DEVMODEA); | |
1665 memcpy (dst->dmFormName, src->dmFormName, sizeof (dst->dmFormName)); | |
1666 memcpy ((char *) dst + offsetof (DEVMODEA, dmFormName) + | |
1667 sizeof (dst->dmFormName), | |
1668 (char *) src + offsetof (DEVMODEW, dmFormName) + | |
1669 sizeof (src->dmFormName), | |
1670 dst->dmSize + dst->dmDriverExtra - | |
1671 (offsetof (DEVMODEA, dmFormName) + sizeof (dst->dmFormName))); | |
1672 | |
1673 if (hdst) | |
1674 GlobalUnlock (hdst); | |
1675 return hdst; | |
1676 } | |
1677 | |
1678 static HGLOBAL | |
1679 copy_devmodea_to_devmodew (const DEVMODEA *src, DEVMODEW *dst) | |
1680 { | |
1681 HGLOBAL hdst = NULL; | |
1682 | |
1683 if (!dst) | |
1684 { | |
1685 hdst = GlobalAlloc (GHND, src->dmSize + src->dmDriverExtra + | |
1686 (sizeof (DEVMODEW) - sizeof (DEVMODEA))); | |
1687 dst = (DEVMODEW *) GlobalLock (hdst); | |
1688 } | |
1689 | |
1690 memcpy (dst->dmDeviceName, src->dmDeviceName, sizeof (src->dmDeviceName)); | |
1691 memcpy ((char *) dst + sizeof (dst->dmDeviceName), | |
1692 (char *) src + sizeof (src->dmDeviceName), | |
1693 offsetof (DEVMODEA, dmFormName) - sizeof (src->dmDeviceName)); | |
1694 dst->dmSize += sizeof (DEVMODEW) - sizeof (DEVMODEA); | |
1695 memcpy (dst->dmFormName, src->dmFormName, sizeof (src->dmFormName)); | |
1696 memcpy ((char *) dst + offsetof (DEVMODEW, dmFormName) + | |
1697 sizeof (dst->dmFormName), | |
1698 (char *) src + offsetof (DEVMODEA, dmFormName) + | |
1699 sizeof (src->dmFormName), | |
1700 src->dmSize + src->dmDriverExtra - | |
1701 (offsetof (DEVMODEA, dmFormName) + sizeof (src->dmFormName))); | |
1702 | |
1703 if (hdst) | |
1704 GlobalUnlock (hdst); | |
1705 return hdst; | |
1706 } | |
1707 | |
1708 HDC | |
1709 qxeCreateDC (const Extbyte *lpszDriver, const Extbyte *lpszDevice, | |
1710 const Extbyte *lpszOutput, CONST DEVMODEW *lpInitData) | |
1711 { | |
1712 if (XEUNICODE_P) | |
1713 return CreateDCW ((LPCWSTR) lpszDriver, (LPCWSTR) lpszDevice, | |
1714 (LPCWSTR) lpszOutput, lpInitData); | |
1715 else | |
1716 { | |
1717 HGLOBAL hInitData = NULL; | |
1718 DEVMODEA *lpInitDataa = NULL; | |
1719 HDC retval; | |
1720 | |
1721 if (lpInitData) | |
1722 { | |
1723 hInitData = copy_devmodew_to_devmodea (lpInitData, NULL); | |
1724 lpInitDataa = (DEVMODEA *) GlobalLock (hInitData); | |
1725 } | |
1726 retval = CreateDCA ((LPCSTR) lpszDriver, (LPCSTR) lpszDevice, | |
1727 (LPCSTR) lpszOutput, lpInitDataa); | |
1728 | |
1729 if (hInitData) | |
1730 { | |
1731 GlobalUnlock (hInitData); | |
1732 GlobalFree (hInitData); | |
1733 } | |
1734 | |
1735 return retval; | |
1736 } | |
1737 } | |
1738 | |
1739 HDC | |
1740 qxeResetDC (HDC hdc, CONST DEVMODEW *lpInitData) | |
1741 { | |
1742 if (XEUNICODE_P) | |
1743 return ResetDCW (hdc, lpInitData); | |
1744 else | |
1745 { | |
1746 HGLOBAL hInitData = NULL; | |
1747 DEVMODEA *lpInitDataa = NULL; | |
1748 HDC retval; | |
1749 | |
1750 if (lpInitData) | |
1751 { | |
1752 hInitData = copy_devmodew_to_devmodea (lpInitData, NULL); | |
1753 lpInitDataa = (DEVMODEA *) GlobalLock (hInitData); | |
1754 } | |
1755 retval = ResetDCA (hdc, lpInitDataa); | |
1756 | |
1757 if (hInitData) | |
1758 { | |
1759 GlobalUnlock (hInitData); | |
1760 GlobalFree (hInitData); | |
1761 } | |
1762 | |
1763 return retval; | |
1764 } | |
1765 } | |
1766 | |
1767 DWORD | |
1768 qxeOpenPrinter (Extbyte *pPrinterName, LPHANDLE phPrinter, | |
1769 LPPRINTER_DEFAULTSW pDefaultconst) | |
1770 { | |
1771 assert (!pDefaultconst); /* we don't split it, so let's make sure we | |
1772 don't try. */ | |
1773 if (XEUNICODE_P) | |
1774 return OpenPrinterW ((LPWSTR) pPrinterName, phPrinter, | |
1775 pDefaultconst); | |
1776 else | |
1777 return OpenPrinterA ((LPSTR) pPrinterName, phPrinter, | |
1778 (LPPRINTER_DEFAULTSA) pDefaultconst); | |
1779 } | |
1780 | |
1781 LONG | |
1782 qxeDocumentProperties (HWND hWnd, HANDLE hPrinter, Extbyte *pDeviceName, | |
1783 DEVMODEW *pDevModeOutput, DEVMODEW *pDevModeInput, | |
1784 DWORD fMode) | |
1785 { | |
1786 if (XEUNICODE_P) | |
2262 | 1787 #if defined (CYGWIN_HEADERS) && W32API_INSTALLED_VER < W32API_VER(3,1) |
1788 /* Cygwin used to mistakenly declare the fourth and fifth arguments as | |
771 | 1789 PDEVMODEA. */ |
1790 return DocumentPropertiesW (hWnd, hPrinter, (LPWSTR) pDeviceName, | |
1791 (DEVMODEA *) pDevModeOutput, | |
1792 (DEVMODEA *) pDevModeInput, fMode); | |
1793 #else | |
1794 return DocumentPropertiesW (hWnd, hPrinter, (LPWSTR) pDeviceName, | |
1795 pDevModeOutput, pDevModeInput, fMode); | |
1796 #endif /* CYGWIN_HEADERS */ | |
1797 else | |
1798 { | |
1799 HGLOBAL hDevModeInput = NULL; | |
1800 DEVMODEA *pDevModeInputa = NULL; | |
1801 LONG retval; | |
1802 | |
1803 if (pDevModeInput) | |
1804 { | |
1805 hDevModeInput = copy_devmodew_to_devmodea (pDevModeInput, NULL); | |
1806 pDevModeInputa = (DEVMODEA *) GlobalLock (hDevModeInput); | |
1807 } | |
1808 | |
1809 /* Here we cheat a bit to avoid a problem: If the output | |
1810 structure is given but not the input one, how do we know how | |
1811 big to allocate our shadow output structure? Since the | |
1812 shadow structure is ANSI and the original Unicode, we know | |
1813 the shadow structure is smaller than what's given, so we just | |
1814 write into the given structure and then fix. */ | |
1815 retval = DocumentPropertiesA (hWnd, hPrinter, (LPSTR) pDeviceName, | |
1816 pDevModeOutput ? | |
1817 (DEVMODEA *) pDevModeOutput : 0, | |
1818 pDevModeInput ? pDevModeInputa : 0, | |
1819 fMode); | |
1820 | |
1821 if (hDevModeInput) | |
1822 { | |
1823 GlobalUnlock (hDevModeInput); | |
1824 GlobalFree (hDevModeInput); | |
1825 } | |
1826 | |
1827 if (retval >= 0 && pDevModeOutput) | |
1828 { | |
1829 /* copy the shadow structure out of the way and then put the | |
1830 right contents back. */ | |
1831 DEVMODEA *shadow = (DEVMODEA *) pDevModeOutput; | |
1832 DEVMODEA *newshadow = alloca_array (DEVMODEA, shadow->dmSize + | |
1833 shadow->dmDriverExtra); | |
1834 | |
1835 memcpy (newshadow, shadow, shadow->dmSize + shadow->dmDriverExtra); | |
1836 copy_devmodea_to_devmodew (newshadow, pDevModeOutput); | |
1837 } | |
1838 | |
1839 if (fMode == 0) | |
1840 retval += (sizeof (DEVMODEW) - sizeof (DEVMODEA)); | |
1841 return retval; | |
1842 } | |
1843 } | |
1844 | |
1845 static BOOL | |
1846 ansi_printer_dialog_1 (void *strucked, HGLOBAL *devmode_inout, int do_PrintDlg) | |
1847 { | |
1848 HGLOBAL hdma = NULL; | |
1849 HGLOBAL hdmw = *devmode_inout; | |
1850 DEVMODEW *dmw = NULL; | |
1851 BOOL retval; | |
1852 | |
1853 if (hdmw != NULL) | |
1854 { | |
1855 /* copy to shadow in structure if needed */ | |
1856 dmw = (DEVMODEW *) GlobalLock (hdmw); | |
1857 hdma = copy_devmodew_to_devmodea (dmw, NULL); | |
1858 *devmode_inout = hdma; | |
1859 } | |
1860 | |
1861 if (do_PrintDlg) | |
1862 retval = PrintDlgA ((PRINTDLGA *) strucked); | |
1863 else | |
1864 retval = PageSetupDlgA ((PAGESETUPDLGA *) strucked); | |
1865 | |
1866 if (retval) | |
1867 { | |
1868 /* copy the shadow output structure back to original, or | |
1869 allocate new one. */ | |
1870 if (*devmode_inout) | |
1871 { | |
1872 DEVMODEA *newdma = (DEVMODEA *) GlobalLock (*devmode_inout); | |
1873 if (dmw) | |
1874 { | |
1875 copy_devmodea_to_devmodew (newdma, dmw); | |
1876 GlobalUnlock (hdmw); | |
1877 } | |
1878 else | |
1879 hdmw = copy_devmodea_to_devmodew (newdma, NULL); | |
1880 GlobalUnlock (*devmode_inout); | |
1881 GlobalFree (*devmode_inout); | |
1882 *devmode_inout = hdmw; | |
1883 } | |
1884 else if (hdma) | |
1885 /* #### can this happen? */ | |
1886 GlobalFree (hdma); | |
1887 } | |
1888 | |
1889 return retval; | |
1890 } | |
1891 | |
1892 BOOL | |
1893 qxePrintDlg (PRINTDLGW *lppd) | |
1894 { | |
1895 if (XEUNICODE_P) | |
1896 return PrintDlgW (lppd); | |
1897 else | |
1898 return ansi_printer_dialog_1 (lppd, &lppd->hDevMode, 1); | |
1899 } | |
1900 | |
1901 BOOL | |
1902 qxePageSetupDlg (PAGESETUPDLGW *lppd) | |
1903 { | |
1904 if (XEUNICODE_P) | |
1905 return PageSetupDlgW (lppd); | |
1906 else | |
1907 return ansi_printer_dialog_1 (lppd, &lppd->hDevMode, 0); | |
1908 } | |
1909 | |
1910 | |
1911 /************************************************************************/ | |
1912 /* fonts */ | |
1913 /************************************************************************/ | |
1914 | |
1915 static void | |
1916 copy_logfonta_to_logfontw (const LOGFONTA *src, LOGFONTW *dst) | |
1917 { | |
1918 /* the layout of LOGFONT is | |
1919 | |
1920 non-split fields; | |
1921 TCHAR lfFaceName[...]; | |
1922 */ | |
1923 memcpy (dst, src, sizeof (LOGFONTA)); | |
1924 } | |
1925 | |
1926 static void | |
1927 copy_logfontw_to_logfonta (const LOGFONTW *src, LOGFONTA *dst) | |
1928 { | |
1929 memcpy (dst, src, sizeof (LOGFONTA)); | |
1930 } | |
1931 | |
872 | 1932 #if 0 /* unused */ |
1933 | |
771 | 1934 static void |
1935 copy_enumlogfonta_to_enumlogfontw (const ENUMLOGFONTA *src, ENUMLOGFONTW *dst) | |
1936 { | |
1937 /* the layout of ENUMLOGFONT is | |
1938 | |
1939 LOGFONT elfLogFont; | |
1940 TCHAR elfFullName[...]; | |
1941 TCHAR elfStyle[...]; | |
1942 */ | |
1943 xzero (*dst); | |
1944 copy_logfonta_to_logfontw (&src->elfLogFont, &dst->elfLogFont); | |
1945 memcpy (dst->elfFullName, src->elfFullName, sizeof (src->elfFullName)); | |
1946 memcpy (dst->elfStyle, src->elfStyle, sizeof (src->elfStyle)); | |
1947 } | |
1948 | |
872 | 1949 #endif /* 0 */ |
1950 | |
771 | 1951 static void |
1952 copy_enumlogfontexa_to_enumlogfontexw (const ENUMLOGFONTEXA *src, | |
1953 ENUMLOGFONTEXW *dst) | |
1954 { | |
1955 /* the layout of ENUMLOGFONT is | |
1956 | |
1957 LOGFONT elfLogFont; | |
1958 TCHAR elfFullName[...]; | |
1959 TCHAR elfStyle[...]; | |
1960 TCHAR elfScript[...]; | |
1961 */ | |
1962 xzero (*dst); | |
1963 copy_logfonta_to_logfontw (&src->elfLogFont, &dst->elfLogFont); | |
1964 memcpy (dst->elfFullName, src->elfFullName, sizeof (src->elfFullName)); | |
1965 memcpy (dst->elfStyle, src->elfStyle, sizeof (src->elfStyle)); | |
1966 memcpy (dst->elfScript, src->elfScript, sizeof (src->elfScript)); | |
1967 } | |
1968 | |
1969 static void | |
1970 copy_newtextmetrica_to_newtextmetricw (const NEWTEXTMETRICA *src, | |
1971 NEWTEXTMETRICW *dst) | |
1972 { | |
1973 /* the layout of NEWTEXTMETRIC is | |
1974 | |
1975 non-split fields; | |
1976 WCHAR/BYTE tmFirstChar; | |
1977 WCHAR/BYTE tmLastChar; | |
1978 WCHAR/BYTE tmDefaultChar; | |
1979 WCHAR/BYTE tmBreakChar; | |
1980 BYTE tmItalic; | |
1981 non-split fields; | |
1982 */ | |
1983 xzero (*dst); | |
1984 memcpy ((char *) dst, (char *) src, | |
1985 offsetof (NEWTEXTMETRICA, tmFirstChar)); | |
1986 memcpy ((char *) dst + offsetof (NEWTEXTMETRICW, tmItalic), | |
1987 (char *) src + offsetof (NEWTEXTMETRICA, tmItalic), | |
1988 sizeof (NEWTEXTMETRICA) - offsetof (NEWTEXTMETRICA, tmItalic)); | |
1989 dst->tmFirstChar = (WCHAR) src->tmFirstChar; | |
1990 dst->tmLastChar = (WCHAR) src->tmLastChar; | |
1991 dst->tmDefaultChar = (WCHAR) src->tmDefaultChar; | |
1992 dst->tmBreakChar = (WCHAR) src->tmBreakChar; | |
1993 } | |
1994 | |
1995 static void | |
1996 copy_newtextmetricexa_to_newtextmetricexw (const NEWTEXTMETRICEXA *src, | |
1997 NEWTEXTMETRICEXW *dst) | |
1998 { | |
1999 /* the layout of NEWTEXTMETRICEX is | |
2000 | |
2001 NEWTEXTMETRICA/W ntmTm; | |
2002 FONTSIGNATURE ntmFontSig; | |
2003 */ | |
2004 copy_newtextmetrica_to_newtextmetricw (&src->ntmTm, &dst->ntmTm); | |
2005 dst->ntmFontSig = src->ntmFontSig; | |
2006 } | |
2007 | |
872 | 2008 #if 0 /* unused */ |
2009 | |
771 | 2010 static void |
2011 copy_textmetricw_to_textmetrica (const TEXTMETRICW *src, | |
2012 TEXTMETRICA *dst) | |
2013 { | |
2014 /* the layout of TEXTMETRIC is like NEWTEXTMETRIC; see above. */ | |
2015 xzero (*dst); | |
2016 memcpy ((char *) dst, (char *) src, | |
2017 offsetof (TEXTMETRICA, tmFirstChar)); | |
2018 memcpy ((char *) dst + offsetof (TEXTMETRICA, tmItalic), | |
2019 (char *) src + offsetof (TEXTMETRICW, tmItalic), | |
2020 sizeof (TEXTMETRICA) - offsetof (TEXTMETRICA, tmItalic)); | |
2021 dst->tmFirstChar = (BYTE) src->tmFirstChar; | |
2022 dst->tmLastChar = (BYTE) src->tmLastChar; | |
2023 dst->tmDefaultChar = (BYTE) src->tmDefaultChar; | |
2024 dst->tmBreakChar = (BYTE) src->tmBreakChar; | |
2025 } | |
2026 | |
872 | 2027 #endif /* 0 */ |
2028 | |
771 | 2029 static void |
2030 copy_textmetrica_to_textmetricw (const TEXTMETRICA *src, | |
2031 TEXTMETRICW *dst) | |
2032 { | |
2033 /* the layout of TEXTMETRIC is like NEWTEXTMETRIC; see above. */ | |
2034 xzero (*dst); | |
2035 memcpy ((char *) dst, (char *) src, | |
2036 offsetof (TEXTMETRICA, tmFirstChar)); | |
2037 memcpy ((char *) dst + offsetof (TEXTMETRICW, tmItalic), | |
2038 (char *) src + offsetof (TEXTMETRICA, tmItalic), | |
2039 sizeof (TEXTMETRICA) - offsetof (TEXTMETRICA, tmItalic)); | |
2040 dst->tmFirstChar = (WCHAR) src->tmFirstChar; | |
2041 dst->tmLastChar = (WCHAR) src->tmLastChar; | |
2042 dst->tmDefaultChar = (WCHAR) src->tmDefaultChar; | |
2043 dst->tmBreakChar = (WCHAR) src->tmBreakChar; | |
2044 } | |
2045 | |
2046 typedef int (CALLBACK *qxeEnumFontFamExProcW) (ENUMLOGFONTEXW *lpelfe, | |
2047 NEWTEXTMETRICEXW *lpntme, | |
2048 DWORD FontType, | |
2049 LPARAM lParam); | |
2050 | |
2051 struct qxeEnumFontFamExProcA_wrapper_t | |
2052 { | |
2053 qxeEnumFontFamExProcW orig_proc; | |
2054 LPARAM orig_lparam; | |
2055 }; | |
2056 | |
2057 static int CALLBACK | |
2058 qxeEnumFontFamExProcA_wrapper (ENUMLOGFONTEXA *lpelfe, | |
2059 NEWTEXTMETRICEXA *lpntme, | |
2060 DWORD fontType, | |
2061 struct qxeEnumFontFamExProcA_wrapper_t | |
2062 *closure) | |
2063 { | |
2064 ENUMLOGFONTEXW lpelfew; | |
2065 NEWTEXTMETRICEXW lpntmew; | |
2066 | |
2067 /* #### if we're on Windows 2000 or above, lpelfe is actually an | |
2068 ENUMLOGFONTEXDV structure, and lpntme is an ENUMTEXTMETRIC structure | |
2069 when TRUETYPE_FONTTYPE. both are split-sized and need their own copy | |
2070 functions. need to handle. */ | |
2071 copy_enumlogfontexa_to_enumlogfontexw (lpelfe, &lpelfew); | |
2072 if (fontType & TRUETYPE_FONTTYPE) | |
2073 copy_newtextmetricexa_to_newtextmetricexw (lpntme, &lpntmew); | |
2074 else | |
2075 { | |
2076 /* see docs of EnumFontFamExProc */ | |
2077 xzero (lpntmew); | |
2078 copy_textmetrica_to_textmetricw ((TEXTMETRICA *) lpntme, | |
2079 (TEXTMETRICW *) &lpntmew); | |
2080 } | |
2081 return (closure->orig_proc) (&lpelfew, &lpntmew, fontType, | |
2082 closure->orig_lparam); | |
2083 } | |
2084 | |
2085 int | |
2086 qxeEnumFontFamiliesEx (HDC hdc, LOGFONTW *lpLogfont, | |
2087 FONTENUMPROCW lpEnumFontFamProc, LPARAM lParam, | |
2088 DWORD dwFlags) | |
2089 { | |
2090 if (XEUNICODE_P) | |
2091 return EnumFontFamiliesExW (hdc, lpLogfont, lpEnumFontFamProc, lParam, | |
2092 dwFlags); | |
2093 else | |
2094 { | |
2095 struct qxeEnumFontFamExProcA_wrapper_t closure; | |
2096 LOGFONTA lfa; | |
2097 | |
2098 closure.orig_proc = (qxeEnumFontFamExProcW) lpEnumFontFamProc; | |
2099 closure.orig_lparam = lParam; | |
2100 copy_logfontw_to_logfonta (lpLogfont, &lfa); | |
2101 return EnumFontFamiliesExA (hdc, &lfa, | |
2102 (FONTENUMPROCA) | |
2103 qxeEnumFontFamExProcA_wrapper, | |
2104 (LPARAM) &closure, dwFlags); | |
2105 } | |
2106 } | |
2107 | |
2108 HFONT | |
2109 qxeCreateFontIndirect (CONST LOGFONTW *lplf) | |
2110 { | |
2111 if (XEUNICODE_P) | |
2112 return CreateFontIndirectW (lplf); | |
2113 else | |
2114 { | |
2115 LOGFONTA lfa; | |
2116 | |
2117 copy_logfontw_to_logfonta (lplf, &lfa); | |
2118 return CreateFontIndirectA (&lfa); | |
2119 } | |
2120 } | |
2121 | |
2122 BOOL | |
2123 qxeImmSetCompositionFont (HIMC imc, LOGFONTW *lplf) | |
2124 { | |
2125 if (XEUNICODE_P) | |
2126 return ImmSetCompositionFontW (imc, lplf); | |
2127 else | |
2128 { | |
2129 LOGFONTA lfa; | |
2130 | |
2131 copy_logfontw_to_logfonta (lplf, &lfa); | |
2132 return ImmSetCompositionFontA (imc, &lfa); | |
2133 } | |
2134 } | |
2135 | |
2136 BOOL | |
2137 qxeImmGetCompositionFont (HIMC imc, LOGFONTW *lplf) | |
2138 { | |
2139 if (XEUNICODE_P) | |
2140 return ImmGetCompositionFontW (imc, lplf); | |
2141 else | |
2142 { | |
2143 LOGFONTA lfa; | |
2144 BOOL retval = ImmGetCompositionFontA (imc, &lfa); | |
2145 | |
2146 if (retval) | |
2147 copy_logfonta_to_logfontw (&lfa, lplf); | |
2148 return retval; | |
2149 } | |
2150 } | |
2500 | 2151 |
2152 #if MSC_VERSION >= 1300 | |
2153 | |
2154 BOOL | |
2155 qxeImmSetCompositionString (HIMC arg1, DWORD dwIndex, LPVOID lpComp, DWORD arg4, LPVOID lpRead, DWORD arg6) | |
2156 { | |
2157 if (XEUNICODE_P) | |
2158 return ImmSetCompositionStringW (arg1, dwIndex, lpComp, arg4, lpRead, arg6); | |
2159 else | |
2160 return ImmSetCompositionStringA (arg1, dwIndex, lpComp, arg4, lpRead, arg6); | |
2161 } | |
2162 | |
2163 #else | |
2164 | |
2165 BOOL | |
2166 qxeImmSetCompositionString (HIMC arg1, DWORD dwIndex, LPCVOID lpComp, DWORD arg4, LPCVOID lpRead, DWORD arg6) | |
2167 { | |
2168 if (XEUNICODE_P) | |
2169 return ImmSetCompositionStringW (arg1, dwIndex, lpComp, arg4, lpRead, arg6); | |
2170 else | |
2171 return ImmSetCompositionStringA (arg1, dwIndex, lpComp, arg4, lpRead, arg6); | |
2172 } | |
2173 | |
2174 #endif /* MSC_VERSION >= 1300 */ | |
2175 | |
771 | 2176 int |
2177 qxeGetObject (HGDIOBJ hgdiobj, int cbBuffer, LPVOID lpvObject) | |
2178 { | |
2179 if (XEUNICODE_P) | |
2180 return GetObjectW (hgdiobj, cbBuffer, lpvObject); | |
2181 else | |
2182 { | |
2183 if (cbBuffer == sizeof (LOGFONTW)) | |
2184 { | |
2185 LOGFONTA lfa; | |
2186 int retval = GetObjectA (hgdiobj, sizeof (LOGFONTA), &lfa); | |
2187 | |
2188 if (!retval) | |
2189 return retval; | |
2190 copy_logfonta_to_logfontw (&lfa, (LOGFONTW *) lpvObject); | |
2191 return retval; | |
2192 } | |
2193 else | |
2194 return GetObjectA (hgdiobj, cbBuffer, lpvObject); | |
2195 } | |
2196 } | |
2197 | |
2198 BOOL | |
2199 qxeGetTextMetrics (HDC hdc, LPTEXTMETRICW lptm) | |
2200 { | |
2201 if (XEUNICODE_P) | |
2202 return GetTextMetricsW (hdc, lptm); | |
2203 else | |
2204 { | |
2205 TEXTMETRICA tma; | |
2206 BOOL retval = GetTextMetricsA (hdc, &tma); | |
2207 | |
2208 if (retval) | |
2209 copy_textmetrica_to_textmetricw (&tma, lptm); | |
2210 return retval; | |
2211 } | |
2212 } | |
2213 | |
2214 | |
2215 /************************************************************************/ | |
2216 /* windows */ | |
2217 /************************************************************************/ | |
2218 | |
2219 typedef struct Intercepted_wnd_proc | |
2220 { | |
2221 WNDPROC proc; | |
2222 Extbyte *name; | |
2223 int is_ansi; | |
2224 } Intercepted_wnd_proc; | |
2225 | |
2226 typedef struct | |
2227 { | |
2228 Dynarr_declare (Intercepted_wnd_proc); | |
2229 } Intercepted_wnd_proc_dynarr; | |
2230 | |
2231 static Intercepted_wnd_proc_dynarr *intercepted_wnd_procs; | |
2232 | |
2233 static Intercepted_wnd_proc * | |
2234 find_window_class (const Extbyte *name, int is_ansi) | |
2235 { | |
2236 int i; | |
2237 | |
2238 if (!intercepted_wnd_procs) | |
2239 intercepted_wnd_procs = Dynarr_new (Intercepted_wnd_proc); | |
2240 | |
2241 for (i = 0; i < Dynarr_length (intercepted_wnd_procs); i++) | |
2242 { | |
2243 Intercepted_wnd_proc *s = Dynarr_atp (intercepted_wnd_procs, i); | |
2244 | |
2245 if (s->is_ansi == is_ansi && (is_ansi ? !strcmp (s->name, name) : | |
2246 !wcscmp ((wchar_t *) s->name, | |
2247 (wchar_t *) name))) | |
2248 return s; | |
2249 } | |
2250 | |
2251 return 0; | |
2252 } | |
2253 | |
2254 /* #### | |
2255 | |
2256 check problem with cutting and pasting in my current mule -- if i cut, | |
2257 then go to another application, then switch back to this one and | |
2258 paste, it seems to get confused -- loses the size or something? | |
2259 | |
2260 other things: split flags on CreateProcess and DDE stuff should be | |
2261 handled by us. | |
2262 */ | |
2263 | |
2264 static LRESULT WINAPI | |
2265 intercepted_wnd_proc (HWND hwnd, UINT message_, WPARAM wParam, LPARAM lParam) | |
2266 { | |
2267 Intercepted_wnd_proc *s; | |
2268 int is_ansi = XEUNICODE_P ? !IsWindowUnicode (hwnd) : 1; | |
2269 Extbyte *classname; | |
2270 int size = 100; | |
2271 | |
2272 /* Just in case XEUNICODE_P changes during the execution of the program | |
2273 (admittedly, unlikely), check whether the window is Unicode and keep | |
2274 track of this in the list of classes. */ | |
2275 while (1) | |
2276 { | |
2277 classname = alloca_extbytes (size * XETCHAR_SIZE); | |
2278 if ((is_ansi ? GetClassNameA (hwnd, (LPSTR) classname, size) : | |
2279 GetClassNameW (hwnd, (LPWSTR) classname, size)) < size - 1) | |
2280 break; | |
2281 size *= 2; | |
2282 } | |
2283 | |
2284 s = find_window_class (classname, is_ansi); | |
2285 | |
2286 assert (s); | |
2287 | |
2288 if (message_ == WM_NOTIFY) | |
2289 { | |
2290 LPNMHDR nmhdr = (LPNMHDR) lParam; | |
2291 int putback = nmhdr->code; | |
2292 int do_putback = 0; | |
2293 | |
2294 #define FROB(msg) \ | |
2295 case msg##W: \ | |
2296 /* split structures are the same size, so no conversion necessary */ \ | |
2297 nmhdr->code = (UINT) msg##A; \ | |
2298 do_putback = 1; \ | |
2299 break; | |
2300 switch (nmhdr->code) | |
2301 { | |
2302 /* NMHEADER */ | |
2303 FROB (HDN_ITEMCHANGING); | |
2304 FROB (HDN_ITEMCHANGED); | |
2305 FROB (HDN_ITEMCLICK); | |
2306 FROB (HDN_ITEMDBLCLICK); | |
2307 FROB (HDN_DIVIDERDBLCLICK); | |
2308 FROB (HDN_BEGINTRACK); | |
2309 FROB (HDN_ENDTRACK); | |
2310 FROB (HDN_TRACK); | |
2311 /* NMDISPINFO */ | |
2312 FROB (HDN_GETDISPINFO); | |
2313 /* NMTBGETINFOTIP */ | |
2314 FROB (TBN_GETINFOTIP); | |
2315 /* NMTBDISPINFO */ | |
2316 FROB (TBN_GETDISPINFO); | |
2317 /* NMTOOLBAR */ | |
2318 FROB (TBN_GETBUTTONINFO); | |
2319 | |
2320 /* split-sized NMTTDISPINFO */ | |
2321 FROB (TTN_GETDISPINFO); /* handle the ...W case; then handle the | |
2322 ...A case specially, since we need to | |
2323 mess with the structure */ | |
2324 case TTN_GETDISPINFOA: /* same as TTN_NEEDTEXTA */ | |
2325 { | |
2326 NMTTDISPINFOW *nmw = alloca_new (NMTTDISPINFOW); | |
2327 NMTTDISPINFOA *nma = (NMTTDISPINFOA *) lParam; | |
2328 LRESULT retval; | |
2329 /* the layout of NMTTDISPINFO is | |
2330 | |
2331 non-split fields; | |
2332 TCHAR szText[...]; | |
2333 non-split fields; | |
2334 */ | |
2335 | |
2336 xzero (*nmw); | |
2337 /* copy to ...W struct for Unicode code */ | |
2338 memcpy ((char *) nmw, (char *) nma, | |
2339 offsetof (NMTTDISPINFOA, szText)); | |
2340 memcpy ((char *) nmw + offsetof (NMTTDISPINFOW, szText) + | |
2341 sizeof (nmw->szText), | |
2342 (char *) nma + offsetof (NMTTDISPINFOA, szText) + | |
2343 sizeof (nma->szText), | |
2344 sizeof (NMTTDISPINFOA) - | |
2345 (offsetof (NMTTDISPINFOA, szText) + sizeof (nma->szText))); | |
2346 memcpy (nmw->szText, nma->szText, sizeof (nma->szText)); | |
2347 retval = (s->proc) (hwnd, message_, wParam, lParam); | |
2348 /* copy back to ...A struct */ | |
2349 xzero (*nma); | |
2350 memcpy ((char *) nma, (char *) nmw, | |
2351 offsetof (NMTTDISPINFOA, szText)); | |
2352 memcpy ((char *) nma + offsetof (NMTTDISPINFOA, szText) + | |
2353 sizeof (nma->szText), | |
2354 (char *) nmw + offsetof (NMTTDISPINFOW, szText) + | |
2355 sizeof (nmw->szText), | |
2356 sizeof (NMTTDISPINFOA) - | |
2357 (offsetof (NMTTDISPINFOA, szText) + sizeof (nma->szText))); | |
2358 memcpy (nma->szText, nmw->szText, sizeof (nma->szText)); | |
2359 return retval; | |
2360 } | |
2361 | |
2362 /* NMLVFINDITEM */ | |
2363 FROB (LVN_ODFINDITEM); | |
2364 /* NMLVDISPINFO */ | |
2365 FROB (LVN_BEGINLABELEDIT); | |
2366 FROB (LVN_ENDLABELEDIT); | |
2367 FROB (LVN_GETDISPINFO); | |
2368 FROB (LVN_SETDISPINFO); | |
2369 /* NMLVGETINFOTIP */ | |
2370 FROB (LVN_GETINFOTIP); | |
2371 /* NMTREEVIEW */ | |
2372 FROB (TVN_SELCHANGING); | |
2373 FROB (TVN_SELCHANGED); | |
2374 FROB (TVN_ITEMEXPANDING); | |
2375 FROB (TVN_ITEMEXPANDED); | |
2376 FROB (TVN_BEGINDRAG); | |
2377 FROB (TVN_BEGINRDRAG); | |
2378 FROB (TVN_DELETEITEM); | |
2379 /* NMTVDISPINFO */ | |
2380 FROB (TVN_GETDISPINFO); | |
2381 FROB (TVN_SETDISPINFO); | |
2382 FROB (TVN_BEGINLABELEDIT); | |
2383 FROB (TVN_ENDLABELEDIT); | |
2384 /* NMTVGETINFOTIP */ | |
2385 FROB (TVN_GETINFOTIP); | |
2386 /* NMCOMBOBOXEX */ | |
2387 FROB (CBEN_GETDISPINFO); | |
2388 | |
2389 /* split-sized NMCBEDRAGBEGIN */ | |
2390 FROB (CBEN_DRAGBEGIN); /* handle the ...W case; then handle the | |
2391 ...A case specially, since we need to | |
2392 mess with the structure */ | |
2393 { | |
2394 NMCBEDRAGBEGINW *nmw = alloca_new (NMCBEDRAGBEGINW); | |
2395 NMCBEDRAGBEGINA *nma = (NMCBEDRAGBEGINA *) lParam; | |
2396 LRESULT retval; | |
2397 /* the layout of NNMCBEDRAGBEGIN is | |
2398 | |
2399 non-split fields; | |
2400 TCHAR szText[...]; | |
2401 */ | |
2402 | |
2403 xzero (*nmw); | |
2404 /* copy to ...W struct for Unicode code */ | |
2405 memcpy ((char *) nmw, (char *) nma, | |
2406 sizeof (*nma)); | |
2407 retval = (s->proc) (hwnd, message_, wParam, lParam); | |
2408 /* copy back to ...A struct */ | |
2409 xzero (*nma); | |
2410 memcpy ((char *) nma, (char *) nmw, | |
2411 sizeof (*nma)); | |
2412 return retval; | |
2413 } | |
2414 | |
2415 /* split-sized NMCBEENDEDIT */ | |
2416 FROB (CBEN_ENDEDIT); /* handle the ...W case; then handle the | |
2417 ...A case specially, since we need to | |
2418 mess with the structure */ | |
2419 { | |
2420 NMCBEENDEDITW *nmw = alloca_new (NMCBEENDEDITW); | |
2421 NMCBEENDEDITA *nma = (NMCBEENDEDITA *) lParam; | |
2422 LRESULT retval; | |
2423 /* the layout of NMCBEENDEDIT is | |
2424 | |
2425 non-split fields; | |
2426 TCHAR szText[...]; | |
2427 non-split fields; | |
2428 */ | |
2429 | |
2430 xzero (*nmw); | |
2431 /* copy to ...W struct for Unicode code */ | |
2432 memcpy ((char *) nmw, (char *) nma, | |
2433 offsetof (NMCBEENDEDITA, szText)); | |
2434 memcpy ((char *) nmw + offsetof (NMCBEENDEDITW, szText) + | |
2435 sizeof (nmw->szText), | |
2436 (char *) nma + offsetof (NMCBEENDEDITA, szText) + | |
2437 sizeof (nma->szText), | |
2438 sizeof (NMCBEENDEDITA) - | |
2439 (offsetof (NMCBEENDEDITA, szText) + sizeof (nma->szText))); | |
2440 memcpy (nmw->szText, nma->szText, sizeof (nma->szText)); | |
2441 retval = (s->proc) (hwnd, message_, wParam, lParam); | |
2442 /* copy back to ...A struct */ | |
2443 xzero (*nma); | |
2444 memcpy ((char *) nma, (char *) nmw, | |
2445 offsetof (NMCBEENDEDITA, szText)); | |
2446 memcpy ((char *) nma + offsetof (NMCBEENDEDITA, szText) + | |
2447 sizeof (nma->szText), | |
2448 (char *) nmw + offsetof (NMCBEENDEDITW, szText) + | |
2449 sizeof (nmw->szText), | |
2450 sizeof (NMCBEENDEDITA) - | |
2451 (offsetof (NMCBEENDEDITA, szText) + sizeof (nma->szText))); | |
2452 memcpy (nma->szText, nmw->szText, sizeof (nma->szText)); | |
2453 return retval; | |
2454 } | |
2455 | |
2456 /* NMDATETIMESTRING */ | |
2457 FROB (DTN_USERSTRING); | |
2458 /* NMDATETIMEWMKEYDOWN */ | |
2459 FROB (DTN_WMKEYDOWN); | |
2460 | |
2461 /* split-sized NMDATETIMEFORMAT */ | |
2462 FROB (DTN_FORMAT); /* handle the ...W case; then handle the | |
2463 ...A case specially, since we need to | |
2464 mess with the structure */ | |
2465 { | |
2466 NMDATETIMEFORMATW *nmw = alloca_new (NMDATETIMEFORMATW); | |
2467 NMDATETIMEFORMATA *nma = (NMDATETIMEFORMATA *) lParam; | |
2468 LRESULT retval; | |
2469 /* the layout of NMDATETIMEFORMAT is | |
2470 | |
2471 non-split fields; | |
2472 TCHAR szText[...]; | |
2473 */ | |
2474 | |
2475 xzero (*nmw); | |
2476 /* copy to ...W struct for Unicode code */ | |
2477 memcpy ((char *) nmw, (char *) nma, | |
2478 sizeof (*nma)); | |
2479 retval = (s->proc) (hwnd, message_, wParam, lParam); | |
2480 /* copy back to ...A struct */ | |
2481 xzero (*nma); | |
2482 memcpy ((char *) nma, (char *) nmw, | |
2483 sizeof (*nma)); | |
2484 return retval; | |
2485 } | |
2486 | |
2487 /* NMDATETIMEFORMATQUERY */ | |
2488 FROB (DTN_FORMATQUERY); | |
2489 default: break; | |
2490 } | |
2491 #undef FROB | |
2492 if (do_putback) | |
2493 { | |
2494 LRESULT retval = (s->proc) (hwnd, message_, wParam, lParam); | |
2495 ((LPNMHDR) lParam)->code = putback; | |
2496 return retval; | |
2497 } | |
2498 } | |
2499 | |
2500 return (s->proc) (hwnd, message_, wParam, lParam); | |
2501 } | |
2502 | |
2503 ATOM | |
2504 qxeRegisterClass (CONST WNDCLASSW * lpWndClass) | |
2505 { | |
2506 Intercepted_wnd_proc *s = | |
2507 find_window_class ((Extbyte *) lpWndClass->lpszClassName, !XEUNICODE_P); | |
2508 WNDCLASSW classnew; | |
2509 | |
2510 if (s) | |
2511 { | |
2512 s->proc = lpWndClass->lpfnWndProc; | |
2513 s->name = (Extbyte *) lpWndClass->lpszClassName; | |
2514 s->is_ansi = !XEUNICODE_P; | |
2515 } | |
2516 else | |
2517 { | |
2518 Intercepted_wnd_proc news; | |
2519 news.proc = lpWndClass->lpfnWndProc; | |
2520 news.name = (Extbyte *) lpWndClass->lpszClassName; | |
2521 news.is_ansi = !XEUNICODE_P; | |
2522 Dynarr_add (intercepted_wnd_procs, news); | |
2523 } | |
2524 classnew = *lpWndClass; | |
2525 classnew.lpfnWndProc = intercepted_wnd_proc; | |
2526 if (XEUNICODE_P) | |
2527 return RegisterClassW (&classnew); | |
2528 else | |
2367 | 2529 /* The intermediate cast fools gcc into not outputting strict-aliasing |
2530 complaints */ | |
2531 return RegisterClassA ((CONST WNDCLASSA *) (void *) &classnew); | |
771 | 2532 } |
2533 | |
2534 BOOL | |
2535 qxeUnregisterClass (const Extbyte * lpClassName, HINSTANCE hInstance) | |
2536 { | |
2537 Intercepted_wnd_proc *s = | |
2538 find_window_class (lpClassName, !XEUNICODE_P); | |
2539 | |
2540 if (s) | |
2541 Dynarr_delete_by_pointer (intercepted_wnd_procs, s); | |
2542 if (XEUNICODE_P) | |
2543 return UnregisterClassW ((LPCWSTR) lpClassName, hInstance); | |
2544 else | |
2545 return UnregisterClassA ((LPCSTR) lpClassName, hInstance); | |
2546 } | |
2547 | |
2548 /* NOTE: NT 4.0+ only */ | |
2549 ATOM | |
2550 qxeRegisterClassEx (CONST WNDCLASSEXW *lpWndClass) | |
2551 { | |
2552 Intercepted_wnd_proc *s = | |
2553 find_window_class ((Extbyte *) lpWndClass->lpszClassName, !XEUNICODE_P); | |
2554 WNDCLASSEXW classnew; | |
2555 | |
2556 if (s) | |
2557 { | |
2558 s->proc = lpWndClass->lpfnWndProc; | |
2559 s->name = (Extbyte *) lpWndClass->lpszClassName; | |
2560 s->is_ansi = !XEUNICODE_P; | |
2561 } | |
2562 else | |
2563 { | |
2564 Intercepted_wnd_proc news; | |
2565 news.proc = lpWndClass->lpfnWndProc; | |
2566 news.name = (Extbyte *) lpWndClass->lpszClassName; | |
2567 news.is_ansi = !XEUNICODE_P; | |
2568 Dynarr_add (intercepted_wnd_procs, news); | |
2569 } | |
2570 classnew = *lpWndClass; | |
2571 classnew.lpfnWndProc = intercepted_wnd_proc; | |
2572 if (XEUNICODE_P) | |
2573 return RegisterClassExW (&classnew); | |
2574 else | |
2367 | 2575 /* The intermediate cast fools gcc into not outputting strict-aliasing |
2576 complaints */ | |
2577 return RegisterClassExA ((CONST WNDCLASSEXA *) (void *) &classnew); | |
771 | 2578 } |
2579 | |
2580 | |
2581 /************************************************************************/ | |
2582 /* COMMCTRL.H */ | |
2583 /************************************************************************/ | |
2584 | |
2585 /* there are only four structures in commctrl.h that cannot be cast | |
2586 between Unicode/ANSI versions: | |
2587 | |
2588 NMTTDISPINFO aka TOOLTIPTEXT | |
2589 NMCBEDRAGBEGIN | |
2590 NMCBEENDEDIT | |
2591 NMDATETIMEFORMAT | |
2592 | |
2593 these are all notify structures, and we handle them above in | |
2594 intercepted_wnd_proc(). | |
2595 | |
2596 in addition, this constant is weird, being a struct size of one of these: | |
2597 | |
2598 NMTTDISPINFO_V1_SIZE | |
2599 */ | |
2600 | |
2601 /* | |
2602 split class names: | |
2603 | |
2604 WC_HEADER | |
2605 TOOLBARCLASSNAME | |
2606 REBARCLASSNAME | |
2607 TOOLTIPS_CLASS | |
2608 STATUSCLASSNAME | |
2609 TRACKBAR_CLASS | |
2610 UPDOWN_CLASS | |
2611 PROGRESS_CLASS | |
2612 HOTKEY_CLASS | |
2613 WC_LISTVIEW | |
2614 WC_TREEVIEW | |
2615 WC_COMBOBOXEX | |
2616 WC_TABCONTROL | |
2617 ANIMATE_CLASS | |
2618 MONTHCAL_CLASS | |
2619 DATETIMEPICK_CLASS | |
2620 WC_IPADDRESS | |
2621 WC_PAGESCROLLER | |
2622 WC_NATIVEFONTCTL | |
2623 */ | |
2624 | |
2625 /* | |
2626 SendMessage split messages: | |
2627 | |
2628 HDM_INSERTITEM | |
2629 HDM_GETITEM | |
2630 HDM_SETITEM | |
2631 TB_GETBUTTONTEXT | |
2632 TB_SAVERESTORE | |
2633 TB_ADDSTRING | |
2634 TB_GETBUTTONINFO | |
2635 TB_SETBUTTONINFO | |
2636 TB_INSERTBUTTON | |
2637 TB_ADDBUTTONS | |
2638 RB_INSERTBAND | |
2639 RB_SETBANDINFO | |
2640 RB_GETBANDINFO | |
2641 TTM_ADDTOOL | |
2642 TTM_DELTOOL | |
2643 TTM_NEWTOOLRECT | |
2644 TTM_GETTOOLINFO | |
2645 TTM_SETTOOLINFO | |
2646 TTM_HITTEST | |
2647 TTM_GETTEXT | |
2648 TTM_UPDATETIPTEXT | |
2649 TTM_ENUMTOOLS | |
2650 TTM_GETCURRENTTOOL | |
2651 SB_GETTEXT | |
2652 SB_SETTEXT | |
2653 SB_GETTEXTLENGTH | |
2654 SB_SETTIPTEXT | |
2655 SB_GETTIPTEXT | |
2656 LVM_GETITEM | |
2657 LVM_SETITEM | |
2658 LVM_INSERTITEM | |
2659 LVM_FINDITEM | |
2660 LVM_GETSTRINGWIDTH | |
2661 LVM_EDITLABEL | |
2662 LVM_GETCOLUMN | |
2663 LVM_SETCOLUMN | |
2664 LVM_GETITEMTEXT | |
2665 LVM_SETITEMTEXT | |
2666 LVM_GETISEARCHSTRING | |
2667 LVM_SETBKIMAGE | |
2668 LVM_GETBKIMAGE | |
2669 TVM_INSERTITEM | |
2670 TVM_GETITEM | |
2671 TVM_SETITEM | |
2672 TVM_EDITLABEL | |
2673 TVM_GETISEARCHSTRING | |
2674 CBEM_INSERTITEM | |
2675 CBEM_SETITEM | |
2676 CBEM_GETITEM | |
2677 TCM_GETITEM | |
2678 TCM_SETITEM | |
2679 TCM_INSERTITEM | |
2680 ACM_OPEN | |
2681 DTM_SETFORMAT | |
2682 BFFM_SETSTATUSTEXT | |
2683 BFFM_SETSELECTION | |
2684 */ | |
2685 | |
2686 /* | |
2687 split notify messages: | |
2688 | |
2689 HDN_ITEMCHANGING | |
2690 HDN_ITEMCHANGED | |
2691 HDN_ITEMCLICK | |
2692 HDN_ITEMDBLCLICK | |
2693 HDN_DIVIDERDBLCLICK | |
2694 HDN_BEGINTRACK | |
2695 HDN_ENDTRACK | |
2696 HDN_TRACK | |
2697 HDN_GETDISPINFO | |
2698 TBN_GETINFOTIP | |
2699 TBN_GETDISPINFO | |
2700 TBN_GETBUTTONINFO | |
2701 TTN_GETDISPINFO | |
2702 TTN_NEEDTEXTW | |
2703 LVN_ODFINDITEM | |
2704 LVN_BEGINLABELEDIT | |
2705 LVN_ENDLABELEDIT | |
2706 LVN_GETDISPINFO | |
2707 LVN_SETDISPINFO | |
2708 LVN_GETINFOTIP | |
2709 TVN_SELCHANGING | |
2710 TVN_SELCHANGED | |
2711 TVN_GETDISPINFO | |
2712 TVN_SETDISPINFO | |
2713 TVN_ITEMEXPANDING | |
2714 TVN_ITEMEXPANDED | |
2715 TVN_BEGINDRAG | |
2716 TVN_BEGINRDRAG | |
2717 TVN_DELETEITEM | |
2718 TVN_BEGINLABELEDIT | |
2719 TVN_ENDLABELEDIT | |
2720 TVN_GETINFOTIP | |
2721 CBEN_GETDISPINFO | |
2722 CBEN_DRAGBEGIN | |
2723 CBEN_ENDEDIT | |
2724 DTN_USERSTRING | |
2725 DTN_WMKEYDOWN | |
2726 DTN_FORMAT | |
2727 DTN_FORMATQUERY | |
2728 BFFM_VALIDATEFAILED (send to SHBrowseForFolder procedure) | |
2729 */ | |
2730 | |
2731 /* | |
2732 split structures: | |
2733 | |
2734 TV_INSERTSTRUCT (simple-split, though -- just cast) | |
2735 TC_ITEM (simple-split, though -- just cast) | |
2736 | |
2737 #### | |
2738 */ | |
2739 | |
2740 /* | |
2741 split macros or macros needing splitting: | |
2742 | |
2743 #### | |
2744 */ | |
2745 | |
2746 LRESULT | |
2747 qxeSendMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) | |
2748 { | |
2749 #define FROB(msg) \ | |
2750 case msg##A: \ | |
2751 /* split structures are the same size, so no conversion necessary */ \ | |
2752 Msg = msg##W; \ | |
2753 break; | |
2754 | |
2755 if (XEUNICODE_P) | |
2756 { | |
2757 WCHAR classname[100]; | |
2758 /* the name for SHBrowseForFolder windows is non-obvious so we have | |
2759 to intercept the callback */ | |
2760 if (is_SHBrowseForFolder (hWnd)) | |
2761 { | |
2762 switch (Msg) | |
2763 { | |
2764 FROB (BFFM_SETSELECTION); | |
2765 FROB (BFFM_SETSTATUSTEXT); | |
2766 default: break; | |
2767 } | |
2768 } | |
2769 else if (!GetClassNameW (hWnd, classname, 100)) | |
2770 ; | |
2771 /* luckily, subclassing leaves the name alone, so we can still | |
2772 determine fairly easily the correct class to switch on */ | |
2773 else if (!wcscmp (classname, WC_HEADERW)) | |
2774 { | |
2775 switch (Msg) | |
2776 { | |
2777 FROB (HDM_INSERTITEM); | |
2778 FROB (HDM_GETITEM); | |
2779 FROB (HDM_SETITEM); | |
2780 default: break; | |
2781 } | |
2782 } | |
2783 else if (!wcscmp (classname, TOOLBARCLASSNAMEW)) | |
2784 { | |
2785 switch (Msg) | |
2786 { | |
2787 FROB (TB_GETBUTTONTEXT); | |
2788 FROB (TB_SAVERESTORE); | |
2789 FROB (TB_ADDSTRING); | |
2790 FROB (TB_GETBUTTONINFO); | |
2791 FROB (TB_SETBUTTONINFO); | |
2792 FROB (TB_INSERTBUTTON); | |
2793 FROB (TB_ADDBUTTONS); | |
2794 default: break; | |
2795 } | |
2796 } | |
2797 else if (!wcscmp (classname, REBARCLASSNAMEW)) | |
2798 { | |
2799 switch (Msg) | |
2800 { | |
2801 FROB (RB_INSERTBAND); | |
2802 FROB (RB_SETBANDINFO); | |
2803 FROB (RB_GETBANDINFO); | |
2804 default: break; | |
2805 } | |
2806 } | |
2807 else if (!wcscmp (classname, TOOLTIPS_CLASSW)) | |
2808 { | |
2809 switch (Msg) | |
2810 { | |
2811 FROB (TTM_ADDTOOL); | |
2812 FROB (TTM_DELTOOL); | |
2813 FROB (TTM_NEWTOOLRECT); | |
2814 FROB (TTM_GETTOOLINFO); | |
2815 FROB (TTM_SETTOOLINFO); | |
2816 FROB (TTM_HITTEST); | |
2817 FROB (TTM_GETTEXT); | |
2818 FROB (TTM_UPDATETIPTEXT); | |
2819 FROB (TTM_ENUMTOOLS); | |
2820 FROB (TTM_GETCURRENTTOOL); | |
2821 default: break; | |
2822 } | |
2823 } | |
2824 else if (!wcscmp (classname, STATUSCLASSNAMEW)) | |
2825 { | |
2826 switch (Msg) | |
2827 { | |
2828 FROB (SB_GETTEXT); | |
2829 FROB (SB_SETTEXT); | |
2830 FROB (SB_GETTEXTLENGTH); | |
2831 FROB (SB_SETTIPTEXT); | |
2832 FROB (SB_GETTIPTEXT); | |
2833 default: break; | |
2834 } | |
2835 } | |
2836 else if (!wcscmp (classname, WC_LISTVIEWW)) | |
2837 { | |
2838 switch (Msg) | |
2839 { | |
2840 FROB (LVM_GETITEM); | |
2841 FROB (LVM_SETITEM); | |
2842 FROB (LVM_INSERTITEM); | |
2843 FROB (LVM_FINDITEM); | |
2844 FROB (LVM_GETSTRINGWIDTH); | |
2845 FROB (LVM_EDITLABEL); | |
2846 FROB (LVM_GETCOLUMN); | |
2847 FROB (LVM_SETCOLUMN); | |
2848 FROB (LVM_GETITEMTEXT); | |
2849 FROB (LVM_SETITEMTEXT); | |
2850 FROB (LVM_GETISEARCHSTRING); | |
2851 FROB (LVM_SETBKIMAGE); | |
2852 FROB (LVM_GETBKIMAGE); | |
2853 default: break; | |
2854 } | |
2855 } | |
2856 else if (!wcscmp (classname, WC_TREEVIEWW)) | |
2857 { | |
2858 switch (Msg) | |
2859 { | |
2860 FROB (TVM_INSERTITEM); /* no need to split TV_INSERTSTRUCT */ | |
2861 FROB (TVM_GETITEM); | |
2862 FROB (TVM_SETITEM); | |
2863 FROB (TVM_EDITLABEL); | |
2864 FROB (TVM_GETISEARCHSTRING); | |
2865 default: break; | |
2866 } | |
2867 } | |
2868 else if (!wcscmp (classname, WC_COMBOBOXEXW)) | |
2869 { | |
2870 switch (Msg) | |
2871 { | |
2872 FROB (CBEM_INSERTITEM); | |
2873 FROB (CBEM_SETITEM); | |
2874 FROB (CBEM_GETITEM); | |
2875 default: break; | |
2876 } | |
2877 } | |
2878 else if (!wcscmp (classname, WC_TABCONTROLW)) | |
2879 { | |
2880 switch (Msg) | |
2881 { | |
2882 FROB (TCM_GETITEM); | |
2883 FROB (TCM_SETITEM); | |
2884 FROB (TCM_INSERTITEM); /* no need to split TC_ITEM */ | |
2885 default: break; | |
2886 } | |
2887 } | |
2888 else if (!wcscmp (classname, ANIMATE_CLASSW)) | |
2889 { | |
2890 switch (Msg) | |
2891 { | |
2892 FROB (ACM_OPEN); | |
2893 default: break; | |
2894 } | |
2895 } | |
2896 else if (!wcscmp (classname, DATETIMEPICK_CLASSW)) | |
2897 { | |
2898 switch (Msg) | |
2899 { | |
2900 FROB (DTM_SETFORMAT); | |
2901 default: break; | |
2902 } | |
2903 } | |
2904 } | |
2905 | |
2906 if (XEUNICODE_P) | |
2907 return SendMessageW (hWnd, Msg, wParam, lParam); | |
2908 else | |
2909 return SendMessageA (hWnd, Msg, wParam, lParam); | |
2910 | |
2911 #undef FROB | |
2912 } | |
2913 | |
2914 #endif /* HAVE_MS_WINDOWS */ | |
2915 | |
2916 |