Release 980712
Sun Jul 12 16:23:36 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [server/*] [scheduler/client.c] (new files) [scheduler/sysdeps.c] [scheduler/thread.c] [scheduler/process.c] Beginnings of client/server communication for inter-process synchronisation. Sat Jul 11 19:45:45 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [include/bitmap.h] [objects/bitmap.c] [objects/dib.c] [objects/oembitmap.c] Speed up DIB section handling by using pre-allocated colormap and XImage. Moved DIB section data out of general BITMAPOBJ structure. Bugfix: GetDIBits32 would overwrite one byte beyond bitmap data. * [if1632/shell.spec] [if1632/kernel.spec] [win32/kernel32.c] More verbose error message if ThunkConnect fails. Implemented KERNEL_475. * [files/profile.c] [ole/ole2nls.c] Minor bugfixes. * [if1632/builtin.c] [if1632/kernel.spec] [include/task.h] [loader/ne/module.c] [loader/task.c] Implemented KERNEL.THHOOK. * [if1632/wprocs.spec] [include/process.h] [msdos/dpmi.c] [msdos/vxd.c] Implemented Win32s VxD services (W32S.386). Sat Jul 11 17:52:23 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [graphics/x11drv/xfont.c] [graphics/x11drv/text.c] [include/x11font.h] Improve handling of rotated X11 fonts. Metrics/extents should now be correct. ExtTextOut should behave better (still doesn't handle lpDx). * [graphics/painting.c] DrawFocusRect32: Don't do anything if width or height are zero. Sat Jul 11 15:21:35 1998 Andreas Mohr <100.30936@germany.net> * [files/profile.c] [include/windows.h] The length arguments of *Profile*() need to be treated as UINTxx instead of INTxx. * [graphics/env.c] [graphics/win16drv/init.c] [include/print.h] [misc/printdrv.c] Many printer driver fixes/changes (many thanks go to Huw !). Most printers should work again ;) * [memory/atom.c] Fixed ATOM_AddAtom to store atoms exactly like Windows. * [*/*] Fixed misc compiler warnings. Fri Jul 10 15:58:36 1998 Marcus Meissner <marcus@jet.franken.de> * [files/drive.c] Fixed GetDriveType16 to return DRIVE_REMOTE again. * [loader/pe_image.c][loader/module.c] Look for modules that have the same modulename or the same filename (they sometimes differ). Fixed up fixup_imports, removed one of the loops. * [windows/winpos.c] Added some NULL ptr checks. Needs more. * [graphics/ddraw.c] Some stubs added. * [if1632/snoop.c] Updated, made WINELIB compatible. Fri Jul 10 04:39:56 1998 Douglas Ridgway <ridgway@winehq.com> * [objects/enhmetafile.c] [relay32/gdi32.spec] Small tweaks for documentation system. Thu Jul 9 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [controls/commctrl.c][include/commctrl.h][relay32/comctl32.spec] Fixed GetEffectiveClientRect, CreateToolbarEx and CreateMappedBitmap. Added stub for ShowHideMenuCtl. Added some documentation. * [documentation/common_controls] Added and updated some information. * [controls/toolbar.c][include/toolbar.h] Added string support. * [misc/shell.c][misc/shellord.c][relay32/shell.spec] Changed names of undocumented functions to their real names and fixed the export table. * [controls/imagelist.c][relay32/comctl32.spec] Added stub for ImageList_SetFilter. Fixed some minor bugs and typos. * [objects/font.c][include/windows.h][relay32/gdi32.spec] Added stubs for GetCharacterPlacement32[A/W]. * [objects/region.c][relay32/gdi32.spec] Added stub for UNDOCUMENTED GetRandomRgn. * [controls/commctrl.c][controls/*.c][include/*.h] Added dummy listview, pager, rebar, tooltips, trackbar and treeview control. This keeps some programs from complaining. Thu Jul 9 11:23:58 1998 Rein Klazes <rklazes@casema.net> * [graphics/painting.c] [graphics/*/init.c] [graphics/x11drv/graphics.c] [relay32/gdi32.spec] [if1632/gdi.spec] [include/gdi.h] [include/x11drv.h] Implemented drawing bezier curves: PolyBezier16/32 and PolyBezierTo16/32. * [graphics/x11drv/graphics.c] Improved accuracy of several graphic routines, especially the drawing of pie's. * [include/windows.h] [misc/spy.c] Added 25 window messages related to programs based on MFC and/or OLE. Wed Jul 8 22:00:00 1998 James Juran <jrj120@psu.edu> * [documentation/wine.man] Updated manpage. * [wine.ini] Added section for Win95Look=true (commented out by default). Wed Jul 8 06:23:19 1998 Matthew Becker <mbecker@glasscity.net> * [misc/registry.c] Fixed a crash in RegEnumValue32A when the dwType parameter is NULL. * [programs/regtest/regtest.c] Improved the printing of errors. * [misc/ntdll.c] Added stub for RtlFormatCurrentUserKeyPath. * [win32/console.c] Added stub for ScrollConsoleScreenBuffer. Mon Jul 6 16:41:47 1998 Per Lindstrm <pelinstr@algonet.se> * [include/windows.h] [relay32/kernel.spec] [win32/newfns.c] Added stubs for SleepEx and TerminateProcess. * [rc/README] Corrected a grammatical error. Mon Jul 3 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de> * [misc/shellord.c] Put some TRACE in. * [memory/string.c] Deleted unused variable in lstrcmpi32A. * [include/windows.h][memory/string.c] Added functions WideCharToLocal32 LocalToWideChar32 for OLE-strings * [include/shlobj.h][include/winerror.h][misc/shell.c] [ole/folders.c] Added definition of internal class pidlmgr. Changed definitions of EnumIDList, IShellFolder. Added some OLE error constants. Implemented EnumIDList, IShellFolder, IClassFactory, PidlMgr, SHELL32_DllGetClassObject, SHGetDesktopFolder, SHGetSpecialFolderLocation (half), SHGetPathFromIDList (!!This stuff is not finished yet!!) * [include/windows.h][misc/network][reley32/mpr.spec] Added stubs for WNetConnectionDialog32[A|W|API]. Added struct LPCONNECTDLGSTRUCT32[A|W] and some constants. Added some SetLastError(WN_NO_NETWORK) to the stubs. Fixed bufferhandling in WNetCancelConnection Added stub for MultinetGetErrorText[A|W] * [ole/ole2nls.c] Rewrote GetTimeFormat32A. Fri Jul 3 10:27:30 1998 Michael Poole <poole+@andrew.cmu.edu> * [graphics/ddraw.c] [tsx11/X11_calls] Implement IDirectDrawPalette_GetEntries. Use CopyColormapAndFree to avoid erasing previously-set palette entries. * [graphics/ddraw.c] [include/ddraw.h] [tools/make_X11wrappers] [tsx11/X11_calls] Provide a preliminary, not-yet-working framework for doing DirectDraw via Xlib or XShm as well as DGA. Tue Jun 30 00:16:09 1998 Marcel Baur <mbaur@g26.ethz.ch> * [ole/nls/*.nls] Added remaining 22 locales (including arabic locales).
This commit is contained in:
parent
ebfc0fee51
commit
642d3136de
20
ANNOUNCE
20
ANNOUNCE
|
@ -1,15 +1,15 @@
|
||||||
This is release 980628 of Wine, the MS Windows emulator. This is still a
|
This is release 980712 of Wine, the MS Windows emulator. This is still a
|
||||||
developer's only release. There are many bugs and many unimplemented API
|
developer's only release. There are many bugs and many unimplemented API
|
||||||
features. Most applications still do not work correctly.
|
features. Most applications still do not work correctly.
|
||||||
|
|
||||||
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
|
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
|
||||||
forget to include a ChangeLog entry.
|
forget to include a ChangeLog entry.
|
||||||
|
|
||||||
WHAT'S NEW with Wine-980628: (see ChangeLog for details)
|
WHAT'S NEW with Wine-980712: (see ChangeLog for details)
|
||||||
- Common controls improvements.
|
- More common controls stuff.
|
||||||
- Win16 DLL snooping.
|
- Win32s VxD support.
|
||||||
- Preliminary internal Postscript driver.
|
- Beginnings of client/server architecture.
|
||||||
- Improved DIB section handling.
|
- More NLS support.
|
||||||
- Lots of bug fixes.
|
- Lots of bug fixes.
|
||||||
|
|
||||||
See the README file in the distribution for installation instructions.
|
See the README file in the distribution for installation instructions.
|
||||||
|
@ -18,10 +18,10 @@ Because of lags created by using mirror, this message may reach you before
|
||||||
the release is available at the ftp sites. The sources will be available
|
the release is available at the ftp sites. The sources will be available
|
||||||
from the following locations:
|
from the following locations:
|
||||||
|
|
||||||
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-980628.tar.gz
|
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-980712.tar.gz
|
||||||
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-980628.tar.gz
|
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-980712.tar.gz
|
||||||
ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/Wine-980628.tar.gz
|
ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/Wine-980712.tar.gz
|
||||||
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-980628.tar.gz
|
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-980712.tar.gz
|
||||||
|
|
||||||
It should also be available from any site that mirrors tsx-11 or sunsite.
|
It should also be available from any site that mirrors tsx-11 or sunsite.
|
||||||
|
|
||||||
|
|
3
AUTHORS
3
AUTHORS
|
@ -57,6 +57,7 @@ Bang Jun-Young,
|
||||||
Pavel Kankovsky,
|
Pavel Kankovsky,
|
||||||
Jochen Karrer,
|
Jochen Karrer,
|
||||||
Andreas Kirschbaum,
|
Andreas Kirschbaum,
|
||||||
|
Rein Klazes,
|
||||||
Albrecht Kleine,
|
Albrecht Kleine,
|
||||||
Eric Kohl,
|
Eric Kohl,
|
||||||
Jon Konrath,
|
Jon Konrath,
|
||||||
|
@ -66,6 +67,7 @@ Anand Kumria,
|
||||||
Scott A. Laird,
|
Scott A. Laird,
|
||||||
David Lee Lambert,
|
David Lee Lambert,
|
||||||
Andrew Lewycky,
|
Andrew Lewycky,
|
||||||
|
Per Lindström,
|
||||||
Martin von Loewis,
|
Martin von Loewis,
|
||||||
Michiel van Loon,
|
Michiel van Loon,
|
||||||
Kenneth MacDonald,
|
Kenneth MacDonald,
|
||||||
|
@ -102,6 +104,7 @@ Daniel Schepler,
|
||||||
Peter Schlaile,
|
Peter Schlaile,
|
||||||
Ulrich Schmid,
|
Ulrich Schmid,
|
||||||
Bernd Schmidt,
|
Bernd Schmidt,
|
||||||
|
Juergen Schmied,
|
||||||
Ingo Schneider,
|
Ingo Schneider,
|
||||||
Victor Schneider,
|
Victor Schneider,
|
||||||
Yngvi Sigurjonsson,
|
Yngvi Sigurjonsson,
|
||||||
|
|
210
ChangeLog
210
ChangeLog
|
@ -1,3 +1,209 @@
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
Sun Jul 12 16:23:36 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
|
||||||
|
|
||||||
|
* [server/*] [scheduler/client.c] (new files)
|
||||||
|
[scheduler/sysdeps.c] [scheduler/thread.c] [scheduler/process.c]
|
||||||
|
Beginnings of client/server communication for inter-process
|
||||||
|
synchronisation.
|
||||||
|
|
||||||
|
Sat Jul 11 19:45:45 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
|
||||||
|
|
||||||
|
* [include/bitmap.h] [objects/bitmap.c] [objects/dib.c]
|
||||||
|
[objects/oembitmap.c]
|
||||||
|
Speed up DIB section handling by using pre-allocated colormap and
|
||||||
|
XImage. Moved DIB section data out of general BITMAPOBJ structure.
|
||||||
|
Bugfix: GetDIBits32 would overwrite one byte beyond bitmap data.
|
||||||
|
|
||||||
|
* [if1632/shell.spec] [if1632/kernel.spec] [win32/kernel32.c]
|
||||||
|
More verbose error message if ThunkConnect fails.
|
||||||
|
Implemented KERNEL_475.
|
||||||
|
|
||||||
|
* [files/profile.c] [ole/ole2nls.c]
|
||||||
|
Minor bugfixes.
|
||||||
|
|
||||||
|
* [if1632/builtin.c] [if1632/kernel.spec] [include/task.h]
|
||||||
|
[loader/ne/module.c] [loader/task.c]
|
||||||
|
Implemented KERNEL.THHOOK.
|
||||||
|
|
||||||
|
* [if1632/wprocs.spec] [include/process.h] [msdos/dpmi.c] [msdos/vxd.c]
|
||||||
|
Implemented Win32s VxD services (W32S.386).
|
||||||
|
|
||||||
|
Sat Jul 11 17:52:23 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
|
||||||
|
|
||||||
|
* [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
|
||||||
|
[include/x11font.h]
|
||||||
|
Improve handling of rotated X11 fonts. Metrics/extents should now be
|
||||||
|
correct. ExtTextOut should behave better (still doesn't handle lpDx).
|
||||||
|
|
||||||
|
* [graphics/painting.c]
|
||||||
|
DrawFocusRect32: Don't do anything if width or height are zero.
|
||||||
|
|
||||||
|
Sat Jul 11 15:21:35 1998 Andreas Mohr <100.30936@germany.net>
|
||||||
|
|
||||||
|
* [files/profile.c] [include/windows.h]
|
||||||
|
The length arguments of *Profile*() need to be treated
|
||||||
|
as UINTxx instead of INTxx.
|
||||||
|
|
||||||
|
* [graphics/env.c] [graphics/win16drv/init.c] [include/print.h]
|
||||||
|
[misc/printdrv.c]
|
||||||
|
Many printer driver fixes/changes (many thanks go to Huw !).
|
||||||
|
Most printers should work again ;)
|
||||||
|
|
||||||
|
* [memory/atom.c]
|
||||||
|
Fixed ATOM_AddAtom to store atoms exactly like Windows.
|
||||||
|
|
||||||
|
* [*/*]
|
||||||
|
Fixed misc compiler warnings.
|
||||||
|
|
||||||
|
Fri Jul 10 15:58:36 1998 Marcus Meissner <marcus@jet.franken.de>
|
||||||
|
|
||||||
|
* [files/drive.c]
|
||||||
|
Fixed GetDriveType16 to return DRIVE_REMOTE again.
|
||||||
|
|
||||||
|
* [loader/pe_image.c][loader/module.c]
|
||||||
|
Look for modules that have the same modulename or the same
|
||||||
|
filename (they sometimes differ).
|
||||||
|
Fixed up fixup_imports, removed one of the loops.
|
||||||
|
|
||||||
|
* [windows/winpos.c]
|
||||||
|
Added some NULL ptr checks. Needs more.
|
||||||
|
|
||||||
|
* [graphics/ddraw.c]
|
||||||
|
Some stubs added.
|
||||||
|
|
||||||
|
* [if1632/snoop.c]
|
||||||
|
Updated, made WINELIB compatible.
|
||||||
|
|
||||||
|
Fri Jul 10 04:39:56 1998 Douglas Ridgway <ridgway@winehq.com>
|
||||||
|
|
||||||
|
* [objects/enhmetafile.c] [relay32/gdi32.spec]
|
||||||
|
Small tweaks for documentation system.
|
||||||
|
|
||||||
|
Thu Jul 9 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
|
||||||
|
|
||||||
|
* [controls/commctrl.c][include/commctrl.h][relay32/comctl32.spec]
|
||||||
|
Fixed GetEffectiveClientRect, CreateToolbarEx and CreateMappedBitmap.
|
||||||
|
Added stub for ShowHideMenuCtl. Added some documentation.
|
||||||
|
|
||||||
|
* [documentation/common_controls]
|
||||||
|
Added and updated some information.
|
||||||
|
|
||||||
|
* [controls/toolbar.c][include/toolbar.h]
|
||||||
|
Added string support.
|
||||||
|
|
||||||
|
* [misc/shell.c][misc/shellord.c][relay32/shell.spec]
|
||||||
|
Changed names of undocumented functions to their real names and
|
||||||
|
fixed the export table.
|
||||||
|
|
||||||
|
* [controls/imagelist.c][relay32/comctl32.spec]
|
||||||
|
Added stub for ImageList_SetFilter.
|
||||||
|
Fixed some minor bugs and typos.
|
||||||
|
|
||||||
|
* [objects/font.c][include/windows.h][relay32/gdi32.spec]
|
||||||
|
Added stubs for GetCharacterPlacement32[A/W].
|
||||||
|
|
||||||
|
* [objects/region.c][relay32/gdi32.spec]
|
||||||
|
Added stub for UNDOCUMENTED GetRandomRgn.
|
||||||
|
|
||||||
|
* [controls/commctrl.c][controls/*.c][include/*.h]
|
||||||
|
Added dummy listview, pager, rebar, tooltips, trackbar and
|
||||||
|
treeview control. This keeps some programs from complaining.
|
||||||
|
|
||||||
|
Thu Jul 9 11:23:58 1998 Rein Klazes <rklazes@casema.net>
|
||||||
|
|
||||||
|
* [graphics/painting.c] [graphics/*/init.c]
|
||||||
|
[graphics/x11drv/graphics.c] [relay32/gdi32.spec]
|
||||||
|
[if1632/gdi.spec] [include/gdi.h] [include/x11drv.h]
|
||||||
|
Implemented drawing bezier curves: PolyBezier16/32 and
|
||||||
|
PolyBezierTo16/32.
|
||||||
|
|
||||||
|
* [graphics/x11drv/graphics.c]
|
||||||
|
Improved accuracy of several graphic routines, especially the
|
||||||
|
drawing of pie's.
|
||||||
|
|
||||||
|
* [include/windows.h] [misc/spy.c]
|
||||||
|
Added 25 window messages related to programs based on MFC and/or OLE.
|
||||||
|
|
||||||
|
Wed Jul 8 22:00:00 1998 James Juran <jrj120@psu.edu>
|
||||||
|
|
||||||
|
* [documentation/wine.man]
|
||||||
|
Updated manpage.
|
||||||
|
|
||||||
|
* [wine.ini]
|
||||||
|
Added section for Win95Look=true (commented out by default).
|
||||||
|
|
||||||
|
Wed Jul 8 06:23:19 1998 Matthew Becker <mbecker@glasscity.net>
|
||||||
|
|
||||||
|
* [misc/registry.c]
|
||||||
|
Fixed a crash in RegEnumValue32A when the dwType parameter is
|
||||||
|
NULL.
|
||||||
|
|
||||||
|
* [programs/regtest/regtest.c]
|
||||||
|
Improved the printing of errors.
|
||||||
|
|
||||||
|
* [misc/ntdll.c]
|
||||||
|
Added stub for RtlFormatCurrentUserKeyPath.
|
||||||
|
|
||||||
|
* [win32/console.c]
|
||||||
|
Added stub for ScrollConsoleScreenBuffer.
|
||||||
|
|
||||||
|
Mon Jul 6 16:41:47 1998 Per Lindström <pelinstr@algonet.se>
|
||||||
|
|
||||||
|
* [include/windows.h] [relay32/kernel.spec] [win32/newfns.c]
|
||||||
|
Added stubs for SleepEx and TerminateProcess.
|
||||||
|
|
||||||
|
* [rc/README]
|
||||||
|
Corrected a grammatical error.
|
||||||
|
|
||||||
|
Mon Jul 3 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
|
||||||
|
|
||||||
|
* [misc/shellord.c]
|
||||||
|
Put some TRACE in.
|
||||||
|
|
||||||
|
* [memory/string.c]
|
||||||
|
Deleted unused variable in lstrcmpi32A.
|
||||||
|
|
||||||
|
* [include/windows.h][memory/string.c]
|
||||||
|
Added functions WideCharToLocal32 LocalToWideChar32 for
|
||||||
|
OLE-strings
|
||||||
|
|
||||||
|
* [include/shlobj.h][include/winerror.h][misc/shell.c]
|
||||||
|
[ole/folders.c]
|
||||||
|
Added definition of internal class pidlmgr.
|
||||||
|
Changed definitions of EnumIDList, IShellFolder.
|
||||||
|
Added some OLE error constants.
|
||||||
|
Implemented EnumIDList, IShellFolder, IClassFactory,
|
||||||
|
PidlMgr, SHELL32_DllGetClassObject, SHGetDesktopFolder,
|
||||||
|
SHGetSpecialFolderLocation (half), SHGetPathFromIDList
|
||||||
|
(!!This stuff is not finished yet!!)
|
||||||
|
|
||||||
|
* [include/windows.h][misc/network][reley32/mpr.spec]
|
||||||
|
Added stubs for WNetConnectionDialog32[A|W|API].
|
||||||
|
Added struct LPCONNECTDLGSTRUCT32[A|W] and some constants.
|
||||||
|
Added some SetLastError(WN_NO_NETWORK) to the stubs.
|
||||||
|
Fixed bufferhandling in WNetCancelConnection
|
||||||
|
Added stub for MultinetGetErrorText[A|W]
|
||||||
|
|
||||||
|
* [ole/ole2nls.c]
|
||||||
|
Rewrote GetTimeFormat32A.
|
||||||
|
|
||||||
|
Fri Jul 3 10:27:30 1998 Michael Poole <poole+@andrew.cmu.edu>
|
||||||
|
|
||||||
|
* [graphics/ddraw.c] [tsx11/X11_calls]
|
||||||
|
Implement IDirectDrawPalette_GetEntries.
|
||||||
|
Use CopyColormapAndFree to avoid erasing previously-set
|
||||||
|
palette entries.
|
||||||
|
|
||||||
|
* [graphics/ddraw.c] [include/ddraw.h]
|
||||||
|
[tools/make_X11wrappers] [tsx11/X11_calls]
|
||||||
|
Provide a preliminary, not-yet-working framework for doing
|
||||||
|
DirectDraw via Xlib or XShm as well as DGA.
|
||||||
|
|
||||||
|
Tue Jun 30 00:16:09 1998 Marcel Baur <mbaur@g26.ethz.ch>
|
||||||
|
|
||||||
|
* [ole/nls/*.nls]
|
||||||
|
Added remaining 22 locales (including arabic locales).
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
Sun Jun 28 18:37:02 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
|
Sun Jun 28 18:37:02 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
|
||||||
|
|
||||||
|
@ -4102,7 +4308,7 @@ Sun May 25 14:59:33 1997 Jimen Ching <jching@flex.com>
|
||||||
Fixed pointer copy of args keywords array.
|
Fixed pointer copy of args keywords array.
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
Tue May 20 19:20:23 1997 Pablo Saratxaga <srtxg@linux.chanae.stben.be>
|
Tue May 20 19:20:23 1997 Pablo Saratxaga <srtxg@chanae.alphanet.ch>
|
||||||
|
|
||||||
* [resources/sysres_Es.rc]
|
* [resources/sysres_Es.rc]
|
||||||
Updated CHOOSE_FONT, CHOOSE_COLOR, EDITMENU for Spanish.
|
Updated CHOOSE_FONT, CHOOSE_COLOR, EDITMENU for Spanish.
|
||||||
|
@ -4544,7 +4750,7 @@ Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk>
|
||||||
* [files/*]
|
* [files/*]
|
||||||
Fix function names in error messages.
|
Fix function names in error messages.
|
||||||
|
|
||||||
Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be>
|
Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.alphanet.ch>
|
||||||
|
|
||||||
* [windows/keyboard.c] [windows/message.c]
|
* [windows/keyboard.c] [windows/message.c]
|
||||||
Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9}
|
Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9}
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
# Main target to build
|
# Main target to build
|
||||||
|
|
||||||
MAIN_TARGET = @MAIN_TARGET@
|
MAIN_TARGET = @MAIN_TARGET@
|
||||||
LIB_TARGET = @LIB_TARGET@
|
|
||||||
|
|
||||||
# Directories
|
# Directories
|
||||||
|
|
||||||
|
@ -44,6 +43,7 @@ LIBSUBDIRS = \
|
||||||
relay32 \
|
relay32 \
|
||||||
resources \
|
resources \
|
||||||
scheduler \
|
scheduler \
|
||||||
|
server \
|
||||||
tsx11 \
|
tsx11 \
|
||||||
win32 \
|
win32 \
|
||||||
windows
|
windows
|
||||||
|
@ -90,6 +90,7 @@ LIBOBJS = \
|
||||||
relay32/relay32.o \
|
relay32/relay32.o \
|
||||||
resources/resources.o \
|
resources/resources.o \
|
||||||
scheduler/scheduler.o \
|
scheduler/scheduler.o \
|
||||||
|
server/server.o \
|
||||||
tsx11/tsx11.o \
|
tsx11/tsx11.o \
|
||||||
win32/win32.o \
|
win32/win32.o \
|
||||||
windows/windows.o
|
windows/windows.o
|
||||||
|
@ -101,6 +102,8 @@ EMUOBJS = \
|
||||||
if1632/if1632.o \
|
if1632/if1632.o \
|
||||||
miscemu/miscemu.o
|
miscemu/miscemu.o
|
||||||
|
|
||||||
|
LIB_TARGET = @LIB_TARGET@
|
||||||
|
|
||||||
all: $(MAIN_TARGET)
|
all: $(MAIN_TARGET)
|
||||||
|
|
||||||
@MAKE_RULES@
|
@MAKE_RULES@
|
||||||
|
|
|
@ -26,6 +26,10 @@ AC_ARG_ENABLE(dll,
|
||||||
[ --enable-dll build the Wine library as a DLL],
|
[ --enable-dll build the Wine library as a DLL],
|
||||||
[if test "$enableval" = "no"; then : ; else LIB_TARGET="libwine.so.1.0"; fi])
|
[if test "$enableval" = "no"; then : ; else LIB_TARGET="libwine.so.1.0"; fi])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(lib,
|
||||||
|
[ --disable-lib build the Wine without building libwine.a],
|
||||||
|
[if test "$enableval" = "no"; then LIB_TARGET="\$LIBOBJS"; fi])
|
||||||
|
|
||||||
dnl AC_ARG_WITH(ipc,
|
dnl AC_ARG_WITH(ipc,
|
||||||
dnl [ --enable-ipc use inter-process communication for DDE],
|
dnl [ --enable-ipc use inter-process communication for DDE],
|
||||||
dnl [if test "$enableval" = "no"; then : ; else OPTIONS="-DCONFIG_IPC"; fi])
|
dnl [if test "$enableval" = "no"; then : ; else OPTIONS="-DCONFIG_IPC"; fi])
|
||||||
|
@ -470,6 +474,7 @@ rc/Makefile
|
||||||
relay32/Makefile
|
relay32/Makefile
|
||||||
resources/Makefile
|
resources/Makefile
|
||||||
scheduler/Makefile
|
scheduler/Makefile
|
||||||
|
server/Makefile
|
||||||
tools/Makefile
|
tools/Makefile
|
||||||
tools/wrc/Makefile
|
tools/wrc/Makefile
|
||||||
tsx11/Makefile
|
tsx11/Makefile
|
||||||
|
|
|
@ -15,12 +15,18 @@ C_SRCS = \
|
||||||
header.c \
|
header.c \
|
||||||
icontitle.c \
|
icontitle.c \
|
||||||
listbox.c \
|
listbox.c \
|
||||||
|
listview.c \
|
||||||
menu.c \
|
menu.c \
|
||||||
|
pager.c \
|
||||||
progress.c \
|
progress.c \
|
||||||
|
rebar.c \
|
||||||
scroll.c \
|
scroll.c \
|
||||||
static.c \
|
static.c \
|
||||||
status.c \
|
status.c \
|
||||||
toolbar.c \
|
toolbar.c \
|
||||||
|
tooltips.c \
|
||||||
|
trackbar.c \
|
||||||
|
treeview.c \
|
||||||
uitools.c \
|
uitools.c \
|
||||||
updown.c \
|
updown.c \
|
||||||
widgets.c
|
widgets.c
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* All of these functions are UNDOCUMENTED!! And I mean UNDOCUMENTED!!!!
|
* All of these functions are UNDOCUMENTED!! And I mean UNDOCUMENTED!!!!
|
||||||
* Do NOT rely on names of undocumented structures and types!!!
|
* Do NOT rely on names or contents of undocumented structures and types!!!
|
||||||
* These functions are used by EXPLORER.EXE, IEXPLORE.EXE and
|
* These functions are used by EXPLORER.EXE, IEXPLORE.EXE and
|
||||||
* COMCTL32.DLL (internally).
|
* COMCTL32.DLL (internally).
|
||||||
*
|
*
|
||||||
|
@ -16,6 +16,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include "heap.h"
|
#include "heap.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
@ -50,64 +51,91 @@ DWORD WINAPI DPA_InsertPtr (DWORD, DWORD, DWORD);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Alloc [COMCTL32.71]
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
DWORD WINAPI
|
LPVOID WINAPI
|
||||||
COMCTL32_Alloc (DWORD dwParam)
|
COMCTL32_Alloc (DWORD dwParam)
|
||||||
{
|
{
|
||||||
DWORD dwPtr;
|
LPVOID lpPtr;
|
||||||
|
|
||||||
dwPtr = (DWORD)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, dwParam);
|
lpPtr = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, dwParam);
|
||||||
|
|
||||||
TRACE (commctrl, "(0x%08lx) ret=0x%08lx\n", dwParam, dwPtr);
|
TRACE (commctrl, "(0x%08lx) ret=0x%08lx\n", dwParam, (DWORD)lpPtr);
|
||||||
|
|
||||||
return dwPtr;
|
return lpPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DWORD WINAPI
|
/**************************************************************************
|
||||||
COMCTL32_ReAlloc (DWORD dwParam1, DWORD dwParam2)
|
* ReAlloc [COMCTL32.72]
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
LPVOID WINAPI
|
||||||
|
COMCTL32_ReAlloc (LPVOID dwParam1, DWORD dwParam2)
|
||||||
{
|
{
|
||||||
DWORD dwPtr;
|
LPVOID dwPtr;
|
||||||
|
|
||||||
if (dwParam1 == 0)
|
if (dwParam1 == 0)
|
||||||
dwPtr = (DWORD)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
dwPtr = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||||
dwParam2);
|
dwParam2);
|
||||||
else
|
else
|
||||||
dwPtr = (DWORD)HeapReAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
dwPtr = HeapReAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||||
(LPVOID)dwParam1, dwParam2);
|
dwParam1, dwParam2);
|
||||||
|
|
||||||
TRACE (commctrl, "(0x%08lx 0x%08lx) ret=0x%08lx\n",
|
TRACE (commctrl, "(0x%08lx 0x%08lx) ret=0x%08lx\n",
|
||||||
dwParam1, dwParam2, dwPtr);
|
(DWORD)dwParam1, dwParam2, (DWORD)dwPtr);
|
||||||
|
|
||||||
return dwPtr;
|
return dwPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Free [COMCTL32.73]
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
DWORD WINAPI
|
DWORD WINAPI
|
||||||
COMCTL32_Free (DWORD dwParam)
|
COMCTL32_Free (LPVOID dwParam)
|
||||||
{
|
{
|
||||||
TRACE (commctrl, "(0x%08lx)\n", dwParam);
|
TRACE (commctrl, "(0x%08lx)\n", (DWORD)dwParam);
|
||||||
HeapFree (GetProcessHeap (), 0, (LPVOID)dwParam);
|
HeapFree (GetProcessHeap (), 0, dwParam);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* GetSize [COMCTL32.74]
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
DWORD WINAPI
|
DWORD WINAPI
|
||||||
COMCTL32_GetSize (DWORD dwParam)
|
COMCTL32_GetSize (LPVOID dwParam)
|
||||||
{
|
{
|
||||||
TRACE (commctrl, "(0x%08lx)\n", dwParam);
|
TRACE (commctrl, "(0x%08lx)\n", (DWORD)dwParam);
|
||||||
return (HeapSize (GetProcessHeap (), 0, (LPVOID)dwParam));
|
return (HeapSize (GetProcessHeap (), 0, dwParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* DSA_Create [COMCTL32.320] Creates a dynamic string array
|
||||||
|
*
|
||||||
|
* PARAMS
|
||||||
|
* dwParam1 [I]
|
||||||
|
* dwParam2 [I]
|
||||||
|
*/
|
||||||
|
|
||||||
DWORD WINAPI
|
DWORD WINAPI
|
||||||
DSA_Create (DWORD dwParam1, DWORD dwParam2)
|
DSA_Create (DWORD dwParam1, DWORD dwParam2)
|
||||||
{
|
{
|
||||||
LPDSA_DATA dsaPtr;
|
LPDSA_DATA dsaPtr;
|
||||||
|
|
||||||
dsaPtr = (LPDSA_DATA)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY, sizeof(DSA_DATA));
|
dsaPtr = (LPDSA_DATA)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||||
|
sizeof(DSA_DATA));
|
||||||
dsaPtr->dwInitial = dwParam1;
|
dsaPtr->dwInitial = dwParam1;
|
||||||
dsaPtr->dwGrow = dwParam2;
|
dsaPtr->dwGrow = dwParam2;
|
||||||
|
|
||||||
|
@ -129,11 +157,11 @@ DSA_Destroy (DWORD dwParam1)
|
||||||
if (dsaPtr->ptrs) {
|
if (dsaPtr->ptrs) {
|
||||||
for (i = 0; i < dsaPtr->dwEntryCount; i++) {
|
for (i = 0; i < dsaPtr->dwEntryCount; i++) {
|
||||||
if (dsaPtr->ptrs[i])
|
if (dsaPtr->ptrs[i])
|
||||||
HeapFree (SystemHeap, 0, (LPSTR)dsaPtr->ptrs[i]);
|
HeapFree (GetProcessHeap (), 0, (LPSTR)dsaPtr->ptrs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HeapFree (SystemHeap, 0, dsaPtr);
|
HeapFree (GetProcessHeap (), 0, dsaPtr);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -142,10 +170,23 @@ DSA_Destroy (DWORD dwParam1)
|
||||||
DWORD WINAPI
|
DWORD WINAPI
|
||||||
DSA_GetItem (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
|
DSA_GetItem (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
|
||||||
{
|
{
|
||||||
|
LPDSA_DATA dsaPtr = (LPDSA_DATA)dwParam1;
|
||||||
|
|
||||||
FIXME (commctrl, "(0x%08lx 0x%08lx 0x%08lx): stub!\n",
|
FIXME (commctrl, "(0x%08lx 0x%08lx 0x%08lx): stub!\n",
|
||||||
dwParam1, dwParam2, dwParam3);
|
dwParam1, dwParam2, dwParam3);
|
||||||
|
|
||||||
return 0;
|
if (dsaPtr == NULL)
|
||||||
|
return 0;
|
||||||
|
if (dsaPtr->ptrs == NULL)
|
||||||
|
return 0;
|
||||||
|
if ((dwParam2 < 0) || (dwParam2 >= dsaPtr->dwEntryCount))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
// FIXME (commctrl, "\"%s\"\n", (LPSTR)dsaPtr->ptrs[dwParam2]);
|
||||||
|
|
||||||
|
return lstrcpy32A ((LPSTR)dwParam3, (LPSTR)dsaPtr->ptrs[dwParam2]);
|
||||||
|
|
||||||
|
// return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -180,13 +221,13 @@ DSA_InsertItem (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
|
||||||
dwParam1, dwParam2, (LPSTR)dwParam3);
|
dwParam1, dwParam2, (LPSTR)dwParam3);
|
||||||
|
|
||||||
if (dsaPtr->ptrs == NULL) {
|
if (dsaPtr->ptrs == NULL) {
|
||||||
dsaPtr->ptrs = (LPSTR*)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY,
|
dsaPtr->ptrs = (LPSTR*)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||||
dsaPtr->dwInitial * sizeof(LPVOID));
|
dsaPtr->dwInitial * sizeof(LPVOID));
|
||||||
dsaPtr->dwMaxCount = dsaPtr->dwInitial;
|
dsaPtr->dwMaxCount = dsaPtr->dwInitial;
|
||||||
dwIndex = 0;
|
dwIndex = 0;
|
||||||
len = lstrlen32A ((LPSTR)dwParam3);
|
len = lstrlen32A ((LPSTR)dwParam3);
|
||||||
dsaPtr->ptrs[dwIndex] =
|
dsaPtr->ptrs[dwIndex] =
|
||||||
(LPSTR)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY, len+1);
|
(LPSTR)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len+1);
|
||||||
lstrcpy32A (dsaPtr->ptrs[dwIndex], (LPSTR)dwParam3);
|
lstrcpy32A (dsaPtr->ptrs[dwIndex], (LPSTR)dwParam3);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -197,14 +238,26 @@ DSA_InsertItem (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
|
||||||
dwIndex = dsaPtr->dwEntryCount;
|
dwIndex = dsaPtr->dwEntryCount;
|
||||||
len = lstrlen32A ((LPSTR)dwParam3);
|
len = lstrlen32A ((LPSTR)dwParam3);
|
||||||
dsaPtr->ptrs[dwIndex] =
|
dsaPtr->ptrs[dwIndex] =
|
||||||
(LPSTR)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY, len+1);
|
(LPSTR)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len+1);
|
||||||
lstrcpy32A (dsaPtr->ptrs[dwIndex], (LPSTR)dwParam3);
|
lstrcpy32A (dsaPtr->ptrs[dwIndex], (LPSTR)dwParam3);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
FIXME (commctrl, "resizing array! stub!\n");
|
/* allocate new pointer list and copy all pointers */
|
||||||
|
LPSTR *lpOldPtrs = dsaPtr->ptrs;
|
||||||
dwIndex = dwParam2;
|
dsaPtr->ptrs = (LPSTR*)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY,
|
||||||
|
(dsaPtr->dwInitial + dsaPtr->dwGrow) *
|
||||||
|
sizeof(LPVOID));
|
||||||
|
memcpy (dsaPtr->ptrs, lpOldPtrs,
|
||||||
|
dsaPtr->dwMaxCount * sizeof(LPVOID));
|
||||||
|
dsaPtr->dwMaxCount += dsaPtr->dwGrow;
|
||||||
|
HeapFree (GetProcessHeap (), 0, lpOldPtrs);
|
||||||
|
|
||||||
|
/* add new string */
|
||||||
|
dwIndex = dsaPtr->dwEntryCount;
|
||||||
|
len = lstrlen32A ((LPSTR)dwParam3);
|
||||||
|
dsaPtr->ptrs[dwIndex] =
|
||||||
|
(LPSTR)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len+1);
|
||||||
|
lstrcpy32A (dsaPtr->ptrs[dwIndex], (LPSTR)dwParam3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -235,7 +288,7 @@ DSA_DeleteItem (DWORD dwParam1, DWORD dwParam2)
|
||||||
if (dsaPtr->ptrs) {
|
if (dsaPtr->ptrs) {
|
||||||
if (dsaPtr->dwEntryCount == 1) {
|
if (dsaPtr->dwEntryCount == 1) {
|
||||||
if (dsaPtr->ptrs[dwParam2])
|
if (dsaPtr->ptrs[dwParam2])
|
||||||
HeapFree (SystemHeap, 0, dsaPtr->ptrs[dwParam2]);
|
HeapFree (GetProcessHeap (), 0, dsaPtr->ptrs[dwParam2]);
|
||||||
dsaPtr->dwEntryCount--;
|
dsaPtr->dwEntryCount--;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -243,11 +296,11 @@ DSA_DeleteItem (DWORD dwParam1, DWORD dwParam2)
|
||||||
TRACE (commctrl, "complex delete!\n");
|
TRACE (commctrl, "complex delete!\n");
|
||||||
|
|
||||||
if (dsaPtr->ptrs[dwParam2])
|
if (dsaPtr->ptrs[dwParam2])
|
||||||
HeapFree (SystemHeap, 0, dsaPtr->ptrs[dwParam2]);
|
HeapFree (GetProcessHeap (), 0, dsaPtr->ptrs[dwParam2]);
|
||||||
|
|
||||||
dsaPtr->dwEntryCount--;
|
dsaPtr->dwEntryCount--;
|
||||||
dsaPtr->ptrs =
|
dsaPtr->ptrs =
|
||||||
(LPSTR*)HeapAlloc (SystemHeap, HEAP_ZERO_MEMORY,
|
(LPSTR*)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||||
dsaPtr->dwEntryCount * sizeof(LPVOID));
|
dsaPtr->dwEntryCount * sizeof(LPVOID));
|
||||||
if (dwParam2 > 0) {
|
if (dwParam2 > 0) {
|
||||||
memcpy (&dsaPtr->ptrs[0], &oldPtrs[0],
|
memcpy (&dsaPtr->ptrs[0], &oldPtrs[0],
|
||||||
|
@ -258,11 +311,11 @@ DSA_DeleteItem (DWORD dwParam1, DWORD dwParam2)
|
||||||
memcpy (&dsaPtr->ptrs[dwParam2], &oldPtrs[dwParam2+1],
|
memcpy (&dsaPtr->ptrs[dwParam2], &oldPtrs[dwParam2+1],
|
||||||
(dsaPtr->dwEntryCount - dwParam2) * sizeof(LPSTR));
|
(dsaPtr->dwEntryCount - dwParam2) * sizeof(LPSTR));
|
||||||
}
|
}
|
||||||
HeapFree (SystemHeap, 0, oldPtrs);
|
HeapFree (GetProcessHeap (), 0, oldPtrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dsaPtr->dwEntryCount == 0) {
|
if (dsaPtr->dwEntryCount == 0) {
|
||||||
HeapFree (SystemHeap, 0, dsaPtr->ptrs);
|
HeapFree (GetProcessHeap (), 0, dsaPtr->ptrs);
|
||||||
dsaPtr->ptrs = NULL;
|
dsaPtr->ptrs = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -341,9 +394,70 @@ DPA_InsertPtr (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* DPA_CreateEx [COMCTL32.340]
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
DWORD WINAPI
|
||||||
|
DPA_CreateEx (DWORD dwParam1, DWORD dwParam2)
|
||||||
|
{
|
||||||
|
FIXME (commctrl, "(0x%08lx 0x%08lx)\n",
|
||||||
|
dwParam1, dwParam2);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* SendNotify [COMCTL32.341]
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
DWORD WINAPI
|
||||||
|
COMCTL32_SendNotify (DWORD dw1, DWORD dw2, DWORD dw3, DWORD dw4)
|
||||||
|
{
|
||||||
|
FIXME (commctrl, "(0x%08lx 0x%08lx 0x%08lx 0x%08lx)\n",
|
||||||
|
dw1, dw2, dw3, dw4);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* StrChrA [COMCTL32.350]
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
LPSTR WINAPI
|
LPSTR WINAPI
|
||||||
COMCTL32_StrChrA (LPSTR lpString, CHAR cChar)
|
COMCTL32_StrChrA (LPSTR lpString, CHAR cChar)
|
||||||
{
|
{
|
||||||
return strchr (lpString, cChar);
|
return strchr (lpString, cChar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* StrStrIA [COMCTL32.350]
|
||||||
|
*
|
||||||
|
* BUGS
|
||||||
|
* This implementation is case sensitive, but it mustn't.
|
||||||
|
*/
|
||||||
|
|
||||||
|
LPSTR WINAPI
|
||||||
|
COMCTL32_StrStrIA (LPSTR lpStr1, LPSTR lpStr2)
|
||||||
|
{
|
||||||
|
return strstr (lpStr1, lpStr2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* StrToIntA [COMCTL32.357]
|
||||||
|
*/
|
||||||
|
|
||||||
|
INT32 WINAPI
|
||||||
|
COMCTL32_StrToIntA (LPSTR lpString)
|
||||||
|
{
|
||||||
|
return atoi(lpString);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
* Common controls functions
|
* Common controls functions
|
||||||
*
|
*
|
||||||
* Copyright 1997 Dimitrie O. Paun
|
* Copyright 1997 Dimitrie O. Paun
|
||||||
|
* Copyright 1998 Eric Kohl
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -9,43 +10,58 @@
|
||||||
#include "heap.h"
|
#include "heap.h"
|
||||||
#include "commctrl.h"
|
#include "commctrl.h"
|
||||||
#include "header.h"
|
#include "header.h"
|
||||||
|
#include "listview.h"
|
||||||
|
#include "pager.h"
|
||||||
#include "progress.h"
|
#include "progress.h"
|
||||||
|
#include "rebar.h"
|
||||||
#include "status.h"
|
#include "status.h"
|
||||||
#include "toolbar.h"
|
#include "toolbar.h"
|
||||||
|
#include "tooltips.h"
|
||||||
|
#include "trackbar.h"
|
||||||
|
#include "treeview.h"
|
||||||
#include "updown.h"
|
#include "updown.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* DrawStatusText32A [COMCTL32.5][COMCTL32.27]
|
* DrawStatusText32A [COMCTL32.5][COMCTL32.27]
|
||||||
|
*
|
||||||
|
* Draws text with borders, like in a status bar.
|
||||||
|
*
|
||||||
|
* PARAMS
|
||||||
|
* hdc [I] handle to the window's display context
|
||||||
|
* lprc [I] pointer to a rectangle
|
||||||
|
* text [I] pointer to the text
|
||||||
|
* style [I]
|
||||||
*/
|
*/
|
||||||
void WINAPI DrawStatusText32A( HDC32 hdc, LPRECT32 lprc, LPCSTR text,
|
|
||||||
UINT32 style )
|
VOID WINAPI
|
||||||
|
DrawStatusText32A (HDC32 hdc, LPRECT32 lprc, LPCSTR text, UINT32 style)
|
||||||
{
|
{
|
||||||
RECT32 r = *lprc;
|
RECT32 r = *lprc;
|
||||||
UINT32 border = BDR_SUNKENOUTER;
|
UINT32 border = BDR_SUNKENOUTER;
|
||||||
|
|
||||||
if(style==SBT_POPOUT)
|
if (style == SBT_POPOUT)
|
||||||
border = BDR_RAISEDOUTER;
|
border = BDR_RAISEDOUTER;
|
||||||
else if(style==SBT_NOBORDERS)
|
else if (style == SBT_NOBORDERS)
|
||||||
border = 0;
|
border = 0;
|
||||||
|
|
||||||
DrawEdge32(hdc, &r, border, BF_RECT|BF_ADJUST|BF_MIDDLE);
|
DrawEdge32 (hdc, &r, border, BF_RECT|BF_ADJUST|BF_MIDDLE);
|
||||||
|
|
||||||
/* now draw text */
|
/* now draw text */
|
||||||
if (text) {
|
if (text) {
|
||||||
int oldbkmode = SetBkMode32(hdc, TRANSPARENT);
|
int oldbkmode = SetBkMode32 (hdc, TRANSPARENT);
|
||||||
r.left += 3;
|
r.left += 3;
|
||||||
DrawText32A(hdc, text, lstrlen32A(text),
|
DrawText32A (hdc, text, lstrlen32A(text),
|
||||||
&r, DT_LEFT|DT_VCENTER|DT_SINGLELINE);
|
&r, DT_LEFT|DT_VCENTER|DT_SINGLELINE);
|
||||||
if (oldbkmode != TRANSPARENT)
|
if (oldbkmode != TRANSPARENT)
|
||||||
SetBkMode32(hdc, oldbkmode);
|
SetBkMode32(hdc, oldbkmode);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* DrawStatusText32W (COMCTL32.28)
|
* DrawStatusText32W [COMCTL32.28]
|
||||||
*/
|
*/
|
||||||
void WINAPI DrawStatusText32W( HDC32 hdc, LPRECT32 lprc, LPCWSTR text,
|
void WINAPI DrawStatusText32W( HDC32 hdc, LPRECT32 lprc, LPCWSTR text,
|
||||||
UINT32 style )
|
UINT32 style )
|
||||||
|
@ -55,6 +71,7 @@ void WINAPI DrawStatusText32W( HDC32 hdc, LPRECT32 lprc, LPCWSTR text,
|
||||||
HeapFree( GetProcessHeap(), 0, p );
|
HeapFree( GetProcessHeap(), 0, p );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CreateStatusWindow32A [COMCTL32.6][COMCTL32.21]
|
* CreateStatusWindow32A [COMCTL32.6][COMCTL32.21]
|
||||||
*/
|
*/
|
||||||
|
@ -67,6 +84,7 @@ HWND32 WINAPI CreateStatusWindow32A( INT32 style, LPCSTR text, HWND32 parent,
|
||||||
parent, wid, 0, 0);
|
parent, wid, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CreateStatusWindow32W (COMCTL32.22)
|
* CreateStatusWindow32W (COMCTL32.22)
|
||||||
*/
|
*/
|
||||||
|
@ -102,8 +120,14 @@ HWND32 WINAPI CreateUpDownControl( DWORD style, INT32 x, INT32 y,
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* InitCommonControls [COMCTL32.17]
|
* InitCommonControls [COMCTL32.17]
|
||||||
*
|
*
|
||||||
|
* Registers the common controls.
|
||||||
*
|
*
|
||||||
|
* PARAMS
|
||||||
|
* None.
|
||||||
*
|
*
|
||||||
|
* NOTES
|
||||||
|
* Calls InitCommonControlsEx.
|
||||||
|
* InitCommonControlsEx should be used instead.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VOID WINAPI
|
VOID WINAPI
|
||||||
|
@ -121,8 +145,10 @@ InitCommonControls (VOID)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* InitCommonControlsEx [COMCTL32.81]
|
* InitCommonControlsEx [COMCTL32.81]
|
||||||
*
|
*
|
||||||
|
* Registers the common controls.
|
||||||
*
|
*
|
||||||
*
|
* PARAMS
|
||||||
|
* lpInitCtrls [I] pointer to a INITCOMMONCONTROLS structure.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BOOL32 WINAPI
|
BOOL32 WINAPI
|
||||||
|
@ -141,25 +167,25 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
|
||||||
|
|
||||||
switch (lpInitCtrls->dwICC & dwMask) {
|
switch (lpInitCtrls->dwICC & dwMask) {
|
||||||
case ICC_LISTVIEW_CLASSES:
|
case ICC_LISTVIEW_CLASSES:
|
||||||
TRACE (commctrl, "No listview class implemented!\n");
|
LISTVIEW_Register ();
|
||||||
HEADER_Register();
|
HEADER_Register ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ICC_TREEVIEW_CLASSES:
|
case ICC_TREEVIEW_CLASSES:
|
||||||
TRACE (commctrl, "No treeview class implemented!\n");
|
TREEVIEW_Register ();
|
||||||
TRACE (commctrl, "No tooltip class implemented!\n");
|
TOOLTIPS_Register ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ICC_BAR_CLASSES:
|
case ICC_BAR_CLASSES:
|
||||||
TOOLBAR_Register ();
|
TOOLBAR_Register ();
|
||||||
STATUS_Register ();
|
STATUS_Register ();
|
||||||
TRACE (commctrl, "No trackbar class implemented!\n");
|
TRACKBAR_Register ();
|
||||||
TRACE (commctrl, "No tooltip class implemented!\n");
|
TOOLTIPS_Register ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ICC_TAB_CLASSES:
|
case ICC_TAB_CLASSES:
|
||||||
TRACE (commctrl, "No tab class implemented!\n");
|
TRACE (commctrl, "No tab class implemented!\n");
|
||||||
TRACE (commctrl, "No tooltip class implemented!\n");
|
TOOLTIPS_Register ();
|
||||||
UPDOWN_Register ();
|
UPDOWN_Register ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -192,7 +218,7 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ICC_COOL_CLASSES:
|
case ICC_COOL_CLASSES:
|
||||||
TRACE (commctrl, "No rebar class implemented!\n");
|
REBAR_Register ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ICC_INTERNET_CLASSES:
|
case ICC_INTERNET_CLASSES:
|
||||||
|
@ -200,7 +226,7 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ICC_PAGESCROLLER_CLASS:
|
case ICC_PAGESCROLLER_CLASS:
|
||||||
TRACE (commctrl, "No page scroller class implemented!\n");
|
PAGER_Register ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ICC_NATIVEFNTCTL_CLASS:
|
case ICC_NATIVEFNTCTL_CLASS:
|
||||||
|
@ -220,9 +246,14 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* MenuHelp [COMCTL32.2]
|
* MenuHelp [COMCTL32.2]
|
||||||
*
|
*
|
||||||
*
|
* PARAMS
|
||||||
*
|
* uMsg
|
||||||
*
|
* wParam
|
||||||
|
* lParam
|
||||||
|
* hMainMenu
|
||||||
|
* hInst
|
||||||
|
* hwndStatus
|
||||||
|
* lpwIDs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VOID WINAPI
|
VOID WINAPI
|
||||||
|
@ -244,7 +275,7 @@ MenuHelp (UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, HMENU32 hMainMenu,
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (HIWORD(wParam) & MF_POPUP) {
|
if (HIWORD(wParam) & MF_POPUP) {
|
||||||
TRACE (commctrl, "popup menu selected!\n");
|
FIXME (commctrl, "popup 0x%08x 0x%08lx\n", wParam, lParam);
|
||||||
|
|
||||||
szStatusText[0] = 0;
|
szStatusText[0] = 0;
|
||||||
}
|
}
|
||||||
|
@ -289,16 +320,25 @@ CreateToolbarEx (HWND32 hwnd, DWORD style, UINT32 wID, INT32 nBitmaps,
|
||||||
(WPARAM32)uStructSize, 0);
|
(WPARAM32)uStructSize, 0);
|
||||||
|
|
||||||
/* set bitmap and button size */
|
/* set bitmap and button size */
|
||||||
|
SendMessage32A (hwndTB, TB_SETBITMAPSIZE, 0,
|
||||||
|
MAKELPARAM((WORD)dyBitmap, (WORD)dxBitmap));
|
||||||
|
#if 0
|
||||||
|
SendMessage32A (hwndTB, TB_SETBUTTONSIZE, 0,
|
||||||
|
MAKELONG((WORD)dyButton, (WORD)dxButton));
|
||||||
|
#endif
|
||||||
|
|
||||||
/* add bitmaps */
|
/* add bitmaps */
|
||||||
tbab.hInst = hBMInst;
|
if (nBitmaps > 0) {
|
||||||
tbab.nID = wBMID;
|
tbab.hInst = hBMInst;
|
||||||
SendMessage32A (hwndTB, TB_ADDBITMAP,
|
tbab.nID = wBMID;
|
||||||
(WPARAM32)nBitmaps, (LPARAM)&tbab);
|
SendMessage32A (hwndTB, TB_ADDBITMAP,
|
||||||
|
(WPARAM32)nBitmaps, (LPARAM)&tbab);
|
||||||
|
}
|
||||||
|
|
||||||
/* add buttons */
|
/* add buttons */
|
||||||
SendMessage32A (hwndTB, TB_ADDBUTTONS32A,
|
if (iNumButtons > 0)
|
||||||
(WPARAM32)iNumButtons, (LPARAM)lpButtons);
|
SendMessage32A (hwndTB, TB_ADDBUTTONS32A,
|
||||||
|
(WPARAM32)iNumButtons, (LPARAM)lpButtons);
|
||||||
}
|
}
|
||||||
|
|
||||||
return hwndTB;
|
return hwndTB;
|
||||||
|
@ -308,22 +348,100 @@ CreateToolbarEx (HWND32 hwnd, DWORD style, UINT32 wID, INT32 nBitmaps,
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CreateMappedBitmap [COMCTL32.8]
|
* CreateMappedBitmap [COMCTL32.8]
|
||||||
*
|
*
|
||||||
*
|
* PARAMS
|
||||||
*
|
* hInstance
|
||||||
|
* idBitmap
|
||||||
|
* wFlags
|
||||||
|
* lpColorMap
|
||||||
|
* iNumMaps
|
||||||
*/
|
*/
|
||||||
|
|
||||||
HBITMAP32 WINAPI
|
HBITMAP32 WINAPI
|
||||||
CreateMappedBitmap (HINSTANCE32 hInstance, INT32 idBitmap, UINT32 wFlags,
|
CreateMappedBitmap (HINSTANCE32 hInstance, INT32 idBitmap, UINT32 wFlags,
|
||||||
LPCOLORMAP lpColorMap, INT32 iNumMaps)
|
LPCOLORMAP lpColorMap, INT32 iNumMaps)
|
||||||
{
|
{
|
||||||
|
HGLOBAL32 hglb;
|
||||||
|
HRSRC32 hRsrc;
|
||||||
|
LPBITMAPINFOHEADER lpBitmap, lpBitmapInfo;
|
||||||
|
UINT32 nSize, nColorTableSize;
|
||||||
|
DWORD *pColorTable;
|
||||||
|
INT32 iColor, i, iMaps, nWidth, nHeight;
|
||||||
|
HDC32 hdcScreen;
|
||||||
HBITMAP32 hbm;
|
HBITMAP32 hbm;
|
||||||
|
LPCOLORMAP sysColorMap;
|
||||||
|
COLORMAP internalColorMap[4] =
|
||||||
|
{{0x000000, 0}, {0x808080, 0}, {0xC0C0C0, 0}, {0xFFFFFF, 0}};
|
||||||
|
|
||||||
FIXME (commctrl, "semi-stub!\n");
|
/* initialize pointer to colortable and default color table */
|
||||||
|
if (lpColorMap) {
|
||||||
|
iMaps = iNumMaps;
|
||||||
|
sysColorMap = lpColorMap;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
internalColorMap[0].to = GetSysColor32 (COLOR_BTNTEXT);
|
||||||
|
internalColorMap[1].to = GetSysColor32 (COLOR_BTNSHADOW);
|
||||||
|
internalColorMap[2].to = GetSysColor32 (COLOR_BTNFACE);
|
||||||
|
internalColorMap[3].to = GetSysColor32 (COLOR_BTNHIGHLIGHT);
|
||||||
|
iMaps = 4;
|
||||||
|
sysColorMap = (LPCOLORMAP)internalColorMap;
|
||||||
|
}
|
||||||
|
|
||||||
hbm = LoadBitmap32A (hInstance, MAKEINTRESOURCE32A(idBitmap));
|
hRsrc = FindResource32A (hInstance, (LPSTR)idBitmap, RT_BITMAP32A);
|
||||||
|
if (hRsrc == NULL)
|
||||||
|
return NULL;
|
||||||
|
hglb = LoadResource32 (hInstance, hRsrc);
|
||||||
|
if (hglb == NULL)
|
||||||
|
return NULL;
|
||||||
|
lpBitmap = (LPBITMAPINFOHEADER)LockResource32 (hglb);
|
||||||
|
if (lpBitmap == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
nColorTableSize = (1 << lpBitmap->biBitCount);
|
||||||
|
nSize = lpBitmap->biSize + nColorTableSize * sizeof(RGBQUAD);
|
||||||
|
lpBitmapInfo = (LPBITMAPINFOHEADER)GlobalAlloc32 (GMEM_FIXED, nSize);
|
||||||
|
if (lpBitmapInfo == NULL)
|
||||||
|
return NULL;
|
||||||
|
RtlMoveMemory (lpBitmapInfo, lpBitmap, nSize);
|
||||||
|
|
||||||
|
pColorTable = (DWORD*)(((LPBYTE)lpBitmapInfo)+(UINT32)lpBitmapInfo->biSize);
|
||||||
|
|
||||||
|
for (iColor = 0; iColor < nColorTableSize; iColor++) {
|
||||||
|
for (i = 0; i < iMaps; i++) {
|
||||||
|
if (pColorTable[iColor] == sysColorMap[i].from) {
|
||||||
|
#if 0
|
||||||
|
if (wFlags & CBS_MASKED) {
|
||||||
|
if (sysColorMap[i].to != COLOR_BTNTEXT)
|
||||||
|
pColorTable[iColor] = RGB(255, 255, 255);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
pColorTable[iColor] = sysColorMap[i].to;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nWidth = (INT32)lpBitmapInfo->biWidth;
|
||||||
|
nHeight = (INT32)lpBitmapInfo->biHeight;
|
||||||
|
hdcScreen = GetDC32 (NULL);
|
||||||
|
hbm = CreateCompatibleBitmap32 (hdcScreen, nWidth, nHeight);
|
||||||
|
if (hbm) {
|
||||||
|
HDC32 hdcDst = CreateCompatibleDC32 (hdcScreen);
|
||||||
|
HBITMAP32 hbmOld = SelectObject32 (hdcDst, hbm);
|
||||||
|
LPBYTE lpBits = (LPBYTE)(lpBitmap + 1);
|
||||||
|
lpBits += (1 << (lpBitmapInfo->biBitCount)) * sizeof(RGBQUAD);
|
||||||
|
StretchDIBits32 (hdcDst, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
|
||||||
|
lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS,
|
||||||
|
SRCCOPY);
|
||||||
|
SelectObject32 (hdcDst, hbmOld);
|
||||||
|
DeleteDC32 (hdcDst);
|
||||||
|
}
|
||||||
|
ReleaseDC32 (NULL, hdcScreen);
|
||||||
|
GlobalFree32 ((HGLOBAL32)lpBitmapInfo);
|
||||||
|
FreeResource32 (hglb);
|
||||||
|
|
||||||
return hbm;
|
return hbm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -358,28 +476,61 @@ CreateToolbar (HWND32 hwnd, DWORD style, UINT32 wID, INT32 nBitmaps,
|
||||||
VOID WINAPI
|
VOID WINAPI
|
||||||
GetEffectiveClientRect (HWND32 hwnd, LPRECT32 lpRect, LPINT32 lpInfo)
|
GetEffectiveClientRect (HWND32 hwnd, LPRECT32 lpRect, LPINT32 lpInfo)
|
||||||
{
|
{
|
||||||
RECT32 rcClient, rcCtrl;
|
RECT32 rcCtrl;
|
||||||
INT32 idCtrl, *lpRun;
|
INT32 *lpRun;
|
||||||
|
HWND32 hwndCtrl;
|
||||||
|
|
||||||
TRACE (commctrl, "hwnd=0x%08lx lpRect=0x%08lx lpInfo=0x%08lx\n",
|
TRACE (commctrl, "(0x%08lx 0x%08lx 0x%08lx)\n",
|
||||||
(DWORD)hwnd, (DWORD)lpRect, (DWORD)lpInfo);
|
(DWORD)hwnd, (DWORD)lpRect, (DWORD)lpInfo);
|
||||||
|
|
||||||
GetClientRect32 (hwnd, &rcClient);
|
GetClientRect32 (hwnd, lpRect);
|
||||||
#if 0
|
|
||||||
lpRun = lpInfo;
|
lpRun = lpInfo;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
lpRun += 3;
|
lpRun += 2;
|
||||||
idCtrl = *lpRun;
|
if (*lpRun == 0)
|
||||||
if (idCtrl) {
|
return;
|
||||||
TRACE (commctrl, "control id 0x%x\n", idCtrl);
|
lpRun++;
|
||||||
GetWindowRect32 (GetDlgItem32 (hwnd, idCtrl), &rcCtrl);
|
hwndCtrl = GetDlgItem32 (hwnd, *lpRun);
|
||||||
|
if (GetWindowLong32A (hwndCtrl, GWL_STYLE) & WS_VISIBLE) {
|
||||||
|
TRACE (commctrl, "control id 0x%x\n", *lpRun);
|
||||||
|
GetWindowRect32 (hwndCtrl, &rcCtrl);
|
||||||
MapWindowPoints32 (NULL, hwnd, (LPPOINT32)&rcCtrl, 2);
|
MapWindowPoints32 (NULL, hwnd, (LPPOINT32)&rcCtrl, 2);
|
||||||
SubtractRect32 (&rcClient, &rcClient, &rcCtrl);
|
SubtractRect32 (lpRect, lpRect, &rcCtrl);
|
||||||
lpRun++;
|
|
||||||
}
|
}
|
||||||
} while (idCtrl);
|
lpRun++;
|
||||||
#endif
|
} while (*lpRun);
|
||||||
CopyRect32 (lpRect, &rcClient);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* ShowHideMenuCtl [COMCTL32.3]
|
||||||
|
*
|
||||||
|
* PARAMS
|
||||||
|
* hwnd [I] handle to the client window.
|
||||||
|
* uFlags [I] menu command id
|
||||||
|
* lpInfo [I] pointer to an array of integers
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
*/
|
||||||
|
|
||||||
|
BOOL32 WINAPI
|
||||||
|
ShowHideMenuCtl (HWND32 hwnd, UINT32 uFlags, LPINT32 lpInfo)
|
||||||
|
{
|
||||||
|
FIXME (commctrl, "(0x%08x 0x%08x %p): empty stub!\n",
|
||||||
|
hwnd, uFlags, lpInfo);
|
||||||
|
#if 0
|
||||||
|
if (GetMenuState (lpInfo[1], uFlags, MF_BYCOMMAND) & MFS_CHECKED) {
|
||||||
|
/* checked -> hide control */
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* not checked -> show control */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,245 @@
|
||||||
|
/*
|
||||||
|
* Listview control
|
||||||
|
*
|
||||||
|
* Copyright 1998 Eric Kohl
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* This is just a dummy control. An author is needed! Any volunteers?
|
||||||
|
* I will only improve this control once in a while.
|
||||||
|
* Eric <ekohl@abo.rhein-zeitung.de>
|
||||||
|
*
|
||||||
|
* TODO:
|
||||||
|
* - All messages.
|
||||||
|
* - All notifications.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "windows.h"
|
||||||
|
#include "commctrl.h"
|
||||||
|
#include "listview.h"
|
||||||
|
#include "heap.h"
|
||||||
|
#include "win.h"
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define LISTVIEW_GetInfoPtr(wndPtr) ((LISTVIEW_INFO *)wndPtr->wExtra[0])
|
||||||
|
|
||||||
|
|
||||||
|
static VOID
|
||||||
|
LISTVIEW_Refresh (WND *wndPtr, HDC32 hdc)
|
||||||
|
{
|
||||||
|
LISTVIEW_INFO *infoPtr = LISTVIEW_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
LISTVIEW_SetBkColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
LISTVIEW_INFO *infoPtr = LISTVIEW_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
if (!(infoPtr)) return FALSE;
|
||||||
|
|
||||||
|
/* set background color */
|
||||||
|
infoPtr->clrBk = (COLORREF)lParam;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
LISTVIEW_SetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
LISTVIEW_INFO *infoPtr = LISTVIEW_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
fprintf (stderr, "LISTVIEW: SetImageList (0x%08x 0x%08lx)\n",
|
||||||
|
wParam, lParam);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
LISTVIEW_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
LISTVIEW_INFO *infoPtr = LISTVIEW_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
/* initialize info structure */
|
||||||
|
infoPtr->clrBk = CLR_NONE;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
LISTVIEW_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
LISTVIEW_INFO *infoPtr = LISTVIEW_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
LISTVIEW_EraseBackground (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
LISTVIEW_INFO *infoPtr = LISTVIEW_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
if (infoPtr->clrBk == CLR_NONE) {
|
||||||
|
return SendMessage32A (GetParent32 (wndPtr->hwndSelf),
|
||||||
|
WM_ERASEBKGND, wParam, lParam);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
RECT32 rect;
|
||||||
|
HBRUSH32 hBrush = CreateSolidBrush32 (infoPtr->clrBk);
|
||||||
|
GetClientRect32 (wndPtr->hwndSelf, &rect);
|
||||||
|
FillRect32 ((HDC32)wParam, &rect, hBrush);
|
||||||
|
DeleteObject32 (hBrush);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
LISTVIEW_NCCreate (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
LISTVIEW_INFO *infoPtr;
|
||||||
|
|
||||||
|
/* allocate memory for info structure */
|
||||||
|
infoPtr = (LISTVIEW_INFO *)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||||
|
sizeof(LISTVIEW_INFO));
|
||||||
|
wndPtr->wExtra[0] = (DWORD)infoPtr;
|
||||||
|
|
||||||
|
if (infoPtr == NULL) {
|
||||||
|
ERR (listview, "could not allocate info memory!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((LISTVIEW_INFO*)wndPtr->wExtra[0] != infoPtr) {
|
||||||
|
ERR (listview, "pointer assignment error!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return DefWindowProc32A (wndPtr->hwndSelf, WM_NCCREATE, wParam, lParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
LISTVIEW_NCDestroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
LISTVIEW_INFO *infoPtr = LISTVIEW_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* free list view info data */
|
||||||
|
HeapFree (GetProcessHeap (), 0, infoPtr);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
LISTVIEW_Paint (WND *wndPtr, WPARAM32 wParam)
|
||||||
|
{
|
||||||
|
HDC32 hdc;
|
||||||
|
PAINTSTRUCT32 ps;
|
||||||
|
|
||||||
|
hdc = wParam==0 ? BeginPaint32 (wndPtr->hwndSelf, &ps) : (HDC32)wParam;
|
||||||
|
LISTVIEW_Refresh (wndPtr, hdc);
|
||||||
|
if (!wParam)
|
||||||
|
EndPaint32 (wndPtr->hwndSelf, &ps);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LRESULT WINAPI
|
||||||
|
ListviewWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
WND *wndPtr = WIN_FindWndPtr(hwnd);
|
||||||
|
|
||||||
|
switch (uMsg)
|
||||||
|
{
|
||||||
|
|
||||||
|
case LVM_SETBKCOLOR:
|
||||||
|
return LISTVIEW_SetBkColor (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
|
||||||
|
case LVM_SETIMAGELIST:
|
||||||
|
return LISTVIEW_SetImageList (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// case WM_CHAR:
|
||||||
|
// case WM_COMMAND:
|
||||||
|
|
||||||
|
case WM_CREATE:
|
||||||
|
return LISTVIEW_Create (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_DESTROY:
|
||||||
|
return LISTVIEW_Destroy (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_ERASEBKGND:
|
||||||
|
return LISTVIEW_EraseBackground (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_GETDLGCODE:
|
||||||
|
// case WM_GETFONT:
|
||||||
|
// case WM_HSCROLL:
|
||||||
|
|
||||||
|
// case WM_MOUSEMOVE:
|
||||||
|
// return LISTVIEW_MouseMove (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_NCCREATE:
|
||||||
|
return LISTVIEW_NCCreate (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_NCDESTROY:
|
||||||
|
return LISTVIEW_NCDestroy (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_NOTIFY:
|
||||||
|
|
||||||
|
case WM_PAINT:
|
||||||
|
return LISTVIEW_Paint (wndPtr, wParam);
|
||||||
|
|
||||||
|
// case WM_RBUTTONDOWN:
|
||||||
|
// case WM_SETFOCUS:
|
||||||
|
// case WM_SETFONT:
|
||||||
|
// case WM_SETREDRAW:
|
||||||
|
// case WM_TIMER:
|
||||||
|
// case WM_VSCROLL:
|
||||||
|
// case WM_WINDOWPOSCHANGED:
|
||||||
|
// case WM_WININICHANGE:
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (uMsg >= WM_USER)
|
||||||
|
ERR (listview, "unknown msg %04x wp=%08x lp=%08lx\n",
|
||||||
|
uMsg, wParam, lParam);
|
||||||
|
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
LISTVIEW_Register (void)
|
||||||
|
{
|
||||||
|
WNDCLASS32A wndClass;
|
||||||
|
|
||||||
|
if (GlobalFindAtom32A (WC_LISTVIEW32A)) return;
|
||||||
|
|
||||||
|
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
|
||||||
|
wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS;
|
||||||
|
wndClass.lpfnWndProc = (WNDPROC32)ListviewWindowProc;
|
||||||
|
wndClass.cbClsExtra = 0;
|
||||||
|
wndClass.cbWndExtra = sizeof(LISTVIEW_INFO *);
|
||||||
|
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
|
||||||
|
wndClass.hbrBackground = (HBRUSH32)(COLOR_WINDOW + 1);
|
||||||
|
wndClass.lpszClassName = WC_LISTVIEW32A;
|
||||||
|
|
||||||
|
RegisterClass32A (&wndClass);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,75 @@
|
||||||
|
/*
|
||||||
|
* Pager control
|
||||||
|
*
|
||||||
|
* Copyright 1998 Eric Kohl
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* This is just a dummy control. An author is needed! Any volunteers?
|
||||||
|
* I will only improve this control once in a while.
|
||||||
|
* Eric <ekohl@abo.rhein-zeitung.de>
|
||||||
|
*
|
||||||
|
* TODO:
|
||||||
|
* - All messages.
|
||||||
|
* - All notifications.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "windows.h"
|
||||||
|
#include "commctrl.h"
|
||||||
|
#include "pager.h"
|
||||||
|
#include "heap.h"
|
||||||
|
#include "win.h"
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define PAGER_GetInfoPtr(wndPtr) ((PAGER_INFO *)wndPtr->wExtra[0])
|
||||||
|
|
||||||
|
|
||||||
|
LRESULT WINAPI
|
||||||
|
PagerWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
WND *wndPtr = WIN_FindWndPtr(hwnd);
|
||||||
|
|
||||||
|
switch (uMsg)
|
||||||
|
{
|
||||||
|
// case WM_CREATE:
|
||||||
|
// return PAGER_Create (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_DESTROY:
|
||||||
|
// return PAGER_Destroy (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_MOUSEMOVE:
|
||||||
|
// return PAGER_MouseMove (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_PAINT:
|
||||||
|
// return PAGER_Paint (wndPtr, wParam);
|
||||||
|
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (uMsg >= WM_USER)
|
||||||
|
ERR (pager, "unknown msg %04x wp=%08x lp=%08lx\n",
|
||||||
|
uMsg, wParam, lParam);
|
||||||
|
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
PAGER_Register (void)
|
||||||
|
{
|
||||||
|
WNDCLASS32A wndClass;
|
||||||
|
|
||||||
|
if (GlobalFindAtom32A (WC_PAGESCROLLER32A)) return;
|
||||||
|
|
||||||
|
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
|
||||||
|
wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS;
|
||||||
|
wndClass.lpfnWndProc = (WNDPROC32)PagerWindowProc;
|
||||||
|
wndClass.cbClsExtra = 0;
|
||||||
|
wndClass.cbWndExtra = sizeof(PAGER_INFO *);
|
||||||
|
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
|
||||||
|
wndClass.hbrBackground = 0;
|
||||||
|
wndClass.lpszClassName = WC_PAGESCROLLER32A;
|
||||||
|
|
||||||
|
RegisterClass32A (&wndClass);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
/*
|
||||||
|
* Rebar control
|
||||||
|
*
|
||||||
|
* Copyright 1998 Eric Kohl
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* This is just a dummy control. An author is needed! Any volunteers?
|
||||||
|
* I will only improve this control once in a while.
|
||||||
|
* Eric <ekohl@abo.rhein-zeitung.de>
|
||||||
|
*
|
||||||
|
* TODO:
|
||||||
|
* - All messages.
|
||||||
|
* - All notifications.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "windows.h"
|
||||||
|
#include "commctrl.h"
|
||||||
|
#include "rebar.h"
|
||||||
|
#include "heap.h"
|
||||||
|
#include "win.h"
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define REBAR_GetInfoPtr(wndPtr) ((REBAR_INFO *)wndPtr->wExtra[0])
|
||||||
|
|
||||||
|
|
||||||
|
LRESULT WINAPI
|
||||||
|
RebarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
WND *wndPtr = WIN_FindWndPtr(hwnd);
|
||||||
|
|
||||||
|
switch (uMsg)
|
||||||
|
{
|
||||||
|
// case WM_CREATE:
|
||||||
|
// return REBAR_Create (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_DESTROY:
|
||||||
|
// return REBAR_Destroy (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_GETFONT:
|
||||||
|
|
||||||
|
// case WM_MOUSEMOVE:
|
||||||
|
// return REBAR_MouseMove (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_PAINT:
|
||||||
|
// return REBAR_Paint (wndPtr, wParam);
|
||||||
|
|
||||||
|
// case WM_SETFONT:
|
||||||
|
|
||||||
|
// case WM_TIMER:
|
||||||
|
|
||||||
|
// case WM_WININICHANGE:
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (uMsg >= WM_USER)
|
||||||
|
ERR (rebar, "unknown msg %04x wp=%08x lp=%08lx\n",
|
||||||
|
uMsg, wParam, lParam);
|
||||||
|
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
REBAR_Register (void)
|
||||||
|
{
|
||||||
|
WNDCLASS32A wndClass;
|
||||||
|
|
||||||
|
if (GlobalFindAtom32A (REBARCLASSNAME32A)) return;
|
||||||
|
|
||||||
|
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
|
||||||
|
wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS;
|
||||||
|
wndClass.lpfnWndProc = (WNDPROC32)RebarWindowProc;
|
||||||
|
wndClass.cbClsExtra = 0;
|
||||||
|
wndClass.cbWndExtra = sizeof(REBAR_INFO *);
|
||||||
|
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
|
||||||
|
wndClass.hbrBackground = 0;
|
||||||
|
wndClass.lpszClassName = REBARCLASSNAME32A;
|
||||||
|
|
||||||
|
RegisterClass32A (&wndClass);
|
||||||
|
}
|
||||||
|
|
|
@ -3,13 +3,6 @@
|
||||||
*
|
*
|
||||||
* Copyright 1998 Eric Kohl
|
* Copyright 1998 Eric Kohl
|
||||||
*
|
*
|
||||||
* NOTES
|
|
||||||
* PLEASE don't try to improve or change this code right now. Many
|
|
||||||
* features are still missing, but I'm working on it. I want to avoid
|
|
||||||
* any confusion. This note will be removed as soon as most of the
|
|
||||||
* features are implemented.
|
|
||||||
* Eric <ekohl@abo.rhein-zeitung.de>
|
|
||||||
*
|
|
||||||
* TODO:
|
* TODO:
|
||||||
* - Bitmap drawing.
|
* - Bitmap drawing.
|
||||||
* - Button wrapping.
|
* - Button wrapping.
|
||||||
|
@ -68,6 +61,54 @@ TOOLBAR_DrawFlatSeparator (LPRECT32 lpRect, HDC32 hdc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
|
||||||
|
HDC32 hdc, INT32 nState)
|
||||||
|
{
|
||||||
|
RECT32 rcText = btnPtr->rect;
|
||||||
|
HFONT32 hOldFont;
|
||||||
|
INT32 nOldBkMode;
|
||||||
|
|
||||||
|
/* draw text */
|
||||||
|
if ((btnPtr->iString > -1) && (btnPtr->iString < infoPtr->nNumStrings)) {
|
||||||
|
|
||||||
|
InflateRect32 (&rcText, -3, -3);
|
||||||
|
rcText.top += infoPtr->nBitmapHeight;
|
||||||
|
if (nState & (TBSTATE_PRESSED | TBSTATE_CHECKED))
|
||||||
|
OffsetRect32 (&rcText, 1, 1);
|
||||||
|
|
||||||
|
hOldFont = SelectObject32 (hdc, infoPtr->hFont);
|
||||||
|
nOldBkMode = SetBkMode32 (hdc, TRANSPARENT);
|
||||||
|
if (!(nState & TBSTATE_ENABLED)) {
|
||||||
|
COLORREF clrOld =
|
||||||
|
SetTextColor32 (hdc, GetSysColor32 (COLOR_3DHILIGHT));
|
||||||
|
OffsetRect32 (&rcText, 1, 1);
|
||||||
|
DrawText32A (hdc, infoPtr->strings[btnPtr->iString], -1, &rcText,
|
||||||
|
DT_CENTER);
|
||||||
|
SetTextColor32 (hdc, GetSysColor32 (COLOR_3DSHADOW));
|
||||||
|
OffsetRect32 (&rcText, -1, -1);
|
||||||
|
DrawText32A (hdc, infoPtr->strings[btnPtr->iString], -1, &rcText,
|
||||||
|
DT_CENTER);
|
||||||
|
SetTextColor32 (hdc, clrOld);
|
||||||
|
}
|
||||||
|
else if (nState & TBSTATE_INDETERMINATE) {
|
||||||
|
COLORREF clrOld =
|
||||||
|
SetTextColor32 (hdc, GetSysColor32 (COLOR_3DSHADOW));
|
||||||
|
DrawText32A (hdc, infoPtr->strings[btnPtr->iString], -1, &rcText,
|
||||||
|
DT_CENTER);
|
||||||
|
SetTextColor32 (hdc, clrOld);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
DrawText32A (hdc, infoPtr->strings[btnPtr->iString], -1, &rcText,
|
||||||
|
DT_CENTER);
|
||||||
|
|
||||||
|
SelectObject32 (hdc, hOldFont);
|
||||||
|
if (nOldBkMode != TRANSPARENT)
|
||||||
|
SetBkMode32 (hdc, nOldBkMode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
|
TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
|
||||||
{
|
{
|
||||||
|
@ -92,6 +133,7 @@ TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
|
||||||
|
|
||||||
// ImageList_Draw (infoPtr->himlDis, btnPtr->iBitmap, hdc,
|
// ImageList_Draw (infoPtr->himlDis, btnPtr->iBitmap, hdc,
|
||||||
// rc.left+1, rc.top+1, ILD_NORMAL);
|
// rc.left+1, rc.top+1, ILD_NORMAL);
|
||||||
|
TOOLBAR_DrawString (infoPtr, btnPtr, hdc, btnPtr->fsState);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,6 +143,7 @@ TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
|
||||||
BF_RECT | BF_MIDDLE | BF_ADJUST);
|
BF_RECT | BF_MIDDLE | BF_ADJUST);
|
||||||
ImageList_Draw (infoPtr->himlDef, btnPtr->iBitmap, hdc,
|
ImageList_Draw (infoPtr->himlDef, btnPtr->iBitmap, hdc,
|
||||||
rc.left+2, rc.top+2, ILD_NORMAL);
|
rc.left+2, rc.top+2, ILD_NORMAL);
|
||||||
|
TOOLBAR_DrawString (infoPtr, btnPtr, hdc, btnPtr->fsState);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,6 +160,7 @@ TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
|
||||||
SelectObject32 (hdc, hbr);
|
SelectObject32 (hdc, hbr);
|
||||||
ImageList_Draw (infoPtr->himlDef, btnPtr->iBitmap, hdc,
|
ImageList_Draw (infoPtr->himlDef, btnPtr->iBitmap, hdc,
|
||||||
rc.left+2, rc.top+2, ILD_NORMAL);
|
rc.left+2, rc.top+2, ILD_NORMAL);
|
||||||
|
TOOLBAR_DrawString (infoPtr, btnPtr, hdc, btnPtr->fsState);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,6 +176,7 @@ TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
|
||||||
SelectObject32 (hdc, hbr);
|
SelectObject32 (hdc, hbr);
|
||||||
// ImageList_Draw (infoPtr->himlDis, btnPtr->iBitmap, hdc,
|
// ImageList_Draw (infoPtr->himlDis, btnPtr->iBitmap, hdc,
|
||||||
// rc.left+1, rc.top+1, ILD_NORMAL);
|
// rc.left+1, rc.top+1, ILD_NORMAL);
|
||||||
|
TOOLBAR_DrawString (infoPtr, btnPtr, hdc, btnPtr->fsState);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,10 +185,10 @@ TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
|
||||||
BF_SOFT | BF_RECT | BF_MIDDLE | BF_ADJUST);
|
BF_SOFT | BF_RECT | BF_MIDDLE | BF_ADJUST);
|
||||||
ImageList_Draw (infoPtr->himlDef, btnPtr->iBitmap, hdc,
|
ImageList_Draw (infoPtr->himlDef, btnPtr->iBitmap, hdc,
|
||||||
rc.left+1, rc.top+1, ILD_NORMAL);
|
rc.left+1, rc.top+1, ILD_NORMAL);
|
||||||
|
TOOLBAR_DrawString (infoPtr, btnPtr, hdc, btnPtr->fsState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
TOOLBAR_Refresh (WND *wndPtr, HDC32 hdc)
|
TOOLBAR_Refresh (WND *wndPtr, HDC32 hdc)
|
||||||
{
|
{
|
||||||
|
@ -158,6 +203,42 @@ TOOLBAR_Refresh (WND *wndPtr, HDC32 hdc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
TOOLBAR_CalcStrings (WND *wndPtr, LPSIZE32 lpSize)
|
||||||
|
{
|
||||||
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr);
|
||||||
|
TBUTTON_INFO *btnPtr;
|
||||||
|
INT32 i;
|
||||||
|
HDC32 hdc;
|
||||||
|
HFONT32 hOldFont;
|
||||||
|
SIZE32 sz;
|
||||||
|
|
||||||
|
lpSize->cx = 0;
|
||||||
|
lpSize->cy = 0;
|
||||||
|
hdc = GetDC32 (0);
|
||||||
|
hOldFont = SelectObject32 (hdc, infoPtr->hFont);
|
||||||
|
|
||||||
|
btnPtr = infoPtr->buttons;
|
||||||
|
for (i = 0; i < infoPtr->nNumButtons; i++, btnPtr++) {
|
||||||
|
if (!(btnPtr->fsState & TBSTATE_HIDDEN) &&
|
||||||
|
(btnPtr->iString > -1) &&
|
||||||
|
(btnPtr->iString < infoPtr->nNumStrings)) {
|
||||||
|
LPSTR lpText = infoPtr->strings[btnPtr->iString];
|
||||||
|
GetTextExtentPoint32A (hdc, lpText, lstrlen32A(lpText), &sz);
|
||||||
|
if (sz.cx > lpSize->cx)
|
||||||
|
lpSize->cx = sz.cx;
|
||||||
|
if (sz.cy > lpSize->cy)
|
||||||
|
lpSize->cy = sz.cy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SelectObject32 (hdc, hOldFont);
|
||||||
|
ReleaseDC32 (0, hdc);
|
||||||
|
|
||||||
|
TRACE (toolbar, "string size %d x %d!\n", lpSize->cx, lpSize->cy);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
TOOLBAR_CalcToolbar (WND *wndPtr)
|
TOOLBAR_CalcToolbar (WND *wndPtr)
|
||||||
{
|
{
|
||||||
|
@ -166,6 +247,17 @@ TOOLBAR_CalcToolbar (WND *wndPtr)
|
||||||
INT32 i, j, nRows;
|
INT32 i, j, nRows;
|
||||||
INT32 x, y, cx, cy;
|
INT32 x, y, cx, cy;
|
||||||
BOOL32 bVertical;
|
BOOL32 bVertical;
|
||||||
|
SIZE32 sizeString;
|
||||||
|
|
||||||
|
|
||||||
|
/* test */
|
||||||
|
TOOLBAR_CalcStrings (wndPtr, &sizeString);
|
||||||
|
|
||||||
|
if (sizeString.cy > 0)
|
||||||
|
infoPtr->nButtonHeight = sizeString.cy + infoPtr->nBitmapHeight + 6;
|
||||||
|
|
||||||
|
if (sizeString.cx > infoPtr->nBitmapWidth)
|
||||||
|
infoPtr->nButtonWidth = sizeString.cx + 6;
|
||||||
|
|
||||||
x = infoPtr->nIndent;
|
x = infoPtr->nIndent;
|
||||||
y = TOP_BORDER;
|
y = TOP_BORDER;
|
||||||
|
@ -220,6 +312,7 @@ TOOLBAR_CalcToolbar (WND *wndPtr)
|
||||||
}
|
}
|
||||||
|
|
||||||
infoPtr->nHeight = y + cy + BOTTOM_BORDER;
|
infoPtr->nHeight = y + cy + BOTTOM_BORDER;
|
||||||
|
TRACE (toolbar, "toolbar height %d\n", infoPtr->nHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -335,6 +428,17 @@ TOOLBAR_AddBitmap (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
ILC_COLOR | ILC_MASK, (INT32)wParam, 2);
|
ILC_COLOR | ILC_MASK, (INT32)wParam, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
if (!(infoPtr->himlDis)) {
|
||||||
|
/* create new disabled image list */
|
||||||
|
TRACE (toolbar, "creating disabled image list!\n");
|
||||||
|
infoPtr->himlDis =
|
||||||
|
ImageList_Create (infoPtr->nBitmapWidth,
|
||||||
|
infoPtr->nBitmapHeight, ILC_COLOR | ILC_MASK,
|
||||||
|
(INT32)wParam, 2);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Add bitmaps to the default image list */
|
/* Add bitmaps to the default image list */
|
||||||
if (lpAddBmp->hInst == (HINSTANCE32)0) {
|
if (lpAddBmp->hInst == (HINSTANCE32)0) {
|
||||||
nIndex =
|
nIndex =
|
||||||
|
@ -434,7 +538,7 @@ TOOLBAR_AddString32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
len = LoadString32A ((HINSTANCE32)wParam, (UINT32)lParam,
|
len = LoadString32A ((HINSTANCE32)wParam, (UINT32)lParam,
|
||||||
szString, 256);
|
szString, 256);
|
||||||
|
|
||||||
TRACE (toolbar, "len=%d\n", len);
|
TRACE (toolbar, "len=%d \"%s\"\n", len, szString);
|
||||||
nIndex = infoPtr->nNumStrings;
|
nIndex = infoPtr->nNumStrings;
|
||||||
if (infoPtr->nNumStrings == 0) {
|
if (infoPtr->nNumStrings == 0) {
|
||||||
infoPtr->strings =
|
infoPtr->strings =
|
||||||
|
@ -464,7 +568,7 @@ TOOLBAR_AddString32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
nIndex = infoPtr->nNumStrings;
|
nIndex = infoPtr->nNumStrings;
|
||||||
while (*p) {
|
while (*p) {
|
||||||
len = lstrlen32A (p);
|
len = lstrlen32A (p);
|
||||||
TRACE (toolbar, "len=%d\n", len);
|
TRACE (toolbar, "len=%d \"%s\"\n", len, p);
|
||||||
|
|
||||||
if (infoPtr->nNumStrings == 0) {
|
if (infoPtr->nNumStrings == 0) {
|
||||||
infoPtr->strings =
|
infoPtr->strings =
|
||||||
|
@ -487,7 +591,6 @@ TOOLBAR_AddString32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
|
||||||
p += (len+1);
|
p += (len+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nIndex;
|
return nIndex;
|
||||||
|
@ -501,8 +604,50 @@ static LRESULT
|
||||||
TOOLBAR_AutoSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
TOOLBAR_AutoSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr);
|
||||||
|
RECT32 parent_rect;
|
||||||
|
HWND32 parent;
|
||||||
|
INT32 x, y, cx, cy;
|
||||||
|
UINT32 uPosFlags = 0;
|
||||||
|
|
||||||
TRACE (toolbar, "auto size!\n");
|
FIXME (toolbar, "auto size!\n");
|
||||||
|
|
||||||
|
parent = GetParent32 (wndPtr->hwndSelf);
|
||||||
|
GetClientRect32(parent, &parent_rect);
|
||||||
|
|
||||||
|
if (wndPtr->dwStyle & CCS_NORESIZE)
|
||||||
|
uPosFlags |= SWP_NOSIZE;
|
||||||
|
else {
|
||||||
|
infoPtr->nWidth = parent_rect.right - parent_rect.left;
|
||||||
|
TOOLBAR_CalcToolbar (wndPtr);
|
||||||
|
cy = infoPtr->nHeight;
|
||||||
|
cx = infoPtr->nWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wndPtr->dwStyle & CCS_NOPARENTALIGN) {
|
||||||
|
uPosFlags |= SWP_NOMOVE;
|
||||||
|
// if (wndPtr->dwStyle & (CCS_TOP | CCS_BOTTOM))
|
||||||
|
// cy = (INT32)HIWORD(lParam);
|
||||||
|
}
|
||||||
|
#if 0
|
||||||
|
if (wndPtr->dwStyle & CCS_NORESIZE) {
|
||||||
|
uPosFlags |= SWP_NOSIZE;
|
||||||
|
// cx = (INT32)LOWORD(lParam);
|
||||||
|
// cy = (INT32)HIWORD(lParam);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* FIXME: handle CCS_NOMOVEX and CCS_NOMOVEY */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
infoPtr->nWidth = cx;
|
||||||
|
infoPtr->nHeight = cy;
|
||||||
|
#endif
|
||||||
|
if (!(wndPtr->dwStyle & CCS_NODIVIDER))
|
||||||
|
cy += 2;
|
||||||
|
|
||||||
|
infoPtr->bAutoSize = TRUE;
|
||||||
|
SetWindowPos32 (wndPtr->hwndSelf, 0, parent_rect.left, parent_rect.top,
|
||||||
|
cx, cy, uPosFlags | SWP_NOZORDER);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -595,7 +740,7 @@ TOOLBAR_CheckButton (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
TOOLBAR_DrawButton (wndPtr, btnPtr, hdc);
|
TOOLBAR_DrawButton (wndPtr, btnPtr, hdc);
|
||||||
ReleaseDC32 (wndPtr->hwndSelf, hdc);
|
ReleaseDC32 (wndPtr->hwndSelf, hdc);
|
||||||
|
|
||||||
/* FIXME: Send a WM_COMMAND or WM_NOTIFY */
|
/* FIXME: Send a WM_NOTIFY?? */
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -784,7 +929,16 @@ TOOLBAR_GetButtonText32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
// << TOOLBAR_GetExtendedStyle >>
|
// << TOOLBAR_GetExtendedStyle >>
|
||||||
// << TOOLBAR_GetHotImageList >>
|
// << TOOLBAR_GetHotImageList >>
|
||||||
// << TOOLBAR_GetHotItem >>
|
// << TOOLBAR_GetHotItem >>
|
||||||
// << TOOLBAR_GetImageList >>
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLBAR_GetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr);
|
||||||
|
return (LRESULT)infoPtr->himlDef;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// << TOOLBAR_GetInsertMark >>
|
// << TOOLBAR_GetInsertMark >>
|
||||||
// << TOOLBAR_GetInsertMarkColor >>
|
// << TOOLBAR_GetInsertMarkColor >>
|
||||||
|
|
||||||
|
@ -1200,7 +1354,21 @@ TOOLBAR_SetCmdId (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
// << TOOLBAR_SetExtendedStyle >>
|
// << TOOLBAR_SetExtendedStyle >>
|
||||||
// << TOOLBAR_SetHotImageList >>
|
// << TOOLBAR_SetHotImageList >>
|
||||||
// << TOOLBAR_SetHotItem >>
|
// << TOOLBAR_SetHotItem >>
|
||||||
// << TOOLBAR_SetImageList >>
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLBAR_SetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr);
|
||||||
|
HIMAGELIST himlTemp;
|
||||||
|
|
||||||
|
himlTemp = infoPtr->himlDef;
|
||||||
|
infoPtr->himlDef = (HIMAGELIST)lParam;
|
||||||
|
|
||||||
|
/* FIXME: redraw ? */
|
||||||
|
|
||||||
|
return (LRESULT)himlTemp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
|
@ -1220,7 +1388,21 @@ TOOLBAR_SetIndent (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
// << TOOLBAR_SetInsertMark >>
|
// << TOOLBAR_SetInsertMark >>
|
||||||
// << TOOLBAR_SetInsertMarkColor >>
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLBAR_SetInsertMarkColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
infoPtr->clrInsertMark = (COLORREF)lParam;
|
||||||
|
|
||||||
|
/* FIXME : redraw ??*/
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// << TOOLBAR_SetMaxTextRows >>
|
// << TOOLBAR_SetMaxTextRows >>
|
||||||
// << TOOLBAR_SetPadding >>
|
// << TOOLBAR_SetPadding >>
|
||||||
|
|
||||||
|
@ -1307,13 +1489,22 @@ TOOLBAR_SetToolTips (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// << TOOLBAR_SetUnicodeFormat >>
|
static LRESULT
|
||||||
|
TOOLBAR_SetUnicodeFormat (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
FIXME (toolbar, "hwnd=0x%04x stub!\n", wndPtr->hwndSelf);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
TOOLBAR_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr);
|
||||||
|
LOGFONT32A logFont;
|
||||||
|
|
||||||
/* initialize info structure */
|
/* initialize info structure */
|
||||||
infoPtr->nButtonHeight = 22;
|
infoPtr->nButtonHeight = 22;
|
||||||
|
@ -1332,6 +1523,9 @@ TOOLBAR_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
infoPtr->bTransparent = (wndPtr->dwStyle & TBSTYLE_FLAT);
|
infoPtr->bTransparent = (wndPtr->dwStyle & TBSTYLE_FLAT);
|
||||||
infoPtr->nHotItem = -1;
|
infoPtr->nHotItem = -1;
|
||||||
|
|
||||||
|
SystemParametersInfo32A (SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
|
||||||
|
infoPtr->hFont = CreateFontIndirect32A (&logFont);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1371,6 +1565,10 @@ TOOLBAR_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
if (infoPtr->himlHot)
|
if (infoPtr->himlHot)
|
||||||
ImageList_Destroy (infoPtr->himlHot);
|
ImageList_Destroy (infoPtr->himlHot);
|
||||||
|
|
||||||
|
/* delete default font */
|
||||||
|
if (infoPtr->hFont)
|
||||||
|
DeleteObject32 (infoPtr->hFont);
|
||||||
|
|
||||||
/* free toolbar info data */
|
/* free toolbar info data */
|
||||||
HeapFree (GetProcessHeap (), 0, infoPtr);
|
HeapFree (GetProcessHeap (), 0, infoPtr);
|
||||||
|
|
||||||
|
@ -1378,6 +1576,19 @@ TOOLBAR_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLBAR_EraseBackground (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
if (infoPtr->bTransparent)
|
||||||
|
return SendMessage32A (GetParent32 (wndPtr->hwndSelf), WM_ERASEBKGND,
|
||||||
|
wParam, lParam);
|
||||||
|
|
||||||
|
return DefWindowProc32A (wndPtr->hwndSelf, WM_ERASEBKGND, wParam, lParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_LButtonDblClk (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
TOOLBAR_LButtonDblClk (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
@ -1546,6 +1757,9 @@ TOOLBAR_MouseMove (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_NCCalcSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
TOOLBAR_NCCalcSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
@ -1657,12 +1871,19 @@ TOOLBAR_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
INT32 flags;
|
INT32 flags;
|
||||||
UINT32 uPosFlags = 0;
|
UINT32 uPosFlags = 0;
|
||||||
|
|
||||||
|
if (infoPtr->bAutoSize) {
|
||||||
|
infoPtr->bAutoSize = FALSE;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
flags = (INT32) wParam;
|
flags = (INT32) wParam;
|
||||||
|
|
||||||
/* FIXME for flags =
|
/* FIXME for flags =
|
||||||
* SIZE_MAXIMIZED, SIZE_MAXSHOW, SIZE_MINIMIZED
|
* SIZE_MAXIMIZED, SIZE_MAXSHOW, SIZE_MINIMIZED
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
TRACE (toolbar, "sizing toolbar!\n");
|
||||||
|
|
||||||
if (flags == SIZE_RESTORED) {
|
if (flags == SIZE_RESTORED) {
|
||||||
/* width and height don't apply */
|
/* width and height don't apply */
|
||||||
parent = GetParent32 (wndPtr->hwndSelf);
|
parent = GetParent32 (wndPtr->hwndSelf);
|
||||||
|
@ -1679,8 +1900,23 @@ TOOLBAR_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
|
||||||
if (wndPtr->dwStyle & CCS_NOPARENTALIGN) {
|
if (wndPtr->dwStyle & CCS_NOPARENTALIGN) {
|
||||||
uPosFlags |= SWP_NOMOVE;
|
uPosFlags |= SWP_NOMOVE;
|
||||||
|
// if (wndPtr->dwStyle & (CCS_TOP | CCS_BOTTOM))
|
||||||
|
// cy = (INT32)HIWORD(lParam);
|
||||||
|
}
|
||||||
|
#if 0
|
||||||
|
if (wndPtr->dwStyle & CCS_NORESIZE) {
|
||||||
|
uPosFlags |= SWP_NOSIZE;
|
||||||
|
// cx = (INT32)LOWORD(lParam);
|
||||||
|
// cy = (INT32)HIWORD(lParam);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* FIXME: handle CCS_NOMOVEX and CCS_NOMOVEY */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
infoPtr->nWidth = cx;
|
||||||
|
infoPtr->nHeight = cy;
|
||||||
|
#endif
|
||||||
if (!(wndPtr->dwStyle & CCS_NODIVIDER))
|
if (!(wndPtr->dwStyle & CCS_NODIVIDER))
|
||||||
cy += 2;
|
cy += 2;
|
||||||
|
|
||||||
|
@ -1691,6 +1927,11 @@ TOOLBAR_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LRESULT WINAPI
|
LRESULT WINAPI
|
||||||
ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
@ -1763,7 +2004,10 @@ ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||||
// case TB_GETEXTENDEDSTYLE: /* 4.71 */
|
// case TB_GETEXTENDEDSTYLE: /* 4.71 */
|
||||||
// case TB_GETHOTIMAGELIST: /* 4.70 */
|
// case TB_GETHOTIMAGELIST: /* 4.70 */
|
||||||
// case TB_GETHOTITEM: /* 4.71 */
|
// case TB_GETHOTITEM: /* 4.71 */
|
||||||
// case TB_GETIMAGELIST: /* 4.70 */
|
|
||||||
|
case TB_GETIMAGELIST:
|
||||||
|
return TOOLBAR_GetImageList (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
// case TB_GETINSERTMARK: /* 4.71 */
|
// case TB_GETINSERTMARK: /* 4.71 */
|
||||||
// case TB_GETINSERTMARKCOLOR: /* 4.71 */
|
// case TB_GETINSERTMARKCOLOR: /* 4.71 */
|
||||||
|
|
||||||
|
@ -1860,13 +2104,18 @@ ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||||
// case TB_SETEXTENDEDSTYLE: /* 4.71 */
|
// case TB_SETEXTENDEDSTYLE: /* 4.71 */
|
||||||
// case TB_SETHOTIMAGELIST: /* 4.70 */
|
// case TB_SETHOTIMAGELIST: /* 4.70 */
|
||||||
// case TB_SETHOTITEM: /* 4.71 */
|
// case TB_SETHOTITEM: /* 4.71 */
|
||||||
// case TB_SETIMAGELIST: /* 4.70 */
|
|
||||||
|
case TB_SETIMAGELIST:
|
||||||
|
return TOOLBAR_SetImageList (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
case TB_SETINDENT:
|
case TB_SETINDENT:
|
||||||
return TOOLBAR_SetIndent (wndPtr, wParam, lParam);
|
return TOOLBAR_SetIndent (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
// case TB_SETINSERTMARK: /* 4.71 */
|
// case TB_SETINSERTMARK: /* 4.71 */
|
||||||
// case TB_SETINSERTMARKCOLOR: /* 4.71 */
|
|
||||||
|
case TB_SETINSERTMARKCOLOR:
|
||||||
|
return TOOLBAR_SetInsertMarkColor (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
// case TB_SETMAXTEXTROWS: /* 4.70 */
|
// case TB_SETMAXTEXTROWS: /* 4.70 */
|
||||||
// case TB_SETPADDING: /* 4.71 */
|
// case TB_SETPADDING: /* 4.71 */
|
||||||
|
|
||||||
|
@ -1885,7 +2134,8 @@ ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||||
case TB_SETTOOLTIPS:
|
case TB_SETTOOLTIPS:
|
||||||
return TOOLBAR_SetToolTips (wndPtr, wParam, lParam);
|
return TOOLBAR_SetToolTips (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
// case TB_SETUNICODEFORMAT:
|
case TB_SETUNICODEFORMAT:
|
||||||
|
return TOOLBAR_SetUnicodeFormat (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
return TOOLBAR_Create (wndPtr, wParam, lParam);
|
return TOOLBAR_Create (wndPtr, wParam, lParam);
|
||||||
|
@ -1893,8 +2143,8 @@ ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
return TOOLBAR_Destroy (wndPtr, wParam, lParam);
|
return TOOLBAR_Destroy (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
// case WM_ERASEBKGND:
|
case WM_ERASEBKGND:
|
||||||
// return TOOLBAR_EraseBackground (wndPtr, wParam, lParam);
|
return TOOLBAR_EraseBackground (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
case WM_LBUTTONDBLCLK:
|
case WM_LBUTTONDBLCLK:
|
||||||
return TOOLBAR_LButtonDblClk (wndPtr, wParam, lParam);
|
return TOOLBAR_LButtonDblClk (wndPtr, wParam, lParam);
|
||||||
|
@ -1921,6 +2171,7 @@ ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||||
return TOOLBAR_NCPaint (wndPtr, wParam, lParam);
|
return TOOLBAR_NCPaint (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
// case WM_NOTIFY:
|
// case WM_NOTIFY:
|
||||||
|
// SendMessage32A (GetParent32 (hwnd), uMsg, wParam, lParam);
|
||||||
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
return TOOLBAR_Paint (wndPtr, wParam);
|
return TOOLBAR_Paint (wndPtr, wParam);
|
||||||
|
|
|
@ -0,0 +1,698 @@
|
||||||
|
/*
|
||||||
|
* Tool tip control
|
||||||
|
*
|
||||||
|
* Copyright 1998 Eric Kohl
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* PLEASE don't try to improve or change this code right now. Many
|
||||||
|
* features are still missing, but I'm working on it. I want to avoid
|
||||||
|
* any confusion. This note will be removed as soon as most of the
|
||||||
|
* features are implemented.
|
||||||
|
* Eric <ekohl@abo.rhein-zeitung.de>
|
||||||
|
*
|
||||||
|
* TODO:
|
||||||
|
* - Most messages.
|
||||||
|
* - All notifications.
|
||||||
|
*
|
||||||
|
* Testing:
|
||||||
|
* - Run tests using Waite Group Windows95 API Bible Volume 2.
|
||||||
|
* The second cdrom contains executables enumtools.exe ...
|
||||||
|
* - additional features.
|
||||||
|
*
|
||||||
|
* FIXME:
|
||||||
|
* - DelTool32A incomplete.
|
||||||
|
* - GetCurrentTool32A incomplete.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "windows.h"
|
||||||
|
#include "commctrl.h"
|
||||||
|
#include "tooltips.h"
|
||||||
|
#include "heap.h"
|
||||||
|
#include "win.h"
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define TOOLTIPS_GetInfoPtr(wndPtr) ((TOOLTIPS_INFO *)wndPtr->wExtra[0])
|
||||||
|
|
||||||
|
|
||||||
|
static INT32
|
||||||
|
TOOLTIPS_GetIndexFromInfoA (TOOLTIPS_INFO *infoPtr, LPTOOLINFOA lpToolInfo)
|
||||||
|
{
|
||||||
|
TTTOOL_INFO *toolPtr;
|
||||||
|
INT32 nIndex;
|
||||||
|
|
||||||
|
for (nIndex = 0; nIndex < infoPtr->uNumTools; nIndex++) {
|
||||||
|
toolPtr = &infoPtr->tools[nIndex];
|
||||||
|
|
||||||
|
if ((lpToolInfo->hwnd == toolPtr->hwnd) &&
|
||||||
|
(lpToolInfo->uId == toolPtr->uId))
|
||||||
|
return nIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
static INT32
|
||||||
|
TOOLTIPS_GetIndexFromPoint (TOOLTIPS_INFO *infoPtr, LPPOINT32 lpPt)
|
||||||
|
{
|
||||||
|
TTTOOL_INFO *toolPtr;
|
||||||
|
INT32 nIndex;
|
||||||
|
|
||||||
|
for (nIndex = 0; nIndex < infoPtr->uNumTools; nIndex++) {
|
||||||
|
toolPtr = &infoPtr->tools[nIndex];
|
||||||
|
|
||||||
|
if (lpToolInfo->uFlags & TTF_IDISHWND) {
|
||||||
|
if (PtInRect (
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
return nIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_Activate (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
infoPtr->bActive = (BOOL32)wParam;
|
||||||
|
|
||||||
|
if (infoPtr->bActive) {
|
||||||
|
FIXME (tooltips, "activated!\n");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
FIXME (tooltips, "deactivated!\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_AddTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
LPTOOLINFOA lpToolInfo = (LPTOOLINFOA)lParam;
|
||||||
|
TTTOOL_INFO *toolPtr;
|
||||||
|
|
||||||
|
if (lpToolInfo == NULL) return FALSE;
|
||||||
|
|
||||||
|
if (infoPtr->uNumTools == 0) {
|
||||||
|
infoPtr->tools =
|
||||||
|
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||||
|
sizeof(TTTOOL_INFO));
|
||||||
|
toolPtr = infoPtr->tools;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
TTTOOL_INFO *oldTools = infoPtr->tools;
|
||||||
|
infoPtr->tools =
|
||||||
|
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||||
|
sizeof(TTTOOL_INFO) * (infoPtr->uNumTools + 1));
|
||||||
|
memcpy (infoPtr->tools, oldTools,
|
||||||
|
infoPtr->uNumTools * sizeof(TTTOOL_INFO));
|
||||||
|
HeapFree (GetProcessHeap (), 0, oldTools);
|
||||||
|
toolPtr = &infoPtr->tools[infoPtr->uNumTools];
|
||||||
|
}
|
||||||
|
|
||||||
|
infoPtr->uNumTools++;
|
||||||
|
|
||||||
|
/* copy tool data */
|
||||||
|
toolPtr->uFlags = lpToolInfo->uFlags;
|
||||||
|
toolPtr->hwnd = lpToolInfo->hwnd;
|
||||||
|
toolPtr->uId = lpToolInfo->uId;
|
||||||
|
toolPtr->rect = lpToolInfo->rect;
|
||||||
|
toolPtr->hinst = lpToolInfo->hinst;
|
||||||
|
|
||||||
|
if (lpToolInfo->hinst) {
|
||||||
|
toolPtr->lpszText = lpToolInfo->lpszText;
|
||||||
|
}
|
||||||
|
else if (lpToolInfo->lpszText) {
|
||||||
|
if (lpToolInfo->lpszText == LPSTR_TEXTCALLBACK32A)
|
||||||
|
toolPtr->lpszText = lpToolInfo->lpszText;
|
||||||
|
else {
|
||||||
|
INT32 len = lstrlen32A (lpToolInfo->lpszText);
|
||||||
|
toolPtr->lpszText =
|
||||||
|
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len + 1);
|
||||||
|
lstrcpy32A (toolPtr->lpszText, lpToolInfo->lpszText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lpToolInfo->cbSize >= sizeof(TOOLINFOA))
|
||||||
|
toolPtr->lParam = lpToolInfo->lParam;
|
||||||
|
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TOOLTIPS_AddTool32W >>
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_DelTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
LPTOOLINFOA lpToolInfo = (LPTOOLINFOA)lParam;
|
||||||
|
TTTOOL_INFO *toolPtr;
|
||||||
|
INT32 nIndex;
|
||||||
|
|
||||||
|
if (lpToolInfo == NULL) return 0;
|
||||||
|
if (infoPtr->uNumTools == 0) return 0;
|
||||||
|
|
||||||
|
nIndex = TOOLTIPS_GetIndexFromInfoA (infoPtr, lpToolInfo);
|
||||||
|
if (nIndex == -1) return 0;
|
||||||
|
|
||||||
|
TRACE (tooltips, "index=%d\n", nIndex);
|
||||||
|
|
||||||
|
|
||||||
|
/* delete tool from tool list */
|
||||||
|
/*
|
||||||
|
toolPtr = &infoPtr->tools[nIndex];
|
||||||
|
|
||||||
|
// delete text string
|
||||||
|
if ((toolPtr->hinst) && (toolPtr->lpszText)) {
|
||||||
|
if (toolPtr->lpszText != LPSTR_TEXTCALLBACK32A)
|
||||||
|
HeapFree (GetProcessHeap (), 0, toolPtr->lpszText);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TOOLTIPS_DelTool32W >>
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_EnumTools32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
UINT32 uIndex = (UINT32)wParam;
|
||||||
|
LPTOOLINFOA lpToolInfo = (LPTOOLINFOA)lParam;
|
||||||
|
TTTOOL_INFO *toolPtr;
|
||||||
|
|
||||||
|
if (uIndex >= infoPtr->uNumTools) return FALSE;
|
||||||
|
if (lpToolInfo == NULL) return FALSE;
|
||||||
|
|
||||||
|
TRACE (tooltips, "index=%u\n", uIndex);
|
||||||
|
|
||||||
|
toolPtr = &infoPtr->tools[uIndex];
|
||||||
|
|
||||||
|
/* copy tool data */
|
||||||
|
lpToolInfo->uFlags = toolPtr->uFlags;
|
||||||
|
lpToolInfo->hwnd = toolPtr->hwnd;
|
||||||
|
lpToolInfo->uId = toolPtr->uId;
|
||||||
|
lpToolInfo->rect = toolPtr->rect;
|
||||||
|
lpToolInfo->hinst = toolPtr->hinst;
|
||||||
|
lpToolInfo->lpszText = toolPtr->lpszText;
|
||||||
|
|
||||||
|
if (lpToolInfo->cbSize >= sizeof(TOOLINFOA))
|
||||||
|
lpToolInfo->lParam = toolPtr->lParam;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TOOLTIPS_EnumTools32W >>
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_GetCurrentTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
LPTOOLINFOA lpti = (LPTOOLINFOA)lParam;
|
||||||
|
|
||||||
|
if (lpti) {
|
||||||
|
if (infoPtr->iCurrentTool > -1) {
|
||||||
|
/* FIXME */
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return (infoPtr->iCurrentTool != -1);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TOOLTIPS_GetCurrentTool32W >>
|
||||||
|
// << TOOLTIPS_GetDelayTime >>
|
||||||
|
// << TOOLTIPS_GetMargin >>
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_GetMaxTipWidth (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
return infoPtr->iMaxTipWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_GetText32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
LPTOOLINFOA lpti = (LPTOOLINFOA)lParam;
|
||||||
|
INT32 nIndex;
|
||||||
|
|
||||||
|
if (!(lpti)) return 0;
|
||||||
|
if (lpti->cbSize < sizeof(TOOLINFOA)) return 0;
|
||||||
|
|
||||||
|
nIndex = TOOLTIPS_GetIndexFromInfoA (infoPtr, lpti);
|
||||||
|
if (nIndex == -1) return 0;
|
||||||
|
|
||||||
|
lstrcpy32A (lpti->lpszText, infoPtr->tools[nIndex].lpszText);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TOOLTIPS_GetText32W >>
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_GetTipBkColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
return infoPtr->clrBk;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_GetTipTextColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
return infoPtr->clrText;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_GetToolCount (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
return infoPtr->uNumTools;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_GetToolInfo32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
LPTOOLINFOA lpToolInfo = (LPTOOLINFOA)lParam;
|
||||||
|
TTTOOL_INFO *toolPtr;
|
||||||
|
INT32 nIndex;
|
||||||
|
|
||||||
|
if (lpToolInfo == NULL) return FALSE;
|
||||||
|
if (infoPtr->uNumTools == 0) return FALSE;
|
||||||
|
|
||||||
|
nIndex = TOOLTIPS_GetIndexFromInfoA (infoPtr, lpToolInfo);
|
||||||
|
if (nIndex == -1) return FALSE;
|
||||||
|
|
||||||
|
TRACE (tooltips, "index=%d\n", nIndex);
|
||||||
|
|
||||||
|
toolPtr = &infoPtr->tools[nIndex];
|
||||||
|
|
||||||
|
/* copy tool data */
|
||||||
|
lpToolInfo->uFlags = toolPtr->uFlags;
|
||||||
|
lpToolInfo->rect = toolPtr->rect;
|
||||||
|
lpToolInfo->hinst = toolPtr->hinst;
|
||||||
|
lpToolInfo->lpszText = toolPtr->lpszText;
|
||||||
|
|
||||||
|
if (lpToolInfo->cbSize >= sizeof(TOOLINFOA))
|
||||||
|
lpToolInfo->lParam = toolPtr->lParam;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TOOLTIPS_GetToolInfo32W >>
|
||||||
|
// << TOOLTIPS_HitTest32A >>
|
||||||
|
// << TOOLTIPS_HitTest32W >>
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_NewToolRect32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
LPTOOLINFOA lpti = (LPTOOLINFOA)lParam;
|
||||||
|
INT32 nIndex;
|
||||||
|
|
||||||
|
if (!(lpti)) return 0;
|
||||||
|
if (lpti->cbSize < sizeof(TOOLINFOA)) return 0;
|
||||||
|
|
||||||
|
nIndex = TOOLTIPS_GetIndexFromInfoA (infoPtr, lpti);
|
||||||
|
if (nIndex == -1) return 0;
|
||||||
|
|
||||||
|
infoPtr->tools[nIndex].rect = lpti->rect;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TOOLTIPS_NewToolRect32W >>
|
||||||
|
// << TOOLTIPS_Pop >>
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_RelayEvent (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
LPMSG16 lpMsg = (LPMSG16)lParam;
|
||||||
|
|
||||||
|
if (lpMsg == NULL) return 0;
|
||||||
|
|
||||||
|
if (lpMsg->message == WM_MOUSEMOVE) {
|
||||||
|
FIXME (tooltips, "WM_MOUSEMOVE (%d %d)\n", lpMsg->pt.x, lpMsg->pt.y);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIXME (tooltips, "empty stub!\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TOOLTIPS_SetDelayTime >>
|
||||||
|
// << TOOLTIPS_SetMargin >>
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_SetMaxTipWidth (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
INT32 iTemp = infoPtr->iMaxTipWidth;
|
||||||
|
|
||||||
|
infoPtr->iMaxTipWidth = (INT32)lParam;
|
||||||
|
|
||||||
|
return iTemp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_SetTipBkColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
infoPtr->clrBk = (COLORREF)wParam;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_SetTipTextColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
infoPtr->clrText = (COLORREF)wParam;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_SetToolInfo32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
LPTOOLINFOA lpToolInfo = (LPTOOLINFOA)lParam;
|
||||||
|
TTTOOL_INFO *toolPtr;
|
||||||
|
INT32 nIndex;
|
||||||
|
|
||||||
|
if (lpToolInfo == NULL) return 0;
|
||||||
|
|
||||||
|
nIndex = TOOLTIPS_GetIndexFromInfoA (infoPtr, lpToolInfo);
|
||||||
|
if (nIndex == -1) return 0;
|
||||||
|
|
||||||
|
TRACE (tooltips, "index=%d\n", nIndex);
|
||||||
|
|
||||||
|
toolPtr = &infoPtr->tools[nIndex];
|
||||||
|
|
||||||
|
/* copy tool data */
|
||||||
|
toolPtr->uFlags = lpToolInfo->uFlags;
|
||||||
|
toolPtr->hwnd = lpToolInfo->hwnd;
|
||||||
|
toolPtr->uId = lpToolInfo->uId;
|
||||||
|
toolPtr->rect = lpToolInfo->rect;
|
||||||
|
toolPtr->hinst = lpToolInfo->hinst;
|
||||||
|
|
||||||
|
if (lpToolInfo->lpszText) {
|
||||||
|
if (lpToolInfo->lpszText == LPSTR_TEXTCALLBACK32A)
|
||||||
|
toolPtr->lpszText = lpToolInfo->lpszText;
|
||||||
|
else {
|
||||||
|
INT32 len = lstrlen32A (lpToolInfo->lpszText);
|
||||||
|
HeapFree (GetProcessHeap (), 0, toolPtr->lpszText);
|
||||||
|
toolPtr->lpszText =
|
||||||
|
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len + 1);
|
||||||
|
lstrcpy32A (toolPtr->lpszText, lpToolInfo->lpszText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lpToolInfo->cbSize >= sizeof(TOOLINFOA))
|
||||||
|
toolPtr->lParam = lpToolInfo->lParam;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TOOLTIPS_SetToolInfo32W >>
|
||||||
|
// << TOOLTIPS_TrackActive >>
|
||||||
|
// << TOOLTIPS_TrackPosition >>
|
||||||
|
// << TOOLTIPS_Update >>
|
||||||
|
// << TOOLTIPS_UpdateTipText32A >>
|
||||||
|
// << TOOLTIPS_UpdateTipText32W >>
|
||||||
|
// << TOOLTIPS_WindowFromPoint >>
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr;
|
||||||
|
|
||||||
|
/* allocate memory for info structure */
|
||||||
|
infoPtr = (TOOLTIPS_INFO *)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||||
|
sizeof(TOOLTIPS_INFO));
|
||||||
|
wndPtr->wExtra[0] = (DWORD)infoPtr;
|
||||||
|
|
||||||
|
if (infoPtr == NULL) {
|
||||||
|
ERR (tooltips, "could not allocate info memory!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* initialize info structure */
|
||||||
|
infoPtr->bActive = TRUE;
|
||||||
|
infoPtr->clrBk = GetSysColor32 (COLOR_INFOBK);
|
||||||
|
infoPtr->clrText = GetSysColor32 (COLOR_INFOTEXT);
|
||||||
|
infoPtr->hFont = NULL;
|
||||||
|
infoPtr->iMaxTipWidth = -1;
|
||||||
|
infoPtr->iCurrentTool = -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
|
||||||
|
/* free tools */
|
||||||
|
if (infoPtr->tools) {
|
||||||
|
INT32 i;
|
||||||
|
for (i = 0; i < infoPtr->uNumTools; i++) {
|
||||||
|
if ((infoPtr->tools[i].hinst) && (infoPtr->tools[i].lpszText)) {
|
||||||
|
if (infoPtr->tools[i].lpszText != LPSTR_TEXTCALLBACK32A)
|
||||||
|
HeapFree (GetProcessHeap (), 0, infoPtr->tools[i].lpszText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
HeapFree (GetProcessHeap (), 0, infoPtr->tools);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* free tool tips info data */
|
||||||
|
HeapFree (GetProcessHeap (), 0, infoPtr);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_GetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
return infoPtr->hFont;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TOOLTIPS_MouseMove >>
|
||||||
|
// << TOOLTIPS_Paint >>
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLTIPS_SetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
infoPtr->hFont = (HFONT32)wParam;
|
||||||
|
|
||||||
|
if (LOWORD(lParam)) {
|
||||||
|
/* redraw */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TOOLTIPS_Timer >>
|
||||||
|
// << TOOLTIPS_WinIniChange >>
|
||||||
|
|
||||||
|
|
||||||
|
LRESULT WINAPI
|
||||||
|
ToolTipsWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
WND *wndPtr = WIN_FindWndPtr(hwnd);
|
||||||
|
|
||||||
|
switch (uMsg)
|
||||||
|
{
|
||||||
|
case TTM_ACTIVATE:
|
||||||
|
return TOOLTIPS_Activate (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case TTM_ADDTOOL32A:
|
||||||
|
return TOOLTIPS_AddTool32A (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case TTM_ADDTOOL32W:
|
||||||
|
|
||||||
|
case TTM_DELTOOL32A:
|
||||||
|
return TOOLTIPS_DelTool32A (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case TTM_DELTOOL32W:
|
||||||
|
|
||||||
|
case TTM_ENUMTOOLS32A:
|
||||||
|
return TOOLTIPS_EnumTools32A (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case TTM_ENUMTOOLS32W:
|
||||||
|
|
||||||
|
case TTM_GETCURRENTTOOL32A:
|
||||||
|
return TOOLTIPS_GetCurrentTool32A (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case TTM_GETCURRENTTOOL32W:
|
||||||
|
// case TTM_GETDELAYTIME: /* 4.70 */
|
||||||
|
// case TTM_GETMARGIN: /* 4.70 */
|
||||||
|
|
||||||
|
case TTM_GETMAXTIPWIDTH:
|
||||||
|
return TOOLTIPS_GetMaxTipWidth (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case TTM_GETTEXT32A:
|
||||||
|
return TOOLTIPS_GetText32A (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case TTM_GETTEXT32W:
|
||||||
|
|
||||||
|
case TTM_GETTIPBKCOLOR:
|
||||||
|
return TOOLTIPS_GetTipBkColor (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case TTM_GETTIPTEXTCOLOR:
|
||||||
|
return TOOLTIPS_GetTipTextColor (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case TTM_GETTOOLCOUNT:
|
||||||
|
return TOOLTIPS_GetToolCount (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case TTM_GETTOOLINFO32A:
|
||||||
|
return TOOLTIPS_GetToolInfo32A (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case TTM_GETTOOLINFO32W:
|
||||||
|
// case TTM_HITTEST32A:
|
||||||
|
// case TTM_HITTEST32W:
|
||||||
|
|
||||||
|
case TTM_NEWTOOLRECT32A:
|
||||||
|
return TOOLTIPS_NewToolRect32A (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case TTM_NEWTOOLRECT32W:
|
||||||
|
// case TTM_POP: /* 4.70 */
|
||||||
|
|
||||||
|
case TTM_RELAYEVENT:
|
||||||
|
return TOOLTIPS_RelayEvent (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case TTM_SETDELAYTIME: /* 4.70 */
|
||||||
|
// case TTM_SETMARGIN: /* 4.70 */
|
||||||
|
|
||||||
|
case TTM_SETMAXTIPWIDTH:
|
||||||
|
return TOOLTIPS_SetMaxTipWidth (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case TTM_SETTIPBKCOLOR:
|
||||||
|
return TOOLTIPS_SetTipBkColor (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case TTM_SETTIPTEXTCOLOR:
|
||||||
|
return TOOLTIPS_SetTipTextColor (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case TTM_SETTOOLINFO32A:
|
||||||
|
return TOOLTIPS_SetToolInfo32A (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case TTM_SETTOOLINFO32W:
|
||||||
|
// case TTM_TRACKACTIVE: /* 4.70 */
|
||||||
|
// case TTM_TRACKPOSITION: /* 4.70 */
|
||||||
|
// case TTM_UPDATE: /* 4.71 */
|
||||||
|
// case TTM_UPDATETIPTEXT32A:
|
||||||
|
// case TTM_UPDATETIPTEXT32W:
|
||||||
|
// case TTM_WINDOWFROMPOINT:
|
||||||
|
|
||||||
|
|
||||||
|
case WM_CREATE:
|
||||||
|
return TOOLTIPS_Create (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_DESTROY:
|
||||||
|
return TOOLTIPS_Destroy (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_GETFONT:
|
||||||
|
return TOOLTIPS_GetFont (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_MOUSEMOVE:
|
||||||
|
// return TOOLTIPS_MouseMove (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_PAINT:
|
||||||
|
// return TOOLTIPS_Paint (wndPtr, wParam);
|
||||||
|
|
||||||
|
case WM_SETFONT:
|
||||||
|
return TOOLTIPS_SetFont (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_TIMER:
|
||||||
|
|
||||||
|
// case WM_WININICHANGE:
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (uMsg >= WM_USER)
|
||||||
|
ERR (tooltips, "unknown msg %04x wp=%08x lp=%08lx\n",
|
||||||
|
uMsg, wParam, lParam);
|
||||||
|
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
TOOLTIPS_Register (void)
|
||||||
|
{
|
||||||
|
WNDCLASS32A wndClass;
|
||||||
|
|
||||||
|
if (GlobalFindAtom32A (TOOLTIPS_CLASS32A)) return;
|
||||||
|
|
||||||
|
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
|
||||||
|
wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS;
|
||||||
|
wndClass.lpfnWndProc = (WNDPROC32)ToolTipsWindowProc;
|
||||||
|
wndClass.cbClsExtra = 0;
|
||||||
|
wndClass.cbWndExtra = sizeof(TOOLTIPS_INFO *);
|
||||||
|
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
|
||||||
|
wndClass.hbrBackground = 0;
|
||||||
|
wndClass.lpszClassName = TOOLTIPS_CLASS32A;
|
||||||
|
|
||||||
|
RegisterClass32A (&wndClass);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,437 @@
|
||||||
|
/*
|
||||||
|
* Trackbar control
|
||||||
|
*
|
||||||
|
* Copyright 1998 Eric Kohl
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* This is just a dummy control. An author is needed! Any volunteers?
|
||||||
|
* I will only improve this control once in a while.
|
||||||
|
* Eric <ekohl@abo.rhein-zeitung.de>
|
||||||
|
*
|
||||||
|
* TODO:
|
||||||
|
* - All messages.
|
||||||
|
* - All notifications.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "windows.h"
|
||||||
|
#include "commctrl.h"
|
||||||
|
#include "trackbar.h"
|
||||||
|
#include "heap.h"
|
||||||
|
#include "win.h"
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define TRACKBAR_GetInfoPtr(wndPtr) ((TRACKBAR_INFO *)wndPtr->wExtra[0])
|
||||||
|
|
||||||
|
|
||||||
|
static VOID
|
||||||
|
TRACKBAR_Refresh (WND *wndPtr, HDC32 hdc)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
RECT32 rect;
|
||||||
|
|
||||||
|
GetClientRect32 (wndPtr->hwndSelf, &rect);
|
||||||
|
|
||||||
|
/* draw channel */
|
||||||
|
DrawEdge32 (hdc, &infoPtr->rcChannel, EDGE_SUNKEN, BF_RECT);
|
||||||
|
|
||||||
|
/* draw thumb */
|
||||||
|
if (!(wndPtr->dwStyle & TBS_NOTHUMB)) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* draw ticks */
|
||||||
|
if (!(wndPtr->dwStyle & TBS_NOTICKS)) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (infoPtr->bFocus)
|
||||||
|
DrawFocusRect32 (hdc, &rect);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_ClearSel (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
infoPtr->nSelMin = 0;
|
||||||
|
infoPtr->nSelMax = 0;
|
||||||
|
|
||||||
|
if ((BOOL32)wParam) {
|
||||||
|
HDC32 hdc = GetDC32 (wndPtr->hwndSelf);
|
||||||
|
TRACKBAR_Refresh (wndPtr, hdc);
|
||||||
|
ReleaseDC32 (wndPtr->hwndSelf, hdc);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TRACKBAR_ClearTics >>
|
||||||
|
// << TRACKBAR_GetChannelRect >>
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_GetLineSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
return infoPtr->nLineSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TRACKBAR_GetNumTics >>
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_GetPageSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
return infoPtr->nPageSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_GetPos (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
return infoPtr->nPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TRACKBAR_GetPTics >>
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_GetRangeMax (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
return infoPtr->nRangeMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_GetRangeMin (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
return infoPtr->nRangeMin;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_GetSelEnd (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
return infoPtr->nSelMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_GetSelStart (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
return infoPtr->nSelMin;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_GetThumbLength (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
return infoPtr->nThumbLen;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr;
|
||||||
|
|
||||||
|
infoPtr = (TRACKBAR_INFO *)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||||
|
sizeof(TRACKBAR_INFO));
|
||||||
|
wndPtr->wExtra[0] = (DWORD)infoPtr;
|
||||||
|
|
||||||
|
|
||||||
|
/* default values */
|
||||||
|
infoPtr->nRangeMin = 0;
|
||||||
|
infoPtr->nRangeMax = 100;
|
||||||
|
infoPtr->nLineSize = 1;
|
||||||
|
infoPtr->nPageSize = 20;
|
||||||
|
infoPtr->nSelMin = 0;
|
||||||
|
infoPtr->nSelMax = 0;
|
||||||
|
infoPtr->nPos = 0;
|
||||||
|
infoPtr->nThumbLen = 23; /* initial thumb length */
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
HeapFree (GetProcessHeap (), 0, infoPtr);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_KillFocus (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
HDC32 hdc;
|
||||||
|
|
||||||
|
infoPtr->bFocus = FALSE;
|
||||||
|
|
||||||
|
hdc = GetDC32 (wndPtr->hwndSelf);
|
||||||
|
TRACKBAR_Refresh (wndPtr, hdc);
|
||||||
|
ReleaseDC32 (wndPtr->hwndSelf, hdc);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_LButtonDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
|
||||||
|
SetFocus32 (wndPtr->hwndSelf);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_Paint (WND *wndPtr, WPARAM32 wParam)
|
||||||
|
{
|
||||||
|
HDC32 hdc;
|
||||||
|
PAINTSTRUCT32 ps;
|
||||||
|
|
||||||
|
hdc = wParam==0 ? BeginPaint32 (wndPtr->hwndSelf, &ps) : (HDC32)wParam;
|
||||||
|
TRACKBAR_Refresh (wndPtr, hdc);
|
||||||
|
if(!wParam)
|
||||||
|
EndPaint32 (wndPtr->hwndSelf, &ps);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_SetFocus (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
HDC32 hdc;
|
||||||
|
|
||||||
|
infoPtr->bFocus = TRUE;
|
||||||
|
|
||||||
|
hdc = GetDC32 (wndPtr->hwndSelf);
|
||||||
|
TRACKBAR_Refresh (wndPtr, hdc);
|
||||||
|
ReleaseDC32 (wndPtr->hwndSelf, hdc);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TRACKBAR_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||||
|
RECT32 rect;
|
||||||
|
|
||||||
|
GetClientRect32 (wndPtr->hwndSelf, &rect);
|
||||||
|
|
||||||
|
/* calculate channel rect */
|
||||||
|
if (wndPtr->dwStyle & TBS_VERT) {
|
||||||
|
infoPtr->rcChannel.top = rect.top + 8;
|
||||||
|
infoPtr->rcChannel.bottom = rect.bottom - 8;
|
||||||
|
|
||||||
|
/* FIXME */
|
||||||
|
infoPtr->rcChannel.left = rect.left + 10;
|
||||||
|
infoPtr->rcChannel.right = rect.left + 14;
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
infoPtr->rcChannel.left = rect.left + 8;
|
||||||
|
infoPtr->rcChannel.right = rect.right - 8;
|
||||||
|
|
||||||
|
/* FIXME */
|
||||||
|
if (wndPtr->dwStyle & TBS_BOTH) {
|
||||||
|
infoPtr->rcChannel.top = rect.bottom / 2 - 2;
|
||||||
|
infoPtr->rcChannel.bottom = rect.bottom / 2 + 2;
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (wndPtr->dwStyle & TBS_TOP) {
|
||||||
|
infoPtr->rcChannel.top = rect.top + 10;
|
||||||
|
infoPtr->rcChannel.bottom = rect.top + 14;
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* TBS_BOTTOM */
|
||||||
|
infoPtr->rcChannel.top = rect.bottom - 14;
|
||||||
|
infoPtr->rcChannel.bottom = rect.bottom - 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// << TRACKBAR_Timer >>
|
||||||
|
// << TRACKBAR_WinIniChange >>
|
||||||
|
|
||||||
|
|
||||||
|
LRESULT WINAPI
|
||||||
|
TrackbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
WND *wndPtr = WIN_FindWndPtr(hwnd);
|
||||||
|
|
||||||
|
switch (uMsg)
|
||||||
|
{
|
||||||
|
case TBM_CLEARSEL:
|
||||||
|
return TRACKBAR_ClearSel (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case TBM_CLEARTICS:
|
||||||
|
// case TBM_GETBUDDY:
|
||||||
|
// case TBM_GETCHANNELRECT:
|
||||||
|
|
||||||
|
case TBM_GETLINESIZE:
|
||||||
|
return TRACKBAR_GetLineSize (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case TBM_GETNUMTICS:
|
||||||
|
|
||||||
|
case TBM_GETPAGESIZE:
|
||||||
|
return TRACKBAR_GetPageSize (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case TBM_GETPOS:
|
||||||
|
return TRACKBAR_GetPos (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case TBM_GETPTICS:
|
||||||
|
|
||||||
|
case TBM_GETRANGEMAX:
|
||||||
|
return TRACKBAR_GetRangeMax (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case TBM_GETRANGEMIN:
|
||||||
|
return TRACKBAR_GetRangeMin (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case TBM_GETSELEND:
|
||||||
|
return TRACKBAR_GetSelEnd (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case TBM_GETSELSTART:
|
||||||
|
return TRACKBAR_GetSelStart (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case TBM_GETTHUMBLENGTH:
|
||||||
|
return TRACKBAR_GetThumbLength (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case TBM_GETTHUMBRECT:
|
||||||
|
// case TBM_GETTIC:
|
||||||
|
// case TBM_GETTICPOS:
|
||||||
|
// case TBM_GETTOOLTIPS:
|
||||||
|
// case TBM_GETUNICODEFORMAT:
|
||||||
|
// case TBM_SETBUDDY:
|
||||||
|
// case TBM_SETPAGESIZE:
|
||||||
|
// case TBM_SETPOS:
|
||||||
|
// case TBM_SETRANGE:
|
||||||
|
// case TBM_SETRANGEMAX:
|
||||||
|
// case TBM_SETRANGEMIN:
|
||||||
|
// case TBM_SETSEL:
|
||||||
|
// case TBM_SETSELEND:
|
||||||
|
// case TBM_SETSELSTART:
|
||||||
|
// case TBM_SETTHUMBLENGTH:
|
||||||
|
// case TBM_SETTIC:
|
||||||
|
// case TBM_SETTICFREQ:
|
||||||
|
// case TBM_SETTIPSIDE:
|
||||||
|
// case TBM_SETTOOLTIPS:
|
||||||
|
// case TBM_SETUNICODEFORMAT:
|
||||||
|
|
||||||
|
|
||||||
|
// case WM_CAPTURECHANGED:
|
||||||
|
|
||||||
|
case WM_CREATE:
|
||||||
|
return TRACKBAR_Create (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_DESTROY:
|
||||||
|
return TRACKBAR_Destroy (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_ENABLE:
|
||||||
|
|
||||||
|
// case WM_ERASEBKGND:
|
||||||
|
// return 0;
|
||||||
|
|
||||||
|
case WM_GETDLGCODE:
|
||||||
|
return DLGC_WANTARROWS;
|
||||||
|
|
||||||
|
// case WM_KEYDOWN:
|
||||||
|
|
||||||
|
// case WM_KEYUP:
|
||||||
|
|
||||||
|
case WM_KILLFOCUS:
|
||||||
|
return TRACKBAR_KillFocus (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_LBUTTONDOWN:
|
||||||
|
return TRACKBAR_LButtonDown (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_LBUTTONUP:
|
||||||
|
|
||||||
|
// case WM_MOUSEMOVE:
|
||||||
|
// return TRACKBAR_MouseMove (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_PAINT:
|
||||||
|
return TRACKBAR_Paint (wndPtr, wParam);
|
||||||
|
|
||||||
|
case WM_SETFOCUS:
|
||||||
|
return TRACKBAR_SetFocus (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_SIZE:
|
||||||
|
return TRACKBAR_Size (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_TIMER:
|
||||||
|
|
||||||
|
// case WM_WININICHANGE:
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (uMsg >= WM_USER)
|
||||||
|
ERR (trackbar, "unknown msg %04x wp=%08x lp=%08lx\n",
|
||||||
|
uMsg, wParam, lParam);
|
||||||
|
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
TRACKBAR_Register (void)
|
||||||
|
{
|
||||||
|
WNDCLASS32A wndClass;
|
||||||
|
|
||||||
|
if (GlobalFindAtom32A (TRACKBAR_CLASS32A)) return;
|
||||||
|
|
||||||
|
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
|
||||||
|
wndClass.style = CS_GLOBALCLASS;
|
||||||
|
wndClass.lpfnWndProc = (WNDPROC32)TrackbarWindowProc;
|
||||||
|
wndClass.cbClsExtra = 0;
|
||||||
|
wndClass.cbWndExtra = sizeof(TRACKBAR_INFO *);
|
||||||
|
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
|
||||||
|
wndClass.hbrBackground = (HBRUSH32)(COLOR_3DFACE + 1);
|
||||||
|
wndClass.lpszClassName = TRACKBAR_CLASS32A;
|
||||||
|
|
||||||
|
RegisterClass32A (&wndClass);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
/*
|
||||||
|
* Treeview control
|
||||||
|
*
|
||||||
|
* Copyright 1998 Eric Kohl
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* This is just a dummy control. An author is needed! Any volunteers?
|
||||||
|
* I will only improve this control once in a while.
|
||||||
|
* Eric <ekohl@abo.rhein-zeitung.de>
|
||||||
|
*
|
||||||
|
* TODO:
|
||||||
|
* - All messages.
|
||||||
|
* - All notifications.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "windows.h"
|
||||||
|
#include "commctrl.h"
|
||||||
|
#include "treeview.h"
|
||||||
|
#include "heap.h"
|
||||||
|
#include "win.h"
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define TREEVIEW_GetInfoPtr(wndPtr) ((TREEVIEW_INFO *)wndPtr->wExtra[0])
|
||||||
|
|
||||||
|
|
||||||
|
LRESULT WINAPI
|
||||||
|
TreeviewWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
WND *wndPtr = WIN_FindWndPtr(hwnd);
|
||||||
|
|
||||||
|
switch (uMsg)
|
||||||
|
{
|
||||||
|
// case WM_CREATE:
|
||||||
|
// return TREEVIEW_Create (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_DESTROY:
|
||||||
|
// return TREEVIEW_Destroy (wndPtr, wParam, lParam);
|
||||||
|
|
||||||
|
// case WM_PAINT:
|
||||||
|
// return TREEVIEW_Paint (wndPtr, wParam);
|
||||||
|
|
||||||
|
// case WM_SETFONT:
|
||||||
|
|
||||||
|
// case WM_TIMER:
|
||||||
|
|
||||||
|
// case WM_WININICHANGE:
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (uMsg >= WM_USER)
|
||||||
|
ERR (treeview, "unknown msg %04x wp=%08x lp=%08lx\n",
|
||||||
|
uMsg, wParam, lParam);
|
||||||
|
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
TREEVIEW_Register (void)
|
||||||
|
{
|
||||||
|
WNDCLASS32A wndClass;
|
||||||
|
|
||||||
|
if (GlobalFindAtom32A (WC_TREEVIEW32A)) return;
|
||||||
|
|
||||||
|
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
|
||||||
|
wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS;
|
||||||
|
wndClass.lpfnWndProc = (WNDPROC32)TreeviewWindowProc;
|
||||||
|
wndClass.cbClsExtra = 0;
|
||||||
|
wndClass.cbWndExtra = sizeof(TREEVIEW_INFO *);
|
||||||
|
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
|
||||||
|
wndClass.hbrBackground = 0;
|
||||||
|
wndClass.lpszClassName = WC_TREEVIEW32A;
|
||||||
|
|
||||||
|
RegisterClass32A (&wndClass);
|
||||||
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* arrow keys
|
* arrow keys
|
||||||
* - I am not sure about the default values for the Min, Max, Pos
|
* - I am not sure about the default values for the Min, Max, Pos
|
||||||
* (in the UPDOWN_INFO the fields: MinVal, MaxVal, CurVal)
|
* (in the UPDOWN_INFO the fields: MinVal, MaxVal, CurVal)
|
||||||
* - I think I don not handle correctly the WS_BORDER style.
|
* - I think I do not handle correctly the WS_BORDER style.
|
||||||
* (Should be fixed. <ekohl@abo.rhein-zeitung.de>)
|
* (Should be fixed. <ekohl@abo.rhein-zeitung.de>)
|
||||||
*
|
*
|
||||||
* Testing:
|
* Testing:
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
-----------
|
-----------
|
||||||
This paragraph describes the development status of the common controls.
|
This paragraph describes the development status of the common controls.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
3.1 Animation Control
|
3.1 Animation Control
|
||||||
|
@ -98,11 +99,14 @@
|
||||||
|
|
||||||
3.10 List View Control
|
3.10 List View Control
|
||||||
----------------------
|
----------------------
|
||||||
|
Author:
|
||||||
|
Dummy written by Eric Kohl.
|
||||||
|
|
||||||
Status:
|
Status:
|
||||||
- Nothing done at all.
|
- Dummy control. No functionality.
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
This control id NEEDED in many places. Any volunteers??
|
This control is NEEDED in many places. Any volunteers??
|
||||||
|
|
||||||
|
|
||||||
3.11 Month Calendar Control
|
3.11 Month Calendar Control
|
||||||
|
@ -113,12 +117,14 @@
|
||||||
|
|
||||||
3.12 Pager Control
|
3.12 Pager Control
|
||||||
------------------
|
------------------
|
||||||
|
Author:
|
||||||
|
Dummy written by Eric Kohl.
|
||||||
|
|
||||||
Status:
|
Status:
|
||||||
- Dummy control. No functionality.
|
Dummy control. No functionality.
|
||||||
- Not yet published.
|
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
The dummy source code is available from the author.
|
Author needed!! Any volunteers??
|
||||||
|
|
||||||
|
|
||||||
3.13 Progress Bar Control
|
3.13 Progress Bar Control
|
||||||
|
@ -139,23 +145,27 @@
|
||||||
|
|
||||||
3.14 Property Sheet
|
3.14 Property Sheet
|
||||||
-------------------
|
-------------------
|
||||||
|
Author:
|
||||||
|
Anders Carlsson <anders.carlsson@linux.nu>
|
||||||
|
|
||||||
Status:
|
Status:
|
||||||
- Nothing done at all.
|
- Development in progress.
|
||||||
|
- Not yet published.
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
- This control id NEEDED in many places.
|
Tab control must be implemented first.
|
||||||
- Tab control has to be implemented first.
|
|
||||||
Any volunteers??
|
|
||||||
|
|
||||||
|
|
||||||
3.15 Rebar Control (Cool Bar)
|
3.15 Rebar Control (Cool Bar)
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
Author:
|
||||||
|
Dummy written by Eric Kohl.
|
||||||
|
|
||||||
Status:
|
Status:
|
||||||
- Dummy control. No functionality.
|
- Dummy control. No functionality.
|
||||||
- Not yet published.
|
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
The dummy source code is available from the author.
|
Author needed!! Any volunteers??
|
||||||
|
|
||||||
|
|
||||||
3.16 Status Bar Control
|
3.16 Status Bar Control
|
||||||
|
@ -176,9 +186,12 @@
|
||||||
|
|
||||||
3.17 Tab Control
|
3.17 Tab Control
|
||||||
----------------
|
----------------
|
||||||
|
Author:
|
||||||
|
Anders Carlsson <anders.carlsson@linux.nu>
|
||||||
|
|
||||||
Status:
|
Status:
|
||||||
- Nothing done at all.
|
- Development in progress.
|
||||||
- needed.
|
- Not yet published.
|
||||||
|
|
||||||
|
|
||||||
3.18 Toolbar Control
|
3.18 Toolbar Control
|
||||||
|
@ -190,6 +203,9 @@
|
||||||
- Development in progress.
|
- Development in progress.
|
||||||
- Basic functionality is almost done. (dll version 4.0)
|
- Basic functionality is almost done. (dll version 4.0)
|
||||||
|
|
||||||
|
Notes
|
||||||
|
Bitmaps are not correctly displayed.
|
||||||
|
|
||||||
|
|
||||||
3.19 Tooltip Control
|
3.19 Tooltip Control
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -198,17 +214,21 @@
|
||||||
|
|
||||||
Status:
|
Status:
|
||||||
- Development in progress.
|
- Development in progress.
|
||||||
- Not yet published, but will be published soon.
|
|
||||||
|
Notes
|
||||||
|
The control does not show.
|
||||||
|
|
||||||
|
|
||||||
3.20 Trackbar Control
|
3.20 Trackbar Control
|
||||||
---------------------
|
---------------------
|
||||||
Author:
|
Author:
|
||||||
Eric Kohl <ekohl@abo.rhein-zeitung.de>
|
Dummy written by Eric Kohl.
|
||||||
|
|
||||||
Status:
|
Status:
|
||||||
- Development in progress.
|
- Dummy control. No functionality.
|
||||||
- Not yet published, but will be published soon.
|
|
||||||
|
Notes:
|
||||||
|
Author needed!! Any volunteers??
|
||||||
|
|
||||||
|
|
||||||
3.21 Tree View Control
|
3.21 Tree View Control
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.\" -*- nroff -*-
|
.\" -*- nroff -*-
|
||||||
.TH WINE 1 "June 22, 1998" "Version 980614" "Windows Emulator"
|
.TH WINE 1 "July 8, 1998" "Version 980628" "Windows Emulator"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
wine \- run Windows programs under Unix
|
wine \- run Windows programs under Unix
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -38,11 +38,15 @@ compiled the libraries yourself, they were probably compiled with the
|
||||||
reetrant option enabled.
|
reetrant option enabled.
|
||||||
.PP
|
.PP
|
||||||
.B libXpm
|
.B libXpm
|
||||||
must be installed. It is probably available from the same site
|
must be installed. If you're using Red Hat, the name of the package is
|
||||||
.B wine
|
XFree86-devel. The sources may be FTP'd from ftp.Xfree86.org or its
|
||||||
was, or the sources may be FTP'd from ftp.x.org. Usually it's in a
|
mirrors.
|
||||||
package named something like XFree86-devel.
|
.PP
|
||||||
|
.B gcc
|
||||||
|
2.7.x or later is required to build
|
||||||
|
.B wine.
|
||||||
|
Versions earlier than 2.7.2.3 may have problems when certain files are
|
||||||
|
compiled with optimization.
|
||||||
.SH INSTALLATION
|
.SH INSTALLATION
|
||||||
To install
|
To install
|
||||||
.B Wine,
|
.B Wine,
|
||||||
|
@ -59,7 +63,7 @@ the --prefix option when running
|
||||||
.PP
|
.PP
|
||||||
For more information, see the
|
For more information, see the
|
||||||
.B README
|
.B README
|
||||||
file contained in the source distribution
|
file contained in the source distribution.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.TP
|
.TP
|
||||||
.I -backingstore
|
.I -backingstore
|
||||||
|
@ -72,13 +76,20 @@ Enter the debugger before starting application
|
||||||
Turn debugging messages on or off.
|
Turn debugging messages on or off.
|
||||||
.RS +7
|
.RS +7
|
||||||
.PP
|
.PP
|
||||||
xxx can be one of the following: err, warn, fixme, or trace, and # can be
|
xxx is optional and can be one of the following:
|
||||||
either + or -. Note that there is not a space between names.
|
.I err,
|
||||||
|
.I warn,
|
||||||
|
.I fixme,
|
||||||
|
or
|
||||||
|
.I trace.
|
||||||
|
If xxx is not specified, all debugging messages for the specified
|
||||||
|
channel are turned on. # is required and can be either + or -. Note that
|
||||||
|
there is not a space after the comma between names.
|
||||||
.PP
|
.PP
|
||||||
For instance:
|
For instance:
|
||||||
.PP
|
.PP
|
||||||
.I -debugmsg warn+dll,+heap
|
.I -debugmsg warn+dll,+heap
|
||||||
will turn on DLL and heap warning messages.
|
will turn on DLL warning messages and all heap messages.
|
||||||
.br
|
.br
|
||||||
.I -debugmsg fixme-all,warn+cursor,+relay
|
.I -debugmsg fixme-all,warn+cursor,+relay
|
||||||
will turn off all FIXME messages, turn on cursor warning messages, and turn
|
will turn off all FIXME messages, turn on cursor warning messages, and turn
|
||||||
|
@ -165,7 +176,7 @@ Possible arguments are: win31, win95, nt351, and nt40.
|
||||||
.PD 1
|
.PD 1
|
||||||
.SH PROGRAM/ARGUMENTS
|
.SH PROGRAM/ARGUMENTS
|
||||||
The program name may be specified in DOS format (C:\\WINDOWS\\SOL.EXE) or in
|
The program name may be specified in DOS format (C:\\WINDOWS\\SOL.EXE) or in
|
||||||
Linux format (/msdos/windows/sol.exe). The program being executed may be
|
Unix format (/msdos/windows/sol.exe). The program being executed may be
|
||||||
passed arguments by adding them on to the end of the command line invoking
|
passed arguments by adding them on to the end of the command line invoking
|
||||||
.B wine
|
.B wine
|
||||||
(such as: wine "notepad C:\\TEMP\\README.TXT"). Note that
|
(such as: wine "notepad C:\\TEMP\\README.TXT"). Note that
|
||||||
|
@ -183,7 +194,7 @@ the
|
||||||
.B configure
|
.B configure
|
||||||
script. Alternatively, you may have a
|
script. Alternatively, you may have a
|
||||||
.I .winerc
|
.I .winerc
|
||||||
file of this format in your home directory or the environment variable
|
file of this format in your home directory or have the environment variable
|
||||||
.B WINE_INI
|
.B WINE_INI
|
||||||
pointing to a configuration file.
|
pointing to a configuration file.
|
||||||
.SH CONFIGURATION FILE FORMAT
|
.SH CONFIGURATION FILE FORMAT
|
||||||
|
@ -327,7 +338,7 @@ default: none
|
||||||
.br
|
.br
|
||||||
default: false
|
default: false
|
||||||
.br
|
.br
|
||||||
Use Win95 look (true) or Win3.1 look (false).
|
Use Win95-like window displays or Win3.1-like window displays.
|
||||||
.SH SAMPLE CONFIGURATION FILE
|
.SH SAMPLE CONFIGURATION FILE
|
||||||
[Drive A]
|
[Drive A]
|
||||||
.br
|
.br
|
||||||
|
@ -380,26 +391,14 @@ Exclude=WM_TIMER;WM_SETCURSOR;WM_MOUSEMOVE;WM_NCHITTEST;
|
||||||
Include=WM_COMMAND;
|
Include=WM_COMMAND;
|
||||||
.PP
|
.PP
|
||||||
[Tweak.Layout]
|
[Tweak.Layout]
|
||||||
.br Win95Look=[true|false]
|
.br
|
||||||
.br Win95Look=true enables Win95-like windows layouts; Win95Look=false
|
Win95Look=true
|
||||||
uses Win3.1-like displays. If this section is not included, it defaults
|
|
||||||
to false.
|
|
||||||
.SH AUTHORS
|
.SH AUTHORS
|
||||||
.B Wine
|
.B Wine
|
||||||
is available thanks to the work of Bob Amstadt, Dag Asheim,
|
is available thanks to the work of many developers. For a listing
|
||||||
Martin Ayotte, Ross Biro, Erik Bos, Fons Botman, John Brezak,
|
of the authors, please see the file
|
||||||
Andrew Bulhak, John Burton, Paul Falstad, Olaf Flebbe, Peter Galbavy,
|
.B AUTHORS
|
||||||
Ramon Garcia, Hans de Graaf, Charles M. Hannum, Cameron Heide,
|
in the top-level directory of the source distribution.
|
||||||
Jochen Hoenicke, Jeffrey Hsu, Miguel de Icaza, Alexandre Julliard,
|
|
||||||
Jon Konrath, Scott A. Laird, Martin von Loewis, Kenneth MacDonald,
|
|
||||||
Peter MacDonald, William Magro, Marcus Meissner, Graham Menhennitt,
|
|
||||||
David Metcalfe, Michael Patra, John Richardson, Johannes Ruscheinski,
|
|
||||||
Thomas Sandford, Constantine Sapuntzakis, Daniel Schepler,
|
|
||||||
Bernd Schmidt, Yngvi Sigurjonsson, Rick Sladkey, William Smith,
|
|
||||||
Erik Svendsen, Goran Thyni, Jimmy Tirtawangsa, Jon Tombs,
|
|
||||||
Linus Torvalds, Gregory Trubetskoy, Michael Veksler, Morten Welinder,
|
|
||||||
Jan Willamowius, Carl Williams, Karl Guenter Wuensch, Eric Youngdale,
|
|
||||||
and James Youngman.
|
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
There are too many to count, much less list. Some bugs of note, however,
|
There are too many to count, much less list. Some bugs of note, however,
|
||||||
are that programs requiring VBRUNxxx.DLL are unreliable (with reports of
|
are that programs requiring VBRUNxxx.DLL are unreliable (with reports of
|
||||||
|
@ -416,7 +415,7 @@ Bug reports and successes may be posted to
|
||||||
.SH AVAILABILITY
|
.SH AVAILABILITY
|
||||||
The most recent public version of
|
The most recent public version of
|
||||||
.B wine
|
.B wine
|
||||||
can be ftp'ed from tsx-11.mit.edu in the /pub/linux/ALPHA/Wine/development
|
can be ftp'ed from sunsite.unc.edu or tsx-11.mit.edu in the /pub/linux/ALPHA/Wine/development
|
||||||
directory. The releases are in the format 'Wine-yymmdd.tar.gz',
|
directory. The releases are in the format 'Wine-yymmdd.tar.gz',
|
||||||
or 'Wine-yymmdd.diff.gz' for the diff's from the previous release.
|
or 'Wine-yymmdd.diff.gz' for the diff's from the previous release.
|
||||||
.PP
|
.PP
|
||||||
|
|
|
@ -742,15 +742,24 @@ BOOL32 WINAPI GetDiskFreeSpaceEx32W( LPCWSTR root, LPULARGE_INTEGER avail,
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetDriveType16 (KERNEL.136)
|
* GetDriveType16 (KERNEL.136)
|
||||||
|
* This functions returns the drivetype of a drive in Win16.
|
||||||
|
* Note that it returns DRIVE_REMOTE for CD-ROMs, since MSCDEX uses the
|
||||||
|
* remote drive API. The returnvalue DRIVE_REMOTE for CD-ROMs has been
|
||||||
|
* verified on Win3.11 and Windows 95. Some programs rely on it, so don't
|
||||||
|
* do any pseudo-clever changes.
|
||||||
|
*
|
||||||
|
* RETURNS
|
||||||
|
* drivetype DRIVE_xxx
|
||||||
*/
|
*/
|
||||||
UINT16 WINAPI GetDriveType16( UINT16 drive )
|
UINT16 WINAPI GetDriveType16(
|
||||||
{
|
UINT16 drive /* [in] number (NOT letter) of drive */
|
||||||
|
) {
|
||||||
TRACE(dosfs, "(%c:)\n", 'A' + drive );
|
TRACE(dosfs, "(%c:)\n", 'A' + drive );
|
||||||
switch(DRIVE_GetType(drive))
|
switch(DRIVE_GetType(drive))
|
||||||
{
|
{
|
||||||
case TYPE_FLOPPY: return DRIVE_REMOVABLE;
|
case TYPE_FLOPPY: return DRIVE_REMOVABLE;
|
||||||
case TYPE_HD: return DRIVE_FIXED;
|
case TYPE_HD: return DRIVE_FIXED;
|
||||||
case TYPE_CDROM: return DRIVE_REMOVABLE;
|
case TYPE_CDROM: return DRIVE_REMOTE;
|
||||||
case TYPE_NETWORK: return DRIVE_REMOTE;
|
case TYPE_NETWORK: return DRIVE_REMOTE;
|
||||||
case TYPE_INVALID:
|
case TYPE_INVALID:
|
||||||
default: return DRIVE_CANNOTDETERMINE;
|
default: return DRIVE_CANNOTDETERMINE;
|
||||||
|
|
|
@ -170,21 +170,20 @@ static PROFILESECTION *PROFILE_Load( FILE *file )
|
||||||
char *p, *p2;
|
char *p, *p2;
|
||||||
int line = 0;
|
int line = 0;
|
||||||
PROFILESECTION *section, *first_section;
|
PROFILESECTION *section, *first_section;
|
||||||
PROFILESECTION **prev_section;
|
PROFILESECTION **next_section;
|
||||||
PROFILEKEY *key, **prev_key;
|
PROFILEKEY *key, *prev_key, **next_key;
|
||||||
|
|
||||||
first_section = HEAP_xalloc( SystemHeap, 0, sizeof(*section) );
|
first_section = HEAP_xalloc( SystemHeap, 0, sizeof(*section) );
|
||||||
first_section->name = NULL;
|
first_section->name = NULL;
|
||||||
first_section->key = NULL;
|
first_section->key = NULL;
|
||||||
first_section->next = NULL;
|
first_section->next = NULL;
|
||||||
prev_section = &first_section->next;
|
next_section = &first_section->next;
|
||||||
prev_key = &first_section->key;
|
next_key = &first_section->key;
|
||||||
|
prev_key = NULL;
|
||||||
|
|
||||||
while (fgets( buffer, PROFILE_MAX_LINE_LEN, file ))
|
while (fgets( buffer, PROFILE_MAX_LINE_LEN, file ))
|
||||||
{
|
{
|
||||||
line++;
|
line++;
|
||||||
p = buffer + strlen(buffer) - 1;
|
|
||||||
while ((p > buffer) && ((*p == '\n') || PROFILE_isspace(*p))) *p--='\0';
|
|
||||||
p = buffer;
|
p = buffer;
|
||||||
while (*p && PROFILE_isspace(*p)) p++;
|
while (*p && PROFILE_isspace(*p)) p++;
|
||||||
if (*p == '[') /* section start */
|
if (*p == '[') /* section start */
|
||||||
|
@ -202,9 +201,10 @@ static PROFILESECTION *PROFILE_Load( FILE *file )
|
||||||
section->name = HEAP_strdupA( SystemHeap, 0, p );
|
section->name = HEAP_strdupA( SystemHeap, 0, p );
|
||||||
section->key = NULL;
|
section->key = NULL;
|
||||||
section->next = NULL;
|
section->next = NULL;
|
||||||
*prev_section = section;
|
*next_section = section;
|
||||||
prev_section = §ion->next;
|
next_section = §ion->next;
|
||||||
prev_key = §ion->key;
|
next_key = §ion->key;
|
||||||
|
prev_key = NULL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -214,20 +214,22 @@ static PROFILESECTION *PROFILE_Load( FILE *file )
|
||||||
while ((p3 > p) && PROFILE_isspace(*p3)) *p3-- = '\0';
|
while ((p3 > p) && PROFILE_isspace(*p3)) *p3-- = '\0';
|
||||||
*p2++ = '\0';
|
*p2++ = '\0';
|
||||||
while (*p2 && PROFILE_isspace(*p2)) p2++;
|
while (*p2 && PROFILE_isspace(*p2)) p2++;
|
||||||
|
p3 = p2 + strlen(p2) - 1;
|
||||||
|
while ((p3 > p2) && ((*p3 == '\n') || PROFILE_isspace(*p3))) *p3--='\0';
|
||||||
}
|
}
|
||||||
key = HEAP_xalloc( SystemHeap, 0, sizeof(*key) );
|
|
||||||
key->name = HEAP_strdupA( SystemHeap, 0, p );
|
if(*p || !prev_key || *prev_key->name)
|
||||||
key->value = p2 ? HEAP_strdupA( SystemHeap, 0, p2 ) : NULL;
|
{
|
||||||
key->next = NULL;
|
key = HEAP_xalloc( SystemHeap, 0, sizeof(*key) );
|
||||||
*prev_key = key;
|
key->name = HEAP_strdupA( SystemHeap, 0, p );
|
||||||
prev_key = &key->next;
|
key->value = p2 ? HEAP_strdupA( SystemHeap, 0, p2 ) : NULL;
|
||||||
}
|
key->next = NULL;
|
||||||
if (TRACE_ON(profile))
|
*next_key = key;
|
||||||
{
|
next_key = &key->next;
|
||||||
TRACE(profile, "dump:\n" );
|
prev_key = key;
|
||||||
/* FIXME: improper use of stddeb! */
|
|
||||||
PROFILE_Save(stddeb, first_section );
|
TRACE(profile, "New key: name='%s', value='%s'\n",key->name,key->value?key->value:"(none)");
|
||||||
TRACE(profile, "finished.\n" );
|
}
|
||||||
}
|
}
|
||||||
return first_section;
|
return first_section;
|
||||||
}
|
}
|
||||||
|
@ -467,10 +469,10 @@ static BOOL32 PROFILE_Open( LPCSTR filename )
|
||||||
* PROFILE_GetSection
|
* PROFILE_GetSection
|
||||||
*
|
*
|
||||||
* Returns all keys of a section.
|
* Returns all keys of a section.
|
||||||
* If return_values is TRUE, also include the corrseponding values.
|
* If return_values is TRUE, also include the corresponding values.
|
||||||
*/
|
*/
|
||||||
static INT32 PROFILE_GetSection( PROFILESECTION *section, LPCSTR section_name,
|
static INT32 PROFILE_GetSection( PROFILESECTION *section, LPCSTR section_name,
|
||||||
LPSTR buffer, INT32 len, BOOL32 handle_env,
|
LPSTR buffer, UINT32 len, BOOL32 handle_env,
|
||||||
BOOL32 return_values )
|
BOOL32 return_values )
|
||||||
{
|
{
|
||||||
PROFILEKEY *key;
|
PROFILEKEY *key;
|
||||||
|
@ -478,7 +480,7 @@ static INT32 PROFILE_GetSection( PROFILESECTION *section, LPCSTR section_name,
|
||||||
{
|
{
|
||||||
if (section->name && !strcasecmp( section->name, section_name ))
|
if (section->name && !strcasecmp( section->name, section_name ))
|
||||||
{
|
{
|
||||||
INT32 oldlen = len;
|
UINT32 oldlen = len;
|
||||||
for (key = section->key; key; key = key->next)
|
for (key = section->key; key; key = key->next)
|
||||||
{
|
{
|
||||||
if (len <= 2) break;
|
if (len <= 2) break;
|
||||||
|
@ -520,7 +522,7 @@ static INT32 PROFILE_GetSection( PROFILESECTION *section, LPCSTR section_name,
|
||||||
* Get a profile string.
|
* Get a profile string.
|
||||||
*/
|
*/
|
||||||
static INT32 PROFILE_GetString( LPCSTR section, LPCSTR key_name,
|
static INT32 PROFILE_GetString( LPCSTR section, LPCSTR key_name,
|
||||||
LPCSTR def_val, LPSTR buffer, INT32 len )
|
LPCSTR def_val, LPSTR buffer, UINT32 len )
|
||||||
{
|
{
|
||||||
PROFILEKEY *key = NULL;
|
PROFILEKEY *key = NULL;
|
||||||
|
|
||||||
|
@ -843,7 +845,7 @@ UINT32 WINAPI GetProfileInt32W( LPCWSTR section, LPCWSTR entry, INT32 def_val )
|
||||||
* GetProfileString16 (KERNEL.58)
|
* GetProfileString16 (KERNEL.58)
|
||||||
*/
|
*/
|
||||||
INT16 WINAPI GetProfileString16( LPCSTR section, LPCSTR entry, LPCSTR def_val,
|
INT16 WINAPI GetProfileString16( LPCSTR section, LPCSTR entry, LPCSTR def_val,
|
||||||
LPSTR buffer, INT16 len )
|
LPSTR buffer, UINT16 len )
|
||||||
{
|
{
|
||||||
return GetPrivateProfileString16( section, entry, def_val,
|
return GetPrivateProfileString16( section, entry, def_val,
|
||||||
buffer, len, "win.ini" );
|
buffer, len, "win.ini" );
|
||||||
|
@ -853,7 +855,7 @@ INT16 WINAPI GetProfileString16( LPCSTR section, LPCSTR entry, LPCSTR def_val,
|
||||||
* GetProfileString32A (KERNEL32.268)
|
* GetProfileString32A (KERNEL32.268)
|
||||||
*/
|
*/
|
||||||
INT32 WINAPI GetProfileString32A( LPCSTR section, LPCSTR entry, LPCSTR def_val,
|
INT32 WINAPI GetProfileString32A( LPCSTR section, LPCSTR entry, LPCSTR def_val,
|
||||||
LPSTR buffer, INT32 len )
|
LPSTR buffer, UINT32 len )
|
||||||
{
|
{
|
||||||
return GetPrivateProfileString32A( section, entry, def_val,
|
return GetPrivateProfileString32A( section, entry, def_val,
|
||||||
buffer, len, "win.ini" );
|
buffer, len, "win.ini" );
|
||||||
|
@ -863,7 +865,7 @@ INT32 WINAPI GetProfileString32A( LPCSTR section, LPCSTR entry, LPCSTR def_val,
|
||||||
* GetProfileString32W (KERNEL32.269)
|
* GetProfileString32W (KERNEL32.269)
|
||||||
*/
|
*/
|
||||||
INT32 WINAPI GetProfileString32W( LPCWSTR section, LPCWSTR entry,
|
INT32 WINAPI GetProfileString32W( LPCWSTR section, LPCWSTR entry,
|
||||||
LPCWSTR def_val, LPWSTR buffer, INT32 len )
|
LPCWSTR def_val, LPWSTR buffer, UINT32 len )
|
||||||
{
|
{
|
||||||
if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, "win.ini" );
|
if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, "win.ini" );
|
||||||
return GetPrivateProfileString32W( section, entry, def_val,
|
return GetPrivateProfileString32W( section, entry, def_val,
|
||||||
|
@ -873,7 +875,7 @@ INT32 WINAPI GetProfileString32W( LPCWSTR section, LPCWSTR entry,
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetProfileSection32A (KERNEL32.268)
|
* GetProfileSection32A (KERNEL32.268)
|
||||||
*/
|
*/
|
||||||
INT32 WINAPI GetProfileSection32A( LPCSTR section, LPSTR buffer, INT32 len )
|
INT32 WINAPI GetProfileSection32A( LPCSTR section, LPSTR buffer, UINT32 len )
|
||||||
{
|
{
|
||||||
return GetPrivateProfileSection32A( section, buffer, len, "win.ini" );
|
return GetPrivateProfileSection32A( section, buffer, len, "win.ini" );
|
||||||
}
|
}
|
||||||
|
@ -961,7 +963,7 @@ UINT32 WINAPI GetPrivateProfileInt32W( LPCWSTR section, LPCWSTR entry,
|
||||||
*/
|
*/
|
||||||
INT16 WINAPI GetPrivateProfileString16( LPCSTR section, LPCSTR entry,
|
INT16 WINAPI GetPrivateProfileString16( LPCSTR section, LPCSTR entry,
|
||||||
LPCSTR def_val, LPSTR buffer,
|
LPCSTR def_val, LPSTR buffer,
|
||||||
INT16 len, LPCSTR filename )
|
UINT16 len, LPCSTR filename )
|
||||||
{
|
{
|
||||||
return GetPrivateProfileString32A(section,entry,def_val,buffer,len,filename);
|
return GetPrivateProfileString32A(section,entry,def_val,buffer,len,filename);
|
||||||
}
|
}
|
||||||
|
@ -971,7 +973,7 @@ INT16 WINAPI GetPrivateProfileString16( LPCSTR section, LPCSTR entry,
|
||||||
*/
|
*/
|
||||||
INT32 WINAPI GetPrivateProfileString32A( LPCSTR section, LPCSTR entry,
|
INT32 WINAPI GetPrivateProfileString32A( LPCSTR section, LPCSTR entry,
|
||||||
LPCSTR def_val, LPSTR buffer,
|
LPCSTR def_val, LPSTR buffer,
|
||||||
INT32 len, LPCSTR filename )
|
UINT32 len, LPCSTR filename )
|
||||||
{
|
{
|
||||||
if (!filename)
|
if (!filename)
|
||||||
filename = "win.ini";
|
filename = "win.ini";
|
||||||
|
@ -986,7 +988,7 @@ INT32 WINAPI GetPrivateProfileString32A( LPCSTR section, LPCSTR entry,
|
||||||
*/
|
*/
|
||||||
INT32 WINAPI GetPrivateProfileString32W( LPCWSTR section, LPCWSTR entry,
|
INT32 WINAPI GetPrivateProfileString32W( LPCWSTR section, LPCWSTR entry,
|
||||||
LPCWSTR def_val, LPWSTR buffer,
|
LPCWSTR def_val, LPWSTR buffer,
|
||||||
INT32 len, LPCWSTR filename )
|
UINT32 len, LPCWSTR filename )
|
||||||
{
|
{
|
||||||
LPSTR sectionA = HEAP_strdupWtoA( GetProcessHeap(), 0, section );
|
LPSTR sectionA = HEAP_strdupWtoA( GetProcessHeap(), 0, section );
|
||||||
LPSTR entryA = HEAP_strdupWtoA( GetProcessHeap(), 0, entry );
|
LPSTR entryA = HEAP_strdupWtoA( GetProcessHeap(), 0, entry );
|
||||||
|
@ -1008,7 +1010,7 @@ INT32 WINAPI GetPrivateProfileString32W( LPCWSTR section, LPCWSTR entry,
|
||||||
* GetPrivateProfileSection32A (KERNEL32.255)
|
* GetPrivateProfileSection32A (KERNEL32.255)
|
||||||
*/
|
*/
|
||||||
INT32 WINAPI GetPrivateProfileSection32A( LPCSTR section, LPSTR buffer,
|
INT32 WINAPI GetPrivateProfileSection32A( LPCSTR section, LPSTR buffer,
|
||||||
INT32 len, LPCSTR filename )
|
UINT32 len, LPCSTR filename )
|
||||||
{
|
{
|
||||||
if (PROFILE_Open( filename ))
|
if (PROFILE_Open( filename ))
|
||||||
return PROFILE_GetSection(CurProfile.section, section, buffer, len,
|
return PROFILE_GetSection(CurProfile.section, section, buffer, len,
|
||||||
|
@ -1091,7 +1093,8 @@ WORD WINAPI GetPrivateProfileSectionNames16( LPSTR buffer, WORD size,
|
||||||
buf=buffer;
|
buf=buffer;
|
||||||
cursize=0;
|
cursize=0;
|
||||||
section=CurProfile.section;
|
section=CurProfile.section;
|
||||||
for ( ; section; section = section->next) {
|
for ( ; section; section = section->next)
|
||||||
|
if (section->name) {
|
||||||
l=strlen (section->name);
|
l=strlen (section->name);
|
||||||
cursize+=l+1;
|
cursize+=l+1;
|
||||||
if (cursize > size+1)
|
if (cursize > size+1)
|
||||||
|
|
1891
graphics/ddraw.c
1891
graphics/ddraw.c
File diff suppressed because it is too large
Load Diff
|
@ -6,12 +6,13 @@
|
||||||
* Copyright 1997 Marcus Meissner
|
* Copyright 1997 Marcus Meissner
|
||||||
* Copyright 1998 Andreas Mohr
|
* Copyright 1998 Andreas Mohr
|
||||||
*/
|
*/
|
||||||
#include <windows.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <config.h>
|
#include "windows.h"
|
||||||
#include <gdi.h>
|
#include "config.h"
|
||||||
#include <debug.h>
|
#include "gdi.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "heap.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ATOM atom;
|
ATOM atom;
|
||||||
|
@ -24,8 +25,9 @@ static ENVTABLE *SearchEnvTable(ATOM atom)
|
||||||
{
|
{
|
||||||
INT16 i;
|
INT16 i;
|
||||||
|
|
||||||
for (i = 20; i; i--) {
|
for (i = 19; i >= 0; i--) {
|
||||||
if (EnvTable[i].atom == atom) return &EnvTable[i];
|
if (EnvTable[i].atom == atom)
|
||||||
|
return &EnvTable[i];
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -46,20 +48,26 @@ static ATOM GDI_GetNullPortAtom(void)
|
||||||
|
|
||||||
static ATOM PortNameToAtom(LPCSTR lpPortName, BOOL16 add)
|
static ATOM PortNameToAtom(LPCSTR lpPortName, BOOL16 add)
|
||||||
{
|
{
|
||||||
char PortName[256];
|
char *p;
|
||||||
LPCSTR p;
|
BOOL32 needfree = FALSE;
|
||||||
|
ATOM ret;
|
||||||
|
|
||||||
if (lpPortName[strlen(lpPortName) - 1] == ':') {
|
if (lpPortName[strlen(lpPortName) - 1] == ':') {
|
||||||
strncpy(PortName, lpPortName, strlen(lpPortName) - 1);
|
p = HEAP_strdupA(GetProcessHeap(), 0, lpPortName);
|
||||||
p = PortName;
|
p[strlen(lpPortName) - 1] = '\0';
|
||||||
|
needfree = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
p = lpPortName;
|
p = (char *)lpPortName;
|
||||||
|
|
||||||
if (add)
|
if (add)
|
||||||
return AddAtom32A(p);
|
ret = AddAtom32A(p);
|
||||||
else
|
else
|
||||||
return FindAtom32A(p);
|
ret = FindAtom32A(p);
|
||||||
|
|
||||||
|
if(needfree) HeapFree(GetProcessHeap(), 0, p);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
|
||||||
NULL, /* pPolyPolyline */
|
NULL, /* pPolyPolyline */
|
||||||
MFDRV_Polygon, /* pPolygon */
|
MFDRV_Polygon, /* pPolygon */
|
||||||
MFDRV_Polyline, /* pPolyline */
|
MFDRV_Polyline, /* pPolyline */
|
||||||
|
NULL, /* pPolyBezier */
|
||||||
NULL, /* pRealizePalette */
|
NULL, /* pRealizePalette */
|
||||||
MFDRV_Rectangle, /* pRectangle */
|
MFDRV_Rectangle, /* pRectangle */
|
||||||
NULL, /* pRestoreDC */
|
NULL, /* pRestoreDC */
|
||||||
|
|
|
@ -629,7 +629,10 @@ void WINAPI DrawFocusRect32( HDC32 hdc, const RECT32* rc )
|
||||||
top = YLPTODP( dc, rc->top );
|
top = YLPTODP( dc, rc->top );
|
||||||
right = XLPTODP( dc, rc->right );
|
right = XLPTODP( dc, rc->right );
|
||||||
bottom = YLPTODP( dc, rc->bottom );
|
bottom = YLPTODP( dc, rc->bottom );
|
||||||
|
|
||||||
|
if(left == right || top == bottom)
|
||||||
|
return;
|
||||||
|
|
||||||
hnewPen = CreatePen32(PS_DOT, 1, GetSysColor32(COLOR_WINDOWTEXT) );
|
hnewPen = CreatePen32(PS_DOT, 1, GetSysColor32(COLOR_WINDOWTEXT) );
|
||||||
hOldPen = SelectObject32( hdc, hnewPen );
|
hOldPen = SelectObject32( hdc, hnewPen );
|
||||||
oldDrawMode = SetROP232(hdc, R2_XORPEN);
|
oldDrawMode = SetROP232(hdc, R2_XORPEN);
|
||||||
|
@ -1057,8 +1060,31 @@ BOOL16 WINAPI DrawState16(HDC16 hdc, HBRUSH16 hbr,
|
||||||
*/
|
*/
|
||||||
BOOL16 WINAPI PolyBezier16( HDC16 hDc, LPPOINT16 lppt, INT16 cPoints )
|
BOOL16 WINAPI PolyBezier16( HDC16 hDc, LPPOINT16 lppt, INT16 cPoints )
|
||||||
{
|
{
|
||||||
FIXME(gdi, "(%x,%p,%d): stub\n",hDc,lppt,cPoints);
|
int i;
|
||||||
return TRUE;
|
BOOL16 ret;
|
||||||
|
LPPOINT32 pt32 = (LPPOINT32)HeapAlloc( GetProcessHeap(), 0,
|
||||||
|
cPoints*sizeof(POINT32) );
|
||||||
|
if(!pt32) return FALSE;
|
||||||
|
for (i=cPoints;i--;) CONV_POINT16TO32(&(lppt[i]),&(pt32[i]));
|
||||||
|
ret= PolyBezier32(hDc, pt32, cPoints);
|
||||||
|
HeapFree( GetProcessHeap(), 0, pt32 );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* PolyBezierTo16 [GDI.503]
|
||||||
|
*/
|
||||||
|
BOOL16 WINAPI PolyBezierTo16( HDC16 hDc, LPPOINT16 lppt, INT16 cPoints )
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
BOOL16 ret;
|
||||||
|
LPPOINT32 pt32 = (LPPOINT32)HeapAlloc( GetProcessHeap(), 0,
|
||||||
|
cPoints*sizeof(POINT32) );
|
||||||
|
if(!pt32) return FALSE;
|
||||||
|
for (i=cPoints;i--;) CONV_POINT16TO32(&(lppt[i]),&(pt32[i]));
|
||||||
|
ret= PolyBezierTo32(hDc, pt32, cPoints);
|
||||||
|
HeapFree( GetProcessHeap(), 0, pt32 );
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -1072,9 +1098,44 @@ BOOL16 WINAPI PolyBezier16( HDC16 hDc, LPPOINT16 lppt, INT16 cPoints )
|
||||||
*
|
*
|
||||||
* RETURNS STD
|
* RETURNS STD
|
||||||
*/
|
*/
|
||||||
BOOL32 WINAPI PolyBezier32( HDC32 hDc, LPPOINT32 lppt, DWORD cPoints )
|
BOOL32 WINAPI PolyBezier32( HDC32 hdc, LPPOINT32 lppt, DWORD cPoints )
|
||||||
{
|
{
|
||||||
FIXME(gdi, "(%x,%p,%ld): stub\n",hDc,lppt,cPoints);
|
DC * dc = DC_GetDCPtr( hdc );
|
||||||
return TRUE;
|
if(!dc) return FALSE;
|
||||||
|
if(dc && PATH_IsPathOpen(dc->w.path))
|
||||||
|
FIXME(gdi, "PATH_PolyBezier is not implemented!\n");
|
||||||
|
// if(!PATH_PolyBezier(hdc, x, y))
|
||||||
|
// return FALSE;
|
||||||
|
return dc->funcs->pPolyBezier&&
|
||||||
|
dc->funcs->pPolyBezier(dc, lppt[0], lppt+1, cPoints-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* PolyBezierTo32 [GDI32.269]
|
||||||
|
* Draws one or more Bezier curves
|
||||||
|
*
|
||||||
|
* PARAMS
|
||||||
|
* hDc [I] Handle to device context
|
||||||
|
* lppt [I] Pointer to endpoints and control points
|
||||||
|
* cPoints [I] Count of endpoints and control points
|
||||||
|
*
|
||||||
|
* RETURNS STD
|
||||||
|
*/
|
||||||
|
BOOL32 WINAPI PolyBezierTo32( HDC32 hdc, LPPOINT32 lppt, DWORD cPoints )
|
||||||
|
{
|
||||||
|
DC * dc = DC_GetDCPtr( hdc );
|
||||||
|
POINT32 pt;
|
||||||
|
BOOL32 ret;
|
||||||
|
if(!dc) return FALSE;
|
||||||
|
pt.x=dc->w.CursPosX;
|
||||||
|
pt.y=dc->w.CursPosY;
|
||||||
|
if(dc && PATH_IsPathOpen(dc->w.path))
|
||||||
|
FIXME(gdi, "PATH_PolyBezierTo is not implemented!\n");
|
||||||
|
// if(!PATH_PolyBezier(hdc, x, y))
|
||||||
|
// return FALSE;
|
||||||
|
ret= dc->funcs->pPolyBezier &&
|
||||||
|
dc->funcs->pPolyBezier(dc, pt, lppt, cPoints);
|
||||||
|
if( dc->funcs->pMoveToEx)
|
||||||
|
dc->funcs->pMoveToEx(dc,lppt[cPoints].x,lppt[cPoints].y,&pt);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
|
@ -48,6 +48,7 @@ static const DC_FUNCTIONS PSDRV_Funcs =
|
||||||
NULL, /* pPolyPolyline */
|
NULL, /* pPolyPolyline */
|
||||||
NULL, /* pPolygon */
|
NULL, /* pPolygon */
|
||||||
NULL, /* pPolyline */
|
NULL, /* pPolyline */
|
||||||
|
NULL, /* pPolyBezier */
|
||||||
NULL, /* pRealizePalette */
|
NULL, /* pRealizePalette */
|
||||||
PSDRV_Rectangle, /* pRectangle */
|
PSDRV_Rectangle, /* pRectangle */
|
||||||
NULL, /* pRestoreDC */
|
NULL, /* pRestoreDC */
|
||||||
|
|
|
@ -80,6 +80,7 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
|
||||||
NULL, /* pPolyPolyline */
|
NULL, /* pPolyPolyline */
|
||||||
WIN16DRV_Polygon, /* pPolygon */
|
WIN16DRV_Polygon, /* pPolygon */
|
||||||
WIN16DRV_Polyline, /* pPolyline */
|
WIN16DRV_Polyline, /* pPolyline */
|
||||||
|
NULL, /* pPolyBezier */
|
||||||
NULL, /* pRealizePalette */
|
NULL, /* pRealizePalette */
|
||||||
WIN16DRV_Rectangle, /* pRectangle */
|
WIN16DRV_Rectangle, /* pRectangle */
|
||||||
NULL, /* pRestoreDC */
|
NULL, /* pRestoreDC */
|
||||||
|
@ -175,8 +176,8 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
|
||||||
printerEnabled, sizeof(printerEnabled) );
|
printerEnabled, sizeof(printerEnabled) );
|
||||||
if (lstrcmpi32A(printerEnabled,"on"))
|
if (lstrcmpi32A(printerEnabled,"on"))
|
||||||
{
|
{
|
||||||
MSG("WIN16DRV_CreateDC disabled in wine.conf file\n");
|
MSG("Printing disabled in wine.conf or .winerc file\n");
|
||||||
MSG("Enable printing with \"printer=on\"");
|
MSG("Use \"printer=on\" in the \"[wine]\" section to enable it.");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,14 +399,33 @@ static struct hpq *hpqueue;
|
||||||
|
|
||||||
HPQ WINAPI CreatePQ(int size)
|
HPQ WINAPI CreatePQ(int size)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
HGLOBAL16 hpq = 0;
|
||||||
|
WORD tmp_size;
|
||||||
|
LPWORD pPQ;
|
||||||
|
|
||||||
|
tmp_size = size << 2;
|
||||||
|
if (!(hpq = GlobalAlloc16(GMEM_SHARE|GMEM_MOVEABLE, tmp_size + 8)))
|
||||||
|
return 0xffff;
|
||||||
|
pPQ = GlobalLock16(hpq);
|
||||||
|
*pPQ++ = 0;
|
||||||
|
*pPQ++ = tmp_size;
|
||||||
|
*pPQ++ = 0;
|
||||||
|
*pPQ++ = 0;
|
||||||
|
GlobalUnlock16(hpq);
|
||||||
|
|
||||||
|
return (HPQ)hpq;
|
||||||
|
#else
|
||||||
FIXME(win16drv, "(%d): stub\n",size);
|
FIXME(win16drv, "(%d): stub\n",size);
|
||||||
return 1;
|
return 1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int WINAPI DeletePQ(HPQ hPQ)
|
int WINAPI DeletePQ(HPQ hPQ)
|
||||||
{
|
{
|
||||||
FIXME(win16drv, "(%x): stub\n", hPQ);
|
return GlobalFree16((HGLOBAL16)hPQ);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int WINAPI ExtractPQ(HPQ hPQ)
|
int WINAPI ExtractPQ(HPQ hPQ)
|
||||||
{
|
{
|
||||||
struct hpq *queue, *prev, *current, *currentPrev;
|
struct hpq *queue, *prev, *current, *currentPrev;
|
||||||
|
|
|
@ -25,7 +25,8 @@ void X11DRV_SetDeviceClipping( DC * dc )
|
||||||
if (!obj)
|
if (!obj)
|
||||||
{
|
{
|
||||||
ERR(x11drv, "Rgn is 0. Please report this.\n");
|
ERR(x11drv, "Rgn is 0. Please report this.\n");
|
||||||
exit(1);
|
return;
|
||||||
|
/*exit(1);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if (obj->rgn->numRects > 0)
|
if (obj->rgn->numRects > 0)
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
|
||||||
|
#define ABS(x) ((x)<0?(-(x)):(x))
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* X11DRV_MoveToEx
|
* X11DRV_MoveToEx
|
||||||
*/
|
*/
|
||||||
|
@ -79,17 +79,16 @@ X11DRV_LineTo( DC *dc, INT32 x, INT32 y )
|
||||||
* Helper functions for Arc(), Chord() and Pie().
|
* Helper functions for Arc(), Chord() and Pie().
|
||||||
* 'lines' is the number of lines to draw: 0 for Arc, 1 for Chord, 2 for Pie.
|
* 'lines' is the number of lines to draw: 0 for Arc, 1 for Chord, 2 for Pie.
|
||||||
*
|
*
|
||||||
* FIXME: incorrect with thick pen and/or PS_INSIDEFRAME style
|
|
||||||
* see ellipse and rectangle functions
|
|
||||||
*/
|
*/
|
||||||
static BOOL32
|
static BOOL32
|
||||||
X11DRV_DrawArc( DC *dc, INT32 left, INT32 top, INT32 right,
|
X11DRV_DrawArc( DC *dc, INT32 left, INT32 top, INT32 right,
|
||||||
INT32 bottom, INT32 xstart, INT32 ystart,
|
INT32 bottom, INT32 xstart, INT32 ystart,
|
||||||
INT32 xend, INT32 yend, INT32 lines )
|
INT32 xend, INT32 yend, INT32 lines )
|
||||||
{
|
{
|
||||||
INT32 xcenter, ycenter, istart_angle, idiff_angle, tmp;
|
INT32 xcenter, ycenter, istart_angle, idiff_angle;
|
||||||
|
INT32 width, oldwidth, oldendcap;
|
||||||
double start_angle, end_angle;
|
double start_angle, end_angle;
|
||||||
XPoint points[3];
|
XPoint points[4];
|
||||||
|
|
||||||
left = XLPTODP( dc, left );
|
left = XLPTODP( dc, left );
|
||||||
top = YLPTODP( dc, top );
|
top = YLPTODP( dc, top );
|
||||||
|
@ -100,10 +99,29 @@ X11DRV_DrawArc( DC *dc, INT32 left, INT32 top, INT32 right,
|
||||||
xend = XLPTODP( dc, xend );
|
xend = XLPTODP( dc, xend );
|
||||||
yend = YLPTODP( dc, yend );
|
yend = YLPTODP( dc, yend );
|
||||||
|
|
||||||
if ((left == right) || (top == bottom)) return TRUE;
|
if (right < left) { INT32 tmp = right; right = left; left = tmp; }
|
||||||
|
if (bottom < top) { INT32 tmp = bottom; bottom = top; top = tmp; }
|
||||||
|
if ((left == right) || (top == bottom)
|
||||||
|
||(lines && ((right-left==1)||(bottom-top==1)))) return TRUE;
|
||||||
|
|
||||||
|
oldwidth = width = dc->u.x.pen.width;
|
||||||
|
oldendcap= dc->u.x.pen.endcap;
|
||||||
|
if (!width) width = 1;
|
||||||
|
if(dc->u.x.pen.style == PS_NULL) width = 0;
|
||||||
|
|
||||||
|
if ((dc->u.x.pen.style == PS_INSIDEFRAME))
|
||||||
|
{
|
||||||
|
if (2*width > (right-left)) width=(right-left + 1)/2;
|
||||||
|
if (2*width > (bottom-top)) width=(bottom-top + 1)/2;
|
||||||
|
left += width / 2;
|
||||||
|
right -= (width - 1) / 2;
|
||||||
|
top += width / 2;
|
||||||
|
bottom -= (width - 1) / 2;
|
||||||
|
}
|
||||||
|
if(width == 0) width=1; /* more accurate */
|
||||||
|
dc->u.x.pen.width=width;
|
||||||
|
dc->u.x.pen.endcap=PS_ENDCAP_SQUARE;
|
||||||
|
|
||||||
if (left > right) { tmp=left; left=right; right=tmp; }
|
|
||||||
if (top > bottom) { tmp=top; top=bottom; bottom=tmp; }
|
|
||||||
xcenter = (right + left) / 2;
|
xcenter = (right + left) / 2;
|
||||||
ycenter = (bottom + top) / 2;
|
ycenter = (bottom + top) / 2;
|
||||||
start_angle = atan2( (double)(ycenter-ystart)*(right-left),
|
start_angle = atan2( (double)(ycenter-ystart)*(right-left),
|
||||||
|
@ -121,14 +139,13 @@ X11DRV_DrawArc( DC *dc, INT32 left, INT32 top, INT32 right,
|
||||||
else
|
else
|
||||||
if ((end_angle == PI)&&( start_angle <0))
|
if ((end_angle == PI)&&( start_angle <0))
|
||||||
end_angle = - PI;
|
end_angle = - PI;
|
||||||
istart_angle = (INT32)(start_angle * 180 * 64 / PI);
|
istart_angle = (INT32)(start_angle * 180 * 64 / PI + 0.5);
|
||||||
idiff_angle = (INT32)((end_angle - start_angle) * 180 * 64 / PI );
|
idiff_angle = (INT32)((end_angle - start_angle) * 180 * 64 / PI + 0.5);
|
||||||
if (idiff_angle <= 0) idiff_angle += 360 * 64;
|
if (idiff_angle <= 0) idiff_angle += 360 * 64;
|
||||||
|
|
||||||
/* Fill arc with brush if Chord() or Pie() */
|
/* Fill arc with brush if Chord() or Pie() */
|
||||||
|
|
||||||
if ((lines > 0) && DC_SetupGCForBrush( dc ))
|
if ((lines > 0) && DC_SetupGCForBrush( dc )) {
|
||||||
{
|
|
||||||
TSXSetArcMode( display, dc->u.x.gc, (lines==1) ? ArcChord : ArcPieSlice);
|
TSXSetArcMode( display, dc->u.x.gc, (lines==1) ? ArcChord : ArcPieSlice);
|
||||||
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
||||||
|
@ -137,24 +154,69 @@ X11DRV_DrawArc( DC *dc, INT32 left, INT32 top, INT32 right,
|
||||||
|
|
||||||
/* Draw arc and lines */
|
/* Draw arc and lines */
|
||||||
|
|
||||||
if (!DC_SetupGCForPen( dc )) return TRUE;
|
if (DC_SetupGCForPen( dc )){
|
||||||
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
||||||
right-left-1, bottom-top-1, istart_angle, idiff_angle );
|
right-left-1, bottom-top-1, istart_angle, idiff_angle );
|
||||||
if (!lines) return TRUE;
|
if (lines) {
|
||||||
|
/* use the truncated values */
|
||||||
points[0].x = dc->w.DCOrgX + xcenter + (int)(cos(start_angle) * (right-left) / 2);
|
start_angle=(double)istart_angle*PI/64./180.;
|
||||||
points[0].y = dc->w.DCOrgY + ycenter - (int)(sin(start_angle) * (bottom-top) / 2);
|
end_angle=(double)(istart_angle+idiff_angle)*PI/64./180.;
|
||||||
points[1].x = dc->w.DCOrgX + xcenter + (int)(cos(end_angle) * (right-left) / 2);
|
/* calculate the endpoints and round correctly */
|
||||||
points[1].y = dc->w.DCOrgY + ycenter - (int)(sin(end_angle) * (bottom-top) / 2);
|
points[0].x = (int) floor(dc->w.DCOrgX + (right+left)/2.0 +
|
||||||
if (lines == 2)
|
cos(start_angle) * (right-left-width*2+2) / 2. + 0.5);
|
||||||
{
|
points[0].y = (int) floor(dc->w.DCOrgY + (top+bottom)/2.0 -
|
||||||
points[2] = points[1];
|
sin(start_angle) * (bottom-top-width*2+2) / 2. + 0.5);
|
||||||
|
points[1].x = (int) floor(dc->w.DCOrgX + (right+left)/2.0 +
|
||||||
|
cos(end_angle) * (right-left-width*2+2) / 2. + 0.5);
|
||||||
|
points[1].y = (int) floor(dc->w.DCOrgY + (top+bottom)/2.0 -
|
||||||
|
sin(end_angle) * (bottom-top-width*2+2) / 2. + 0.5);
|
||||||
|
|
||||||
|
/* OK this stuff is optimized for Xfree86
|
||||||
|
* which is probably the most used server by
|
||||||
|
* wine users. Other X servers will not
|
||||||
|
* display correctly. (eXceed for instance)
|
||||||
|
* so if you feel you must change make sure that
|
||||||
|
* you either use Xfree86 or seperate your changes
|
||||||
|
* from these (compile switch or whatever)
|
||||||
|
*/
|
||||||
|
if (lines == 2) {
|
||||||
|
INT32 dx1,dy1;
|
||||||
|
points[3] = points[1];
|
||||||
points[1].x = dc->w.DCOrgX + xcenter;
|
points[1].x = dc->w.DCOrgX + xcenter;
|
||||||
points[1].y = dc->w.DCOrgY + ycenter;
|
points[1].y = dc->w.DCOrgY + ycenter;
|
||||||
|
points[2] = points[1];
|
||||||
|
dx1=points[1].x-points[0].x;
|
||||||
|
dy1=points[1].y-points[0].y;
|
||||||
|
if(((top-bottom) | -2) == -2)
|
||||||
|
if(dy1>0) points[1].y--;
|
||||||
|
if(dx1<0) {
|
||||||
|
if (((-dx1)*64)<=ABS(dy1)*37) points[0].x--;
|
||||||
|
if(((-dx1*9))<(dy1*16)) points[0].y--;
|
||||||
|
if( dy1<0 && ((dx1*9)) < (dy1*16)) points[0].y--;
|
||||||
|
} else {
|
||||||
|
if(dy1 < 0) points[0].y--;
|
||||||
|
if(((right-left) | -2) == -2) points[1].x--;
|
||||||
|
}
|
||||||
|
dx1=points[3].x-points[2].x;
|
||||||
|
dy1=points[3].y-points[2].y;
|
||||||
|
if(((top-bottom) | -2 ) == -2)
|
||||||
|
if(dy1 < 0) points[2].y--;
|
||||||
|
if( dx1<0){
|
||||||
|
if( dy1>0) points[3].y--;
|
||||||
|
if(((right-left) | -2) == -2 ) points[2].x--;
|
||||||
|
}else {
|
||||||
|
points[3].y--;
|
||||||
|
if( dx1 * 64 < dy1 * -37 ) points[3].x--;
|
||||||
|
}
|
||||||
|
lines++;
|
||||||
}
|
}
|
||||||
TSXDrawLines( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXDrawLines( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
points, lines+1, CoordModeOrigin );
|
points, lines+1, CoordModeOrigin );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dc->u.x.pen.width=oldwidth;
|
||||||
|
dc->u.x.pen.endcap=oldendcap;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +263,6 @@ BOOL32
|
||||||
X11DRV_Ellipse( DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom )
|
X11DRV_Ellipse( DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom )
|
||||||
{
|
{
|
||||||
INT32 width, oldwidth;
|
INT32 width, oldwidth;
|
||||||
|
|
||||||
left = XLPTODP( dc, left );
|
left = XLPTODP( dc, left );
|
||||||
top = YLPTODP( dc, top );
|
top = YLPTODP( dc, top );
|
||||||
right = XLPTODP( dc, right );
|
right = XLPTODP( dc, right );
|
||||||
|
@ -224,7 +285,7 @@ X11DRV_Ellipse( DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom )
|
||||||
top += width / 2;
|
top += width / 2;
|
||||||
bottom -= (width - 1) / 2;
|
bottom -= (width - 1) / 2;
|
||||||
}
|
}
|
||||||
if(width == 1) width=0;
|
if(width == 0) width=1; /* more accurate */
|
||||||
dc->u.x.pen.width=width;
|
dc->u.x.pen.width=width;
|
||||||
|
|
||||||
if (DC_SetupGCForBrush( dc ))
|
if (DC_SetupGCForBrush( dc ))
|
||||||
|
@ -305,7 +366,7 @@ BOOL32
|
||||||
X11DRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
|
X11DRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
|
||||||
INT32 bottom, INT32 ell_width, INT32 ell_height )
|
INT32 bottom, INT32 ell_width, INT32 ell_height )
|
||||||
{
|
{
|
||||||
INT32 width, oldwidth;
|
INT32 width, oldwidth, oldendcap;
|
||||||
|
|
||||||
TRACE(graphics, "(%d %d %d %d %d %d\n",
|
TRACE(graphics, "(%d %d %d %d %d %d\n",
|
||||||
left, top, right, bottom, ell_width, ell_height);
|
left, top, right, bottom, ell_width, ell_height);
|
||||||
|
@ -327,6 +388,7 @@ X11DRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
|
||||||
if (bottom < top) { INT32 tmp = bottom; bottom = top; top = tmp; }
|
if (bottom < top) { INT32 tmp = bottom; bottom = top; top = tmp; }
|
||||||
|
|
||||||
oldwidth=width = dc->u.x.pen.width;
|
oldwidth=width = dc->u.x.pen.width;
|
||||||
|
oldendcap = dc->u.x.pen.endcap;
|
||||||
if (!width) width = 1;
|
if (!width) width = 1;
|
||||||
if(dc->u.x.pen.style == PS_NULL) width = 0;
|
if(dc->u.x.pen.style == PS_NULL) width = 0;
|
||||||
|
|
||||||
|
@ -339,8 +401,9 @@ X11DRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
|
||||||
top += width / 2;
|
top += width / 2;
|
||||||
bottom -= (width - 1) / 2;
|
bottom -= (width - 1) / 2;
|
||||||
}
|
}
|
||||||
if(width == 1) width=0;
|
if(width == 0) width=1;
|
||||||
dc->u.x.pen.width=width;
|
dc->u.x.pen.width=width;
|
||||||
|
dc->u.x.pen.endcap=PS_ENDCAP_SQUARE;
|
||||||
|
|
||||||
if (DC_SetupGCForBrush( dc ))
|
if (DC_SetupGCForBrush( dc ))
|
||||||
{
|
{
|
||||||
|
@ -386,23 +449,34 @@ X11DRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
|
||||||
if (ell_width < right - left)
|
if (ell_width < right - left)
|
||||||
{
|
{
|
||||||
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
dc->w.DCOrgX + left + ell_width / 2,
|
dc->w.DCOrgX + left + (ell_width + 1) / 2,
|
||||||
dc->w.DCOrgY + top,
|
dc->w.DCOrgY + top + 1,
|
||||||
right - left - ell_width, ell_height / 2 );
|
right - left - ell_width - 1,
|
||||||
|
(ell_height + 1) / 2 - 1);
|
||||||
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
dc->w.DCOrgX + left + ell_width / 2,
|
dc->w.DCOrgX + left + (ell_width + 1) / 2,
|
||||||
dc->w.DCOrgY + bottom - (ell_height+1) / 2,
|
dc->w.DCOrgY + bottom - (ell_height) / 2 - 1,
|
||||||
right - left - ell_width,
|
right - left - ell_width - 1,
|
||||||
(ell_height+1) / 2 - 1 );
|
(ell_height) / 2 );
|
||||||
}
|
}
|
||||||
if (ell_height < bottom - top)
|
if (ell_height < bottom - top)
|
||||||
{
|
{
|
||||||
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
dc->w.DCOrgX + left,
|
dc->w.DCOrgX + left + 1,
|
||||||
dc->w.DCOrgY + top + ell_height / 2,
|
dc->w.DCOrgY + top + (ell_height + 1) / 2,
|
||||||
right - left - 1, bottom - top - ell_height );
|
right - left - 2,
|
||||||
|
bottom - top - ell_height - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* FIXME: this could be done with on X call
|
||||||
|
* more efficient and probably more correct
|
||||||
|
* on any X server: XDrawArcs will draw
|
||||||
|
* straight horizontal and vertical lines
|
||||||
|
* if width or height are zero.
|
||||||
|
*
|
||||||
|
* BTW this stuff is optimized for an Xfree86 server
|
||||||
|
* read the comments inside the X11DRV_DrawArc function
|
||||||
|
*/
|
||||||
if (DC_SetupGCForPen(dc)) {
|
if (DC_SetupGCForPen(dc)) {
|
||||||
if (ell_width > (right-left) )
|
if (ell_width > (right-left) )
|
||||||
if (ell_height > (bottom-top) )
|
if (ell_height > (bottom-top) )
|
||||||
|
@ -444,31 +518,32 @@ X11DRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
|
||||||
if (ell_width < right - left)
|
if (ell_width < right - left)
|
||||||
{
|
{
|
||||||
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
dc->w.DCOrgX + left + ell_width / 2 - 2,
|
dc->w.DCOrgX + left + ell_width / 2,
|
||||||
dc->w.DCOrgY + top,
|
dc->w.DCOrgY + top,
|
||||||
dc->w.DCOrgX + right - ell_width / 2,
|
dc->w.DCOrgX + right - (ell_width+1) / 2,
|
||||||
dc->w.DCOrgY + top);
|
dc->w.DCOrgY + top);
|
||||||
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
dc->w.DCOrgX + left + ell_width / 2 - 2,
|
dc->w.DCOrgX + left + ell_width / 2 ,
|
||||||
dc->w.DCOrgY + bottom - 1,
|
dc->w.DCOrgY + bottom - 1,
|
||||||
dc->w.DCOrgX + right - ell_width / 2,
|
dc->w.DCOrgX + right - (ell_width+1)/ 2,
|
||||||
dc->w.DCOrgY + bottom - 1);
|
dc->w.DCOrgY + bottom - 1);
|
||||||
}
|
}
|
||||||
if (ell_height < bottom - top)
|
if (ell_height < bottom - top)
|
||||||
{
|
{
|
||||||
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
dc->w.DCOrgX + right - 1,
|
dc->w.DCOrgX + right - 1,
|
||||||
dc->w.DCOrgY + top + ell_height / 2 - 1,
|
dc->w.DCOrgY + top + ell_height / 2,
|
||||||
dc->w.DCOrgX + right - 1,
|
dc->w.DCOrgX + right - 1,
|
||||||
dc->w.DCOrgY + bottom - ell_height / 2);
|
dc->w.DCOrgY + bottom - (ell_height+1) / 2);
|
||||||
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
dc->w.DCOrgX + left,
|
dc->w.DCOrgX + left,
|
||||||
dc->w.DCOrgY + top + ell_height / 2 - 1,
|
dc->w.DCOrgY + top + ell_height / 2,
|
||||||
dc->w.DCOrgX + left,
|
dc->w.DCOrgX + left,
|
||||||
dc->w.DCOrgY + bottom - ell_height / 2);
|
dc->w.DCOrgY + bottom - (ell_height+1) / 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dc->u.x.pen.width=oldwidth;
|
dc->u.x.pen.width=oldwidth;
|
||||||
|
dc->u.x.pen.endcap=oldendcap;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -576,17 +651,26 @@ X11DRV_PaintRgn( DC *dc, HRGN32 hrgn )
|
||||||
* X11DRV_Polyline
|
* X11DRV_Polyline
|
||||||
*/
|
*/
|
||||||
BOOL32
|
BOOL32
|
||||||
X11DRV_Polyline( DC *dc, const LPPOINT32 pt, INT32 count )
|
X11DRV_Polyline( DC *dc, LPPOINT32 pt, INT32 count )
|
||||||
{
|
{
|
||||||
|
INT32 oldwidth;
|
||||||
register int i;
|
register int i;
|
||||||
|
XPoint *points;
|
||||||
|
if((oldwidth=dc->u.x.pen.width)==0) dc->u.x.pen.width=1;
|
||||||
|
|
||||||
if (DC_SetupGCForPen( dc ))
|
points = (XPoint *) xmalloc (sizeof (XPoint) * (count));
|
||||||
for (i = 0; i < count-1; i ++)
|
for (i = 0; i < count; i++)
|
||||||
TSXDrawLine (display, dc->u.x.drawable, dc->u.x.gc,
|
{
|
||||||
dc->w.DCOrgX + XLPTODP(dc, pt [i].x),
|
points[i].x = dc->w.DCOrgX + XLPTODP( dc, pt[i].x );
|
||||||
dc->w.DCOrgY + YLPTODP(dc, pt [i].y),
|
points[i].y = dc->w.DCOrgY + YLPTODP( dc, pt[i].y );
|
||||||
dc->w.DCOrgX + XLPTODP(dc, pt [i+1].x),
|
}
|
||||||
dc->w.DCOrgY + YLPTODP(dc, pt [i+1].y));
|
|
||||||
|
if (DC_SetupGCForPen ( dc ))
|
||||||
|
TSXDrawLines( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
|
points, count, CoordModeOrigin );
|
||||||
|
|
||||||
|
free( points );
|
||||||
|
dc->u.x.pen.width=oldwidth;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -835,3 +919,189 @@ X11DRV_ExtFloodFill( DC *dc, INT32 x, INT32 y, COLORREF color,
|
||||||
LeaveCriticalSection( &X11DRV_CritSection );
|
LeaveCriticalSection( &X11DRV_CritSection );
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************** WARNING: WORK IN PROGRESS AHEAD !!!! ****************
|
||||||
|
*
|
||||||
|
* *Very* simple bezier drawing code,
|
||||||
|
*
|
||||||
|
* It uses a recursive algorithm to divide the curve in a series
|
||||||
|
* of straight line segements. Not ideal but for me sufficient.
|
||||||
|
* If you are in need for something better look for some incremental
|
||||||
|
* algorithm.
|
||||||
|
*
|
||||||
|
* 7 July 1998 Rein Klazes
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* some macro definitions for bezier drawing
|
||||||
|
*
|
||||||
|
* to avoid trucation errors the coordinates are
|
||||||
|
* shifted upwards. When used in drawing they are
|
||||||
|
* shifted down again, including correct rounding
|
||||||
|
* and avoiding floating points
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BEZIERSHIFTBITS 4
|
||||||
|
#define BEZIERSHIFTUP(x) ((x)<<BEZIERSHIFTBITS)
|
||||||
|
#define BEZIERFACTOR BEZIERSHIFTUP(1)
|
||||||
|
#define BEZIERSHIFTDOWN(x) (((x)+(1<<(BEZIERSHIFTBITS-1)))>>BEZIERSHIFTBITS)
|
||||||
|
/* maximum depth of recursion */
|
||||||
|
#define BEZIERMAXDEPTH 6
|
||||||
|
|
||||||
|
/* size of array to store points on */
|
||||||
|
/* enough for one curve */
|
||||||
|
#define BEZMAXPOINTS ((1<<BEZIERMAXDEPTH)+1)
|
||||||
|
|
||||||
|
/* calculate Bezier average, in this case the middle */
|
||||||
|
|
||||||
|
#define BEZIERMIDDLE(Mid, P1, P2) \
|
||||||
|
(Mid).x=((P1).x+(P2).x)/2;\
|
||||||
|
(Mid).y=((P1).y+(P2).y)/2;
|
||||||
|
|
||||||
|
/* check to terminate recursion */
|
||||||
|
static int BezierCheck( int level, POINT32 *Points)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
/* this code works, it just is too much work for
|
||||||
|
* the savings that are created. This should be done
|
||||||
|
* with integer arithmetic and simpler.
|
||||||
|
*/
|
||||||
|
double hyp, r1, r2;
|
||||||
|
/* first check that the control points are "near" */
|
||||||
|
if(Points[3].x>Points[0].x)
|
||||||
|
if(Points[1].x > Points[3].x+BEZIERFACTOR ||
|
||||||
|
Points[1].x < Points[0].x-BEZIERFACTOR ||
|
||||||
|
Points[2].x > Points[3].x+BEZIERFACTOR ||
|
||||||
|
Points[2].x < Points[0].x-BEZIERFACTOR)
|
||||||
|
return FALSE;
|
||||||
|
else
|
||||||
|
if(Points[1].x < Points[3].x-BEZIERFACTOR ||
|
||||||
|
Points[1].x > Points[0].x+BEZIERFACTOR ||
|
||||||
|
Points[2].x < Points[3].x-BEZIERFACTOR ||
|
||||||
|
Points[2].x > Points[0].x+BEZIERFACTOR)
|
||||||
|
return FALSE;
|
||||||
|
if(Points[3].y>Points[0].y)
|
||||||
|
if(Points[1].y > Points[3].y+BEZIERFACTOR ||
|
||||||
|
Points[1].y < Points[0].y-BEZIERFACTOR ||
|
||||||
|
Points[2].y > Points[3].y+BEZIERFACTOR ||
|
||||||
|
Points[2].y < Points[0].y-BEZIERFACTOR)
|
||||||
|
return FALSE;
|
||||||
|
else
|
||||||
|
if(Points[1].x < Points[3].x-BEZIERFACTOR ||
|
||||||
|
Points[1].x > Points[0].x+BEZIERFACTOR ||
|
||||||
|
Points[2].x < Points[3].x-BEZIERFACTOR ||
|
||||||
|
Points[2].x > Points[0].x+BEZIERFACTOR)
|
||||||
|
return FALSE;o
|
||||||
|
|
||||||
|
/* calculate the distance squared of the control point from
|
||||||
|
* the line from begin and endpoint
|
||||||
|
*/
|
||||||
|
|
||||||
|
hyp=((double)(Points[3].x-Points[0].x)*(double)(Points[3].x-Points[0].x)+
|
||||||
|
(double) (Points[3].y-Points[0].y)*(double)(Points[3].y-Points[0].y));
|
||||||
|
r1=((double)(Points[2].y-Points[0].y)*(double)(Points[3].x-Points[0].x)-
|
||||||
|
(double) (Points[3].y-Points[0].y)*(double)(Points[2].x-Points[0].x))
|
||||||
|
/BEZIERFACTOR;
|
||||||
|
r2=((double)(Points[1].y-Points[0].y)*(double)(Points[3].x-Points[0].x)-
|
||||||
|
(double)(Points[3].y-Points[0].y)*(double)(Points[1].x-Points[0].x))
|
||||||
|
/BEZIERFACTOR;
|
||||||
|
r1=r1*r1/hyp;
|
||||||
|
r1=r2*r2/hyp;
|
||||||
|
if( r1<1 && r2 <1){ /* distance less then a pixel */
|
||||||
|
// fprintf(stderr,"level is %d\n", level);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* X11DRV_Bezier
|
||||||
|
* Draw a -what microsoft calls- bezier curve
|
||||||
|
* The routine recursively devides the curve
|
||||||
|
* in two parts until a straight line can be drawn
|
||||||
|
*/
|
||||||
|
static void X11DRV_Bezier(int level, DC * dc, POINT32 *Points,
|
||||||
|
XPoint* xpoints, unsigned int* pix)
|
||||||
|
{
|
||||||
|
if(*pix == BEZMAXPOINTS){
|
||||||
|
TSXDrawLines( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
|
xpoints, *pix, CoordModeOrigin );
|
||||||
|
*pix=0;
|
||||||
|
}
|
||||||
|
if(!level || BezierCheck(level, Points)) {
|
||||||
|
if(*pix == 0){
|
||||||
|
xpoints[*pix].x= dc->w.DCOrgX + BEZIERSHIFTDOWN(Points[0].x);
|
||||||
|
xpoints[*pix].y= dc->w.DCOrgY + BEZIERSHIFTDOWN(Points[0].y);
|
||||||
|
*pix=1;
|
||||||
|
}
|
||||||
|
xpoints[*pix].x= dc->w.DCOrgX + BEZIERSHIFTDOWN(Points[3].x);
|
||||||
|
xpoints[*pix].y= dc->w.DCOrgY + BEZIERSHIFTDOWN(Points[3].y);
|
||||||
|
(*pix) ++;
|
||||||
|
} else {
|
||||||
|
POINT32 Points2[4]; /* for the second recursive call */
|
||||||
|
Points2[3]=Points[3];
|
||||||
|
BEZIERMIDDLE(Points2[2], Points[2], Points[3]);
|
||||||
|
BEZIERMIDDLE(Points2[0], Points[1], Points[2]);
|
||||||
|
BEZIERMIDDLE(Points2[1],Points2[0],Points2[2]);
|
||||||
|
|
||||||
|
BEZIERMIDDLE(Points[1], Points[0], Points[1]);
|
||||||
|
BEZIERMIDDLE(Points[2], Points[1], Points2[0]);
|
||||||
|
BEZIERMIDDLE(Points[3], Points[2], Points2[1]);
|
||||||
|
|
||||||
|
Points2[0]=Points[3];
|
||||||
|
|
||||||
|
/* do the two halves */
|
||||||
|
X11DRV_Bezier(level-1, dc, Points, xpoints, pix);
|
||||||
|
X11DRV_Bezier(level-1, dc, Points2, xpoints, pix);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* X11DRV_PolyBezier
|
||||||
|
* Implement functionality for PolyBezier and PolyBezierTo
|
||||||
|
* calls.
|
||||||
|
* [i] dc pointer to device context
|
||||||
|
* [i] start, first point in curve
|
||||||
|
* [i] BezierPoints , array of point filled with rest of the points
|
||||||
|
* [i] count, number of points in BezierPoints, must be a
|
||||||
|
* multiple of 3.
|
||||||
|
*/
|
||||||
|
BOOL32
|
||||||
|
X11DRV_PolyBezier(DC *dc, POINT32 start, POINT32 *BezierPoints, DWORD count)
|
||||||
|
{
|
||||||
|
POINT32 Points[4];
|
||||||
|
int i;
|
||||||
|
unsigned int ix=0;
|
||||||
|
XPoint* xpoints;
|
||||||
|
TRACE(graphics, "dc=%04x count=%ld %d,%d - %d,%d - %d,%d -%d,%d \n",
|
||||||
|
(int)dc, count,
|
||||||
|
start.x, start.y,
|
||||||
|
(Points+0)->x, (Points+0)->y,
|
||||||
|
(Points+1)->x, (Points+1)->y,
|
||||||
|
(Points+2)->x, (Points+2)->y);
|
||||||
|
if(!count || count % 3){
|
||||||
|
WARN(graphics," bad value for count : %ld\n", count);
|
||||||
|
return FALSE; /* paranoid */
|
||||||
|
}
|
||||||
|
xpoints=(XPoint*) xmalloc( sizeof(XPoint)*BEZMAXPOINTS);
|
||||||
|
Points[3].x=BEZIERSHIFTUP(XLPTODP(dc,start.x));
|
||||||
|
Points[3].y=BEZIERSHIFTUP(YLPTODP(dc,start.y));
|
||||||
|
while(count){
|
||||||
|
Points[0]=Points[3];
|
||||||
|
for(i=1;i<4;i++) {
|
||||||
|
Points[i].x= BEZIERSHIFTUP(XLPTODP(dc,BezierPoints->x));
|
||||||
|
Points[i].y= BEZIERSHIFTUP(YLPTODP(dc,BezierPoints->y));
|
||||||
|
BezierPoints++;
|
||||||
|
}
|
||||||
|
X11DRV_Bezier(BEZIERMAXDEPTH , dc, Points, xpoints, &ix );
|
||||||
|
count -=3;
|
||||||
|
}
|
||||||
|
if( ix) TSXDrawLines( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
|
xpoints, ix, CoordModeOrigin );
|
||||||
|
// fprintf(stderr," ix is %d\n",ix);
|
||||||
|
free(xpoints);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
/***************************END OF WORK IN PROGRESS ********************/
|
||||||
|
|
|
@ -50,6 +50,7 @@ static const DC_FUNCTIONS X11DRV_Funcs =
|
||||||
X11DRV_PolyPolyline, /* pPolyPolyline */
|
X11DRV_PolyPolyline, /* pPolyPolyline */
|
||||||
X11DRV_Polygon, /* pPolygon */
|
X11DRV_Polygon, /* pPolygon */
|
||||||
X11DRV_Polyline, /* pPolyline */
|
X11DRV_Polyline, /* pPolyline */
|
||||||
|
X11DRV_PolyBezier, /* pPolyBezier */
|
||||||
NULL, /* pRealizePalette */
|
NULL, /* pRealizePalette */
|
||||||
X11DRV_Rectangle, /* pRectangle */
|
X11DRV_Rectangle, /* pRectangle */
|
||||||
NULL, /* pRestoreDC */
|
NULL, /* pRestoreDC */
|
||||||
|
|
|
@ -29,25 +29,28 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
||||||
const INT32 *lpDx )
|
const INT32 *lpDx )
|
||||||
{
|
{
|
||||||
HRGN32 hRgnClip = 0;
|
HRGN32 hRgnClip = 0;
|
||||||
int dir, ascent, descent, i;
|
int i;
|
||||||
fontObject* pfo;
|
fontObject* pfo;
|
||||||
XCharStruct info;
|
INT32 width, ascent, descent, xwidth, ywidth;
|
||||||
XFontStruct* font;
|
XFontStruct* font;
|
||||||
RECT32 rect;
|
RECT32 rect;
|
||||||
char dfBreakChar, lfUnderline, lfStrikeOut;
|
char dfBreakChar, lfUnderline, lfStrikeOut;
|
||||||
|
BOOL32 rotated = FALSE;
|
||||||
|
|
||||||
if (!DC_SetupGCForText( dc )) return TRUE;
|
if (!DC_SetupGCForText( dc )) return TRUE;
|
||||||
|
|
||||||
pfo = XFONT_GetFontObject( dc->u.x.font );
|
pfo = XFONT_GetFontObject( dc->u.x.font );
|
||||||
font = pfo->fs;
|
font = pfo->fs;
|
||||||
|
|
||||||
|
if (pfo->lf.lfEscapement && pfo->lpX11Trans)
|
||||||
|
rotated = TRUE;
|
||||||
dfBreakChar = (char)pfo->fi->df.dfBreakChar;
|
dfBreakChar = (char)pfo->fi->df.dfBreakChar;
|
||||||
lfUnderline = (pfo->fo_flags & FO_SYNTH_UNDERLINE) ? 1 : 0;
|
lfUnderline = (pfo->fo_flags & FO_SYNTH_UNDERLINE) ? 1 : 0;
|
||||||
lfStrikeOut = (pfo->fo_flags & FO_SYNTH_STRIKEOUT) ? 1 : 0;
|
lfStrikeOut = (pfo->fo_flags & FO_SYNTH_STRIKEOUT) ? 1 : 0;
|
||||||
|
|
||||||
TRACE(text,"hdc=%04x df=%04x %d,%d %s, %d flags=%d\n",
|
TRACE(text,"hdc=%04x df=%04x %d,%d %s, %d flags=%d lpDx=%p\n",
|
||||||
dc->hSelf, (UINT16)(dc->u.x.font), x, y,
|
dc->hSelf, (UINT16)(dc->u.x.font), x, y,
|
||||||
debugstr_an (str, count), count, flags);
|
debugstr_an (str, count), count, flags, lpDx);
|
||||||
|
|
||||||
/* some strings sent here end in a newline for whatever reason. I have no
|
/* some strings sent here end in a newline for whatever reason. I have no
|
||||||
clue what the right treatment should be in general, but ignoring
|
clue what the right treatment should be in general, but ignoring
|
||||||
|
@ -112,37 +115,58 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
||||||
if (lpDx) /* have explicit character cell x offsets in logical coordinates */
|
if (lpDx) /* have explicit character cell x offsets in logical coordinates */
|
||||||
{
|
{
|
||||||
int extra = dc->wndExtX / 2;
|
int extra = dc->wndExtX / 2;
|
||||||
for (i = info.width = 0; i < count; i++) info.width += lpDx[i];
|
for (i = width = 0; i < count; i++) width += lpDx[i];
|
||||||
info.width = (info.width * dc->vportExtX + extra ) / dc->wndExtX;
|
width = (width * dc->vportExtX + extra ) / dc->wndExtX;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TSXTextExtents( font, str, count, &dir, &ascent, &descent, &info );
|
SIZE32 sz;
|
||||||
info.width += count*dc->w.charExtra + dc->w.breakExtra*dc->w.breakCount;
|
if (!X11DRV_GetTextExtentPoint( dc, str, count, &sz ))
|
||||||
|
return FALSE;
|
||||||
|
width = XLSTODS(dc, sz.cx);
|
||||||
}
|
}
|
||||||
|
ascent = pfo->lpX11Trans ? pfo->lpX11Trans->ascent : font->ascent;
|
||||||
|
descent = pfo->lpX11Trans ? pfo->lpX11Trans->descent : font->descent;
|
||||||
|
xwidth = pfo->lpX11Trans ? width * pfo->lpX11Trans->a /
|
||||||
|
pfo->lpX11Trans->pixelsize : width;
|
||||||
|
ywidth = pfo->lpX11Trans ? width * pfo->lpX11Trans->b /
|
||||||
|
pfo->lpX11Trans->pixelsize : 0;
|
||||||
|
|
||||||
switch( dc->w.textAlign & (TA_LEFT | TA_RIGHT | TA_CENTER) )
|
switch( dc->w.textAlign & (TA_LEFT | TA_RIGHT | TA_CENTER) )
|
||||||
{
|
{
|
||||||
case TA_LEFT:
|
case TA_LEFT:
|
||||||
if (dc->w.textAlign & TA_UPDATECP)
|
if (dc->w.textAlign & TA_UPDATECP) {
|
||||||
dc->w.CursPosX = XDPTOLP( dc, x + info.width );
|
dc->w.CursPosX = XDPTOLP( dc, x + xwidth );
|
||||||
|
dc->w.CursPosY = YDPTOLP( dc, y - ywidth );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case TA_RIGHT:
|
case TA_RIGHT:
|
||||||
x -= info.width;
|
x -= xwidth;
|
||||||
if (dc->w.textAlign & TA_UPDATECP) dc->w.CursPosX = XDPTOLP( dc, x );
|
y += ywidth;
|
||||||
|
if (dc->w.textAlign & TA_UPDATECP) {
|
||||||
|
dc->w.CursPosX = XDPTOLP( dc, x );
|
||||||
|
dc->w.CursPosY = YDPTOLP( dc, y );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case TA_CENTER:
|
case TA_CENTER:
|
||||||
x -= info.width / 2;
|
x -= xwidth / 2;
|
||||||
|
y += ywidth / 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( dc->w.textAlign & (TA_TOP | TA_BOTTOM | TA_BASELINE) )
|
switch( dc->w.textAlign & (TA_TOP | TA_BOTTOM | TA_BASELINE) )
|
||||||
{
|
{
|
||||||
case TA_TOP:
|
case TA_TOP:
|
||||||
y += font->ascent;
|
x -= pfo->lpX11Trans ? ascent * pfo->lpX11Trans->c /
|
||||||
|
pfo->lpX11Trans->pixelsize : 0;
|
||||||
|
y += pfo->lpX11Trans ? ascent * pfo->lpX11Trans->d /
|
||||||
|
pfo->lpX11Trans->pixelsize : ascent;
|
||||||
break;
|
break;
|
||||||
case TA_BOTTOM:
|
case TA_BOTTOM:
|
||||||
y -= font->descent;
|
x += pfo->lpX11Trans ? descent * pfo->lpX11Trans->c /
|
||||||
|
pfo->lpX11Trans->pixelsize : 0;
|
||||||
|
y -= pfo->lpX11Trans ? descent * pfo->lpX11Trans->d /
|
||||||
|
pfo->lpX11Trans->pixelsize : descent;
|
||||||
break;
|
break;
|
||||||
case TA_BASELINE:
|
case TA_BASELINE:
|
||||||
break;
|
break;
|
||||||
|
@ -168,16 +192,16 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
||||||
/* text is outside the rectangle */
|
/* text is outside the rectangle */
|
||||||
if (!(flags & ETO_OPAQUE) ||
|
if (!(flags & ETO_OPAQUE) ||
|
||||||
(x < rect.left) ||
|
(x < rect.left) ||
|
||||||
(x + info.width >= rect.right) ||
|
(x + width >= rect.right) ||
|
||||||
(y-font->ascent < rect.top) ||
|
(y - ascent < rect.top) ||
|
||||||
(y+font->descent >= rect.bottom))
|
(y + descent >= rect.bottom))
|
||||||
{
|
{
|
||||||
TSXSetForeground( display, dc->u.x.gc, dc->w.backgroundPixel );
|
TSXSetForeground( display, dc->u.x.gc, dc->w.backgroundPixel );
|
||||||
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
dc->w.DCOrgX + x,
|
dc->w.DCOrgX + x,
|
||||||
dc->w.DCOrgY + y - font->ascent,
|
dc->w.DCOrgY + y - ascent,
|
||||||
info.width,
|
width,
|
||||||
font->ascent + font->descent );
|
ascent + descent );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -187,7 +211,7 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
||||||
TSXSetForeground( display, dc->u.x.gc, dc->w.textPixel );
|
TSXSetForeground( display, dc->u.x.gc, dc->w.textPixel );
|
||||||
if (!dc->w.charExtra && !dc->w.breakExtra && !lpDx)
|
if (!dc->w.charExtra && !dc->w.breakExtra && !lpDx)
|
||||||
{
|
{
|
||||||
if (!pfo->lf.lfOrientation) /* angled baseline? */
|
if(!rotated)
|
||||||
{
|
{
|
||||||
TSXDrawString( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXDrawString( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
dc->w.DCOrgX + x, dc->w.DCOrgY + y, str, count );
|
dc->w.DCOrgX + x, dc->w.DCOrgY + y, str, count );
|
||||||
|
@ -197,18 +221,15 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
||||||
/* have to render character by character. */
|
/* have to render character by character. */
|
||||||
double offset = 0.0;
|
double offset = 0.0;
|
||||||
int i;
|
int i;
|
||||||
/* tenths of degrees to radians */
|
|
||||||
double theta = M_PI*pfo->lf.lfOrientation/1800.;
|
|
||||||
/* components of pointsize matrix */
|
|
||||||
double xc = pfo->fi->lfd_decipoints*cos(theta)/10.;
|
|
||||||
double yc = pfo->fi->lfd_decipoints*sin(theta)/10.;
|
|
||||||
|
|
||||||
for(i=0; i<count; i++) {
|
for(i=0; i<count; i++) {
|
||||||
int char_metric_offset = (unsigned char) str[i]
|
int char_metric_offset = (unsigned char) str[i]
|
||||||
- font->min_char_or_byte2;
|
- font->min_char_or_byte2;
|
||||||
int x_i = IROUND((double) (dc->w.DCOrgX + x) + offset*xc/1000. );
|
int x_i = IROUND((double) (dc->w.DCOrgX + x) + offset *
|
||||||
int y_i = IROUND((double) (dc->w.DCOrgY + y) - offset*yc/1000. );
|
pfo->lpX11Trans->a / 1000.0 );
|
||||||
|
int y_i = IROUND((double) (dc->w.DCOrgY + y) - offset *
|
||||||
|
pfo->lpX11Trans->b / 1000.0 );
|
||||||
|
|
||||||
TSXDrawString( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXDrawString( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
x_i, y_i, &str[i], 1);
|
x_i, y_i, &str[i], 1);
|
||||||
offset += (double) (font->per_char ?
|
offset += (double) (font->per_char ?
|
||||||
|
@ -285,7 +306,7 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
||||||
long linePos, lineWidth;
|
long linePos, lineWidth;
|
||||||
|
|
||||||
if (!TSXGetFontProperty( font, XA_UNDERLINE_POSITION, &linePos ))
|
if (!TSXGetFontProperty( font, XA_UNDERLINE_POSITION, &linePos ))
|
||||||
linePos = font->descent-1;
|
linePos = descent - 1;
|
||||||
if (!TSXGetFontProperty( font, XA_UNDERLINE_THICKNESS, &lineWidth ))
|
if (!TSXGetFontProperty( font, XA_UNDERLINE_THICKNESS, &lineWidth ))
|
||||||
lineWidth = 0;
|
lineWidth = 0;
|
||||||
else if (lineWidth == 1) lineWidth = 0;
|
else if (lineWidth == 1) lineWidth = 0;
|
||||||
|
@ -293,20 +314,20 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
||||||
LineSolid, CapRound, JoinBevel );
|
LineSolid, CapRound, JoinBevel );
|
||||||
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
dc->w.DCOrgX + x, dc->w.DCOrgY + y + linePos,
|
dc->w.DCOrgX + x, dc->w.DCOrgY + y + linePos,
|
||||||
dc->w.DCOrgX + x + info.width, dc->w.DCOrgY + y + linePos );
|
dc->w.DCOrgX + x + width, dc->w.DCOrgY + y + linePos );
|
||||||
}
|
}
|
||||||
if (lfStrikeOut)
|
if (lfStrikeOut)
|
||||||
{
|
{
|
||||||
long lineAscent, lineDescent;
|
long lineAscent, lineDescent;
|
||||||
if (!TSXGetFontProperty( font, XA_STRIKEOUT_ASCENT, &lineAscent ))
|
if (!TSXGetFontProperty( font, XA_STRIKEOUT_ASCENT, &lineAscent ))
|
||||||
lineAscent = font->ascent / 2;
|
lineAscent = ascent / 2;
|
||||||
if (!TSXGetFontProperty( font, XA_STRIKEOUT_DESCENT, &lineDescent ))
|
if (!TSXGetFontProperty( font, XA_STRIKEOUT_DESCENT, &lineDescent ))
|
||||||
lineDescent = -lineAscent * 2 / 3;
|
lineDescent = -lineAscent * 2 / 3;
|
||||||
TSXSetLineAttributes( display, dc->u.x.gc, lineAscent + lineDescent,
|
TSXSetLineAttributes( display, dc->u.x.gc, lineAscent + lineDescent,
|
||||||
LineSolid, CapRound, JoinBevel );
|
LineSolid, CapRound, JoinBevel );
|
||||||
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||||
dc->w.DCOrgX + x, dc->w.DCOrgY + y - lineAscent,
|
dc->w.DCOrgX + x, dc->w.DCOrgY + y - lineAscent,
|
||||||
dc->w.DCOrgX + x + info.width, dc->w.DCOrgY + y - lineAscent );
|
dc->w.DCOrgX + x + width, dc->w.DCOrgY + y - lineAscent );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & ETO_CLIPPED)
|
if (flags & ETO_CLIPPED)
|
||||||
|
@ -316,3 +337,4 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,8 @@ static BYTE CPTranslation[] = { EE_CHARSET, /* cp125-0 */
|
||||||
BALTIC_CHARSET /* cp125-7 */
|
BALTIC_CHARSET /* cp125-7 */
|
||||||
};
|
};
|
||||||
|
|
||||||
UINT16 XTextCaps = TC_OP_CHARACTER | TC_OP_STROKE | TC_CP_STROKE |
|
UINT16 XTextCaps = TC_OP_CHARACTER | TC_OP_STROKE |
|
||||||
|
TC_CP_STROKE | TC_CR_ANY |
|
||||||
TC_SA_DOUBLE | TC_SA_INTEGER | TC_SA_CONTIN |
|
TC_SA_DOUBLE | TC_SA_INTEGER | TC_SA_CONTIN |
|
||||||
TC_UA_ABLE | TC_SO_ABLE | TC_RA_ABLE;
|
TC_UA_ABLE | TC_SO_ABLE | TC_RA_ABLE;
|
||||||
|
|
||||||
|
@ -122,6 +123,10 @@ static INT32 XFONT_IsSubset(fontInfo*, fontInfo*);
|
||||||
static void XFONT_CheckFIList(fontResource*, fontInfo*, int subset_action);
|
static void XFONT_CheckFIList(fontResource*, fontInfo*, int subset_action);
|
||||||
static void XFONT_GrowFreeList(int start, int end);
|
static void XFONT_GrowFreeList(int start, int end);
|
||||||
|
|
||||||
|
|
||||||
|
static Atom RAW_ASCENT;
|
||||||
|
static Atom RAW_DESCENT;
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Helper macros from X distribution
|
* Helper macros from X distribution
|
||||||
*/
|
*/
|
||||||
|
@ -556,7 +561,8 @@ static BOOL32 LFD_ComposeLFD( fontObject* fo,
|
||||||
* font info - http://www.microsoft.com/kb/articles/q65/1/23.htm
|
* font info - http://www.microsoft.com/kb/articles/q65/1/23.htm
|
||||||
* Windows font metrics - http://www.microsoft.com/kb/articles/q32/6/67.htm
|
* Windows font metrics - http://www.microsoft.com/kb/articles/q32/6/67.htm
|
||||||
*/
|
*/
|
||||||
static BOOL32 XFONT_GetLeading( LPIFONTINFO16 pFI, XFontStruct* x_fs, INT32* pIL, INT32* pEL )
|
static BOOL32 XFONT_GetLeading( LPIFONTINFO16 pFI, XFontStruct* x_fs, INT32*
|
||||||
|
pIL, INT32* pEL, XFONTTRANS *XFT )
|
||||||
{
|
{
|
||||||
unsigned long height;
|
unsigned long height;
|
||||||
unsigned min = (unsigned char)pFI->dfFirstChar;
|
unsigned min = (unsigned char)pFI->dfFirstChar;
|
||||||
|
@ -564,11 +570,22 @@ static BOOL32 XFONT_GetLeading( LPIFONTINFO16 pFI, XFontStruct* x_fs, INT32* pIL
|
||||||
BOOL32 bHaveCapHeight = (pFI->dfCharSet == ANSI_CHARSET && 'X' >= min && 'X' <= max );
|
BOOL32 bHaveCapHeight = (pFI->dfCharSet == ANSI_CHARSET && 'X' >= min && 'X' <= max );
|
||||||
|
|
||||||
if( pEL ) *pEL = 0;
|
if( pEL ) *pEL = 0;
|
||||||
if( TSXGetFontProperty(x_fs, XA_CAP_HEIGHT, &height) == False )
|
|
||||||
|
if(XFT) {
|
||||||
|
Atom RAW_CAP_HEIGHT = TSXInternAtom(display, "RAW_CAP_HEIGHT", TRUE);
|
||||||
|
if(TSXGetFontProperty(x_fs, RAW_CAP_HEIGHT, &height))
|
||||||
|
*pIL = XFT->ascent -
|
||||||
|
(INT32)(hypotf(XFT->a, XFT->b) / 1000.0 * height);
|
||||||
|
else
|
||||||
|
*pIL = 0;
|
||||||
|
return bHaveCapHeight && x_fs->per_char;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( TSXGetFontProperty(x_fs, XA_CAP_HEIGHT, &height) == FALSE )
|
||||||
{
|
{
|
||||||
if( x_fs->per_char )
|
if( x_fs->per_char )
|
||||||
if( bHaveCapHeight )
|
if( bHaveCapHeight )
|
||||||
height = x_fs->per_char['X' - min].ascent;
|
height = x_fs->per_char['X' - min].ascent;
|
||||||
else
|
else
|
||||||
if (x_fs->ascent >= x_fs->max_bounds.ascent)
|
if (x_fs->ascent >= x_fs->max_bounds.ascent)
|
||||||
height = x_fs->max_bounds.ascent;
|
height = x_fs->max_bounds.ascent;
|
||||||
|
@ -586,7 +603,8 @@ static BOOL32 XFONT_GetLeading( LPIFONTINFO16 pFI, XFontStruct* x_fs, INT32* pIL
|
||||||
return (bHaveCapHeight && x_fs->per_char);
|
return (bHaveCapHeight && x_fs->per_char);
|
||||||
}
|
}
|
||||||
|
|
||||||
static INT32 XFONT_GetAvgCharWidth( LPIFONTINFO16 pFI, XFontStruct* x_fs)
|
static INT32 XFONT_GetAvgCharWidth( LPIFONTINFO16 pFI, XFontStruct* x_fs,
|
||||||
|
XFONTTRANS *XFT)
|
||||||
{
|
{
|
||||||
unsigned min = (unsigned char)pFI->dfFirstChar;
|
unsigned min = (unsigned char)pFI->dfFirstChar;
|
||||||
unsigned max = (unsigned char)pFI->dfLastChar;
|
unsigned max = (unsigned char)pFI->dfLastChar;
|
||||||
|
@ -597,7 +615,11 @@ static INT32 XFONT_GetAvgCharWidth( LPIFONTINFO16 pFI, XFontStruct* x_fs)
|
||||||
for( j = 0, width = 0, chars = 0, max -= min; j <= max; j++ )
|
for( j = 0, width = 0, chars = 0, max -= min; j <= max; j++ )
|
||||||
if( !CI_NONEXISTCHAR(x_fs->per_char + j) )
|
if( !CI_NONEXISTCHAR(x_fs->per_char + j) )
|
||||||
{
|
{
|
||||||
width += x_fs->per_char[j].width;
|
if(!XFT)
|
||||||
|
width += x_fs->per_char[j].width;
|
||||||
|
else
|
||||||
|
width += x_fs->per_char[j].attributes *
|
||||||
|
XFT->pixelsize / 1000.0;
|
||||||
chars++;
|
chars++;
|
||||||
}
|
}
|
||||||
return (width / chars);
|
return (width / chars);
|
||||||
|
@ -606,6 +628,28 @@ static INT32 XFONT_GetAvgCharWidth( LPIFONTINFO16 pFI, XFontStruct* x_fs)
|
||||||
return x_fs->min_bounds.width;
|
return x_fs->min_bounds.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static INT32 XFONT_GetMaxCharWidth(fontObject *pfo)
|
||||||
|
{
|
||||||
|
unsigned min = (unsigned char)pfo->fs->min_char_or_byte2;
|
||||||
|
unsigned max = (unsigned char)pfo->fs->max_char_or_byte2;
|
||||||
|
|
||||||
|
if(!pfo->lpX11Trans)
|
||||||
|
return abs(pfo->fs->max_bounds.width);
|
||||||
|
|
||||||
|
if( pfo->fs->per_char )
|
||||||
|
{
|
||||||
|
int maxwidth, j;
|
||||||
|
for( j = 0, maxwidth = 0, max -= min; j <= max; j++ )
|
||||||
|
if( !CI_NONEXISTCHAR(pfo->fs->per_char + j) )
|
||||||
|
if(maxwidth < pfo->fs->per_char[j].attributes)
|
||||||
|
maxwidth = pfo->fs->per_char[j].attributes;
|
||||||
|
|
||||||
|
maxwidth *= pfo->lpX11Trans->pixelsize / 1000.0;
|
||||||
|
return maxwidth;
|
||||||
|
}
|
||||||
|
return pfo->foAvgCharWidth;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* XFONT_SetFontMetric
|
* XFONT_SetFontMetric
|
||||||
*
|
*
|
||||||
|
@ -626,10 +670,10 @@ static void XFONT_SetFontMetric(fontInfo* fi, fontResource* fr, XFontStruct* xfs
|
||||||
fi->df.dfPixWidth = (xfs->per_char) ? 0 : xfs->min_bounds.width;
|
fi->df.dfPixWidth = (xfs->per_char) ? 0 : xfs->min_bounds.width;
|
||||||
fi->df.dfMaxWidth = (INT16)abs(xfs->max_bounds.width);
|
fi->df.dfMaxWidth = (INT16)abs(xfs->max_bounds.width);
|
||||||
|
|
||||||
if( XFONT_GetLeading( &fi->df, xfs, &il, &el ) )
|
if( XFONT_GetLeading( &fi->df, xfs, &il, &el, NULL ) )
|
||||||
fi->df.dfAvgWidth = (INT16)xfs->per_char['X' - min].width;
|
fi->df.dfAvgWidth = (INT16)xfs->per_char['X' - min].width;
|
||||||
else
|
else
|
||||||
fi->df.dfAvgWidth = (INT16)XFONT_GetAvgCharWidth( &fi->df, xfs);
|
fi->df.dfAvgWidth = (INT16)XFONT_GetAvgCharWidth( &fi->df, xfs, NULL);
|
||||||
|
|
||||||
fi->df.dfInternalLeading = (INT16)il;
|
fi->df.dfInternalLeading = (INT16)il;
|
||||||
fi->df.dfExternalLeading = (INT16)el;
|
fi->df.dfExternalLeading = (INT16)el;
|
||||||
|
@ -659,12 +703,17 @@ static void XFONT_GetTextMetric( fontObject* pfo, LPTEXTMETRIC32A pTM )
|
||||||
{
|
{
|
||||||
LPIFONTINFO16 pdf = &pfo->fi->df;
|
LPIFONTINFO16 pdf = &pfo->fi->df;
|
||||||
|
|
||||||
pTM->tmAscent = pfo->fs->ascent;
|
if( ! pfo->lpX11Trans ) {
|
||||||
pTM->tmDescent = pfo->fs->descent;
|
pTM->tmAscent = pfo->fs->ascent;
|
||||||
|
pTM->tmDescent = pfo->fs->descent;
|
||||||
|
} else {
|
||||||
|
pTM->tmAscent = pfo->lpX11Trans->ascent;
|
||||||
|
pTM->tmDescent = pfo->lpX11Trans->descent;
|
||||||
|
}
|
||||||
pTM->tmHeight = pTM->tmAscent + pTM->tmDescent;
|
pTM->tmHeight = pTM->tmAscent + pTM->tmDescent;
|
||||||
|
|
||||||
pTM->tmAveCharWidth = pfo->foAvgCharWidth;
|
pTM->tmAveCharWidth = pfo->foAvgCharWidth;
|
||||||
pTM->tmMaxCharWidth = abs(pfo->fs->max_bounds.width);
|
pTM->tmMaxCharWidth = pfo->foMaxCharWidth;
|
||||||
|
|
||||||
pTM->tmInternalLeading = pfo->foInternalLeading;
|
pTM->tmInternalLeading = pfo->foInternalLeading;
|
||||||
pTM->tmExternalLeading = pdf->dfExternalLeading;
|
pTM->tmExternalLeading = pdf->dfExternalLeading;
|
||||||
|
@ -1504,6 +1553,10 @@ BOOL32 X11DRV_FONT_Init( DeviceCaps* pDevCaps )
|
||||||
/* update text caps parameter */
|
/* update text caps parameter */
|
||||||
|
|
||||||
pDevCaps->textCaps = XTextCaps;
|
pDevCaps->textCaps = XTextCaps;
|
||||||
|
|
||||||
|
RAW_ASCENT = TSXInternAtom(display, "RAW_ASCENT", TRUE);
|
||||||
|
RAW_DESCENT = TSXInternAtom(display, "RAW_DESCENT", TRUE);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1886,6 +1939,9 @@ static fontObject* XFONT_GetCacheEntry()
|
||||||
else fontMRU = (INT16)fontCache[j].lru;
|
else fontMRU = (INT16)fontCache[j].lru;
|
||||||
|
|
||||||
/* FIXME: lpXForm, lpPixmap */
|
/* FIXME: lpXForm, lpPixmap */
|
||||||
|
if(fontCache[j].lpX11Trans)
|
||||||
|
HeapFree( SystemHeap, 0, fontCache[j].lpX11Trans );
|
||||||
|
|
||||||
TSXFreeFont( display, fontCache[j].fs );
|
TSXFreeFont( display, fontCache[j].fs );
|
||||||
|
|
||||||
memset( fontCache + j, 0, sizeof(fontObject) );
|
memset( fontCache + j, 0, sizeof(fontObject) );
|
||||||
|
@ -1927,6 +1983,50 @@ static int XFONT_ReleaseCacheEntry(fontObject* pfo)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* XFONT_SetX11Trans
|
||||||
|
*/
|
||||||
|
static BOOL32 XFONT_SetX11Trans( fontObject *pfo )
|
||||||
|
{
|
||||||
|
char *fontName;
|
||||||
|
Atom nameAtom;
|
||||||
|
int i;
|
||||||
|
char *cp, *start;
|
||||||
|
|
||||||
|
XGetFontProperty( pfo->fs, XA_FONT, &nameAtom );
|
||||||
|
fontName = XGetAtomName( display, nameAtom );
|
||||||
|
for(i = 0, cp = fontName; i < 7; i++) {
|
||||||
|
cp = strchr(cp, '-');
|
||||||
|
cp++;
|
||||||
|
}
|
||||||
|
if(*cp != '[') {
|
||||||
|
XFree(fontName);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
start = cp;
|
||||||
|
while((cp = strchr(cp, '~')))
|
||||||
|
*cp = '-';
|
||||||
|
|
||||||
|
#define PX pfo->lpX11Trans
|
||||||
|
|
||||||
|
sscanf(start, "[%f%f%f%f]", &PX->a, &PX->b, &PX->c, &PX->d);
|
||||||
|
XFree(fontName);
|
||||||
|
|
||||||
|
XGetFontProperty( pfo->fs, RAW_ASCENT, &PX->RAW_ASCENT );
|
||||||
|
XGetFontProperty( pfo->fs, RAW_DESCENT, &PX->RAW_DESCENT );
|
||||||
|
|
||||||
|
PX->pixelsize = hypotf(PX->a, PX->b);
|
||||||
|
PX->ascent = PX->pixelsize / 1000.0 * PX->RAW_ASCENT;
|
||||||
|
PX->descent = PX->pixelsize / 1000.0 * PX->RAW_DESCENT;
|
||||||
|
|
||||||
|
TRACE(font, "[%f %f %f %f] RA = %ld RD = %ld\n", pfo->lpX11Trans->a,
|
||||||
|
pfo->lpX11Trans->b, pfo->lpX11Trans->c, pfo->lpX11Trans->d,
|
||||||
|
pfo->lpX11Trans->RAW_ASCENT, pfo->lpX11Trans->RAW_DESCENT);
|
||||||
|
|
||||||
|
#undef PX
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* X Device Font Objects
|
* X Device Font Objects
|
||||||
*/
|
*/
|
||||||
|
@ -1971,10 +2071,30 @@ static X_PHYSFONT XFONT_RealizeFont( LPLOGFONT16 plf )
|
||||||
if( (pfo->fs = TSXLoadQueryFont( display, lpLFD )) ) break;
|
if( (pfo->fs = TSXLoadQueryFont( display, lpLFD )) ) break;
|
||||||
} while( uRelaxLevel );
|
} while( uRelaxLevel );
|
||||||
|
|
||||||
if( XFONT_GetLeading( &pfo->fi->df, pfo->fs, &i, NULL ) )
|
|
||||||
pfo->foAvgCharWidth = (INT16)pfo->fs->per_char['X' - pfo->fs->min_char_or_byte2].width;
|
if(pfo->lf.lfEscapement != 0) {
|
||||||
|
pfo->lpX11Trans = HeapAlloc(SystemHeap, 0,
|
||||||
|
sizeof(XFONTTRANS));
|
||||||
|
if(!XFONT_SetX11Trans( pfo )) {
|
||||||
|
HeapFree(SystemHeap, 0, pfo->lpX11Trans);
|
||||||
|
pfo->lpX11Trans = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( XFONT_GetLeading( &pfo->fi->df, pfo->fs, &i, NULL,
|
||||||
|
pfo->lpX11Trans ) )
|
||||||
|
|
||||||
|
if(!pfo->lpX11Trans)
|
||||||
|
pfo->foAvgCharWidth =
|
||||||
|
(INT16)pfo->fs->per_char['X' - pfo->fs->min_char_or_byte2].width;
|
||||||
|
else
|
||||||
|
pfo->foAvgCharWidth =
|
||||||
|
(INT16)pfo->fs->per_char['X' - pfo->fs->min_char_or_byte2].attributes
|
||||||
|
* pfo->lpX11Trans->pixelsize / 1000.0;
|
||||||
else
|
else
|
||||||
pfo->foAvgCharWidth = (INT16)XFONT_GetAvgCharWidth( &pfo->fi->df, pfo->fs );
|
pfo->foAvgCharWidth = (INT16)XFONT_GetAvgCharWidth(
|
||||||
|
&pfo->fi->df, pfo->fs, pfo->lpX11Trans );
|
||||||
|
pfo->foMaxCharWidth = (INT16)XFONT_GetMaxCharWidth(pfo);
|
||||||
pfo->foInternalLeading = (INT16)i;
|
pfo->foInternalLeading = (INT16)i;
|
||||||
|
|
||||||
/* FIXME: If we've got a soft font or
|
/* FIXME: If we've got a soft font or
|
||||||
|
@ -2135,17 +2255,34 @@ BOOL32 X11DRV_EnumDeviceFonts( DC* dc, LPLOGFONT16 plf,
|
||||||
BOOL32 X11DRV_GetTextExtentPoint( DC *dc, LPCSTR str, INT32 count,
|
BOOL32 X11DRV_GetTextExtentPoint( DC *dc, LPCSTR str, INT32 count,
|
||||||
LPSIZE32 size )
|
LPSIZE32 size )
|
||||||
{
|
{
|
||||||
XFontStruct* pfs = XFONT_GetFontStruct( dc->u.x.font );
|
fontObject* pfo = XFONT_GetFontObject( dc->u.x.font );
|
||||||
if( pfs )
|
if( pfo ) {
|
||||||
{
|
if( !pfo->lpX11Trans ) {
|
||||||
int dir, ascent, descent;
|
int dir, ascent, descent;
|
||||||
XCharStruct info;
|
XCharStruct info;
|
||||||
|
|
||||||
TSXTextExtents( pfs, str, count, &dir, &ascent, &descent, &info );
|
TSXTextExtents( pfo->fs, str, count, &dir, &ascent, &descent, &info );
|
||||||
size->cx = abs((info.width + dc->w.breakRem + count * dc->w.charExtra)
|
size->cx = abs((info.width + dc->w.breakRem + count *
|
||||||
* dc->wndExtX / dc->vportExtX);
|
dc->w.charExtra) * dc->wndExtX / dc->vportExtX);
|
||||||
size->cy = abs((pfs->ascent + pfs->descent) * dc->wndExtY / dc->vportExtY);
|
size->cy = abs((pfo->fs->ascent + pfo->fs->descent) *
|
||||||
|
dc->wndExtY / dc->vportExtY);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
INT32 i;
|
||||||
|
float x = 0.0, y = 0.0;
|
||||||
|
for(i = 0; i < count; i++) {
|
||||||
|
x += pfo->fs->per_char ?
|
||||||
|
pfo->fs->per_char[str[i] - pfo->fs->min_char_or_byte2].attributes :
|
||||||
|
pfo->fs->min_bounds.attributes;
|
||||||
|
}
|
||||||
|
y = pfo->lpX11Trans->RAW_ASCENT + pfo->lpX11Trans->RAW_DESCENT;
|
||||||
|
TRACE(font, "x = %f y = %f\n", x, y);
|
||||||
|
x *= pfo->lpX11Trans->pixelsize / 1000.0;
|
||||||
|
y *= pfo->lpX11Trans->pixelsize / 1000.0;
|
||||||
|
size->cx = fabsf((x + dc->w.breakRem + count * dc->w.charExtra) *
|
||||||
|
dc->wndExtX / dc->vportExtX);
|
||||||
|
size->cy = fabsf(y * dc->wndExtY / dc->vportExtY);
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -2174,30 +2311,40 @@ BOOL32 X11DRV_GetTextMetrics(DC *dc, TEXTMETRIC32A *metrics)
|
||||||
BOOL32 X11DRV_GetCharWidth( DC *dc, UINT32 firstChar, UINT32 lastChar,
|
BOOL32 X11DRV_GetCharWidth( DC *dc, UINT32 firstChar, UINT32 lastChar,
|
||||||
LPINT32 buffer )
|
LPINT32 buffer )
|
||||||
{
|
{
|
||||||
XFontStruct* xfs = XFONT_GetFontStruct( dc->u.x.font );
|
fontObject* pfo = XFONT_GetFontObject( dc->u.x.font );
|
||||||
|
|
||||||
if( xfs )
|
if( pfo )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (xfs->per_char == NULL)
|
if (pfo->fs->per_char == NULL)
|
||||||
for (i = firstChar; i <= lastChar; i++)
|
for (i = firstChar; i <= lastChar; i++)
|
||||||
*buffer++ = xfs->min_bounds.width;
|
if(pfo->lpX11Trans)
|
||||||
|
*buffer++ = pfo->fs->min_bounds.attributes *
|
||||||
|
pfo->lpX11Trans->pixelsize / 1000.0;
|
||||||
|
else
|
||||||
|
*buffer++ = pfo->fs->min_bounds.width;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
XCharStruct *cs, *def;
|
XCharStruct *cs, *def;
|
||||||
static XCharStruct __null_char = { 0, 0, 0, 0, 0, 0 };
|
static XCharStruct __null_char = { 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
CI_GET_CHAR_INFO(xfs, xfs->default_char, &__null_char, def);
|
CI_GET_CHAR_INFO(pfo->fs, pfo->fs->default_char, &__null_char,
|
||||||
|
def);
|
||||||
|
|
||||||
for (i = firstChar; i <= lastChar; i++)
|
for (i = firstChar; i <= lastChar; i++)
|
||||||
{
|
{
|
||||||
if (i >= xfs->min_char_or_byte2 && i <= xfs->max_char_or_byte2)
|
if (i >= pfo->fs->min_char_or_byte2 &&
|
||||||
|
i <= pfo->fs->max_char_or_byte2)
|
||||||
{
|
{
|
||||||
cs = &xfs->per_char[(i - xfs->min_char_or_byte2)];
|
cs = &pfo->fs->per_char[(i - pfo->fs->min_char_or_byte2)];
|
||||||
if (CI_NONEXISTCHAR(cs)) cs = def;
|
if (CI_NONEXISTCHAR(cs)) cs = def;
|
||||||
} else cs = def;
|
} else cs = def;
|
||||||
*buffer++ = MAX(cs->width, 0 );
|
if(pfo->lpX11Trans)
|
||||||
|
*buffer++ = MAX(cs->attributes, 0) *
|
||||||
|
pfo->lpX11Trans->pixelsize / 1000.0;
|
||||||
|
else
|
||||||
|
*buffer++ = MAX(cs->width, 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#include "stackframe.h"
|
#include "stackframe.h"
|
||||||
#include "user.h"
|
#include "user.h"
|
||||||
#include "process.h"
|
#include "process.h"
|
||||||
|
#include "snoop.h"
|
||||||
|
#include "task.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
/* Built-in modules descriptors */
|
/* Built-in modules descriptors */
|
||||||
|
@ -114,8 +116,8 @@ static BUILTIN16_DLL BuiltinDLLs[] =
|
||||||
{ &TOOLHELP_Descriptor, 0 },
|
{ &TOOLHELP_Descriptor, 0 },
|
||||||
{ &TYPELIB_Descriptor, DLL_FLAG_NOT_USED },
|
{ &TYPELIB_Descriptor, DLL_FLAG_NOT_USED },
|
||||||
{ &VER_Descriptor, 0 },
|
{ &VER_Descriptor, 0 },
|
||||||
{ &W32SYS_Descriptor, 0 },
|
{ &W32SYS_Descriptor, DLL_FLAG_NOT_USED },
|
||||||
{ &WIN32S16_Descriptor, 0 },
|
{ &WIN32S16_Descriptor, DLL_FLAG_NOT_USED },
|
||||||
{ &WIN87EM_Descriptor, DLL_FLAG_NOT_USED },
|
{ &WIN87EM_Descriptor, DLL_FLAG_NOT_USED },
|
||||||
{ &WINASPI_Descriptor, 0 },
|
{ &WINASPI_Descriptor, 0 },
|
||||||
{ &WINEPS_Descriptor, DLL_FLAG_ALWAYS_USED },
|
{ &WINEPS_Descriptor, DLL_FLAG_ALWAYS_USED },
|
||||||
|
@ -217,6 +219,11 @@ BOOL32 BUILTIN_Init(void)
|
||||||
GET_CS(cs); GET_DS(ds);
|
GET_CS(cs); GET_DS(ds);
|
||||||
NE_SetEntryPoint( hModule, 454, cs );
|
NE_SetEntryPoint( hModule, 454, cs );
|
||||||
NE_SetEntryPoint( hModule, 455, ds );
|
NE_SetEntryPoint( hModule, 455, ds );
|
||||||
|
|
||||||
|
/* Initialize KERNEL.THHOOK */
|
||||||
|
|
||||||
|
TASK_InstallTHHook((THHOOK *)PTR_SEG_TO_LIN(
|
||||||
|
(SEGPTR)NE_GetEntryPoint( hModule, 332 )));
|
||||||
|
|
||||||
/* Initialize the real-mode selector entry points */
|
/* Initialize the real-mode selector entry points */
|
||||||
|
|
||||||
|
@ -248,6 +255,8 @@ BOOL32 BUILTIN_Init(void)
|
||||||
INT_SetHandler( vector, proc );
|
INT_SetHandler( vector, proc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SNOOP16_Init();
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,7 @@ file gdi.exe
|
||||||
499 stub GetEnhMetafileHeader
|
499 stub GetEnhMetafileHeader
|
||||||
501 stub GetEnhMetafilePaletteEntries
|
501 stub GetEnhMetafilePaletteEntries
|
||||||
502 pascal16 PolyBezier(word ptr word) PolyBezier16
|
502 pascal16 PolyBezier(word ptr word) PolyBezier16
|
||||||
503 stub PolyBezierTo
|
503 pascal16 PolyBezierTo(word ptr word) PolyBezierTo16
|
||||||
504 stub PlayEnhMetafileRecord
|
504 stub PlayEnhMetafileRecord
|
||||||
505 stub SetEnhMetafileBits
|
505 stub SetEnhMetafileBits
|
||||||
506 stub SetMetaRgn
|
506 stub SetMetaRgn
|
||||||
|
|
|
@ -253,7 +253,7 @@ file krnl386.exe
|
||||||
327 stub KERNEL_327
|
327 stub KERNEL_327
|
||||||
328 stub _DebugOutput
|
328 stub _DebugOutput
|
||||||
329 pascal16 K329(str word) DebugFillBuffer
|
329 pascal16 K329(str word) DebugFillBuffer
|
||||||
#332 stub THHOOK
|
332 long THHOOK(0 0 0 0 0 0 0 0)
|
||||||
334 pascal16 IsBadReadPtr(segptr word) IsBadReadPtr16
|
334 pascal16 IsBadReadPtr(segptr word) IsBadReadPtr16
|
||||||
335 pascal16 IsBadWritePtr(segptr word) IsBadWritePtr16
|
335 pascal16 IsBadWritePtr(segptr word) IsBadWritePtr16
|
||||||
336 pascal16 IsBadCodePtr(segptr) IsBadCodePtr16
|
336 pascal16 IsBadCodePtr(segptr) IsBadCodePtr16
|
||||||
|
@ -318,7 +318,7 @@ file krnl386.exe
|
||||||
471 pascal KERNEL_471() _KERNEL_471
|
471 pascal KERNEL_471() _KERNEL_471
|
||||||
472 register KERNEL_472() _KERNEL_472
|
472 register KERNEL_472() _KERNEL_472
|
||||||
473 stub KERNEL_473
|
473 stub KERNEL_473
|
||||||
475 return KERNEL_475 0 0
|
475 register KERNEL_475() _KERNEL_475
|
||||||
480 stub KERNEL_480
|
480 stub KERNEL_480
|
||||||
481 stub KERNEL_481
|
481 stub KERNEL_481
|
||||||
482 pascal LoadLibrary32(str) LoadLibrary32A
|
482 pascal LoadLibrary32(str) LoadLibrary32A
|
||||||
|
|
|
@ -134,7 +134,7 @@ type win16
|
||||||
900 pascal mmTaskCreate(ptr long long) mmTaskCreate16
|
900 pascal mmTaskCreate(ptr long long) mmTaskCreate16
|
||||||
902 stub MMTASKBLOCK
|
902 stub MMTASKBLOCK
|
||||||
903 pascal mmTaskSignal(word) mmTaskSignal16
|
903 pascal mmTaskSignal(word) mmTaskSignal16
|
||||||
904 stub MMGETCURRENTTASK
|
904 pascal mmGetCurrentTask() WIN16_GetCurrentTask #just the same
|
||||||
905 stub MMTASKYIELD
|
905 stub MMTASKYIELD
|
||||||
1100 pascal DRVOPEN(str str long) DrvOpen
|
1100 pascal DRVOPEN(str str long) DrvOpen
|
||||||
1101 pascal DRVCLOSE(word long long) DrvClose
|
1101 pascal DRVCLOSE(word long long) DrvClose
|
||||||
|
|
|
@ -22,8 +22,8 @@ type win16
|
||||||
38 pascal FindEnvironmentString(ptr) FindEnvironmentString
|
38 pascal FindEnvironmentString(ptr) FindEnvironmentString
|
||||||
39 pascal16 InternalExtractIcon(word ptr s_word word) InternalExtractIcon
|
39 pascal16 InternalExtractIcon(word ptr s_word word) InternalExtractIcon
|
||||||
40 stub ExtractIconEx
|
40 stub ExtractIconEx
|
||||||
98 stub SHL3216_THUNKDATA16
|
# 98 stub SHL3216_THUNKDATA16
|
||||||
99 stub SHL1632_THUNKDATA16
|
# 99 stub SHL1632_THUNKDATA16
|
||||||
|
|
||||||
#100 4 0550 HERETHARBETYGARS exported, shared data
|
#100 4 0550 HERETHARBETYGARS exported, shared data
|
||||||
#101 8 010e FINDEXEDLGPROC exported, shared data
|
#101 8 010e FINDEXEDLGPROC exported, shared data
|
||||||
|
|
|
@ -186,6 +186,16 @@ SNOOP16_GetProcAddress16(HMODULE16 hmod,DWORD ordinal,FARPROC16 origfun) {
|
||||||
fun->name = HEAP_strdupA(SystemHeap,0,name);
|
fun->name = HEAP_strdupA(SystemHeap,0,name);
|
||||||
else
|
else
|
||||||
fun->name = HEAP_strdupA(SystemHeap,0,"");
|
fun->name = HEAP_strdupA(SystemHeap,0,"");
|
||||||
|
/* more magic. do not try to snoop thunk data entries (MMSYSTEM) */
|
||||||
|
if (strchr(fun->name,'_')) {
|
||||||
|
char *s=strchr(fun->name,'_');
|
||||||
|
|
||||||
|
if (!strncasecmp(s,"_thunkdata",10)) {
|
||||||
|
HeapFree(SystemHeap,0,fun->name);
|
||||||
|
fun->name = NULL;
|
||||||
|
return origfun;
|
||||||
|
}
|
||||||
|
}
|
||||||
fun->lcall = 0x9a;
|
fun->lcall = 0x9a;
|
||||||
fun->snr = MAKELONG(0,xsnr);
|
fun->snr = MAKELONG(0,xsnr);
|
||||||
fun->origfun = origfun;
|
fun->origfun = origfun;
|
||||||
|
@ -314,3 +324,9 @@ FARPROC16 SNOOP16_GetProcAddress16(HMODULE16 hmod,DWORD ordinal,FARPROC16 origfu
|
||||||
return origfun;
|
return origfun;
|
||||||
}
|
}
|
||||||
#endif /* !__i386__ */
|
#endif /* !__i386__ */
|
||||||
|
|
||||||
|
void
|
||||||
|
SNOOP16_Init() {
|
||||||
|
fnSNOOP16_GetProcAddress16=SNOOP16_GetProcAddress16;
|
||||||
|
fnSNOOP16_RegisterDLL=SNOOP16_RegisterDLL;
|
||||||
|
}
|
||||||
|
|
|
@ -286,3 +286,4 @@ type win16
|
||||||
#415 register VXD_Printer() VXD_Printer
|
#415 register VXD_Printer() VXD_Printer
|
||||||
423 register VXD_Shell() VXD_Shell
|
423 register VXD_Shell() VXD_Shell
|
||||||
433 register VXD_PageFile() VXD_PageFile
|
433 register VXD_PageFile() VXD_PageFile
|
||||||
|
445 register VXD_Win32s() VXD_Win32s
|
||||||
|
|
|
@ -22,6 +22,24 @@ typedef struct
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Additional info for DIB section objects */
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
/* Windows DIB section */
|
||||||
|
DIBSECTION dibSection;
|
||||||
|
|
||||||
|
/* Mapping status */
|
||||||
|
enum { DIB_NoHandler, DIB_InSync, DIB_AppMod, DIB_GdiMod } status;
|
||||||
|
|
||||||
|
/* Color map info */
|
||||||
|
int nColorMap;
|
||||||
|
int *colorMap;
|
||||||
|
|
||||||
|
/* Cached XImage */
|
||||||
|
XImage *image;
|
||||||
|
|
||||||
|
} DIBSECTIONOBJ;
|
||||||
|
|
||||||
/* GDI logical bitmap object */
|
/* GDI logical bitmap object */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -31,11 +49,7 @@ typedef struct
|
||||||
SIZE16 size; /* For SetBitmapDimension() */
|
SIZE16 size; /* For SetBitmapDimension() */
|
||||||
|
|
||||||
/* For device-independent bitmaps: */
|
/* For device-independent bitmaps: */
|
||||||
DIBSECTION *dibSection;
|
DIBSECTIONOBJ *dib;
|
||||||
RGBQUAD *colorMap;
|
|
||||||
int nColorMap;
|
|
||||||
/* DIBSECTION mapping status */
|
|
||||||
enum { DIB_NoHandler, DIB_InSync, DIB_AppMod, DIB_GdiMod } status;
|
|
||||||
|
|
||||||
} BITMAPOBJ;
|
} BITMAPOBJ;
|
||||||
|
|
||||||
|
@ -71,7 +85,8 @@ extern int DIB_GetDIBWidthBytes( int width, int depth );
|
||||||
extern int DIB_GetXImageWidthBytes( int width, int depth );
|
extern int DIB_GetXImageWidthBytes( int width, int depth );
|
||||||
extern int DIB_BitmapInfoSize( BITMAPINFO * info, WORD coloruse );
|
extern int DIB_BitmapInfoSize( BITMAPINFO * info, WORD coloruse );
|
||||||
extern void DIB_UpdateDIBSection( DC *dc, BOOL32 toDIB );
|
extern void DIB_UpdateDIBSection( DC *dc, BOOL32 toDIB );
|
||||||
|
extern void DIB_DeleteDIBSection( BITMAPOBJ *bmp );
|
||||||
|
extern void DIB_SelectDIBSection( DC *dc, BITMAPOBJ *bmp );
|
||||||
|
|
||||||
/* objects/oembitmap.c */
|
/* objects/oembitmap.c */
|
||||||
extern BOOL32 OBM_Init(void);
|
extern BOOL32 OBM_Init(void);
|
||||||
|
|
|
@ -7,17 +7,16 @@
|
||||||
|
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
|
|
||||||
|
BOOL32 WINAPI ShowHideMenuCtl (HWND32, UINT32, LPINT32);
|
||||||
VOID WINAPI GetEffectiveClientRect (HWND32, LPRECT32, LPINT32);
|
VOID WINAPI GetEffectiveClientRect (HWND32, LPRECT32, LPINT32);
|
||||||
|
VOID WINAPI InitCommonControls (VOID);
|
||||||
|
|
||||||
void WINAPI InitCommonControls(void);
|
|
||||||
|
|
||||||
typedef struct tagINITCOMMONCONTROLSEX {
|
typedef struct tagINITCOMMONCONTROLSEX {
|
||||||
DWORD dwSize;
|
DWORD dwSize;
|
||||||
DWORD dwICC;
|
DWORD dwICC;
|
||||||
} INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
|
} INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;
|
||||||
|
|
||||||
BOOL32 WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);
|
BOOL32 WINAPI InitCommonControlsEx (LPINITCOMMONCONTROLSEX);
|
||||||
|
|
||||||
#define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
|
#define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
|
||||||
#define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
|
#define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
|
||||||
|
@ -52,9 +51,12 @@ BOOL32 WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);
|
||||||
|
|
||||||
|
|
||||||
/* common control shared messages */
|
/* common control shared messages */
|
||||||
#define CCM_FIRST 0x2000
|
#define CCM_FIRST 0x2000
|
||||||
|
|
||||||
#define CCM_SETBKCOLOR (CCM_FIRST+1) /* lParam = bkColor */
|
#define CCM_SETBKCOLOR (CCM_FIRST+1) /* lParam = bkColor */
|
||||||
|
|
||||||
|
#define CCM_SETUNICODEFORMAT (CCM_FIRST+5)
|
||||||
|
#define CCM_GETUNICODEFORMAT (CCM_FIRST+6)
|
||||||
|
|
||||||
|
|
||||||
/* common notification codes */
|
/* common notification codes */
|
||||||
|
@ -704,4 +706,184 @@ HBITMAP32 WINAPI
|
||||||
CreateMappedBitmap (HINSTANCE32, INT32, UINT32, LPCOLORMAP, INT32);
|
CreateMappedBitmap (HINSTANCE32, INT32, UINT32, LPCOLORMAP, INT32);
|
||||||
|
|
||||||
|
|
||||||
|
/* Tool tips */
|
||||||
|
|
||||||
|
#define TOOLTIPS_CLASS16 "tooltips_class"
|
||||||
|
#define TOOLTIPS_CLASS32W L"tooltips_class32"
|
||||||
|
#define TOOLTIPS_CLASS32A "tooltips_class32"
|
||||||
|
#define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS)
|
||||||
|
|
||||||
|
#define TTS_ALWAYSTIP 0x01
|
||||||
|
#define TTS_NOPREFIX 0x02
|
||||||
|
|
||||||
|
#define TTF_IDISHWND 0x0001
|
||||||
|
#define TTF_CENTERTIP 0x0002
|
||||||
|
#define TTF_RTLREADING 0x0004
|
||||||
|
#define TTF_SUBCLASS 0x0010
|
||||||
|
#define TTF_TRACK 0x0020
|
||||||
|
#define TTF_ABSOLUTE 0x0080
|
||||||
|
#define TTF_TRANSPARENT 0x0100
|
||||||
|
#define TTF_DI_SETITEM 0x8000 /* valid only on the TTN_NEEDTEXT callback */
|
||||||
|
|
||||||
|
|
||||||
|
#define TTDT_AUTOMATIC 0
|
||||||
|
#define TTDT_RESHOW 1
|
||||||
|
#define TTDT_AUTOPOP 2
|
||||||
|
#define TTDT_INITIAL 3
|
||||||
|
|
||||||
|
|
||||||
|
#define TTM_ACTIVATE (WM_USER+1)
|
||||||
|
#define TTM_SETDELAYTIME (WM_USER+3)
|
||||||
|
#define TTM_ADDTOOL32A (WM_USER+4)
|
||||||
|
#define TTM_ADDTOOL32W (WM_USER+50)
|
||||||
|
#define TTM_ADDTOOL WINELIB_NAME_AW(TTM_ADDTOOL)
|
||||||
|
#define TTM_DELTOOL32A (WM_USER+5)
|
||||||
|
#define TTM_DELTOOL32W (WM_USER+51)
|
||||||
|
#define TTM_DELTOOL WINELIB_NAME_AW(TTM_DELTOOL)
|
||||||
|
#define TTM_NEWTOOLRECT32A (WM_USER+6)
|
||||||
|
#define TTM_NEWTOOLRECT32W (WM_USER+52)
|
||||||
|
#define TTM_NEWTOOLRECT WINELIB_NAME_AW(TTM_NEWTOOLRECT)
|
||||||
|
#define TTM_RELAYEVENT (WM_USER+7)
|
||||||
|
#define TTM_GETTOOLINFO32A (WM_USER+8)
|
||||||
|
#define TTM_GETTOOLINFO32W (WM_USER+53)
|
||||||
|
#define TTM_GETTOOLINFO WINELIB_NAME_AW(TTM_GETTOOLINFO)
|
||||||
|
#define TTM_SETTOOLINFO32A (WM_USER+9)
|
||||||
|
#define TTM_SETTOOLINFO32W (WM_USER+54)
|
||||||
|
#define TTM_SETTOOLINFO WINELIB_NAME_AW(TTM_SETTOOLINFO)
|
||||||
|
#define TTM_HITTEST32A (WM_USER+10)
|
||||||
|
#define TTM_HITTEST32W (WM_USER+55)
|
||||||
|
#define TTM_HITTEST WINELIB_NAME_AW(TTM_HITTEST)
|
||||||
|
#define TTM_GETTEXT32A (WM_USER+11)
|
||||||
|
#define TTM_GETTEXT32W (WM_USER+56)
|
||||||
|
#define TTM_GETTEXT WINELIB_NAME_AW(TTM_GETTEXT)
|
||||||
|
#define TTM_UPDATETIPTEXT32A (WM_USER+12)
|
||||||
|
#define TTM_UPDATETIPTEXT32W (WM_USER+57)
|
||||||
|
#define TTM_UPDATETIPTEXT WINELIB_NAME_AW(TTM_UPDATETIPTEXT)
|
||||||
|
#define TTM_GETTOOLCOUNT (WM_USER+13)
|
||||||
|
#define TTM_ENUMTOOLS32A (WM_USER+14)
|
||||||
|
#define TTM_ENUMTOOLS32W (WM_USER+58)
|
||||||
|
#define TTM_ENUMTOOLS WINELIB_NAME_AW(TTM_ENUMTOOLS)
|
||||||
|
#define TTM_GETCURRENTTOOL32A (WM_USER+15)
|
||||||
|
#define TTM_GETCURRENTTOOL32W (WM_USER+59)
|
||||||
|
#define TTM_GETCURRENTTOOL WINELIB_NAME_AW(TTM_GETCURRENTTOOL)
|
||||||
|
#define TTM_WINDOWFROMPOINT (WM_USER+16)
|
||||||
|
#define TTM_TRACKACTIVATE (WM_USER+17)
|
||||||
|
#define TTM_TRACKPOSITION (WM_USER+18)
|
||||||
|
#define TTM_SETTIPBKCOLOR (WM_USER+19)
|
||||||
|
#define TTM_SETTIPTEXTCOLOR (WM_USER+20)
|
||||||
|
#define TTM_GETDELAYTIME (WM_USER+21)
|
||||||
|
#define TTM_GETTIPBKCOLOR (WM_USER+22)
|
||||||
|
#define TTM_GETTIPTEXTCOLOR (WM_USER+23)
|
||||||
|
#define TTM_SETMAXTIPWIDTH (WM_USER+24)
|
||||||
|
#define TTM_GETMAXTIPWIDTH (WM_USER+25)
|
||||||
|
#define TTM_SETMARGIN (WM_USER+26)
|
||||||
|
#define TTM_GETMARGIN (WM_USER+27)
|
||||||
|
#define TTM_POP (WM_USER+28)
|
||||||
|
#define TTM_UPDATE (WM_USER+29)
|
||||||
|
|
||||||
|
typedef struct tagTOOLINFOA {
|
||||||
|
UINT32 cbSize;
|
||||||
|
UINT32 uFlags;
|
||||||
|
HWND32 hwnd;
|
||||||
|
UINT32 uId;
|
||||||
|
RECT32 rect;
|
||||||
|
HINSTANCE32 hinst;
|
||||||
|
LPSTR lpszText;
|
||||||
|
LPARAM lParam;
|
||||||
|
} TOOLINFOA, *PTOOLINFOA, *LPTOOLINFOA;
|
||||||
|
|
||||||
|
typedef struct tagTOOLINFOW {
|
||||||
|
UINT32 cbSize;
|
||||||
|
UINT32 uFlags;
|
||||||
|
HWND32 hwnd;
|
||||||
|
UINT32 uId;
|
||||||
|
RECT32 rect;
|
||||||
|
HINSTANCE32 hinst;
|
||||||
|
LPWSTR lpszText;
|
||||||
|
LPARAM lParam;
|
||||||
|
} TOOLINFOW, *PTOOLINFOW, *LPTOOLINFOW;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Rebar control */
|
||||||
|
|
||||||
|
#define REBARCLASSNAME16 "ReBarWindow"
|
||||||
|
#define REBARCLASSNAME32A "ReBarWindow32"
|
||||||
|
#define REBARCLASSNAME32W L"ReBarWindow32"
|
||||||
|
#define REBARCLASSNAME WINELIB_NAME_AW(REBARCLASSNAME)
|
||||||
|
|
||||||
|
|
||||||
|
/* Trackbar control */
|
||||||
|
|
||||||
|
#define TRACKBAR_CLASS16 "msctls_trackbar"
|
||||||
|
#define TRACKBAR_CLASS32A "msctls_trackbar32"
|
||||||
|
#define TRACKBAR_CLASS32W L"msctls_trackbar32"
|
||||||
|
#define TRACKBAR_CLASS WINELIB_NAME_AW(TRACKBAR_CLASS)
|
||||||
|
|
||||||
|
#define TBS_AUTOTICKS 0x0001
|
||||||
|
#define TBS_VERT 0x0002
|
||||||
|
#define TBS_HORZ 0x0000
|
||||||
|
#define TBS_TOP 0x0004
|
||||||
|
#define TBS_BOTTOM 0x0000
|
||||||
|
#define TBS_LEFT 0x0004
|
||||||
|
#define TBS_RIGHT 0x0000
|
||||||
|
#define TBS_BOTH 0x0008
|
||||||
|
#define TBS_NOTICKS 0x0010
|
||||||
|
#define TBS_ENABLESELRANGE 0x0020
|
||||||
|
#define TBS_FIXEDLENGTH 0x0040
|
||||||
|
#define TBS_NOTHUMB 0x0080
|
||||||
|
#define TBS_TOOLTIPS 0x0100
|
||||||
|
|
||||||
|
#define TBM_GETPOS (WM_USER)
|
||||||
|
#define TBM_GETRANGEMIN (WM_USER+1)
|
||||||
|
#define TBM_GETRANGEMAX (WM_USER+2)
|
||||||
|
#define TBM_GETTIC (WM_USER+3)
|
||||||
|
#define TBM_SETTIC (WM_USER+4)
|
||||||
|
#define TBM_SETPOS (WM_USER+5)
|
||||||
|
|
||||||
|
#define TBM_GETSELSTART (WM_USER+17)
|
||||||
|
#define TBM_GETSELEND (WM_USER+18)
|
||||||
|
#define TBM_CLEARSEL (WM_USER+19)
|
||||||
|
#define TBM_SETTICFREQ (WM_USER+20)
|
||||||
|
#define TBM_SETPAGESIZE (WM_USER+21)
|
||||||
|
#define TBM_GETPAGESIZE (WM_USER+22)
|
||||||
|
#define TBM_SETLINESIZE (WM_USER+23)
|
||||||
|
#define TBM_GETLINESIZE (WM_USER+24)
|
||||||
|
#define TBM_GETTHUMBRECT (WM_USER+25)
|
||||||
|
#define TBM_GETCHANNELRECT (WM_USER+26)
|
||||||
|
#define TBM_SETTHUMBLENGTH (WM_USER+27)
|
||||||
|
#define TBM_GETTHUMBLENGTH (WM_USER+28)
|
||||||
|
|
||||||
|
|
||||||
|
/* Pager control */
|
||||||
|
|
||||||
|
#define WC_PAGESCROLLER32A "SysPager"
|
||||||
|
#define WC_PAGESCROLLER32W L"SysPager"
|
||||||
|
#define WC_PAGESCROLLER WINELIB_NAME_AW(WC_PAGESCROLLER)
|
||||||
|
|
||||||
|
|
||||||
|
/* Treeview control */
|
||||||
|
|
||||||
|
#define WC_TREEVIEW32A "SysTreeView32"
|
||||||
|
#define WC_TREEVIEW32W L"SysTreeView32"
|
||||||
|
#define WC_TREEVIEW WINELIB_NAME_AW(WC_TREEVIEW)
|
||||||
|
|
||||||
|
#define TV_FIRST 0x1100
|
||||||
|
|
||||||
|
|
||||||
|
/* Listview control */
|
||||||
|
|
||||||
|
#define WC_LISTVIEW32A "SysListView32"
|
||||||
|
#define WC_LISTVIEW32W L"SysListView32"
|
||||||
|
#define WC_LISTVIEW WINELIB_NAME_AW(WC_LISTVIEW)
|
||||||
|
|
||||||
|
#define LVM_FIRST 0x1000
|
||||||
|
|
||||||
|
#define LVM_SETBKCOLOR (LVM_FIRST+1)
|
||||||
|
#define LVM_SETIMAGELIST (LVM_FIRST+3)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __WINE_COMMCTRL_H */
|
#endif /* __WINE_COMMCTRL_H */
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
#define __WINE_DDRAW_H
|
#define __WINE_DDRAW_H
|
||||||
|
|
||||||
#include "ts_xlib.h"
|
#include "ts_xlib.h"
|
||||||
|
#ifdef HAVE_LIBXXSHM
|
||||||
|
#include "ts_xshm.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef DIRECTDRAW_VERSION
|
#ifndef DIRECTDRAW_VERSION
|
||||||
#define DIRECTDRAW_VERSION 0x0500
|
#define DIRECTDRAW_VERSION 0x0500
|
||||||
|
@ -869,21 +872,34 @@ FAR * ) PURE;
|
||||||
STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE32 ) PURE;
|
STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE32 ) PURE;
|
||||||
} *LPDIRECTDRAW_VTABLE,IDirectDraw_VTable;
|
} *LPDIRECTDRAW_VTABLE,IDirectDraw_VTable;
|
||||||
|
|
||||||
struct _directdrawdata {
|
struct _common_directdrawdata {
|
||||||
DWORD depth;
|
DWORD depth;
|
||||||
DWORD vp_width,vp_height; /* viewport dimension */
|
|
||||||
DWORD height,width; /* SetDisplayMode */
|
DWORD height,width; /* SetDisplayMode */
|
||||||
DWORD fb_width,fb_height,fb_banksize,fb_memsize;
|
|
||||||
HWND32 mainwindow;
|
HWND32 mainwindow;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _dga_directdrawdata {
|
||||||
|
DWORD fb_width,fb_height,fb_banksize,fb_memsize;
|
||||||
void *fb_addr;
|
void *fb_addr;
|
||||||
unsigned int vpmask;
|
unsigned int vpmask;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _xlib_directdrawdata {
|
||||||
|
Window drawable;
|
||||||
|
/* are these needed for anything? (draw_surf is the active surface)
|
||||||
|
IDirectDrawSurface *surfs;
|
||||||
|
DWORD num_surfs, alloc_surfs, draw_surf; */
|
||||||
|
};
|
||||||
|
|
||||||
struct IDirectDraw {
|
struct IDirectDraw {
|
||||||
LPDIRECTDRAW_VTABLE lpvtbl;
|
LPDIRECTDRAW_VTABLE lpvtbl;
|
||||||
DWORD ref;
|
DWORD ref;
|
||||||
struct _directdrawdata d;
|
struct _common_directdrawdata d;
|
||||||
|
union {
|
||||||
|
struct _xlib_directdrawdata xlib;
|
||||||
|
struct _xlib_directdrawdata xshm;
|
||||||
|
struct _dga_directdrawdata dga;
|
||||||
|
} e;
|
||||||
};
|
};
|
||||||
#undef THIS
|
#undef THIS
|
||||||
|
|
||||||
|
@ -932,19 +948,41 @@ FAR * ) PURE;
|
||||||
/* MUST HAVE THE SAME LAYOUT AS struct IDirectDraw */
|
/* MUST HAVE THE SAME LAYOUT AS struct IDirectDraw */
|
||||||
|
|
||||||
struct IDirectDraw2 {
|
struct IDirectDraw2 {
|
||||||
LPDIRECTDRAW2_VTABLE lpvtbl;
|
LPDIRECTDRAW2_VTABLE lpvtbl;
|
||||||
DWORD ref;
|
DWORD ref;
|
||||||
struct _directdrawdata d;
|
struct _common_directdrawdata d;
|
||||||
|
union {
|
||||||
|
struct _xlib_directdrawdata xlib;
|
||||||
|
/* only different in image create&put */
|
||||||
|
struct _xlib_directdrawdata xshm;
|
||||||
|
struct _dga_directdrawdata dga;
|
||||||
|
} e;
|
||||||
};
|
};
|
||||||
#undef THIS
|
#undef THIS
|
||||||
|
|
||||||
#define THIS LPDIRECTDRAWSURFACE this
|
#define THIS LPDIRECTDRAWSURFACE this
|
||||||
struct _directdrawsurface {
|
struct _common_directdrawsurface {
|
||||||
LPVOID surface;
|
|
||||||
LPDIRECTDRAWPALETTE palette;
|
LPDIRECTDRAWPALETTE palette;
|
||||||
DWORD fb_height,lpitch,width,height;
|
|
||||||
LPDIRECTDRAW ddraw;
|
LPDIRECTDRAW ddraw;
|
||||||
LPDIRECTDRAWSURFACE backbuffer;
|
LPDIRECTDRAWSURFACE backbuffer;
|
||||||
|
LPVOID surface;
|
||||||
|
DWORD lpitch,width,height;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _dga_directdrawsurface {
|
||||||
|
DWORD fb_height;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _xshm_directdrawsurface {
|
||||||
|
XImage *image;
|
||||||
|
BOOL32 surface_is_image_data;
|
||||||
|
#ifdef HAVE_LIBXXSHM
|
||||||
|
XShmSegmentInfo shminfo;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
struct _xlib_directdrawsurface {
|
||||||
|
XImage *image;
|
||||||
|
BOOL32 surface_is_image_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct IDirectDrawSurface_VTable {
|
typedef struct IDirectDrawSurface_VTable {
|
||||||
|
@ -990,7 +1028,12 @@ typedef struct IDirectDrawSurface_VTable {
|
||||||
struct IDirectDrawSurface {
|
struct IDirectDrawSurface {
|
||||||
LPDIRECTDRAWSURFACE_VTABLE lpvtbl;
|
LPDIRECTDRAWSURFACE_VTABLE lpvtbl;
|
||||||
DWORD ref;
|
DWORD ref;
|
||||||
struct _directdrawsurface s;
|
struct _common_directdrawsurface s;
|
||||||
|
union {
|
||||||
|
struct _dga_directdrawsurface dga;
|
||||||
|
struct _xshm_directdrawsurface xshm;
|
||||||
|
struct _xlib_directdrawsurface xlib;
|
||||||
|
} t;
|
||||||
};
|
};
|
||||||
#undef THIS
|
#undef THIS
|
||||||
#define THIS LPDIRECTDRAWSURFACE2 this
|
#define THIS LPDIRECTDRAWSURFACE2 this
|
||||||
|
@ -1007,7 +1050,8 @@ typedef struct IDirectDrawSurface2_VTable {
|
||||||
STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
|
STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
|
||||||
STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT32,DWORD) PURE;
|
STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT32,DWORD) PURE;
|
||||||
STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
|
STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
|
||||||
STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE; STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
|
STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
|
||||||
|
STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
|
||||||
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
|
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
|
||||||
STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
|
STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
|
||||||
STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
|
STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
|
||||||
|
@ -1042,7 +1086,12 @@ typedef struct IDirectDrawSurface2_VTable {
|
||||||
struct IDirectDrawSurface2 {
|
struct IDirectDrawSurface2 {
|
||||||
LPDIRECTDRAWSURFACE2_VTABLE lpvtbl;
|
LPDIRECTDRAWSURFACE2_VTABLE lpvtbl;
|
||||||
DWORD ref;
|
DWORD ref;
|
||||||
struct _directdrawsurface s;
|
struct _common_directdrawsurface s;
|
||||||
|
union {
|
||||||
|
struct _dga_directdrawsurface dga;
|
||||||
|
struct _xlib_directdrawsurface xshm;
|
||||||
|
struct _xlib_directdrawsurface xlib;
|
||||||
|
} t;
|
||||||
};
|
};
|
||||||
#undef THIS
|
#undef THIS
|
||||||
#define THIS LPDIRECTDRAWSURFACE3 this
|
#define THIS LPDIRECTDRAWSURFACE3 this
|
||||||
|
@ -1097,7 +1146,12 @@ typedef struct IDirectDrawSurface3_VTable {
|
||||||
struct IDirectDrawSurface3 {
|
struct IDirectDrawSurface3 {
|
||||||
LPDIRECTDRAWSURFACE3_VTABLE lpvtbl;
|
LPDIRECTDRAWSURFACE3_VTABLE lpvtbl;
|
||||||
DWORD ref;
|
DWORD ref;
|
||||||
struct _directdrawsurface s;
|
struct _common_directdrawsurface s;
|
||||||
|
union {
|
||||||
|
struct _dga_directdrawsurface dga;
|
||||||
|
struct _xlib_directdrawsurface xshm;
|
||||||
|
struct _xlib_directdrawsurface xlib;
|
||||||
|
} t;
|
||||||
};
|
};
|
||||||
#undef THIS
|
#undef THIS
|
||||||
|
|
||||||
|
|
251
include/debug.h
251
include/debug.h
|
@ -5,125 +5,138 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Definitions for channels identifiers */
|
/* Definitions for channels identifiers */
|
||||||
#define dbch_accel 0
|
#define dbch_1 0
|
||||||
#define dbch_advapi 1
|
#define dbch_2 1
|
||||||
#define dbch_aspi 2
|
#define dbch_3 2
|
||||||
#define dbch_atom 3
|
#define dbch_4 3
|
||||||
#define dbch_bitblt 4
|
#define dbch_5 4
|
||||||
#define dbch_bitmap 5
|
#define dbch_6 5
|
||||||
#define dbch_caret 6
|
#define dbch_accel 6
|
||||||
#define dbch_cd 7
|
#define dbch_advapi 7
|
||||||
#define dbch_cdaudio 8
|
#define dbch_aspi 8
|
||||||
#define dbch_class 9
|
#define dbch_atom 9
|
||||||
#define dbch_clipboard 10
|
#define dbch_bitblt 10
|
||||||
#define dbch_clipping 11
|
#define dbch_bitmap 11
|
||||||
#define dbch_combo 12
|
#define dbch_caret 12
|
||||||
#define dbch_comm 13
|
#define dbch_cd 13
|
||||||
#define dbch_commctrl 14
|
#define dbch_cdaudio 14
|
||||||
#define dbch_commdlg 15
|
#define dbch_class 15
|
||||||
#define dbch_console 16
|
#define dbch_clipboard 16
|
||||||
#define dbch_crtdll 17
|
#define dbch_clipping 17
|
||||||
#define dbch_cursor 18
|
#define dbch_combo 18
|
||||||
#define dbch_dc 19
|
#define dbch_comm 19
|
||||||
#define dbch_dde 20
|
#define dbch_commctrl 20
|
||||||
#define dbch_ddeml 21
|
#define dbch_commdlg 21
|
||||||
#define dbch_ddraw 22
|
#define dbch_console 22
|
||||||
#define dbch_debug 23
|
#define dbch_crtdll 23
|
||||||
#define dbch_dialog 24
|
#define dbch_cursor 24
|
||||||
#define dbch_dinput 25
|
#define dbch_dc 25
|
||||||
#define dbch_dll 26
|
#define dbch_dde 26
|
||||||
#define dbch_dosfs 27
|
#define dbch_ddeml 27
|
||||||
#define dbch_dosmem 28
|
#define dbch_ddraw 28
|
||||||
#define dbch_dplay 29
|
#define dbch_debug 29
|
||||||
#define dbch_driver 30
|
#define dbch_dialog 30
|
||||||
#define dbch_dsound 31
|
#define dbch_dinput 31
|
||||||
#define dbch_edit 32
|
#define dbch_dll 32
|
||||||
#define dbch_event 33
|
#define dbch_dosfs 33
|
||||||
#define dbch_exec 34
|
#define dbch_dosmem 34
|
||||||
#define dbch_file 35
|
#define dbch_dplay 35
|
||||||
#define dbch_fixup 36
|
#define dbch_driver 36
|
||||||
#define dbch_font 37
|
#define dbch_dsound 37
|
||||||
#define dbch_gdi 38
|
#define dbch_edit 38
|
||||||
#define dbch_global 39
|
#define dbch_event 39
|
||||||
#define dbch_graphics 40
|
#define dbch_exec 40
|
||||||
#define dbch_header 41
|
#define dbch_file 41
|
||||||
#define dbch_heap 42
|
#define dbch_fixup 42
|
||||||
#define dbch_hook 43
|
#define dbch_font 43
|
||||||
#define dbch_icon 44
|
#define dbch_gdi 44
|
||||||
#define dbch_imagelist 45
|
#define dbch_global 45
|
||||||
#define dbch_int 46
|
#define dbch_graphics 46
|
||||||
#define dbch_int21 47
|
#define dbch_header 47
|
||||||
#define dbch_int31 48
|
#define dbch_heap 48
|
||||||
#define dbch_key 49
|
#define dbch_hook 49
|
||||||
#define dbch_keyboard 50
|
#define dbch_icon 50
|
||||||
#define dbch_ldt 51
|
#define dbch_imagelist 51
|
||||||
#define dbch_listbox 52
|
#define dbch_int 52
|
||||||
#define dbch_local 53
|
#define dbch_int21 53
|
||||||
#define dbch_mci 54
|
#define dbch_int31 54
|
||||||
#define dbch_mcianim 55
|
#define dbch_key 55
|
||||||
#define dbch_mciwave 56
|
#define dbch_keyboard 56
|
||||||
#define dbch_mdi 57
|
#define dbch_ldt 57
|
||||||
#define dbch_menu 58
|
#define dbch_listbox 58
|
||||||
#define dbch_message 59
|
#define dbch_listview 59
|
||||||
#define dbch_metafile 60
|
#define dbch_local 60
|
||||||
#define dbch_midi 61
|
#define dbch_mci 61
|
||||||
#define dbch_mmaux 62
|
#define dbch_mcianim 62
|
||||||
#define dbch_mmio 63
|
#define dbch_mciwave 63
|
||||||
#define dbch_mmsys 64
|
#define dbch_mdi 64
|
||||||
#define dbch_mmtime 65
|
#define dbch_menu 65
|
||||||
#define dbch_module 66
|
#define dbch_message 66
|
||||||
#define dbch_mpr 67
|
#define dbch_metafile 67
|
||||||
#define dbch_msg 68
|
#define dbch_midi 68
|
||||||
#define dbch_nonclient 69
|
#define dbch_mmaux 69
|
||||||
#define dbch_ntdll 70
|
#define dbch_mmio 70
|
||||||
#define dbch_ole 71
|
#define dbch_mmsys 71
|
||||||
#define dbch_palette 72
|
#define dbch_mmtime 72
|
||||||
#define dbch_print 73
|
#define dbch_module 73
|
||||||
#define dbch_process 74
|
#define dbch_mpr 74
|
||||||
#define dbch_profile 75
|
#define dbch_msg 75
|
||||||
#define dbch_progress 76
|
#define dbch_nonclient 76
|
||||||
#define dbch_prop 77
|
#define dbch_ntdll 77
|
||||||
#define dbch_psdrv 78
|
#define dbch_ole 78
|
||||||
#define dbch_reg 79
|
#define dbch_pager 79
|
||||||
#define dbch_region 80
|
#define dbch_palette 80
|
||||||
#define dbch_relay 81
|
#define dbch_print 81
|
||||||
#define dbch_resource 82
|
#define dbch_process 82
|
||||||
#define dbch_scroll 83
|
#define dbch_profile 83
|
||||||
#define dbch_security 84
|
#define dbch_progress 84
|
||||||
#define dbch_segment 85
|
#define dbch_prop 85
|
||||||
#define dbch_selector 86
|
#define dbch_psdrv 86
|
||||||
#define dbch_sem 87
|
#define dbch_rebar 87
|
||||||
#define dbch_sendmsg 88
|
#define dbch_reg 88
|
||||||
#define dbch_shell 89
|
#define dbch_region 89
|
||||||
#define dbch_shm 90
|
#define dbch_relay 90
|
||||||
#define dbch_snoop 91
|
#define dbch_resource 91
|
||||||
#define dbch_sound 92
|
#define dbch_s 92
|
||||||
#define dbch_static 93
|
#define dbch_scroll 93
|
||||||
#define dbch_stress 94
|
#define dbch_security 94
|
||||||
#define dbch_string 95
|
#define dbch_segment 95
|
||||||
#define dbch_syscolor 96
|
#define dbch_selector 96
|
||||||
#define dbch_system 97
|
#define dbch_sem 97
|
||||||
#define dbch_task 98
|
#define dbch_sendmsg 98
|
||||||
#define dbch_text 99
|
#define dbch_shell 99
|
||||||
#define dbch_thread 100
|
#define dbch_shm 100
|
||||||
#define dbch_thunk 101
|
#define dbch_snoop 101
|
||||||
#define dbch_timer 102
|
#define dbch_sound 102
|
||||||
#define dbch_toolbar 103
|
#define dbch_static 103
|
||||||
#define dbch_toolhelp 104
|
#define dbch_stress 104
|
||||||
#define dbch_tweak 105
|
#define dbch_string 105
|
||||||
#define dbch_uitools 106
|
#define dbch_syscolor 106
|
||||||
#define dbch_updown 107
|
#define dbch_system 107
|
||||||
#define dbch_ver 108
|
#define dbch_task 108
|
||||||
#define dbch_virtual 109
|
#define dbch_text 109
|
||||||
#define dbch_vxd 110
|
#define dbch_thread 110
|
||||||
#define dbch_win 111
|
#define dbch_thunk 111
|
||||||
#define dbch_win16drv 112
|
#define dbch_timer 112
|
||||||
#define dbch_win32 113
|
#define dbch_toolbar 113
|
||||||
#define dbch_wing 114
|
#define dbch_toolhelp 114
|
||||||
#define dbch_winsock 115
|
#define dbch_tooltips 115
|
||||||
#define dbch_wnet 116
|
#define dbch_trackbar 116
|
||||||
#define dbch_x11 117
|
#define dbch_treeview 117
|
||||||
#define dbch_x11drv 118
|
#define dbch_tweak 118
|
||||||
|
#define dbch_uitools 119
|
||||||
|
#define dbch_updown 120
|
||||||
|
#define dbch_ver 121
|
||||||
|
#define dbch_virtual 122
|
||||||
|
#define dbch_vxd 123
|
||||||
|
#define dbch_win 124
|
||||||
|
#define dbch_win16drv 125
|
||||||
|
#define dbch_win32 126
|
||||||
|
#define dbch_wing 127
|
||||||
|
#define dbch_winsock 128
|
||||||
|
#define dbch_wnet 129
|
||||||
|
#define dbch_x11 130
|
||||||
|
#define dbch_x11drv 131
|
||||||
/* Definitions for classes identifiers */
|
/* Definitions for classes identifiers */
|
||||||
#define dbcl_fixme 0
|
#define dbcl_fixme 0
|
||||||
#define dbcl_err 1
|
#define dbcl_err 1
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "debugtools.h"
|
#include "debugtools.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEBUG_CHANNEL_COUNT 119
|
#define DEBUG_CHANNEL_COUNT 132
|
||||||
#ifdef DEBUG_RUNTIME
|
#ifdef DEBUG_RUNTIME
|
||||||
short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
|
short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
|
||||||
{1, 1, 0, 0},
|
{1, 1, 0, 0},
|
||||||
|
@ -126,8 +126,27 @@ short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
|
||||||
{1, 1, 0, 0},
|
{1, 1, 0, 0},
|
||||||
{1, 1, 0, 0},
|
{1, 1, 0, 0},
|
||||||
{1, 1, 0, 0},
|
{1, 1, 0, 0},
|
||||||
|
{1, 1, 0, 0},
|
||||||
|
{1, 1, 0, 0},
|
||||||
|
{1, 1, 0, 0},
|
||||||
|
{1, 1, 0, 0},
|
||||||
|
{1, 1, 0, 0},
|
||||||
|
{1, 1, 0, 0},
|
||||||
|
{1, 1, 0, 0},
|
||||||
|
{1, 1, 0, 0},
|
||||||
|
{1, 1, 0, 0},
|
||||||
|
{1, 1, 0, 0},
|
||||||
|
{1, 1, 0, 0},
|
||||||
|
{1, 1, 0, 0},
|
||||||
|
{1, 1, 0, 0},
|
||||||
};
|
};
|
||||||
const char* debug_ch_name[] = {
|
const char* debug_ch_name[] = {
|
||||||
|
"1",
|
||||||
|
"2",
|
||||||
|
"3",
|
||||||
|
"4",
|
||||||
|
"5",
|
||||||
|
"6",
|
||||||
"accel",
|
"accel",
|
||||||
"advapi",
|
"advapi",
|
||||||
"aspi",
|
"aspi",
|
||||||
|
@ -181,6 +200,7 @@ const char* debug_ch_name[] = {
|
||||||
"keyboard",
|
"keyboard",
|
||||||
"ldt",
|
"ldt",
|
||||||
"listbox",
|
"listbox",
|
||||||
|
"listview",
|
||||||
"local",
|
"local",
|
||||||
"mci",
|
"mci",
|
||||||
"mcianim",
|
"mcianim",
|
||||||
|
@ -200,6 +220,7 @@ const char* debug_ch_name[] = {
|
||||||
"nonclient",
|
"nonclient",
|
||||||
"ntdll",
|
"ntdll",
|
||||||
"ole",
|
"ole",
|
||||||
|
"pager",
|
||||||
"palette",
|
"palette",
|
||||||
"print",
|
"print",
|
||||||
"process",
|
"process",
|
||||||
|
@ -207,10 +228,12 @@ const char* debug_ch_name[] = {
|
||||||
"progress",
|
"progress",
|
||||||
"prop",
|
"prop",
|
||||||
"psdrv",
|
"psdrv",
|
||||||
|
"rebar",
|
||||||
"reg",
|
"reg",
|
||||||
"region",
|
"region",
|
||||||
"relay",
|
"relay",
|
||||||
"resource",
|
"resource",
|
||||||
|
"s",
|
||||||
"scroll",
|
"scroll",
|
||||||
"security",
|
"security",
|
||||||
"segment",
|
"segment",
|
||||||
|
@ -233,6 +256,9 @@ const char* debug_ch_name[] = {
|
||||||
"timer",
|
"timer",
|
||||||
"toolbar",
|
"toolbar",
|
||||||
"toolhelp",
|
"toolhelp",
|
||||||
|
"tooltips",
|
||||||
|
"trackbar",
|
||||||
|
"treeview",
|
||||||
"tweak",
|
"tweak",
|
||||||
"uitools",
|
"uitools",
|
||||||
"updown",
|
"updown",
|
||||||
|
|
|
@ -203,6 +203,7 @@ typedef struct tagDC_FUNCS
|
||||||
BOOL32 (*pPolyPolyline)(DC*,LPPOINT32,LPINT32,UINT32);
|
BOOL32 (*pPolyPolyline)(DC*,LPPOINT32,LPINT32,UINT32);
|
||||||
BOOL32 (*pPolygon)(DC*,LPPOINT32,INT32);
|
BOOL32 (*pPolygon)(DC*,LPPOINT32,INT32);
|
||||||
BOOL32 (*pPolyline)(DC*,LPPOINT32,INT32);
|
BOOL32 (*pPolyline)(DC*,LPPOINT32,INT32);
|
||||||
|
BOOL32 (*pPolyBezier)(DC*,POINT32, LPPOINT32,DWORD);
|
||||||
UINT32 (*pRealizePalette)(DC*);
|
UINT32 (*pRealizePalette)(DC*);
|
||||||
BOOL32 (*pRectangle)(DC*,INT32,INT32,INT32,INT32);
|
BOOL32 (*pRectangle)(DC*,INT32,INT32,INT32,INT32);
|
||||||
BOOL32 (*pRestoreDC)(DC*,INT32);
|
BOOL32 (*pRestoreDC)(DC*,INT32);
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Listview class extra info
|
||||||
|
*
|
||||||
|
* Copyright 1998 Eric Kohl
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __WINE_LISTVIEW_H
|
||||||
|
#define __WINE_LISTVIEW_H
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct tagLISTVIEW_INFO
|
||||||
|
{
|
||||||
|
COLORREF clrBk;
|
||||||
|
|
||||||
|
|
||||||
|
} LISTVIEW_INFO;
|
||||||
|
|
||||||
|
|
||||||
|
extern void LISTVIEW_Register (void);
|
||||||
|
|
||||||
|
#endif /* __WINE_LISTVIEW_H */
|
|
@ -194,5 +194,6 @@ extern BYTE DOS_ErrorClass, DOS_ErrorAction, DOS_ErrorLocus;
|
||||||
|
|
||||||
void WINAPI DOS3Call( CONTEXT *context );
|
void WINAPI DOS3Call( CONTEXT *context );
|
||||||
void do_mscdex( CONTEXT *context, int dorealmode );
|
void do_mscdex( CONTEXT *context, int dorealmode );
|
||||||
|
void do_mscdex_dd (CONTEXT * context, int dorealmode);
|
||||||
|
|
||||||
#endif /* __WINE_MSDOS_H */
|
#endif /* __WINE_MSDOS_H */
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Pager class extra info
|
||||||
|
*
|
||||||
|
* Copyright 1998 Eric Kohl
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __WINE_PAGER_H
|
||||||
|
#define __WINE_PAGER_H
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct tagPAGER_INFO
|
||||||
|
{
|
||||||
|
UINT32 uDummy; /* this is just a dummy to keep the compiler happy */
|
||||||
|
|
||||||
|
} PAGER_INFO;
|
||||||
|
|
||||||
|
|
||||||
|
extern void PAGER_Register (void);
|
||||||
|
|
||||||
|
#endif /* __WINE_PAGER_H */
|
|
@ -1,5 +1,30 @@
|
||||||
|
/* Definitions for printing
|
||||||
|
*
|
||||||
|
* Copyright 1998 Huw Davies, Andreas Mohr
|
||||||
|
*/
|
||||||
|
#ifndef __WINE_PRINT_H
|
||||||
|
#define __WINE_PRINT_H
|
||||||
|
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
|
|
||||||
|
#define INT_PD_DEFAULT_DEVMODE 1
|
||||||
|
#define INT_PD_DEFAULT_MODEL 2
|
||||||
|
|
||||||
|
#define PRINTER_ATTRIBUTE_QUEUED 0x00000001
|
||||||
|
#define PRINTER_ATTRIBUTE_DIRECT 0x00000002
|
||||||
|
#define PRINTER_ATTRIBUTE_DEFAULT 0x00000004
|
||||||
|
#define PRINTER_ATTRIBUTE_SHARED 0x00000008
|
||||||
|
#define PRINTER_ATTRIBUTE_NETWORK 0x00000010
|
||||||
|
#define PRINTER_ATTRIBUTE_HIDDEN 0x00000020
|
||||||
|
#define PRINTER_ATTRIBUTE_LOCAL 0x00000040
|
||||||
|
|
||||||
|
#define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x00000080
|
||||||
|
#define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x00000100
|
||||||
|
#define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
|
||||||
|
|
||||||
|
#define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x00000400
|
||||||
|
#define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x00000800
|
||||||
|
|
||||||
HANDLE16 WINAPI OpenJob(LPSTR lpOutput, LPSTR lpTitle, HDC16 hDC);
|
HANDLE16 WINAPI OpenJob(LPSTR lpOutput, LPSTR lpTitle, HDC16 hDC);
|
||||||
int WINAPI CloseJob(HANDLE16 hJob);
|
int WINAPI CloseJob(HANDLE16 hJob);
|
||||||
int WINAPI WriteSpool(HANDLE16 hJob, LPSTR lpData, WORD cch);
|
int WINAPI WriteSpool(HANDLE16 hJob, LPSTR lpData, WORD cch);
|
||||||
|
@ -9,7 +34,4 @@ int WINAPI EndSpoolPage(HANDLE16 hJob);
|
||||||
DWORD WINAPI GetSpoolJob(int nOption, LONG param);
|
DWORD WINAPI GetSpoolJob(int nOption, LONG param);
|
||||||
int WINAPI WriteDialog(HANDLE16 hJob, LPSTR lpMsg, WORD cchMsg);
|
int WINAPI WriteDialog(HANDLE16 hJob, LPSTR lpMsg, WORD cchMsg);
|
||||||
|
|
||||||
|
#endif /* __WINE_PRINT_H */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,8 @@ typedef struct _PDB32
|
||||||
DWORD unknown7; /* bc Unknown */
|
DWORD unknown7; /* bc Unknown */
|
||||||
DWORD unknown8; /* c0 Unknown (NT) */
|
DWORD unknown8; /* c0 Unknown (NT) */
|
||||||
LCID locale; /* c4 Locale to be queried by GetThreadLocale (NT) */
|
LCID locale; /* c4 Locale to be queried by GetThreadLocale (NT) */
|
||||||
|
/* The following are Wine-specific fields */
|
||||||
|
void *server_pid; /* Server id for this process */
|
||||||
} PDB32;
|
} PDB32;
|
||||||
|
|
||||||
/* Process flags */
|
/* Process flags */
|
||||||
|
@ -108,6 +110,7 @@ typedef struct _PDB32
|
||||||
#define PDB32_DOS_PROC 0x0010 /* Dos process */
|
#define PDB32_DOS_PROC 0x0010 /* Dos process */
|
||||||
#define PDB32_CONSOLE_PROC 0x0020 /* Console process */
|
#define PDB32_CONSOLE_PROC 0x0020 /* Console process */
|
||||||
#define PDB32_FILE_APIS_OEM 0x0040 /* File APIs are OEM */
|
#define PDB32_FILE_APIS_OEM 0x0040 /* File APIs are OEM */
|
||||||
|
#define PDB32_WIN32S_PROC 0x8000 /* Win32s process */
|
||||||
|
|
||||||
/* PDB <-> Process id conversion macros */
|
/* PDB <-> Process id conversion macros */
|
||||||
#define PROCESS_OBFUSCATOR ((DWORD)0xdeadbeef)
|
#define PROCESS_OBFUSCATOR ((DWORD)0xdeadbeef)
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Rebar class extra info
|
||||||
|
*
|
||||||
|
* Copyright 1998 Eric Kohl
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __WINE_REBAR_H
|
||||||
|
#define __WINE_REBAR_H
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct tagREBAR_INFO
|
||||||
|
{
|
||||||
|
UINT32 uDummy; /* this is just a dummy to keep the compiler happy */
|
||||||
|
|
||||||
|
} REBAR_INFO;
|
||||||
|
|
||||||
|
|
||||||
|
extern void REBAR_Register (void);
|
||||||
|
|
||||||
|
#endif /* __WINE_REBAR_H */
|
|
@ -0,0 +1,64 @@
|
||||||
|
/*
|
||||||
|
* Wine server definitions
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 Alexandre Julliard
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __WINE_SERVER_H
|
||||||
|
#define __WINE_SERVER_H
|
||||||
|
|
||||||
|
/* message header as sent on the wire */
|
||||||
|
struct header
|
||||||
|
{
|
||||||
|
unsigned int len; /* total msg length (including this header) */
|
||||||
|
unsigned int type; /* msg type */
|
||||||
|
unsigned int seq; /* sequence number */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* max msg length (not including the header) */
|
||||||
|
#define MAX_MSG_LENGTH (16384 - sizeof(struct header))
|
||||||
|
|
||||||
|
/* request from client to server */
|
||||||
|
|
||||||
|
enum request
|
||||||
|
{
|
||||||
|
REQ_TIMEOUT, /* internal timeout msg */
|
||||||
|
REQ_KILL_THREAD, /* internal kill thread msg */
|
||||||
|
REQ_NEW_THREAD, /* create a new thread (called from the creator) */
|
||||||
|
REQ_INIT_THREAD, /* init a new thread (called by itself) */
|
||||||
|
REQ_NB_REQUESTS
|
||||||
|
};
|
||||||
|
|
||||||
|
/* request structures */
|
||||||
|
|
||||||
|
struct new_thread_request
|
||||||
|
{
|
||||||
|
void *pid; /* process id for the new thread (or 0 if none yet) */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct new_thread_reply
|
||||||
|
{
|
||||||
|
void *tid; /* thread id */
|
||||||
|
void *pid; /* process id (created if necessary) */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct init_thread_request
|
||||||
|
{
|
||||||
|
int pid;
|
||||||
|
/* char name[...];*/
|
||||||
|
};
|
||||||
|
|
||||||
|
/* server-side functions */
|
||||||
|
|
||||||
|
extern void server_main_loop( int fd );
|
||||||
|
|
||||||
|
|
||||||
|
/* client-side functions */
|
||||||
|
|
||||||
|
#ifndef __WINE_SERVER__
|
||||||
|
struct _THDB;
|
||||||
|
extern int CLIENT_NewThread( struct _THDB *thdb );
|
||||||
|
extern int CLIENT_InitThread(void);
|
||||||
|
#endif /* __WINE_SERVER__ */
|
||||||
|
|
||||||
|
#endif /* __WINE_SERVER_H */
|
117
include/shlobj.h
117
include/shlobj.h
|
@ -40,14 +40,12 @@ DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
|
||||||
#define STRRET_CSTR 0x0002
|
#define STRRET_CSTR 0x0002
|
||||||
|
|
||||||
typedef struct _STRRET
|
typedef struct _STRRET
|
||||||
{
|
{ UINT32 uType; /* STRRET_xxx */
|
||||||
UINT32 uType; /* STRRET_xxx */
|
union
|
||||||
union
|
{ LPWSTR pOleStr; /* OLESTR that will be freed */
|
||||||
{
|
UINT32 uOffset; /* Offset into SHITEMID (ANSI) */
|
||||||
LPWSTR pOleStr; /* OLESTR that will be freed */
|
char cStr[MAX_PATH]; /* Buffer to fill in */
|
||||||
UINT32 uOffset; /* Offset into SHITEMID (ANSI) */
|
}u;
|
||||||
char cStr[MAX_PATH]; /* Buffer to fill in */
|
|
||||||
} DUMMYUNIONNAME;
|
|
||||||
} STRRET,*LPSTRRET;
|
} STRRET,*LPSTRRET;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -59,16 +57,87 @@ typedef struct {
|
||||||
SHITEMID mkid; /* first itemid in list */
|
SHITEMID mkid; /* first itemid in list */
|
||||||
} ITEMIDLIST,*LPITEMIDLIST,*LPCITEMIDLIST;
|
} ITEMIDLIST,*LPITEMIDLIST,*LPCITEMIDLIST;
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* INTERNAL CLASS: PIDL-Manager
|
||||||
|
* Source: HOWTO extend the explorer namespace
|
||||||
|
* ftp.microsoft.com/ ... softlib ... regview.exe
|
||||||
|
*/
|
||||||
|
#define THIS LPPIDLMGR this
|
||||||
|
typedef enum tagPIDLTYPE
|
||||||
|
{ PT_DESKTOP = 0x00000000,
|
||||||
|
PT_DRIVE = 0x00000001,
|
||||||
|
PT_FOLDER = 0x00000002,
|
||||||
|
PT_VALUE = 0x00000004,
|
||||||
|
PT_TEXT = PT_FOLDER | PT_VALUE
|
||||||
|
} PIDLTYPE;
|
||||||
|
|
||||||
|
typedef struct tagPIDLDATA
|
||||||
|
{ PIDLTYPE type;
|
||||||
|
CHAR szText[1];
|
||||||
|
}PIDLDATA, FAR *LPPIDLDATA;
|
||||||
|
|
||||||
|
typedef struct pidlmgr pidlmgr,*LPPIDLMGR;
|
||||||
|
typedef struct PidlMgr_VTable {
|
||||||
|
STDMETHOD_(LPITEMIDLIST, CreateDesktop) (THIS);
|
||||||
|
STDMETHOD_(LPITEMIDLIST, CreateDrive) (THIS_ LPCSTR);
|
||||||
|
STDMETHOD_(LPITEMIDLIST, CreateFolder) (THIS_ LPCSTR);
|
||||||
|
STDMETHOD_(LPITEMIDLIST, CreateValue) (THIS_ LPCSTR);
|
||||||
|
STDMETHOD_(void, Delete) (THIS_ LPITEMIDLIST);
|
||||||
|
STDMETHOD_(LPITEMIDLIST, GetNextItem) (THIS_ LPCITEMIDLIST);
|
||||||
|
STDMETHOD_(LPITEMIDLIST, Copy) (THIS_ LPCITEMIDLIST);
|
||||||
|
STDMETHOD_(UINT16, GetSize) (THIS_ LPCITEMIDLIST);
|
||||||
|
STDMETHOD_(BOOL32, GetDesktop) (THIS_ LPCITEMIDLIST, LPSTR);
|
||||||
|
STDMETHOD_(BOOL32, GetDrive) (THIS_ LPCITEMIDLIST, LPSTR, UINT16);
|
||||||
|
STDMETHOD_(LPITEMIDLIST, GetLastItem) (THIS_ LPCITEMIDLIST);
|
||||||
|
STDMETHOD_(DWORD, GetItemText) (THIS_ LPCITEMIDLIST, LPSTR, UINT16);
|
||||||
|
STDMETHOD_(BOOL32, IsDesktop) (THIS_ LPCITEMIDLIST);
|
||||||
|
STDMETHOD_(BOOL32, IsDrive) (THIS_ LPCITEMIDLIST);
|
||||||
|
STDMETHOD_(BOOL32, IsFolder) (THIS_ LPCITEMIDLIST);
|
||||||
|
STDMETHOD_(BOOL32, IsValue) (THIS_ LPCITEMIDLIST);
|
||||||
|
STDMETHOD_(BOOL32, HasFolders) (THIS_ LPSTR, LPCITEMIDLIST);
|
||||||
|
STDMETHOD_(DWORD, GetFolderText) (THIS_ LPCITEMIDLIST, LPSTR, DWORD);
|
||||||
|
STDMETHOD_(DWORD, GetValueText) (THIS_ LPCITEMIDLIST, LPSTR, DWORD);
|
||||||
|
|
||||||
|
/* STDMETHOD_(BOOL32, GetValueType) (THIS_ LPCITEMIDLIST, LPDWORD);*/
|
||||||
|
STDMETHOD_(BOOL32, GetValueType) (THIS_ LPCITEMIDLIST, LPCITEMIDLIST, LPDWORD);
|
||||||
|
|
||||||
|
/* STDMETHOD_(DWORD, GetDataText) (THIS_ LPCITEMIDLIST, LPSTR, DWORD);*/
|
||||||
|
STDMETHOD_(DWORD, GetDataText) (THIS_ LPCITEMIDLIST, LPCITEMIDLIST, LPSTR, DWORD);
|
||||||
|
|
||||||
|
STDMETHOD_(DWORD, GetPidlPath) (THIS_ LPCITEMIDLIST, LPSTR, DWORD);
|
||||||
|
STDMETHOD_(LPITEMIDLIST, Concatenate) (THIS_ LPCITEMIDLIST, LPCITEMIDLIST);
|
||||||
|
STDMETHOD_(LPITEMIDLIST, Create) (THIS_ PIDLTYPE, LPVOID, UINT16);
|
||||||
|
STDMETHOD_(DWORD, GetData) (THIS_ PIDLTYPE, LPCITEMIDLIST, LPVOID, UINT16);
|
||||||
|
STDMETHOD_(LPPIDLDATA, GetDataPointer) (THIS_ LPCITEMIDLIST);
|
||||||
|
STDMETHOD_(BOOL32, SeparatePathAndValue) (THIS_ LPCITEMIDLIST, LPITEMIDLIST*, LPITEMIDLIST*);
|
||||||
|
|
||||||
|
} *LPPIDLMGR_VTABLE,PidlMgr_VTable;
|
||||||
|
|
||||||
|
struct pidlmgr {
|
||||||
|
LPPIDLMGR_VTABLE lpvtbl;
|
||||||
|
};
|
||||||
|
#ifdef __WINE__
|
||||||
|
extern LPPIDLMGR PidlMgr_Constructor();
|
||||||
|
extern void PidlMgr_Destructor(THIS);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef THIS
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* IEnumIDList interface
|
* IEnumIDList interface
|
||||||
*/
|
*/
|
||||||
#define THIS LPENUMIDLIST this
|
#define THIS LPENUMIDLIST this
|
||||||
|
typedef struct tagENUMLIST
|
||||||
|
{ struct tagENUMLIST *pNext;
|
||||||
|
LPITEMIDLIST pidl;
|
||||||
|
} ENUMLIST, *LPENUMLIST;
|
||||||
|
|
||||||
typedef struct IEnumIDList IEnumIDList,*LPENUMIDLIST;
|
typedef struct IEnumIDList IEnumIDList,*LPENUMIDLIST;
|
||||||
typedef struct IEnumIDList_VTable {
|
typedef struct IEnumIDList_VTable {
|
||||||
/* *** IUnknown methods *** */
|
/* *** IUnknown methods *** */
|
||||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||||
|
|
||||||
/* *** IEnumIDList methods *** */
|
/* *** IEnumIDList methods *** */
|
||||||
|
@ -78,12 +147,24 @@ typedef struct IEnumIDList_VTable {
|
||||||
STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
|
STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
|
||||||
STDMETHOD(Reset) (THIS) PURE;
|
STDMETHOD(Reset) (THIS) PURE;
|
||||||
STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
|
STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
|
||||||
|
/* *** private methods *** */
|
||||||
|
STDMETHOD_(BOOL32,CreateEnumList)(THIS_ LPCSTR, DWORD) PURE;
|
||||||
|
STDMETHOD_(BOOL32,AddToEnumList)(THIS_ LPITEMIDLIST) PURE;
|
||||||
|
STDMETHOD_(BOOL32,DeleteList)(THIS) PURE;
|
||||||
|
|
||||||
|
|
||||||
} IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
|
} IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
|
||||||
|
|
||||||
struct IEnumIDList {
|
struct IEnumIDList {
|
||||||
LPENUMIDLIST_VTABLE lpvtbl;
|
LPENUMIDLIST_VTABLE lpvtbl;
|
||||||
DWORD ref;
|
DWORD ref;
|
||||||
|
LPPIDLMGR mpPidlMgr;
|
||||||
|
LPENUMLIST mpFirst;
|
||||||
|
LPENUMLIST mpLast;
|
||||||
|
LPENUMLIST mpCurrent;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef THIS
|
#undef THIS
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* The IShellFolder interface ... the basic interface for a lot of stuff
|
* The IShellFolder interface ... the basic interface for a lot of stuff
|
||||||
|
@ -143,7 +224,8 @@ typedef struct IShellFolder_VTable {
|
||||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||||
|
/* *** IPersist Folder methods *** */
|
||||||
|
STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidl) PURE;
|
||||||
/* *** IShellFolder methods *** */
|
/* *** IShellFolder methods *** */
|
||||||
STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,
|
STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,
|
||||||
LPBC pbcReserved, LPOLESTR32 lpszDisplayName,
|
LPBC pbcReserved, LPOLESTR32 lpszDisplayName,
|
||||||
|
@ -169,7 +251,12 @@ typedef struct IShellFolder_VTable {
|
||||||
|
|
||||||
struct tagSHELLFOLDER {
|
struct tagSHELLFOLDER {
|
||||||
LPSHELLFOLDER_VTABLE lpvtbl;
|
LPSHELLFOLDER_VTABLE lpvtbl;
|
||||||
DWORD ref;
|
DWORD ref;
|
||||||
|
LPSTR mlpszFolder;
|
||||||
|
LPPIDLMGR pPidlMgr;
|
||||||
|
LPITEMIDLIST mpidl;
|
||||||
|
LPITEMIDLIST mpidlNSRoot;
|
||||||
|
LPSHELLFOLDER mpSFParent;
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef THIS
|
#undef THIS
|
||||||
|
@ -240,9 +327,10 @@ struct IShellLink {
|
||||||
#undef THIS
|
#undef THIS
|
||||||
|
|
||||||
#ifdef __WINE__
|
#ifdef __WINE__
|
||||||
extern LPSHELLFOLDER IShellFolder_Constructor();
|
extern LPCLASSFACTORY IClassFactory_Constructor();
|
||||||
|
extern LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER,LPITEMIDLIST);
|
||||||
extern LPSHELLLINK IShellLink_Constructor();
|
extern LPSHELLLINK IShellLink_Constructor();
|
||||||
extern LPENUMIDLIST IEnumIDList_Constructor();
|
extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD,HRESULT*);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*);
|
DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*);
|
||||||
|
@ -324,7 +412,6 @@ LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);
|
||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#undef PURE
|
#undef PURE
|
||||||
#undef FAR
|
#undef FAR
|
||||||
#undef THIS
|
#undef THIS
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
extern void SNOOP_RegisterDLL(HMODULE32,LPCSTR,DWORD);
|
extern void SNOOP_RegisterDLL(HMODULE32,LPCSTR,DWORD);
|
||||||
extern FARPROC32 SNOOP_GetProcAddress32(HMODULE32,LPCSTR,DWORD,FARPROC32);
|
extern FARPROC32 SNOOP_GetProcAddress32(HMODULE32,LPCSTR,DWORD,FARPROC32);
|
||||||
extern void SNOOP16_RegisterDLL(NE_MODULE*,LPCSTR);
|
extern void (*fnSNOOP16_RegisterDLL)(NE_MODULE*,LPCSTR);
|
||||||
extern FARPROC16 SNOOP16_GetProcAddress16(HMODULE16,DWORD,FARPROC16);
|
extern FARPROC16 (*fnSNOOP16_GetProcAddress16)(HMODULE16,DWORD,FARPROC16);
|
||||||
|
extern void SNOOP16_Init();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -123,13 +123,33 @@ typedef struct _TDB
|
||||||
#define USIG_DLL_UNLOAD 0x0080
|
#define USIG_DLL_UNLOAD 0x0080
|
||||||
#define USIG_GPF 0x0666
|
#define USIG_GPF 0x0666
|
||||||
|
|
||||||
|
|
||||||
|
/* THHOOK Kernel Data Structure */
|
||||||
|
typedef struct _THHOOK
|
||||||
|
{
|
||||||
|
HANDLE16 hGlobalHeap; /* 00 (handle BURGERMASTER) */
|
||||||
|
WORD pGlobalHeap; /* 02 (selector BURGERMASTER) */
|
||||||
|
HMODULE16 hExeHead; /* 04 hFirstModule */
|
||||||
|
HMODULE16 hExeSweep; /* 06 (unused) */
|
||||||
|
HANDLE16 TopPDB; /* 08 (handle of KERNEL PDB) */
|
||||||
|
HANDLE16 HeadPDB; /* 0A (first PDB in list) */
|
||||||
|
HANDLE16 TopSizePDB; /* 0C (unused) */
|
||||||
|
HTASK16 HeadTDB; /* 0E hFirstTask */
|
||||||
|
HTASK16 CurTDB; /* 10 hCurrentTask */
|
||||||
|
HTASK16 LoadTDB; /* 12 (unused) */
|
||||||
|
HTASK16 LockTDB; /* 14 hLockedTask */
|
||||||
|
} THHOOK;
|
||||||
|
|
||||||
#pragma pack(4)
|
#pragma pack(4)
|
||||||
|
|
||||||
|
extern THHOOK *pThhook;
|
||||||
|
|
||||||
extern HTASK16 TASK_Create( struct _THDB *thdb, struct _NE_MODULE *pModule,
|
extern HTASK16 TASK_Create( struct _THDB *thdb, struct _NE_MODULE *pModule,
|
||||||
HINSTANCE16 hInstance, HINSTANCE16 hPrevInstance,
|
HINSTANCE16 hInstance, HINSTANCE16 hPrevInstance,
|
||||||
UINT16 cmdShow );
|
UINT16 cmdShow );
|
||||||
extern void TASK_KillCurrentTask( INT16 exitCode );
|
extern void TASK_KillCurrentTask( INT16 exitCode );
|
||||||
extern HTASK16 TASK_GetNextTask( HTASK16 hTask );
|
extern HTASK16 TASK_GetNextTask( HTASK16 hTask );
|
||||||
extern void TASK_Reschedule(void);
|
extern void TASK_Reschedule(void);
|
||||||
|
extern void TASK_InstallTHHook( THHOOK *pNewThook );
|
||||||
|
|
||||||
#endif /* __WINE_TASK_H */
|
#endif /* __WINE_TASK_H */
|
||||||
|
|
|
@ -92,6 +92,9 @@ typedef struct _THDB
|
||||||
/* The following are Wine-specific fields */
|
/* The following are Wine-specific fields */
|
||||||
CONTEXT context; /* 200 Thread context */
|
CONTEXT context; /* 200 Thread context */
|
||||||
WAIT_STRUCT wait_struct; /* Event wait structure */
|
WAIT_STRUCT wait_struct; /* Event wait structure */
|
||||||
|
int socket; /* Socket for server communication */
|
||||||
|
unsigned int seq; /* Server sequence number */
|
||||||
|
void *server_tid; /* Server id for this thread */
|
||||||
} THDB;
|
} THDB;
|
||||||
|
|
||||||
/* Thread queue entry */
|
/* Thread queue entry */
|
||||||
|
|
|
@ -43,12 +43,16 @@ typedef struct tagTOOLBAR_INFO
|
||||||
INT32 nOldHit;
|
INT32 nOldHit;
|
||||||
INT32 nHotItem; /* index of the "hot" item */
|
INT32 nHotItem; /* index of the "hot" item */
|
||||||
|
|
||||||
|
HFONT32 hFont; /* text font */
|
||||||
HIMAGELIST himlDef; /* default image list */
|
HIMAGELIST himlDef; /* default image list */
|
||||||
HIMAGELIST himlHot; /* hot image list */
|
HIMAGELIST himlHot; /* hot image list */
|
||||||
HIMAGELIST himlDis; /* disabled image list */
|
HIMAGELIST himlDis; /* disabled image list */
|
||||||
HWND32 hwndToolTip; /* handle to tool tip control */
|
HWND32 hwndToolTip; /* handle to tool tip control */
|
||||||
HWND32 hwndNotify; /* handle to the window that gets notifications */
|
HWND32 hwndNotify; /* handle to the window that gets notifications */
|
||||||
BOOL32 bTransparent; /* background transparency flag */
|
BOOL32 bTransparent; /* background transparency flag */
|
||||||
|
BOOL32 bAutoSize;
|
||||||
|
|
||||||
|
COLORREF clrInsertMark; /* insert mark color */
|
||||||
|
|
||||||
TBUTTON_INFO *buttons;
|
TBUTTON_INFO *buttons;
|
||||||
CHAR **strings;
|
CHAR **strings;
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
/*
|
||||||
|
* Tool tips class extra info
|
||||||
|
*
|
||||||
|
* Copyright 1998 Eric Kohl
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __WINE_TOOLTIPS_H
|
||||||
|
#define __WINE_TOOLTIPS_H
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct tagTTTOOL_INFO
|
||||||
|
{
|
||||||
|
UINT32 uFlags;
|
||||||
|
HWND32 hwnd;
|
||||||
|
UINT32 uId;
|
||||||
|
RECT32 rect;
|
||||||
|
HINSTANCE32 hinst;
|
||||||
|
LPSTR lpszText;
|
||||||
|
LPARAM lParam;
|
||||||
|
|
||||||
|
} TTTOOL_INFO;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct tagTOOLTIPS_INFO
|
||||||
|
{
|
||||||
|
BOOL32 bActive;
|
||||||
|
UINT32 uNumTools;
|
||||||
|
COLORREF clrBk;
|
||||||
|
COLORREF clrText;
|
||||||
|
HFONT32 hFont;
|
||||||
|
INT32 iMaxTipWidth;
|
||||||
|
INT32 iCurrentTool;
|
||||||
|
|
||||||
|
TTTOOL_INFO *tools;
|
||||||
|
} TOOLTIPS_INFO;
|
||||||
|
|
||||||
|
|
||||||
|
extern void TOOLTIPS_Register (void);
|
||||||
|
|
||||||
|
#endif /* __WINE_TOOLTIPS_H */
|
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
* Trackbar class extra info
|
||||||
|
*
|
||||||
|
* Copyright 1998 Eric Kohl
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __WINE_TRACKBAR_H
|
||||||
|
#define __WINE_TRACKBAR_H
|
||||||
|
|
||||||
|
typedef struct tagTRACKBAR_INFO
|
||||||
|
{
|
||||||
|
INT32 nRangeMin;
|
||||||
|
INT32 nRangeMax;
|
||||||
|
INT32 nLineSize;
|
||||||
|
INT32 nPageSize;
|
||||||
|
INT32 nSelMin;
|
||||||
|
INT32 nSelMax;
|
||||||
|
INT32 nPos;
|
||||||
|
INT32 nThumbLen;
|
||||||
|
|
||||||
|
BOOL32 bFocus;
|
||||||
|
RECT32 rcChannel;
|
||||||
|
} TRACKBAR_INFO;
|
||||||
|
|
||||||
|
|
||||||
|
extern void TRACKBAR_Register (void);
|
||||||
|
|
||||||
|
#endif /* __WINE_TRACKBAR_H */
|
|
@ -0,0 +1,19 @@
|
||||||
|
/*
|
||||||
|
* Treeview class extra info
|
||||||
|
*
|
||||||
|
* Copyright 1998 Eric Kohl
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __WINE_TREEVIEW_H
|
||||||
|
#define __WINE_TREEVIEW_H
|
||||||
|
|
||||||
|
typedef struct tagTREEVIEW_INFO
|
||||||
|
{
|
||||||
|
UINT32 uDummy; /* this is just a dummy to keep the compiler happy */
|
||||||
|
|
||||||
|
} TREEVIEW_INFO;
|
||||||
|
|
||||||
|
|
||||||
|
extern void TREEVIEW_Register (void);
|
||||||
|
|
||||||
|
#endif /* __WINE_TREEVIEW_H */
|
|
@ -20,6 +20,7 @@ extern void TSXrmInitialize(void);
|
||||||
extern char * TSXGetAtomName(Display*, Atom);
|
extern char * TSXGetAtomName(Display*, Atom);
|
||||||
extern char * TSXKeysymToString(KeySym);
|
extern char * TSXKeysymToString(KeySym);
|
||||||
extern Atom TSXInternAtom(Display*, const char*, int);
|
extern Atom TSXInternAtom(Display*, const char*, int);
|
||||||
|
extern Colormap TSXCopyColormapAndFree(Display*, Colormap);
|
||||||
extern Colormap TSXCreateColormap(Display*, Window, Visual*, int);
|
extern Colormap TSXCreateColormap(Display*, Window, Visual*, int);
|
||||||
extern Cursor TSXCreatePixmapCursor(Display*, Pixmap, Pixmap, XColor*, XColor*, unsigned int, unsigned int);
|
extern Cursor TSXCreatePixmapCursor(Display*, Pixmap, Pixmap, XColor*, XColor*, unsigned int, unsigned int);
|
||||||
extern Cursor TSXCreateFontCursor(Display*, unsigned int);
|
extern Cursor TSXCreateFontCursor(Display*, unsigned int);
|
||||||
|
|
|
@ -16,5 +16,6 @@ extern Bool TSXShmQueryExtension(Display *);
|
||||||
extern int TSXShmPixmapFormat(Display *);
|
extern int TSXShmPixmapFormat(Display *);
|
||||||
extern Status TSXShmDetach(Display *, XShmSegmentInfo *);
|
extern Status TSXShmDetach(Display *, XShmSegmentInfo *);
|
||||||
extern Status TSXShmAttach(Display *, XShmSegmentInfo *);
|
extern Status TSXShmAttach(Display *, XShmSegmentInfo *);
|
||||||
|
extern Status TSXShmPutImage(Display *, Drawable, GC, XImage *, int, int, int, int, unsigned int, unsigned int, Bool);
|
||||||
|
|
||||||
#endif /* __WINE_TSXSHM_H */
|
#endif /* __WINE_TSXSHM_H */
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
#define WINE_RELEASE_INFO "Wine release 980628"
|
#define WINE_RELEASE_INFO "Wine release 980712"
|
||||||
|
|
|
@ -1684,6 +1684,35 @@ typedef struct
|
||||||
DECL_WINELIB_TYPE(ABC)
|
DECL_WINELIB_TYPE(ABC)
|
||||||
DECL_WINELIB_TYPE(LPABC)
|
DECL_WINELIB_TYPE(LPABC)
|
||||||
|
|
||||||
|
/* for GetCharacterPlacement () */
|
||||||
|
typedef struct tagGCP_RESULTS32A
|
||||||
|
{
|
||||||
|
DWORD lStructSize;
|
||||||
|
LPSTR lpOutString;
|
||||||
|
UINT32 *lpOrder;
|
||||||
|
INT32 *lpDx;
|
||||||
|
INT32 *lpCaretPos;
|
||||||
|
LPSTR lpClass;
|
||||||
|
UINT32 *lpGlyphs;
|
||||||
|
UINT32 nGlyphs;
|
||||||
|
UINT32 nMaxFit;
|
||||||
|
} GCP_RESULTS32A;
|
||||||
|
|
||||||
|
typedef struct tagGCP_RESULTS32W
|
||||||
|
{
|
||||||
|
DWORD lStructSize;
|
||||||
|
LPWSTR lpOutString;
|
||||||
|
UINT32 *lpOrder;
|
||||||
|
INT32 *lpDx;
|
||||||
|
INT32 *lpCaretPos;
|
||||||
|
LPWSTR lpClass;
|
||||||
|
UINT32 *lpGlyphs;
|
||||||
|
UINT32 nGlyphs;
|
||||||
|
UINT32 nMaxFit;
|
||||||
|
} GCP_RESULTS32W;
|
||||||
|
|
||||||
|
DECL_WINELIB_TYPE_AW(GCP_RESULTS)
|
||||||
|
|
||||||
/* Rasterizer status */
|
/* Rasterizer status */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -3186,6 +3215,36 @@ typedef struct
|
||||||
#define WM_PRINT 0x0317
|
#define WM_PRINT 0x0317
|
||||||
#define WM_PRINTCLIENT 0x0318
|
#define WM_PRINTCLIENT 0x0318
|
||||||
|
|
||||||
|
/* MFC messages [370-37f] */
|
||||||
|
|
||||||
|
#define WM_QUERYAFXWNDPROC 0x0360
|
||||||
|
#define WM_SIZEPARENT 0x0361
|
||||||
|
#define WM_SETMESSAGESTRING 0x0362
|
||||||
|
#define WM_IDLEUPDATECMDUI 0x0363
|
||||||
|
#define WM_INITIALUPDATE 0x0364
|
||||||
|
#define WM_COMMANDHELP 0x0365
|
||||||
|
#define WM_HELPHITTEST 0x0366
|
||||||
|
#define WM_EXITHELPMODE 0x0367
|
||||||
|
#define WM_RECALCPARENT 0x0368
|
||||||
|
#define WM_SIZECHILD 0x0369
|
||||||
|
#define WM_KICKIDLE 0x036A
|
||||||
|
#define WM_QUERYCENTERWND 0x036B
|
||||||
|
#define WM_DISABLEMODAL 0x036C
|
||||||
|
#define WM_FLOATSTATUS 0x036D
|
||||||
|
#define WM_ACTIVATETOPLEVEL 0x036E
|
||||||
|
#define WM_QUERY3DCONTROLS 0x036F
|
||||||
|
#define WM_SOCKET_NOTIFY 0x0373
|
||||||
|
#define WM_SOCKET_DEAD 0x0374
|
||||||
|
#define WM_POPMESSAGESTRING 0x0375
|
||||||
|
#define WM_OCC_LOADFROMSTREAM 0x0376
|
||||||
|
#define WM_OCC_LOADFROMSTORAGE 0x0377
|
||||||
|
#define WM_OCC_INITNEW 0x0378
|
||||||
|
#define WM_OCC_LOADFROMSTREAM_EX 0x037A
|
||||||
|
#define WM_OCC_LOADFROMSTORAGE_EX 0x037B
|
||||||
|
#define WM_QUEUE_SENTINEL 0x0379
|
||||||
|
|
||||||
|
/* end of MFC messages */
|
||||||
|
|
||||||
#define WM_COALESCE_FIRST 0x0390
|
#define WM_COALESCE_FIRST 0x0390
|
||||||
#define WM_COALESCE_LAST 0x039F
|
#define WM_COALESCE_LAST 0x039F
|
||||||
|
|
||||||
|
@ -5876,6 +5935,33 @@ typedef struct {
|
||||||
DECL_WINELIB_TYPE_AW(NETRESOURCE)
|
DECL_WINELIB_TYPE_AW(NETRESOURCE)
|
||||||
DECL_WINELIB_TYPE_AW(LPNETRESOURCE)
|
DECL_WINELIB_TYPE_AW(LPNETRESOURCE)
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
DWORD cbStructure; /* size of this structure in bytes */
|
||||||
|
HWND32 hwndOwner; /* owner window for the dialog */
|
||||||
|
LPNETRESOURCE32A lpConnRes;/* Requested Resource info */
|
||||||
|
DWORD dwFlags; /* flags (see below) */
|
||||||
|
DWORD dwDevNum; /* number of devices connected to */
|
||||||
|
} CONNECTDLGSTRUCT32A, *LPCONNECTDLGSTRUCT32A;
|
||||||
|
typedef struct {
|
||||||
|
DWORD cbStructure; /* size of this structure in bytes */
|
||||||
|
HWND32 hwndOwner; /* owner window for the dialog */
|
||||||
|
LPNETRESOURCE32W lpConnRes;/* Requested Resource info */
|
||||||
|
DWORD dwFlags; /* flags (see below) */
|
||||||
|
DWORD dwDevNum; /* number of devices connected to */
|
||||||
|
} CONNECTDLGSTRUCT32W, *LPCONNECTDLGSTRUCT32W;
|
||||||
|
|
||||||
|
DECL_WINELIB_TYPE_AW(CONNECTDLGSTRUCT)
|
||||||
|
DECL_WINELIB_TYPE_AW(LPCONNECTDLGSTRUCT)
|
||||||
|
|
||||||
|
/**/
|
||||||
|
#define CONNDLG_RO_PATH 0x00000001 /* Resource path should be read-only */
|
||||||
|
#define CONNDLG_CONN_POINT 0x00000002 /* Netware -style movable connection point enabled */
|
||||||
|
#define CONNDLG_USE_MRU 0x00000004 /* Use MRU combobox */
|
||||||
|
#define CONNDLG_HIDE_BOX 0x00000008 /* Hide persistent connect checkbox */
|
||||||
|
#define CONNDLG_PERSIST 0x00000010 /* Force persistent connection */
|
||||||
|
#define CONNDLG_NOT_PERSIST 0x00000020 /* Force connection NOT persistent */
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DWORD cbStructure;
|
DWORD cbStructure;
|
||||||
DWORD dwFlags;
|
DWORD dwFlags;
|
||||||
|
@ -6159,7 +6245,7 @@ INT16 WINAPI ExcludeVisRect(HDC16,INT16,INT16,INT16,INT16);
|
||||||
HANDLE16 WINAPI FarGetOwner(HGLOBAL16);
|
HANDLE16 WINAPI FarGetOwner(HGLOBAL16);
|
||||||
VOID WINAPI FarSetOwner(HGLOBAL16,HANDLE16);
|
VOID WINAPI FarSetOwner(HGLOBAL16,HANDLE16);
|
||||||
BOOL16 WINAPI FastWindowFrame(HDC16,const RECT16*,INT16,INT16,DWORD);
|
BOOL16 WINAPI FastWindowFrame(HDC16,const RECT16*,INT16,INT16,DWORD);
|
||||||
VOID WINAPI FileCDR(FARPROC16);
|
FARPROC16 WINAPI FileCDR(FARPROC16);
|
||||||
VOID WINAPI FillWindow(HWND16,HWND16,HDC16,HBRUSH16);
|
VOID WINAPI FillWindow(HWND16,HWND16,HDC16,HBRUSH16);
|
||||||
INT16 WINAPI FlushComm(INT16,INT16);
|
INT16 WINAPI FlushComm(INT16,INT16);
|
||||||
WORD WINAPI FreeSelector(WORD);
|
WORD WINAPI FreeSelector(WORD);
|
||||||
|
@ -6449,8 +6535,8 @@ BOOL32 WINAPI GetNumberOfConsoleMouseButtons(LPDWORD);
|
||||||
DWORD WINAPI GetObjectType(HANDLE32);
|
DWORD WINAPI GetObjectType(HANDLE32);
|
||||||
UINT32 WINAPI GetOEMCP(void);
|
UINT32 WINAPI GetOEMCP(void);
|
||||||
DWORD WINAPI GetPriorityClass(HANDLE32);
|
DWORD WINAPI GetPriorityClass(HANDLE32);
|
||||||
INT32 WINAPI GetPrivateProfileSection32A(LPCSTR,LPSTR,INT32,LPCSTR);
|
INT32 WINAPI GetPrivateProfileSection32A(LPCSTR,LPSTR,UINT32,LPCSTR);
|
||||||
INT32 WINAPI GetPrivateProfileSection32W(LPCWSTR,LPWSTR,INT32,LPCWSTR);
|
INT32 WINAPI GetPrivateProfileSection32W(LPCWSTR,LPWSTR,UINT32,LPCWSTR);
|
||||||
#define GetPrivateProfileSection WINELIB_NAME_AW(GetPrivateProfileSection)
|
#define GetPrivateProfileSection WINELIB_NAME_AW(GetPrivateProfileSection)
|
||||||
HANDLE32 WINAPI GetProcessHeap(void);
|
HANDLE32 WINAPI GetProcessHeap(void);
|
||||||
DWORD WINAPI GetRegionData(HRGN32,DWORD,LPRGNDATA);
|
DWORD WINAPI GetRegionData(HRGN32,DWORD,LPRGNDATA);
|
||||||
|
@ -6647,6 +6733,7 @@ BOOL32 WINAPI SetTimeZoneInformation(const LPTIME_ZONE_INFORMATION);
|
||||||
BOOL32 WINAPI SetWindowContextHelpId(HWND32,DWORD);
|
BOOL32 WINAPI SetWindowContextHelpId(HWND32,DWORD);
|
||||||
BOOL32 WINAPI SetWorldTransform(HDC32,const XFORM*);
|
BOOL32 WINAPI SetWorldTransform(HDC32,const XFORM*);
|
||||||
VOID WINAPI Sleep(DWORD);
|
VOID WINAPI Sleep(DWORD);
|
||||||
|
DWORD WINAPI SleepEx(DWORD,BOOL32);
|
||||||
BOOL32 WINAPI StartService32A(HANDLE32,DWORD,LPCSTR*);
|
BOOL32 WINAPI StartService32A(HANDLE32,DWORD,LPCSTR*);
|
||||||
BOOL32 WINAPI StartService32W(HANDLE32,DWORD,LPCWSTR*);
|
BOOL32 WINAPI StartService32W(HANDLE32,DWORD,LPCWSTR*);
|
||||||
#define StartService WINELIB_NAME_AW(StartService)
|
#define StartService WINELIB_NAME_AW(StartService)
|
||||||
|
@ -6682,6 +6769,13 @@ UINT32 WINAPI WNetAddConnection2_32W(LPNETRESOURCE32W,LPCWSTR,LPCWSTR,DWORD
|
||||||
UINT32 WINAPI WNetAddConnection3_32A(HWND32,LPNETRESOURCE32A,LPCSTR,LPCSTR,DWORD);
|
UINT32 WINAPI WNetAddConnection3_32A(HWND32,LPNETRESOURCE32A,LPCSTR,LPCSTR,DWORD);
|
||||||
UINT32 WINAPI WNetAddConnection3_32W(HWND32,LPNETRESOURCE32W,LPCWSTR,LPCWSTR,DWORD);
|
UINT32 WINAPI WNetAddConnection3_32W(HWND32,LPNETRESOURCE32W,LPCWSTR,LPCWSTR,DWORD);
|
||||||
#define WNetAddConnection3 WINELIB_NAME_AW(WNetAddConnection3_)
|
#define WNetAddConnection3 WINELIB_NAME_AW(WNetAddConnection3_)
|
||||||
|
UINT32 WINAPI WNetConnectionDialog1_32(HWND32,DWORD);
|
||||||
|
UINT32 WINAPI WNetConnectionDialog1_32A(LPCONNECTDLGSTRUCT32A);
|
||||||
|
UINT32 WINAPI WNetConnectionDialog1_32W(LPCONNECTDLGSTRUCT32W);
|
||||||
|
#define WNetConnectionDialog1 WINELIB_NAME_AW(WNetConnectionDialog1_)
|
||||||
|
UINT32 WINAPI MultinetGetErrorText32A(DWORD,DWORD,DWORD);
|
||||||
|
UINT32 WINAPI MultinetGetErrorText32W(DWORD,DWORD,DWORD);
|
||||||
|
#define MultinetGetErrorText WINELIB_NAME_AW(MultinetGetErrorText_)
|
||||||
SEGPTR WINAPI WOWGlobalAllocLock16(DWORD,DWORD,HGLOBAL16*);
|
SEGPTR WINAPI WOWGlobalAllocLock16(DWORD,DWORD,HGLOBAL16*);
|
||||||
DWORD WINAPI WOWCallback16(FARPROC16,DWORD);
|
DWORD WINAPI WOWCallback16(FARPROC16,DWORD);
|
||||||
BOOL32 WINAPI WOWCallback16Ex(FARPROC16,DWORD,DWORD,LPVOID,LPDWORD);
|
BOOL32 WINAPI WOWCallback16Ex(FARPROC16,DWORD,DWORD,LPVOID,LPDWORD);
|
||||||
|
@ -7704,9 +7798,9 @@ UINT16 WINAPI GetPrivateProfileInt16(LPCSTR,LPCSTR,INT16,LPCSTR);
|
||||||
UINT32 WINAPI GetPrivateProfileInt32A(LPCSTR,LPCSTR,INT32,LPCSTR);
|
UINT32 WINAPI GetPrivateProfileInt32A(LPCSTR,LPCSTR,INT32,LPCSTR);
|
||||||
UINT32 WINAPI GetPrivateProfileInt32W(LPCWSTR,LPCWSTR,INT32,LPCWSTR);
|
UINT32 WINAPI GetPrivateProfileInt32W(LPCWSTR,LPCWSTR,INT32,LPCWSTR);
|
||||||
#define GetPrivateProfileInt WINELIB_NAME_AW(GetPrivateProfileInt)
|
#define GetPrivateProfileInt WINELIB_NAME_AW(GetPrivateProfileInt)
|
||||||
INT16 WINAPI GetPrivateProfileString16(LPCSTR,LPCSTR,LPCSTR,LPSTR,INT16,LPCSTR);
|
INT16 WINAPI GetPrivateProfileString16(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT16,LPCSTR);
|
||||||
INT32 WINAPI GetPrivateProfileString32A(LPCSTR,LPCSTR,LPCSTR,LPSTR,INT32,LPCSTR);
|
INT32 WINAPI GetPrivateProfileString32A(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT32,LPCSTR);
|
||||||
INT32 WINAPI GetPrivateProfileString32W(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,INT32,LPCWSTR);
|
INT32 WINAPI GetPrivateProfileString32W(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT32,LPCWSTR);
|
||||||
#define GetPrivateProfileString WINELIB_NAME_AW(GetPrivateProfileString)
|
#define GetPrivateProfileString WINELIB_NAME_AW(GetPrivateProfileString)
|
||||||
FARPROC16 WINAPI GetProcAddress16(HMODULE16,SEGPTR);
|
FARPROC16 WINAPI GetProcAddress16(HMODULE16,SEGPTR);
|
||||||
FARPROC32 WINAPI GetProcAddress32(HMODULE32,LPCSTR);
|
FARPROC32 WINAPI GetProcAddress32(HMODULE32,LPCSTR);
|
||||||
|
@ -7715,9 +7809,9 @@ UINT16 WINAPI GetProfileInt16(LPCSTR,LPCSTR,INT16);
|
||||||
UINT32 WINAPI GetProfileInt32A(LPCSTR,LPCSTR,INT32);
|
UINT32 WINAPI GetProfileInt32A(LPCSTR,LPCSTR,INT32);
|
||||||
UINT32 WINAPI GetProfileInt32W(LPCWSTR,LPCWSTR,INT32);
|
UINT32 WINAPI GetProfileInt32W(LPCWSTR,LPCWSTR,INT32);
|
||||||
#define GetProfileInt WINELIB_NAME_AW(GetProfileInt)
|
#define GetProfileInt WINELIB_NAME_AW(GetProfileInt)
|
||||||
INT16 WINAPI GetProfileString16(LPCSTR,LPCSTR,LPCSTR,LPSTR,INT16);
|
INT16 WINAPI GetProfileString16(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT16);
|
||||||
INT32 WINAPI GetProfileString32A(LPCSTR,LPCSTR,LPCSTR,LPSTR,INT32);
|
INT32 WINAPI GetProfileString32A(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT32);
|
||||||
INT32 WINAPI GetProfileString32W(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,INT32);
|
INT32 WINAPI GetProfileString32W(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT32);
|
||||||
#define GetProfileString WINELIB_NAME_AW(GetProfileString)
|
#define GetProfileString WINELIB_NAME_AW(GetProfileString)
|
||||||
HANDLE16 WINAPI GetProp16(HWND16,LPCSTR);
|
HANDLE16 WINAPI GetProp16(HWND16,LPCSTR);
|
||||||
HANDLE32 WINAPI GetProp32A(HWND32,LPCSTR);
|
HANDLE32 WINAPI GetProp32A(HWND32,LPCSTR);
|
||||||
|
@ -8253,6 +8347,12 @@ BOOL32 WINAPI OemToChar32W(LPCSTR,LPWSTR);
|
||||||
BOOL32 WINAPI OemToCharBuff32A(LPCSTR,LPSTR,DWORD);
|
BOOL32 WINAPI OemToCharBuff32A(LPCSTR,LPSTR,DWORD);
|
||||||
BOOL32 WINAPI OemToCharBuff32W(LPCSTR,LPWSTR,DWORD);
|
BOOL32 WINAPI OemToCharBuff32W(LPCSTR,LPWSTR,DWORD);
|
||||||
#define OemToCharBuff WINELIB_NAME_AW(OemToCharBuff)
|
#define OemToCharBuff WINELIB_NAME_AW(OemToCharBuff)
|
||||||
|
INT16 WINAPI WideCharToLocal16(LPSTR,LPWSTR,INT16);
|
||||||
|
INT32 WINAPI WideCharToLocal32(LPSTR,LPWSTR,INT32);
|
||||||
|
#define WideCharToLocal WINELIB_NAME(WideCharToLocal)
|
||||||
|
INT16 WINAPI LocalToWideChar16(LPWSTR,LPSTR,INT16);
|
||||||
|
INT32 WINAPI LocalToWideChar32(LPWSTR,LPSTR,INT32);
|
||||||
|
#define LocalToWideChar WINELIB_NAME(LocalToWideChar)
|
||||||
INT16 WINAPI OffsetClipRgn16(HDC16,INT16,INT16);
|
INT16 WINAPI OffsetClipRgn16(HDC16,INT16,INT16);
|
||||||
INT32 WINAPI OffsetClipRgn32(HDC32,INT32,INT32);
|
INT32 WINAPI OffsetClipRgn32(HDC32,INT32,INT32);
|
||||||
#define OffsetClipRgn WINELIB_NAME(OffsetClipRgn)
|
#define OffsetClipRgn WINELIB_NAME(OffsetClipRgn)
|
||||||
|
|
|
@ -97,14 +97,13 @@ extern int WIN32_LastError;
|
||||||
#define CO_E_INIT_SCM_EXEC_FAILURE 0x80004011
|
#define CO_E_INIT_SCM_EXEC_FAILURE 0x80004011
|
||||||
#define CO_E_INIT_ONLY_SINGLE_THREADED 0x80004012 */
|
#define CO_E_INIT_ONLY_SINGLE_THREADED 0x80004012 */
|
||||||
|
|
||||||
|
#define OLE_E_ENUM_NOMORE 0x80040002
|
||||||
#define OLE_E_ENUM_NOMORE 0x80040002
|
#define CLASS_E_NOAGGREGATION 0x80040110
|
||||||
#define CLASS_E_CLASSNOTAVAILABLE 0x80040111
|
#define CLASS_E_CLASSNOTAVAILABLE 0x80040111
|
||||||
|
#define E_ACCESSDENIED 0x80070005
|
||||||
#define E_ACCESSDENIED 0x80070005
|
#define E_HANDLE 0x80070006
|
||||||
#define E_HANDLE 0x80070006
|
#define E_OUTOFMEMORY 0x8007000E
|
||||||
#define E_OUTOFMEMORY 0x8007000E
|
#define E_INVALIDARG 0x80070057
|
||||||
#define E_INVALIDARG 0x80070057
|
|
||||||
|
|
||||||
//#define OLE_E_FIRST 0x80040000L
|
//#define OLE_E_FIRST 0x80040000L
|
||||||
//#define OLE_E_LAST 0x800400FFL
|
//#define OLE_E_LAST 0x800400FFL
|
||||||
|
|
|
@ -93,6 +93,7 @@ extern COLORREF X11DRV_SetPixel( struct tagDC *dc, INT32 x, INT32 y,
|
||||||
extern COLORREF X11DRV_GetPixel( struct tagDC *dc, INT32 x, INT32 y);
|
extern COLORREF X11DRV_GetPixel( struct tagDC *dc, INT32 x, INT32 y);
|
||||||
extern BOOL32 X11DRV_PaintRgn( struct tagDC *dc, HRGN32 hrgn );
|
extern BOOL32 X11DRV_PaintRgn( struct tagDC *dc, HRGN32 hrgn );
|
||||||
extern BOOL32 X11DRV_Polyline( struct tagDC *dc,const LPPOINT32 pt,INT32 count);
|
extern BOOL32 X11DRV_Polyline( struct tagDC *dc,const LPPOINT32 pt,INT32 count);
|
||||||
|
extern BOOL32 X11DRV_PolyBezier( struct tagDC *dc,const POINT32 start, const LPPOINT32 lppt,DWORD cPoints);
|
||||||
extern BOOL32 X11DRV_Polygon( struct tagDC *dc, LPPOINT32 pt, INT32 count );
|
extern BOOL32 X11DRV_Polygon( struct tagDC *dc, LPPOINT32 pt, INT32 count );
|
||||||
extern BOOL32 X11DRV_PolyPolygon( struct tagDC *dc, LPPOINT32 pt,
|
extern BOOL32 X11DRV_PolyPolygon( struct tagDC *dc, LPPOINT32 pt,
|
||||||
LPINT32 counts, UINT32 polygons);
|
LPINT32 counts, UINT32 polygons);
|
||||||
|
|
|
@ -76,7 +76,6 @@ typedef struct tagFontInfo
|
||||||
UINT16 lfd_width;
|
UINT16 lfd_width;
|
||||||
UINT16 lfd_decipoints;
|
UINT16 lfd_decipoints;
|
||||||
UINT16 lfd_resolution;
|
UINT16 lfd_resolution;
|
||||||
|
|
||||||
IFONTINFO16 df;
|
IFONTINFO16 df;
|
||||||
} fontInfo;
|
} fontInfo;
|
||||||
|
|
||||||
|
@ -97,6 +96,15 @@ typedef struct tagFontResource
|
||||||
CHAR lfFaceName[LF_FACESIZE];
|
CHAR lfFaceName[LF_FACESIZE];
|
||||||
} fontResource;
|
} fontResource;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
float a,b,c,d; /* pixelsize matrix */
|
||||||
|
unsigned long RAW_ASCENT;
|
||||||
|
unsigned long RAW_DESCENT;
|
||||||
|
float pixelsize;
|
||||||
|
float ascent;
|
||||||
|
float descent;
|
||||||
|
} XFONTTRANS;
|
||||||
|
|
||||||
#define FO_RESOURCE_MASK 0x000F
|
#define FO_RESOURCE_MASK 0x000F
|
||||||
#define FO_SYSTEM 0x0001 /* resident in cache */
|
#define FO_SYSTEM 0x0001 /* resident in cache */
|
||||||
#define FO_SOFTFONT 0x0002 /* installed at runtime */
|
#define FO_SOFTFONT 0x0002 /* installed at runtime */
|
||||||
|
@ -127,8 +135,10 @@ typedef struct
|
||||||
LPMAT2* lpXForm; /* optional transformation matrix */
|
LPMAT2* lpXForm; /* optional transformation matrix */
|
||||||
Pixmap* lpPixmap; /* optional character bitmasks for synth fonts */
|
Pixmap* lpPixmap; /* optional character bitmasks for synth fonts */
|
||||||
|
|
||||||
|
XFONTTRANS *lpX11Trans; /* Info for X11R6 transform */
|
||||||
INT16 foInternalLeading;
|
INT16 foInternalLeading;
|
||||||
INT16 foAvgCharWidth;
|
INT16 foAvgCharWidth;
|
||||||
|
INT16 foMaxCharWidth;
|
||||||
UINT16 fo_flags;
|
UINT16 fo_flags;
|
||||||
|
|
||||||
/* font cache housekeeping */
|
/* font cache housekeeping */
|
||||||
|
@ -176,4 +186,3 @@ extern XFontStruct* XFONT_GetFontStruct( X_PHYSFONT pFont );
|
||||||
extern LPIFONTINFO16 XFONT_GetFontInfo( X_PHYSFONT pFont );
|
extern LPIFONTINFO16 XFONT_GetFontInfo( X_PHYSFONT pFont );
|
||||||
|
|
||||||
#endif __WINE_X11FONT_H
|
#endif __WINE_X11FONT_H
|
||||||
|
|
||||||
|
|
|
@ -220,16 +220,14 @@ HMODULE32 MODULE_FindModule32(
|
||||||
LPSTR dotptr;
|
LPSTR dotptr;
|
||||||
WINE_MODREF *wm;
|
WINE_MODREF *wm;
|
||||||
|
|
||||||
|
if (!process)
|
||||||
|
return 0;
|
||||||
if (!(filename = strrchr( path, '\\' )))
|
if (!(filename = strrchr( path, '\\' )))
|
||||||
filename = HEAP_strdupA(process->heap,0,path);
|
filename = HEAP_strdupA(process->heap,0,path);
|
||||||
else
|
else
|
||||||
filename = HEAP_strdupA(process->heap,0,filename+1);
|
filename = HEAP_strdupA(process->heap,0,filename+1);
|
||||||
dotptr=strrchr(filename,'.');
|
dotptr=strrchr(filename,'.');
|
||||||
|
|
||||||
if (!process) {
|
|
||||||
HeapFree(process->heap,0,filename);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
for (wm=process->modref_list;wm;wm=wm->next) {
|
for (wm=process->modref_list;wm;wm=wm->next) {
|
||||||
LPSTR xmodname,xdotptr;
|
LPSTR xmodname,xdotptr;
|
||||||
|
|
||||||
|
@ -251,6 +249,33 @@ HMODULE32 MODULE_FindModule32(
|
||||||
/* FIXME: add paths, shortname */
|
/* FIXME: add paths, shortname */
|
||||||
HeapFree(process->heap,0,xmodname);
|
HeapFree(process->heap,0,xmodname);
|
||||||
}
|
}
|
||||||
|
/* if that fails, try looking for the filename... */
|
||||||
|
for (wm=process->modref_list;wm;wm=wm->next) {
|
||||||
|
LPSTR xlname,xdotptr;
|
||||||
|
|
||||||
|
assert (wm->longname);
|
||||||
|
xlname = strrchr(wm->longname,'/');
|
||||||
|
if (!xlname)
|
||||||
|
xlname = wm->longname;
|
||||||
|
else
|
||||||
|
xlname++;
|
||||||
|
xlname = HEAP_strdupA(process->heap,0,xlname);
|
||||||
|
xdotptr=strrchr(xlname,'.');
|
||||||
|
if ( (xdotptr && !dotptr) ||
|
||||||
|
(!xdotptr && dotptr)
|
||||||
|
) {
|
||||||
|
if (dotptr) *dotptr = '\0';
|
||||||
|
if (xdotptr) *xdotptr = '\0';
|
||||||
|
}
|
||||||
|
if (!strcasecmp( filename, xlname)) {
|
||||||
|
HeapFree(process->heap,0,filename);
|
||||||
|
HeapFree(process->heap,0,xlname);
|
||||||
|
return wm->module;
|
||||||
|
}
|
||||||
|
if (dotptr) *dotptr='.';
|
||||||
|
/* FIXME: add paths, shortname */
|
||||||
|
HeapFree(process->heap,0,xlname);
|
||||||
|
}
|
||||||
HeapFree(process->heap,0,filename);
|
HeapFree(process->heap,0,filename);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,11 @@
|
||||||
#include "snoop.h"
|
#include "snoop.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
static HMODULE16 hFirstModule = 0;
|
FARPROC16 (*fnSNOOP16_GetProcAddress16)(HMODULE16,DWORD,FARPROC16) = NULL;
|
||||||
|
void (*fnSNOOP16_RegisterDLL)(NE_MODULE*,LPCSTR) = NULL;
|
||||||
|
|
||||||
|
#define hFirstModule (pThhook->hExeHead)
|
||||||
|
|
||||||
static NE_MODULE *pCachedModule = 0; /* Module cached by NE_OpenFile */
|
static NE_MODULE *pCachedModule = 0; /* Module cached by NE_OpenFile */
|
||||||
|
|
||||||
static HMODULE16 NE_LoadBuiltin(LPCSTR name,BOOL32 force) { return 0; }
|
static HMODULE16 NE_LoadBuiltin(LPCSTR name,BOOL32 force) { return 0; }
|
||||||
|
@ -330,8 +334,10 @@ FARPROC16 NE_GetEntryPoint( HMODULE16 hModule, WORD ordinal )
|
||||||
else sel = (WORD)(DWORD)NE_SEG_TABLE(pModule)[sel-1].selector;
|
else sel = (WORD)(DWORD)NE_SEG_TABLE(pModule)[sel-1].selector;
|
||||||
if (sel==0xffff)
|
if (sel==0xffff)
|
||||||
return (FARPROC16)PTR_SEG_OFF_TO_SEGPTR( sel, offset );
|
return (FARPROC16)PTR_SEG_OFF_TO_SEGPTR( sel, offset );
|
||||||
|
if (!fnSNOOP16_GetProcAddress16)
|
||||||
|
return (FARPROC16)PTR_SEG_OFF_TO_SEGPTR( sel, offset );
|
||||||
else
|
else
|
||||||
return (FARPROC16)SNOOP16_GetProcAddress16(hModule,ordinal,(FARPROC16)PTR_SEG_OFF_TO_SEGPTR( sel, offset ));
|
return (FARPROC16)fnSNOOP16_GetProcAddress16(hModule,ordinal,(FARPROC16)PTR_SEG_OFF_TO_SEGPTR( sel, offset ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -654,7 +660,8 @@ static HMODULE16 NE_LoadExeHeader( HFILE16 hFile, OFSTRUCT *ofs )
|
||||||
else pModule->dlls_to_init = 0;
|
else pModule->dlls_to_init = 0;
|
||||||
|
|
||||||
NE_RegisterModule( pModule );
|
NE_RegisterModule( pModule );
|
||||||
SNOOP16_RegisterDLL(pModule,ofs->szPathName);
|
if (fnSNOOP16_RegisterDLL)
|
||||||
|
fnSNOOP16_RegisterDLL(pModule,ofs->szPathName);
|
||||||
return hModule;
|
return hModule;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,8 +105,12 @@ BOOL32 NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
|
||||||
stack16Top->bp = 0;
|
stack16Top->bp = 0;
|
||||||
stack16Top->ip = 0;
|
stack16Top->ip = 0;
|
||||||
stack16Top->cs = 0;
|
stack16Top->cs = 0;
|
||||||
|
TRACE(dll,"CallLoadAppSegProc(hmodule=0x%04x,hf=0x%04x,segnum=%d\n",
|
||||||
|
pModule->self,hf,segnum
|
||||||
|
);
|
||||||
newselector = Callbacks->CallLoadAppSegProc(selfloadheader->LoadAppSeg,
|
newselector = Callbacks->CallLoadAppSegProc(selfloadheader->LoadAppSeg,
|
||||||
pModule->self, hf, segnum );
|
pModule->self, hf, segnum );
|
||||||
|
TRACE(dll,"Ret CallLoadAppSegProc: selector = 0x%04x\n",newselector);
|
||||||
_lclose32( hf );
|
_lclose32( hf );
|
||||||
if (newselector != oldselector) {
|
if (newselector != oldselector) {
|
||||||
/* Self loaders like creating their own selectors;
|
/* Self loaders like creating their own selectors;
|
||||||
|
@ -410,7 +414,9 @@ BOOL32 NE_LoadAllSegments( NE_MODULE *pModule )
|
||||||
stack16Top->cs = 0;
|
stack16Top->cs = 0;
|
||||||
|
|
||||||
hf = FILE_DupUnixHandle( NE_OpenFile( pModule ) );
|
hf = FILE_DupUnixHandle( NE_OpenFile( pModule ) );
|
||||||
|
TRACE(dll,"CallBootAppProc(hModule=0x%04x,hf=0x%04x)\n",pModule->self,hf);
|
||||||
Callbacks->CallBootAppProc(selfloadheader->BootApp, pModule->self, hf);
|
Callbacks->CallBootAppProc(selfloadheader->BootApp, pModule->self, hf);
|
||||||
|
TRACE(dll,"Return from CallBootAppProc\n");
|
||||||
_lclose32(hf);
|
_lclose32(hf);
|
||||||
/* some BootApp procs overwrite the selector of dgroup */
|
/* some BootApp procs overwrite the selector of dgroup */
|
||||||
pSegTable[pModule->dgroup - 1].selector = saved_dgroup;
|
pSegTable[pModule->dgroup - 1].selector = saved_dgroup;
|
||||||
|
|
|
@ -217,7 +217,6 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm)
|
||||||
IMAGE_IMPORT_DESCRIPTOR *pe_imp;
|
IMAGE_IMPORT_DESCRIPTOR *pe_imp;
|
||||||
WINE_MODREF *xwm;
|
WINE_MODREF *xwm;
|
||||||
PE_MODREF *pem;
|
PE_MODREF *pem;
|
||||||
int fixup_failed = 0;
|
|
||||||
unsigned int load_addr = wm->module;
|
unsigned int load_addr = wm->module;
|
||||||
int i;
|
int i;
|
||||||
char *modname;
|
char *modname;
|
||||||
|
@ -247,13 +246,15 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm)
|
||||||
|
|
||||||
/* FIXME: should terminate on 0 Characteristics */
|
/* FIXME: should terminate on 0 Characteristics */
|
||||||
for (i = 0, pe_imp = pem->pe_import; pe_imp->Name; pe_imp++) {
|
for (i = 0, pe_imp = pem->pe_import; pe_imp->Name; pe_imp++) {
|
||||||
HMODULE32 res;
|
HMODULE32 hImpModule;
|
||||||
WINE_MODREF **ywm;
|
WINE_MODREF **ywm;
|
||||||
char *name = (char *) RVA(pe_imp->Name);
|
IMAGE_IMPORT_BY_NAME *pe_name;
|
||||||
|
LPIMAGE_THUNK_DATA import_list,thunk_list;
|
||||||
|
char *name = (char *) RVA(pe_imp->Name);
|
||||||
|
|
||||||
/* don't use MODULE_Load, Win32 creates new task differently */
|
/* don't use MODULE_Load, Win32 creates new task differently */
|
||||||
res = PE_LoadLibraryEx32A( name, process, 0, 0 );
|
hImpModule = PE_LoadLibraryEx32A( name, process, 0, 0 );
|
||||||
if (res <= (HMODULE32) 32) {
|
if (!hImpModule) {
|
||||||
char *p,buffer[2000];
|
char *p,buffer[2000];
|
||||||
|
|
||||||
/* GetModuleFileName would use the wrong process, so don't use it */
|
/* GetModuleFileName would use the wrong process, so don't use it */
|
||||||
|
@ -261,15 +262,15 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm)
|
||||||
if (!(p = strrchr (buffer, '\\')))
|
if (!(p = strrchr (buffer, '\\')))
|
||||||
p = buffer;
|
p = buffer;
|
||||||
strcpy (p + 1, name);
|
strcpy (p + 1, name);
|
||||||
res = PE_LoadLibraryEx32A( buffer, process, 0, 0 );
|
hImpModule = PE_LoadLibraryEx32A( buffer, process, 0, 0 );
|
||||||
}
|
}
|
||||||
if (res <= (HMODULE32) 32) {
|
if (!hImpModule) {
|
||||||
ERR (module, "Module %s not found\n", name);
|
ERR (module, "Module %s not found\n", name);
|
||||||
return res;
|
return 1;
|
||||||
}
|
}
|
||||||
xwm = wm->next;
|
xwm = wm->next;
|
||||||
while (xwm) {
|
while (xwm) {
|
||||||
if (xwm->module == res)
|
if (xwm->module == hImpModule)
|
||||||
break;
|
break;
|
||||||
xwm = xwm->next;
|
xwm = xwm->next;
|
||||||
}
|
}
|
||||||
|
@ -296,18 +297,6 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm)
|
||||||
|
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
|
||||||
pe_imp = pem->pe_import;
|
|
||||||
while (pe_imp->Name) {
|
|
||||||
char *Module;
|
|
||||||
IMAGE_IMPORT_BY_NAME *pe_name;
|
|
||||||
LPIMAGE_THUNK_DATA import_list,thunk_list;
|
|
||||||
HMODULE32 hImpModule;
|
|
||||||
|
|
||||||
Module = (char *) RVA(pe_imp->Name);
|
|
||||||
hImpModule = MODULE_FindModule32(process,Module);
|
|
||||||
assert(hImpModule); /* we have imported it, so it MUST be there */
|
|
||||||
TRACE(win32, "%s\n", Module);
|
|
||||||
|
|
||||||
/* FIXME: forwarder entries ... */
|
/* FIXME: forwarder entries ... */
|
||||||
|
|
||||||
|
@ -320,25 +309,23 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm)
|
||||||
if (IMAGE_SNAP_BY_ORDINAL(import_list->u1.Ordinal)) {
|
if (IMAGE_SNAP_BY_ORDINAL(import_list->u1.Ordinal)) {
|
||||||
int ordinal = IMAGE_ORDINAL(import_list->u1.Ordinal);
|
int ordinal = IMAGE_ORDINAL(import_list->u1.Ordinal);
|
||||||
|
|
||||||
TRACE(win32, "--- Ordinal %s,%d\n", Module, ordinal);
|
TRACE(win32, "--- Ordinal %s,%d\n", name, ordinal);
|
||||||
thunk_list->u1.Function=(LPDWORD)MODULE_GetProcAddress32(
|
thunk_list->u1.Function=(LPDWORD)MODULE_GetProcAddress32(
|
||||||
process, hImpModule, (LPCSTR)ordinal
|
process, hImpModule, (LPCSTR)ordinal
|
||||||
);
|
);
|
||||||
if (!thunk_list->u1.Function) {
|
if (!thunk_list->u1.Function) {
|
||||||
WARN(win32,"No implementation for %s.%d, setting to NULL\n",
|
ERR(win32,"No implementation for %s.%d, setting to NULL\n",
|
||||||
Module, ordinal);
|
name, ordinal);
|
||||||
/* fixup_failed=1; */
|
|
||||||
}
|
}
|
||||||
} else { /* import by name */
|
} else { /* import by name */
|
||||||
pe_name = (LPIMAGE_IMPORT_BY_NAME)RVA(import_list->u1.AddressOfData);
|
pe_name = (LPIMAGE_IMPORT_BY_NAME)RVA(import_list->u1.AddressOfData);
|
||||||
TRACE(win32, "--- %s %s.%d\n", pe_name->Name, Module, pe_name->Hint);
|
TRACE(win32, "--- %s %s.%d\n", pe_name->Name, name, pe_name->Hint);
|
||||||
thunk_list->u1.Function=(LPDWORD)MODULE_GetProcAddress32(
|
thunk_list->u1.Function=(LPDWORD)MODULE_GetProcAddress32(
|
||||||
process, hImpModule, pe_name->Name
|
process, hImpModule, pe_name->Name
|
||||||
);
|
);
|
||||||
if (!thunk_list->u1.Function) {
|
if (!thunk_list->u1.Function) {
|
||||||
WARN(win32,"No implementation for %s.%d(%s), setting to NULL\n",
|
ERR(win32,"No implementation for %s.%d(%s), setting to NULL\n",
|
||||||
Module,pe_name->Hint,pe_name->Name);
|
name,pe_name->Hint,pe_name->Name);
|
||||||
/* fixup_failed=1; */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
import_list++;
|
import_list++;
|
||||||
|
@ -352,34 +339,30 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm)
|
||||||
/* not sure about this branch, but it seems to work */
|
/* not sure about this branch, but it seems to work */
|
||||||
int ordinal = IMAGE_ORDINAL(thunk_list->u1.Ordinal);
|
int ordinal = IMAGE_ORDINAL(thunk_list->u1.Ordinal);
|
||||||
|
|
||||||
TRACE(win32,"--- Ordinal %s.%d\n",Module,ordinal);
|
TRACE(win32,"--- Ordinal %s.%d\n",name,ordinal);
|
||||||
thunk_list->u1.Function=(LPDWORD)MODULE_GetProcAddress32(
|
thunk_list->u1.Function=(LPDWORD)MODULE_GetProcAddress32(
|
||||||
process, hImpModule, (LPCSTR) ordinal
|
process, hImpModule, (LPCSTR) ordinal
|
||||||
);
|
);
|
||||||
if (!thunk_list->u1.Function) {
|
if (!thunk_list->u1.Function) {
|
||||||
WARN(win32, "No implementation for %s.%d, setting to NULL\n",
|
ERR(win32, "No implementation for %s.%d, setting to NULL\n",
|
||||||
Module,ordinal);
|
name,ordinal);
|
||||||
/* fixup_failed=1; */
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pe_name=(LPIMAGE_IMPORT_BY_NAME) RVA(thunk_list->u1.AddressOfData);
|
pe_name=(LPIMAGE_IMPORT_BY_NAME) RVA(thunk_list->u1.AddressOfData);
|
||||||
TRACE(win32,"--- %s %s.%d\n",
|
TRACE(win32,"--- %s %s.%d\n",
|
||||||
pe_name->Name,Module,pe_name->Hint);
|
pe_name->Name,name,pe_name->Hint);
|
||||||
thunk_list->u1.Function=(LPDWORD)MODULE_GetProcAddress32(
|
thunk_list->u1.Function=(LPDWORD)MODULE_GetProcAddress32(
|
||||||
process, hImpModule, pe_name->Name
|
process, hImpModule, pe_name->Name
|
||||||
);
|
);
|
||||||
if (!thunk_list->u1.Function) {
|
if (!thunk_list->u1.Function) {
|
||||||
WARN(win32, "No implementation for %s.%d, setting to NULL\n",
|
ERR(win32, "No implementation for %s.%d, setting to NULL\n",
|
||||||
Module, pe_name->Hint);
|
name, pe_name->Hint);
|
||||||
/* fixup_failed=1; */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
thunk_list++;
|
thunk_list++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pe_imp++;
|
|
||||||
}
|
}
|
||||||
if (fixup_failed) return 22;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "dde_proc.h"
|
#include "dde_proc.h"
|
||||||
|
#include "server.h"
|
||||||
|
|
||||||
/* Min. number of thunks allocated when creating a new segment */
|
/* Min. number of thunks allocated when creating a new segment */
|
||||||
#define MIN_THUNKS 32
|
#define MIN_THUNKS 32
|
||||||
|
@ -39,14 +40,30 @@
|
||||||
/* Pointer to function to switch to a larger stack */
|
/* Pointer to function to switch to a larger stack */
|
||||||
int (*IF1632_CallLargeStack)( int (*func)(), void *arg ) = NULL;
|
int (*IF1632_CallLargeStack)( int (*func)(), void *arg ) = NULL;
|
||||||
|
|
||||||
static HTASK16 hFirstTask = 0;
|
|
||||||
static HTASK16 hCurrentTask = 0;
|
static THHOOK DefaultThhook = { 0 };
|
||||||
|
THHOOK *pThhook = &DefaultThhook;
|
||||||
|
|
||||||
|
#define hCurrentTask (pThhook->CurTDB)
|
||||||
|
#define hFirstTask (pThhook->HeadTDB)
|
||||||
|
#define hLockedTask (pThhook->LockTDB)
|
||||||
|
|
||||||
static HTASK16 hTaskToKill = 0;
|
static HTASK16 hTaskToKill = 0;
|
||||||
static HTASK16 hLockedTask = 0;
|
|
||||||
static UINT16 nTaskCount = 0;
|
static UINT16 nTaskCount = 0;
|
||||||
|
|
||||||
static void TASK_YieldToSystem(TDB*);
|
static void TASK_YieldToSystem(TDB*);
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* TASK_InstallTHHook
|
||||||
|
*/
|
||||||
|
void TASK_InstallTHHook( THHOOK *pNewThhook )
|
||||||
|
{
|
||||||
|
THHOOK *pOldThhook = pThhook;
|
||||||
|
|
||||||
|
pThhook = pNewThhook? pNewThhook : &DefaultThhook;
|
||||||
|
|
||||||
|
*pThhook = *pOldThhook;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* TASK_GetNextTask
|
* TASK_GetNextTask
|
||||||
|
@ -209,6 +226,7 @@ static void TASK_CallToStart(void)
|
||||||
SEGTABLEENTRY *pSegTable = NE_SEG_TABLE( pModule );
|
SEGTABLEENTRY *pSegTable = NE_SEG_TABLE( pModule );
|
||||||
|
|
||||||
SET_CUR_THREAD( pTask->thdb );
|
SET_CUR_THREAD( pTask->thdb );
|
||||||
|
CLIENT_InitThread();
|
||||||
/* Terminate the stack frame */
|
/* Terminate the stack frame */
|
||||||
THREAD_STACK16(pTask->thdb)->frame32 = NULL;
|
THREAD_STACK16(pTask->thdb)->frame32 = NULL;
|
||||||
if (pModule->flags & NE_FFLAGS_WIN32)
|
if (pModule->flags & NE_FFLAGS_WIN32)
|
||||||
|
|
|
@ -144,6 +144,11 @@ static WORD ATOM_Hash(
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* ATOM_AddAtom
|
* ATOM_AddAtom
|
||||||
*
|
*
|
||||||
|
* Windows DWORD aligns the atom entry size.
|
||||||
|
* The remaining unused string space created by the alignment
|
||||||
|
* gets padded with '\0's in a certain way to ensure
|
||||||
|
* that at least one trailing '\0' remains.
|
||||||
|
*
|
||||||
* RETURNS
|
* RETURNS
|
||||||
* Atom: Success
|
* Atom: Success
|
||||||
* 0: Failure
|
* 0: Failure
|
||||||
|
@ -156,7 +161,7 @@ static ATOM ATOM_AddAtom(
|
||||||
HANDLE16 entry;
|
HANDLE16 entry;
|
||||||
ATOMENTRY * entryPtr;
|
ATOMENTRY * entryPtr;
|
||||||
ATOMTABLE * table;
|
ATOMTABLE * table;
|
||||||
int len;
|
int len, ae_len;
|
||||||
|
|
||||||
if (str[0] == '#') return atoi( &str[1] ); /* Check for integer atom */
|
if (str[0] == '#') return atoi( &str[1] ); /* Check for integer atom */
|
||||||
if ((len = strlen( str )) > MAX_ATOM_LEN) len = MAX_ATOM_LEN;
|
if ((len = strlen( str )) > MAX_ATOM_LEN) len = MAX_ATOM_LEN;
|
||||||
|
@ -175,7 +180,8 @@ static ATOM ATOM_AddAtom(
|
||||||
entry = entryPtr->next;
|
entry = entryPtr->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
entry = LOCAL_Alloc( selector, LMEM_FIXED, sizeof(ATOMENTRY)+len-1 );
|
ae_len = (sizeof(ATOMENTRY)+len+3) & ~3;
|
||||||
|
entry = LOCAL_Alloc( selector, LMEM_FIXED, ae_len);
|
||||||
if (!entry) return 0;
|
if (!entry) return 0;
|
||||||
/* Reload the table ptr in case it moved in linear memory */
|
/* Reload the table ptr in case it moved in linear memory */
|
||||||
table = ATOM_GetTable( selector, FALSE );
|
table = ATOM_GetTable( selector, FALSE );
|
||||||
|
@ -183,7 +189,7 @@ static ATOM ATOM_AddAtom(
|
||||||
entryPtr->next = table->entries[hash];
|
entryPtr->next = table->entries[hash];
|
||||||
entryPtr->refCount = 1;
|
entryPtr->refCount = 1;
|
||||||
entryPtr->length = len;
|
entryPtr->length = len;
|
||||||
memcpy( entryPtr->str, str, len );
|
strncpy( entryPtr->str, str, ae_len - sizeof(ATOMENTRY) + 1); /* always use strncpy ('\0's padding) */
|
||||||
table->entries[hash] = entry;
|
table->entries[hash] = entry;
|
||||||
return HANDLETOATOM( entry );
|
return HANDLETOATOM( entry );
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,10 +189,7 @@ INT16 WINAPI lstrcmpi16( LPCSTR str1, LPCSTR str2 )
|
||||||
* lstrcmpi32A (KERNEL32.605)
|
* lstrcmpi32A (KERNEL32.605)
|
||||||
*/
|
*/
|
||||||
INT32 WINAPI lstrcmpi32A( LPCSTR str1, LPCSTR str2 )
|
INT32 WINAPI lstrcmpi32A( LPCSTR str1, LPCSTR str2 )
|
||||||
{
|
{ TRACE(string,"strcmpi %s and %s\n",
|
||||||
INT32 res;
|
|
||||||
|
|
||||||
TRACE(string,"strcmpi %s and %s\n",
|
|
||||||
debugstr_a (str1), debugstr_a (str2));
|
debugstr_a (str1), debugstr_a (str2));
|
||||||
return CompareString32A(LOCALE_SYSTEM_DEFAULT,NORM_IGNORECASE,str1,-1,str2,-1)-2;
|
return CompareString32A(LOCALE_SYSTEM_DEFAULT,NORM_IGNORECASE,str1,-1,str2,-1)-2;
|
||||||
}
|
}
|
||||||
|
@ -616,3 +613,37 @@ BOOL32 WINAPI OemToChar32W( LPCSTR s, LPWSTR d )
|
||||||
while ((*d++ = (WCHAR)OEM_TO_ANSI(*s++)));
|
while ((*d++ = (WCHAR)OEM_TO_ANSI(*s++)));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* WideCharToLocal (Not a Windows API)
|
||||||
|
* similar lstrcpyWtoA, should handle codepages properly
|
||||||
|
*
|
||||||
|
* RETURNS
|
||||||
|
* strlen of the destination string
|
||||||
|
*/
|
||||||
|
|
||||||
|
INT32 WINAPI WideCharToLocal32(
|
||||||
|
LPSTR pLocal,
|
||||||
|
LPWSTR pWide,
|
||||||
|
INT32 dwChars)
|
||||||
|
{ *pLocal = 0;
|
||||||
|
TRACE(string,"(%p, %s, %li)\n", pLocal, debugstr_w(pWide),dwChars);
|
||||||
|
WideCharToMultiByte(CP_ACP,0,pWide,-1,pLocal,dwChars,NULL,NULL);
|
||||||
|
return strlen(pLocal);
|
||||||
|
}
|
||||||
|
/***********************************************************************
|
||||||
|
* LocalToWideChar (Not a Windows API)
|
||||||
|
* similar lstrcpyAtoW, should handle codepages properly
|
||||||
|
*
|
||||||
|
* RETURNS
|
||||||
|
* strlen of the destination string
|
||||||
|
*/
|
||||||
|
INT32 WINAPI LocalToWideChar32(
|
||||||
|
LPWSTR pWide,
|
||||||
|
LPSTR pLocal,
|
||||||
|
INT32 dwChars)
|
||||||
|
{ *pWide = 0;
|
||||||
|
TRACE(string,"(%p, %s, %li)\n",pWide, pLocal, dwChars);
|
||||||
|
MultiByteToWideChar(CP_ACP,0,pLocal,-1,pWide,dwChars);
|
||||||
|
return lstrlen32W(pWide);
|
||||||
|
}
|
||||||
|
|
32
misc/comm.c
32
misc/comm.c
|
@ -14,6 +14,24 @@
|
||||||
*
|
*
|
||||||
* August 12, 1997. Take a bash at SetCommEventMask - Lawson Whitney
|
* August 12, 1997. Take a bash at SetCommEventMask - Lawson Whitney
|
||||||
* <lawson_whitney@juno.com>
|
* <lawson_whitney@juno.com>
|
||||||
|
* July 6, 1998. Fixes and comments by Valentijn Sessink
|
||||||
|
* <vsessink@ic.uva.nl> [V]
|
||||||
|
* I only quick-fixed an error for the output buffers. The thing is this: if a
|
||||||
|
* WinApp starts using serial ports, it calls OpenComm, asking it to open two
|
||||||
|
* buffers, cbInQueue and cbOutQueue size, to hold data to/from the serial
|
||||||
|
* ports. Wine OpenComm only returns "OK". Now the kernel buffer size for
|
||||||
|
* serial communication is only 4096 bytes large. Error: (App asks for
|
||||||
|
* a 104,000 bytes size buffer, Wine returns "OK", App asks "How many char's
|
||||||
|
* are in the buffer", Wine returns "4000" and App thinks "OK, another
|
||||||
|
* 100,000 chars left, good!")
|
||||||
|
* The solution below is a bad but working quickfix for the transmit buffer:
|
||||||
|
* the cbInQueue is saved in a variable; when the program asks how many chars
|
||||||
|
* there are in the buffer, GetCommError returns # in buffer PLUS
|
||||||
|
* the additional (cbOutQeueu - 4096), which leaves the application thinking
|
||||||
|
* "wow, almost full".
|
||||||
|
* Sorry for the rather chatty explanation - but I think comm.c needs to be
|
||||||
|
* redefined with real working buffers make it work; maybe these comments are
|
||||||
|
* of help.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -56,6 +74,14 @@
|
||||||
*/
|
*/
|
||||||
int commerror = 0, eventmask = 0;
|
int commerror = 0, eventmask = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* [V] If above globals are wrong, the one below will be wrong as well. It
|
||||||
|
* should probably be in the DosDeviceStruct on per port basis too.
|
||||||
|
*/
|
||||||
|
int iGlobalOutQueueFiller;
|
||||||
|
|
||||||
|
#define SERIAL_XMIT_SIZE 4096
|
||||||
|
|
||||||
struct DosDeviceStruct COM[MAX_PORTS];
|
struct DosDeviceStruct COM[MAX_PORTS];
|
||||||
struct DosDeviceStruct LPT[MAX_PORTS];
|
struct DosDeviceStruct LPT[MAX_PORTS];
|
||||||
LPCVOID *unknown[MAX_PORTS];
|
LPCVOID *unknown[MAX_PORTS];
|
||||||
|
@ -439,6 +465,10 @@ INT16 WINAPI OpenComm(LPCSTR device,UINT16 cbInQueue,UINT16 cbOutQueue)
|
||||||
ERR(comm, "BUG ! COM0 doesn't exist !\n");
|
ERR(comm, "BUG ! COM0 doesn't exist !\n");
|
||||||
commerror = IE_BADID;
|
commerror = IE_BADID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* to help GetCommError return left buffsize [V] */
|
||||||
|
iGlobalOutQueueFiller = (cbOutQueue - SERIAL_XMIT_SIZE);
|
||||||
|
if (iGlobalOutQueueFiller < 0) iGlobalOutQueueFiller = 0;
|
||||||
|
|
||||||
TRACE(comm, "%s = %s\n", device, COM[port].devicename);
|
TRACE(comm, "%s = %s\n", device, COM[port].devicename);
|
||||||
|
|
||||||
|
@ -780,7 +810,7 @@ INT16 WINAPI GetCommError(INT16 fd,LPCOMSTAT lpStat)
|
||||||
|
|
||||||
rc = ioctl(fd, TIOCOUTQ, &cnt);
|
rc = ioctl(fd, TIOCOUTQ, &cnt);
|
||||||
if (rc) WARN(comm, "Error !\n");
|
if (rc) WARN(comm, "Error !\n");
|
||||||
lpStat->cbOutQue = cnt;
|
lpStat->cbOutQue = cnt + iGlobalOutQueueFiller;
|
||||||
|
|
||||||
rc = ioctl(fd, TIOCINQ, &cnt);
|
rc = ioctl(fd, TIOCINQ, &cnt);
|
||||||
if (rc) WARN(comm, "Error !\n");
|
if (rc) WARN(comm, "Error !\n");
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
* ILD_TRANSPARENT error in ImageList_DrawIndirect).
|
* ILD_TRANSPARENT error in ImageList_DrawIndirect).
|
||||||
* - Fix drag functions.
|
* - Fix drag functions.
|
||||||
* - Fix ImageList_Read and ImageList_Write.
|
* - Fix ImageList_Read and ImageList_Write.
|
||||||
* - Add ImageList_SetFilter (undocumented).
|
* - Fix ImageList_SetFilter (undocumented).
|
||||||
* BTW does anybody know anything about this function???
|
* BTW does anybody know anything about this function???
|
||||||
* - It removes 12 Bytes from the stack (3 Parameters).
|
* - It removes 12 Bytes from the stack (3 Parameters).
|
||||||
* - First parameter SHOULD be a HIMAGELIST.
|
* - First parameter SHOULD be a HIMAGELIST.
|
||||||
|
@ -31,10 +31,7 @@
|
||||||
*/
|
*/
|
||||||
#define __WINE_IMAGELIST_C
|
#define __WINE_IMAGELIST_C
|
||||||
|
|
||||||
/* This must be defined until "GetIconInfo" is implemented completely.
|
/* This must be defined until "GetIconInfo" is not fully implemented. */
|
||||||
* To do that the cursor and icon code in objects/cursoricon.c must
|
|
||||||
* be rewritten.
|
|
||||||
*/
|
|
||||||
#define __GET_ICON_INFO_HACK__
|
#define __GET_ICON_INFO_HACK__
|
||||||
|
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
|
@ -1446,21 +1443,23 @@ ImageList_LoadImage32A (HINSTANCE32 hi, LPCSTR lpbmp, INT32 cx, INT32 cGrow,
|
||||||
ptr->bBitsPerPixel,
|
ptr->bBitsPerPixel,
|
||||||
(char *)(ptr + 1) + ptr->nHeight *
|
(char *)(ptr + 1) + ptr->nHeight *
|
||||||
BITMAP_WIDTH_BYTES(ptr->nWidth, 1));
|
BITMAP_WIDTH_BYTES(ptr->nWidth, 1));
|
||||||
|
GlobalUnlock16 (handle);
|
||||||
himl = ImageList_Create (ptr->nWidth, ptr->nHeight,
|
himl = ImageList_Create (ptr->nWidth, ptr->nHeight,
|
||||||
ILC_MASK | ILC_COLOR, 1, cGrow);
|
ILC_MASK | ILC_COLOR, 1, cGrow);
|
||||||
ImageList_Add (himl, hbmImage, hbmMask);
|
ImageList_Add (himl, hbmImage, hbmMask);
|
||||||
DeleteObject32 (hbmImage);
|
DeleteObject32 (hbmImage);
|
||||||
DeleteObject32 (hbmMask);
|
DeleteObject32 (hbmMask);
|
||||||
GlobalUnlock16 (handle);
|
|
||||||
#else
|
#else
|
||||||
ICONINFO32 ii;
|
ICONINFO32 ii;
|
||||||
BITMAP32 bmp;
|
BITMAP32 bmp;
|
||||||
|
|
||||||
GetIconInfo (hIcon, &ii);
|
GetIconInfo (hIcon, &ii);
|
||||||
GetObject32A (ii->hbmMask, sizeof(BITMAP32), (LPVOID)&bmp);
|
GetObject32A (ii->hbmColor, sizeof(BITMAP32), (LPVOID)&bmp);
|
||||||
himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight,
|
himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight,
|
||||||
ILC_MASK | ILC_COLOR, 1, cGrow);
|
ILC_MASK | ILC_COLOR, 1, cGrow);
|
||||||
ImageList_Add (himl, ii->hbmColor, ii->hbmMask);
|
ImageList_Add (himl, ii->hbmColor, ii->hbmMask);
|
||||||
|
DeleteObject32 (ii->hbmColor);
|
||||||
|
DeleteObject32 (ii->hbmMask);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1543,6 +1542,8 @@ ImageList_LoadImage32W (HINSTANCE32 hi, LPCWSTR lpbmp, INT32 cx, INT32 cGrow,
|
||||||
himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight,
|
himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight,
|
||||||
ILC_MASK | ILC_COLOR, 1, cGrow);
|
ILC_MASK | ILC_COLOR, 1, cGrow);
|
||||||
ImageList_Add (himl, ii->hbmColor, ii->hbmMask);
|
ImageList_Add (himl, ii->hbmColor, ii->hbmMask);
|
||||||
|
DeleteObject32 (ii->hbmColor);
|
||||||
|
DeleteObject32 (ii->hbmMask);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1915,6 +1916,8 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT32 i, HICON32 hIcon)
|
||||||
BITMAP32 bmp;
|
BITMAP32 bmp;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
TRACE (imagelist, "(0x%x 0x%x 0x%x)\n", himl, i, hIcon);
|
||||||
|
|
||||||
if (himl == NULL) return (-1);
|
if (himl == NULL) return (-1);
|
||||||
if ((i >= himl->cCurImage) || (i < -1)) return (-1);
|
if ((i >= himl->cCurImage) || (i < -1)) return (-1);
|
||||||
|
|
||||||
|
@ -1922,10 +1925,14 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT32 i, HICON32 hIcon)
|
||||||
if (!(ptr = (CURSORICONINFO *)GlobalLock16(hIcon))) return (-1);
|
if (!(ptr = (CURSORICONINFO *)GlobalLock16(hIcon))) return (-1);
|
||||||
hbmMask = CreateBitmap32 (ptr->nWidth, ptr->nHeight, 1, 1,
|
hbmMask = CreateBitmap32 (ptr->nWidth, ptr->nHeight, 1, 1,
|
||||||
(char *)(ptr + 1));
|
(char *)(ptr + 1));
|
||||||
|
if (!(hbmMask))
|
||||||
|
ERR (imagelist, " no mask!\n");
|
||||||
hbmImage = CreateBitmap32 (ptr->nWidth, ptr->nHeight, ptr->bPlanes,
|
hbmImage = CreateBitmap32 (ptr->nWidth, ptr->nHeight, ptr->bPlanes,
|
||||||
ptr->bBitsPerPixel,
|
ptr->bBitsPerPixel,
|
||||||
(char *)(ptr + 1) + ptr->nHeight *
|
(char *)(ptr + 1) + ptr->nHeight *
|
||||||
BITMAP_WIDTH_BYTES(ptr->nWidth, 1));
|
BITMAP_WIDTH_BYTES(ptr->nWidth, 1));
|
||||||
|
if (!(hbmMask))
|
||||||
|
ERR (imagelist, " no image!\n");
|
||||||
#else
|
#else
|
||||||
GetIconInfo (hIcon, &ii);
|
GetIconInfo (hIcon, &ii);
|
||||||
GetObject32A (ii->hbmMask, sizeof(BITMAP32), (LPVOID)&bmp);
|
GetObject32A (ii->hbmMask, sizeof(BITMAP32), (LPVOID)&bmp);
|
||||||
|
@ -1970,10 +1977,13 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT32 i, HICON32 hIcon)
|
||||||
|
|
||||||
DeleteDC32 (hdcImageList);
|
DeleteDC32 (hdcImageList);
|
||||||
DeleteDC32 (hdcImage);
|
DeleteDC32 (hdcImage);
|
||||||
#ifdef __GET_ICON_INFO_HACK
|
#ifdef __GET_ICON_INFO_HACK__
|
||||||
DeleteObject32 (hbmImage);
|
DeleteObject32 (hbmImage);
|
||||||
DeleteObject32 (hbmMask);
|
DeleteObject32 (hbmMask);
|
||||||
GlobalUnlock16 (hIcon);
|
GlobalUnlock16 (hIcon);
|
||||||
|
#else
|
||||||
|
DeleteObject32 (ii->hbmColor);
|
||||||
|
DeleteObject32 (ii->hbmMask);
|
||||||
#endif
|
#endif
|
||||||
return (nIndex);
|
return (nIndex);
|
||||||
}
|
}
|
||||||
|
@ -2071,15 +2081,14 @@ ImageList_SetDragCursorImage (HIMAGELIST himlDrag, INT32 iDrag,
|
||||||
* empty stub.
|
* empty stub.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0
|
|
||||||
BOOL32 WINAPI
|
BOOL32 WINAPI
|
||||||
ImageList_SetFilter (HIMAGELIST himl, INT32 i, DWORD dwFilter)
|
ImageList_SetFilter (HIMAGELIST himl, INT32 i, DWORD dwFilter)
|
||||||
{
|
{
|
||||||
FIXME (imagelist, "empty stub!\n");
|
FIXME (imagelist, "(%p 0x%08x 0x%08x):empty stub!\n",
|
||||||
|
himl, i, dwFilter);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif /* 0 */
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
|
|
|
@ -1149,7 +1149,7 @@ BOOL32 WINAPI SystemParametersInfo32W( UINT32 uAction, UINT32 uParam,
|
||||||
|
|
||||||
case SPI_GETHIGHCONTRAST:
|
case SPI_GETHIGHCONTRAST:
|
||||||
{
|
{
|
||||||
LPHIGHCONTRASTA lpHighContrastW = (LPHIGHCONTRASTW)lpvParam;
|
LPHIGHCONTRASTW lpHighContrastW = (LPHIGHCONTRASTW)lpvParam;
|
||||||
|
|
||||||
FIXME(system,"SPI_GETHIGHCONTRAST not fully implemented\n");
|
FIXME(system,"SPI_GETHIGHCONTRAST not fully implemented\n");
|
||||||
|
|
||||||
|
@ -1178,7 +1178,8 @@ BOOL32 WINAPI SystemParametersInfo32W( UINT32 uAction, UINT32 uParam,
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* FileCDR (KERNEL.130)
|
* FileCDR (KERNEL.130)
|
||||||
*/
|
*/
|
||||||
void WINAPI FileCDR(FARPROC16 x)
|
FARPROC16 WINAPI FileCDR(FARPROC16 x)
|
||||||
{
|
{
|
||||||
FIXME(file,"(%8x): stub\n", (int) x);
|
FIXME(file,"(%8x): stub\n", (int) x);
|
||||||
|
return (FARPROC16)TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "wnet.h"
|
#include "wnet.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
#include "heap.h"
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
* WNetAddConnection16 [USER.517] Directs a local device to net
|
* WNetAddConnection16 [USER.517] Directs a local device to net
|
||||||
|
@ -27,7 +28,9 @@ UINT16 WINAPI WNetAddConnection16(LPCSTR lpNetPath, LPCSTR lpPassWord,
|
||||||
return WNetAddConnection32A(lpNetPath, lpPassWord, lpLocalName);
|
return WNetAddConnection32A(lpNetPath, lpPassWord, lpLocalName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* [MPR.50] */
|
/*********************************************************************
|
||||||
|
* WNetAddConnection32 [MPR.50]
|
||||||
|
*/
|
||||||
|
|
||||||
UINT32 WINAPI WNetAddConnection32A(LPCSTR NetPath, LPCSTR PassWord,
|
UINT32 WINAPI WNetAddConnection32A(LPCSTR NetPath, LPCSTR PassWord,
|
||||||
LPCSTR LocalName)
|
LPCSTR LocalName)
|
||||||
|
@ -44,6 +47,7 @@ UINT32 WINAPI WNetAddConnection32W(LPCWSTR NetPath,
|
||||||
LPCWSTR LocalName)
|
LPCWSTR LocalName)
|
||||||
{
|
{
|
||||||
FIXME(wnet, " stub!\n");
|
FIXME(wnet, " stub!\n");
|
||||||
|
SetLastError(WN_NO_NETWORK);
|
||||||
return WN_NO_NETWORK;
|
return WN_NO_NETWORK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +112,32 @@ UINT32 WINAPI WNetAddConnection3_32W(HWND32 owner,
|
||||||
flags);
|
flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*******************************************************************
|
||||||
|
* WNetConnectionDialog1_32A [MPR.59]
|
||||||
|
*/
|
||||||
|
UINT32 WNetConnectionDialog1_32A (LPCONNECTDLGSTRUCT32A lpConnDlgStruct)
|
||||||
|
{ FIXME(wnet,"%p stub\n", lpConnDlgStruct);
|
||||||
|
SetLastError(WN_NO_NETWORK);
|
||||||
|
return ERROR_NO_NETWORK;
|
||||||
|
}
|
||||||
|
/*******************************************************************
|
||||||
|
* WNetConnectionDialog1_32W [MPR.60]
|
||||||
|
*/
|
||||||
|
UINT32 WNetConnectionDialog1_32W (LPCONNECTDLGSTRUCT32W lpConnDlgStruct)
|
||||||
|
{ FIXME(wnet,"%p stub\n", lpConnDlgStruct);
|
||||||
|
SetLastError(WN_NO_NETWORK);
|
||||||
|
return ERROR_NO_NETWORK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*******************************************************************
|
||||||
|
* WNetConnectionDialog1_32 [MPR.61]
|
||||||
|
*/
|
||||||
|
UINT32 WNetConnectionDialog1_32(HWND32 owner, DWORD flags )
|
||||||
|
{ FIXME(wnet,"owner = 0x%x, flags=0x%lx stub\n", owner,flags);
|
||||||
|
SetLastError(WN_NO_NETWORK);
|
||||||
|
return ERROR_NO_NETWORK;
|
||||||
|
|
||||||
|
}
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
* WNetCancelConnection [USER.518] undirects a local device
|
* WNetCancelConnection [USER.518] undirects a local device
|
||||||
*/
|
*/
|
||||||
|
@ -285,15 +314,15 @@ WNetGetConnection32A(LPCSTR localname,LPSTR remotename,LPDWORD buflen)
|
||||||
* WNetGetConnectionW [MPR.72]
|
* WNetGetConnectionW [MPR.72]
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI
|
DWORD WINAPI
|
||||||
WNetGetConnection32W(LPCWSTR localnameW,LPSTR remotenameW,LPDWORD buflen)
|
WNetGetConnection32W(LPCWSTR localnameW,LPWSTR remotenameW,LPDWORD buflen)
|
||||||
{
|
{
|
||||||
UINT16 x;
|
UINT16 x;
|
||||||
CHAR buf[200];
|
CHAR buf[200];
|
||||||
LPSTR lnA = HEAP_strdupWtoA(GetProcessHeap(),0,localnameW);
|
LPSTR lnA = HEAP_strdupWtoA(GetProcessHeap(),0,localnameW);
|
||||||
DWORD ret = WNetGetConnection16(lnA,buf,&x);
|
DWORD ret = WNetGetConnection16(lnA,buf,&x);
|
||||||
|
|
||||||
*buflen = x; /* FIXME: *2 ? */
|
|
||||||
lstrcpyAtoW(remotenameW,buf);
|
lstrcpyAtoW(remotenameW,buf);
|
||||||
|
*buflen=lstrlen32W(remotenameW);
|
||||||
HeapFree(GetProcessHeap(),0,lnA);
|
HeapFree(GetProcessHeap(),0,lnA);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -572,6 +601,7 @@ UINT32 WINAPI WNetOpenEnum32A(DWORD dwScope, DWORD dwType, DWORD dwUsage,
|
||||||
{
|
{
|
||||||
FIXME(wnet, "(%08lX, %08lX, %08lX, %p, %p): stub\n",
|
FIXME(wnet, "(%08lX, %08lX, %08lX, %p, %p): stub\n",
|
||||||
dwScope, dwType, dwUsage, lpNet, lphEnum);
|
dwScope, dwType, dwUsage, lpNet, lphEnum);
|
||||||
|
SetLastError(WN_NO_NETWORK);
|
||||||
return WN_NO_NETWORK;
|
return WN_NO_NETWORK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -584,6 +614,7 @@ WNetGetResourceInformation32A(
|
||||||
LPNETRESOURCE32A netres,LPVOID buf,LPDWORD buflen,LPSTR systemstr
|
LPNETRESOURCE32A netres,LPVOID buf,LPDWORD buflen,LPSTR systemstr
|
||||||
) {
|
) {
|
||||||
FIXME(wnet,"(%p,%p,%p,%p): stub!\n",netres,buf,buflen,systemstr);
|
FIXME(wnet,"(%p,%p,%p,%p): stub!\n",netres,buf,buflen,systemstr);
|
||||||
|
SetLastError(WN_NO_NETWORK);
|
||||||
return WN_NO_NETWORK;
|
return WN_NO_NETWORK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -667,4 +698,19 @@ DWORD WINAPI _MPR_25(DWORD x, DWORD y)
|
||||||
FIXME(mpr,"(%lx,%lx): stub\n",x,y);
|
FIXME(mpr,"(%lx,%lx): stub\n",x,y);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
/*****************************************************************
|
||||||
|
* MultinetGetErrorTextA [MPR.28]
|
||||||
|
*/
|
||||||
|
|
||||||
|
UINT32 WINAPI MultinetGetErrorText32A (DWORD x, DWORD y, DWORD z)
|
||||||
|
{ FIXME(mpr,"(%lx,%lx,%lx): stub\n",x,y,z);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/*****************************************************************
|
||||||
|
* MultinetGetErrorTextW [MPR.29]
|
||||||
|
*/
|
||||||
|
|
||||||
|
UINT32 WINAPI MultinetGetErrorText32W (DWORD x, DWORD y, DWORD z)
|
||||||
|
{ FIXME(mpr,"(%lx,%lx,%lx): stub\n",x,y,z);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -712,3 +712,9 @@ DWORD WINAPI NtQueryInformationProcess(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD
|
||||||
);
|
);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DWORD WINAPI RtlFormatCurrentUserKeyPath()
|
||||||
|
{
|
||||||
|
FIXME(ntdll,"(): stub\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
* Implementation of some printer driver bits
|
* Implementation of some printer driver bits
|
||||||
*
|
*
|
||||||
* Copyright 1996 John Harvey
|
* Copyright 1996 John Harvey
|
||||||
|
* Copyright 1998 Andreas Mohr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -12,9 +13,7 @@
|
||||||
#include "winerror.h"
|
#include "winerror.h"
|
||||||
#include "winreg.h"
|
#include "winreg.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
#include "print.h"
|
||||||
#define INT_PD_DEFAULT_DEVMODE 1
|
|
||||||
#define INT_PD_DEFAULT_MODEL 2
|
|
||||||
|
|
||||||
static char PrinterModel[] = "Printer Model";
|
static char PrinterModel[] = "Printer Model";
|
||||||
static char DefaultDevMode[] = "Default DevMode";
|
static char DefaultDevMode[] = "Default DevMode";
|
||||||
|
@ -31,7 +30,8 @@ INT16 WINAPI StartDoc16( HDC16 hdc, const DOCINFO16 *lpdoc )
|
||||||
TRACE(print, "%d %s %s\n",lpdoc->cbSize,
|
TRACE(print, "%d %s %s\n",lpdoc->cbSize,
|
||||||
(LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName),
|
(LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName),
|
||||||
(LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszOutput));
|
(LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszOutput));
|
||||||
retVal = Escape16(hdc, STARTDOC, sizeof(DOCINFO16), lpdoc->lpszDocName, 0);
|
retVal = Escape16(hdc, STARTDOC,
|
||||||
|
strlen((LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName)), lpdoc->lpszDocName, 0);
|
||||||
TRACE(print,"Escape16 returned %d\n",retVal);
|
TRACE(print,"Escape16 returned %d\n",retVal);
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
@ -100,8 +100,8 @@ DWORD WINAPI DrvGetPrinterData(LPSTR lpPrinter, LPSTR lpProfile,
|
||||||
strcpy(RegStr_Printer, Printers);
|
strcpy(RegStr_Printer, Printers);
|
||||||
strcat(RegStr_Printer, lpPrinter);
|
strcat(RegStr_Printer, lpPrinter);
|
||||||
|
|
||||||
if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) ||
|
if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) || (HIWORD(lpProfile) &&
|
||||||
(!lstrcmp32A(lpProfile, DefaultDevMode))) {
|
(!strcmp(lpProfile, DefaultDevMode)))) {
|
||||||
size = DrvGetPrinterDataInternal(RegStr_Printer, lpPrinterData, cbData);
|
size = DrvGetPrinterDataInternal(RegStr_Printer, lpPrinterData, cbData);
|
||||||
if (size+1) {
|
if (size+1) {
|
||||||
*lpNeeded = size;
|
*lpNeeded = size;
|
||||||
|
@ -111,8 +111,8 @@ DWORD WINAPI DrvGetPrinterData(LPSTR lpPrinter, LPSTR lpProfile,
|
||||||
else res = ERROR_INVALID_PRINTER_NAME;
|
else res = ERROR_INVALID_PRINTER_NAME;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) ||
|
if (((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) || (HIWORD(lpProfile) &&
|
||||||
(!lstrcmp32A(lpProfile, PrinterModel))) {
|
(!strcmp(lpProfile, PrinterModel)))) {
|
||||||
*lpNeeded = 32;
|
*lpNeeded = 32;
|
||||||
if (!lpPrinterData) goto failed;
|
if (!lpPrinterData) goto failed;
|
||||||
if (cbData < 32) {
|
if (cbData < 32) {
|
||||||
|
@ -130,13 +130,18 @@ DWORD WINAPI DrvGetPrinterData(LPSTR lpPrinter, LPSTR lpProfile,
|
||||||
if ((res = RegOpenKey32A(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey)))
|
if ((res = RegOpenKey32A(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey)))
|
||||||
goto failed;
|
goto failed;
|
||||||
cbPrinterAttr = 4;
|
cbPrinterAttr = 4;
|
||||||
if ((res = RegQueryValueEx32A(hkey, "Attributes", 0, &dwType, (LPBYTE)&PrinterAttr, &cbPrinterAttr)))
|
if ((res = RegQueryValueEx32A(hkey, "Attributes", 0,
|
||||||
|
&dwType, (LPBYTE)&PrinterAttr, &cbPrinterAttr)))
|
||||||
goto failed;
|
goto failed;
|
||||||
if ((res = RegOpenKey32A(hkey, PrinterDriverData, &hkey2)))
|
if ((res = RegOpenKey32A(hkey, PrinterDriverData, &hkey2)))
|
||||||
goto failed;
|
goto failed;
|
||||||
*lpNeeded = cbData;
|
*lpNeeded = cbData;
|
||||||
res = RegQueryValueEx32A(hkey2, lpProfile, 0, lpType, lpPrinterData, lpNeeded);
|
res = RegQueryValueEx32A(hkey2, lpProfile, 0,
|
||||||
if ((res != ERROR_CANTREAD) && ((PrinterAttr & (0x800|0x10)) == 0x10))
|
lpType, lpPrinterData, lpNeeded);
|
||||||
|
if ((res != ERROR_CANTREAD) &&
|
||||||
|
((PrinterAttr &
|
||||||
|
(PRINTER_ATTRIBUTE_ENABLE_BIDI|PRINTER_ATTRIBUTE_NETWORK))
|
||||||
|
== PRINTER_ATTRIBUTE_NETWORK))
|
||||||
{
|
{
|
||||||
if (!(res) && (*lpType == REG_DWORD) && (*(LPDWORD)lpPrinterData == -1))
|
if (!(res) && (*lpType == REG_DWORD) && (*(LPDWORD)lpPrinterData == -1))
|
||||||
res = ERROR_INVALID_DATA;
|
res = ERROR_INVALID_DATA;
|
||||||
|
@ -176,8 +181,8 @@ DWORD WINAPI DrvSetPrinterData(LPSTR lpPrinter, LPSTR lpProfile,
|
||||||
TRACE(print,"lpType %08lx\n",lpType);
|
TRACE(print,"lpType %08lx\n",lpType);
|
||||||
|
|
||||||
if ((!lpPrinter) || (!lpProfile) ||
|
if ((!lpPrinter) || (!lpProfile) ||
|
||||||
((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) ||
|
((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) || (HIWORD(lpProfile) &&
|
||||||
(!lstrcmp32A(lpProfile, PrinterModel)))
|
(!strcmp(lpProfile, PrinterModel))))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
RegStr_Printer = HeapAlloc(GetProcessHeap(), 0,
|
RegStr_Printer = HeapAlloc(GetProcessHeap(), 0,
|
||||||
|
@ -185,8 +190,8 @@ DWORD WINAPI DrvSetPrinterData(LPSTR lpPrinter, LPSTR lpProfile,
|
||||||
strcpy(RegStr_Printer, Printers);
|
strcpy(RegStr_Printer, Printers);
|
||||||
strcat(RegStr_Printer, lpPrinter);
|
strcat(RegStr_Printer, lpPrinter);
|
||||||
|
|
||||||
if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) ||
|
if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) || (HIWORD(lpProfile) &&
|
||||||
(!lstrcmp32A(lpProfile, DefaultDevMode))) {
|
(!strcmp(lpProfile, DefaultDevMode)))) {
|
||||||
if (!(RegOpenKey32A(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey)) ||
|
if (!(RegOpenKey32A(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey)) ||
|
||||||
(RegSetValueEx32A(hkey, DefaultDevMode, 0, REG_BINARY, lpPrinterData, dwSize)))
|
(RegSetValueEx32A(hkey, DefaultDevMode, 0, REG_BINARY, lpPrinterData, dwSize)))
|
||||||
res = ERROR_INVALID_PRINTER_NAME;
|
res = ERROR_INVALID_PRINTER_NAME;
|
||||||
|
|
190
misc/registry.c
190
misc/registry.c
|
@ -15,6 +15,7 @@
|
||||||
* TODO
|
* TODO
|
||||||
* Security access
|
* Security access
|
||||||
* Option handling
|
* Option handling
|
||||||
|
* Time for RegEnumKey*, RegQueryInfoKey*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -2080,7 +2081,7 @@ DWORD WINAPI RegCreateKey16( HKEY hkey, LPCSTR lpszSubKey, LPHKEY retkey )
|
||||||
*
|
*
|
||||||
* Callpath:
|
* Callpath:
|
||||||
* RegQueryValue16 -> RegQueryValue32A -> RegQueryValueEx32A \
|
* RegQueryValue16 -> RegQueryValue32A -> RegQueryValueEx32A \
|
||||||
* RegQueryValue32W -> RegQueryValueEx32W
|
* RegQueryValue32W -> RegQueryValueEx32W
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -2602,12 +2603,22 @@ DWORD WINAPI RegSetValue16( HKEY hkey, LPCSTR lpszSubKey, DWORD dwType,
|
||||||
*
|
*
|
||||||
* Callpath:
|
* Callpath:
|
||||||
* RegEnumKey16 -> RegEnumKey32A -> RegEnumKeyEx32A \
|
* RegEnumKey16 -> RegEnumKey32A -> RegEnumKeyEx32A \
|
||||||
* RegEnumKey32W -> RegEnumKeyEx32W
|
* RegEnumKey32W -> RegEnumKeyEx32W
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* RegEnumKeyEx32W [ADVAPI32.139]
|
* RegEnumKeyEx32W [ADVAPI32.139]
|
||||||
|
*
|
||||||
|
* PARAMS
|
||||||
|
* hkey [I] Handle to key to enumerate
|
||||||
|
* iSubKey [I] Index of subkey to enumerate
|
||||||
|
* lpszName [O] Buffer for subkey name
|
||||||
|
* lpcchName [O] Size of subkey buffer
|
||||||
|
* lpdwReserved [I] Reserved
|
||||||
|
* lpszClass [O] Buffer for class string
|
||||||
|
* lpcchClass [O] Size of class buffer
|
||||||
|
* ft [O] Time key last written to
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI RegEnumKeyEx32W( HKEY hkey, DWORD iSubkey, LPWSTR lpszName,
|
DWORD WINAPI RegEnumKeyEx32W( HKEY hkey, DWORD iSubkey, LPWSTR lpszName,
|
||||||
LPDWORD lpcchName, LPDWORD lpdwReserved,
|
LPDWORD lpcchName, LPDWORD lpdwReserved,
|
||||||
|
@ -2626,17 +2637,24 @@ DWORD WINAPI RegEnumKeyEx32W( HKEY hkey, DWORD iSubkey, LPWSTR lpszName,
|
||||||
if (!lpkey->nextsub)
|
if (!lpkey->nextsub)
|
||||||
return ERROR_NO_MORE_ITEMS;
|
return ERROR_NO_MORE_ITEMS;
|
||||||
lpxkey=lpkey->nextsub;
|
lpxkey=lpkey->nextsub;
|
||||||
|
|
||||||
|
/* Traverse the subkeys */
|
||||||
while (iSubkey && lpxkey) {
|
while (iSubkey && lpxkey) {
|
||||||
iSubkey--;
|
iSubkey--;
|
||||||
lpxkey=lpxkey->next;
|
lpxkey=lpxkey->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iSubkey || !lpxkey)
|
if (iSubkey || !lpxkey)
|
||||||
return ERROR_NO_MORE_ITEMS;
|
return ERROR_NO_MORE_ITEMS;
|
||||||
if (2*lstrlen32W(lpxkey->keyname)+2>*lpcchName)
|
if (2*lstrlen32W(lpxkey->keyname)+2>*lpcchName)
|
||||||
return ERROR_MORE_DATA;
|
return ERROR_MORE_DATA;
|
||||||
memcpy(lpszName,lpxkey->keyname,lstrlen32W(lpxkey->keyname)*2+2);
|
memcpy(lpszName,lpxkey->keyname,lstrlen32W(lpxkey->keyname)*2+2);
|
||||||
|
|
||||||
|
if (*lpcchName)
|
||||||
|
*lpcchName = lstrlen32W(lpszName);
|
||||||
|
|
||||||
if (lpszClass) {
|
if (lpszClass) {
|
||||||
/* what should we write into it? */
|
/* FIXME: what should we write into it? */
|
||||||
*lpszClass = 0;
|
*lpszClass = 0;
|
||||||
*lpcchClass = 2;
|
*lpcchClass = 2;
|
||||||
}
|
}
|
||||||
|
@ -2749,9 +2767,14 @@ DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD iSubkey, LPSTR lpszName,
|
||||||
* RegEnumValue32W [ADVAPI32.142]
|
* RegEnumValue32W [ADVAPI32.142]
|
||||||
*
|
*
|
||||||
* PARAMS
|
* PARAMS
|
||||||
* hkey [I]
|
* hkey [I] Handle to key to query
|
||||||
* iValue [I]
|
* iValue [I] Index of value to query
|
||||||
* ...
|
* lpszValue [O] Value string
|
||||||
|
* lpcchValue [O] Size of value buffer
|
||||||
|
* lpdReserved [I] Reserved
|
||||||
|
* lpdwType [O] Type code
|
||||||
|
* lpbData [O] Value data
|
||||||
|
* lpcbData [O] Size of data buffer
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI RegEnumValue32W( HKEY hkey, DWORD iValue, LPWSTR lpszValue,
|
DWORD WINAPI RegEnumValue32W( HKEY hkey, DWORD iValue, LPWSTR lpszValue,
|
||||||
LPDWORD lpcchValue, LPDWORD lpdReserved,
|
LPDWORD lpcchValue, LPDWORD lpdReserved,
|
||||||
|
@ -2772,10 +2795,11 @@ DWORD WINAPI RegEnumValue32W( HKEY hkey, DWORD iValue, LPWSTR lpszValue,
|
||||||
if (!iValue)
|
if (!iValue)
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
|
||||||
if (lpkey->nrofvalues<=iValue)
|
if (lpkey->nrofvalues <= iValue)
|
||||||
return ERROR_NO_MORE_ITEMS;
|
return ERROR_NO_MORE_ITEMS;
|
||||||
|
|
||||||
val = lpkey->values+iValue;
|
/* FIXME: Should this be lpkey->values + iValue * sizeof(KEYVALUE)? */
|
||||||
|
val = lpkey->values + iValue;
|
||||||
|
|
||||||
if (val->name) {
|
if (val->name) {
|
||||||
if (lstrlen32W(val->name)*2+2>*lpcchValue) {
|
if (lstrlen32W(val->name)*2+2>*lpcchValue) {
|
||||||
|
@ -2788,8 +2812,11 @@ DWORD WINAPI RegEnumValue32W( HKEY hkey, DWORD iValue, LPWSTR lpszValue,
|
||||||
*lpszValue = 0;
|
*lpszValue = 0;
|
||||||
*lpcchValue = 0;
|
*lpcchValue = 0;
|
||||||
}
|
}
|
||||||
if (lpdwType)
|
|
||||||
*lpdwType=val->type;
|
/* Can be NULL if the type code is not required */
|
||||||
|
if (lpdwType)
|
||||||
|
*lpdwType = val->type;
|
||||||
|
|
||||||
if (lpbData) {
|
if (lpbData) {
|
||||||
if (val->len>*lpcbData)
|
if (val->len>*lpcbData)
|
||||||
return ERROR_MORE_DATA;
|
return ERROR_MORE_DATA;
|
||||||
|
@ -2811,10 +2838,10 @@ DWORD WINAPI RegEnumValue32A( HKEY hkey, DWORD iValue, LPSTR lpszValue,
|
||||||
LPWSTR lpszValueW;
|
LPWSTR lpszValueW;
|
||||||
LPBYTE lpbDataW;
|
LPBYTE lpbDataW;
|
||||||
DWORD ret,lpcbDataW;
|
DWORD ret,lpcbDataW;
|
||||||
|
DWORD dwType;
|
||||||
|
|
||||||
TRACE(reg,"(%x,%ld,%p,%p,%p,%p,%p,%p)\n",
|
TRACE(reg,"(%x,%ld,%p,%p,%p,%p,%p,%p)\n",hkey,iValue,lpszValue,lpcchValue,
|
||||||
hkey,iValue,lpszValue,lpcchValue,lpdReserved,lpdwType,lpbData,lpcbData
|
lpdReserved,lpdwType,lpbData,lpcbData);
|
||||||
);
|
|
||||||
|
|
||||||
lpszValueW = (LPWSTR)xmalloc(*lpcchValue*2);
|
lpszValueW = (LPWSTR)xmalloc(*lpcchValue*2);
|
||||||
if (lpbData) {
|
if (lpbData) {
|
||||||
|
@ -2822,21 +2849,17 @@ DWORD WINAPI RegEnumValue32A( HKEY hkey, DWORD iValue, LPSTR lpszValue,
|
||||||
lpcbDataW = *lpcbData*2;
|
lpcbDataW = *lpcbData*2;
|
||||||
} else
|
} else
|
||||||
lpbDataW = NULL;
|
lpbDataW = NULL;
|
||||||
ret=RegEnumValue32W(
|
|
||||||
hkey,
|
ret = RegEnumValue32W( hkey, iValue, lpszValueW, lpcchValue,
|
||||||
iValue,
|
lpdReserved, &dwType, lpbDataW, &lpcbDataW );
|
||||||
lpszValueW,
|
|
||||||
lpcchValue,
|
if (lpdwType)
|
||||||
lpdReserved,
|
*lpdwType = dwType;
|
||||||
lpdwType,
|
|
||||||
lpbDataW,
|
|
||||||
&lpcbDataW
|
|
||||||
);
|
|
||||||
|
|
||||||
if (ret==ERROR_SUCCESS) {
|
if (ret==ERROR_SUCCESS) {
|
||||||
lstrcpyWtoA(lpszValue,lpszValueW);
|
lstrcpyWtoA(lpszValue,lpszValueW);
|
||||||
if (lpbData) {
|
if (lpbData) {
|
||||||
if ((1<<*lpdwType) & UNICONVMASK) {
|
if ((1<<dwType) & UNICONVMASK) {
|
||||||
lstrcpyWtoA(lpbData,(LPWSTR)lpbDataW);
|
lstrcpyWtoA(lpbData,(LPWSTR)lpbDataW);
|
||||||
} else {
|
} else {
|
||||||
if (lpcbDataW > *lpcbData)
|
if (lpcbDataW > *lpcbData)
|
||||||
|
@ -2847,11 +2870,9 @@ DWORD WINAPI RegEnumValue32A( HKEY hkey, DWORD iValue, LPSTR lpszValue,
|
||||||
*lpcbData = lpcbDataW;
|
*lpcbData = lpcbDataW;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (lpbDataW)
|
if (lpbDataW) free(lpbDataW);
|
||||||
free(lpbDataW);
|
if (lpszValueW) free(lpszValueW);
|
||||||
if (lpszValueW)
|
return ret;
|
||||||
free(lpszValueW);
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2906,8 +2927,8 @@ DWORD WINAPI RegCloseKey( HKEY hkey )
|
||||||
* RegDeleteKey32W [ADVAPI32.134]
|
* RegDeleteKey32W [ADVAPI32.134]
|
||||||
*
|
*
|
||||||
* PARAMS
|
* PARAMS
|
||||||
* hkey [I]
|
* hkey [I] Handle to open key
|
||||||
* lpszSubKey [I]
|
* lpszSubKey [I] Name of subkey to delete
|
||||||
*
|
*
|
||||||
* RETURNS
|
* RETURNS
|
||||||
* Success: ERROR_SUCCESS
|
* Success: ERROR_SUCCESS
|
||||||
|
@ -2925,10 +2946,11 @@ DWORD WINAPI RegDeleteKey32W( HKEY hkey, LPWSTR lpszSubKey )
|
||||||
if (!lpNextKey)
|
if (!lpNextKey)
|
||||||
return ERROR_INVALID_HANDLE;
|
return ERROR_INVALID_HANDLE;
|
||||||
|
|
||||||
/* We need to know the previous key in the hier. */
|
/* Subkey param cannot be NULL */
|
||||||
if (!lpszSubKey || !*lpszSubKey)
|
if (!lpszSubKey || !*lpszSubKey)
|
||||||
return ERROR_BADKEY;
|
return ERROR_BADKEY;
|
||||||
|
|
||||||
|
/* We need to know the previous key in the hier. */
|
||||||
split_keypath(lpszSubKey,&wps,&wpc);
|
split_keypath(lpszSubKey,&wps,&wpc);
|
||||||
i = 0;
|
i = 0;
|
||||||
lpxkey = lpNextKey;
|
lpxkey = lpNextKey;
|
||||||
|
@ -3133,28 +3155,37 @@ DWORD WINAPI RegFlushKey( HKEY hkey )
|
||||||
|
|
||||||
/* FIXME: lpcchXXXX ... is this counting in WCHARS or in BYTEs ?? */
|
/* FIXME: lpcchXXXX ... is this counting in WCHARS or in BYTEs ?? */
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* RegQueryInfoKey32W [ADVAPI32.153]
|
* RegQueryInfoKey32W [ADVAPI32.153]
|
||||||
|
*
|
||||||
|
* PARAMS
|
||||||
|
* hkey [I] Handle to key to query
|
||||||
|
* lpszClass [O] Buffer for class string
|
||||||
|
* lpcchClass [O] Size of class string buffer
|
||||||
|
* lpdwReserved [I] Reserved
|
||||||
|
* lpcSubKeys [I] Buffer for number of subkeys
|
||||||
|
* lpcchMaxSubKey [O] Buffer for longest subkey name length
|
||||||
|
* lpcchMaxClass [O] Buffer for longest class string length
|
||||||
|
* lpcValues [O] Buffer for number of value entries
|
||||||
|
* lpcchMaxValueName [O] Buffer for longest value name length
|
||||||
|
* lpccbMaxValueData [O] Buffer for longest value data length
|
||||||
|
* lpcbSecurityDescriptor [O] Buffer for security descriptor length
|
||||||
|
* ft
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI RegQueryInfoKey32W(
|
DWORD WINAPI RegQueryInfoKey32W( HKEY hkey, LPWSTR lpszClass,
|
||||||
HKEY hkey,
|
LPDWORD lpcchClass, LPDWORD lpdwReserved,
|
||||||
LPWSTR lpszClass,
|
LPDWORD lpcSubKeys, LPDWORD lpcchMaxSubkey,
|
||||||
LPDWORD lpcchClass,
|
LPDWORD lpcchMaxClass, LPDWORD lpcValues,
|
||||||
LPDWORD lpdwReserved,
|
LPDWORD lpcchMaxValueName,
|
||||||
LPDWORD lpcSubKeys,
|
LPDWORD lpccbMaxValueData,
|
||||||
LPDWORD lpcchMaxSubkey,
|
LPDWORD lpcbSecurityDescriptor, FILETIME *ft )
|
||||||
LPDWORD lpcchMaxClass,
|
{
|
||||||
LPDWORD lpcValues,
|
|
||||||
LPDWORD lpcchMaxValueName,
|
|
||||||
LPDWORD lpccbMaxValueData,
|
|
||||||
LPDWORD lpcbSecurityDescriptor,
|
|
||||||
FILETIME *ft
|
|
||||||
) {
|
|
||||||
LPKEYSTRUCT lpkey,lpxkey;
|
LPKEYSTRUCT lpkey,lpxkey;
|
||||||
int nrofkeys,maxsubkey,maxclass,maxvname,maxvdata;
|
int nrofkeys,maxsubkey,maxclass,maxvname,maxvdata;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
TRACE(reg,"(%x,......)\n",hkey);
|
TRACE(reg,"(%x,%p,...)\n",hkey,lpszClass);
|
||||||
lpkey = lookup_hkey(hkey);
|
lpkey = lookup_hkey(hkey);
|
||||||
if (!lpkey)
|
if (!lpkey)
|
||||||
return ERROR_INVALID_HANDLE;
|
return ERROR_INVALID_HANDLE;
|
||||||
|
@ -3210,21 +3241,16 @@ DWORD WINAPI RegQueryInfoKey32W(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* RegQueryInfoKeyA [ADVAPI32.152] */
|
/******************************************************************************
|
||||||
DWORD WINAPI RegQueryInfoKey32A(
|
* RegQueryInfoKey32A [ADVAPI32.152]
|
||||||
HKEY hkey,
|
*/
|
||||||
LPSTR lpszClass,
|
DWORD WINAPI RegQueryInfoKey32A( HKEY hkey, LPSTR lpszClass, LPDWORD lpcchClass,
|
||||||
LPDWORD lpcchClass,
|
LPDWORD lpdwReserved, LPDWORD lpcSubKeys,
|
||||||
LPDWORD lpdwReserved,
|
LPDWORD lpcchMaxSubkey, LPDWORD lpcchMaxClass,
|
||||||
LPDWORD lpcSubKeys,
|
LPDWORD lpcValues, LPDWORD lpcchMaxValueName,
|
||||||
LPDWORD lpcchMaxSubkey,
|
LPDWORD lpccbMaxValueData,
|
||||||
LPDWORD lpcchMaxClass,
|
LPDWORD lpcbSecurityDescriptor, FILETIME *ft )
|
||||||
LPDWORD lpcValues,
|
{
|
||||||
LPDWORD lpcchMaxValueName,
|
|
||||||
LPDWORD lpccbMaxValueData,
|
|
||||||
LPDWORD lpcbSecurityDescriptor,
|
|
||||||
FILETIME *ft
|
|
||||||
) {
|
|
||||||
LPWSTR lpszClassW;
|
LPWSTR lpszClassW;
|
||||||
DWORD ret;
|
DWORD ret;
|
||||||
|
|
||||||
|
@ -3322,16 +3348,21 @@ LONG WINAPI RegGetKeySecurity( HKEY hkey,
|
||||||
{
|
{
|
||||||
LPKEYSTRUCT lpkey;
|
LPKEYSTRUCT lpkey;
|
||||||
|
|
||||||
FIXME(reg, "(%x,%ld,%p,%ld): stub\n",hkey,SecurityInformation,
|
TRACE(reg,"(%x,%ld,%p,%ld)\n",hkey,SecurityInformation,pSecurityDescriptor,
|
||||||
pSecurityDescriptor,lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0);
|
lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0);
|
||||||
|
|
||||||
lpkey = lookup_hkey( hkey );
|
lpkey = lookup_hkey( hkey );
|
||||||
if (!lpkey)
|
if (!lpkey)
|
||||||
return ERROR_INVALID_HANDLE;
|
return ERROR_INVALID_HANDLE;
|
||||||
|
|
||||||
|
/* FIXME: Check for valid SecurityInformation values */
|
||||||
|
|
||||||
if (*lpcbSecurityDescriptor < sizeof(*pSecurityDescriptor))
|
if (*lpcbSecurityDescriptor < sizeof(*pSecurityDescriptor))
|
||||||
return ERROR_INSUFFICIENT_BUFFER;
|
return ERROR_INSUFFICIENT_BUFFER;
|
||||||
|
|
||||||
|
FIXME(reg, "(%x,%ld,%p,%ld): stub\n",hkey,SecurityInformation,
|
||||||
|
pSecurityDescriptor,lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0);
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3347,8 +3378,7 @@ LONG WINAPI RegGetKeySecurity( HKEY hkey,
|
||||||
LONG WINAPI RegLoadKey32W( HKEY hkey, LPCWSTR lpszSubKey, LPCWSTR lpszFile )
|
LONG WINAPI RegLoadKey32W( HKEY hkey, LPCWSTR lpszSubKey, LPCWSTR lpszFile )
|
||||||
{
|
{
|
||||||
LPKEYSTRUCT lpkey;
|
LPKEYSTRUCT lpkey;
|
||||||
FIXME(reg,"(%x,%s,%s): stub\n",hkey,debugstr_w(lpszSubKey),
|
TRACE(reg,"(%x,%s,%s)\n",hkey,debugstr_w(lpszSubKey),debugstr_w(lpszFile));
|
||||||
debugstr_w(lpszFile));
|
|
||||||
|
|
||||||
/* Do this check before the hkey check */
|
/* Do this check before the hkey check */
|
||||||
if (!lpszSubKey || !*lpszSubKey || !lpszFile || !*lpszFile)
|
if (!lpszSubKey || !*lpszSubKey || !lpszFile || !*lpszFile)
|
||||||
|
@ -3358,6 +3388,9 @@ LONG WINAPI RegLoadKey32W( HKEY hkey, LPCWSTR lpszSubKey, LPCWSTR lpszFile )
|
||||||
if (!lpkey)
|
if (!lpkey)
|
||||||
return ERROR_INVALID_HANDLE;
|
return ERROR_INVALID_HANDLE;
|
||||||
|
|
||||||
|
FIXME(reg,"(%x,%s,%s): stub\n",hkey,debugstr_w(lpszSubKey),
|
||||||
|
debugstr_w(lpszFile));
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3392,13 +3425,16 @@ LONG WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL32 fWatchSubTree,
|
||||||
BOOL32 fAsync )
|
BOOL32 fAsync )
|
||||||
{
|
{
|
||||||
LPKEYSTRUCT lpkey;
|
LPKEYSTRUCT lpkey;
|
||||||
FIXME(reg,"(%x,%i,%ld,%x,%i): stub\n",hkey,fWatchSubTree,fdwNotifyFilter,
|
TRACE(reg,"(%x,%i,%ld,%x,%i)\n",hkey,fWatchSubTree,fdwNotifyFilter,
|
||||||
hEvent,fAsync);
|
hEvent,fAsync);
|
||||||
|
|
||||||
lpkey = lookup_hkey( hkey );
|
lpkey = lookup_hkey( hkey );
|
||||||
if (!lpkey)
|
if (!lpkey)
|
||||||
return ERROR_INVALID_HANDLE;
|
return ERROR_INVALID_HANDLE;
|
||||||
|
|
||||||
|
FIXME(reg,"(%x,%i,%ld,%x,%i): stub\n",hkey,fWatchSubTree,fdwNotifyFilter,
|
||||||
|
hEvent,fAsync);
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3443,7 +3479,7 @@ LONG WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo,
|
||||||
{
|
{
|
||||||
LPKEYSTRUCT lpkey;
|
LPKEYSTRUCT lpkey;
|
||||||
|
|
||||||
FIXME(reg, "(%x,%ld,%p): stub\n", hkey, SecurityInfo, pSecurityDesc);
|
TRACE(reg,"(%x,%ld,%p)\n",hkey,SecurityInfo,pSecurityDesc);
|
||||||
|
|
||||||
/* It seems to perform this check before the hkey check */
|
/* It seems to perform this check before the hkey check */
|
||||||
if ((SecurityInfo & OWNER_SECURITY_INFORMATION) ||
|
if ((SecurityInfo & OWNER_SECURITY_INFORMATION) ||
|
||||||
|
@ -3461,6 +3497,8 @@ LONG WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo,
|
||||||
if (!lpkey)
|
if (!lpkey)
|
||||||
return ERROR_INVALID_HANDLE;
|
return ERROR_INVALID_HANDLE;
|
||||||
|
|
||||||
|
FIXME(reg,":(%x,%ld,%p): stub\n",hkey,SecurityInfo,pSecurityDesc);
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3478,7 +3516,7 @@ LONG WINAPI RegSaveKey32W( HKEY hkey, LPCWSTR lpFile,
|
||||||
{
|
{
|
||||||
LPKEYSTRUCT lpkey;
|
LPKEYSTRUCT lpkey;
|
||||||
|
|
||||||
FIXME(reg, "(%x,%s,%p): stub\n", hkey, debugstr_w(lpFile), sa);
|
TRACE(reg, "(%x,%s,%p)\n", hkey, debugstr_w(lpFile), sa);
|
||||||
|
|
||||||
/* It appears to do this check before the hkey check */
|
/* It appears to do this check before the hkey check */
|
||||||
if (!lpFile || !*lpFile)
|
if (!lpFile || !*lpFile)
|
||||||
|
@ -3488,6 +3526,8 @@ LONG WINAPI RegSaveKey32W( HKEY hkey, LPCWSTR lpFile,
|
||||||
if (!lpkey)
|
if (!lpkey)
|
||||||
return ERROR_INVALID_HANDLE;
|
return ERROR_INVALID_HANDLE;
|
||||||
|
|
||||||
|
FIXME(reg, "(%x,%s,%p): stub\n", hkey, debugstr_w(lpFile), sa);
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3517,7 +3557,8 @@ LONG WINAPI RegSaveKey32A( HKEY hkey, LPCSTR lpFile,
|
||||||
LONG WINAPI RegRestoreKey32W( HKEY hkey, LPCWSTR lpFile, DWORD dwFlags )
|
LONG WINAPI RegRestoreKey32W( HKEY hkey, LPCWSTR lpFile, DWORD dwFlags )
|
||||||
{
|
{
|
||||||
LPKEYSTRUCT lpkey;
|
LPKEYSTRUCT lpkey;
|
||||||
FIXME(reg, "(%x,%s,%ld): stub\n", hkey, debugstr_w(lpFile), dwFlags);
|
|
||||||
|
TRACE(reg, "(%x,%s,%ld)\n",hkey,debugstr_w(lpFile),dwFlags);
|
||||||
|
|
||||||
/* It seems to do this check before the hkey check */
|
/* It seems to do this check before the hkey check */
|
||||||
if (!lpFile || !*lpFile)
|
if (!lpFile || !*lpFile)
|
||||||
|
@ -3527,6 +3568,8 @@ LONG WINAPI RegRestoreKey32W( HKEY hkey, LPCWSTR lpFile, DWORD dwFlags )
|
||||||
if (!lpkey)
|
if (!lpkey)
|
||||||
return ERROR_INVALID_HANDLE;
|
return ERROR_INVALID_HANDLE;
|
||||||
|
|
||||||
|
FIXME(reg,"(%x,%s,%ld): stub\n",hkey,debugstr_w(lpFile),dwFlags);
|
||||||
|
|
||||||
/* Check for file existence */
|
/* Check for file existence */
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
@ -3560,13 +3603,16 @@ LONG WINAPI RegReplaceKey32W( HKEY hkey, LPCWSTR lpSubKey, LPCWSTR lpNewFile,
|
||||||
{
|
{
|
||||||
LPKEYSTRUCT lpkey;
|
LPKEYSTRUCT lpkey;
|
||||||
|
|
||||||
FIXME(reg, "(%x,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey),
|
TRACE(reg,"(%x,%s,%s,%s)\n",hkey,debugstr_w(lpSubKey),
|
||||||
debugstr_w(lpNewFile),debugstr_w(lpOldFile));
|
debugstr_w(lpNewFile),debugstr_w(lpOldFile));
|
||||||
|
|
||||||
lpkey = lookup_hkey( hkey );
|
lpkey = lookup_hkey( hkey );
|
||||||
if (!lpkey)
|
if (!lpkey)
|
||||||
return ERROR_INVALID_HANDLE;
|
return ERROR_INVALID_HANDLE;
|
||||||
|
|
||||||
|
FIXME(reg, "(%x,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey),
|
||||||
|
debugstr_w(lpNewFile),debugstr_w(lpOldFile));
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
289
misc/shell.c
289
misc/shell.c
|
@ -1,6 +1,8 @@
|
||||||
/*
|
/*
|
||||||
* Shell Library Functions
|
* Shell Library Functions
|
||||||
*
|
*
|
||||||
|
* 1998 Marcus Meissner
|
||||||
|
* 1998 Juergen Schmied (jsch)
|
||||||
* currently work in progress on SH* and SHELL32_DllGetClassObject functions
|
* currently work in progress on SH* and SHELL32_DllGetClassObject functions
|
||||||
* <contact juergen.schmied@metronet.de 980624>
|
* <contact juergen.schmied@metronet.de 980624>
|
||||||
*/
|
*/
|
||||||
|
@ -27,12 +29,18 @@
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "winreg.h"
|
#include "winreg.h"
|
||||||
|
|
||||||
|
/* FIXME should be moved to a header file. IsEqualGUID
|
||||||
|
is declared but not exported in compobj.c !!!*/
|
||||||
|
#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
|
||||||
|
#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
|
||||||
|
#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)
|
||||||
|
|
||||||
static const char * const SHELL_People[] =
|
static const char * const SHELL_People[] =
|
||||||
{
|
{
|
||||||
"Bob Amstadt",
|
"Bob Amstadt",
|
||||||
"Dag Asheim",
|
"Dag Asheim",
|
||||||
"Martin Ayotte",
|
"Martin Ayotte",
|
||||||
"Karl Backstr\366m",
|
"Karl Backström",
|
||||||
"Peter Bajusz",
|
"Peter Bajusz",
|
||||||
"Marcel Baur",
|
"Marcel Baur",
|
||||||
"Georg Beyerle",
|
"Georg Beyerle",
|
||||||
|
@ -81,6 +89,7 @@ static const char * const SHELL_People[] =
|
||||||
"Pavel Kankovsky",
|
"Pavel Kankovsky",
|
||||||
"Jochen Karrer",
|
"Jochen Karrer",
|
||||||
"Andreas Kirschbaum",
|
"Andreas Kirschbaum",
|
||||||
|
"Rein Klazes",
|
||||||
"Albrecht Kleine",
|
"Albrecht Kleine",
|
||||||
"Eric Kohl",
|
"Eric Kohl",
|
||||||
"Jon Konrath",
|
"Jon Konrath",
|
||||||
|
@ -90,6 +99,7 @@ static const char * const SHELL_People[] =
|
||||||
"Scott A. Laird",
|
"Scott A. Laird",
|
||||||
"David Lee Lambert",
|
"David Lee Lambert",
|
||||||
"Andrew Lewycky",
|
"Andrew Lewycky",
|
||||||
|
"Per Lindström",
|
||||||
"Martin von Loewis",
|
"Martin von Loewis",
|
||||||
"Michiel van Loon",
|
"Michiel van Loon",
|
||||||
"Kenneth MacDonald",
|
"Kenneth MacDonald",
|
||||||
|
@ -126,6 +136,7 @@ static const char * const SHELL_People[] =
|
||||||
"Peter Schlaile",
|
"Peter Schlaile",
|
||||||
"Ulrich Schmid",
|
"Ulrich Schmid",
|
||||||
"Bernd Schmidt",
|
"Bernd Schmidt",
|
||||||
|
"Juergen Schmied",
|
||||||
"Ingo Schneider",
|
"Ingo Schneider",
|
||||||
"Victor Schneider",
|
"Victor Schneider",
|
||||||
"Yngvi Sigurjonsson",
|
"Yngvi Sigurjonsson",
|
||||||
|
@ -1574,65 +1585,88 @@ void WINAPI FreeIconList( DWORD dw )
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_DllGetClassObject [SHELL32.14]
|
* SHELL32_DllGetClassObject [SHELL32.128]
|
||||||
|
*
|
||||||
|
* [Standart OLE/COM Interface Method]
|
||||||
|
* This Function retrives the pointer to a specified interface (iid) of
|
||||||
|
* a given class (rclsid).
|
||||||
|
* With this pointer it's possible to call the IClassFactory_CreateInstance
|
||||||
|
* method to get a instance of the requested Class.
|
||||||
|
* This function does NOT instantiate the Class!!!
|
||||||
|
*
|
||||||
|
* RETURNS
|
||||||
|
* HRESULT
|
||||||
*
|
*
|
||||||
* http://premium.microsoft.com/msdn/library/sdkdoc/api2_48fo.htm
|
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv)
|
DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv)
|
||||||
{
|
{ HRESULT hres = E_OUTOFMEMORY;
|
||||||
char xclsid[50],xiid[50];
|
LPCLASSFACTORY lpclf;
|
||||||
HRESULT hres = E_OUTOFMEMORY;
|
|
||||||
|
|
||||||
|
char xclsid[50],xiid[50];
|
||||||
|
WINE_StringFromCLSID((LPCLSID)rclsid,xclsid);
|
||||||
|
WINE_StringFromCLSID((LPCLSID)iid,xiid);
|
||||||
|
TRACE(shell,"\n\tCLSID:\t%s,\n\tIID:\t%s\n",xclsid,xiid);
|
||||||
|
|
||||||
|
*ppv = NULL;
|
||||||
|
if(IsEqualCLSID(rclsid, &CLSID_ShellDesktop)||
|
||||||
|
IsEqualCLSID(rclsid, &CLSID_ShellLink))
|
||||||
|
{ if(IsEqualCLSID(rclsid, &CLSID_ShellDesktop)) /*debug*/
|
||||||
|
TRACE(shell,"requested CLSID_ShellDesktop\n");
|
||||||
|
if(IsEqualCLSID(rclsid, &CLSID_ShellLink)) /*debug*/
|
||||||
|
TRACE(shell,"requested CLSID_ShellLink\n");
|
||||||
|
|
||||||
WINE_StringFromCLSID((LPCLSID)rclsid,xclsid);
|
/* fixme: the IClassFactory_Constructor at the moment only
|
||||||
WINE_StringFromCLSID((LPCLSID)iid,xiid);
|
for rclsid=CLSID_ShellDesktop, so we get the right Interface (jsch)*/
|
||||||
TRACE(shell,"(%s,%s,%p)\n",xclsid,xiid,ppv);
|
lpclf = IClassFactory_Constructor();
|
||||||
|
if(lpclf)
|
||||||
*ppv = NULL;
|
{ hres = lpclf->lpvtbl->fnQueryInterface(lpclf,iid, ppv);
|
||||||
/* SDK example code looks like this:
|
lpclf->lpvtbl->fnRelease(lpclf);
|
||||||
*
|
}
|
||||||
HRESULT hres = E_OUTOFMEMORY;
|
|
||||||
|
|
||||||
*ppv = NULL;
|
|
||||||
CClassFactory *pClassFactory = new CClassFactory(rclsid);
|
|
||||||
|
|
||||||
if (pClassFactory) {
|
|
||||||
hRes = pClassFactory->QueryInterface(riid,ppv);
|
|
||||||
pClassFactory->Release();
|
|
||||||
}
|
|
||||||
return hRes;
|
|
||||||
*
|
|
||||||
* The magic of the whole stuff is still unclear to me, so just hack together
|
|
||||||
* something.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!memcmp(rclsid,&CLSID_ShellDesktop,sizeof(CLSID_ShellDesktop)))
|
|
||||||
{ TRACE(shell," requested CLSID_ShellDesktop, creating it.\n");
|
|
||||||
*ppv = IShellFolder_Constructor();
|
|
||||||
/* FIXME(shell,"Initialize this folder to be the shell desktop folder\n")*/
|
|
||||||
return S_OK;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
FIXME(shell, "clsid(%s) not found, return CLASS_E_CLASSNOTAVAILABLE.\n",xclsid);
|
{ WARN(shell, "clsid(%s) not in buildin SHELL32\n",xclsid);
|
||||||
*ppv=NULL;
|
hres = CLASS_E_CLASSNOTAVAILABLE;
|
||||||
return CLASS_E_CLASSNOTAVAILABLE;
|
}
|
||||||
|
TRACE(shell,"RETURN pointer to interface: %p\n",ppv);
|
||||||
|
return hres;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHGetDesktopFolder [SHELL32.216]
|
* SHGetDesktopFolder [SHELL32.216]
|
||||||
* returns the interface to the shell desktop folder.
|
*
|
||||||
|
* SDK header win95/shlobj.h: This is equivalent to call CoCreateInstance with
|
||||||
|
* CLSID_ShellDesktop
|
||||||
|
* CoCreateInstance(CLSID_Desktop, NULL, CLSCTX_INPROC, IID_IShellFolder, &pshf);
|
||||||
*
|
*
|
||||||
* [SDK header win95/shlobj.h: This is equivalent to call CoCreateInstance with
|
* RETURNS
|
||||||
* CLSID_ShellDesktop.
|
* the interface to the shell desktop folder.
|
||||||
*
|
*
|
||||||
* CoCreateInstance(CLSID_Desktop, NULL,
|
|
||||||
* CLSCTX_INPROC, IID_IShellFolder, &pshf);
|
|
||||||
* ]
|
|
||||||
* So what we are doing is currently wrong....
|
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *shellfolder) {
|
LPSHELLFOLDER pdesktopfolder=NULL;
|
||||||
*shellfolder = IShellFolder_Constructor();
|
|
||||||
return NOERROR;
|
DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *shellfolder)
|
||||||
|
{ HRESULT hres = E_OUTOFMEMORY;
|
||||||
|
LPCLASSFACTORY lpclf;
|
||||||
|
TRACE(shell,"%p->(%p)\n",shellfolder,*shellfolder);
|
||||||
|
|
||||||
|
if (pdesktopfolder)
|
||||||
|
{ *shellfolder = pdesktopfolder;
|
||||||
|
hres = NOERROR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ lpclf = IClassFactory_Constructor();
|
||||||
|
/* fixme: the buildin IClassFactory_Constructor is at the moment only
|
||||||
|
for rclsid=CLSID_ShellDesktop, so we get the right Interface (jsch)*/
|
||||||
|
if(lpclf)
|
||||||
|
{ hres = lpclf->lpvtbl->fnCreateInstance(lpclf,NULL,(REFIID)&IID_IShellFolder, (void*)&pdesktopfolder);
|
||||||
|
lpclf->lpvtbl->fnRelease(lpclf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (pdesktopfolder)
|
||||||
|
{ *shellfolder = pdesktopfolder;
|
||||||
|
}
|
||||||
|
TRACE(shell,"-- %p->(%p)\n",shellfolder, *shellfolder);
|
||||||
|
return hres;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
|
@ -1645,61 +1679,95 @@ DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *shellfolder) {
|
||||||
* What we are currently doing is not very wrong, since we always use the same
|
* What we are currently doing is not very wrong, since we always use the same
|
||||||
* heap (ProcessHeap).
|
* heap (ProcessHeap).
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHGetMalloc(LPMALLOC32 *lpmal) {
|
DWORD WINAPI SHGetMalloc(LPMALLOC32 *lpmal)
|
||||||
TRACE(shell,"(%p)\n", lpmal);
|
{ TRACE(shell,"(%p)\n", lpmal);
|
||||||
return CoGetMalloc32(0,lpmal);
|
return CoGetMalloc32(0,lpmal);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHGetSpecialFolderLocation [SHELL32.223]
|
* SHGetSpecialFolderLocation [SHELL32.223]
|
||||||
* returns the PIDL of a special folder
|
* nFolder is a CSIDL_xxxxx.
|
||||||
*
|
*
|
||||||
* nFolder is a CSIDL_xxxxx.
|
* RETURNS
|
||||||
|
* returns the PIDL of a special folder
|
||||||
|
*
|
||||||
|
* FIXME
|
||||||
|
* the path is every time x:\\windows\\desktop
|
||||||
|
* we should get the path's from the registry
|
||||||
*/
|
*/
|
||||||
HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITEMIDLIST * ppidl)
|
HRESULT WINAPI SHGetSpecialFolderLocation(
|
||||||
{ FIXME(shell,"(%04x,%d,%p),stub!\n", hwndOwner,nFolder,ppidl);
|
HWND32 hwndOwner,
|
||||||
|
INT32 nFolder,
|
||||||
|
LPITEMIDLIST * ppidl)
|
||||||
|
{ LPSHELLFOLDER shellfolder;
|
||||||
|
DWORD pchEaten;
|
||||||
|
CHAR pszTemp[256];
|
||||||
|
LPWSTR lpszDisplayName = (LPWSTR)&pszTemp[0];
|
||||||
|
|
||||||
|
FIXME(shell,"(%04x,%d,%p),stub!\n", hwndOwner,nFolder,ppidl);
|
||||||
|
|
||||||
switch (nFolder)
|
LocalToWideChar32(lpszDisplayName, "x:\\windows\\desktop\\", 256);
|
||||||
{ case CSIDL_BITBUCKET: TRACE (shell,"looking for Recyceler\n");
|
|
||||||
break;
|
if (SHGetDesktopFolder(&shellfolder)==S_OK)
|
||||||
case CSIDL_CONTROLS: TRACE (shell,"looking for Control\n");
|
{ shellfolder->lpvtbl->fnParseDisplayName(shellfolder,hwndOwner,
|
||||||
break;
|
NULL,lpszDisplayName,&pchEaten,ppidl,NULL);
|
||||||
case CSIDL_DESKTOP: TRACE (shell,"looking for Desktop\n");
|
|
||||||
break;
|
|
||||||
case CSIDL_DESKTOPDIRECTORY: TRACE (shell,"looking for DeskDir\n");
|
|
||||||
break;
|
|
||||||
case CSIDL_DRIVES: TRACE (shell,"looking for Drives\n");
|
|
||||||
break;
|
|
||||||
case CSIDL_FONTS: TRACE (shell,"looking for Fonts\n");
|
|
||||||
break;
|
|
||||||
case CSIDL_NETHOOD: TRACE (shell,"looking for Nethood\n");
|
|
||||||
break;
|
|
||||||
case CSIDL_NETWORK: TRACE (shell,"looking for Network\n");
|
|
||||||
break;
|
|
||||||
case CSIDL_PERSONAL: TRACE (shell,"looking for Personal\n");
|
|
||||||
break;
|
|
||||||
case CSIDL_PRINTERS: TRACE (shell,"looking for Printers\n");
|
|
||||||
break;
|
|
||||||
case CSIDL_PROGRAMS: TRACE (shell,"looking for Programms\n");
|
|
||||||
break;
|
|
||||||
case CSIDL_RECENT: TRACE (shell,"looking for Recent\n");
|
|
||||||
break;
|
|
||||||
case CSIDL_SENDTO: TRACE (shell,"looking for Sendto\n");
|
|
||||||
break;
|
|
||||||
case CSIDL_STARTMENU: TRACE (shell,"looking for Startmenu\n");
|
|
||||||
break;
|
|
||||||
case CSIDL_STARTUP: TRACE (shell,"looking for Startup\n");
|
|
||||||
break;
|
|
||||||
case CSIDL_TEMPLATES: TRACE (shell,"looking for Templates\n");
|
|
||||||
break;
|
|
||||||
default: ERR (shell,"unknown CSIDL\n");
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*ppidl = (LPITEMIDLIST)HeapAlloc(GetProcessHeap(),0,sizeof(ITEMIDLIST));
|
switch (nFolder)
|
||||||
(*ppidl)->mkid.cb = 0; /*the first ITEMIDLIST*/
|
{ case CSIDL_BITBUCKET:
|
||||||
|
TRACE (shell,"looking for Recyceler\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_CONTROLS:
|
||||||
|
TRACE (shell,"looking for Control\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_DESKTOP:
|
||||||
|
TRACE (shell,"looking for Desktop\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_DESKTOPDIRECTORY:
|
||||||
|
TRACE (shell,"looking for DeskDir\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_DRIVES:
|
||||||
|
TRACE (shell,"looking for Drives\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_FONTS:
|
||||||
|
TRACE (shell,"looking for Fonts\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_NETHOOD:
|
||||||
|
TRACE (shell,"looking for Nethood\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_NETWORK:
|
||||||
|
TRACE (shell,"looking for Network\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_PERSONAL:
|
||||||
|
TRACE (shell,"looking for Personal\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_PRINTERS:
|
||||||
|
TRACE (shell,"looking for Printers\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_PROGRAMS:
|
||||||
|
TRACE (shell,"looking for Programms\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_RECENT:
|
||||||
|
TRACE (shell,"looking for Recent\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_SENDTO:
|
||||||
|
TRACE (shell,"looking for Sendto\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_STARTMENU:
|
||||||
|
TRACE (shell,"looking for Startmenu\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_STARTUP:
|
||||||
|
TRACE (shell,"looking for Startup\n");
|
||||||
|
break;
|
||||||
|
case CSIDL_TEMPLATES:
|
||||||
|
TRACE (shell,"looking for Templates\n");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ERR (shell,"unknown CSIDL\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
FIXME(shell, "return empty ITEMIDLIST only (pidl %p)\n",*ppidl);
|
TRACE(shell, "-- (new pidl %p)\n",*ppidl);
|
||||||
|
|
||||||
return NOERROR;
|
return NOERROR;
|
||||||
}
|
}
|
||||||
|
@ -1709,8 +1777,16 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITE
|
||||||
* returns the path from a passed PIDL.
|
* returns the path from a passed PIDL.
|
||||||
*/
|
*/
|
||||||
BOOL32 WINAPI SHGetPathFromIDList(LPCITEMIDLIST pidl,LPSTR pszPath)
|
BOOL32 WINAPI SHGetPathFromIDList(LPCITEMIDLIST pidl,LPSTR pszPath)
|
||||||
{ FIXME(shell,"(pidl %p,%p),stub, returning E:\\\\ \n",pidl,pszPath);
|
{ STRRET lpName;
|
||||||
strcpy(pszPath,"E:\\"); /* FIXME */
|
LPSHELLFOLDER shellfolder;
|
||||||
|
TRACE(shell,"(pidl=%p,%p)\n",pidl,pszPath);
|
||||||
|
|
||||||
|
if (SHGetDesktopFolder(&shellfolder)==S_OK)
|
||||||
|
{ shellfolder->lpvtbl->fnGetDisplayNameOf(shellfolder,pidl,SHGDN_FORPARSING,&lpName);
|
||||||
|
}
|
||||||
|
WideCharToLocal32(pszPath, lpName.u.pOleStr, MAX_PATH);
|
||||||
|
/* fixme free the olestring*/
|
||||||
|
TRACE(shell,"-- (%s)\n",pszPath);
|
||||||
return NOERROR;
|
return NOERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1721,14 +1797,25 @@ BOOL32 WINAPI SHGetPathFromIDList(LPCITEMIDLIST pidl,LPSTR pszPath)
|
||||||
|
|
||||||
DWORD WINAPI
|
DWORD WINAPI
|
||||||
SHHelpShortcuts_RunDLL (DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4)
|
SHHelpShortcuts_RunDLL (DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4)
|
||||||
|
{ FIXME (exec, "(%lx, %lx, %lx, %lx) empty stub!\n",
|
||||||
|
dwArg1, dwArg2, dwArg3, dwArg4);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* SHLoadInProc [SHELL32.225]
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
DWORD WINAPI
|
||||||
|
SHLoadInProc (DWORD dwArg1)
|
||||||
{
|
{
|
||||||
FIXME (exec, "(%lx, %lx, %lx, %lx) empty stub!\n",
|
FIXME (shell, "(%lx) empty stub!\n", dwArg1);
|
||||||
dwArg1, dwArg2, dwArg3, dwArg4);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHBrowseForFolderA [SHELL32.209]
|
* SHBrowseForFolderA [SHELL32.209]
|
||||||
*
|
*
|
||||||
|
@ -1736,10 +1823,8 @@ SHHelpShortcuts_RunDLL (DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4)
|
||||||
|
|
||||||
LPITEMIDLIST WINAPI
|
LPITEMIDLIST WINAPI
|
||||||
SHBrowseForFolder32A (LPBROWSEINFO32A lpbi)
|
SHBrowseForFolder32A (LPBROWSEINFO32A lpbi)
|
||||||
{
|
{ FIXME (shell, "(%lx) empty stub!\n", (DWORD)lpbi);
|
||||||
FIXME (exec, "(%lx) empty stub!\n", (DWORD)lpbi);
|
FIXME (shell, "(%s) empty stub!\n", lpbi->lpszTitle);
|
||||||
FIXME (exec, "(%s) empty stub!\n", lpbi->lpszTitle);
|
return NULL;
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
464
misc/shellord.c
464
misc/shellord.c
|
@ -31,24 +31,32 @@
|
||||||
#include "winreg.h"
|
#include "winreg.h"
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_2 [SHELL32.2]
|
* SHChangeNotifyRegister [SHELL32.2]
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_2(HWND32 hwnd,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6) {
|
DWORD WINAPI
|
||||||
|
SHChangeNotifyRegister(HWND32 hwnd,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6) {
|
||||||
FIXME(shell,"(0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub.\n",
|
FIXME(shell,"(0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub.\n",
|
||||||
hwnd,x2,x3,x4,x5,x6
|
hwnd,x2,x3,x4,x5,x6
|
||||||
);
|
);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_16 [SHELL32.16]
|
* ILGetDisplayName [SHELL32.15]
|
||||||
* find_lastitem_in_itemidlist()
|
* get_path_from_itemlist(itemlist,path); ? not sure...
|
||||||
*
|
|
||||||
* NOTES
|
|
||||||
* Original name: ILFindLast (exported by ordinal)
|
|
||||||
*/
|
*/
|
||||||
LPSHITEMID WINAPI SHELL32_16(LPITEMIDLIST iil) {
|
BOOL32 WINAPI ILGetDisplayName(LPCITEMIDLIST iil,LPSTR path) {
|
||||||
|
FIXME(shell,"(%p,%p),stub, return e:!\n",iil,path);
|
||||||
|
strcpy(path,"e:\\");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
/*************************************************************************
|
||||||
|
* ILFindLastID [SHELL32.16]
|
||||||
|
*/
|
||||||
|
LPSHITEMID WINAPI ILFindLastID(LPITEMIDLIST iil) {
|
||||||
LPSHITEMID lastsii,sii;
|
LPSHITEMID lastsii,sii;
|
||||||
|
|
||||||
|
TRACE(shell,"%p\n",iil);
|
||||||
if (!iil)
|
if (!iil)
|
||||||
return NULL;
|
return NULL;
|
||||||
sii = &(iil->mkid);
|
sii = &(iil->mkid);
|
||||||
|
@ -61,13 +69,10 @@ LPSHITEMID WINAPI SHELL32_16(LPITEMIDLIST iil) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_29 [SHELL32.29]
|
* PathIsRoot [SHELL32.29]
|
||||||
* is_rootdir(const char*path)
|
|
||||||
*
|
|
||||||
* NOTES
|
|
||||||
* Original Name: PathIsRoot
|
|
||||||
*/
|
*/
|
||||||
BOOL32 WINAPI SHELL32_29(LPCSTR x) {
|
BOOL32 WINAPI PathIsRoot(LPCSTR x) {
|
||||||
|
TRACE(shell,"%s\n",x);
|
||||||
if (!strcmp(x+1,":\\")) /* "X:\" */
|
if (!strcmp(x+1,":\\")) /* "X:\" */
|
||||||
return 1;
|
return 1;
|
||||||
if (!strcmp(x,"\\")) /* "\" */
|
if (!strcmp(x,"\\")) /* "\" */
|
||||||
|
@ -86,25 +91,24 @@ BOOL32 WINAPI SHELL32_29(LPCSTR x) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_30 [SHELL32.30]
|
* PathBuildRoot [SHELL32.30]
|
||||||
* get_rootdir(char*path,int drive)
|
|
||||||
*
|
|
||||||
* NOTES
|
|
||||||
* Original Name: PathBuildRoot
|
|
||||||
*/
|
*/
|
||||||
LPSTR WINAPI SHELL32_30(LPSTR root,BYTE drive) {
|
LPSTR WINAPI PathBuildRoot(LPSTR root,BYTE drive) {
|
||||||
|
TRACE(shell,"%p %i\n",root, drive);
|
||||||
strcpy(root,"A:\\");
|
strcpy(root,"A:\\");
|
||||||
root[0]+=drive;
|
root[0]+=drive;
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_31 [SHELL32.31]
|
* PathFindExtension [SHELL32.31]
|
||||||
* returns pointer to last . in last pathcomponent or at \0.
|
*
|
||||||
|
* NOTES
|
||||||
|
* returns pointer to last . in last pathcomponent or at \0.
|
||||||
*/
|
*/
|
||||||
LPSTR WINAPI SHELL32_31(LPSTR path) {
|
LPSTR WINAPI PathFindExtension(LPSTR path) {
|
||||||
LPSTR lastpoint = NULL;
|
LPSTR lastpoint = NULL;
|
||||||
|
TRACE(shell,"%p %s\n",path,path);
|
||||||
while (*path) {
|
while (*path) {
|
||||||
if (*path=='\\'||*path==' ')
|
if (*path=='\\'||*path==' ')
|
||||||
lastpoint=NULL;
|
lastpoint=NULL;
|
||||||
|
@ -116,12 +120,14 @@ LPSTR WINAPI SHELL32_31(LPSTR path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_32 [SHELL32.32]
|
* PathAddBackslash [SHELL32.32]
|
||||||
* append \ if there is none
|
*
|
||||||
|
* NOTES
|
||||||
|
* append \ if there is none
|
||||||
*/
|
*/
|
||||||
LPSTR WINAPI SHELL32_32(LPSTR path) {
|
LPSTR WINAPI PathAddBackslash(LPSTR path) {
|
||||||
int len;
|
int len;
|
||||||
|
TRACE(shell,"%p->%s\n",path,path);
|
||||||
len = lstrlen32A(path);
|
len = lstrlen32A(path);
|
||||||
if (len && path[len-1]!='\\') {
|
if (len && path[len-1]!='\\') {
|
||||||
path[len+0]='\\';
|
path[len+0]='\\';
|
||||||
|
@ -132,12 +138,14 @@ LPSTR WINAPI SHELL32_32(LPSTR path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_33 [SHELL32.33]
|
* PathRemoveBlanks [SHELL32.33]
|
||||||
* remove spaces from beginning and end of passed string
|
*
|
||||||
|
* NOTES
|
||||||
|
* remove spaces from beginning and end of passed string
|
||||||
*/
|
*/
|
||||||
LPSTR WINAPI SHELL32_33(LPSTR str) {
|
LPSTR WINAPI PathRemoveBlanks(LPSTR str) {
|
||||||
LPSTR x = str;
|
LPSTR x = str;
|
||||||
|
TRACE(shell,"PathRemoveBlanks %s\n",str);
|
||||||
while (*x==' ') x++;
|
while (*x==' ') x++;
|
||||||
if (x!=str)
|
if (x!=str)
|
||||||
lstrcpy32A(str,x);
|
lstrcpy32A(str,x);
|
||||||
|
@ -153,12 +161,14 @@ LPSTR WINAPI SHELL32_33(LPSTR str) {
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_34 [SHELL32.34]
|
* PathFindFilename [SHELL32.34]
|
||||||
* basename(char *fn);
|
*
|
||||||
|
* NOTES
|
||||||
|
* basename(char *fn);
|
||||||
*/
|
*/
|
||||||
LPSTR WINAPI SHELL32_34(LPSTR fn) {
|
LPSTR WINAPI PathFindFilename(LPSTR fn) {
|
||||||
LPSTR basefn;
|
LPSTR basefn;
|
||||||
|
TRACE(shell,"PathFindFilename %s\n",fn);
|
||||||
basefn = fn;
|
basefn = fn;
|
||||||
while (fn[0]) {
|
while (fn[0]) {
|
||||||
if (((fn[0]=='\\') || (fn[0]==':')) && fn[1] && fn[1]!='\\')
|
if (((fn[0]=='\\') || (fn[0]==':')) && fn[1] && fn[1]!='\\')
|
||||||
|
@ -169,16 +179,18 @@ LPSTR WINAPI SHELL32_34(LPSTR fn) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_35 [SHELL32.35]
|
* PathRemoveFileSpec [SHELL32.35]
|
||||||
* bool getpath(char *pathname); truncates passed argument to a valid path
|
*
|
||||||
* returns if the string was modified or not.
|
* NOTES
|
||||||
* "\foo\xx\foo"-> "\foo\xx"
|
* bool getpath(char *pathname); truncates passed argument to a valid path
|
||||||
* "\" -> "\"
|
* returns if the string was modified or not.
|
||||||
* "a:\foo" -> "a:\"
|
* "\foo\xx\foo"-> "\foo\xx"
|
||||||
|
* "\" -> "\"
|
||||||
|
* "a:\foo" -> "a:\"
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_35(LPSTR fn) {
|
DWORD WINAPI PathRemoveFileSpec(LPSTR fn) {
|
||||||
LPSTR x,cutplace;
|
LPSTR x,cutplace;
|
||||||
|
TRACE(shell,"%s\n",fn);
|
||||||
if (!fn[0])
|
if (!fn[0])
|
||||||
return 0;
|
return 0;
|
||||||
x=fn;
|
x=fn;
|
||||||
|
@ -211,71 +223,84 @@ DWORD WINAPI SHELL32_35(LPSTR fn) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_37 [SHELL32.37]
|
* PathCombine [SHELL32.37]
|
||||||
* concat_paths(char*target,const char*add);
|
*
|
||||||
* concats "target\\add" and writes them to target
|
* NOTES
|
||||||
|
* concat_paths(char*target,const char*add);
|
||||||
|
* concats "target\\add" and writes them to target
|
||||||
*/
|
*/
|
||||||
LPSTR WINAPI SHELL32_37(LPSTR target,LPSTR x1,LPSTR x2) {
|
LPSTR WINAPI PathCombine(LPSTR target,LPSTR x1,LPSTR x2) {
|
||||||
char buf[260];
|
char buf[260];
|
||||||
|
TRACE(shell,"%s %s\n",x1,x2);
|
||||||
if (!x2 || !x2[0]) {
|
if (!x2 || !x2[0]) {
|
||||||
lstrcpy32A(target,x1);
|
lstrcpy32A(target,x1);
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
lstrcpy32A(buf,x1);
|
lstrcpy32A(buf,x1);
|
||||||
SHELL32_32(buf); /* append \ if not there */
|
PathAddBackslash(buf); /* append \ if not there */
|
||||||
lstrcat32A(buf,x2);
|
lstrcat32A(buf,x2);
|
||||||
lstrcpy32A(target,buf);
|
lstrcpy32A(target,buf);
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_36 [SHELL32.36]
|
* PathAppend [SHELL32.36]
|
||||||
* concat_paths(char*target,const char*add);
|
*
|
||||||
* concats "target\\add" and writes them to target
|
* NOTES
|
||||||
|
* concat_paths(char*target,const char*add);
|
||||||
|
* concats "target\\add" and writes them to target
|
||||||
*/
|
*/
|
||||||
LPSTR WINAPI SHELL32_36(LPSTR x1,LPSTR x2) {
|
LPSTR WINAPI PathAppend(LPSTR x1,LPSTR x2) {
|
||||||
|
TRACE(shell,"%s %s\n",x1,x2);
|
||||||
while (x2[0]=='\\') x2++;
|
while (x2[0]=='\\') x2++;
|
||||||
return SHELL32_37(x1,x1,x2);
|
return PathCombine(x1,x1,x2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_39 [SHELL32.39]
|
* PathIsUNC [SHELL32.39]
|
||||||
* isUNC(const char*path);
|
*
|
||||||
|
* NOTES
|
||||||
|
* isUNC(const char*path);
|
||||||
*/
|
*/
|
||||||
BOOL32 WINAPI SHELL32_39(LPCSTR path) {
|
BOOL32 WINAPI PathIsUNC(LPCSTR path) {
|
||||||
|
TRACE(shell,"%s\n",path);
|
||||||
if ((path[0]=='\\') && (path[1]=='\\'))
|
if ((path[0]=='\\') && (path[1]=='\\'))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_45 [SHELL32.45]
|
* PathFileExists [SHELL32.45]
|
||||||
* file_exists(char *fn);
|
*
|
||||||
|
* NOTES
|
||||||
|
* file_exists(char *fn);
|
||||||
*/
|
*/
|
||||||
BOOL32 WINAPI SHELL32_45(LPSTR fn) {
|
BOOL32 WINAPI PathFileExists(LPSTR fn) {
|
||||||
if (GetFileAttributes32A(fn)==-1)
|
TRACE(shell,"%s\n",fn);
|
||||||
|
if (GetFileAttributes32A(fn)==-1)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
else
|
else
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_51 [SHELL32.51]
|
* PathResolve [SHELL32.51]
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_51(LPCSTR s,DWORD x2,DWORD x3) {
|
DWORD WINAPI PathResolve(LPCSTR s,DWORD x2,DWORD x3) {
|
||||||
FIXME(shell,"(%s,0x%08lx,0x%08lx),stub!\n",s,x2,x3);
|
FIXME(shell,"(%s,0x%08lx,0x%08lx),stub!\n",s,x2,x3);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_52 [SHELL32.52]
|
* PathGetArgs [SHELL32.52]
|
||||||
* look for next arg in string. handle "quoted" strings
|
*
|
||||||
* returns pointer to argument *AFTER* the space. Or to the \0.
|
* NOTES
|
||||||
|
* look for next arg in string. handle "quoted" strings
|
||||||
|
* returns pointer to argument *AFTER* the space. Or to the \0.
|
||||||
*/
|
*/
|
||||||
LPSTR WINAPI SHELL32_52(LPSTR cmdline) {
|
LPSTR WINAPI PathGetArgs(LPSTR cmdline) {
|
||||||
BOOL32 qflag = FALSE;
|
BOOL32 qflag = FALSE;
|
||||||
|
TRACE(shell,"%s\n",cmdline);
|
||||||
while (*cmdline) {
|
while (*cmdline) {
|
||||||
if ((*cmdline==' ') && !qflag)
|
if ((*cmdline==' ') && !qflag)
|
||||||
return cmdline+1;
|
return cmdline+1;
|
||||||
|
@ -287,12 +312,14 @@ LPSTR WINAPI SHELL32_52(LPSTR cmdline) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_56 [SHELL32.56]
|
* PathUnquoteSpaces [SHELL32.56]
|
||||||
* unquote string (remove ")
|
*
|
||||||
|
* NOTES
|
||||||
|
* unquote string (remove ")
|
||||||
*/
|
*/
|
||||||
VOID WINAPI SHELL32_56(LPSTR str) {
|
VOID WINAPI PathUnquoteSpaces(LPSTR str) {
|
||||||
DWORD len = lstrlen32A(str);
|
DWORD len = lstrlen32A(str);
|
||||||
|
TRACE(shell,"%s\n",str);
|
||||||
if (*str!='"') return;
|
if (*str!='"') return;
|
||||||
if (str[len-1]!='"') return;
|
if (str[len-1]!='"') return;
|
||||||
str[len-1]='\0';
|
str[len-1]='\0';
|
||||||
|
@ -301,9 +328,10 @@ VOID WINAPI SHELL32_56(LPSTR str) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_58 [SHELL32.58]
|
* ParseField [SHELL32.58]
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_58(LPCSTR src,DWORD x2,LPSTR target,DWORD pathlen) {
|
DWORD WINAPI ParseField(LPCSTR src,DWORD x2,LPSTR target,DWORD pathlen) {
|
||||||
FIXME(shell,"(%s,0x%08lx,%p,%ld):stub.\n",
|
FIXME(shell,"(%s,0x%08lx,%p,%ld):stub.\n",
|
||||||
src,x2,target,pathlen
|
src,x2,target,pathlen
|
||||||
);
|
);
|
||||||
|
@ -313,17 +341,19 @@ DWORD WINAPI SHELL32_58(LPCSTR src,DWORD x2,LPSTR target,DWORD pathlen) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_62 [SHELL32.62]
|
* PickIconDlg [SHELL32.62]
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_62(DWORD x,DWORD y,DWORD z,DWORD a) {
|
DWORD WINAPI PickIconDlg(DWORD x,DWORD y,DWORD z,DWORD a) {
|
||||||
FIXME(shell,"(%08lx,%08lx,%08lx,%08lx):stub.\n",x,y,z,a);
|
FIXME(shell,"(%08lx,%08lx,%08lx,%08lx):stub.\n",x,y,z,a);
|
||||||
return 0xffffffff;
|
return 0xffffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_63 [SHELL32.63]
|
* GetFileNameFromBrowse [SHELL32.63]
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_63(HWND32 howner, LPSTR targetbuf, DWORD len, DWORD x, LPCSTR suffix, LPCSTR y, LPCSTR cmd) {
|
DWORD WINAPI GetFileNameFromBrowse(HWND32 howner, LPSTR targetbuf, DWORD len, DWORD x, LPCSTR suffix, LPCSTR y, LPCSTR cmd) {
|
||||||
FIXME(shell,"(%04x,%p,%ld,%08lx,%s,%s,%s):stub.\n",
|
FIXME(shell,"(%04x,%p,%ld,%08lx,%s,%s,%s):stub.\n",
|
||||||
howner,targetbuf,len,x,suffix,y,cmd
|
howner,targetbuf,len,x,suffix,y,cmd
|
||||||
);
|
);
|
||||||
|
@ -334,36 +364,42 @@ DWORD WINAPI SHELL32_63(HWND32 howner, LPSTR targetbuf, DWORD len, DWORD x, LPCS
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_68 [SHELL32.68]
|
* SHGetSettings [SHELL32.68]
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_68(DWORD x,DWORD y,DWORD z) {
|
DWORD WINAPI SHGetSettings(DWORD x,DWORD y,DWORD z) {
|
||||||
FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx):stub.\n",
|
FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx):stub.\n",
|
||||||
x,y,z
|
x,y,z
|
||||||
);
|
);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_71 [SHELL32.71]
|
* Shell_GetImageList [SHELL32.71]
|
||||||
* returns internal shell values in the passed pointers
|
*
|
||||||
|
* NOTES
|
||||||
|
* returns internal shell values in the passed pointers
|
||||||
*/
|
*/
|
||||||
BOOL32 WINAPI SHELL32_71(LPDWORD x,LPDWORD y) {
|
BOOL32 WINAPI Shell_GetImageList(LPDWORD x,LPDWORD y) {
|
||||||
|
|
||||||
FIXME(shell,"(%p,%p):stub.\n",x,y);
|
FIXME(shell,"(%p,%p):stub.\n",x,y);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_72 [SHELL32.72]
|
* Shell_GetCachedImageIndex [SHELL32.72]
|
||||||
* dunno. something with icons
|
*
|
||||||
*/
|
*/
|
||||||
void WINAPI SHELL32_72(LPSTR x,DWORD y,DWORD z) {
|
void WINAPI Shell_GetCachedImageIndex(LPSTR x,DWORD y,DWORD z) {
|
||||||
FIXME(shell,"(%s,%08lx,%08lx):stub.\n",x,y,z);
|
FIXME(shell,"(%s,%08lx,%08lx):stub.\n",x,y,z);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_89 [SHELL32.89]
|
* SHCloneSpecialIDList [SHELL32.89]
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_89(DWORD x1,DWORD x2,DWORD x3) {
|
DWORD WINAPI SHCloneSpecialIDList(DWORD x1,DWORD x2,DWORD x3) {
|
||||||
FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx):stub.\n",
|
FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx):stub.\n",
|
||||||
x1,x2,x3
|
x1,x2,x3
|
||||||
);
|
);
|
||||||
|
@ -371,58 +407,70 @@ DWORD WINAPI SHELL32_89(DWORD x1,DWORD x2,DWORD x3) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_119 [SHELL32.119]
|
* IsLFNDrive [SHELL32.119]
|
||||||
* unknown
|
*
|
||||||
|
* NOTES
|
||||||
|
* exported by ordinal Name
|
||||||
*/
|
*/
|
||||||
void WINAPI SHELL32_119(LPVOID x) {
|
void WINAPI IsLFNDrive(LPVOID x) {
|
||||||
FIXME(shell,"(%p(%s)):stub.\n",x,(char *)x);
|
FIXME(shell,"(%p(%s)):stub.\n",x,(char *)x);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_175 [SHELL32.175]
|
* SHGetSpecialFolderPath [SHELL32.175]
|
||||||
* unknown
|
*
|
||||||
|
* NOTES
|
||||||
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
void WINAPI SHELL32_175(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
|
void WINAPI SHGetSpecialFolderPath(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
|
||||||
FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub.\n",
|
FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub.\n",
|
||||||
x1,x2,x3,x4
|
x1,x2,x3,x4
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_181 [SHELL32.181]
|
* RegisterShellHook [SHELL32.181]
|
||||||
* unknown
|
|
||||||
*
|
*
|
||||||
* PARAMS
|
* PARAMS
|
||||||
* hwnd [I] window handle
|
* hwnd [I] window handle
|
||||||
* y [I] flag ????
|
* y [I] flag ????
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Original name: RegisterShellHook (exported by ordinal)
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
void WINAPI SHELL32_181(HWND32 hwnd, DWORD y) {
|
void WINAPI RegisterShellHook32(HWND32 hwnd, DWORD y) {
|
||||||
FIXME(shell,"(0x%08lx,0x%08x):stub.\n",hwnd,y);
|
FIXME(shell,"(0x%08x,0x%08lx):stub.\n",hwnd,y);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_75 [SHELL32.75]
|
* PathYetAnotherMakeUniqueName [SHELL32.75]
|
||||||
* unknown
|
*
|
||||||
|
* NOTES
|
||||||
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
BOOL32 WINAPI SHELL32_75(LPDWORD x,LPDWORD y) {
|
BOOL32 WINAPI PathYetAnotherMakeUniqueName(LPDWORD x,LPDWORD y) {
|
||||||
FIXME(shell,"(%p,%p):stub.\n",x,y);
|
FIXME(shell,"(%p,%p):stub.\n",x,y);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_77 [SHELL32.77]
|
* SHMapPIDLToSystemImageListIndex [SHELL32.77]
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_77(DWORD x,DWORD y,DWORD z) {
|
DWORD WINAPI
|
||||||
|
SHMapPIDLToSystemImageListIndex(DWORD x,DWORD y,DWORD z) {
|
||||||
FIXME(shell,"(%08lx,%08lx,%08lx):stub.\n",x,y,z);
|
FIXME(shell,"(%08lx,%08lx,%08lx):stub.\n",x,y,z);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_79 [SHELL32.79]
|
* SHELL32_79 [SHELL32.79]
|
||||||
* create_directory_and_notify(...)
|
* create_directory_and_notify(...)
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* (isn't it StrToOleStrN ??? jsch)
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_79(LPCSTR dir,LPVOID xvoid) {
|
DWORD WINAPI SHELL32_79(LPCSTR dir,LPVOID xvoid) {
|
||||||
TRACE(shell,"mkdir %s,%p\n",dir,xvoid);
|
TRACE(shell,"mkdir %s,%p\n",dir,xvoid);
|
||||||
|
@ -432,6 +480,9 @@ DWORD WINAPI SHELL32_79(LPCSTR dir,LPVOID xvoid) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
*
|
||||||
|
*/
|
||||||
typedef DWORD (* WINAPI GetClassPtr)(REFCLSID,REFIID,LPVOID);
|
typedef DWORD (* WINAPI GetClassPtr)(REFCLSID,REFIID,LPVOID);
|
||||||
|
|
||||||
static GetClassPtr SH_find_moduleproc(LPSTR dllname,HMODULE32 *xhmod,
|
static GetClassPtr SH_find_moduleproc(LPSTR dllname,HMODULE32 *xhmod,
|
||||||
|
@ -441,7 +492,7 @@ static GetClassPtr SH_find_moduleproc(LPSTR dllname,HMODULE32 *xhmod,
|
||||||
FARPROC32 dllunload,nameproc;
|
FARPROC32 dllunload,nameproc;
|
||||||
|
|
||||||
if (xhmod) *xhmod = 0;
|
if (xhmod) *xhmod = 0;
|
||||||
if (!strcasecmp(SHELL32_34(dllname),"shell32.dll"))
|
if (!strcasecmp(PathFindFilename(dllname),"shell32.dll"))
|
||||||
return (GetClassPtr)SHELL32_DllGetClassObject;
|
return (GetClassPtr)SHELL32_DllGetClassObject;
|
||||||
|
|
||||||
hmod = LoadLibraryEx32A(dllname,0,LOAD_WITH_ALTERED_SEARCH_PATH);
|
hmod = LoadLibraryEx32A(dllname,0,LOAD_WITH_ALTERED_SEARCH_PATH);
|
||||||
|
@ -458,7 +509,9 @@ static GetClassPtr SH_find_moduleproc(LPSTR dllname,HMODULE32 *xhmod,
|
||||||
/* register unloadable dll with unloadproc ... */
|
/* register unloadable dll with unloadproc ... */
|
||||||
return (GetClassPtr)nameproc;
|
return (GetClassPtr)nameproc;
|
||||||
}
|
}
|
||||||
|
/*************************************************************************
|
||||||
|
*
|
||||||
|
*/
|
||||||
static DWORD SH_get_instance(REFCLSID clsid,LPSTR dllname,
|
static DWORD SH_get_instance(REFCLSID clsid,LPSTR dllname,
|
||||||
LPVOID unknownouter,REFIID refiid,LPVOID inst
|
LPVOID unknownouter,REFIID refiid,LPVOID inst
|
||||||
) {
|
) {
|
||||||
|
@ -466,6 +519,8 @@ static DWORD SH_get_instance(REFCLSID clsid,LPSTR dllname,
|
||||||
DWORD hres;
|
DWORD hres;
|
||||||
LPCLASSFACTORY classfac;
|
LPCLASSFACTORY classfac;
|
||||||
|
|
||||||
|
TRACE(shell,"%s\n",dllname);
|
||||||
|
|
||||||
dllgetclassob = SH_find_moduleproc(dllname,NULL,"DllGetClassObject");
|
dllgetclassob = SH_find_moduleproc(dllname,NULL,"DllGetClassObject");
|
||||||
if (!dllgetclassob)
|
if (!dllgetclassob)
|
||||||
return 0x80070000|GetLastError();
|
return 0x80070000|GetLastError();
|
||||||
|
@ -490,10 +545,12 @@ static DWORD SH_get_instance(REFCLSID clsid,LPSTR dllname,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_102 [SHELL32.102]
|
* SHCoCreateInstance [SHELL32.102]
|
||||||
* unknown
|
*
|
||||||
|
* NOTES
|
||||||
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
LRESULT WINAPI SHELL32_102(
|
LRESULT WINAPI SHCoCreateInstance(
|
||||||
LPSTR aclsid,CLSID *clsid,LPUNKNOWN unknownouter,REFIID refiid,LPVOID inst
|
LPSTR aclsid,CLSID *clsid,LPUNKNOWN unknownouter,REFIID refiid,LPVOID inst
|
||||||
) {
|
) {
|
||||||
char buffer[256],xclsid[48],xiid[48],path[260],tmodel[100];
|
char buffer[256],xclsid[48],xiid[48],path[260],tmodel[100];
|
||||||
|
@ -510,9 +567,7 @@ LRESULT WINAPI SHELL32_102(
|
||||||
return 0x80040154;
|
return 0x80040154;
|
||||||
strcpy(xclsid,aclsid);
|
strcpy(xclsid,aclsid);
|
||||||
}
|
}
|
||||||
TRACE(shell,"(%p,%s,%p,%s,%p)\n",
|
TRACE(shell,"(%p,\n\tSID:\t%s,%p,\n\tIID:\t%s,%p)\n",aclsid,xclsid,unknownouter,xiid,inst);
|
||||||
aclsid,xclsid,unknownouter,xiid,inst
|
|
||||||
);
|
|
||||||
|
|
||||||
sprintf(buffer,"CLSID\\%s\\InProcServer32",xclsid);
|
sprintf(buffer,"CLSID\\%s\\InProcServer32",xclsid);
|
||||||
if (RegOpenKeyEx32A(HKEY_CLASSES_ROOT,buffer,0,0x02000000,&inprockey))
|
if (RegOpenKeyEx32A(HKEY_CLASSES_ROOT,buffer,0,0x02000000,&inprockey))
|
||||||
|
@ -539,21 +594,23 @@ LRESULT WINAPI SHELL32_102(
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_183 [SHELL32.183]
|
* ShellMessageBoxA [SHELL32.183]
|
||||||
|
*
|
||||||
* Format and output errormessage.
|
* Format and output errormessage.
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Original name: ShellMessageBoxA
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
void __cdecl SHELL32_183(HMODULE32 hmod,HWND32 hwnd,DWORD id,DWORD x,DWORD type,LPVOID arglist) {
|
void __cdecl
|
||||||
|
ShellMessageBoxA(HMODULE32 hmod,HWND32 hwnd,DWORD id,DWORD x,DWORD type,LPVOID arglist) {
|
||||||
char buf[100],buf2[100],*buf3;
|
char buf[100],buf2[100],*buf3;
|
||||||
LPVOID args = &arglist;
|
LPVOID args = &arglist;
|
||||||
|
|
||||||
if (!LoadString32A(hmod,x,buf,100))
|
if (!LoadString32A(hmod,x,buf,100))
|
||||||
strcpy(buf,"Desktop");
|
strcpy(buf,"Desktop");
|
||||||
LoadString32A(hmod,id,buf2,100);
|
// LoadString32A(hmod,id,buf2,100);
|
||||||
/* FIXME: the varargs handling doesn't. */
|
/* FIXME: the varargs handling doesn't. */
|
||||||
FormatMessage32A(0x500,buf2,0,0,(LPSTR)&buf3,256,(LPDWORD)&args);
|
// FormatMessage32A(0x500,buf2,0,0,(LPSTR)&buf3,256,(LPDWORD)&args);
|
||||||
|
|
||||||
FIXME(shell,"(%08lx,%08lx,%08lx(%s),%08lx(%s),%08lx,%p):stub.\n",
|
FIXME(shell,"(%08lx,%08lx,%08lx(%s),%08lx(%s),%08lx,%p):stub.\n",
|
||||||
(DWORD)hmod,(DWORD)hwnd,id,buf2,x,buf,type,arglist
|
(DWORD)hmod,(DWORD)hwnd,id,buf2,x,buf,type,arglist
|
||||||
|
@ -563,7 +620,8 @@ void __cdecl SHELL32_183(HMODULE32 hmod,HWND32 hwnd,DWORD id,DWORD x,DWORD type,
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_100 [SHELL32.100]
|
* SHRestricted [SHELL32.100]
|
||||||
|
*
|
||||||
* walks through policy table, queries <app> key, <type> value, returns
|
* walks through policy table, queries <app> key, <type> value, returns
|
||||||
* queried (DWORD) value.
|
* queried (DWORD) value.
|
||||||
* {0x00001,Explorer,NoRun}
|
* {0x00001,Explorer,NoRun}
|
||||||
|
@ -586,8 +644,11 @@ void __cdecl SHELL32_183(HMODULE32 hmod,HWND32 hwnd,DWORD id,DWORD x,DWORD type,
|
||||||
* {0x20000,Explorer,NoStartMenuSubFolders}
|
* {0x20000,Explorer,NoStartMenuSubFolders}
|
||||||
* {0x40000,Explorer,MyDocsOnNet}
|
* {0x40000,Explorer,MyDocsOnNet}
|
||||||
* {0x80000,WinOldApp,NoRealMode}
|
* {0x80000,WinOldApp,NoRealMode}
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_100(DWORD pol) {
|
DWORD WINAPI SHRestricted (DWORD pol) {
|
||||||
HKEY xhkey;
|
HKEY xhkey;
|
||||||
|
|
||||||
FIXME(shell,"(%08lx):stub.\n",pol);
|
FIXME(shell,"(%08lx):stub.\n",pol);
|
||||||
|
@ -596,17 +657,18 @@ DWORD WINAPI SHELL32_100(DWORD pol) {
|
||||||
/* FIXME: do nothing for now, just return 0 (== "allowed") */
|
/* FIXME: do nothing for now, just return 0 (== "allowed") */
|
||||||
RegCloseKey(xhkey);
|
RegCloseKey(xhkey);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_152 [SHELL32.152]
|
* ILGetSize [SHELL32.152]
|
||||||
* itemlist_length
|
*
|
||||||
|
* NOTES
|
||||||
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_152(LPITEMIDLIST iil) {
|
DWORD WINAPI ILGetSize(LPITEMIDLIST iil) {
|
||||||
LPSHITEMID si;
|
LPSHITEMID si;
|
||||||
DWORD len;
|
DWORD len;
|
||||||
|
TRACE(shell,"%p\n",iil);
|
||||||
if (!iil)
|
if (!iil)
|
||||||
return 0;
|
return 0;
|
||||||
si = &(iil->mkid);
|
si = &(iil->mkid);
|
||||||
|
@ -619,96 +681,114 @@ DWORD WINAPI SHELL32_152(LPITEMIDLIST iil) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_158 [SHELL32.158]
|
* PathGetExtension [SHELL32.158]
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
LPSTR WINAPI SHELL32_158(LPSTR path,DWORD y,DWORD z) {
|
LPSTR WINAPI PathGetExtension(LPSTR path,DWORD y,DWORD z) {
|
||||||
TRACE(shell,"(%s,%08lx,%08lx)\n",path,y,z);
|
TRACE(shell,"(%s,%08lx,%08lx)\n",path,y,z);
|
||||||
path = SHELL32_31(path);
|
path = PathFindExtension(path);
|
||||||
return *path?(path+1):path;
|
return *path?(path+1):path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_165 [SHELL32.165]
|
* SHCreateDirectory [SHELL32.165]
|
||||||
* create_path_and_notify(...)
|
*
|
||||||
|
* NOTES
|
||||||
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_165(DWORD x,LPCSTR path) {
|
DWORD WINAPI SHCreateDirectory(DWORD x,LPCSTR path) {
|
||||||
|
TRACE(shell,"(%08lx,%s):stub.\n",x,path);
|
||||||
|
if (CreateDirectory32A(path,x))
|
||||||
|
return TRUE;
|
||||||
|
/* SHChangeNotify(8,1,path,0); */
|
||||||
|
return FALSE;
|
||||||
|
#if 0
|
||||||
if (SHELL32_79(path,(LPVOID)x))
|
if (SHELL32_79(path,(LPVOID)x))
|
||||||
return 0;
|
return 0;
|
||||||
FIXME(shell,"(%08lx,%s):stub.\n",x,path);
|
FIXME(shell,"(%08lx,%s):stub.\n",x,path);
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_195 [SHELL32.195]
|
* SHFree [SHELL32.195]
|
||||||
* free_ptr() - frees memory using IMalloc
|
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Original name: SHFree (exported by ordinal)
|
* free_ptr() - frees memory using IMalloc
|
||||||
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_195(LPVOID x) {
|
DWORD WINAPI SHFree(LPVOID x) {
|
||||||
|
TRACE(shell,"%p\n",x);
|
||||||
return LocalFree32((HANDLE32)x);
|
return LocalFree32((HANDLE32)x);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_196 [SHELL32.196]
|
* SHAlloc [SHELL32.196]
|
||||||
* void *task_alloc(DWORD len), uses SHMalloc allocator
|
*
|
||||||
|
* NOTES
|
||||||
|
* void *task_alloc(DWORD len), uses SHMalloc allocator
|
||||||
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
LPVOID WINAPI SHELL32_196(DWORD len) {
|
LPVOID WINAPI SHAlloc(DWORD len) {
|
||||||
|
TRACE(shell,"%lu\n",len);
|
||||||
return (LPVOID)LocalAlloc32(len,LMEM_ZEROINIT); /* FIXME */
|
return (LPVOID)LocalAlloc32(len,LMEM_ZEROINIT); /* FIXME */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_18 [SHELL32.18]
|
* ILClone [SHELL32.18]
|
||||||
* copy_itemidlist()
|
*
|
||||||
*/
|
*/
|
||||||
LPITEMIDLIST WINAPI SHELL32_18(LPITEMIDLIST iil) {
|
LPITEMIDLIST WINAPI ILClone (LPITEMIDLIST iil) {
|
||||||
DWORD len;
|
DWORD len;
|
||||||
LPITEMIDLIST newiil;
|
LPITEMIDLIST newiil;
|
||||||
|
TRACE(shell,"%p\n",iil);
|
||||||
len = SHELL32_152(iil);
|
len = ILGetSize(iil);
|
||||||
newiil = (LPITEMIDLIST)SHELL32_196(len);
|
newiil = (LPITEMIDLIST)SHAlloc(len);
|
||||||
if (newiil)
|
if (newiil)
|
||||||
memcpy(newiil,iil,len);
|
memcpy(newiil,iil,len);
|
||||||
return newiil;
|
return newiil;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_25 [SHELL32.25]
|
* ILCombine [SHELL32.25]
|
||||||
* merge_itemidlist()
|
*
|
||||||
*/
|
*/
|
||||||
LPITEMIDLIST WINAPI SHELL32_25(LPITEMIDLIST iil1,LPITEMIDLIST iil2) {
|
LPITEMIDLIST WINAPI ILCombine(LPITEMIDLIST iil1,LPITEMIDLIST iil2) {
|
||||||
DWORD len1,len2;
|
DWORD len1,len2;
|
||||||
LPITEMIDLIST newiil;
|
LPITEMIDLIST newiil;
|
||||||
|
TRACE(shell,"%p %p\n",iil1,iil2);
|
||||||
len1 = SHELL32_152(iil1)-2;
|
len1 = ILGetSize(iil1)-2;
|
||||||
len2 = SHELL32_152(iil2);
|
len2 = ILGetSize(iil2);
|
||||||
newiil = SHELL32_196(len1+len2);
|
newiil = SHAlloc(len1+len2);
|
||||||
memcpy(newiil,iil1,len1);
|
memcpy(newiil,iil1,len1);
|
||||||
memcpy(((char*)newiil)+len1,iil2,len2);
|
memcpy(((char*)newiil)+len1,iil2,len2);
|
||||||
return newiil;
|
return newiil;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_155 [SHELL32.155]
|
* ILFree [SHELL32.155]
|
||||||
* free_check_ptr - frees memory (if not NULL) allocated by SHMalloc allocator
|
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Original name: ILFree (exported by ordinal)
|
* free_check_ptr - frees memory (if not NULL)
|
||||||
|
* allocated by SHMalloc allocator
|
||||||
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_155(LPVOID x) {
|
DWORD WINAPI ILFree(LPVOID x) {
|
||||||
FIXME (shell,"(0x%08lx):stub.\n", (DWORD)x);
|
FIXME (shell,"(0x%08lx):stub.\n", (DWORD)x);
|
||||||
// if (!x)
|
if (!x)
|
||||||
return 0;
|
return 0;
|
||||||
// return SHELL32_195(x);
|
return SHFree(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_85 [SHELL32.85]
|
* OpenRegStream [SHELL32.85]
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Original name: OpenRegStream (exported by ordinal)
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_85(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
|
DWORD WINAPI OpenRegStream(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
|
||||||
FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub.\n",
|
FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub.\n",
|
||||||
x1,x2,x3,x4
|
x1,x2,x3,x4
|
||||||
);
|
);
|
||||||
|
@ -716,38 +796,36 @@ DWORD WINAPI SHELL32_85(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_86 [SHELL32.86]
|
* SHRegisterDragDrop [SHELL32.86]
|
||||||
* unknown
|
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Original name: SHRegisterDragDrop (exported by ordinal)
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_86(HWND32 hwnd,DWORD x2) {
|
DWORD WINAPI SHRegisterDragDrop(HWND32 hwnd,DWORD x2) {
|
||||||
FIXME (shell, "(0x%08lx,0x%08x):stub.\n", hwnd, x2);
|
FIXME (shell, "(0x%08x,0x%08lx):stub.\n", hwnd, x2);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_87 [SHELL32.87]
|
* SHRevokeDragDrop [SHELL32.87]
|
||||||
* unknown
|
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Original name: SHRevokeDragDrop (exported by ordinal)
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI SHELL32_87(DWORD x) {
|
DWORD WINAPI SHRevokeDragDrop(DWORD x) {
|
||||||
FIXME(shell,"(0x%08lx):stub.\n",x);
|
FIXME(shell,"(0x%08lx):stub.\n",x);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_61 [SHELL32.61]
|
* RunFileDlg [SHELL32.61]
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Original name: RunFileDlg (exported by ordinal)
|
* Original name: RunFileDlg (exported by ordinal)
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI
|
DWORD WINAPI
|
||||||
SHELL32_61 (HWND32 hwndOwner, DWORD dwParam1, DWORD dwParam2,
|
RunFileDlg (HWND32 hwndOwner, DWORD dwParam1, DWORD dwParam2,
|
||||||
LPSTR lpszTitle, LPSTR lpszPrompt, UINT32 uFlags)
|
LPSTR lpszTitle, LPSTR lpszPrompt, UINT32 uFlags)
|
||||||
{
|
{
|
||||||
FIXME (shell,"(0x%08x 0x%lx 0x%lx \"%s\" \"%s\" 0x%x):stub.\n",
|
FIXME (shell,"(0x%08x 0x%lx 0x%lx \"%s\" \"%s\" 0x%x):stub.\n",
|
||||||
|
@ -757,11 +835,13 @@ SHELL32_61 (HWND32 hwndOwner, DWORD dwParam1, DWORD dwParam2,
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_60 [SHELL32.60]
|
* ExitWindowsDialog [SHELL32.60]
|
||||||
* Shell/Shutdown-Dialog
|
*
|
||||||
|
* NOTES
|
||||||
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI
|
DWORD WINAPI
|
||||||
SHELL32_60 (HWND32 hwndOwner)
|
ExitWindowsDialog (HWND32 hwndOwner)
|
||||||
{
|
{
|
||||||
FIXME (shell,"(0x%08x):stub.\n", hwndOwner);
|
FIXME (shell,"(0x%08x):stub.\n", hwndOwner);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -769,12 +849,12 @@ SHELL32_60 (HWND32 hwndOwner)
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_184 [SHELL32.184]
|
* ArrangeWindows [SHELL32.184]
|
||||||
* unknown
|
*
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI
|
DWORD WINAPI
|
||||||
SHELL32_184 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3,
|
ArrangeWindows (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3,
|
||||||
DWORD dwParam4, DWORD dwParam5)
|
DWORD dwParam4, DWORD dwParam5)
|
||||||
{
|
{
|
||||||
FIXME (shell,"(0x%lx 0x%lx 0x%lx 0x%lx 0x%lx):stub.\n",
|
FIXME (shell,"(0x%lx 0x%lx 0x%lx 0x%lx 0x%lx):stub.\n",
|
||||||
dwParam1, dwParam2, dwParam3, dwParam4, dwParam5);
|
dwParam1, dwParam2, dwParam3, dwParam4, dwParam5);
|
||||||
|
@ -783,15 +863,33 @@ SHELL32_184 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3,
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* SHELL32_147 [SHELL32.147]
|
* SHCLSIDFromString [SHELL32.147]
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Original name: SHCLSIDFromString (exported by ordinal)
|
* exported by ordinal
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI
|
DWORD WINAPI
|
||||||
SHELL32_147 (DWORD dwParam1, DWORD dwParam2)
|
SHCLSIDFromString (DWORD dwParam1, DWORD dwParam2)
|
||||||
{
|
{
|
||||||
FIXME (shell,"(0x%lx 0x%lx):stub.\n", dwParam1, dwParam2);
|
FIXME (shell,"(0x%lx 0x%lx):stub.\n", dwParam1, dwParam2);
|
||||||
|
|
||||||
|
FIXME (shell,"(\"%s\" \"%s\"):stub.\n", (LPSTR)dwParam1, (LPSTR)dwParam2);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* SignalFileOpen [SHELL32.103]
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* exported by ordinal
|
||||||
|
*/
|
||||||
|
DWORD WINAPI
|
||||||
|
SignalFileOpen (DWORD dwParam1)
|
||||||
|
{
|
||||||
|
FIXME (shell,"(0x%08lx):stub.\n", dwParam1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
32
misc/spy.c
32
misc/spy.c
|
@ -492,10 +492,34 @@ static const char * const MessageTypeNames[SPY_MAX_MSGNUM + 1] =
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
"WM_QUERYAFXWNDPROC", /* 0x0360 */
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
"WM_SIZEPARENT", /* 0x0361 */
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
"WM_SETMESSAGESTRING", /* 0x0362 */
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
"WM_IDLEUPDATECMDUI", /* 0x0363 */
|
||||||
|
"WM_INITIALUPDATE", /* 0x0364 */
|
||||||
|
"WM_COMMANDHELP", /* 0x0365 */
|
||||||
|
"WM_HELPHITTEST", /* 0x0366 */
|
||||||
|
"WM_EXITHELPMODE", /* 0x0367 */
|
||||||
|
"WM_RECALCPARENT", /* 0x0368 */
|
||||||
|
"WM_SIZECHILD", /* 0x0369 */
|
||||||
|
"WM_KICKIDLE", /* 0x036A */
|
||||||
|
"WM_QUERYCENTERWND", /* 0x036B */
|
||||||
|
"WM_DISABLEMODAL", /* 0x036C */
|
||||||
|
"WM_FLOATSTATUS", /* 0x036D */
|
||||||
|
"WM_ACTIVATETOPLEVEL", /* 0x036E */
|
||||||
|
"WM_QUERY3DCONTROLS", /* 0x036F */
|
||||||
|
NULL,NULL,NULL,
|
||||||
|
"WM_SOCKET_NOTIFY", /* 0x0373 */
|
||||||
|
"WM_SOCKET_DEAD", /* 0x0374 */
|
||||||
|
"WM_POPMESSAGESTRING", /* 0x0375 */
|
||||||
|
"WM_OCC_LOADFROMSTREAM", /* 0x0376 */
|
||||||
|
"WM_OCC_LOADFROMSTORAGE", /* 0x0377 */
|
||||||
|
"WM_OCC_INITNEW", /* 0x0378 */
|
||||||
|
"WM_QUEUE_SENTINEL", /* 0x0379 */
|
||||||
|
"WM_OCC_LOADFROMSTREAM_EX", /* 0x037A */
|
||||||
|
"WM_OCC_LOADFROMSTORAGE_EX", /* 0x037B */
|
||||||
|
|
||||||
|
NULL,NULL,NULL,NULL,
|
||||||
|
|
||||||
/* 0x0380 */
|
/* 0x0380 */
|
||||||
"WM_PENWINFIRST",
|
"WM_PENWINFIRST",
|
||||||
|
|
|
@ -6,6 +6,7 @@ VPATH = @srcdir@
|
||||||
MODULE = msdos
|
MODULE = msdos
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
|
cdrom.c \
|
||||||
dosmem.c \
|
dosmem.c \
|
||||||
dpmi.c \
|
dpmi.c \
|
||||||
int10.c \
|
int10.c \
|
||||||
|
|
|
@ -0,0 +1,303 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Cdrom - device driver emulation - Audio features.
|
||||||
|
* (c) 1998 Petr Tomasek <tomasek@etf.cuni.cz>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef linux
|
||||||
|
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
/* FIXME - how to make this OS independent ?? */
|
||||||
|
#include <linux/cdrom.h>
|
||||||
|
#include <linux/ucdrom.h>
|
||||||
|
|
||||||
|
#include "ldt.h"
|
||||||
|
#include "drive.h"
|
||||||
|
#include "msdos.h"
|
||||||
|
#include "miscemu.h"
|
||||||
|
#include "module.h"
|
||||||
|
/* #define DEBUG_INT */
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* FIXME - more general ?? */
|
||||||
|
#define cdrom_dev "/dev/cdrom"
|
||||||
|
|
||||||
|
u_char cdrom_a_status (int fd)
|
||||||
|
{
|
||||||
|
struct cdrom_subchnl sc;
|
||||||
|
|
||||||
|
ioctl(fd,CDROMSUBCHNL,&sc);
|
||||||
|
return sc.cdsc_audiostatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
BYTE * get_io_stru (WORD * reqh,int dorealmode)
|
||||||
|
{
|
||||||
|
WORD ofst,segm;
|
||||||
|
BYTE * io_stru;
|
||||||
|
ofst = reqh[7]; segm = reqh[8];
|
||||||
|
|
||||||
|
if (dorealmode)
|
||||||
|
io_stru = DOSMEM_MapRealToLinear (MAKELONG(ofst,segm));
|
||||||
|
else
|
||||||
|
io_stru = PTR_SEG_OFF_TO_LIN(segm,ofst);
|
||||||
|
|
||||||
|
return io_stru;
|
||||||
|
}
|
||||||
|
|
||||||
|
DWORD msf0_to_abs (struct cdrom_msf0 msf)
|
||||||
|
{
|
||||||
|
return (msf.minute *60 +
|
||||||
|
msf.second) *75 +
|
||||||
|
msf.frame-150;
|
||||||
|
}
|
||||||
|
|
||||||
|
void abs_to_msf0 (DWORD abs, struct cdrom_msf0 * msf)
|
||||||
|
{
|
||||||
|
DWORD d;
|
||||||
|
d=abs+150;
|
||||||
|
msf->frame=d%75; d=d/75;
|
||||||
|
msf->second=d%60; msf->minute=d/60;
|
||||||
|
}
|
||||||
|
|
||||||
|
void msf0_to_msf (struct cdrom_msf0 from, struct cdrom_msf0 to, struct cdrom_msf * msf)
|
||||||
|
{
|
||||||
|
msf->cdmsf_min0=from.minute;
|
||||||
|
msf->cdmsf_min1=to.minute;
|
||||||
|
msf->cdmsf_sec0=from.second;
|
||||||
|
msf->cdmsf_sec1=to.second;
|
||||||
|
msf->cdmsf_frame0=from.frame;
|
||||||
|
msf->cdmsf_frame1=to.frame;
|
||||||
|
}
|
||||||
|
|
||||||
|
void abs_to_msf (DWORD from, DWORD to, struct cdrom_msf * msf)
|
||||||
|
{
|
||||||
|
struct cdrom_msf0 fr,tt;
|
||||||
|
abs_to_msf0(from, &fr);
|
||||||
|
abs_to_msf0(to, &tt);
|
||||||
|
msf0_to_msf(fr,tt,msf);
|
||||||
|
}
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
*
|
||||||
|
* Cdrom ms-dos driver emulation.
|
||||||
|
* (accesible throught the MSCDEX 0x10 function.)
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern void do_mscdex_dd (CONTEXT * context, int dorealmode)
|
||||||
|
{
|
||||||
|
BYTE * driver_request;
|
||||||
|
BYTE * io_stru;
|
||||||
|
static int fdcd=-1; /* file descriptor.. */
|
||||||
|
struct cdrom_tochdr tochdr; /* the Toc header */
|
||||||
|
struct cdrom_tocentry tocentry; /* a Toc entry */
|
||||||
|
struct cdrom_msf msf;
|
||||||
|
struct cdrom_subchnl subchnl;
|
||||||
|
u_char Error=255; /*No Error */
|
||||||
|
|
||||||
|
if (dorealmode)
|
||||||
|
driver_request=DOSMEM_MapRealToLinear
|
||||||
|
(MAKELONG(BX_reg(context),ES_reg(context)));
|
||||||
|
else
|
||||||
|
driver_request=PTR_SEG_OFF_TO_LIN(ES_reg(context),BX_reg(context));
|
||||||
|
|
||||||
|
if (!driver_request)
|
||||||
|
{ /* FIXME - to be deleted ?? */
|
||||||
|
ERR(int," ES:BX==0 ! SEGFAULT ?\n");
|
||||||
|
ERR(int," -->BX=0x%04X, ES=0x%04X, DS=0x%04X, CX=0x%04X\n\n",
|
||||||
|
BX_reg(context),
|
||||||
|
ES_reg(context),
|
||||||
|
DS_reg(context),
|
||||||
|
CX_reg(context));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
|
||||||
|
/* FIXME - would be best to open the device at the begining of the wine
|
||||||
|
session .... */
|
||||||
|
if (fdcd<0) fdcd=open(cdrom_dev,O_RDONLY);
|
||||||
|
|
||||||
|
TRACE(int,"CDROM device driver -> command <%d>\n",
|
||||||
|
(unsigned char)driver_request[2]);
|
||||||
|
|
||||||
|
/* set status to 0 */
|
||||||
|
driver_request[3]=0;
|
||||||
|
driver_request[4]=0;
|
||||||
|
|
||||||
|
|
||||||
|
switch(driver_request[2])
|
||||||
|
{
|
||||||
|
case 3:
|
||||||
|
io_stru=get_io_stru((WORD *)driver_request,dorealmode);
|
||||||
|
FIXME(int," --> IOCTL INPUT <%d>\n",io_stru[0]);
|
||||||
|
switch (io_stru[0])
|
||||||
|
{
|
||||||
|
case 1: /* location of head */
|
||||||
|
if (io_stru[1]==0)
|
||||||
|
{
|
||||||
|
ioctl(fdcd,CDROMSUBCHNL,&subchnl);
|
||||||
|
((DWORD*)io_stru+2)[0]=(DWORD)msf0_to_abs(subchnl.cdsc_absaddr.msf);
|
||||||
|
FIXME(int," ----> HEAD LOCATION <%ld>\n\n",
|
||||||
|
((DWORD *)io_stru+2)[0]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ERR(int,"CDRom-Driver: Unsupported address mode !!\n");
|
||||||
|
Error=0x0c;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 6: /* device status */
|
||||||
|
/* FIXME .. does this work properly ?? */
|
||||||
|
io_stru[3]=io_stru[4]=0;
|
||||||
|
io_stru[2]=1; /* supports audio channels (?? FIXME ??) */
|
||||||
|
io_stru[1]=16; /* data read and plays audio racks */
|
||||||
|
io_stru[1]|=(ioctl(fdcd,CDROM_DRIVE_STATUS,0)==CDS_TRAY_OPEN);
|
||||||
|
TRACE(int," ----> DEVICE STATUS <0x%08X>\n\n",(DWORD)io_stru[1]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 9: /* media changed ? */
|
||||||
|
if (ioctl(fdcd,CDROM_MEDIA_CHANGED,0))
|
||||||
|
io_stru[1]=0xff;
|
||||||
|
else
|
||||||
|
io_stru[0]=0; /* FIXME? 1? */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 10: /* audio disk info */
|
||||||
|
ioctl(fdcd,CDROMREADTOCHDR,&tochdr);
|
||||||
|
io_stru[1]=tochdr.cdth_trk0; /* staring track of the disc */
|
||||||
|
io_stru[2]=tochdr.cdth_trk1; /* ending track */
|
||||||
|
tocentry.cdte_track=CDROM_LEADOUT; /* Now the leadout track ...*/
|
||||||
|
tocentry.cdte_format=CDROM_MSF;
|
||||||
|
ioctl(fdcd,CDROMREADTOCENTRY,&tocentry); /* ... get position of it */
|
||||||
|
((DWORD*)io_stru+3)[0]=(DWORD)msf0_to_abs(tocentry.cdte_addr.msf);
|
||||||
|
TRACE(int," ----> AUDIO DISK INFO <%d-%d/%ld>\n\n",
|
||||||
|
io_stru[1],io_stru[2],
|
||||||
|
((DWORD *)io_stru+3)[0]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case 11: /* audio track info */
|
||||||
|
tocentry.cdte_track=io_stru[1]; /* track of the disc */
|
||||||
|
tocentry.cdte_format=CDROM_MSF;
|
||||||
|
ioctl(fdcd,CDROMREADTOCENTRY,&tocentry);
|
||||||
|
((DWORD*)io_stru+2)[0]=(DWORD)msf0_to_abs(tocentry.cdte_addr.msf);
|
||||||
|
/* starting point if the track */
|
||||||
|
io_stru[6]=tocentry.cdte_adr+16*tocentry.cdte_ctrl;
|
||||||
|
TRACE(int," ----> AUDIO TRACK INFO <track=%d>[%ld] \n\n",
|
||||||
|
io_stru[1],((DWORD *)io_stru+2)[0]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 12: /* get Q-Channel / Subchannel (??) info */
|
||||||
|
subchnl.cdsc_format=CDROM_MSF;
|
||||||
|
ioctl(fdcd,CDROMSUBCHNL,&subchnl);
|
||||||
|
io_stru[1]=subchnl.cdsc_adr+16*subchnl.cdsc_ctrl;
|
||||||
|
io_stru[2]=subchnl.cdsc_trk;
|
||||||
|
io_stru[3]=subchnl.cdsc_ind; /* FIXME - ?? */
|
||||||
|
io_stru[4]=subchnl.cdsc_reladdr.msf.minute;
|
||||||
|
io_stru[5]=subchnl.cdsc_reladdr.msf.second;
|
||||||
|
io_stru[6]=subchnl.cdsc_reladdr.msf.frame;
|
||||||
|
io_stru[7]=0; /* always zero */
|
||||||
|
io_stru[8]=subchnl.cdsc_absaddr.msf.minute;
|
||||||
|
io_stru[9]=subchnl.cdsc_absaddr.msf.second;
|
||||||
|
io_stru[10]=subchnl.cdsc_absaddr.msf.frame;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 15: /* fixme !!!!!!! just a small workaround ! */
|
||||||
|
/* !!!! FIXME FIXME FIXME !! */
|
||||||
|
tocentry.cdte_track=CDROM_LEADOUT; /* Now the leadout track ...*/
|
||||||
|
tocentry.cdte_format=CDROM_MSF;
|
||||||
|
ioctl(fdcd,CDROMREADTOCENTRY,&tocentry); /* ... get position of it */
|
||||||
|
((DWORD*)io_stru+7)[0]=(DWORD)msf0_to_abs(tocentry.cdte_addr.msf);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
FIXME(int," Cdrom-driver: IOCTL INPUT: Unimplemented <%d>!! \n",
|
||||||
|
io_stru[0]);
|
||||||
|
Error=0x0c;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 12:
|
||||||
|
io_stru=get_io_stru((WORD *)driver_request,dorealmode);
|
||||||
|
TRACE(int," --> IOCTL OUTPUT <%d>\n",io_stru[0]);
|
||||||
|
switch (io_stru[0])
|
||||||
|
{
|
||||||
|
case 0: /* eject */
|
||||||
|
ioctl (fdcd,CDROMEJECT);
|
||||||
|
TRACE(int," ----> EJECT \n\n");
|
||||||
|
break;
|
||||||
|
case 5: /* close tray */
|
||||||
|
ioctl (fdcd,CDROMCLOSETRAY);
|
||||||
|
TRACE(int," ----> CLOSE TRAY \n\n");
|
||||||
|
break;
|
||||||
|
case 2: /* reset drive */
|
||||||
|
ioctl (fdcd,CDROMRESET);
|
||||||
|
TRACE(int," ----> RESET \n\n");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
FIXME(int," Cdrom-driver: IOCTL OUPUT: Unimplemented <%d>!! \n",
|
||||||
|
io_stru[0]);
|
||||||
|
Error=0x0c;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 133:
|
||||||
|
if (cdrom_a_status(fdcd)==CDROM_AUDIO_PLAY)
|
||||||
|
{
|
||||||
|
ioctl (fdcd,CDROMPAUSE);
|
||||||
|
TRACE(int," --> STOP AUDIO (Paused)\n\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ioctl (fdcd,CDROMSTOP);
|
||||||
|
TRACE(int," --> STOP AUDIO (Stopped)\n\n");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 132: /* FIXME - It didn't function for me... */
|
||||||
|
FIXME(int," --> PLAY AUDIO \n");
|
||||||
|
ioctl (fdcd,CDROMSTART);
|
||||||
|
FIXME(int,"Mode :<0x%02X> , [%ld-%ld]\n\n",
|
||||||
|
(unsigned char)driver_request[13],
|
||||||
|
((DWORD*)driver_request+14)[0],
|
||||||
|
((DWORD*)driver_request+18)[0]);
|
||||||
|
if (driver_request[13]==0)
|
||||||
|
{
|
||||||
|
abs_to_msf(((DWORD*)driver_request+14)[0],
|
||||||
|
((DWORD*)driver_request+18)[0],&msf);
|
||||||
|
ioctl(fdcd,CDROMPLAYMSF,&msf);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ERR(int,"CDRom-Driver: Unsupported address mode !!\n");
|
||||||
|
Error=0x0c;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 136:
|
||||||
|
TRACE(int," --> RESUME AUDIO \n\n");
|
||||||
|
ioctl(fdcd,CDROMRESUME);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
FIXME(int," CDRom-Driver - ioctl uninplemented <%d>\n",driver_request[2]);
|
||||||
|
Error=0x0c;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Error<255)
|
||||||
|
{
|
||||||
|
driver_request[4]|=127;
|
||||||
|
driver_request[3]=Error;
|
||||||
|
}
|
||||||
|
driver_request[4]|=2*(cdrom_a_status(fdcd)==CDROM_AUDIO_PLAY);
|
||||||
|
|
||||||
|
/* close (fdcd); FIXME !! -- cannot use close when ejecting
|
||||||
|
the cd-rom - close would close it again */
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
104
msdos/dpmi.c
104
msdos/dpmi.c
|
@ -18,6 +18,7 @@
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "selectors.h"
|
#include "selectors.h"
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
|
#include "process.h"
|
||||||
#include "stackframe.h"
|
#include "stackframe.h"
|
||||||
#include "callback.h"
|
#include "callback.h"
|
||||||
|
|
||||||
|
@ -110,19 +111,24 @@ DPMI_xrealloc(LPVOID ptr,int newsize) {
|
||||||
MEMORY_BASIC_INFORMATION mbi;
|
MEMORY_BASIC_INFORMATION mbi;
|
||||||
LPVOID newptr;
|
LPVOID newptr;
|
||||||
|
|
||||||
if (!VirtualQuery(ptr,&mbi,sizeof(mbi))) {
|
|
||||||
FIXME(int31,"reallocing non DPMI_xalloced region?\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
/* We do not shrink allocated memory. most reallocs only do grows
|
|
||||||
* anyway
|
|
||||||
*/
|
|
||||||
if (newsize<=mbi.RegionSize)
|
|
||||||
return ptr;
|
|
||||||
|
|
||||||
newptr = DPMI_xalloc(newsize);
|
newptr = DPMI_xalloc(newsize);
|
||||||
memcpy(newptr,ptr,newsize);
|
if (ptr) {
|
||||||
DPMI_xfree(ptr);
|
if (!VirtualQuery(ptr,&mbi,sizeof(mbi))) {
|
||||||
|
FIXME(int31,"realloc of DPMI_xallocd region %p?\n",ptr);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (mbi.State == MEM_FREE) {
|
||||||
|
FIXME(int31,"realloc of DPMI_xallocd region %p?\n",ptr);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
/* We do not shrink allocated memory. most reallocs
|
||||||
|
* only do grows anyway
|
||||||
|
*/
|
||||||
|
if (newsize<=mbi.RegionSize)
|
||||||
|
return ptr;
|
||||||
|
memcpy(newptr,ptr,newsize);
|
||||||
|
DPMI_xfree(ptr);
|
||||||
|
}
|
||||||
return newptr;
|
return newptr;
|
||||||
}
|
}
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
@ -293,6 +299,23 @@ static void INT_DoRealModeInt( CONTEXT *context )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 0x58: /* GET OR SET MEMORY/UMB ALLOCATION STRATEGY */
|
||||||
|
TRACE(int31,"GET OR SET MEMORY/UMB ALLOCATION STRATEGY subfunction %d\n",
|
||||||
|
AL_reg(context));
|
||||||
|
switch (AL_reg(context))
|
||||||
|
{
|
||||||
|
case 0x00:
|
||||||
|
AX_reg(context) = 1;
|
||||||
|
break;
|
||||||
|
case 0x02:
|
||||||
|
AX_reg(context) = 0;
|
||||||
|
break;
|
||||||
|
case 0x01:
|
||||||
|
case 0x03:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
RESET_CFLAG(context);
|
||||||
|
break;
|
||||||
case 0x60: {/* CANONICALIZE PATH */
|
case 0x60: {/* CANONICALIZE PATH */
|
||||||
LPCSTR path = (LPCSTR)DOSMEM_MapRealToLinear((DS_reg(&realmode_ctx)<<16)+SI_reg(&realmode_ctx));
|
LPCSTR path = (LPCSTR)DOSMEM_MapRealToLinear((DS_reg(&realmode_ctx)<<16)+SI_reg(&realmode_ctx));
|
||||||
|
|
||||||
|
@ -460,8 +483,18 @@ static void FreeRMCB( CONTEXT *context )
|
||||||
*
|
*
|
||||||
* Handler for int 31h (DPMI).
|
* Handler for int 31h (DPMI).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void WINAPI INT_Int31Handler( CONTEXT *context )
|
void WINAPI INT_Int31Handler( CONTEXT *context )
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Note: For Win32s processes, the whole linear address space is
|
||||||
|
* shifted by 0x10000 relative to the OS linear address space.
|
||||||
|
* See the comment in msdos/vxd.c.
|
||||||
|
*/
|
||||||
|
DWORD offset = PROCESS_Current()->flags & PDB32_WIN32S_PROC ? 0x10000 : 0;
|
||||||
|
#define AppToWine(addr) ((addr)? ((DWORD)(addr)) + offset : 0)
|
||||||
|
#define WineToApp(addr) ((addr)? ((DWORD)(addr)) - offset : 0)
|
||||||
|
|
||||||
DWORD dw;
|
DWORD dw;
|
||||||
BYTE *ptr;
|
BYTE *ptr;
|
||||||
|
|
||||||
|
@ -547,15 +580,17 @@ void WINAPI INT_Int31Handler( CONTEXT *context )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CX_reg(context) = HIWORD(dw);
|
CX_reg(context) = HIWORD(WineToApp(dw));
|
||||||
DX_reg(context) = LOWORD(dw);
|
DX_reg(context) = LOWORD(WineToApp(dw));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0007: /* Set selector base address */
|
case 0x0007: /* Set selector base address */
|
||||||
TRACE(int31,"set selector base address (0x%04x,0x%08lx)\n",BX_reg(context),MAKELONG(DX_reg(context),CX_reg(context)));
|
TRACE(int31, "set selector base address (0x%04x,0x%08lx)\n",
|
||||||
SetSelectorBase( BX_reg(context),
|
BX_reg(context),
|
||||||
MAKELONG( DX_reg(context), CX_reg(context) ) );
|
AppToWine(MAKELONG(DX_reg(context),CX_reg(context))));
|
||||||
|
SetSelectorBase(BX_reg(context),
|
||||||
|
AppToWine(MAKELONG(DX_reg(context), CX_reg(context))));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0008: /* Set selector limit */
|
case 0x0008: /* Set selector limit */
|
||||||
|
@ -583,6 +618,8 @@ void WINAPI INT_Int31Handler( CONTEXT *context )
|
||||||
{
|
{
|
||||||
ldt_entry entry;
|
ldt_entry entry;
|
||||||
LDT_GetEntry( SELECTOR_TO_ENTRY( BX_reg(context) ), &entry );
|
LDT_GetEntry( SELECTOR_TO_ENTRY( BX_reg(context) ), &entry );
|
||||||
|
entry.base = WineToApp(entry.base);
|
||||||
|
|
||||||
/* FIXME: should use ES:EDI for 32-bit clients */
|
/* FIXME: should use ES:EDI for 32-bit clients */
|
||||||
LDT_EntryToBytes( PTR_SEG_OFF_TO_LIN( ES_reg(context),
|
LDT_EntryToBytes( PTR_SEG_OFF_TO_LIN( ES_reg(context),
|
||||||
DI_reg(context) ), &entry );
|
DI_reg(context) ), &entry );
|
||||||
|
@ -595,6 +632,8 @@ void WINAPI INT_Int31Handler( CONTEXT *context )
|
||||||
ldt_entry entry;
|
ldt_entry entry;
|
||||||
LDT_BytesToEntry( PTR_SEG_OFF_TO_LIN( ES_reg(context),
|
LDT_BytesToEntry( PTR_SEG_OFF_TO_LIN( ES_reg(context),
|
||||||
DI_reg(context) ), &entry );
|
DI_reg(context) ), &entry );
|
||||||
|
entry.base = AppToWine(entry.base);
|
||||||
|
|
||||||
LDT_SetEntry( SELECTOR_TO_ENTRY( BX_reg(context) ), &entry );
|
LDT_SetEntry( SELECTOR_TO_ENTRY( BX_reg(context) ), &entry );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -621,7 +660,7 @@ void WINAPI INT_Int31Handler( CONTEXT *context )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0205: /* Set protected mode interrupt vector */
|
case 0x0205: /* Set protected mode interrupt vector */
|
||||||
TRACE(int31,"set protected mode interrupt handler (0x%02x,0x%08lx), stub!\n",
|
TRACE(int31,"set protected mode interrupt handler (0x%02x,%p), stub!\n",
|
||||||
BL_reg(context),PTR_SEG_OFF_TO_LIN(CX_reg(context),DX_reg(context)));
|
BL_reg(context),PTR_SEG_OFF_TO_LIN(CX_reg(context),DX_reg(context)));
|
||||||
INT_SetHandler( BL_reg(context),
|
INT_SetHandler( BL_reg(context),
|
||||||
(FARPROC16)PTR_SEG_OFF_TO_SEGPTR( CX_reg(context),
|
(FARPROC16)PTR_SEG_OFF_TO_SEGPTR( CX_reg(context),
|
||||||
|
@ -686,27 +725,31 @@ void WINAPI INT_Int31Handler( CONTEXT *context )
|
||||||
AX_reg(context) = 0x8012; /* linear memory not available */
|
AX_reg(context) = 0x8012; /* linear memory not available */
|
||||||
SET_CFLAG(context);
|
SET_CFLAG(context);
|
||||||
} else {
|
} else {
|
||||||
BX_reg(context) = SI_reg(context) = HIWORD(ptr);
|
BX_reg(context) = SI_reg(context) = HIWORD(WineToApp(ptr));
|
||||||
CX_reg(context) = DI_reg(context) = LOWORD(ptr);
|
CX_reg(context) = DI_reg(context) = LOWORD(WineToApp(ptr));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0502: /* Free memory block */
|
case 0x0502: /* Free memory block */
|
||||||
TRACE(int31,"free memory block (0x%08lx)\n",MAKELONG(DI_reg(context),SI_reg(context)));
|
TRACE(int31, "free memory block (0x%08lx)\n",
|
||||||
DPMI_xfree((void *)MAKELONG(DI_reg(context), SI_reg(context)));
|
AppToWine(MAKELONG(DI_reg(context),SI_reg(context))));
|
||||||
|
DPMI_xfree( (void *)AppToWine(MAKELONG(DI_reg(context),
|
||||||
|
SI_reg(context))) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0503: /* Resize memory block */
|
case 0x0503: /* Resize memory block */
|
||||||
TRACE(int31,"resize memory block (0x%08lx,%ld)\n",MAKELONG(DI_reg(context),SI_reg(context)),MAKELONG(CX_reg(context),BX_reg(context)));
|
TRACE(int31, "resize memory block (0x%08lx,%ld)\n",
|
||||||
|
AppToWine(MAKELONG(DI_reg(context),SI_reg(context))),
|
||||||
|
MAKELONG(CX_reg(context),BX_reg(context)));
|
||||||
if (!(ptr = (BYTE *)DPMI_xrealloc(
|
if (!(ptr = (BYTE *)DPMI_xrealloc(
|
||||||
(void *)MAKELONG(DI_reg(context),SI_reg(context)),
|
(void *)AppToWine(MAKELONG(DI_reg(context),SI_reg(context))),
|
||||||
MAKELONG(CX_reg(context),BX_reg(context)))))
|
MAKELONG(CX_reg(context),BX_reg(context)))))
|
||||||
{
|
{
|
||||||
AX_reg(context) = 0x8012; /* linear memory not available */
|
AX_reg(context) = 0x8012; /* linear memory not available */
|
||||||
SET_CFLAG(context);
|
SET_CFLAG(context);
|
||||||
} else {
|
} else {
|
||||||
BX_reg(context) = SI_reg(context) = HIWORD(ptr);
|
BX_reg(context) = SI_reg(context) = HIWORD(WineToApp(ptr));
|
||||||
CX_reg(context) = DI_reg(context) = LOWORD(ptr);
|
CX_reg(context) = DI_reg(context) = LOWORD(WineToApp(ptr));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -749,8 +792,8 @@ void WINAPI INT_Int31Handler( CONTEXT *context )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BX_reg(context) = HIWORD(ptr);
|
BX_reg(context) = HIWORD(WineToApp(ptr));
|
||||||
CX_reg(context) = LOWORD(ptr);
|
CX_reg(context) = LOWORD(WineToApp(ptr));
|
||||||
RESET_CFLAG(context);
|
RESET_CFLAG(context);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -761,4 +804,7 @@ void WINAPI INT_Int31Handler( CONTEXT *context )
|
||||||
SET_CFLAG(context);
|
SET_CFLAG(context);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef AppToWine
|
||||||
|
#undef WineToApp
|
||||||
}
|
}
|
||||||
|
|
|
@ -1649,7 +1649,7 @@ void WINAPI DOS3Call( CONTEXT *context )
|
||||||
*(WORD*)(dataptr+1) = 41;
|
*(WORD*)(dataptr+1) = 41;
|
||||||
*(WORD*)(dataptr+3) = WINE_LanguageId;
|
*(WORD*)(dataptr+3) = WINE_LanguageId;
|
||||||
*(WORD*)(dataptr+5) = CodePage;
|
*(WORD*)(dataptr+5) = CodePage;
|
||||||
*(DWORD*)(dataptr+0x19) = NULL; /* FIXME: ptr to case map routine */
|
*(DWORD*)(dataptr+0x19) = 0; /* FIXME: ptr to case map routine */
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
TRACE(int21,"\tget pointer to collating sequence table\n");
|
TRACE(int21,"\tget pointer to collating sequence table\n");
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "ldt.h"
|
#include "ldt.h"
|
||||||
#include "drive.h"
|
#include "drive.h"
|
||||||
#include "msdos.h"
|
#include "msdos.h"
|
||||||
|
@ -228,6 +229,13 @@ void do_mscdex( CONTEXT *context, int dorealmode )
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef linux
|
||||||
|
case 0x10: /* direct driver acces */
|
||||||
|
do_mscdex_dd(context,dorealmode);
|
||||||
|
break;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
FIXME(int, "Unimplemented MSCDEX function 0x%02X.\n", AL_reg(context));
|
FIXME(int, "Unimplemented MSCDEX function 0x%02X.\n", AL_reg(context));
|
||||||
break;
|
break;
|
||||||
|
|
1185
msdos/vxd.c
1185
msdos/vxd.c
File diff suppressed because it is too large
Load Diff
|
@ -175,10 +175,7 @@ HBITMAP32 WINAPI CreateBitmap32( INT32 width, INT32 height, UINT32 planes,
|
||||||
bmpObjPtr->bitmap.bmWidthBytes = (INT16)BITMAP_WIDTH_BYTES( width, bpp );
|
bmpObjPtr->bitmap.bmWidthBytes = (INT16)BITMAP_WIDTH_BYTES( width, bpp );
|
||||||
bmpObjPtr->bitmap.bmBits = NULL;
|
bmpObjPtr->bitmap.bmBits = NULL;
|
||||||
|
|
||||||
bmpObjPtr->dibSection = NULL;
|
bmpObjPtr->dib = NULL;
|
||||||
bmpObjPtr->colorMap = NULL;
|
|
||||||
bmpObjPtr->nColorMap = 0;
|
|
||||||
bmpObjPtr->status = DIB_NoHandler;
|
|
||||||
|
|
||||||
/* Create the pixmap */
|
/* Create the pixmap */
|
||||||
bmpObjPtr->pixmap = TSXCreatePixmap(display, rootWindow, width, height, bpp);
|
bmpObjPtr->pixmap = TSXCreatePixmap(display, rootWindow, width, height, bpp);
|
||||||
|
@ -829,20 +826,7 @@ BOOL32 BITMAP_DeleteObject( HBITMAP16 hbitmap, BITMAPOBJ * bmp )
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (bmp->dibSection)
|
DIB_DeleteDIBSection( bmp );
|
||||||
{
|
|
||||||
DIBSECTION *dib = bmp->dibSection;
|
|
||||||
|
|
||||||
if (dib->dsBm.bmBits)
|
|
||||||
if (dib->dshSection)
|
|
||||||
UnmapViewOfFile(dib->dsBm.bmBits);
|
|
||||||
else
|
|
||||||
VirtualFree(dib->dsBm.bmBits, MEM_RELEASE, 0L);
|
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, dib);
|
|
||||||
}
|
|
||||||
if (bmp->colorMap)
|
|
||||||
HeapFree(GetProcessHeap(), 0, bmp->colorMap);
|
|
||||||
|
|
||||||
return GDI_FreeObject( hbitmap );
|
return GDI_FreeObject( hbitmap );
|
||||||
}
|
}
|
||||||
|
@ -853,7 +837,7 @@ BOOL32 BITMAP_DeleteObject( HBITMAP16 hbitmap, BITMAPOBJ * bmp )
|
||||||
*/
|
*/
|
||||||
INT16 BITMAP_GetObject16( BITMAPOBJ * bmp, INT16 count, LPVOID buffer )
|
INT16 BITMAP_GetObject16( BITMAPOBJ * bmp, INT16 count, LPVOID buffer )
|
||||||
{
|
{
|
||||||
if (bmp->dibSection)
|
if (bmp->dib)
|
||||||
{
|
{
|
||||||
FIXME(bitmap, "not implemented for DIBs\n");
|
FIXME(bitmap, "not implemented for DIBs\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -872,7 +856,7 @@ INT16 BITMAP_GetObject16( BITMAPOBJ * bmp, INT16 count, LPVOID buffer )
|
||||||
*/
|
*/
|
||||||
INT32 BITMAP_GetObject32( BITMAPOBJ * bmp, INT32 count, LPVOID buffer )
|
INT32 BITMAP_GetObject32( BITMAPOBJ * bmp, INT32 count, LPVOID buffer )
|
||||||
{
|
{
|
||||||
if (bmp->dibSection)
|
if (bmp->dib)
|
||||||
{
|
{
|
||||||
if (count < sizeof(DIBSECTION))
|
if (count < sizeof(DIBSECTION))
|
||||||
{
|
{
|
||||||
|
@ -883,7 +867,7 @@ INT32 BITMAP_GetObject32( BITMAPOBJ * bmp, INT32 count, LPVOID buffer )
|
||||||
if (count > sizeof(DIBSECTION)) count = sizeof(DIBSECTION);
|
if (count > sizeof(DIBSECTION)) count = sizeof(DIBSECTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy( buffer, bmp->dibSection, count );
|
memcpy( buffer, &bmp->dib->dibSection, count );
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
341
objects/dib.c
341
objects/dib.c
|
@ -24,12 +24,13 @@ typedef struct
|
||||||
{
|
{
|
||||||
DC *dc;
|
DC *dc;
|
||||||
LPCVOID bits;
|
LPCVOID bits;
|
||||||
|
XImage *image;
|
||||||
int lines;
|
int lines;
|
||||||
DWORD infoWidth;
|
DWORD infoWidth;
|
||||||
WORD depth;
|
WORD depth;
|
||||||
WORD infoBpp;
|
WORD infoBpp;
|
||||||
WORD compression;
|
WORD compression;
|
||||||
RGBQUAD *colorMap;
|
int *colorMap;
|
||||||
int nColorMap;
|
int nColorMap;
|
||||||
Drawable drawable;
|
Drawable drawable;
|
||||||
GC gc;
|
GC gc;
|
||||||
|
@ -174,13 +175,13 @@ static int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, DWORD *width,
|
||||||
* Build the color map from the bitmap palette. Should not be called
|
* Build the color map from the bitmap palette. Should not be called
|
||||||
* for a >8-bit deep bitmap.
|
* for a >8-bit deep bitmap.
|
||||||
*/
|
*/
|
||||||
static RGBQUAD *DIB_BuildColorMap( const BITMAPINFO *info,
|
static int *DIB_BuildColorMap( DC *dc, WORD coloruse, WORD depth,
|
||||||
HPALETTE16 hPalette, int *nColors )
|
const BITMAPINFO *info, int *nColors )
|
||||||
{
|
{
|
||||||
int i, colors;
|
int i, colors;
|
||||||
BOOL32 isInfo;
|
BOOL32 isInfo;
|
||||||
WORD *colorPtr;
|
WORD *colorPtr;
|
||||||
RGBQUAD *colorMapping;
|
int *colorMapping;
|
||||||
|
|
||||||
if ((isInfo = (info->bmiHeader.biSize == sizeof(BITMAPINFOHEADER))))
|
if ((isInfo = (info->bmiHeader.biSize == sizeof(BITMAPINFOHEADER))))
|
||||||
{
|
{
|
||||||
|
@ -200,85 +201,51 @@ static RGBQUAD *DIB_BuildColorMap( const BITMAPINFO *info,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(colorMapping = (RGBQUAD *)HeapAlloc(GetProcessHeap(), 0,
|
if (!(colorMapping = (int *)HeapAlloc(GetProcessHeap(), 0,
|
||||||
colors * sizeof(RGBQUAD) )))
|
colors * sizeof(int) )))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (hPalette == 0) /* DIB_RGB_COLORS */
|
if (coloruse == DIB_RGB_COLORS)
|
||||||
{
|
{
|
||||||
if (isInfo)
|
if (isInfo)
|
||||||
{
|
{
|
||||||
RGBQUAD * rgb = (RGBQUAD *)colorPtr;
|
RGBQUAD * rgb = (RGBQUAD *)colorPtr;
|
||||||
|
|
||||||
for (i = 0; i < colors; i++, rgb++)
|
if (depth == 1) /* Monochrome */
|
||||||
colorMapping[i] = *rgb;
|
for (i = 0; i < colors; i++, rgb++)
|
||||||
|
colorMapping[i] = (rgb->rgbRed + rgb->rgbGreen +
|
||||||
|
rgb->rgbBlue > 255*3/2);
|
||||||
|
else
|
||||||
|
for (i = 0; i < colors; i++, rgb++)
|
||||||
|
colorMapping[i] = COLOR_ToPhysical( dc, RGB(rgb->rgbRed,
|
||||||
|
rgb->rgbGreen,
|
||||||
|
rgb->rgbBlue));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RGBTRIPLE * rgb = (RGBTRIPLE *)colorPtr;
|
RGBTRIPLE * rgb = (RGBTRIPLE *)colorPtr;
|
||||||
|
|
||||||
for (i = 0; i < colors; i++, rgb++)
|
if (depth == 1) /* Monochrome */
|
||||||
colorMapping[i].rgbRed = rgb->rgbtRed,
|
for (i = 0; i < colors; i++, rgb++)
|
||||||
colorMapping[i].rgbGreen = rgb->rgbtGreen,
|
colorMapping[i] = (rgb->rgbtRed + rgb->rgbtGreen +
|
||||||
colorMapping[i].rgbBlue = rgb->rgbtBlue;
|
rgb->rgbtBlue > 255*3/2);
|
||||||
|
else
|
||||||
|
for (i = 0; i < colors; i++, rgb++)
|
||||||
|
colorMapping[i] = COLOR_ToPhysical( dc, RGB(rgb->rgbtRed,
|
||||||
|
rgb->rgbtGreen,
|
||||||
|
rgb->rgbtBlue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else /* DIB_PAL_COLORS */
|
else /* DIB_PAL_COLORS */
|
||||||
{
|
{
|
||||||
PALETTEOBJ *palPtr = (PALETTEOBJ *)GDI_GetObjPtr(hPalette, PALETTE_MAGIC);
|
|
||||||
if (!palPtr)
|
|
||||||
{
|
|
||||||
HeapFree(GetProcessHeap(), 0, colorMapping);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < colors; i++, colorPtr++)
|
for (i = 0; i < colors; i++, colorPtr++)
|
||||||
if (*colorPtr >= palPtr->logpalette.palNumEntries)
|
colorMapping[i] = COLOR_ToPhysical( dc, PALETTEINDEX(*colorPtr) );
|
||||||
{
|
|
||||||
colorMapping[i].rgbRed = 0;
|
|
||||||
colorMapping[i].rgbGreen = 0;
|
|
||||||
colorMapping[i].rgbBlue = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
PALETTEENTRY *pe = palPtr->logpalette.palPalEntry + *colorPtr;
|
|
||||||
colorMapping[i].rgbRed = pe->peRed;
|
|
||||||
colorMapping[i].rgbGreen = pe->peGreen;
|
|
||||||
colorMapping[i].rgbBlue = pe->peBlue;
|
|
||||||
}
|
|
||||||
|
|
||||||
GDI_HEAP_UNLOCK(hPalette);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*nColors = colors;
|
*nColors = colors;
|
||||||
return colorMapping;
|
return colorMapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* DIB_PhysicalColorMap
|
|
||||||
*
|
|
||||||
* Translate color map to physical colors
|
|
||||||
*/
|
|
||||||
static int *DIB_PhysicalColorMap( DC *dc, int depth,
|
|
||||||
RGBQUAD *colorMap, int nColorMap)
|
|
||||||
{
|
|
||||||
int *colorMapping, i;
|
|
||||||
|
|
||||||
if (!nColorMap) return NULL;
|
|
||||||
if (!(colorMapping = (int *)HeapAlloc(GetProcessHeap(), 0,
|
|
||||||
nColorMap * sizeof(int) ))) return NULL;
|
|
||||||
|
|
||||||
if (depth == 1) /* Monochrome */
|
|
||||||
for (i = 0; i < nColorMap; i++, colorMap++)
|
|
||||||
colorMapping[i] = (colorMap->rgbRed + colorMap->rgbGreen +
|
|
||||||
colorMap->rgbBlue > 255*3/2);
|
|
||||||
else
|
|
||||||
for (i = 0; i < nColorMap; i++, colorMap++)
|
|
||||||
colorMapping[i] = COLOR_ToPhysical( dc, RGB(colorMap->rgbRed,
|
|
||||||
colorMap->rgbGreen,
|
|
||||||
colorMap->rgbBlue));
|
|
||||||
return colorMapping;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* DIB_MapColor
|
* DIB_MapColor
|
||||||
|
@ -834,8 +801,8 @@ static void DIB_SetImageBits_16( int lines, const BYTE *srcbits,
|
||||||
* GetDIBits for an 16-bit deep DIB.
|
* GetDIBits for an 16-bit deep DIB.
|
||||||
*/
|
*/
|
||||||
static void DIB_GetImageBits_16( int lines, BYTE *srcbits,
|
static void DIB_GetImageBits_16( int lines, BYTE *srcbits,
|
||||||
DWORD srcwidth, DWORD dstwidth, int left,
|
DWORD srcwidth, DWORD dstwidth, int left,
|
||||||
int *colors, int nColors, XImage *bmpImage )
|
XImage *bmpImage )
|
||||||
{
|
{
|
||||||
DWORD x;
|
DWORD x;
|
||||||
LPWORD ptr;
|
LPWORD ptr;
|
||||||
|
@ -927,8 +894,8 @@ static void DIB_SetImageBits_24( int lines, const BYTE *srcbits,
|
||||||
* GetDIBits for an 24-bit deep DIB.
|
* GetDIBits for an 24-bit deep DIB.
|
||||||
*/
|
*/
|
||||||
static void DIB_GetImageBits_24( int lines, BYTE *srcbits,
|
static void DIB_GetImageBits_24( int lines, BYTE *srcbits,
|
||||||
DWORD srcwidth, DWORD dstwidth, int left,
|
DWORD srcwidth, DWORD dstwidth, int left,
|
||||||
int *colors, int nColors, XImage *bmpImage )
|
XImage *bmpImage )
|
||||||
{
|
{
|
||||||
DWORD x;
|
DWORD x;
|
||||||
int h;
|
int h;
|
||||||
|
@ -1013,8 +980,8 @@ static void DIB_SetImageBits_32( int lines, const BYTE *srcbits,
|
||||||
* GetDIBits for an 32-bit deep DIB.
|
* GetDIBits for an 32-bit deep DIB.
|
||||||
*/
|
*/
|
||||||
static void DIB_GetImageBits_32( int lines, BYTE *srcbits,
|
static void DIB_GetImageBits_32( int lines, BYTE *srcbits,
|
||||||
DWORD srcwidth, DWORD dstwidth, int left,
|
DWORD srcwidth, DWORD dstwidth, int left,
|
||||||
int *colors, int nColors, XImage *bmpImage )
|
XImage *bmpImage )
|
||||||
{
|
{
|
||||||
DWORD x;
|
DWORD x;
|
||||||
int h;
|
int h;
|
||||||
|
@ -1064,44 +1031,37 @@ static void DIB_GetImageBits_32( int lines, BYTE *srcbits,
|
||||||
*/
|
*/
|
||||||
static int DIB_SetImageBits( const DIB_SETIMAGEBITS_DESCR *descr )
|
static int DIB_SetImageBits( const DIB_SETIMAGEBITS_DESCR *descr )
|
||||||
{
|
{
|
||||||
int *colorMapping;
|
int lines = descr->lines >= 0 ? descr->lines : -descr->lines;
|
||||||
XImage *bmpImage;
|
XImage *bmpImage;
|
||||||
int lines;
|
|
||||||
|
|
||||||
/* Translate the color mapping table */
|
|
||||||
|
|
||||||
if (descr->infoBpp > 8) colorMapping = NULL;
|
|
||||||
else if (!(colorMapping = DIB_PhysicalColorMap( descr->dc, descr->depth,
|
|
||||||
descr->colorMap, descr->nColorMap )))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if ( descr->dc && descr->dc->w.flags & DC_DIRTY )
|
if ( descr->dc && descr->dc->w.flags & DC_DIRTY )
|
||||||
CLIPPING_UpdateGCRegion(descr->dc);
|
CLIPPING_UpdateGCRegion( descr->dc );
|
||||||
|
|
||||||
|
if (descr->image)
|
||||||
|
bmpImage = descr->image;
|
||||||
|
else
|
||||||
|
XCREATEIMAGE( bmpImage, descr->infoWidth, lines, descr->depth );
|
||||||
|
|
||||||
/* Transfer the pixels */
|
/* Transfer the pixels */
|
||||||
lines = descr->lines;
|
|
||||||
if (lines < 0) lines = -lines;
|
|
||||||
XCREATEIMAGE(bmpImage, descr->infoWidth, lines, descr->depth );
|
|
||||||
|
|
||||||
switch(descr->infoBpp)
|
switch(descr->infoBpp)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
DIB_SetImageBits_1( descr->lines, descr->bits, descr->infoWidth,
|
DIB_SetImageBits_1( descr->lines, descr->bits, descr->infoWidth,
|
||||||
descr->width, descr->xSrc, colorMapping, bmpImage );
|
descr->width, descr->xSrc, descr->colorMap, bmpImage );
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (descr->compression) DIB_SetImageBits_RLE4( descr->lines, descr->bits,
|
if (descr->compression) DIB_SetImageBits_RLE4( descr->lines, descr->bits,
|
||||||
descr->infoWidth, descr->width, descr->xSrc,
|
descr->infoWidth, descr->width, descr->xSrc,
|
||||||
colorMapping, bmpImage );
|
descr->colorMap, bmpImage );
|
||||||
else DIB_SetImageBits_4( descr->lines, descr->bits, descr->infoWidth,
|
else DIB_SetImageBits_4( descr->lines, descr->bits, descr->infoWidth,
|
||||||
descr->width, descr->xSrc, colorMapping, bmpImage );
|
descr->width, descr->xSrc, descr->colorMap, bmpImage );
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
if (descr->compression) DIB_SetImageBits_RLE8( descr->lines, descr->bits,
|
if (descr->compression) DIB_SetImageBits_RLE8( descr->lines, descr->bits,
|
||||||
descr->infoWidth, descr->width, descr->xSrc,
|
descr->infoWidth, descr->width, descr->xSrc,
|
||||||
colorMapping, bmpImage );
|
descr->colorMap, bmpImage );
|
||||||
else DIB_SetImageBits_8( descr->lines, descr->bits, descr->infoWidth,
|
else DIB_SetImageBits_8( descr->lines, descr->bits, descr->infoWidth,
|
||||||
descr->width, descr->xSrc, colorMapping, bmpImage );
|
descr->width, descr->xSrc, descr->colorMap, bmpImage );
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
case 16:
|
case 16:
|
||||||
|
@ -1120,11 +1080,12 @@ static int DIB_SetImageBits( const DIB_SETIMAGEBITS_DESCR *descr )
|
||||||
WARN(bitmap, "(%d): Invalid depth\n", descr->infoBpp );
|
WARN(bitmap, "(%d): Invalid depth\n", descr->infoBpp );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (colorMapping) HeapFree( GetProcessHeap(), 0, colorMapping );
|
|
||||||
XPutImage( display, descr->drawable, descr->gc, bmpImage,
|
XPutImage( display, descr->drawable, descr->gc, bmpImage,
|
||||||
descr->xSrc, descr->ySrc, descr->xDest, descr->yDest,
|
descr->xSrc, descr->ySrc, descr->xDest, descr->yDest,
|
||||||
descr->width, descr->height );
|
descr->width, descr->height );
|
||||||
XDestroyImage( bmpImage );
|
|
||||||
|
if (!descr->image) XDestroyImage( bmpImage );
|
||||||
return lines;
|
return lines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1136,24 +1097,19 @@ static int DIB_SetImageBits( const DIB_SETIMAGEBITS_DESCR *descr )
|
||||||
*/
|
*/
|
||||||
static int DIB_GetImageBits( const DIB_SETIMAGEBITS_DESCR *descr )
|
static int DIB_GetImageBits( const DIB_SETIMAGEBITS_DESCR *descr )
|
||||||
{
|
{
|
||||||
int *colorMapping;
|
int lines = descr->lines >= 0 ? descr->lines : -descr->lines;
|
||||||
XImage *bmpImage;
|
XImage *bmpImage;
|
||||||
int lines;
|
|
||||||
|
|
||||||
/* Translate the color mapping table */
|
if (descr->image)
|
||||||
|
bmpImage = descr->image;
|
||||||
|
else
|
||||||
|
XCREATEIMAGE( bmpImage, descr->infoWidth, lines, descr->depth );
|
||||||
|
|
||||||
if (descr->infoBpp > 8) colorMapping = NULL;
|
XGetSubImage( display, descr->drawable, descr->xDest, descr->yDest,
|
||||||
else if (!(colorMapping = DIB_PhysicalColorMap( descr->dc, descr->depth,
|
descr->width, descr->height, AllPlanes, ZPixmap,
|
||||||
descr->colorMap, descr->nColorMap )))
|
bmpImage, descr->xSrc, descr->ySrc );
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* Transfer the pixels */
|
/* Transfer the pixels */
|
||||||
|
|
||||||
lines = descr->lines;
|
|
||||||
if (lines < 0) lines = -lines;
|
|
||||||
bmpImage = XGetImage( display, descr->drawable, descr->xDest, descr->yDest,
|
|
||||||
descr->width, descr->height, AllPlanes, ZPixmap );
|
|
||||||
|
|
||||||
switch(descr->infoBpp)
|
switch(descr->infoBpp)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -1163,34 +1119,31 @@ static int DIB_GetImageBits( const DIB_SETIMAGEBITS_DESCR *descr )
|
||||||
case 4:
|
case 4:
|
||||||
if (descr->compression) FIXME(bitmap, "Compression not yet supported!\n");
|
if (descr->compression) FIXME(bitmap, "Compression not yet supported!\n");
|
||||||
else DIB_GetImageBits_4( descr->lines, (LPVOID)descr->bits, descr->infoWidth,
|
else DIB_GetImageBits_4( descr->lines, (LPVOID)descr->bits, descr->infoWidth,
|
||||||
descr->width, descr->xSrc,
|
descr->width, descr->xSrc,
|
||||||
colorMapping, descr->nColorMap, bmpImage );
|
descr->colorMap, descr->nColorMap, bmpImage );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
if (descr->compression) FIXME(bitmap, "Compression not yet supported!\n");
|
if (descr->compression) FIXME(bitmap, "Compression not yet supported!\n");
|
||||||
else DIB_GetImageBits_8( descr->lines, (LPVOID)descr->bits, descr->infoWidth,
|
else DIB_GetImageBits_8( descr->lines, (LPVOID)descr->bits, descr->infoWidth,
|
||||||
descr->width, descr->xSrc,
|
descr->width, descr->xSrc,
|
||||||
colorMapping, descr->nColorMap, bmpImage );
|
descr->colorMap, descr->nColorMap, bmpImage );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 15:
|
case 15:
|
||||||
case 16:
|
case 16:
|
||||||
DIB_GetImageBits_16( descr->lines, (LPVOID)descr->bits, descr->infoWidth,
|
DIB_GetImageBits_16( descr->lines, (LPVOID)descr->bits, descr->infoWidth,
|
||||||
descr->width, descr->xSrc,
|
descr->width, descr->xSrc, bmpImage );
|
||||||
colorMapping, descr->nColorMap, bmpImage );
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 24:
|
case 24:
|
||||||
DIB_GetImageBits_24( descr->lines, (LPVOID)descr->bits, descr->infoWidth,
|
DIB_GetImageBits_24( descr->lines, (LPVOID)descr->bits, descr->infoWidth,
|
||||||
descr->width, descr->xSrc,
|
descr->width, descr->xSrc, bmpImage );
|
||||||
colorMapping, descr->nColorMap, bmpImage );
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 32:
|
case 32:
|
||||||
DIB_GetImageBits_32( descr->lines, (LPVOID)descr->bits, descr->infoWidth,
|
DIB_GetImageBits_32( descr->lines, (LPVOID)descr->bits, descr->infoWidth,
|
||||||
descr->width, descr->xSrc,
|
descr->width, descr->xSrc, bmpImage );
|
||||||
colorMapping, descr->nColorMap, bmpImage );
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1198,9 +1151,7 @@ static int DIB_GetImageBits( const DIB_SETIMAGEBITS_DESCR *descr )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (colorMapping) HeapFree( GetProcessHeap(), 0, colorMapping );
|
if (!descr->image) XDestroyImage( bmpImage );
|
||||||
|
|
||||||
XDestroyImage( bmpImage );
|
|
||||||
return lines;
|
return lines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1311,10 +1262,8 @@ INT32 WINAPI SetDIBits32( HDC32 hdc, HBITMAP32 hbitmap, UINT32 startscan,
|
||||||
|
|
||||||
if (descr.infoBpp <= 8)
|
if (descr.infoBpp <= 8)
|
||||||
{
|
{
|
||||||
descr.colorMap = DIB_BuildColorMap( info, coloruse == DIB_PAL_COLORS?
|
descr.colorMap = DIB_BuildColorMap( descr.dc, coloruse, bmp->bitmap.bmBitsPixel,
|
||||||
descr.dc->w.hPalette : 0,
|
info, &descr.nColorMap );
|
||||||
&descr.nColorMap);
|
|
||||||
|
|
||||||
if (!descr.colorMap)
|
if (!descr.colorMap)
|
||||||
{
|
{
|
||||||
GDI_HEAP_UNLOCK( hbitmap );
|
GDI_HEAP_UNLOCK( hbitmap );
|
||||||
|
@ -1323,9 +1272,8 @@ INT32 WINAPI SetDIBits32( HDC32 hdc, HBITMAP32 hbitmap, UINT32 startscan,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
descr.bits = bits;
|
descr.bits = bits;
|
||||||
|
descr.image = NULL;
|
||||||
descr.lines = tmpheight >= 0 ? lines : -lines;
|
descr.lines = tmpheight >= 0 ? lines : -lines;
|
||||||
descr.depth = bmp->bitmap.bmBitsPixel;
|
descr.depth = bmp->bitmap.bmBitsPixel;
|
||||||
descr.drawable = bmp->pixmap;
|
descr.drawable = bmp->pixmap;
|
||||||
|
@ -1401,17 +1349,17 @@ INT32 WINAPI SetDIBitsToDevice32(HDC32 hdc, INT32 xDest, INT32 yDest, DWORD cx,
|
||||||
DC_SetupGCForText( dc ); /* To have the correct colors */
|
DC_SetupGCForText( dc ); /* To have the correct colors */
|
||||||
TSXSetFunction( display, dc->u.x.gc, DC_XROPfunction[dc->w.ROPmode-1] );
|
TSXSetFunction( display, dc->u.x.gc, DC_XROPfunction[dc->w.ROPmode-1] );
|
||||||
|
|
||||||
descr.dc = dc;
|
|
||||||
if (descr.infoBpp <= 8)
|
if (descr.infoBpp <= 8)
|
||||||
{
|
{
|
||||||
descr.colorMap = DIB_BuildColorMap( info, coloruse == DIB_PAL_COLORS?
|
descr.colorMap = DIB_BuildColorMap( dc, coloruse, dc->w.bitsPerPixel,
|
||||||
descr.dc->w.hPalette : 0,
|
info, &descr.nColorMap );
|
||||||
&descr.nColorMap );
|
|
||||||
|
|
||||||
if (!descr.colorMap)
|
if (!descr.colorMap)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
descr.dc = dc;
|
||||||
descr.bits = bits;
|
descr.bits = bits;
|
||||||
|
descr.image = NULL;
|
||||||
descr.lines = tmpheight >= 0 ? lines : -lines;
|
descr.lines = tmpheight >= 0 ? lines : -lines;
|
||||||
descr.infoWidth = width;
|
descr.infoWidth = width;
|
||||||
descr.depth = dc->w.bitsPerPixel;
|
descr.depth = dc->w.bitsPerPixel;
|
||||||
|
@ -1638,14 +1586,10 @@ INT32 WINAPI GetDIBits32(
|
||||||
pad += ((32 - (info->bmiHeader.biWidth & 31)) / 8) & 3;
|
pad += ((32 - (info->bmiHeader.biWidth & 31)) / 8) & 3;
|
||||||
for( y = yend - 1; (int)y >= (int)startscan; y-- )
|
for( y = yend - 1; (int)y >= (int)startscan; y-- )
|
||||||
{
|
{
|
||||||
*bbits = 0;
|
|
||||||
for( x = 0; x < xend; x++ ) {
|
for( x = 0; x < xend; x++ ) {
|
||||||
|
if (!(x&7)) *bbits = 0;
|
||||||
*bbits |= XGetPixel( bmpImage, x, y)<<(7-(x&7));
|
*bbits |= XGetPixel( bmpImage, x, y)<<(7-(x&7));
|
||||||
if ((x&7)==7) {
|
if ((x&7)==7) bbits++;
|
||||||
bbits++;
|
|
||||||
*bbits=0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
bbits += pad;
|
bbits += pad;
|
||||||
}
|
}
|
||||||
|
@ -1654,14 +1598,10 @@ INT32 WINAPI GetDIBits32(
|
||||||
pad += ((8 - (info->bmiHeader.biWidth & 7)) / 2) & 3;
|
pad += ((8 - (info->bmiHeader.biWidth & 7)) / 2) & 3;
|
||||||
for( y = yend - 1; (int)y >= (int)startscan; y-- )
|
for( y = yend - 1; (int)y >= (int)startscan; y-- )
|
||||||
{
|
{
|
||||||
*bbits = 0;
|
|
||||||
for( x = 0; x < xend; x++ ) {
|
for( x = 0; x < xend; x++ ) {
|
||||||
|
if (!(x&1)) *bbits = 0;
|
||||||
*bbits |= XGetPixel( bmpImage, x, y)<<(4*(1-(x&1)));
|
*bbits |= XGetPixel( bmpImage, x, y)<<(4*(1-(x&1)));
|
||||||
if ((x&1)==1) {
|
if ((x&1)==1) bbits++;
|
||||||
bbits++;
|
|
||||||
*bbits=0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
bbits += pad;
|
bbits += pad;
|
||||||
}
|
}
|
||||||
|
@ -1671,7 +1611,6 @@ INT32 WINAPI GetDIBits32(
|
||||||
pad += (4 - ((info->bmiHeader.biWidth*2) & 3)) & 3;
|
pad += (4 - ((info->bmiHeader.biWidth*2) & 3)) & 3;
|
||||||
for( y = yend - 1; (int)y >= (int)startscan; y-- )
|
for( y = yend - 1; (int)y >= (int)startscan; y-- )
|
||||||
{
|
{
|
||||||
*bbits = 0;
|
|
||||||
for( x = 0; x < xend; x++ ) {
|
for( x = 0; x < xend; x++ ) {
|
||||||
unsigned long pixel=XGetPixel( bmpImage, x, y);
|
unsigned long pixel=XGetPixel( bmpImage, x, y);
|
||||||
*bbits++ = pixel & 0xff;
|
*bbits++ = pixel & 0xff;
|
||||||
|
@ -1684,7 +1623,6 @@ INT32 WINAPI GetDIBits32(
|
||||||
pad += (4 - ((info->bmiHeader.biWidth*3) & 3)) & 3;
|
pad += (4 - ((info->bmiHeader.biWidth*3) & 3)) & 3;
|
||||||
for( y = yend - 1; (int)y >= (int)startscan; y-- )
|
for( y = yend - 1; (int)y >= (int)startscan; y-- )
|
||||||
{
|
{
|
||||||
*bbits = 0;
|
|
||||||
for( x = 0; x < xend; x++ ) {
|
for( x = 0; x < xend; x++ ) {
|
||||||
unsigned long pixel=XGetPixel( bmpImage, x, y);
|
unsigned long pixel=XGetPixel( bmpImage, x, y);
|
||||||
*bbits++ = (pixel >>16) & 0xff;
|
*bbits++ = (pixel >>16) & 0xff;
|
||||||
|
@ -1697,7 +1635,6 @@ INT32 WINAPI GetDIBits32(
|
||||||
case 32:
|
case 32:
|
||||||
for( y = yend - 1; (int)y >= (int)startscan; y-- )
|
for( y = yend - 1; (int)y >= (int)startscan; y-- )
|
||||||
{
|
{
|
||||||
*bbits = 0;
|
|
||||||
for( x = 0; x < xend; x++ ) {
|
for( x = 0; x < xend; x++ ) {
|
||||||
unsigned long pixel=XGetPixel( bmpImage, x, y);
|
unsigned long pixel=XGetPixel( bmpImage, x, y);
|
||||||
*bbits++ = (pixel >>16) & 0xff;
|
*bbits++ = (pixel >>16) & 0xff;
|
||||||
|
@ -1824,7 +1761,7 @@ HBITMAP32 WINAPI CreateDIBitmap32( HDC32 hdc, const BITMAPINFOHEADER *header,
|
||||||
*/
|
*/
|
||||||
static void DIB_DoProtectDIBSection( BITMAPOBJ *bmp, DWORD new_prot )
|
static void DIB_DoProtectDIBSection( BITMAPOBJ *bmp, DWORD new_prot )
|
||||||
{
|
{
|
||||||
DIBSECTION *dib = bmp->dibSection;
|
DIBSECTION *dib = &bmp->dib->dibSection;
|
||||||
INT32 effHeight = dib->dsBm.bmHeight >= 0? dib->dsBm.bmHeight
|
INT32 effHeight = dib->dsBm.bmHeight >= 0? dib->dsBm.bmHeight
|
||||||
: -dib->dsBm.bmHeight;
|
: -dib->dsBm.bmHeight;
|
||||||
INT32 totalSize = dib->dsBmih.biSizeImage? dib->dsBmih.biSizeImage
|
INT32 totalSize = dib->dsBmih.biSizeImage? dib->dsBmih.biSizeImage
|
||||||
|
@ -1841,17 +1778,18 @@ static void DIB_DoProtectDIBSection( BITMAPOBJ *bmp, DWORD new_prot )
|
||||||
*/
|
*/
|
||||||
static void DIB_DoUpdateDIBSection( BITMAPOBJ *bmp, BOOL32 toDIB )
|
static void DIB_DoUpdateDIBSection( BITMAPOBJ *bmp, BOOL32 toDIB )
|
||||||
{
|
{
|
||||||
DIBSECTION *dib = bmp->dibSection;
|
DIBSECTIONOBJ *dib = bmp->dib;
|
||||||
DIB_SETIMAGEBITS_DESCR descr;
|
DIB_SETIMAGEBITS_DESCR descr;
|
||||||
|
|
||||||
if (DIB_GetBitmapInfo( &dib->dsBmih, &descr.infoWidth, &descr.lines,
|
if (DIB_GetBitmapInfo( &dib->dibSection.dsBmih, &descr.infoWidth, &descr.lines,
|
||||||
&descr.infoBpp, &descr.compression ) == -1)
|
&descr.infoBpp, &descr.compression ) == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
descr.dc = NULL;
|
descr.dc = NULL;
|
||||||
descr.colorMap = bmp->colorMap;
|
descr.image = dib->image;
|
||||||
descr.nColorMap = bmp->nColorMap;
|
descr.colorMap = dib->colorMap;
|
||||||
descr.bits = dib->dsBm.bmBits;
|
descr.nColorMap = dib->nColorMap;
|
||||||
|
descr.bits = dib->dibSection.dsBm.bmBits;
|
||||||
descr.depth = bmp->bitmap.bmBitsPixel;
|
descr.depth = bmp->bitmap.bmBitsPixel;
|
||||||
descr.drawable = bmp->pixmap;
|
descr.drawable = bmp->pixmap;
|
||||||
descr.gc = BITMAP_GC(bmp);
|
descr.gc = BITMAP_GC(bmp);
|
||||||
|
@ -1889,22 +1827,22 @@ static BOOL32 DIB_FaultHandler( LPVOID res, LPVOID addr )
|
||||||
bmp = (BITMAPOBJ *)GDI_GetObjPtr( (HBITMAP32)res, BITMAP_MAGIC );
|
bmp = (BITMAPOBJ *)GDI_GetObjPtr( (HBITMAP32)res, BITMAP_MAGIC );
|
||||||
if (!bmp) return FALSE;
|
if (!bmp) return FALSE;
|
||||||
|
|
||||||
if (bmp->dibSection)
|
if (bmp->dib)
|
||||||
switch (bmp->status)
|
switch (bmp->dib->status)
|
||||||
{
|
{
|
||||||
case DIB_GdiMod:
|
case DIB_GdiMod:
|
||||||
TRACE( bitmap, "called in status DIB_GdiMod\n" );
|
TRACE( bitmap, "called in status DIB_GdiMod\n" );
|
||||||
DIB_DoProtectDIBSection( bmp, PAGE_READWRITE );
|
DIB_DoProtectDIBSection( bmp, PAGE_READWRITE );
|
||||||
DIB_DoUpdateDIBSection( bmp, TRUE );
|
DIB_DoUpdateDIBSection( bmp, TRUE );
|
||||||
DIB_DoProtectDIBSection( bmp, PAGE_READONLY );
|
DIB_DoProtectDIBSection( bmp, PAGE_READONLY );
|
||||||
bmp->status = DIB_InSync;
|
bmp->dib->status = DIB_InSync;
|
||||||
handled = TRUE;
|
handled = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DIB_InSync:
|
case DIB_InSync:
|
||||||
TRACE( bitmap, "called in status DIB_InSync\n" );
|
TRACE( bitmap, "called in status DIB_InSync\n" );
|
||||||
DIB_DoProtectDIBSection( bmp, PAGE_READWRITE );
|
DIB_DoProtectDIBSection( bmp, PAGE_READWRITE );
|
||||||
bmp->status = DIB_AppMod;
|
bmp->dib->status = DIB_AppMod;
|
||||||
handled = TRUE;
|
handled = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1938,7 +1876,7 @@ void DIB_UpdateDIBSection( DC *dc, BOOL32 toDIB )
|
||||||
bmp = (BITMAPOBJ *)GDI_GetObjPtr( dc->w.hBitmap, BITMAP_MAGIC );
|
bmp = (BITMAPOBJ *)GDI_GetObjPtr( dc->w.hBitmap, BITMAP_MAGIC );
|
||||||
if (!bmp) return;
|
if (!bmp) return;
|
||||||
|
|
||||||
if (!bmp->dibSection)
|
if (!bmp->dib)
|
||||||
{
|
{
|
||||||
GDI_HEAP_UNLOCK(dc->w.hBitmap);
|
GDI_HEAP_UNLOCK(dc->w.hBitmap);
|
||||||
return;
|
return;
|
||||||
|
@ -1949,7 +1887,7 @@ void DIB_UpdateDIBSection( DC *dc, BOOL32 toDIB )
|
||||||
{
|
{
|
||||||
/* Prepare for access to the DIB by GDI functions */
|
/* Prepare for access to the DIB by GDI functions */
|
||||||
|
|
||||||
switch (bmp->status)
|
switch (bmp->dib->status)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case DIB_NoHandler:
|
case DIB_NoHandler:
|
||||||
|
@ -1970,7 +1908,7 @@ void DIB_UpdateDIBSection( DC *dc, BOOL32 toDIB )
|
||||||
TRACE( bitmap, "fromDIB called in status DIB_AppMod\n" );
|
TRACE( bitmap, "fromDIB called in status DIB_AppMod\n" );
|
||||||
DIB_DoUpdateDIBSection( bmp, FALSE );
|
DIB_DoUpdateDIBSection( bmp, FALSE );
|
||||||
DIB_DoProtectDIBSection( bmp, PAGE_READONLY );
|
DIB_DoProtectDIBSection( bmp, PAGE_READONLY );
|
||||||
bmp->status = DIB_InSync;
|
bmp->dib->status = DIB_InSync;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1978,7 +1916,7 @@ void DIB_UpdateDIBSection( DC *dc, BOOL32 toDIB )
|
||||||
{
|
{
|
||||||
/* Acknowledge write access to the DIB by GDI functions */
|
/* Acknowledge write access to the DIB by GDI functions */
|
||||||
|
|
||||||
switch (bmp->status)
|
switch (bmp->dib->status)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case DIB_NoHandler:
|
case DIB_NoHandler:
|
||||||
|
@ -1993,7 +1931,7 @@ void DIB_UpdateDIBSection( DC *dc, BOOL32 toDIB )
|
||||||
case DIB_InSync:
|
case DIB_InSync:
|
||||||
TRACE( bitmap, " toDIB called in status DIB_InSync\n" );
|
TRACE( bitmap, " toDIB called in status DIB_InSync\n" );
|
||||||
DIB_DoProtectDIBSection( bmp, PAGE_NOACCESS );
|
DIB_DoProtectDIBSection( bmp, PAGE_NOACCESS );
|
||||||
bmp->status = DIB_GdiMod;
|
bmp->dib->status = DIB_GdiMod;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DIB_AppMod:
|
case DIB_AppMod:
|
||||||
|
@ -2026,8 +1964,8 @@ HBITMAP32 WINAPI CreateDIBSection32 (HDC32 hdc, BITMAPINFO *bmi, UINT32 usage,
|
||||||
{
|
{
|
||||||
HBITMAP32 res = 0;
|
HBITMAP32 res = 0;
|
||||||
BITMAPOBJ *bmp = NULL;
|
BITMAPOBJ *bmp = NULL;
|
||||||
DIBSECTION *dib = NULL;
|
DIBSECTIONOBJ *dib = NULL;
|
||||||
RGBQUAD *colorMap = NULL;
|
int *colorMap = NULL;
|
||||||
int nColorMap;
|
int nColorMap;
|
||||||
|
|
||||||
/* Fill BITMAP32 structure with DIB data */
|
/* Fill BITMAP32 structure with DIB data */
|
||||||
|
@ -2064,50 +2002,46 @@ HBITMAP32 WINAPI CreateDIBSection32 (HDC32 hdc, BITMAPINFO *bmi, UINT32 usage,
|
||||||
bm.bmBits = VirtualAlloc(NULL, totalSize,
|
bm.bmBits = VirtualAlloc(NULL, totalSize,
|
||||||
MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);
|
MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);
|
||||||
|
|
||||||
|
/* Create Color Map */
|
||||||
|
if (bm.bmBits && bm.bmBitsPixel <= 8)
|
||||||
|
{
|
||||||
|
DC *dc = (DC *)GDI_GetObjPtr(hdc, DC_MAGIC);
|
||||||
|
if (!dc) dc = (DC *)GDI_GetObjPtr(hdc, METAFILE_DC_MAGIC);
|
||||||
|
|
||||||
|
if (dc) colorMap = DIB_BuildColorMap( dc, usage, bm.bmBitsPixel,
|
||||||
|
bmi, &nColorMap );
|
||||||
|
GDI_HEAP_UNLOCK(hdc);
|
||||||
|
}
|
||||||
|
|
||||||
/* Allocate Memory for DIB and fill structure */
|
/* Allocate Memory for DIB and fill structure */
|
||||||
if (bm.bmBits)
|
if (bm.bmBits)
|
||||||
dib = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DIBSECTION));
|
dib = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DIBSECTIONOBJ));
|
||||||
if (dib)
|
if (dib)
|
||||||
{
|
{
|
||||||
dib->dsBm = bm;
|
dib->dibSection.dsBm = bm;
|
||||||
dib->dsBmih = *bi;
|
dib->dibSection.dsBmih = *bi;
|
||||||
/* FIXME: dib->dsBitfields ??? */
|
/* FIXME: dib->dibSection.dsBitfields ??? */
|
||||||
dib->dshSection = section;
|
dib->dibSection.dshSection = section;
|
||||||
dib->dsOffset = offset;
|
dib->dibSection.dsOffset = offset;
|
||||||
|
|
||||||
|
dib->status = DIB_NoHandler;
|
||||||
|
|
||||||
|
dib->nColorMap = nColorMap;
|
||||||
|
dib->colorMap = colorMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create Color Map */
|
/* Create Device Dependent Bitmap and add DIB pointer */
|
||||||
if (dib && bm.bmBitsPixel <= 8)
|
|
||||||
{
|
|
||||||
HPALETTE16 hPalette = 0;
|
|
||||||
if (usage == DIB_PAL_COLORS)
|
|
||||||
{
|
|
||||||
DC *dc = (DC *)GDI_GetObjPtr(hdc, DC_MAGIC);
|
|
||||||
if (!dc)
|
|
||||||
dc = (DC *)GDI_GetObjPtr(hdc, METAFILE_DC_MAGIC);
|
|
||||||
if (dc)
|
|
||||||
{
|
|
||||||
hPalette = dc->w.hPalette;
|
|
||||||
GDI_HEAP_UNLOCK(hdc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
colorMap = DIB_BuildColorMap(bmi, hPalette, &nColorMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Create Device Dependent Bitmap and add DIB/ColorMap info */
|
|
||||||
if (dib)
|
if (dib)
|
||||||
{
|
{
|
||||||
res = CreateDIBitmap32(hdc, bi, 0, NULL, bmi, usage);
|
res = CreateDIBitmap32(hdc, bi, 0, NULL, bmi, usage);
|
||||||
bmp = (BITMAPOBJ *) GDI_GetObjPtr(res, BITMAP_MAGIC);
|
bmp = (BITMAPOBJ *) GDI_GetObjPtr(res, BITMAP_MAGIC);
|
||||||
if (bmp)
|
if (bmp) bmp->dib = dib;
|
||||||
{
|
|
||||||
bmp->dibSection = dib;
|
|
||||||
bmp->colorMap = colorMap;
|
|
||||||
bmp->nColorMap = nColorMap;
|
|
||||||
bmp->status = DIB_NoHandler;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Create XImage */
|
||||||
|
if (dib && bmp)
|
||||||
|
XCREATEIMAGE( dib->image, bm.bmWidth, effHeight, bmp->bitmap.bmBitsPixel );
|
||||||
|
|
||||||
/* Clean up in case of errors */
|
/* Clean up in case of errors */
|
||||||
if (!res || !bmp || !dib || !bm.bmBits || (bm.bmBitsPixel <= 8 && !colorMap))
|
if (!res || !bmp || !dib || !bm.bmBits || (bm.bmBitsPixel <= 8 && !colorMap))
|
||||||
{
|
{
|
||||||
|
@ -2117,6 +2051,7 @@ HBITMAP32 WINAPI CreateDIBSection32 (HDC32 hdc, BITMAPINFO *bmi, UINT32 usage,
|
||||||
else
|
else
|
||||||
VirtualFree(bm.bmBits, MEM_RELEASE, 0L), bm.bmBits = NULL;
|
VirtualFree(bm.bmBits, MEM_RELEASE, 0L), bm.bmBits = NULL;
|
||||||
|
|
||||||
|
if (dib->image) XDestroyImage(dib->image), dib->image = NULL;
|
||||||
if (colorMap) HeapFree(GetProcessHeap(), 0, colorMap), colorMap = NULL;
|
if (colorMap) HeapFree(GetProcessHeap(), 0, colorMap), colorMap = NULL;
|
||||||
if (dib) HeapFree(GetProcessHeap(), 0, dib), dib = NULL;
|
if (dib) HeapFree(GetProcessHeap(), 0, dib), dib = NULL;
|
||||||
if (res) DeleteObject32(res), res = 0;
|
if (res) DeleteObject32(res), res = 0;
|
||||||
|
@ -2127,7 +2062,7 @@ HBITMAP32 WINAPI CreateDIBSection32 (HDC32 hdc, BITMAPINFO *bmi, UINT32 usage,
|
||||||
if (VIRTUAL_SetFaultHandler(bm.bmBits, DIB_FaultHandler, (LPVOID)res))
|
if (VIRTUAL_SetFaultHandler(bm.bmBits, DIB_FaultHandler, (LPVOID)res))
|
||||||
{
|
{
|
||||||
DIB_DoProtectDIBSection( bmp, PAGE_READONLY );
|
DIB_DoProtectDIBSection( bmp, PAGE_READONLY );
|
||||||
bmp->status = DIB_InSync;
|
dib->status = DIB_InSync;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return BITMAP handle and storage location */
|
/* Return BITMAP handle and storage location */
|
||||||
|
@ -2136,3 +2071,29 @@ HBITMAP32 WINAPI CreateDIBSection32 (HDC32 hdc, BITMAPINFO *bmi, UINT32 usage,
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* DIB_DeleteDIBSection
|
||||||
|
*/
|
||||||
|
void DIB_DeleteDIBSection( BITMAPOBJ *bmp )
|
||||||
|
{
|
||||||
|
if (bmp && bmp->dib)
|
||||||
|
{
|
||||||
|
DIBSECTIONOBJ *dib = bmp->dib;
|
||||||
|
|
||||||
|
if (dib->dibSection.dsBm.bmBits)
|
||||||
|
if (dib->dibSection.dshSection)
|
||||||
|
UnmapViewOfFile(dib->dibSection.dsBm.bmBits);
|
||||||
|
else
|
||||||
|
VirtualFree(dib->dibSection.dsBm.bmBits, MEM_RELEASE, 0L);
|
||||||
|
|
||||||
|
if (dib->image)
|
||||||
|
XDestroyImage( dib->image );
|
||||||
|
|
||||||
|
if (dib->colorMap)
|
||||||
|
HeapFree(GetProcessHeap(), 0, dib->colorMap);
|
||||||
|
|
||||||
|
HeapFree(GetProcessHeap(), 0, dib);
|
||||||
|
bmp->dib = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ UINT32 WINAPI GetEnhMetaFileDescription32A(
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* GetEnhMetaFileDescription32W (GDI32.xxx)
|
* GetEnhMetaFileDescription32W (GDI32.177)
|
||||||
*
|
*
|
||||||
* Copies the description string of an enhanced metafile into a buffer
|
* Copies the description string of an enhanced metafile into a buffer
|
||||||
* _buf_.
|
* _buf_.
|
||||||
|
@ -142,10 +142,8 @@ UINT32 WINAPI GetEnhMetaFileBits(
|
||||||
* Many unimplemented records.
|
* Many unimplemented records.
|
||||||
*/
|
*/
|
||||||
BOOL32 WINAPI PlayEnhMetaFileRecord(
|
BOOL32 WINAPI PlayEnhMetaFileRecord(
|
||||||
HDC32 hdc,
|
HDC32 hdc, /* device context in which to render EMF record */
|
||||||
/* device context in which to render EMF record */
|
LPHANDLETABLE32 handletable, /* array of handles to be used in rendering record */
|
||||||
LPHANDLETABLE32 handletable,
|
|
||||||
/* array of handles to be used in rendering record */
|
|
||||||
const ENHMETARECORD *mr, /* EMF record to render */
|
const ENHMETARECORD *mr, /* EMF record to render */
|
||||||
UINT32 handles /* size of handle array */
|
UINT32 handles /* size of handle array */
|
||||||
)
|
)
|
||||||
|
|
|
@ -1230,12 +1230,14 @@ DWORD WINAPI GetKerningPairs32W( HDC32 hDC, DWORD cPairs,
|
||||||
return GetKerningPairs32A( hDC, cPairs, lpKerningPairs );
|
return GetKerningPairs32A( hDC, cPairs, lpKerningPairs );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* TranslateCharSetInfo [GDI32.382]
|
||||||
|
*/
|
||||||
BOOL32 WINAPI TranslateCharSetInfo(LPDWORD lpSrc,LPCHARSETINFO lpCs,DWORD dwFlags) {
|
BOOL32 WINAPI TranslateCharSetInfo(LPDWORD lpSrc,LPCHARSETINFO lpCs,DWORD dwFlags) {
|
||||||
FIXME(font,"(%p,%p,0x%08lx), stub.\n",lpSrc,lpCs,dwFlags);
|
FIXME(font,"(%p,%p,0x%08lx), stub.\n",lpSrc,lpCs,dwFlags);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* GetFontLanguageInfo (GDI32.182)
|
* GetFontLanguageInfo (GDI32.182)
|
||||||
*/
|
*/
|
||||||
|
@ -1253,3 +1255,31 @@ DWORD WINAPI GetFontLanguageInfo16(HDC16 hdc) {
|
||||||
FIXME(font,"(%x):stub!\n",hdc);
|
FIXME(font,"(%x):stub!\n",hdc);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* GetCharacterPlacement32A [GDI32.160]
|
||||||
|
*/
|
||||||
|
DWORD WINAPI
|
||||||
|
GetCharacterPlacement32A(HDC32 hdc, LPCSTR lpString, UINT32 uCount,
|
||||||
|
INT32 nMaxExtent, GCP_RESULTS32A lpResults,
|
||||||
|
DWORD dwFlags)
|
||||||
|
{
|
||||||
|
/* return value 0 is correct for most cases anyway */
|
||||||
|
FIXME(font,":stub!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
* GetCharacterPlacement32W [GDI32.161]
|
||||||
|
*/
|
||||||
|
DWORD WINAPI
|
||||||
|
GetCharacterPlacement32W(HDC32 hdc, LPCWSTR lpString, UINT32 uCount,
|
||||||
|
INT32 nMaxExtent, GCP_RESULTS32W lpResults,
|
||||||
|
DWORD dwFlags)
|
||||||
|
{
|
||||||
|
/* return value 0 is correct for most cases anyway */
|
||||||
|
FIXME(font,":stub!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -336,11 +336,7 @@ static HBITMAP16 OBM_MakeBitmap( WORD width, WORD height,
|
||||||
bmpObjPtr->bitmap.bmPlanes = 1;
|
bmpObjPtr->bitmap.bmPlanes = 1;
|
||||||
bmpObjPtr->bitmap.bmBitsPixel = bpp;
|
bmpObjPtr->bitmap.bmBitsPixel = bpp;
|
||||||
bmpObjPtr->bitmap.bmBits = (SEGPTR)NULL;
|
bmpObjPtr->bitmap.bmBits = (SEGPTR)NULL;
|
||||||
|
bmpObjPtr->dib = NULL;
|
||||||
bmpObjPtr->dibSection = NULL;
|
|
||||||
bmpObjPtr->colorMap = NULL;
|
|
||||||
bmpObjPtr->nColorMap = 0;
|
|
||||||
bmpObjPtr->status = DIB_NoHandler;
|
|
||||||
|
|
||||||
GDI_HEAP_UNLOCK( hbitmap );
|
GDI_HEAP_UNLOCK( hbitmap );
|
||||||
return hbitmap;
|
return hbitmap;
|
||||||
|
|
|
@ -594,6 +594,11 @@ UINT16 WINAPI GDIRealizePalette( HDC16 hdc )
|
||||||
return RealizeDefaultPalette( hdc );
|
return RealizeDefaultPalette( hdc );
|
||||||
|
|
||||||
palPtr = (PALETTEOBJ *) GDI_GetObjPtr( dc->w.hPalette, PALETTE_MAGIC );
|
palPtr = (PALETTEOBJ *) GDI_GetObjPtr( dc->w.hPalette, PALETTE_MAGIC );
|
||||||
|
|
||||||
|
if (!palPtr) {
|
||||||
|
FIXME(palette,"invalid selected palette %04x\n",dc->w.hPalette);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
realized = COLOR_SetMapping(palPtr,0,palPtr->logpalette.palNumEntries,
|
realized = COLOR_SetMapping(palPtr,0,palPtr->logpalette.palNumEntries,
|
||||||
(dc->w.hPalette != hPrimaryPalette) ||
|
(dc->w.hPalette != hPrimaryPalette) ||
|
||||||
|
|
|
@ -2506,3 +2506,20 @@ HRGN32 WINAPI CreatePolygonRgn32( const POINT32 *points, INT32 count,
|
||||||
{
|
{
|
||||||
return CreatePolyPolygonRgn32( points, &count, 1, mode );
|
return CreatePolyPolygonRgn32( points, &count, 1, mode );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GetRandomRgn [GDI32.215]
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* This function is UNDOCUMENTED, it isn't even in the header file.
|
||||||
|
* I assume that it will return a HRGN32!??
|
||||||
|
*/
|
||||||
|
HRGN32 WINAPI GetRandomRgn(DWORD dwArg1, DWORD dwArg2, DWORD dwArg3)
|
||||||
|
{
|
||||||
|
FIXME (region, "(0x%08x 0x%08x 0x%08x): empty stub!\n",
|
||||||
|
dwArg1, dwArg2, dwArg3);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -231,6 +231,12 @@ OLESTATUS WINAPI WINE_StringFromCLSID(
|
||||||
char *s;
|
char *s;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (!id)
|
||||||
|
{ ERR(ole,"called with id=Null\n");
|
||||||
|
*idstr = 0x00;
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
sprintf(idstr, "{%08lx-%04x-%04x-%02x%02x-",
|
sprintf(idstr, "{%08lx-%04x-%04x-%02x%02x-",
|
||||||
id->Data1, id->Data2, id->Data3,
|
id->Data1, id->Data2, id->Data3,
|
||||||
id->Data4[0], id->Data4[1]);
|
id->Data4[0], id->Data4[1]);
|
||||||
|
|
1686
ole/folders.c
1686
ole/folders.c
File diff suppressed because it is too large
Load Diff
|
@ -6,13 +6,13 @@
|
||||||
/* LOCVAL(LOCALE_ILANGUAGE,"") */
|
/* LOCVAL(LOCALE_ILANGUAGE,"") */
|
||||||
/* LOCVAL(LOCALE_SLANGUAGE,"") */
|
/* LOCVAL(LOCALE_SLANGUAGE,"") */
|
||||||
/* LOCVAL(LOCALE_SENGLANGUAGE,"") */
|
/* LOCVAL(LOCALE_SENGLANGUAGE,"") */
|
||||||
/* LOCVAL(LOCALE_SABBREVLANGNAME,"") */
|
LOCVAL(LOCALE_SABBREVLANGNAME,"afk")
|
||||||
/* LOCVAL(LOCALE_SNATIVELANGNAME,"") */
|
LOCVAL(LOCALE_SNATIVELANGNAME,"Afrikaans")
|
||||||
/* LOCVAL(LOCALE_ICOUNTRY,"") */
|
/* LOCVAL(LOCALE_ICOUNTRY,"") */
|
||||||
/* LOCVAL(LOCALE_SCOUNTRY,"") */
|
/* LOCVAL(LOCALE_SCOUNTRY,"") */
|
||||||
/* LOCVAL(LOCALE_SENGCOUNTRY,"") */
|
/* LOCVAL(LOCALE_SENGCOUNTRY,"") */
|
||||||
LOCVAL(LOCALE_SABBREVCTRYNAME,"afk")
|
LOCVAL(LOCALE_SABBREVCTRYNAME,"ZAF")
|
||||||
/* LOCVAL(LOCALE_SNATIVECTRYNAME,"") */
|
LOCVAL(LOCALE_SNATIVECTRYNAME,"Suid Afrika")
|
||||||
/* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */
|
/* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */
|
||||||
/* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */
|
/* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */
|
||||||
/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */
|
/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */
|
||||||
|
@ -25,12 +25,12 @@ LOCVAL(LOCALE_SABBREVCTRYNAME,"afk")
|
||||||
/* LOCVAL(LOCALE_IDIGITS,"2") */
|
/* LOCVAL(LOCALE_IDIGITS,"2") */
|
||||||
/* LOCVAL(LOCALE_ILZERO,"1") */
|
/* LOCVAL(LOCALE_ILZERO,"1") */
|
||||||
/* LOCVAL(LOCALE_INEGNUMBER) */
|
/* LOCVAL(LOCALE_INEGNUMBER) */
|
||||||
/* LOCVAL(LOCALE_SNATIVEDIGITS) */
|
LOCVAL(LOCALE_SNATIVEDIGITS,"0123456789")
|
||||||
/* LOCVAL(LOCALE_SCURRENCY,"") */
|
/* LOCVAL(LOCALE_SCURRENCY,"") */
|
||||||
/* LOCVAL(LOCALE_SINTLSYMBOL) */
|
/* LOCVAL(LOCALE_SINTLSYMBOL) */
|
||||||
/* LOCVAL(LOCALE_SMONDECIMALSEP,",") */
|
/* LOCVAL(LOCALE_SMONDECIMALSEP,",") */
|
||||||
/* LOCVAL(LOCALE_SMONTHOUSANDSEP,".") */
|
/* LOCVAL(LOCALE_SMONTHOUSANDSEP,".") */
|
||||||
/* LOCVAL(LOCALE_SMONGROUPING) */
|
LOCVAL(LOCALE_SMONGROUPING,"3;0")
|
||||||
/* LOCVAL(LOCALE_ICURRDIGITS,"2") */
|
/* LOCVAL(LOCALE_ICURRDIGITS,"2") */
|
||||||
/* LOCVAL(LOCALE_IINTLCURRDIGITS) */
|
/* LOCVAL(LOCALE_IINTLCURRDIGITS) */
|
||||||
/* LOCVAL(LOCALE_ICURRENCY,"3") */
|
/* LOCVAL(LOCALE_ICURRENCY,"3") */
|
||||||
|
@ -55,35 +55,35 @@ LOCVAL(LOCALE_SABBREVCTRYNAME,"afk")
|
||||||
/* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */
|
/* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */
|
||||||
/* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */
|
/* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */
|
||||||
|
|
||||||
/* LOCVAL(LOCALE_SDAYNAME1,"") */
|
LOCVAL(LOCALE_SDAYNAME1,"Maandag")
|
||||||
/* LOCVAL(LOCALE_SDAYNAME2,"") */
|
LOCVAL(LOCALE_SDAYNAME2,"Dinsdag")
|
||||||
/* LOCVAL(LOCALE_SDAYNAME3,"") */
|
LOCVAL(LOCALE_SDAYNAME3,"Woensdag")
|
||||||
/* LOCVAL(LOCALE_SDAYNAME4,"") */
|
LOCVAL(LOCALE_SDAYNAME4,"Donderdag")
|
||||||
/* LOCVAL(LOCALE_SDAYNAME5,"") */
|
LOCVAL(LOCALE_SDAYNAME5,"Vrydag")
|
||||||
/* LOCVAL(LOCALE_SDAYNAME6,"") */
|
LOCVAL(LOCALE_SDAYNAME6,"Saterdag")
|
||||||
/* LOCVAL(LOCALE_SDAYNAME7,"") */
|
LOCVAL(LOCALE_SDAYNAME7,"Sondag")
|
||||||
|
|
||||||
/* LOCVAL(LOCALE_SABBREVDAYNAME1,"Ma") */
|
LOCVAL(LOCALE_SABBREVDAYNAME1,"Maan")
|
||||||
/* LOCVAL(LOCALE_SABBREVDAYNAME2,"Ti") */
|
LOCVAL(LOCALE_SABBREVDAYNAME2,"Dins")
|
||||||
/* LOCVAL(LOCALE_SABBREVDAYNAME3,"On") */
|
LOCVAL(LOCALE_SABBREVDAYNAME3,"Woen")
|
||||||
/* LOCVAL(LOCALE_SABBREVDAYNAME4,"To") */
|
LOCVAL(LOCALE_SABBREVDAYNAME4,"Dond")
|
||||||
/* LOCVAL(LOCALE_SABBREVDAYNAME5,"Fr") */
|
LOCVAL(LOCALE_SABBREVDAYNAME5,"Vry")
|
||||||
/* LOCVAL(LOCALE_SABBREVDAYNAME6,"Lø") */
|
LOCVAL(LOCALE_SABBREVDAYNAME6,"Sat")
|
||||||
/* LOCVAL(LOCALE_SABBREVDAYNAME7,"Sø") */
|
LOCVAL(LOCALE_SABBREVDAYNAME7,"Son")
|
||||||
|
|
||||||
/* LOCVAL(LOCALE_SMONTHNAME1,"") */
|
LOCVAL(LOCALE_SMONTHNAME1,"Januarie")
|
||||||
/* LOCVAL(LOCALE_SMONTHNAME2,"") */
|
LOCVAL(LOCALE_SMONTHNAME2,"Februarie")
|
||||||
/* LOCVAL(LOCALE_SMONTHNAME3,"") */
|
LOCVAL(LOCALE_SMONTHNAME3,"Maart")
|
||||||
/* LOCVAL(LOCALE_SMONTHNAME4,"") */
|
LOCVAL(LOCALE_SMONTHNAME4,"April")
|
||||||
/* LOCVAL(LOCALE_SMONTHNAME5,"") */
|
LOCVAL(LOCALE_SMONTHNAME5,"Mei")
|
||||||
/* LOCVAL(LOCALE_SMONTHNAME6,"") */
|
LOCVAL(LOCALE_SMONTHNAME6,"Junie")
|
||||||
/* LOCVAL(LOCALE_SMONTHNAME7,"") */
|
LOCVAL(LOCALE_SMONTHNAME7,"Julie")
|
||||||
/* LOCVAL(LOCALE_SMONTHNAME8,"") */
|
LOCVAL(LOCALE_SMONTHNAME8,"Augustus")
|
||||||
/* LOCVAL(LOCALE_SMONTHNAME9,"") */
|
LOCVAL(LOCALE_SMONTHNAME9,"September")
|
||||||
/* LOCVAL(LOCALE_SMONTHNAME10,"") */
|
LOCVAL(LOCALE_SMONTHNAME10,"Oktober")
|
||||||
/* LOCVAL(LOCALE_SMONTHNAME11,"") */
|
LOCVAL(LOCALE_SMONTHNAME11,"November")
|
||||||
/* LOCVAL(LOCALE_SMONTHNAME12,"") */
|
LOCVAL(LOCALE_SMONTHNAME12,"Desember")
|
||||||
/* LOCVAL(LOCALE_SMONTHNAME13,"") */
|
LOCVAL(LOCALE_SMONTHNAME13,"")
|
||||||
|
|
||||||
/* LOCVAL(LOCALE_SABBREVMONTHNAME1,"") */
|
/* LOCVAL(LOCALE_SABBREVMONTHNAME1,"") */
|
||||||
/* LOCVAL(LOCALE_SABBREVMONTHNAME2,"") */
|
/* LOCVAL(LOCALE_SABBREVMONTHNAME2,"") */
|
||||||
|
@ -108,3 +108,4 @@ LOCVAL(LOCALE_SABBREVCTRYNAME,"afk")
|
||||||
/* LOCVAL(LOCALE_INEGSYMPRECEDES, "") */
|
/* LOCVAL(LOCALE_INEGSYMPRECEDES, "") */
|
||||||
/* LOCVAL(LOCALE_INEGSEPBYSPACE, "") */
|
/* LOCVAL(LOCALE_INEGSEPBYSPACE, "") */
|
||||||
|
|
||||||
|
/* Gregoriaanse kalender */
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue