Mercurial > hg > xemacs-beta
diff src/intl-auto-encap-win32.c @ 2367:ecf1ebac70d8
[xemacs-hg @ 2004-11-04 23:05:23 by ben]
commit mega-patch
configure.in: Turn off -Winline and -Wchar-subscripts.
Use the right set of cflags when compiling modules.
Rewrite ldap configuration to separate the inclusion of lber
(needed in recent Cygwin) from the basic checks for the
needed libraries.
add a function for MAKE_JUNK_C; initially code was added to
generate xemacs.def using this, but it will need to be rewritten.
add an rm -f for junk.c to avoid weird Cygwin bug with cp -f onto
an existing file.
Sort list of auto-detected functions and eliminate unused checks for
stpcpy, setlocale and getwd.
Add autodetection of Cygwin scanf problems
BETA: Rewrite section on configure to indicate what flags are important
and what not.
digest-doc.c, make-dump-id.c, profile.c, sorted-doc.c: Add proper decls for main().
make-msgfile.c: Document that this is old junk.
Move proposal to text.c.
make-msgfile.lex: Move proposal to text.c.
make-mswin-unicode.pl: Convert error-generating code so that the entire message will
be seen as a single unrecognized token.
mule/mule-ccl.el: Update docs.
lispref/mule.texi: Update CCL docs.
ldap/eldap.c: Mule-ize.
Use EXTERNAL_LIST_LOOP_2 instead of deleted EXTERNAL_LIST_LOOP.
* XEmacs 21.5.18 "chestnut" is released.
---------------------------------------------------------------
MULE-RELATED WORK:
---------------------------------------------------------------
---------------------------
byte-char conversion
---------------------------
buffer.c, buffer.h, insdel.c, text.c: Port FSF algorithm for byte-char conversion, replacing broken
previous version. Track the char position of the gap. Add
functions to do char-byte conversion downwards as well as upwards.
Move comments about algorithm workings to internals manual.
---------------------------
work on types
---------------------------
alloc.c, console-x-impl.h, dump-data.c, dump-data.h, dumper.c, dialog-msw.c, dired-msw.c, doc.c, editfns.c, esd.c, event-gtk.h, event-msw.c, events.c, file-coding.c, file-coding.h, fns.c, glyphs-eimage.c, glyphs-gtk.c, glyphs-msw.c, glyphs-shared.c, glyphs-x.c, glyphs.c, glyphs.h, gui.c, hpplay.c, imgproc.c, intl-win32.c, lrecord.h, lstream.c, keymap.c, lisp.h, libsst.c, linuxplay.c, miscplay.c, miscplay.h, mule-coding.c, nas.c, nt.c, ntheap.c, ntplay.c, objects-msw.c, objects-tty.c, objects-x.c, print.c, process-nt.c, process.c, redisplay.h, select-common.h, select-gtk.c, select-x.c, sgiplay.c, sound.c, sound.h, sunplay.c, sysfile.h, sysdep.c, syswindows.h, text.c, unexnt.c, win32.c, xgccache.c: Further work on types. This creates a full set of types for all
the basic semantics of `char' that I have so far identified, so that
its semantics can always be identified for the purposes of proper
Mule-safe code, and the raw use of `char' always avoided.
(1) More type renaming, for consistency of naming.
Char_ASCII -> Ascbyte
UChar_ASCII -> UAscbyte
Char_Binary -> CBinbyte
UChar_Binary -> Binbyte
SChar_Binary -> SBinbyte
(2) Introduce Rawbyte, CRawbyte, Boolbyte, Chbyte, UChbyte, and
Bitbyte and use them.
(3) New types Itext, Wexttext and Textcount for separating out
the concepts of bytes and textual units (different under UTF-16
and UTF-32, which are potential internal encodings).
(4) qxestr*_c -> qxestr*_ascii.
lisp.h: New; goes with other qxe() functions. #### Maybe goes in a
different section.
lisp.h: Group generic int-type defs together with EMACS_INT defs.
lisp.h: * lisp.h (WEXTTEXT_IS_WIDE)
New defns.
lisp.h: New type to replace places where int occurs as a boolean.
It's signed because occasionally people may want to use -1 as
an error value, and because unsigned ints are viral -- see comments
in the internals manual against using them.
dynarr.c: int -> Bytecount.
---------------------------
Mule-izing
---------------------------
device-x.c: Partially Mule-ize.
dumper.c, dumper.h: Mule-ize. Use Rawbyte. Use stderr_out not printf. Use wext_*().
sysdep.c, syswindows.h, text.c: New Wexttext API for manipulation of external text that may be
Unicode (e.g. startup code under Windows).
emacs.c: Mule-ize. Properly deal with argv in external encoding.
Use wext_*() and Wexttext. Use Rawbyte.
#if 0 some old junk on SCO that is unlikely to be correct.
Rewrite allocation code in run-temacs.
emacs.c, symsinit.h, win32.c: Rename win32 init function and call it even earlier, to
initialize mswindows_9x_p even earlier, for use in startup code
(XEUNICODE_P).
process.c: Use _wenviron not environ under Windows, to get Unicode environment
variables.
event-Xt.c: Mule-ize drag-n-drop related stuff.
dragdrop.c, dragdrop.h, frame-x.c: Mule-ize.
text.h: Add some more stand-in defines for particular kinds of conversion;
use in Mule-ization work in frame-x.c etc.
---------------------------
Freshening
---------------------------
intl-auto-encap-win32.c, intl-auto-encap-win32.h: Regenerate.
---------------------------
Unicode-work
---------------------------
intl-win32.c, syswindows.h: Factor out common options to MultiByteToWideChar and
WideCharToMultiByte. Add convert_unicode_to_multibyte_malloc()
and convert_unicode_to_multibyte_dynarr() and use. Add stuff for
alloca() conversion of multibyte/unicode.
alloc.c: Use dfc_external_data_len() in case of unicode coding system.
alloc.c, mule-charset.c: Don't zero out and reinit charset Unicode tables. This fucks up
dump-time loading. Anyway, either we load them at dump time or
run time, never both.
unicode.c: Dump the blank tables as well.
---------------------------------------------------------------
DOCUMENTATION, MOSTLY MULE-RELATED:
---------------------------------------------------------------
EmacsFrame.c, emodules.c, event-Xt.c, fileio.c, input-method-xlib.c, mule-wnnfns.c, redisplay-gtk.c, redisplay-tty.c, redisplay-x.c, regex.c, sysdep.c: Add comment about Mule work needed.
text.h: Add more documentation describing why DFC routines were not written
to return their value. Add some other DFC documentation.
console-msw.c, console-msw.h: Add pointer to docs in win32.c.
emacs.c: Add comments on sources of doc info.
text.c, charset.h, unicode.c, intl-win32.c, intl-encap-win32.c, text.h, file-coding.c, mule-coding.c: Collect background comments and related to text matters and
internationalization, and proposals for work to be done, in text.c
or Internals manual, stuff related to specific textual API's in
text.h, and stuff related to internal implementation of Unicode
conversion in unicode.c. Put lots of pointers to the comments to
make them easier to find.
s/mingw32.h, s/win32-common.h, s/win32-native.h, s/windowsnt.h, win32.c: Add bunches of new documentation on the different kinds of
builds and environments under Windows and how they work.
Collect this info in win32.c. Add pointers to these docs in
the relevant s/* files.
emacs.c: Document places with long comments.
Remove comment about exiting, move to internals manual, put
in pointer.
event-stream.c: Move docs about event queues and focus to internals manual, put
in pointer.
events.h: Move docs about event stream callbacks to internals manual, put
in pointer.
profile.c, redisplay.c, signal.c: Move documentation to the Internals manual.
process-nt.c: Add pointer to comment in win32-native.el.
lisp.h: Add comments about some comment conventions.
lisp.h: Add comment about the second argument.
device-msw.c, redisplay-msw.c: @@#### comments are out-of-date.
---------------------------------------------------------------
PDUMP WORK (MOTIVATED BY UNICODE CHANGES)
---------------------------------------------------------------
alloc.c, buffer.c, bytecode.c, console-impl.h, console.c, device.c, dumper.c, lrecord.h, elhash.c, emodules.h, events.c, extents.c, frame.c, glyphs.c, glyphs.h, mule-charset.c, mule-coding.c, objects.c, profile.c, rangetab.c, redisplay.c, specifier.c, specifier.h, window.c, lstream.c, file-coding.h, file-coding.c: PDUMP:
Properly implement dump_add_root_block(), which never worked before,
and is necessary for dumping Unicode tables.
Pdump name changes for accuracy:
XD_STRUCT_PTR -> XD_BLOCK_PTR.
XD_STRUCT_ARRAY -> XD_BLOCK_ARRAY.
XD_C_STRING -> XD_ASCII_STRING.
*_structure_* -> *_block_*.
lrecord.h: some comments added about
dump_add_root_block() vs dump_add_root_block_ptr().
extents.c: remove incorrect comment about pdump problems with gap array.
---------------------------------------------------------------
ALLOCATION
---------------------------------------------------------------
abbrev.c, alloc.c, bytecode.c, casefiddle.c, device-msw.c, device-x.c, dired-msw.c, doc.c, doprnt.c, dragdrop.c, editfns.c, emodules.c, file-coding.c, fileio.c, filelock.c, fns.c, glyphs-eimage.c, glyphs-gtk.c, glyphs-msw.c, glyphs-x.c, gui-msw.c, gui-x.c, imgproc.c, intl-win32.c, lread.c, menubar-gtk.c, menubar.c, nt.c, objects-msw.c, objects-x.c, print.c, process-nt.c, process-unix.c, process.c, realpath.c, redisplay.c, search.c, select-common.c, symbols.c, sysdep.c, syswindows.h, text.c, text.h, ui-byhand.c: New macros {alloca,xnew}_{itext,{i,ext,raw,bin,asc}bytes} for
more convenient allocation of these commonly requested items.
Modify functions to use alloca_ibytes, alloca_array, alloca_extbytes,
xnew_ibytes, etc. also XREALLOC_ARRAY, xnew.
alloc.c: Rewrite the allocation functions to factor out repeated code.
Add assertions for freeing dumped data.
lisp.h: Moved down and consolidated with other allocation stuff.
lisp.h, dynarr.c: New functions for allocation that's very efficient when mostly in
LIFO order.
lisp.h, text.c, text.h: Factor out some stuff for general use by alloca()-conversion funs.
text.h, lisp.h: Fill out convenience routines for allocating various kinds of
bytes and put them in lisp.h. Use them in place of xmalloc(),
ALLOCA().
text.h: Fill out the convenience functions so the _MALLOC() kinds match
the alloca() kinds.
---------------------------------------------------------------
ERROR-CHECKING
---------------------------------------------------------------
text.h: Create ASSERT_ASCTEXT_ASCII() and ASSERT_ASCTEXT_ASCII_LEN()
from similar Eistring checkers and change the Eistring checkers to
use them instead.
---------------------------------------------------------------
MACROS IN LISP.H
---------------------------------------------------------------
lisp.h: Redo GCPRO declarations. Create a "base" set of functions that can
be used to generate any kind of gcpro sets -- regular, ngcpro,
nngcpro, private ones used in GC_EXTERNAL_LIST_LOOP_2.
buffer.c, callint.c, chartab.c, console-msw.c, device-x.c, dialog-msw.c, dired.c, extents.c, ui-gtk.c, rangetab.c, nt.c, mule-coding.c, minibuf.c, menubar-msw.c, menubar.c, menubar-gtk.c, lread.c, lisp.h, gutter.c, glyphs.c, glyphs-widget.c, fns.c, fileio.c, file-coding.c, specifier.c: Eliminate EXTERNAL_LIST_LOOP, which does not check for circularities.
Use EXTERNAL_LIST_LOOP_2 instead or EXTERNAL_LIST_LOOP_3
or EXTERNAL_PROPERTY_LIST_LOOP_3 or GC_EXTERNAL_LIST_LOOP_2
(new macro). Removed/redid comments on EXTERNAL_LIST_LOOP.
---------------------------------------------------------------
SPACING FIXES
---------------------------------------------------------------
callint.c, hftctl.c, number-gmp.c, process-unix.c: Spacing fixes.
---------------------------------------------------------------
FIX FOR GEOMETRY PROBLEM IN FIRST FRAME
---------------------------------------------------------------
unicode.c: Add workaround for newlib bug in sscanf() [should be fixed by
release 1.5.12 of Cygwin].
toolbar.c: bug fix for problem of initial frame being 77 chars wide on Windows.
will be overridden by my other ws.
---------------------------------------------------------------
FIX FOR LEAKING PROCESS HANDLES:
---------------------------------------------------------------
process-nt.c: Fixes for leaking handles. Inspired by work done by Adrian Aichner
<adrian@xemacs.org>.
---------------------------------------------------------------
FIX FOR CYGWIN BUG (Unicode-related):
---------------------------------------------------------------
unicode.c: Add workaround for newlib bug in sscanf() [should be fixed by
release 1.5.12 of Cygwin].
---------------------------------------------------------------
WARNING FIXES:
---------------------------------------------------------------
console-stream.c: `reinit' is unused.
compiler.h, event-msw.c, frame-msw.c, intl-encap-win32.c, text.h: Add stuff to deal with ANSI-aliasing warnings I got.
regex.c: Gather includes together to avoid warning.
---------------------------------------------------------------
CHANGES TO INITIALIZATION ROUTINES:
---------------------------------------------------------------
buffer.c, emacs.c, console.c, debug.c, device-x.c, device.c, dragdrop.c, emodules.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, event-tty.c, events.c, extents.c, faces.c, file-coding.c, fileio.c, font-lock.c, frame-msw.c, glyphs-widget.c, glyphs.c, gui-x.c, insdel.c, lread.c, lstream.c, menubar-gtk.c, menubar-x.c, minibuf.c, mule-wnnfns.c, objects-msw.c, objects.c, print.c, scrollbar-x.c, search.c, select-x.c, text.c, undo.c, unicode.c, window.c, symsinit.h: Call reinit_*() functions directly from emacs.c, for clarity.
Factor out some redundant init code. Move disallowed stuff
that had crept into vars_of_glyphs() into complex_vars_of_glyphs().
Call init_eval_semi_early() from eval.c not in the middle of
vars_of_() in emacs.c since there should be no order dependency
in the latter calls.
---------------------------------------------------------------
ARMAGEDDON:
---------------------------------------------------------------
alloc.c, emacs.c, lisp.h, print.c: Rename inhibit_non_essential_printing_operations to
inhibit_non_essential_conversion_operations.
text.c: Assert on !inhibit_non_essential_conversion_operations.
console-msw.c, print.c: Don't do conversion in SetConsoleTitle or FindWindow to avoid
problems during armageddon. Put #errors for NON_ASCII_INTERNAL_FORMAT
in places where problems would arise.
---------------------------------------------------------------
CHANGES TO THE BUILD PROCEDURE:
---------------------------------------------------------------
config.h.in, s/cxux.h, s/usg5-4-2.h, m/powerpc.h: Add comment about correct ordering of this file.
Rearrange everything to follow this -- put all #undefs together
and before the s&m files. Add undefs for HAVE_ALLOCA, C_ALLOCA,
BROKEN_ALLOCA_IN_FUNCTION_CALLS, STACK_DIRECTION. Remove unused
HAVE_STPCPY, HAVE_GETWD, HAVE_SETLOCALE.
m/gec63.h: Deleted; totally broken, not used at all, not in FSF.
m/7300.h, m/acorn.h, m/alliant-2800.h, m/alliant.h, m/altos.h, m/amdahl.h, m/apollo.h, m/att3b.h, m/aviion.h, m/celerity.h, m/clipper.h, m/cnvrgnt.h, m/convex.h, m/cydra5.h, m/delta.h, m/delta88k.h, m/dpx2.h, m/elxsi.h, m/ews4800r.h, m/gould.h, m/hp300bsd.h, m/hp800.h, m/hp9000s300.h, m/i860.h, m/ibmps2-aix.h, m/ibmrs6000.h, m/ibmrt-aix.h, m/ibmrt.h, m/intel386.h, m/iris4d.h, m/iris5d.h, m/iris6d.h, m/irist.h, m/isi-ov.h, m/luna88k.h, m/m68k.h, m/masscomp.h, m/mg1.h, m/mips-nec.h, m/mips-siemens.h, m/mips.h, m/news.h, m/nh3000.h, m/nh4000.h, m/ns32000.h, m/orion105.h, m/pfa50.h, m/plexus.h, m/pmax.h, m/powerpc.h, m/pyrmips.h, m/sequent-ptx.h, m/sequent.h, m/sgi-challenge.h, m/symmetry.h, m/tad68k.h, m/tahoe.h, m/targon31.h, m/tekxd88.h, m/template.h, m/tower32.h, m/tower32v3.h, m/ustation.h, m/vax.h, m/wicat.h, m/xps100.h: Delete C_ALLOCA, HAVE_ALLOCA, STACK_DIRECTION,
BROKEN_ALLOCA_IN_FUNCTION_CALLS. All of this is auto-detected.
When in doubt, I followed recent FSF sources, which also have
these things deleted.
author | ben |
---|---|
date | Thu, 04 Nov 2004 23:08:28 +0000 |
parents | fba0799e2d79 |
children | 3d8143fc88e1 |
line wrap: on
line diff
--- a/src/intl-auto-encap-win32.c Thu Nov 04 22:51:31 2004 +0000 +++ b/src/intl-auto-encap-win32.c Thu Nov 04 23:08:28 2004 +0000 @@ -13,60 +13,281 @@ /*----------------------------------------------------------------------*/ -/* Processing file WINNLS.H */ +/* Processing file WINCON.H */ /*----------------------------------------------------------------------*/ -/* Error if GetCPInfoEx used: not used, not examined yet */ - -/* Error if CompareString used: not used, not examined yet */ - -/* Error if LCMapString used: not used, not examined yet */ - -int -qxeGetLocaleInfo (LCID Locale, LCTYPE LCType, Extbyte * lpLCData, int cchData) -{ - if (XEUNICODE_P) - return GetLocaleInfoW (Locale, LCType, (LPWSTR) lpLCData, cchData); - else - return GetLocaleInfoA (Locale, LCType, (LPSTR) lpLCData, cchData); +BOOL +qxePeekConsoleInput (HANDLE hConsoleInput, PINPUT_RECORD lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsRead) +{ + if (XEUNICODE_P) + return PeekConsoleInputW (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsRead); + else + return PeekConsoleInputA (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsRead); +} + +BOOL +qxeReadConsoleInput (HANDLE hConsoleInput, PINPUT_RECORD lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsRead) +{ + if (XEUNICODE_P) + return ReadConsoleInputW (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsRead); + else + return ReadConsoleInputA (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsRead); +} + +BOOL +qxeWriteConsoleInput (HANDLE hConsoleInput, CONST INPUT_RECORD * lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsWritten) +{ + if (XEUNICODE_P) + return WriteConsoleInputW (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsWritten); + else + return WriteConsoleInputA (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsWritten); +} + +BOOL +qxeReadConsoleOutput (HANDLE hConsoleOutput, PCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, PSMALL_RECT lpReadRegion) +{ + if (XEUNICODE_P) + return ReadConsoleOutputW (hConsoleOutput, lpBuffer, dwBufferSize, dwBufferCoord, lpReadRegion); + else + return ReadConsoleOutputA (hConsoleOutput, lpBuffer, dwBufferSize, dwBufferCoord, lpReadRegion); +} + +BOOL +qxeWriteConsoleOutput (HANDLE hConsoleOutput, CONST CHAR_INFO * lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, PSMALL_RECT lpWriteRegion) +{ + if (XEUNICODE_P) + return WriteConsoleOutputW (hConsoleOutput, lpBuffer, dwBufferSize, dwBufferCoord, lpWriteRegion); + else + return WriteConsoleOutputA (hConsoleOutput, lpBuffer, dwBufferSize, dwBufferCoord, lpWriteRegion); +} + +BOOL +qxeReadConsoleOutputCharacter (HANDLE hConsoleOutput, Extbyte * lpCharacter, DWORD nLength, COORD dwReadCoord, LPDWORD lpNumberOfCharsRead) +{ + if (XEUNICODE_P) + return ReadConsoleOutputCharacterW (hConsoleOutput, (LPWSTR) lpCharacter, nLength, dwReadCoord, lpNumberOfCharsRead); + else + return ReadConsoleOutputCharacterA (hConsoleOutput, (LPSTR) lpCharacter, nLength, dwReadCoord, lpNumberOfCharsRead); +} + +BOOL +qxeWriteConsoleOutputCharacter (HANDLE hConsoleOutput, const Extbyte * lpCharacter, DWORD nLength, COORD dwWriteCoord, LPDWORD lpNumberOfCharsWritten) +{ + if (XEUNICODE_P) + return WriteConsoleOutputCharacterW (hConsoleOutput, (LPCWSTR) lpCharacter, nLength, dwWriteCoord, lpNumberOfCharsWritten); + else + return WriteConsoleOutputCharacterA (hConsoleOutput, (LPCSTR) lpCharacter, nLength, dwWriteCoord, lpNumberOfCharsWritten); +} + +/* Error if FillConsoleOutputCharacter used: split CHAR */ + +BOOL +qxeScrollConsoleScreenBuffer (HANDLE hConsoleOutput, CONST SMALL_RECT * lpScrollRectangle, CONST SMALL_RECT * lpClipRectangle, COORD dwDestinationOrigin, CONST CHAR_INFO * lpFill) +{ + if (XEUNICODE_P) + return ScrollConsoleScreenBufferW (hConsoleOutput, lpScrollRectangle, lpClipRectangle, dwDestinationOrigin, lpFill); + else + return ScrollConsoleScreenBufferA (hConsoleOutput, lpScrollRectangle, lpClipRectangle, dwDestinationOrigin, lpFill); +} + +DWORD +qxeGetConsoleTitle (Extbyte * lpConsoleTitle, DWORD nSize) +{ + if (XEUNICODE_P) + return GetConsoleTitleW ((LPWSTR) lpConsoleTitle, nSize); + else + return GetConsoleTitleA ((LPSTR) lpConsoleTitle, nSize); +} + +BOOL +qxeSetConsoleTitle (const Extbyte * lpConsoleTitle) +{ + if (XEUNICODE_P) + return SetConsoleTitleW ((LPCWSTR) lpConsoleTitle); + else + return SetConsoleTitleA ((LPCSTR) lpConsoleTitle); +} + +BOOL +qxeReadConsole (HANDLE hConsoleInput, LPVOID lpBuffer, DWORD nNumberOfCharsToRead, LPDWORD lpNumberOfCharsRead, LPVOID lpReserved) +{ + if (XEUNICODE_P) + return ReadConsoleW (hConsoleInput, lpBuffer, nNumberOfCharsToRead, lpNumberOfCharsRead, lpReserved); + else + return ReadConsoleA (hConsoleInput, lpBuffer, nNumberOfCharsToRead, lpNumberOfCharsRead, lpReserved); } BOOL -qxeSetLocaleInfo (LCID Locale, LCTYPE LCType, const Extbyte * lpLCData) -{ - if (XEUNICODE_P) - return SetLocaleInfoW (Locale, LCType, (LPCWSTR) lpLCData); - else - return SetLocaleInfoA (Locale, LCType, (LPCSTR) lpLCData); -} - -/* Error if GetTimeFormat used: not used, not examined yet */ - -/* Error if GetDateFormat used: not used, not examined yet */ - -/* Error if GetNumberFormat used: not used, not examined yet */ - -/* Error if GetCurrencyFormat used: not used, not examined yet */ - -/* Error if EnumCalendarInfo used: not used, not examined yet */ - -/* Error if EnumCalendarInfoEx used: not used, not examined yet */ - -/* Error if EnumTimeFormats used: not used, not examined yet */ - -/* Error if EnumDateFormats used: not used, not examined yet */ - -/* Error if EnumDateFormatsEx used: not used, not examined yet */ - -/* Error if GetStringTypeEx used: not used, not examined yet */ - -/* Error if GetStringType used: no such fun; A and W versions have different nos. of args */ - -/* Error if FoldString used: not used, not examined yet */ - -/* Error if EnumSystemLocales used: not used, not examined yet */ - -/* Error if EnumSystemCodePages used: not used, not examined yet */ +qxeWriteConsole (HANDLE hConsoleOutput, CONST VOID * lpBuffer, DWORD nNumberOfCharsToWrite, LPDWORD lpNumberOfCharsWritten, LPVOID lpReserved) +{ + if (XEUNICODE_P) + return WriteConsoleW (hConsoleOutput, lpBuffer, nNumberOfCharsToWrite, lpNumberOfCharsWritten, lpReserved); + else + return WriteConsoleA (hConsoleOutput, lpBuffer, nNumberOfCharsToWrite, lpNumberOfCharsWritten, lpReserved); +} + + +/*----------------------------------------------------------------------*/ +/* Processing file SHELLAPI.H */ +/*----------------------------------------------------------------------*/ + +UINT +qxeDragQueryFile (HDROP arg1, UINT arg2, Extbyte * arg3, UINT arg4) +{ + if (XEUNICODE_P) + return DragQueryFileW (arg1, arg2, (LPWSTR) arg3, arg4); + else + return DragQueryFileA (arg1, arg2, (LPSTR) arg3, arg4); +} + +HINSTANCE +qxeShellExecute (HWND hwnd, const Extbyte * lpOperation, const Extbyte * lpFile, const Extbyte * lpParameters, const Extbyte * lpDirectory, INT nShowCmd) +{ + if (XEUNICODE_P) + return ShellExecuteW (hwnd, (LPCWSTR) lpOperation, (LPCWSTR) lpFile, (LPCWSTR) lpParameters, (LPCWSTR) lpDirectory, nShowCmd); + else + return ShellExecuteA (hwnd, (LPCSTR) lpOperation, (LPCSTR) lpFile, (LPCSTR) lpParameters, (LPCSTR) lpDirectory, nShowCmd); +} + +HINSTANCE +qxeFindExecutable (const Extbyte * lpFile, const Extbyte * lpDirectory, Extbyte * lpResult) +{ + if (XEUNICODE_P) + return FindExecutableW ((LPCWSTR) lpFile, (LPCWSTR) lpDirectory, (LPWSTR) lpResult); + else + return FindExecutableA ((LPCSTR) lpFile, (LPCSTR) lpDirectory, (LPSTR) lpResult); +} + +/* Error if CommandLineToArgv used: Unicode-only */ + +INT +qxeShellAbout (HWND hWnd, const Extbyte * szApp, const Extbyte * szOtherStuff, HICON hIcon) +{ + if (XEUNICODE_P) + return ShellAboutW (hWnd, (LPCWSTR) szApp, (LPCWSTR) szOtherStuff, hIcon); + else + return ShellAboutA (hWnd, (LPCSTR) szApp, (LPCSTR) szOtherStuff, hIcon); +} + +HICON +qxeExtractAssociatedIcon (HINSTANCE hInst, Extbyte * lpIconPath, LPWORD lpiIcon) +{ + if (XEUNICODE_P) + return ExtractAssociatedIconW (hInst, (LPWSTR) lpIconPath, lpiIcon); + else + return ExtractAssociatedIconA (hInst, (LPSTR) lpIconPath, lpiIcon); +} + +HICON +qxeExtractIcon (HINSTANCE hInst, const Extbyte * lpszExeFileName, UINT nIconIndex) +{ + if (XEUNICODE_P) + return ExtractIconW (hInst, (LPCWSTR) lpszExeFileName, nIconIndex); + else + return ExtractIconA (hInst, (LPCSTR) lpszExeFileName, nIconIndex); +} + +#if !defined (CYGWIN_HEADERS) + +/* NOTE: NT 4.0+ only */ +DWORD +qxeDoEnvironmentSubst (Extbyte * szString, UINT cbString) +{ + if (XEUNICODE_P) + return DoEnvironmentSubstW ((LPWSTR) szString, cbString); + else + return DoEnvironmentSubstA ((LPSTR) szString, cbString); +} + +#endif /* !defined (CYGWIN_HEADERS) */ + +/* Error if FindEnvironmentString used: causes link error; NT 4.0+ only */ + +/* Skipping ExtractIconEx because NT 4.0+ only, error in Cygwin prototype */ + +/* NOTE: NT 4.0+ only */ +int +qxeSHFileOperation (LPSHFILEOPSTRUCTW lpFileOp) +{ + if (XEUNICODE_P) + return SHFileOperationW (lpFileOp); + else + return SHFileOperationA ((LPSHFILEOPSTRUCTA) lpFileOp); +} + +/* NOTE: NT 4.0+ only */ +BOOL +qxeShellExecuteEx (LPSHELLEXECUTEINFOW lpExecInfo) +{ + if (XEUNICODE_P) + return ShellExecuteExW (lpExecInfo); + else + return ShellExecuteExA ((LPSHELLEXECUTEINFOA) lpExecInfo); +} + +/* Error if WinExecError used: causes link error; NT 4.0+ only */ + +#if !defined (CYGWIN_HEADERS) + +/* NOTE: NT 4.0+ only */ +HRESULT +qxeSHQueryRecycleBin (const Extbyte * pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo) +{ + if (XEUNICODE_P) + return SHQueryRecycleBinW ((LPCWSTR) pszRootPath, pSHQueryRBInfo); + else + return SHQueryRecycleBinA ((LPCSTR) pszRootPath, pSHQueryRBInfo); +} + +#endif /* !defined (CYGWIN_HEADERS) */ + +#if !defined (CYGWIN_HEADERS) + +/* NOTE: NT 4.0+ only */ +HRESULT +qxeSHEmptyRecycleBin (HWND hwnd, const Extbyte * pszRootPath, DWORD dwFlags) +{ + if (XEUNICODE_P) + return SHEmptyRecycleBinW (hwnd, (LPCWSTR) pszRootPath, dwFlags); + else + return SHEmptyRecycleBinA (hwnd, (LPCSTR) pszRootPath, dwFlags); +} + +#endif /* !defined (CYGWIN_HEADERS) */ + +/* Error if Shell_NotifyIcon used: split-sized NOTIFYICONDATA, NT 4.0+ only */ + +/* Skipping SHGetFileInfo because split-sized SHFILEINFO, NT 4.0+ only */ + +/* Error if SHGetDiskFreeSpace used: causes link error; NT 4.0+ only */ + +#if !defined (CYGWIN_HEADERS) + +/* NOTE: NT 4.0+ only */ +BOOL +qxeSHGetNewLinkInfo (const Extbyte * pszLinkTo, const Extbyte * pszDir, Extbyte * pszName, BOOL * pfMustCopy, UINT uFlags) +{ + if (XEUNICODE_P) + return SHGetNewLinkInfoW ((LPCWSTR) pszLinkTo, (LPCWSTR) pszDir, (LPWSTR) pszName, pfMustCopy, uFlags); + else + return SHGetNewLinkInfoA ((LPCSTR) pszLinkTo, (LPCSTR) pszDir, (LPSTR) pszName, pfMustCopy, uFlags); +} + +#endif /* !defined (CYGWIN_HEADERS) */ + +#if !defined (CYGWIN_HEADERS) + +/* NOTE: NT 4.0+ only */ +BOOL +qxeSHInvokePrinterCommand (HWND hwnd, UINT uAction, const Extbyte * lpBuf1, const Extbyte * lpBuf2, BOOL fModal) +{ + if (XEUNICODE_P) + return SHInvokePrinterCommandW (hwnd, uAction, (LPCWSTR) lpBuf1, (LPCWSTR) lpBuf2, fModal); + else + return SHInvokePrinterCommandA (hwnd, uAction, (LPCSTR) lpBuf1, (LPCSTR) lpBuf2, fModal); +} + +#endif /* !defined (CYGWIN_HEADERS) */ /*----------------------------------------------------------------------*/ @@ -664,762 +885,6 @@ /*----------------------------------------------------------------------*/ -/* Processing file WINREG.H */ -/*----------------------------------------------------------------------*/ - -/* Skipping RegConnectRegistry because error in Cygwin prototype */ - -LONG - -qxeRegCreateKey (HKEY hKey, const Extbyte * lpSubKey, PHKEY phkResult) -{ - if (XEUNICODE_P) - return RegCreateKeyW (hKey, (LPCWSTR) lpSubKey, phkResult); - else - return RegCreateKeyA (hKey, (LPCSTR) lpSubKey, phkResult); -} - -LONG - -qxeRegCreateKeyEx (HKEY hKey, const Extbyte * lpSubKey, DWORD Reserved, Extbyte * lpClass, DWORD dwOptions, REGSAM samDesired, LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, LPDWORD lpdwDisposition) -{ - if (XEUNICODE_P) - return RegCreateKeyExW (hKey, (LPCWSTR) lpSubKey, Reserved, (LPWSTR) lpClass, dwOptions, samDesired, lpSecurityAttributes, phkResult, lpdwDisposition); - else - return RegCreateKeyExA (hKey, (LPCSTR) lpSubKey, Reserved, (LPSTR) lpClass, dwOptions, samDesired, lpSecurityAttributes, phkResult, lpdwDisposition); -} - -LONG - -qxeRegDeleteKey (HKEY hKey, const Extbyte * lpSubKey) -{ - if (XEUNICODE_P) - return RegDeleteKeyW (hKey, (LPCWSTR) lpSubKey); - else - return RegDeleteKeyA (hKey, (LPCSTR) lpSubKey); -} - -LONG - -qxeRegDeleteValue (HKEY hKey, const Extbyte * lpValueName) -{ - if (XEUNICODE_P) - return RegDeleteValueW (hKey, (LPCWSTR) lpValueName); - else - return RegDeleteValueA (hKey, (LPCSTR) lpValueName); -} - -LONG - -qxeRegEnumKey (HKEY hKey, DWORD dwIndex, Extbyte * lpName, DWORD cbName) -{ - if (XEUNICODE_P) - return RegEnumKeyW (hKey, dwIndex, (LPWSTR) lpName, cbName); - else - return RegEnumKeyA (hKey, dwIndex, (LPSTR) lpName, cbName); -} - -LONG - -qxeRegEnumKeyEx (HKEY hKey, DWORD dwIndex, Extbyte * lpName, LPDWORD lpcbName, LPDWORD lpReserved, Extbyte * lpClass, LPDWORD lpcbClass, PFILETIME lpftLastWriteTime) -{ - if (XEUNICODE_P) - return RegEnumKeyExW (hKey, dwIndex, (LPWSTR) lpName, lpcbName, lpReserved, (LPWSTR) lpClass, lpcbClass, lpftLastWriteTime); - else - return RegEnumKeyExA (hKey, dwIndex, (LPSTR) lpName, lpcbName, lpReserved, (LPSTR) lpClass, lpcbClass, lpftLastWriteTime); -} - -LONG - -qxeRegEnumValue (HKEY hKey, DWORD dwIndex, Extbyte * lpValueName, LPDWORD lpcbValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData) -{ - if (XEUNICODE_P) - return RegEnumValueW (hKey, dwIndex, (LPWSTR) lpValueName, lpcbValueName, lpReserved, lpType, lpData, lpcbData); - else - return RegEnumValueA (hKey, dwIndex, (LPSTR) lpValueName, lpcbValueName, lpReserved, lpType, lpData, lpcbData); -} - -LONG - -qxeRegLoadKey (HKEY hKey, const Extbyte * lpSubKey, const Extbyte * lpFile) -{ - if (XEUNICODE_P) - return RegLoadKeyW (hKey, (LPCWSTR) lpSubKey, (LPCWSTR) lpFile); - else - return RegLoadKeyA (hKey, (LPCSTR) lpSubKey, (LPCSTR) lpFile); -} - -LONG - -qxeRegOpenKey (HKEY hKey, const Extbyte * lpSubKey, PHKEY phkResult) -{ - if (XEUNICODE_P) - return RegOpenKeyW (hKey, (LPCWSTR) lpSubKey, phkResult); - else - return RegOpenKeyA (hKey, (LPCSTR) lpSubKey, phkResult); -} - -LONG - -qxeRegOpenKeyEx (HKEY hKey, const Extbyte * lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult) -{ - if (XEUNICODE_P) - return RegOpenKeyExW (hKey, (LPCWSTR) lpSubKey, ulOptions, samDesired, phkResult); - else - return RegOpenKeyExA (hKey, (LPCSTR) lpSubKey, ulOptions, samDesired, phkResult); -} - -LONG - -qxeRegQueryInfoKey (HKEY hKey, Extbyte * lpClass, LPDWORD lpcbClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcbMaxSubKeyLen, LPDWORD lpcbMaxClassLen, LPDWORD lpcValues, LPDWORD lpcbMaxValueNameLen, LPDWORD lpcbMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime) -{ - if (XEUNICODE_P) - return RegQueryInfoKeyW (hKey, (LPWSTR) lpClass, lpcbClass, lpReserved, lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen, lpcbMaxValueLen, lpcbSecurityDescriptor, lpftLastWriteTime); - else - return RegQueryInfoKeyA (hKey, (LPSTR) lpClass, lpcbClass, lpReserved, lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen, lpcbMaxValueLen, lpcbSecurityDescriptor, lpftLastWriteTime); -} - -LONG - -qxeRegQueryValue (HKEY hKey, const Extbyte * lpSubKey, Extbyte * lpValue, PLONG lpcbValue) -{ - if (XEUNICODE_P) - return RegQueryValueW (hKey, (LPCWSTR) lpSubKey, (LPWSTR) lpValue, lpcbValue); - else - return RegQueryValueA (hKey, (LPCSTR) lpSubKey, (LPSTR) lpValue, lpcbValue); -} - -LONG - -qxeRegQueryMultipleValues (HKEY hKey, PVALENTW val_list, DWORD num_vals, Extbyte * lpValueBuf, LPDWORD ldwTotsize) -{ - if (XEUNICODE_P) - return RegQueryMultipleValuesW (hKey, val_list, num_vals, (LPWSTR) lpValueBuf, ldwTotsize); - else - return RegQueryMultipleValuesA (hKey, (PVALENTA) val_list, num_vals, (LPSTR) lpValueBuf, ldwTotsize); -} - -LONG - -qxeRegQueryValueEx (HKEY hKey, const Extbyte * lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData) -{ - if (XEUNICODE_P) - return RegQueryValueExW (hKey, (LPCWSTR) lpValueName, lpReserved, lpType, lpData, lpcbData); - else - return RegQueryValueExA (hKey, (LPCSTR) lpValueName, lpReserved, lpType, lpData, lpcbData); -} - -LONG - -qxeRegReplaceKey (HKEY hKey, const Extbyte * lpSubKey, const Extbyte * lpNewFile, const Extbyte * lpOldFile) -{ - if (XEUNICODE_P) - return RegReplaceKeyW (hKey, (LPCWSTR) lpSubKey, (LPCWSTR) lpNewFile, (LPCWSTR) lpOldFile); - else - return RegReplaceKeyA (hKey, (LPCSTR) lpSubKey, (LPCSTR) lpNewFile, (LPCSTR) lpOldFile); -} - -LONG - -qxeRegRestoreKey (HKEY hKey, const Extbyte * lpFile, DWORD dwFlags) -{ - if (XEUNICODE_P) - return RegRestoreKeyW (hKey, (LPCWSTR) lpFile, dwFlags); - else - return RegRestoreKeyA (hKey, (LPCSTR) lpFile, dwFlags); -} - -LONG - -qxeRegSaveKey (HKEY hKey, const Extbyte * lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes) -{ - if (XEUNICODE_P) - return RegSaveKeyW (hKey, (LPCWSTR) lpFile, lpSecurityAttributes); - else - return RegSaveKeyA (hKey, (LPCSTR) lpFile, lpSecurityAttributes); -} - -LONG - -qxeRegSetValue (HKEY hKey, const Extbyte * lpSubKey, DWORD dwType, const Extbyte * lpData, DWORD cbData) -{ - if (XEUNICODE_P) - return RegSetValueW (hKey, (LPCWSTR) lpSubKey, dwType, (LPCWSTR) lpData, cbData); - else - return RegSetValueA (hKey, (LPCSTR) lpSubKey, dwType, (LPCSTR) lpData, cbData); -} - -LONG - -qxeRegSetValueEx (HKEY hKey, const Extbyte * lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE* lpData, DWORD cbData) -{ - if (XEUNICODE_P) - return RegSetValueExW (hKey, (LPCWSTR) lpValueName, Reserved, dwType, lpData, cbData); - else - return RegSetValueExA (hKey, (LPCSTR) lpValueName, Reserved, dwType, lpData, cbData); -} - -LONG - -qxeRegUnLoadKey (HKEY hKey, const Extbyte * lpSubKey) -{ - if (XEUNICODE_P) - return RegUnLoadKeyW (hKey, (LPCWSTR) lpSubKey); - else - return RegUnLoadKeyA (hKey, (LPCSTR) lpSubKey); -} - -BOOL - -qxeInitiateSystemShutdown (Extbyte * lpMachineName, Extbyte * lpMessage, DWORD dwTimeout, BOOL bForceAppsClosed, BOOL bRebootAfterShutdown) -{ - if (XEUNICODE_P) - return InitiateSystemShutdownW ((LPWSTR) lpMachineName, (LPWSTR) lpMessage, dwTimeout, bForceAppsClosed, bRebootAfterShutdown); - else - return InitiateSystemShutdownA ((LPSTR) lpMachineName, (LPSTR) lpMessage, dwTimeout, bForceAppsClosed, bRebootAfterShutdown); -} - -BOOL - -qxeAbortSystemShutdown (Extbyte * lpMachineName) -{ - if (XEUNICODE_P) - return AbortSystemShutdownW ((LPWSTR) lpMachineName); - else - return AbortSystemShutdownA ((LPSTR) lpMachineName); -} - - -/*----------------------------------------------------------------------*/ -/* Processing file SHELLAPI.H */ -/*----------------------------------------------------------------------*/ - -UINT -qxeDragQueryFile (HDROP arg1, UINT arg2, Extbyte * arg3, UINT arg4) -{ - if (XEUNICODE_P) - return DragQueryFileW (arg1, arg2, (LPWSTR) arg3, arg4); - else - return DragQueryFileA (arg1, arg2, (LPSTR) arg3, arg4); -} - -HINSTANCE -qxeShellExecute (HWND hwnd, const Extbyte * lpOperation, const Extbyte * lpFile, const Extbyte * lpParameters, const Extbyte * lpDirectory, INT nShowCmd) -{ - if (XEUNICODE_P) - return ShellExecuteW (hwnd, (LPCWSTR) lpOperation, (LPCWSTR) lpFile, (LPCWSTR) lpParameters, (LPCWSTR) lpDirectory, nShowCmd); - else - return ShellExecuteA (hwnd, (LPCSTR) lpOperation, (LPCSTR) lpFile, (LPCSTR) lpParameters, (LPCSTR) lpDirectory, nShowCmd); -} - -HINSTANCE -qxeFindExecutable (const Extbyte * lpFile, const Extbyte * lpDirectory, Extbyte * lpResult) -{ - if (XEUNICODE_P) - return FindExecutableW ((LPCWSTR) lpFile, (LPCWSTR) lpDirectory, (LPWSTR) lpResult); - else - return FindExecutableA ((LPCSTR) lpFile, (LPCSTR) lpDirectory, (LPSTR) lpResult); -} - -/* Error if CommandLineToArgv used: Unicode-only */ - -INT -qxeShellAbout (HWND hWnd, const Extbyte * szApp, const Extbyte * szOtherStuff, HICON hIcon) -{ - if (XEUNICODE_P) - return ShellAboutW (hWnd, (LPCWSTR) szApp, (LPCWSTR) szOtherStuff, hIcon); - else - return ShellAboutA (hWnd, (LPCSTR) szApp, (LPCSTR) szOtherStuff, hIcon); -} - -HICON -qxeExtractAssociatedIcon (HINSTANCE hInst, Extbyte * lpIconPath, LPWORD lpiIcon) -{ - if (XEUNICODE_P) - return ExtractAssociatedIconW (hInst, (LPWSTR) lpIconPath, lpiIcon); - else - return ExtractAssociatedIconA (hInst, (LPSTR) lpIconPath, lpiIcon); -} - -HICON -qxeExtractIcon (HINSTANCE hInst, const Extbyte * lpszExeFileName, UINT nIconIndex) -{ - if (XEUNICODE_P) - return ExtractIconW (hInst, (LPCWSTR) lpszExeFileName, nIconIndex); - else - return ExtractIconA (hInst, (LPCSTR) lpszExeFileName, nIconIndex); -} - -#if !defined (CYGWIN_HEADERS) - -/* NOTE: NT 4.0+ only */ -DWORD -qxeDoEnvironmentSubst (Extbyte * szString, UINT cbString) -{ - if (XEUNICODE_P) - return DoEnvironmentSubstW ((LPWSTR) szString, cbString); - else - return DoEnvironmentSubstA ((LPSTR) szString, cbString); -} - -#endif /* !defined (CYGWIN_HEADERS) */ - -/* Error if FindEnvironmentString used: causes link error; NT 4.0+ only */ - -/* Skipping ExtractIconEx because NT 4.0+ only, error in Cygwin prototype */ - -/* NOTE: NT 4.0+ only */ -int -qxeSHFileOperation (LPSHFILEOPSTRUCTW lpFileOp) -{ - if (XEUNICODE_P) - return SHFileOperationW (lpFileOp); - else - return SHFileOperationA ((LPSHFILEOPSTRUCTA) lpFileOp); -} - -/* NOTE: NT 4.0+ only */ -BOOL -qxeShellExecuteEx (LPSHELLEXECUTEINFOW lpExecInfo) -{ - if (XEUNICODE_P) - return ShellExecuteExW (lpExecInfo); - else - return ShellExecuteExA ((LPSHELLEXECUTEINFOA) lpExecInfo); -} - -/* Error if WinExecError used: causes link error; NT 4.0+ only */ - -#if !defined (CYGWIN_HEADERS) - -/* NOTE: NT 4.0+ only */ -HRESULT -qxeSHQueryRecycleBin (const Extbyte * pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo) -{ - if (XEUNICODE_P) - return SHQueryRecycleBinW ((LPCWSTR) pszRootPath, pSHQueryRBInfo); - else - return SHQueryRecycleBinA ((LPCSTR) pszRootPath, pSHQueryRBInfo); -} - -#endif /* !defined (CYGWIN_HEADERS) */ - -#if !defined (CYGWIN_HEADERS) - -/* NOTE: NT 4.0+ only */ -HRESULT -qxeSHEmptyRecycleBin (HWND hwnd, const Extbyte * pszRootPath, DWORD dwFlags) -{ - if (XEUNICODE_P) - return SHEmptyRecycleBinW (hwnd, (LPCWSTR) pszRootPath, dwFlags); - else - return SHEmptyRecycleBinA (hwnd, (LPCSTR) pszRootPath, dwFlags); -} - -#endif /* !defined (CYGWIN_HEADERS) */ - -/* Error if Shell_NotifyIcon used: split-sized NOTIFYICONDATA, NT 4.0+ only */ - -/* Skipping SHGetFileInfo because split-sized SHFILEINFO, NT 4.0+ only */ - -/* Error if SHGetDiskFreeSpace used: causes link error; NT 4.0+ only */ - -#if !defined (CYGWIN_HEADERS) - -/* NOTE: NT 4.0+ only */ -BOOL -qxeSHGetNewLinkInfo (const Extbyte * pszLinkTo, const Extbyte * pszDir, Extbyte * pszName, BOOL * pfMustCopy, UINT uFlags) -{ - if (XEUNICODE_P) - return SHGetNewLinkInfoW ((LPCWSTR) pszLinkTo, (LPCWSTR) pszDir, (LPWSTR) pszName, pfMustCopy, uFlags); - else - return SHGetNewLinkInfoA ((LPCSTR) pszLinkTo, (LPCSTR) pszDir, (LPSTR) pszName, pfMustCopy, uFlags); -} - -#endif /* !defined (CYGWIN_HEADERS) */ - -#if !defined (CYGWIN_HEADERS) - -/* NOTE: NT 4.0+ only */ -BOOL -qxeSHInvokePrinterCommand (HWND hwnd, UINT uAction, const Extbyte * lpBuf1, const Extbyte * lpBuf2, BOOL fModal) -{ - if (XEUNICODE_P) - return SHInvokePrinterCommandW (hwnd, uAction, (LPCWSTR) lpBuf1, (LPCWSTR) lpBuf2, fModal); - else - return SHInvokePrinterCommandA (hwnd, uAction, (LPCSTR) lpBuf1, (LPCSTR) lpBuf2, fModal); -} - -#endif /* !defined (CYGWIN_HEADERS) */ - - -/*----------------------------------------------------------------------*/ -/* Processing file WINCON.H */ -/*----------------------------------------------------------------------*/ - -BOOL -qxePeekConsoleInput (HANDLE hConsoleInput, PINPUT_RECORD lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsRead) -{ - if (XEUNICODE_P) - return PeekConsoleInputW (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsRead); - else - return PeekConsoleInputA (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsRead); -} - -BOOL -qxeReadConsoleInput (HANDLE hConsoleInput, PINPUT_RECORD lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsRead) -{ - if (XEUNICODE_P) - return ReadConsoleInputW (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsRead); - else - return ReadConsoleInputA (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsRead); -} - -BOOL -qxeWriteConsoleInput (HANDLE hConsoleInput, CONST INPUT_RECORD * lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsWritten) -{ - if (XEUNICODE_P) - return WriteConsoleInputW (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsWritten); - else - return WriteConsoleInputA (hConsoleInput, lpBuffer, nLength, lpNumberOfEventsWritten); -} - -BOOL -qxeReadConsoleOutput (HANDLE hConsoleOutput, PCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, PSMALL_RECT lpReadRegion) -{ - if (XEUNICODE_P) - return ReadConsoleOutputW (hConsoleOutput, lpBuffer, dwBufferSize, dwBufferCoord, lpReadRegion); - else - return ReadConsoleOutputA (hConsoleOutput, lpBuffer, dwBufferSize, dwBufferCoord, lpReadRegion); -} - -BOOL -qxeWriteConsoleOutput (HANDLE hConsoleOutput, CONST CHAR_INFO * lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, PSMALL_RECT lpWriteRegion) -{ - if (XEUNICODE_P) - return WriteConsoleOutputW (hConsoleOutput, lpBuffer, dwBufferSize, dwBufferCoord, lpWriteRegion); - else - return WriteConsoleOutputA (hConsoleOutput, lpBuffer, dwBufferSize, dwBufferCoord, lpWriteRegion); -} - -BOOL -qxeReadConsoleOutputCharacter (HANDLE hConsoleOutput, Extbyte * lpCharacter, DWORD nLength, COORD dwReadCoord, LPDWORD lpNumberOfCharsRead) -{ - if (XEUNICODE_P) - return ReadConsoleOutputCharacterW (hConsoleOutput, (LPWSTR) lpCharacter, nLength, dwReadCoord, lpNumberOfCharsRead); - else - return ReadConsoleOutputCharacterA (hConsoleOutput, (LPSTR) lpCharacter, nLength, dwReadCoord, lpNumberOfCharsRead); -} - -BOOL -qxeWriteConsoleOutputCharacter (HANDLE hConsoleOutput, const Extbyte * lpCharacter, DWORD nLength, COORD dwWriteCoord, LPDWORD lpNumberOfCharsWritten) -{ - if (XEUNICODE_P) - return WriteConsoleOutputCharacterW (hConsoleOutput, (LPCWSTR) lpCharacter, nLength, dwWriteCoord, lpNumberOfCharsWritten); - else - return WriteConsoleOutputCharacterA (hConsoleOutput, (LPCSTR) lpCharacter, nLength, dwWriteCoord, lpNumberOfCharsWritten); -} - -/* Error if FillConsoleOutputCharacter used: split CHAR */ - -BOOL -qxeScrollConsoleScreenBuffer (HANDLE hConsoleOutput, CONST SMALL_RECT * lpScrollRectangle, CONST SMALL_RECT * lpClipRectangle, COORD dwDestinationOrigin, CONST CHAR_INFO * lpFill) -{ - if (XEUNICODE_P) - return ScrollConsoleScreenBufferW (hConsoleOutput, lpScrollRectangle, lpClipRectangle, dwDestinationOrigin, lpFill); - else - return ScrollConsoleScreenBufferA (hConsoleOutput, lpScrollRectangle, lpClipRectangle, dwDestinationOrigin, lpFill); -} - -DWORD -qxeGetConsoleTitle (Extbyte * lpConsoleTitle, DWORD nSize) -{ - if (XEUNICODE_P) - return GetConsoleTitleW ((LPWSTR) lpConsoleTitle, nSize); - else - return GetConsoleTitleA ((LPSTR) lpConsoleTitle, nSize); -} - -BOOL -qxeSetConsoleTitle (const Extbyte * lpConsoleTitle) -{ - if (XEUNICODE_P) - return SetConsoleTitleW ((LPCWSTR) lpConsoleTitle); - else - return SetConsoleTitleA ((LPCSTR) lpConsoleTitle); -} - -BOOL -qxeReadConsole (HANDLE hConsoleInput, LPVOID lpBuffer, DWORD nNumberOfCharsToRead, LPDWORD lpNumberOfCharsRead, LPVOID lpReserved) -{ - if (XEUNICODE_P) - return ReadConsoleW (hConsoleInput, lpBuffer, nNumberOfCharsToRead, lpNumberOfCharsRead, lpReserved); - else - return ReadConsoleA (hConsoleInput, lpBuffer, nNumberOfCharsToRead, lpNumberOfCharsRead, lpReserved); -} - -BOOL -qxeWriteConsole (HANDLE hConsoleOutput, CONST VOID * lpBuffer, DWORD nNumberOfCharsToWrite, LPDWORD lpNumberOfCharsWritten, LPVOID lpReserved) -{ - if (XEUNICODE_P) - return WriteConsoleW (hConsoleOutput, lpBuffer, nNumberOfCharsToWrite, lpNumberOfCharsWritten, lpReserved); - else - return WriteConsoleA (hConsoleOutput, lpBuffer, nNumberOfCharsToWrite, lpNumberOfCharsWritten, lpReserved); -} - - -/*----------------------------------------------------------------------*/ -/* Processing file IMM.H */ -/*----------------------------------------------------------------------*/ - -#if defined (HAVE_MS_WINDOWS) - -HKL -qxeImmInstallIME (const Extbyte * lpszIMEFileName, const Extbyte * lpszLayoutText) -{ - if (XEUNICODE_P) - return ImmInstallIMEW ((LPCWSTR) lpszIMEFileName, (LPCWSTR) lpszLayoutText); - else - return ImmInstallIMEA ((LPCSTR) lpszIMEFileName, (LPCSTR) lpszLayoutText); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -UINT -qxeImmGetDescription (HKL arg1, Extbyte * arg2, UINT uBufLen) -{ - if (XEUNICODE_P) - return ImmGetDescriptionW (arg1, (LPWSTR) arg2, uBufLen); - else - return ImmGetDescriptionA (arg1, (LPSTR) arg2, uBufLen); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -UINT -qxeImmGetIMEFileName (HKL arg1, Extbyte * arg2, UINT uBufLen) -{ - if (XEUNICODE_P) - return ImmGetIMEFileNameW (arg1, (LPWSTR) arg2, uBufLen); - else - return ImmGetIMEFileNameA (arg1, (LPSTR) arg2, uBufLen); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -LONG -qxeImmGetCompositionString (HIMC arg1, DWORD arg2, LPVOID arg3, DWORD arg4) -{ - if (XEUNICODE_P) - return ImmGetCompositionStringW (arg1, arg2, arg3, arg4); - else - return ImmGetCompositionStringA (arg1, arg2, arg3, arg4); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -BOOL -qxeImmSetCompositionString (HIMC arg1, DWORD dwIndex, LPCVOID lpComp, DWORD arg4, LPCVOID lpRead, DWORD arg6) -{ - if (XEUNICODE_P) - return ImmSetCompositionStringW (arg1, dwIndex, lpComp, arg4, lpRead, arg6); - else - return ImmSetCompositionStringA (arg1, dwIndex, lpComp, arg4, lpRead, arg6); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -DWORD -qxeImmGetCandidateListCount (HIMC arg1, LPDWORD lpdwListCount) -{ - if (XEUNICODE_P) - return ImmGetCandidateListCountW (arg1, lpdwListCount); - else - return ImmGetCandidateListCountA (arg1, lpdwListCount); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -DWORD -qxeImmGetCandidateList (HIMC arg1, DWORD deIndex, LPCANDIDATELIST arg3, DWORD dwBufLen) -{ - if (XEUNICODE_P) - return ImmGetCandidateListW (arg1, deIndex, arg3, dwBufLen); - else - return ImmGetCandidateListA (arg1, deIndex, arg3, dwBufLen); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -DWORD -qxeImmGetGuideLine (HIMC arg1, DWORD dwIndex, Extbyte * arg3, DWORD dwBufLen) -{ - if (XEUNICODE_P) - return ImmGetGuideLineW (arg1, dwIndex, (LPWSTR) arg3, dwBufLen); - else - return ImmGetGuideLineA (arg1, dwIndex, (LPSTR) arg3, dwBufLen); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -/* Skipping ImmGetCompositionFont because split-sized LOGFONT */ - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -/* Skipping ImmSetCompositionFont because split-sized LOGFONT */ - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -/* NOTE: // split-simple REGISTERWORD */ -BOOL -qxeImmConfigureIME (HKL arg1, HWND arg2, DWORD arg3, LPVOID arg4) -{ - if (XEUNICODE_P) - return ImmConfigureIMEW (arg1, arg2, arg3, arg4); - else - return ImmConfigureIMEA (arg1, arg2, arg3, arg4); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -/* NOTE: // strings of various sorts */ -LRESULT -qxeImmEscape (HKL arg1, HIMC arg2, UINT arg3, LPVOID arg4) -{ - if (XEUNICODE_P) - return ImmEscapeW (arg1, arg2, arg3, arg4); - else - return ImmEscapeA (arg1, arg2, arg3, arg4); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -DWORD -qxeImmGetConversionList (HKL arg1, HIMC arg2, const Extbyte * arg3, LPCANDIDATELIST arg4, DWORD dwBufLen, UINT uFlag) -{ - if (XEUNICODE_P) - return ImmGetConversionListW (arg1, arg2, (LPCWSTR) arg3, arg4, dwBufLen, uFlag); - else - return ImmGetConversionListA (arg1, arg2, (LPCSTR) arg3, arg4, dwBufLen, uFlag); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -BOOL -qxeImmIsUIMessage (HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4) -{ - if (XEUNICODE_P) - return ImmIsUIMessageW (arg1, arg2, arg3, arg4); - else - return ImmIsUIMessageA (arg1, arg2, arg3, arg4); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -BOOL -qxeImmRegisterWord (HKL arg1, const Extbyte * lpszReading, DWORD arg3, const Extbyte * lpszRegister) -{ - if (XEUNICODE_P) - return ImmRegisterWordW (arg1, (LPCWSTR) lpszReading, arg3, (LPCWSTR) lpszRegister); - else - return ImmRegisterWordA (arg1, (LPCSTR) lpszReading, arg3, (LPCSTR) lpszRegister); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -BOOL -qxeImmUnregisterWord (HKL arg1, const Extbyte * lpszReading, DWORD arg3, const Extbyte * lpszUnregister) -{ - if (XEUNICODE_P) - return ImmUnregisterWordW (arg1, (LPCWSTR) lpszReading, arg3, (LPCWSTR) lpszUnregister); - else - return ImmUnregisterWordA (arg1, (LPCSTR) lpszReading, arg3, (LPCSTR) lpszUnregister); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -/* Error if ImmGetRegisterWordStyle used: split-sized STYLEBUF */ - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -UINT -qxeImmEnumRegisterWord (HKL arg1, REGISTERWORDENUMPROCW arg2, const Extbyte * lpszReading, DWORD arg4, const Extbyte * lpszRegister, LPVOID arg6) -{ - if (XEUNICODE_P) - return ImmEnumRegisterWordW (arg1, arg2, (LPCWSTR) lpszReading, arg4, (LPCWSTR) lpszRegister, arg6); - else - return ImmEnumRegisterWordA (arg1, (REGISTERWORDENUMPROCA) arg2, (LPCSTR) lpszReading, arg4, (LPCSTR) lpszRegister, arg6); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - -/* Error if ImmGetImeMenuItems used: split-sized IMEMENUITEMINFO */ - -#endif /* defined (HAVE_MS_WINDOWS) */ - - -/*----------------------------------------------------------------------*/ -/* Processing file DDEML.H */ -/*----------------------------------------------------------------------*/ - -UINT -qxeDdeInitialize (LPDWORD pidInst, PFNCALLBACK pfnCallback, DWORD afCmd, DWORD ulRes) -{ - if (XEUNICODE_P) - return DdeInitializeW (pidInst, pfnCallback, afCmd, ulRes); - else - return DdeInitializeA (pidInst, pfnCallback, afCmd, ulRes); -} - -/* Skipping DdeCreateStringHandle because error in Cygwin prototype */ - -DWORD -qxeDdeQueryString (DWORD idInst, HSZ hsz, Extbyte * psz, DWORD cchMax, int iCodePage) -{ - if (XEUNICODE_P) - return DdeQueryStringW (idInst, hsz, (LPWSTR) psz, cchMax, iCodePage); - else - return DdeQueryStringA (idInst, hsz, (LPSTR) psz, cchMax, iCodePage); -} - - -/*----------------------------------------------------------------------*/ /* Processing file WINUSER.H */ /*----------------------------------------------------------------------*/ @@ -2393,160 +1858,943 @@ /*----------------------------------------------------------------------*/ -/* Processing file MMSYSTEM.H */ +/* Processing file DDEML.H */ +/*----------------------------------------------------------------------*/ + +UINT +qxeDdeInitialize (LPDWORD pidInst, PFNCALLBACK pfnCallback, DWORD afCmd, DWORD ulRes) +{ + if (XEUNICODE_P) + return DdeInitializeW (pidInst, pfnCallback, afCmd, ulRes); + else + return DdeInitializeA (pidInst, pfnCallback, afCmd, ulRes); +} + +/* Skipping DdeCreateStringHandle because error in Cygwin prototype */ + +DWORD +qxeDdeQueryString (DWORD idInst, HSZ hsz, Extbyte * psz, DWORD cchMax, int iCodePage) +{ + if (XEUNICODE_P) + return DdeQueryStringW (idInst, hsz, (LPWSTR) psz, cchMax, iCodePage); + else + return DdeQueryStringA (idInst, hsz, (LPSTR) psz, cchMax, iCodePage); +} + + +/*----------------------------------------------------------------------*/ +/* Processing file WINREG.H */ /*----------------------------------------------------------------------*/ +/* Skipping RegConnectRegistry because error in Cygwin prototype */ + +LONG + +qxeRegCreateKey (HKEY hKey, const Extbyte * lpSubKey, PHKEY phkResult) +{ + if (XEUNICODE_P) + return RegCreateKeyW (hKey, (LPCWSTR) lpSubKey, phkResult); + else + return RegCreateKeyA (hKey, (LPCSTR) lpSubKey, phkResult); +} + +LONG + +qxeRegCreateKeyEx (HKEY hKey, const Extbyte * lpSubKey, DWORD Reserved, Extbyte * lpClass, DWORD dwOptions, REGSAM samDesired, LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, LPDWORD lpdwDisposition) +{ + if (XEUNICODE_P) + return RegCreateKeyExW (hKey, (LPCWSTR) lpSubKey, Reserved, (LPWSTR) lpClass, dwOptions, samDesired, lpSecurityAttributes, phkResult, lpdwDisposition); + else + return RegCreateKeyExA (hKey, (LPCSTR) lpSubKey, Reserved, (LPSTR) lpClass, dwOptions, samDesired, lpSecurityAttributes, phkResult, lpdwDisposition); +} + +LONG + +qxeRegDeleteKey (HKEY hKey, const Extbyte * lpSubKey) +{ + if (XEUNICODE_P) + return RegDeleteKeyW (hKey, (LPCWSTR) lpSubKey); + else + return RegDeleteKeyA (hKey, (LPCSTR) lpSubKey); +} + +LONG + +qxeRegDeleteValue (HKEY hKey, const Extbyte * lpValueName) +{ + if (XEUNICODE_P) + return RegDeleteValueW (hKey, (LPCWSTR) lpValueName); + else + return RegDeleteValueA (hKey, (LPCSTR) lpValueName); +} + +LONG + +qxeRegEnumKey (HKEY hKey, DWORD dwIndex, Extbyte * lpName, DWORD cbName) +{ + if (XEUNICODE_P) + return RegEnumKeyW (hKey, dwIndex, (LPWSTR) lpName, cbName); + else + return RegEnumKeyA (hKey, dwIndex, (LPSTR) lpName, cbName); +} + +LONG + +qxeRegEnumKeyEx (HKEY hKey, DWORD dwIndex, Extbyte * lpName, LPDWORD lpcbName, LPDWORD lpReserved, Extbyte * lpClass, LPDWORD lpcbClass, PFILETIME lpftLastWriteTime) +{ + if (XEUNICODE_P) + return RegEnumKeyExW (hKey, dwIndex, (LPWSTR) lpName, lpcbName, lpReserved, (LPWSTR) lpClass, lpcbClass, lpftLastWriteTime); + else + return RegEnumKeyExA (hKey, dwIndex, (LPSTR) lpName, lpcbName, lpReserved, (LPSTR) lpClass, lpcbClass, lpftLastWriteTime); +} + +LONG + +qxeRegEnumValue (HKEY hKey, DWORD dwIndex, Extbyte * lpValueName, LPDWORD lpcbValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData) +{ + if (XEUNICODE_P) + return RegEnumValueW (hKey, dwIndex, (LPWSTR) lpValueName, lpcbValueName, lpReserved, lpType, lpData, lpcbData); + else + return RegEnumValueA (hKey, dwIndex, (LPSTR) lpValueName, lpcbValueName, lpReserved, lpType, lpData, lpcbData); +} + +LONG + +qxeRegLoadKey (HKEY hKey, const Extbyte * lpSubKey, const Extbyte * lpFile) +{ + if (XEUNICODE_P) + return RegLoadKeyW (hKey, (LPCWSTR) lpSubKey, (LPCWSTR) lpFile); + else + return RegLoadKeyA (hKey, (LPCSTR) lpSubKey, (LPCSTR) lpFile); +} + +LONG + +qxeRegOpenKey (HKEY hKey, const Extbyte * lpSubKey, PHKEY phkResult) +{ + if (XEUNICODE_P) + return RegOpenKeyW (hKey, (LPCWSTR) lpSubKey, phkResult); + else + return RegOpenKeyA (hKey, (LPCSTR) lpSubKey, phkResult); +} + +LONG + +qxeRegOpenKeyEx (HKEY hKey, const Extbyte * lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult) +{ + if (XEUNICODE_P) + return RegOpenKeyExW (hKey, (LPCWSTR) lpSubKey, ulOptions, samDesired, phkResult); + else + return RegOpenKeyExA (hKey, (LPCSTR) lpSubKey, ulOptions, samDesired, phkResult); +} + +LONG + +qxeRegQueryInfoKey (HKEY hKey, Extbyte * lpClass, LPDWORD lpcbClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcbMaxSubKeyLen, LPDWORD lpcbMaxClassLen, LPDWORD lpcValues, LPDWORD lpcbMaxValueNameLen, LPDWORD lpcbMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime) +{ + if (XEUNICODE_P) + return RegQueryInfoKeyW (hKey, (LPWSTR) lpClass, lpcbClass, lpReserved, lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen, lpcbMaxValueLen, lpcbSecurityDescriptor, lpftLastWriteTime); + else + return RegQueryInfoKeyA (hKey, (LPSTR) lpClass, lpcbClass, lpReserved, lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen, lpcbMaxValueLen, lpcbSecurityDescriptor, lpftLastWriteTime); +} + +LONG + +qxeRegQueryValue (HKEY hKey, const Extbyte * lpSubKey, Extbyte * lpValue, PLONG lpcbValue) +{ + if (XEUNICODE_P) + return RegQueryValueW (hKey, (LPCWSTR) lpSubKey, (LPWSTR) lpValue, lpcbValue); + else + return RegQueryValueA (hKey, (LPCSTR) lpSubKey, (LPSTR) lpValue, lpcbValue); +} + +LONG + +qxeRegQueryMultipleValues (HKEY hKey, PVALENTW val_list, DWORD num_vals, Extbyte * lpValueBuf, LPDWORD ldwTotsize) +{ + if (XEUNICODE_P) + return RegQueryMultipleValuesW (hKey, val_list, num_vals, (LPWSTR) lpValueBuf, ldwTotsize); + else + return RegQueryMultipleValuesA (hKey, (PVALENTA) val_list, num_vals, (LPSTR) lpValueBuf, ldwTotsize); +} + +LONG + +qxeRegQueryValueEx (HKEY hKey, const Extbyte * lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData) +{ + if (XEUNICODE_P) + return RegQueryValueExW (hKey, (LPCWSTR) lpValueName, lpReserved, lpType, lpData, lpcbData); + else + return RegQueryValueExA (hKey, (LPCSTR) lpValueName, lpReserved, lpType, lpData, lpcbData); +} + +LONG + +qxeRegReplaceKey (HKEY hKey, const Extbyte * lpSubKey, const Extbyte * lpNewFile, const Extbyte * lpOldFile) +{ + if (XEUNICODE_P) + return RegReplaceKeyW (hKey, (LPCWSTR) lpSubKey, (LPCWSTR) lpNewFile, (LPCWSTR) lpOldFile); + else + return RegReplaceKeyA (hKey, (LPCSTR) lpSubKey, (LPCSTR) lpNewFile, (LPCSTR) lpOldFile); +} + +LONG + +qxeRegRestoreKey (HKEY hKey, const Extbyte * lpFile, DWORD dwFlags) +{ + if (XEUNICODE_P) + return RegRestoreKeyW (hKey, (LPCWSTR) lpFile, dwFlags); + else + return RegRestoreKeyA (hKey, (LPCSTR) lpFile, dwFlags); +} + +LONG + +qxeRegSaveKey (HKEY hKey, const Extbyte * lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes) +{ + if (XEUNICODE_P) + return RegSaveKeyW (hKey, (LPCWSTR) lpFile, lpSecurityAttributes); + else + return RegSaveKeyA (hKey, (LPCSTR) lpFile, lpSecurityAttributes); +} + +LONG + +qxeRegSetValue (HKEY hKey, const Extbyte * lpSubKey, DWORD dwType, const Extbyte * lpData, DWORD cbData) +{ + if (XEUNICODE_P) + return RegSetValueW (hKey, (LPCWSTR) lpSubKey, dwType, (LPCWSTR) lpData, cbData); + else + return RegSetValueA (hKey, (LPCSTR) lpSubKey, dwType, (LPCSTR) lpData, cbData); +} + +LONG + +qxeRegSetValueEx (HKEY hKey, const Extbyte * lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE* lpData, DWORD cbData) +{ + if (XEUNICODE_P) + return RegSetValueExW (hKey, (LPCWSTR) lpValueName, Reserved, dwType, lpData, cbData); + else + return RegSetValueExA (hKey, (LPCSTR) lpValueName, Reserved, dwType, lpData, cbData); +} + +LONG + +qxeRegUnLoadKey (HKEY hKey, const Extbyte * lpSubKey) +{ + if (XEUNICODE_P) + return RegUnLoadKeyW (hKey, (LPCWSTR) lpSubKey); + else + return RegUnLoadKeyA (hKey, (LPCSTR) lpSubKey); +} + BOOL -qxesndPlaySound (const Extbyte * pszSound, UINT fuSound) -{ - if (XEUNICODE_P) - return sndPlaySoundW ((LPCWSTR) pszSound, fuSound); - else - return sndPlaySoundA ((LPCSTR) pszSound, fuSound); + +qxeInitiateSystemShutdown (Extbyte * lpMachineName, Extbyte * lpMessage, DWORD dwTimeout, BOOL bForceAppsClosed, BOOL bRebootAfterShutdown) +{ + if (XEUNICODE_P) + return InitiateSystemShutdownW ((LPWSTR) lpMachineName, (LPWSTR) lpMessage, dwTimeout, bForceAppsClosed, bRebootAfterShutdown); + else + return InitiateSystemShutdownA ((LPSTR) lpMachineName, (LPSTR) lpMessage, dwTimeout, bForceAppsClosed, bRebootAfterShutdown); +} + +BOOL + +qxeAbortSystemShutdown (Extbyte * lpMachineName) +{ + if (XEUNICODE_P) + return AbortSystemShutdownW ((LPWSTR) lpMachineName); + else + return AbortSystemShutdownA ((LPSTR) lpMachineName); +} + + +/*----------------------------------------------------------------------*/ +/* Processing file WINNLS.H */ +/*----------------------------------------------------------------------*/ + +/* Error if GetCPInfoEx used: not used, not examined yet */ + +/* Error if CompareString used: not used, not examined yet */ + +/* Error if LCMapString used: not used, not examined yet */ + +int +qxeGetLocaleInfo (LCID Locale, LCTYPE LCType, Extbyte * lpLCData, int cchData) +{ + if (XEUNICODE_P) + return GetLocaleInfoW (Locale, LCType, (LPWSTR) lpLCData, cchData); + else + return GetLocaleInfoA (Locale, LCType, (LPSTR) lpLCData, cchData); +} + +BOOL +qxeSetLocaleInfo (LCID Locale, LCTYPE LCType, const Extbyte * lpLCData) +{ + if (XEUNICODE_P) + return SetLocaleInfoW (Locale, LCType, (LPCWSTR) lpLCData); + else + return SetLocaleInfoA (Locale, LCType, (LPCSTR) lpLCData); +} + +/* Error if GetTimeFormat used: not used, not examined yet */ + +/* Error if GetDateFormat used: not used, not examined yet */ + +/* Error if GetNumberFormat used: not used, not examined yet */ + +/* Error if GetCurrencyFormat used: not used, not examined yet */ + +/* Error if EnumCalendarInfo used: not used, not examined yet */ + +/* Error if EnumCalendarInfoEx used: not used, not examined yet */ + +/* Error if EnumTimeFormats used: not used, not examined yet */ + +/* Error if EnumDateFormats used: not used, not examined yet */ + +/* Error if EnumDateFormatsEx used: not used, not examined yet */ + +/* Error if GetStringTypeEx used: not used, not examined yet */ + +/* Error if GetStringType used: no such fun; A and W versions have different nos. of args */ + +/* Error if FoldString used: not used, not examined yet */ + +/* Error if EnumSystemLocales used: not used, not examined yet */ + +/* Error if EnumSystemCodePages used: not used, not examined yet */ + + +/*----------------------------------------------------------------------*/ +/* Processing file IME.H */ +/*----------------------------------------------------------------------*/ + +/* Error if SendIMEMessageEx used: obsolete, no docs available */ + + +/*----------------------------------------------------------------------*/ +/* Processing file WINGDI.H */ +/*----------------------------------------------------------------------*/ + +int +qxeAddFontResource (const Extbyte * arg1) +{ + if (XEUNICODE_P) + return AddFontResourceW ((LPCWSTR) arg1); + else + return AddFontResourceA ((LPCSTR) arg1); +} + +HMETAFILE +qxeCopyMetaFile (HMETAFILE arg1, const Extbyte * arg2) +{ + if (XEUNICODE_P) + return CopyMetaFileW (arg1, (LPCWSTR) arg2); + else + return CopyMetaFileA (arg1, (LPCSTR) arg2); +} + +/* Skipping CreateDC because split-sized DEVMODE */ + +/* Skipping CreateFontIndirect because split-sized LOGFONT */ + +HFONT +qxeCreateFont (int arg1, int arg2, int arg3, int arg4, int arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11, DWORD arg12, DWORD arg13, const Extbyte * arg14) +{ + if (XEUNICODE_P) + return CreateFontW (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, (LPCWSTR) arg14); + else + return CreateFontA (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, (LPCSTR) arg14); +} + +/* Skipping CreateIC because split-sized DEVMODE */ + +HDC +qxeCreateMetaFile (const Extbyte * arg1) +{ + if (XEUNICODE_P) + return CreateMetaFileW ((LPCWSTR) arg1); + else + return CreateMetaFileA ((LPCSTR) arg1); +} + +BOOL +qxeCreateScalableFontResource (DWORD arg1, const Extbyte * arg2, const Extbyte * arg3, const Extbyte * arg4) +{ + if (XEUNICODE_P) + return CreateScalableFontResourceW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, (LPCWSTR) arg4); + else + return CreateScalableFontResourceA (arg1, (LPCSTR) arg2, (LPCSTR) arg3, (LPCSTR) arg4); +} + +/* Skipping DeviceCapabilities because split-sized DEVMODE */ + +/* Skipping EnumFontFamiliesEx because split-complex FONTENUMPROC; NT 4.0+ only */ + +/* Error if EnumFontFamilies used: split-complex FONTENUMPROC */ + +/* Error if EnumFonts used: split-complex FONTENUMPROC */ + +BOOL +qxeGetCharWidth (HDC arg1, UINT arg2, UINT arg3, LPINT arg4) +{ + if (XEUNICODE_P) + return GetCharWidthW (arg1, arg2, arg3, arg4); + else + return GetCharWidthA (arg1, arg2, arg3, arg4); } BOOL -qxePlaySound (const Extbyte * pszSound, HMODULE hmod, DWORD fdwSound) -{ - if (XEUNICODE_P) - return PlaySoundW ((LPCWSTR) pszSound, hmod, fdwSound); - else - return PlaySoundA ((LPCSTR) pszSound, hmod, fdwSound); -} - -/* Error if waveOutGetDevCaps used: split-sized LPWAVEOUTCAPS */ - -MMRESULT -qxewaveOutGetErrorText (MMRESULT mmrError, Extbyte * pszText, UINT cchText) -{ - if (XEUNICODE_P) - return waveOutGetErrorTextW (mmrError, (LPWSTR) pszText, cchText); - else - return waveOutGetErrorTextA (mmrError, (LPSTR) pszText, cchText); -} - -/* Error if waveInGetDevCaps used: split-sized LPWAVEINCAPS */ - -MMRESULT -qxewaveInGetErrorText (MMRESULT mmrError, Extbyte * pszText, UINT cchText) -{ - if (XEUNICODE_P) - return waveInGetErrorTextW (mmrError, (LPWSTR) pszText, cchText); - else - return waveInGetErrorTextA (mmrError, (LPSTR) pszText, cchText); -} - -/* Error if midiOutGetDevCaps used: split-sized LPMIDIOUTCAPS */ - -MMRESULT -qxemidiOutGetErrorText (MMRESULT mmrError, Extbyte * pszText, UINT cchText) -{ - if (XEUNICODE_P) - return midiOutGetErrorTextW (mmrError, (LPWSTR) pszText, cchText); - else - return midiOutGetErrorTextA (mmrError, (LPSTR) pszText, cchText); -} - -/* Error if midiInGetDevCaps used: split-sized LPMIDIOUTCAPS */ - -MMRESULT -qxemidiInGetErrorText (MMRESULT mmrError, Extbyte * pszText, UINT cchText) -{ - if (XEUNICODE_P) - return midiInGetErrorTextW (mmrError, (LPWSTR) pszText, cchText); - else - return midiInGetErrorTextA (mmrError, (LPSTR) pszText, cchText); -} - -/* Error if auxGetDevCaps used: split-sized LPAUXCAPS */ - -/* Error if mixerGetDevCaps used: split-sized LPMIXERCAPS */ - -/* Error if mixerGetLineInfo used: split-sized LPMIXERLINE */ - -/* Error if mixerGetLineControls used: split-sized LPMIXERCONTROL */ - -/* Error if mixerGetControlDetails used: split-sized LPMIXERCONTROL in LPMIXERLINECONTROLS in LPMIXERCONTROLDETAILS */ - -/* Error if joyGetDevCaps used: split-sized LPJOYCAPS */ - -FOURCC -qxemmioStringToFOURCC (const Extbyte * sz, UINT uFlags) -{ - if (XEUNICODE_P) - return mmioStringToFOURCCW ((LPCWSTR) sz, uFlags); - else - return mmioStringToFOURCCA ((LPCSTR) sz, uFlags); -} - -LPMMIOPROC -qxemmioInstallIOProc (FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags) -{ - if (XEUNICODE_P) - return mmioInstallIOProcW (fccIOProc, pIOProc, dwFlags); - else - return mmioInstallIOProcA (fccIOProc, pIOProc, dwFlags); -} - -HMMIO -qxemmioOpen (Extbyte * pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen) -{ - if (XEUNICODE_P) - return mmioOpenW ((LPWSTR) pszFileName, pmmioinfo, fdwOpen); - else - return mmioOpenA ((LPSTR) pszFileName, pmmioinfo, fdwOpen); -} - -MMRESULT -qxemmioRename (const Extbyte * pszFileName, const Extbyte * pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename) -{ - if (XEUNICODE_P) - return mmioRenameW ((LPCWSTR) pszFileName, (LPCWSTR) pszNewFileName, pmmioinfo, fdwRename); - else - return mmioRenameA ((LPCSTR) pszFileName, (LPCSTR) pszNewFileName, pmmioinfo, fdwRename); -} - -MCIERROR -qxemciSendCommand (MCIDEVICEID mciId, UINT uMsg, DWORD dwParam1, DWORD dwParam2) -{ - if (XEUNICODE_P) - return mciSendCommandW (mciId, uMsg, dwParam1, dwParam2); - else - return mciSendCommandA (mciId, uMsg, dwParam1, dwParam2); -} - -MCIERROR -qxemciSendString (const Extbyte * lpstrCommand, Extbyte * lpstrReturnString, UINT uReturnLength, HWND hwndCallback) -{ - if (XEUNICODE_P) - return mciSendStringW ((LPCWSTR) lpstrCommand, (LPWSTR) lpstrReturnString, uReturnLength, hwndCallback); - else - return mciSendStringA ((LPCSTR) lpstrCommand, (LPSTR) lpstrReturnString, uReturnLength, hwndCallback); -} - -MCIDEVICEID -qxemciGetDeviceID (const Extbyte * pszDevice) -{ - if (XEUNICODE_P) - return mciGetDeviceIDW ((LPCWSTR) pszDevice); - else - return mciGetDeviceIDA ((LPCSTR) pszDevice); -} - -#if !defined (MINGW) - -/* Error if mciGetDeviceIDFromElementID used: missing from Win98se version of ADVAPI32.dll */ - -#endif /* !defined (MINGW) */ +qxeGetCharWidth32 (HDC arg1, UINT arg2, UINT arg3, LPINT arg4) +{ + if (XEUNICODE_P) + return GetCharWidth32W (arg1, arg2, arg3, arg4); + else + return GetCharWidth32A (arg1, arg2, arg3, arg4); +} + +BOOL +qxeGetCharWidthFloat (HDC arg1, UINT arg2, UINT arg3, PFLOAT arg4) +{ + if (XEUNICODE_P) + return GetCharWidthFloatW (arg1, arg2, arg3, arg4); + else + return GetCharWidthFloatA (arg1, arg2, arg3, arg4); +} + +BOOL +qxeGetCharABCWidths (HDC arg1, UINT arg2, UINT arg3, LPABC arg4) +{ + if (XEUNICODE_P) + return GetCharABCWidthsW (arg1, arg2, arg3, arg4); + else + return GetCharABCWidthsA (arg1, arg2, arg3, arg4); +} + +BOOL +qxeGetCharABCWidthsFloat (HDC arg1, UINT arg2, UINT arg3, LPABCFLOAT arg4) +{ + if (XEUNICODE_P) + return GetCharABCWidthsFloatW (arg1, arg2, arg3, arg4); + else + return GetCharABCWidthsFloatA (arg1, arg2, arg3, arg4); +} + +DWORD +qxeGetGlyphOutline (HDC arg1, UINT arg2, UINT arg3, LPGLYPHMETRICS arg4, DWORD arg5, LPVOID arg6, CONST MAT2 * arg7) +{ + if (XEUNICODE_P) + return GetGlyphOutlineW (arg1, arg2, arg3, arg4, arg5, arg6, arg7); + else + return GetGlyphOutlineA (arg1, arg2, arg3, arg4, arg5, arg6, arg7); +} + +HMETAFILE +qxeGetMetaFile (const Extbyte * arg1) +{ + if (XEUNICODE_P) + return GetMetaFileW ((LPCWSTR) arg1); + else + return GetMetaFileA ((LPCSTR) arg1); +} + +/* Error if GetOutlineTextMetrics used: split-sized LPOUTLINETEXTMETRIC */ + +BOOL +qxeGetTextExtentPoint (HDC arg1, const Extbyte * arg2, int arg3, LPSIZE arg4) +{ + if (XEUNICODE_P) + return GetTextExtentPointW (arg1, (LPCWSTR) arg2, arg3, arg4); + else + return GetTextExtentPointA (arg1, (LPCSTR) arg2, arg3, arg4); +} + +BOOL +qxeGetTextExtentPoint32 (HDC arg1, const Extbyte * arg2, int arg3, LPSIZE arg4) +{ + if (XEUNICODE_P) + return GetTextExtentPoint32W (arg1, (LPCWSTR) arg2, arg3, arg4); + else + return GetTextExtentPoint32A (arg1, (LPCSTR) arg2, arg3, arg4); +} + +BOOL +qxeGetTextExtentExPoint (HDC arg1, const Extbyte * arg2, int arg3, int arg4, LPINT arg5, LPINT arg6, LPSIZE arg7) +{ + if (XEUNICODE_P) + return GetTextExtentExPointW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5, arg6, arg7); + else + return GetTextExtentExPointA (arg1, (LPCSTR) arg2, arg3, arg4, arg5, arg6, arg7); +} + +/* NOTE: NT 4.0+ only */ +DWORD +qxeGetCharacterPlacement (HDC arg1, const Extbyte * arg2, int arg3, int arg4, LPGCP_RESULTSW arg5, DWORD arg6) +{ + if (XEUNICODE_P) + return GetCharacterPlacementW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5, arg6); + else + return GetCharacterPlacementA (arg1, (LPCSTR) arg2, arg3, arg4, (LPGCP_RESULTSA) arg5, arg6); +} + +/* Error if GetGlyphIndices used: NT 5.0+ only */ + +/* Error if AddFontResourceEx used: NT 5.0+ only */ + +/* Error if RemoveFontResourceEx used: NT 5.0+ only */ + +/* Error if CreateFontIndirectEx used: split-sized ENUMLOGFONTEXDV; NT 5.0+ only */ + +/* Skipping ResetDC because split-sized DEVMODE */ + +BOOL +qxeRemoveFontResource (const Extbyte * arg1) +{ + if (XEUNICODE_P) + return RemoveFontResourceW ((LPCWSTR) arg1); + else + return RemoveFontResourceA ((LPCSTR) arg1); +} + +HENHMETAFILE +qxeCopyEnhMetaFile (HENHMETAFILE arg1, const Extbyte * arg2) +{ + if (XEUNICODE_P) + return CopyEnhMetaFileW (arg1, (LPCWSTR) arg2); + else + return CopyEnhMetaFileA (arg1, (LPCSTR) arg2); +} + +HDC +qxeCreateEnhMetaFile (HDC arg1, const Extbyte * arg2, CONST RECT * arg3, const Extbyte * arg4) +{ + if (XEUNICODE_P) + return CreateEnhMetaFileW (arg1, (LPCWSTR) arg2, arg3, (LPCWSTR) arg4); + else + return CreateEnhMetaFileA (arg1, (LPCSTR) arg2, arg3, (LPCSTR) arg4); +} + +HENHMETAFILE +qxeGetEnhMetaFile (const Extbyte * arg1) +{ + if (XEUNICODE_P) + return GetEnhMetaFileW ((LPCWSTR) arg1); + else + return GetEnhMetaFileA ((LPCSTR) arg1); +} + +UINT +qxeGetEnhMetaFileDescription (HENHMETAFILE arg1, UINT arg2, Extbyte * arg3) +{ + if (XEUNICODE_P) + return GetEnhMetaFileDescriptionW (arg1, arg2, (LPWSTR) arg3); + else + return GetEnhMetaFileDescriptionA (arg1, arg2, (LPSTR) arg3); +} + +/* Skipping GetTextMetrics because split-sized LPTEXTMETRIC */ + +int +qxeStartDoc (HDC arg1, CONST DOCINFOW * arg2) +{ + if (XEUNICODE_P) + return StartDocW (arg1, arg2); + else + return StartDocA (arg1, (CONST DOCINFOA *) arg2); +} + +/* Skipping GetObject because split-sized LOGFONT */ + +BOOL +qxeTextOut (HDC arg1, int arg2, int arg3, const Extbyte * arg4, int arg5) +{ + if (XEUNICODE_P) + return TextOutW (arg1, arg2, arg3, (LPCWSTR) arg4, arg5); + else + return TextOutA (arg1, arg2, arg3, (LPCSTR) arg4, arg5); +} + +BOOL +qxeExtTextOut (HDC arg1, int arg2, int arg3, UINT arg4, CONST RECT * arg5, const Extbyte * arg6, UINT arg7, CONST INT * arg8) +{ + if (XEUNICODE_P) + return ExtTextOutW (arg1, arg2, arg3, arg4, arg5, (LPCWSTR) arg6, arg7, arg8); + else + return ExtTextOutA (arg1, arg2, arg3, arg4, arg5, (LPCSTR) arg6, arg7, arg8); +} + +BOOL +qxePolyTextOut (HDC arg1, CONST POLYTEXTW * arg2, int arg3) +{ + if (XEUNICODE_P) + return PolyTextOutW (arg1, arg2, arg3); + else + return PolyTextOutA (arg1, (CONST POLYTEXTA *) arg2, arg3); +} + +int +qxeGetTextFace (HDC arg1, int arg2, Extbyte * arg3) +{ + if (XEUNICODE_P) + return GetTextFaceW (arg1, arg2, (LPWSTR) arg3); + else + return GetTextFaceA (arg1, arg2, (LPSTR) arg3); +} + +DWORD +qxeGetKerningPairs (HDC arg1, DWORD arg2, LPKERNINGPAIR arg3) +{ + if (XEUNICODE_P) + return GetKerningPairsW (arg1, arg2, arg3); + else + return GetKerningPairsA (arg1, arg2, arg3); +} + +/* Error if GetLogColorSpace used: split-sized LPLOGCOLORSPACE; NT 4.0+ only */ + +/* Error if CreateColorSpace used: split-sized LPLOGCOLORSPACE; NT 4.0+ only */ + +/* Skipping GetICMProfile because NT 4.0+ only, error in Cygwin prototype */ + +/* NOTE: NT 4.0+ only */ +BOOL +qxeSetICMProfile (HDC arg1, Extbyte * arg2) +{ + if (XEUNICODE_P) + return SetICMProfileW (arg1, (LPWSTR) arg2); + else + return SetICMProfileA (arg1, (LPSTR) arg2); +} + +/* NOTE: NT 4.0+ only */ +int +qxeEnumICMProfiles (HDC arg1, ICMENUMPROCW arg2, LPARAM arg3) +{ + if (XEUNICODE_P) + return EnumICMProfilesW (arg1, arg2, arg3); + else + return EnumICMProfilesA (arg1, (ICMENUMPROCA) arg2, arg3); +} + +/* Skipping UpdateICMRegKey because NT 4.0+ only, error in Cygwin prototype */ + +/* Error if wglUseFontBitmaps used: causes link error */ + +/* Error if wglUseFontOutlines used: causes link error */ + + +/*----------------------------------------------------------------------*/ +/* Processing file SHLOBJ.H */ +/*----------------------------------------------------------------------*/ BOOL -qxemciGetErrorString (MCIERROR mcierr, Extbyte * pszText, UINT cchText) -{ - if (XEUNICODE_P) - return mciGetErrorStringW (mcierr, (LPWSTR) pszText, cchText); - else - return mciGetErrorStringA (mcierr, (LPSTR) pszText, cchText); -} +qxeSHGetPathFromIDList (LPCITEMIDLIST pidl, Extbyte * pszPath) +{ + if (XEUNICODE_P) + return SHGetPathFromIDListW (pidl, (LPWSTR) pszPath); + else + return SHGetPathFromIDListA (pidl, (LPSTR) pszPath); +} + +/* Skipping SHGetSpecialFolderPath because error in Cygwin prototype, missing from Cygwin libraries */ + +/* Skipping SHBrowseForFolder because need to intercept callback for SendMessage */ + +/* Skipping SHGetDataFromIDList because split-sized WIN32_FIND_DATA or split-simple NETRESOURCE, missing from Cygwin libraries */ + + +/*----------------------------------------------------------------------*/ +/* Processing file COMMDLG.H */ +/*----------------------------------------------------------------------*/ + +BOOL +qxeGetOpenFileName (LPOPENFILENAMEW arg1) +{ + if (XEUNICODE_P) + return GetOpenFileNameW (arg1); + else + return GetOpenFileNameA ((LPOPENFILENAMEA) arg1); +} + +BOOL +qxeGetSaveFileName (LPOPENFILENAMEW arg1) +{ + if (XEUNICODE_P) + return GetSaveFileNameW (arg1); + else + return GetSaveFileNameA ((LPOPENFILENAMEA) arg1); +} + +short +qxeGetFileTitle (const Extbyte * arg1, Extbyte * arg2, WORD arg3) +{ + if (XEUNICODE_P) + return GetFileTitleW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3); + else + return GetFileTitleA ((LPCSTR) arg1, (LPSTR) arg2, arg3); +} + +BOOL +qxeChooseColor (LPCHOOSECOLORW arg1) +{ + if (XEUNICODE_P) + return ChooseColorW (arg1); + else + return ChooseColorA ((LPCHOOSECOLORA) arg1); +} + +HWND +qxeFindText (LPFINDREPLACEW arg1) +{ + if (XEUNICODE_P) + return FindTextW (arg1); + else + return FindTextA ((LPFINDREPLACEA) arg1); +} + +HWND +qxeReplaceText (LPFINDREPLACEW arg1) +{ + if (XEUNICODE_P) + return ReplaceTextW (arg1); + else + return ReplaceTextA ((LPFINDREPLACEA) arg1); +} + +/* Error if AfxReplaceText used: mac only */ + +/* Error if ChooseFont used: split-sized LPLOGFONT in LPCHOOSEFONT */ + +/* Skipping PrintDlg because LPPRINTDLG with split-sized DEVMODE handle */ + +/* Skipping PageSetupDlg because LPPAGESETUPDLG with split-sized DEVMODE handle */ + + +/*----------------------------------------------------------------------*/ +/* Processing file IMM.H */ +/*----------------------------------------------------------------------*/ + +#if defined (HAVE_MS_WINDOWS) + +HKL +qxeImmInstallIME (const Extbyte * lpszIMEFileName, const Extbyte * lpszLayoutText) +{ + if (XEUNICODE_P) + return ImmInstallIMEW ((LPCWSTR) lpszIMEFileName, (LPCWSTR) lpszLayoutText); + else + return ImmInstallIMEA ((LPCSTR) lpszIMEFileName, (LPCSTR) lpszLayoutText); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +UINT +qxeImmGetDescription (HKL arg1, Extbyte * arg2, UINT uBufLen) +{ + if (XEUNICODE_P) + return ImmGetDescriptionW (arg1, (LPWSTR) arg2, uBufLen); + else + return ImmGetDescriptionA (arg1, (LPSTR) arg2, uBufLen); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +UINT +qxeImmGetIMEFileName (HKL arg1, Extbyte * arg2, UINT uBufLen) +{ + if (XEUNICODE_P) + return ImmGetIMEFileNameW (arg1, (LPWSTR) arg2, uBufLen); + else + return ImmGetIMEFileNameA (arg1, (LPSTR) arg2, uBufLen); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +LONG +qxeImmGetCompositionString (HIMC arg1, DWORD arg2, LPVOID arg3, DWORD arg4) +{ + if (XEUNICODE_P) + return ImmGetCompositionStringW (arg1, arg2, arg3, arg4); + else + return ImmGetCompositionStringA (arg1, arg2, arg3, arg4); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +BOOL +qxeImmSetCompositionString (HIMC arg1, DWORD dwIndex, LPCVOID lpComp, DWORD arg4, LPCVOID lpRead, DWORD arg6) +{ + if (XEUNICODE_P) + return ImmSetCompositionStringW (arg1, dwIndex, lpComp, arg4, lpRead, arg6); + else + return ImmSetCompositionStringA (arg1, dwIndex, lpComp, arg4, lpRead, arg6); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +DWORD +qxeImmGetCandidateListCount (HIMC arg1, LPDWORD lpdwListCount) +{ + if (XEUNICODE_P) + return ImmGetCandidateListCountW (arg1, lpdwListCount); + else + return ImmGetCandidateListCountA (arg1, lpdwListCount); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +DWORD +qxeImmGetCandidateList (HIMC arg1, DWORD deIndex, LPCANDIDATELIST arg3, DWORD dwBufLen) +{ + if (XEUNICODE_P) + return ImmGetCandidateListW (arg1, deIndex, arg3, dwBufLen); + else + return ImmGetCandidateListA (arg1, deIndex, arg3, dwBufLen); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +DWORD +qxeImmGetGuideLine (HIMC arg1, DWORD dwIndex, Extbyte * arg3, DWORD dwBufLen) +{ + if (XEUNICODE_P) + return ImmGetGuideLineW (arg1, dwIndex, (LPWSTR) arg3, dwBufLen); + else + return ImmGetGuideLineA (arg1, dwIndex, (LPSTR) arg3, dwBufLen); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +/* Skipping ImmGetCompositionFont because split-sized LOGFONT */ + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +/* Skipping ImmSetCompositionFont because split-sized LOGFONT */ + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +/* NOTE: // split-simple REGISTERWORD */ +BOOL +qxeImmConfigureIME (HKL arg1, HWND arg2, DWORD arg3, LPVOID arg4) +{ + if (XEUNICODE_P) + return ImmConfigureIMEW (arg1, arg2, arg3, arg4); + else + return ImmConfigureIMEA (arg1, arg2, arg3, arg4); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +/* NOTE: // strings of various sorts */ +LRESULT +qxeImmEscape (HKL arg1, HIMC arg2, UINT arg3, LPVOID arg4) +{ + if (XEUNICODE_P) + return ImmEscapeW (arg1, arg2, arg3, arg4); + else + return ImmEscapeA (arg1, arg2, arg3, arg4); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +DWORD +qxeImmGetConversionList (HKL arg1, HIMC arg2, const Extbyte * arg3, LPCANDIDATELIST arg4, DWORD dwBufLen, UINT uFlag) +{ + if (XEUNICODE_P) + return ImmGetConversionListW (arg1, arg2, (LPCWSTR) arg3, arg4, dwBufLen, uFlag); + else + return ImmGetConversionListA (arg1, arg2, (LPCSTR) arg3, arg4, dwBufLen, uFlag); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +BOOL +qxeImmIsUIMessage (HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4) +{ + if (XEUNICODE_P) + return ImmIsUIMessageW (arg1, arg2, arg3, arg4); + else + return ImmIsUIMessageA (arg1, arg2, arg3, arg4); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +BOOL +qxeImmRegisterWord (HKL arg1, const Extbyte * lpszReading, DWORD arg3, const Extbyte * lpszRegister) +{ + if (XEUNICODE_P) + return ImmRegisterWordW (arg1, (LPCWSTR) lpszReading, arg3, (LPCWSTR) lpszRegister); + else + return ImmRegisterWordA (arg1, (LPCSTR) lpszReading, arg3, (LPCSTR) lpszRegister); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +BOOL +qxeImmUnregisterWord (HKL arg1, const Extbyte * lpszReading, DWORD arg3, const Extbyte * lpszUnregister) +{ + if (XEUNICODE_P) + return ImmUnregisterWordW (arg1, (LPCWSTR) lpszReading, arg3, (LPCWSTR) lpszUnregister); + else + return ImmUnregisterWordA (arg1, (LPCSTR) lpszReading, arg3, (LPCSTR) lpszUnregister); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +/* Error if ImmGetRegisterWordStyle used: split-sized STYLEBUF */ + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +UINT +qxeImmEnumRegisterWord (HKL arg1, REGISTERWORDENUMPROCW arg2, const Extbyte * lpszReading, DWORD arg4, const Extbyte * lpszRegister, LPVOID arg6) +{ + if (XEUNICODE_P) + return ImmEnumRegisterWordW (arg1, arg2, (LPCWSTR) lpszReading, arg4, (LPCWSTR) lpszRegister, arg6); + else + return ImmEnumRegisterWordA (arg1, (REGISTERWORDENUMPROCA) arg2, (LPCSTR) lpszReading, arg4, (LPCSTR) lpszRegister, arg6); +} + +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) + +/* Error if ImmGetImeMenuItems used: split-sized IMEMENUITEMINFO */ + +#endif /* defined (HAVE_MS_WINDOWS) */ /*----------------------------------------------------------------------*/ @@ -3725,406 +3973,158 @@ /*----------------------------------------------------------------------*/ -/* Processing file COMMDLG.H */ -/*----------------------------------------------------------------------*/ - -BOOL -qxeGetOpenFileName (LPOPENFILENAMEW arg1) -{ - if (XEUNICODE_P) - return GetOpenFileNameW (arg1); - else - return GetOpenFileNameA ((LPOPENFILENAMEA) arg1); -} - -BOOL -qxeGetSaveFileName (LPOPENFILENAMEW arg1) -{ - if (XEUNICODE_P) - return GetSaveFileNameW (arg1); - else - return GetSaveFileNameA ((LPOPENFILENAMEA) arg1); -} - -short -qxeGetFileTitle (const Extbyte * arg1, Extbyte * arg2, WORD arg3) -{ - if (XEUNICODE_P) - return GetFileTitleW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3); - else - return GetFileTitleA ((LPCSTR) arg1, (LPSTR) arg2, arg3); -} - -BOOL -qxeChooseColor (LPCHOOSECOLORW arg1) -{ - if (XEUNICODE_P) - return ChooseColorW (arg1); - else - return ChooseColorA ((LPCHOOSECOLORA) arg1); -} - -HWND -qxeFindText (LPFINDREPLACEW arg1) -{ - if (XEUNICODE_P) - return FindTextW (arg1); - else - return FindTextA ((LPFINDREPLACEA) arg1); -} - -HWND -qxeReplaceText (LPFINDREPLACEW arg1) -{ - if (XEUNICODE_P) - return ReplaceTextW (arg1); - else - return ReplaceTextA ((LPFINDREPLACEA) arg1); -} - -/* Error if AfxReplaceText used: mac only */ - -/* Error if ChooseFont used: split-sized LPLOGFONT in LPCHOOSEFONT */ - -/* Skipping PrintDlg because LPPRINTDLG with split-sized DEVMODE handle */ - -/* Skipping PageSetupDlg because LPPAGESETUPDLG with split-sized DEVMODE handle */ - - -/*----------------------------------------------------------------------*/ -/* Processing file SHLOBJ.H */ +/* Processing file MMSYSTEM.H */ /*----------------------------------------------------------------------*/ BOOL -qxeSHGetPathFromIDList (LPCITEMIDLIST pidl, Extbyte * pszPath) -{ - if (XEUNICODE_P) - return SHGetPathFromIDListW (pidl, (LPWSTR) pszPath); - else - return SHGetPathFromIDListA (pidl, (LPSTR) pszPath); -} - -/* Skipping SHGetSpecialFolderPath because error in Cygwin prototype, missing from Cygwin libraries */ - -/* Skipping SHBrowseForFolder because need to intercept callback for SendMessage */ - -/* Skipping SHGetDataFromIDList because split-sized WIN32_FIND_DATA or split-simple NETRESOURCE, missing from Cygwin libraries */ - - -/*----------------------------------------------------------------------*/ -/* Processing file IME.H */ -/*----------------------------------------------------------------------*/ - -/* Error if SendIMEMessageEx used: obsolete, no docs available */ - - -/*----------------------------------------------------------------------*/ -/* Processing file WINGDI.H */ -/*----------------------------------------------------------------------*/ - -int -qxeAddFontResource (const Extbyte * arg1) -{ - if (XEUNICODE_P) - return AddFontResourceW ((LPCWSTR) arg1); - else - return AddFontResourceA ((LPCSTR) arg1); -} - -HMETAFILE -qxeCopyMetaFile (HMETAFILE arg1, const Extbyte * arg2) -{ - if (XEUNICODE_P) - return CopyMetaFileW (arg1, (LPCWSTR) arg2); - else - return CopyMetaFileA (arg1, (LPCSTR) arg2); -} - -/* Skipping CreateDC because split-sized DEVMODE */ - -/* Skipping CreateFontIndirect because split-sized LOGFONT */ - -HFONT -qxeCreateFont (int arg1, int arg2, int arg3, int arg4, int arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11, DWORD arg12, DWORD arg13, const Extbyte * arg14) -{ - if (XEUNICODE_P) - return CreateFontW (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, (LPCWSTR) arg14); - else - return CreateFontA (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, (LPCSTR) arg14); -} - -/* Skipping CreateIC because split-sized DEVMODE */ - -HDC -qxeCreateMetaFile (const Extbyte * arg1) -{ - if (XEUNICODE_P) - return CreateMetaFileW ((LPCWSTR) arg1); - else - return CreateMetaFileA ((LPCSTR) arg1); -} - -BOOL -qxeCreateScalableFontResource (DWORD arg1, const Extbyte * arg2, const Extbyte * arg3, const Extbyte * arg4) -{ - if (XEUNICODE_P) - return CreateScalableFontResourceW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, (LPCWSTR) arg4); - else - return CreateScalableFontResourceA (arg1, (LPCSTR) arg2, (LPCSTR) arg3, (LPCSTR) arg4); -} - -/* Skipping DeviceCapabilities because split-sized DEVMODE */ - -/* Skipping EnumFontFamiliesEx because split-complex FONTENUMPROC; NT 4.0+ only */ - -/* Error if EnumFontFamilies used: split-complex FONTENUMPROC */ - -/* Error if EnumFonts used: split-complex FONTENUMPROC */ - -BOOL -qxeGetCharWidth (HDC arg1, UINT arg2, UINT arg3, LPINT arg4) -{ - if (XEUNICODE_P) - return GetCharWidthW (arg1, arg2, arg3, arg4); - else - return GetCharWidthA (arg1, arg2, arg3, arg4); +qxesndPlaySound (const Extbyte * pszSound, UINT fuSound) +{ + if (XEUNICODE_P) + return sndPlaySoundW ((LPCWSTR) pszSound, fuSound); + else + return sndPlaySoundA ((LPCSTR) pszSound, fuSound); } BOOL -qxeGetCharWidth32 (HDC arg1, UINT arg2, UINT arg3, LPINT arg4) -{ - if (XEUNICODE_P) - return GetCharWidth32W (arg1, arg2, arg3, arg4); - else - return GetCharWidth32A (arg1, arg2, arg3, arg4); -} - -BOOL -qxeGetCharWidthFloat (HDC arg1, UINT arg2, UINT arg3, PFLOAT arg4) -{ - if (XEUNICODE_P) - return GetCharWidthFloatW (arg1, arg2, arg3, arg4); - else - return GetCharWidthFloatA (arg1, arg2, arg3, arg4); -} - -BOOL -qxeGetCharABCWidths (HDC arg1, UINT arg2, UINT arg3, LPABC arg4) -{ - if (XEUNICODE_P) - return GetCharABCWidthsW (arg1, arg2, arg3, arg4); - else - return GetCharABCWidthsA (arg1, arg2, arg3, arg4); -} - -BOOL -qxeGetCharABCWidthsFloat (HDC arg1, UINT arg2, UINT arg3, LPABCFLOAT arg4) -{ - if (XEUNICODE_P) - return GetCharABCWidthsFloatW (arg1, arg2, arg3, arg4); - else - return GetCharABCWidthsFloatA (arg1, arg2, arg3, arg4); -} - -DWORD -qxeGetGlyphOutline (HDC arg1, UINT arg2, UINT arg3, LPGLYPHMETRICS arg4, DWORD arg5, LPVOID arg6, CONST MAT2 * arg7) -{ - if (XEUNICODE_P) - return GetGlyphOutlineW (arg1, arg2, arg3, arg4, arg5, arg6, arg7); - else - return GetGlyphOutlineA (arg1, arg2, arg3, arg4, arg5, arg6, arg7); -} - -HMETAFILE -qxeGetMetaFile (const Extbyte * arg1) -{ - if (XEUNICODE_P) - return GetMetaFileW ((LPCWSTR) arg1); - else - return GetMetaFileA ((LPCSTR) arg1); -} - -/* Error if GetOutlineTextMetrics used: split-sized LPOUTLINETEXTMETRIC */ - -BOOL -qxeGetTextExtentPoint (HDC arg1, const Extbyte * arg2, int arg3, LPSIZE arg4) -{ - if (XEUNICODE_P) - return GetTextExtentPointW (arg1, (LPCWSTR) arg2, arg3, arg4); - else - return GetTextExtentPointA (arg1, (LPCSTR) arg2, arg3, arg4); -} - -BOOL -qxeGetTextExtentPoint32 (HDC arg1, const Extbyte * arg2, int arg3, LPSIZE arg4) -{ - if (XEUNICODE_P) - return GetTextExtentPoint32W (arg1, (LPCWSTR) arg2, arg3, arg4); - else - return GetTextExtentPoint32A (arg1, (LPCSTR) arg2, arg3, arg4); -} - -BOOL -qxeGetTextExtentExPoint (HDC arg1, const Extbyte * arg2, int arg3, int arg4, LPINT arg5, LPINT arg6, LPSIZE arg7) -{ - if (XEUNICODE_P) - return GetTextExtentExPointW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5, arg6, arg7); - else - return GetTextExtentExPointA (arg1, (LPCSTR) arg2, arg3, arg4, arg5, arg6, arg7); -} - -/* NOTE: NT 4.0+ only */ -DWORD -qxeGetCharacterPlacement (HDC arg1, const Extbyte * arg2, int arg3, int arg4, LPGCP_RESULTSW arg5, DWORD arg6) -{ - if (XEUNICODE_P) - return GetCharacterPlacementW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5, arg6); - else - return GetCharacterPlacementA (arg1, (LPCSTR) arg2, arg3, arg4, (LPGCP_RESULTSA) arg5, arg6); -} - -/* Error if GetGlyphIndices used: NT 5.0+ only */ - -/* Error if AddFontResourceEx used: NT 5.0+ only */ - -/* Error if RemoveFontResourceEx used: NT 5.0+ only */ - -/* Error if CreateFontIndirectEx used: split-sized ENUMLOGFONTEXDV; NT 5.0+ only */ - -/* Skipping ResetDC because split-sized DEVMODE */ +qxePlaySound (const Extbyte * pszSound, HMODULE hmod, DWORD fdwSound) +{ + if (XEUNICODE_P) + return PlaySoundW ((LPCWSTR) pszSound, hmod, fdwSound); + else + return PlaySoundA ((LPCSTR) pszSound, hmod, fdwSound); +} + +/* Error if waveOutGetDevCaps used: split-sized LPWAVEOUTCAPS */ + +MMRESULT +qxewaveOutGetErrorText (MMRESULT mmrError, Extbyte * pszText, UINT cchText) +{ + if (XEUNICODE_P) + return waveOutGetErrorTextW (mmrError, (LPWSTR) pszText, cchText); + else + return waveOutGetErrorTextA (mmrError, (LPSTR) pszText, cchText); +} + +/* Error if waveInGetDevCaps used: split-sized LPWAVEINCAPS */ + +MMRESULT +qxewaveInGetErrorText (MMRESULT mmrError, Extbyte * pszText, UINT cchText) +{ + if (XEUNICODE_P) + return waveInGetErrorTextW (mmrError, (LPWSTR) pszText, cchText); + else + return waveInGetErrorTextA (mmrError, (LPSTR) pszText, cchText); +} + +/* Error if midiOutGetDevCaps used: split-sized LPMIDIOUTCAPS */ + +MMRESULT +qxemidiOutGetErrorText (MMRESULT mmrError, Extbyte * pszText, UINT cchText) +{ + if (XEUNICODE_P) + return midiOutGetErrorTextW (mmrError, (LPWSTR) pszText, cchText); + else + return midiOutGetErrorTextA (mmrError, (LPSTR) pszText, cchText); +} + +/* Error if midiInGetDevCaps used: split-sized LPMIDIOUTCAPS */ + +MMRESULT +qxemidiInGetErrorText (MMRESULT mmrError, Extbyte * pszText, UINT cchText) +{ + if (XEUNICODE_P) + return midiInGetErrorTextW (mmrError, (LPWSTR) pszText, cchText); + else + return midiInGetErrorTextA (mmrError, (LPSTR) pszText, cchText); +} + +/* Error if auxGetDevCaps used: split-sized LPAUXCAPS */ + +/* Error if mixerGetDevCaps used: split-sized LPMIXERCAPS */ + +/* Error if mixerGetLineInfo used: split-sized LPMIXERLINE */ + +/* Error if mixerGetLineControls used: split-sized LPMIXERCONTROL */ + +/* Error if mixerGetControlDetails used: split-sized LPMIXERCONTROL in LPMIXERLINECONTROLS in LPMIXERCONTROLDETAILS */ + +/* Error if joyGetDevCaps used: split-sized LPJOYCAPS */ + +FOURCC +qxemmioStringToFOURCC (const Extbyte * sz, UINT uFlags) +{ + if (XEUNICODE_P) + return mmioStringToFOURCCW ((LPCWSTR) sz, uFlags); + else + return mmioStringToFOURCCA ((LPCSTR) sz, uFlags); +} + +LPMMIOPROC +qxemmioInstallIOProc (FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags) +{ + if (XEUNICODE_P) + return mmioInstallIOProcW (fccIOProc, pIOProc, dwFlags); + else + return mmioInstallIOProcA (fccIOProc, pIOProc, dwFlags); +} + +HMMIO +qxemmioOpen (Extbyte * pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen) +{ + if (XEUNICODE_P) + return mmioOpenW ((LPWSTR) pszFileName, pmmioinfo, fdwOpen); + else + return mmioOpenA ((LPSTR) pszFileName, pmmioinfo, fdwOpen); +} + +MMRESULT +qxemmioRename (const Extbyte * pszFileName, const Extbyte * pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename) +{ + if (XEUNICODE_P) + return mmioRenameW ((LPCWSTR) pszFileName, (LPCWSTR) pszNewFileName, pmmioinfo, fdwRename); + else + return mmioRenameA ((LPCSTR) pszFileName, (LPCSTR) pszNewFileName, pmmioinfo, fdwRename); +} + +MCIERROR +qxemciSendCommand (MCIDEVICEID mciId, UINT uMsg, DWORD dwParam1, DWORD dwParam2) +{ + if (XEUNICODE_P) + return mciSendCommandW (mciId, uMsg, dwParam1, dwParam2); + else + return mciSendCommandA (mciId, uMsg, dwParam1, dwParam2); +} + +MCIERROR +qxemciSendString (const Extbyte * lpstrCommand, Extbyte * lpstrReturnString, UINT uReturnLength, HWND hwndCallback) +{ + if (XEUNICODE_P) + return mciSendStringW ((LPCWSTR) lpstrCommand, (LPWSTR) lpstrReturnString, uReturnLength, hwndCallback); + else + return mciSendStringA ((LPCSTR) lpstrCommand, (LPSTR) lpstrReturnString, uReturnLength, hwndCallback); +} + +MCIDEVICEID +qxemciGetDeviceID (const Extbyte * pszDevice) +{ + if (XEUNICODE_P) + return mciGetDeviceIDW ((LPCWSTR) pszDevice); + else + return mciGetDeviceIDA ((LPCSTR) pszDevice); +} + +#if !defined (MINGW) + +/* Error if mciGetDeviceIDFromElementID used: missing from Win98se version of ADVAPI32.dll */ + +#endif /* !defined (MINGW) */ BOOL -qxeRemoveFontResource (const Extbyte * arg1) -{ - if (XEUNICODE_P) - return RemoveFontResourceW ((LPCWSTR) arg1); - else - return RemoveFontResourceA ((LPCSTR) arg1); -} - -HENHMETAFILE -qxeCopyEnhMetaFile (HENHMETAFILE arg1, const Extbyte * arg2) -{ - if (XEUNICODE_P) - return CopyEnhMetaFileW (arg1, (LPCWSTR) arg2); - else - return CopyEnhMetaFileA (arg1, (LPCSTR) arg2); -} - -HDC -qxeCreateEnhMetaFile (HDC arg1, const Extbyte * arg2, CONST RECT * arg3, const Extbyte * arg4) -{ - if (XEUNICODE_P) - return CreateEnhMetaFileW (arg1, (LPCWSTR) arg2, arg3, (LPCWSTR) arg4); - else - return CreateEnhMetaFileA (arg1, (LPCSTR) arg2, arg3, (LPCSTR) arg4); -} - -HENHMETAFILE -qxeGetEnhMetaFile (const Extbyte * arg1) -{ - if (XEUNICODE_P) - return GetEnhMetaFileW ((LPCWSTR) arg1); - else - return GetEnhMetaFileA ((LPCSTR) arg1); -} - -UINT -qxeGetEnhMetaFileDescription (HENHMETAFILE arg1, UINT arg2, Extbyte * arg3) -{ - if (XEUNICODE_P) - return GetEnhMetaFileDescriptionW (arg1, arg2, (LPWSTR) arg3); - else - return GetEnhMetaFileDescriptionA (arg1, arg2, (LPSTR) arg3); -} - -/* Skipping GetTextMetrics because split-sized LPTEXTMETRIC */ - -int -qxeStartDoc (HDC arg1, CONST DOCINFOW * arg2) -{ - if (XEUNICODE_P) - return StartDocW (arg1, arg2); - else - return StartDocA (arg1, (CONST DOCINFOA *) arg2); -} - -/* Skipping GetObject because split-sized LOGFONT */ - -BOOL -qxeTextOut (HDC arg1, int arg2, int arg3, const Extbyte * arg4, int arg5) -{ - if (XEUNICODE_P) - return TextOutW (arg1, arg2, arg3, (LPCWSTR) arg4, arg5); - else - return TextOutA (arg1, arg2, arg3, (LPCSTR) arg4, arg5); -} - -BOOL -qxeExtTextOut (HDC arg1, int arg2, int arg3, UINT arg4, CONST RECT * arg5, const Extbyte * arg6, UINT arg7, CONST INT * arg8) -{ - if (XEUNICODE_P) - return ExtTextOutW (arg1, arg2, arg3, arg4, arg5, (LPCWSTR) arg6, arg7, arg8); - else - return ExtTextOutA (arg1, arg2, arg3, arg4, arg5, (LPCSTR) arg6, arg7, arg8); -} - -BOOL -qxePolyTextOut (HDC arg1, CONST POLYTEXTW * arg2, int arg3) -{ - if (XEUNICODE_P) - return PolyTextOutW (arg1, arg2, arg3); - else - return PolyTextOutA (arg1, (CONST POLYTEXTA *) arg2, arg3); -} - -int -qxeGetTextFace (HDC arg1, int arg2, Extbyte * arg3) -{ - if (XEUNICODE_P) - return GetTextFaceW (arg1, arg2, (LPWSTR) arg3); - else - return GetTextFaceA (arg1, arg2, (LPSTR) arg3); -} - -DWORD -qxeGetKerningPairs (HDC arg1, DWORD arg2, LPKERNINGPAIR arg3) -{ - if (XEUNICODE_P) - return GetKerningPairsW (arg1, arg2, arg3); - else - return GetKerningPairsA (arg1, arg2, arg3); -} - -/* Error if GetLogColorSpace used: split-sized LPLOGCOLORSPACE; NT 4.0+ only */ - -/* Error if CreateColorSpace used: split-sized LPLOGCOLORSPACE; NT 4.0+ only */ - -/* Skipping GetICMProfile because NT 4.0+ only, error in Cygwin prototype */ - -/* NOTE: NT 4.0+ only */ -BOOL -qxeSetICMProfile (HDC arg1, Extbyte * arg2) -{ - if (XEUNICODE_P) - return SetICMProfileW (arg1, (LPWSTR) arg2); - else - return SetICMProfileA (arg1, (LPSTR) arg2); -} - -/* NOTE: NT 4.0+ only */ -int -qxeEnumICMProfiles (HDC arg1, ICMENUMPROCW arg2, LPARAM arg3) -{ - if (XEUNICODE_P) - return EnumICMProfilesW (arg1, arg2, arg3); - else - return EnumICMProfilesA (arg1, (ICMENUMPROCA) arg2, arg3); -} - -/* Skipping UpdateICMRegKey because NT 4.0+ only, error in Cygwin prototype */ - -/* Error if wglUseFontBitmaps used: causes link error */ - -/* Error if wglUseFontOutlines used: causes link error */ - +qxemciGetErrorString (MCIERROR mcierr, Extbyte * pszText, UINT cchText) +{ + if (XEUNICODE_P) + return mciGetErrorStringW (mcierr, (LPWSTR) pszText, cchText); + else + return mciGetErrorStringA (mcierr, (LPSTR) pszText, cchText); +} +