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