Release 980927
Sun Sep 27 14:25:38 1998 Petter Reinholdtsen <pere@td.org.uit.no> * [files/drive.c] Make sure GetDriveType32A() handles param NULL. Added some doc on function. Sun Sep 27 14:07:26 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [controls/edit.c] [windows/win.c] Don't call SetWindowLong() in EDIT_WM_NCREATE. Fix SetWindowLong(GWL_[EX]STYLE) to work for 16bit windows. Remove UpdateWindow() call. Sun Sep 27 13:41:22 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [scheduler/*.c] [server/event.c] [server/mutex.c] [server/semaphore.c] Implemented server-side synchronisation objects. Sun Sep 27 01:13:35 1998 Alex Priem <alexp@sci.kun.nl> * [dlls/comctl32/treeview.c] [include/treeview.h] [include/comctl.h] Treeview implementation. * [dlls/comctl32/trackbar.c] [include/trackbar.h] Trackbar implementation. Sat Sep 26 20:49:13 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [if1632/thunk.c] [tools/build.c] [win32/kernel32.c] Bugfix: several problems with flat thunks fixed. * [memory/selector.c] Bugfix: IsBad...Ptr16 didn't work for limit_in_pages segments. * [scheduler/thread.c] Bugfix: CreateThread: Allow id parameter == NULL. * [objects/gdiobj.c] Bugfix: IsGDIObject: Return correct object type for stock objects. * [msdos/dpmi.c] Bugfix: fixed typo in INT_DoRealModeInt. * [msdos/int21.c] Bugfix: int21 READ *must* use WIN16_hread, not _hread16. * [if1632/kernel.spec] [if1632/dummy.c] [if1632/thunk.c] [loader/ne/module.c] [scheduler/event.c] [scheduler/synchro.c] [scheduler/thread.c] [win32/kernel32.c] [win32/ordinals.c] Added names/stubs for all undocumented KERNEL routines (Win95). Added the following undoc. 16-bit equivalents to Win32 routines: KERNEL.441-443,449-453,456-462,471-476,479-486,488. Added stubs for some other KERNEL routines. * [memory/heap.c] [memory/global.c] [include/global.h] Implemented Local32... 32-bit local heap routines (KERNEL.208-215, 229). * [miscemu/instr.c] [loader/module.c] [include/module.h] Implemented __GP fault handling and HasGPHandler (KERNEL.338). * [misc/error.c] Implemented LogParamErrorRegs (KERNEL.327). * [loader/task.c] [include/windows.h] Implemented GetCodeInfo (KERNEL.104). * [loader/task.c] [scheduler/thread.c] [include/thread.h] Implemented [GS]etThreadQueue and [GS]etFastQueue (KERNEL.463/4, 624/5). * [if1632/gdi.spec] [objects/dc.c] [objects/dib.c] [objects/bitmap.c] [include/windows.h] Bugfix: fixed wrong parameter for CreateDIBSection16. Added [GS]etDIBColorTable16, stub for GetBoundsRect16. Partially implemented BITMAP_GetObject16 for DIBs. * [if1632/gdi.spec] [relay32/gdi32.spec] [objects/palette.c] Added some GDI stubs. * [if1632/Makefile.in] [if1632/display.spec] [if1632/mouse.spec] [if1632/keyboard.spec] [if1632/builtin.c] [windows/keyboard.c] Added some stubs for Win16 drivers: KEYBOARD, MOUSE, DISPLAY. * [if1632/wprocs.spec] [msdos/vxd.c] Added some stubs for VxDs: VMM, ConfigMG, TimerAPI. * [msdos/int2f.c] Added some stubs for real-mode network drivers. Sat Sep 26 18:18:18 1998 Marcus Meissner <marcus@jet.franken.de> * [configure.in] Merged in some more of the FreeBSD ports/emulators/wine patches. (Maintainer(s) of this port: You can just submit these patches to Alexandre directly.) * [loader/pe_image.c] Check filesize of image against size derived from header to spot truncated executeables without crashing. * [files/directory.c] Set envvar "COMSPEC". One win32(!!) program crashes without it. * [multimedia/mmio.c] Added mmioSetInfo32. * [include/file.h] Return STD_ERROR_HANDLE for AUX and PRT dos handles. * [loader/module.c] Handle executeables with spaces in their names a bit better in CreateProcess. * [relay32/msvfw32.spec][if1632/msvideo.spec][multimedia/msvideo.c][include/vfw.h] Started on MS Video support (can load Win32 ICMs). * [tools/testrun] A bit smarter use of ps. * [memory/virtual.c] Report PAGE_GUARDed pages as PAGE_PROTECTED (AutoCAD LT R17 fails without that check (since Win95 doesn't know about PAGE_GUARD)). Sat Sep 26 15:04:05 1998 Ove Kaaven <ovek@arcticnet.no> * [include/miscemu.h] [if1632/builtin.c] [loader/task.c] [miscemu/instr.c] [msdos/dpmi.c] [msdos/int21.c] [msdos/interrupts.c] [windows/user.c] INT_[S|G]etHandler was renamed to INT_[S|G]etPMHandler. Added handlers to deal with real-mode interrupts; DOS programs are now able to hook real-mode interrupts. * [loader/dos/module.c] [msdos/dosmem.c] [msdos/int21.c] Moved real-mode interrupt table initialization to msdos/dosmem.c, and made new V86 tasks get a full copy of the existing "system memory" instead of almost empty space. Misc fixes. * [include/dosexe.h] [loader/dos/module.c] [msdos/dpmi.c] [msdos/int2f.c] First shot at letting DOS programs start up DPMI (but DPMI is still disabled for DOS programs, for pkunzip's sake). * [include/debugger.h] [debugger/break.c] [debugger/dbg.y] [debugger/registers.c] [debugger/memory.c] [debugger/info.c] [loader/dos/dosvm.c] First shot at making Wine's debugger work for DOS programs. The -debug flag works, as do "nexti" and "stepi". Sat Sep 26 13:13:13 1998 Juergen Schmied <juergen.schmied@metronet.de> * [dlls/shell32/dataobject.c] New classes IEnumFORMATETC implemented, IDataObject stubs. * [dlls/shell32/*.*][relay32/shell32.spec] Bugfixes. New: ICM_InsertItem(), ILCreateFromPath(). Implemented: ILCloneFirst(). Stubs: ILIsEqual(), ILFindChild(), SHLogILFromFSIL(), PathMatchSpec(), PathIsExe(). Changed: ILGetSize(), _ILIsDesktop(), PathCombine(). * [include/shlobj.h] New SHLGUID's New structures: DVTARGETDEVICE32, STGMEDIUM32, FORMATETC32, CLIPFORMAT32. New interfaces: IEnumFORMATETC, IDataObject, ICommDlgBrowser IDockingWindowFrame, IServiceProvider. * [dlls/shell32/folders.c] Stubs for IShellLink. * [loader/resource.c] Small fixes. * [misc/crtdll.c][relay32/crtdll.spec] New __dllonexit(). * [windows/message.c] SendNotifyMessageA, SendMessageCallBack32A half implemented. * [controls/edit.c] EDIT_WM_SetText set EF_UPDATE flag not for ES_MULTILINE. * [files/file.c] Handling of fileposition fixed. Fri Sep 25 18:13:30 1998 Patrik Stridvall <ps@leissner.se> * [include/windows.h] [include/wintypes.h] [ole/ole2nls.h] [relay32/kernel32.spec] Implemented EnumDateFormats and EnumTimeFormats. Only adds US English support. * [Makefile.in] [configure.in] [dlls/Makefile.in] [dlls/psapi/Makefile.in] [dlls/psapi/psapi_main.c] New files to implement stubs for PSAPI.DLL (NT only). * [relay32/Makefile.in] [relay32/builtin32.c] [relay32/psapi.spec] New spec file for PSAPI.DLL (NT only). * [scheduler/handle.c] HANDLE_GetObjPtr should only interpret the pseudo handles as the current thread or the current process if a thread or a process is requested. * [include/winversion.h] [misc/version.c] Adds the global function VERSION_GetVersion() so functions can have different behavior depending on the -winver flag. * [include/oledlg.h] [ole/oledlg.c] Minor fixes. * [windows/winproc.c] Minor changes. * [include/imm.h] [misc/imm.c] Now returns correct values under both Windows 95 and NT 4.0. Thu Sep 24 22:11:44 1998 Kristian Nielsen <kristian.nielsen@risoe.dk> * [configure.in] [include/acconfig.h] [include/thread.h] [scheduler/sysdeps.c] Autoconfig test for non-reentrant libc. Wed Sep 23 19:52:12 1998 Matthew Becker <mbecker@glasscity.net> * [*/*.c] Miscellaneous documentation updates and debugging output standardizations. * [objects/clipping.c] Added ExtSelectClipRgn. Wed Sep 23 00:03:28 EDT 1998 Pete Ratzlaff <pratzlaff@cfa.harvard.edu> * [include/windows.h] [if1632/user.spec] [relay32/user32.spec] [windows/keyboard.c] Added, marginally implemented, GetKeyboardLayoutName(). Only returns US English keyboard name. Tue Sep 22 16:32:41 1998 Marcel Baur <mbaur@iiic.ethz.ch> * [programs/control/*] New Winelib application. Mon Sep 21 00:29:18 1998 Peter Hunnisett <hunnise@nortel.ca> * [include/dplay.h][multimedia/dplay.c][ole/compobj.c] Added all DirectPlayLobby interfaces and enhanced DirectPlay and DirectPlayLobby support. Still not all that much. Useful enough if you just need to start a program, don't try any real dplay/lobby stuff. * [documentation/status/directplay] Added a very little bit. * [graphics/ddraw.c] - Call to SetWindowLong32A wasn't working because there was no memory set aside when the window class was registered. - Fixed some xlib reference counting and change the behaviour of DirectDrawSurface3_SetPalette to mimic observed behaviour (palette is associated will all backbuffers) - Also stored all palette colour fields and spit back our saved colour fields rather than query X for them. - Added plenty of AddRef and Release traces. - Added Xlib support for using -desktop option. - Fixed Xlib message handling. Messages weren't being passed to the application. Fixes mouse movements in some xlib DDraw games. - Added a few stubs. * [windows/win.c][include/winerror.h] Fixed up some error handling in WIN_SetWindowLong. SetLastError wasn't being used. Could cause problems with 0 return codes. Added new error in winerror (1400). * [AUTHORS] [include/authors.h] Added myself as a Wine author. Sun Sep 20 21:22:44 1998 Alexander Larsson <alla@lysator.liu.se> * [loader/module.c] Changed GetModuleFileName32A so that is returns the long version of the filename. Note that just the name is long, not the directories. Sat Sep 19 20:05:30 1998 Per ngstrm <pang@mind.nu> * [controls/menu.c] Made a couple of fixes to make life easier for applications that alter their menus at runtime. * [windows/defdlg.c] Removed the cast of the return value from dialog procedures to a 16-bit bool. The return value needs to retain all its 32 bits, since it is not always a bool, such as when responding to the WM_NCHITTEST message. Fri Sep 18 11:30:38 1998 Sergey Turchanov <turchanov@usa.net> * [loader/resource.c] Fixed very funny bug (though gravely affecting further excecution) with FindResource[Ex]32 functions. * [include/multimon.h] [windows/multimon.c] [relay32/user32.spec] [include/windows.h] [windows/sysmetrics.c] Default implementation for Multimonitor API. * [include/windows.h] [windows/winpos.c] Fixed incorrect declaration (and behaviour) of GetWindowRect32. Wed Sep 16 10:21:15 1998 Gerard Patel <G.Patel@Wanadoo.fr> * [controls/edit.c] Fixed EDIT_EM_GetLine to use correctly length of lines. Tue Sep 15 20:40:16 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [misc/tweak.c][include/tweak.h][controls/menu.c] Replaced the tweak graphic routines by calls to DrawEdge32(). * [misc/tweak.c][include/tweak.h][documentation/win95look] [wine.ini][*/*] Changed "look and feel" selection. Allows Win3.1, Win95 and Win98 (no GUI code implemented) look and feel. * [dlls/comctl32/header.c][include/header.h][include/commctrl.h] Started callback item support and did some minor improvements. * [dlls/comctl32/imagelist.c] Fixed bug in transparent image display. ImageList_GetIcon is still buggy :-( * [dlls/comctl32/toolbar.c] Fixed button drawing (partial hack). * [dlls/comctl32/commctrl.c] Fixed MenuHelp(). * [controls/button.c] Added 3d effect for groupbox. * [windows/msgbox.c] Added font support for message boxes. * [windows/nonclient.c] Fixed window moving bug. * [dlls/comctl32/*.c] Various improvements. * [dlls/comctl32/listview.c][dlls/comctl32/rebar.c] [include/commctrl.h] More messages. * [windows/syscolor.c][include/windows.h] Introduced new Win98 system colors. Tue Sep 15 18:29:45 1998 Wesley Filardo <eightknots@aol.com> * [files/profile.c] Added support in PROFILE_LoadWineIni for -config option * [misc/main.c] [include/options.h] Added -config option. Tue Sep 15 18:22:26 1998 Petter Reinholdtsen <pere@td.org.uit.no> * [documentation/Makefile.in] Make sure directory exists before installing into it. Tue Sep 15 01:47:33 1998 Pablo Saratxaga <pablo.sarachaga@ping.be> * [ole/nls/*] [ole/ole2nls.c] [include/winnls.h] Fixed a few errors and completed some NLS files. Mon Sep 14 01:23:45 1998 Joseph Pranevich <knight@baltimore.wwaves.com> * [include/miscemu.h] [msdos/interrupts.c] Removed a compilation warning, added INT 25 to the list of interrupts callable from DOS applications, added a debug message when unsupported interrupts are used. Sun Sep 13 19:55:22 1998 Lawson Whitney <lawson_whitney@juno.com> * [if1632/relay.c] CallProcEx32W should not reverse arguments. Sun Aug 17 21:18:12 1998 Eric Pouech <eric.pouech@lemel.fr> * [multimedia/midi.c] [multimedia/init.c] [multimedia/mmsys.c] [include/multimedia.h] [include/mmsystem.h] [multimedia/Makefile.in] [multimedia/midipatch.c] [if1632/multimedia.spec] Made MIDI input and output functional on OSS capable systems. * [multimedia/timer.c] Changes to trigger callbacks at the accurate pace even when fake timers are used.
This commit is contained in:
parent
a0d77315e4
commit
d30dfd24d6
19
ANNOUNCE
19
ANNOUNCE
|
@ -1,14 +1,15 @@
|
|||
This is release 980913 of Wine, the MS Windows emulator. This is still a
|
||||
This is release 980927 of Wine, the MS Windows emulator. This is still a
|
||||
developer's only release. There are many bugs and many unimplemented API
|
||||
features. Most applications still do not work correctly.
|
||||
|
||||
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
|
||||
forget to include a ChangeLog entry.
|
||||
|
||||
WHAT'S NEW with Wine-980913: (see ChangeLog for details)
|
||||
- Even more common controls stuff.
|
||||
- Many PostScript driver improvements.
|
||||
- More DOS executables support.
|
||||
WHAT'S NEW with Wine-980927: (see ChangeLog for details)
|
||||
- Still more common controls and SHELL32 features.
|
||||
- MIDI I/O support.
|
||||
- Several new undocumented KERNEL functions.
|
||||
- More DOS exe stuff including some debugger support.
|
||||
- Lots of bug fixes.
|
||||
|
||||
See the README file in the distribution for installation instructions.
|
||||
|
@ -17,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
|
||||
from the following locations:
|
||||
|
||||
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-980913.tar.gz
|
||||
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-980913.tar.gz
|
||||
ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/Wine-980913.tar.gz
|
||||
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-980913.tar.gz
|
||||
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-980927.tar.gz
|
||||
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-980927.tar.gz
|
||||
ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/Wine-980927.tar.gz
|
||||
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-980927.tar.gz
|
||||
|
||||
It should also be available from any site that mirrors tsx-11 or sunsite.
|
||||
|
||||
|
|
3
AUTHORS
3
AUTHORS
|
@ -32,6 +32,7 @@ Chris Faherty,
|
|||
Carsten Fallesen,
|
||||
Paul Falstad,
|
||||
David Faure,
|
||||
Wesley Filardo,
|
||||
Claus Fischer,
|
||||
Olaf Flebbe,
|
||||
Chad Fraleigh,
|
||||
|
@ -49,6 +50,7 @@ Cameron Heide,
|
|||
Jochen Hoenicke,
|
||||
Onno Hovers,
|
||||
Jeffrey Hsu,
|
||||
Peter Hunnisett,
|
||||
Miguel de Icaza,
|
||||
Jukka Iivonen,
|
||||
Lee Jaekil,
|
||||
|
@ -91,6 +93,7 @@ Michael Patra,
|
|||
Dimitrie O. Paun,
|
||||
Jim Peterson,
|
||||
Robert Pouliot,
|
||||
Petter Reinholdtsen,
|
||||
Keith Reynolds,
|
||||
Slaven Rezic,
|
||||
John Richardson,
|
||||
|
|
402
ChangeLog
402
ChangeLog
|
@ -1,3 +1,405 @@
|
|||
----------------------------------------------------------------------
|
||||
Sun Sep 27 14:25:38 1998 Petter Reinholdtsen <pere@td.org.uit.no>
|
||||
|
||||
* [files/drive.c]
|
||||
Make sure GetDriveType32A() handles param NULL. Added some
|
||||
doc on function.
|
||||
|
||||
Sun Sep 27 14:07:26 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
|
||||
|
||||
* [controls/edit.c] [windows/win.c]
|
||||
Don't call SetWindowLong() in EDIT_WM_NCREATE.
|
||||
Fix SetWindowLong(GWL_[EX]STYLE) to work for 16bit windows. Remove
|
||||
UpdateWindow() call.
|
||||
|
||||
Sun Sep 27 13:41:22 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
|
||||
|
||||
* [scheduler/*.c] [server/event.c] [server/mutex.c]
|
||||
[server/semaphore.c]
|
||||
Implemented server-side synchronisation objects.
|
||||
|
||||
Sun Sep 27 01:13:35 1998 Alex Priem <alexp@sci.kun.nl>
|
||||
|
||||
* [dlls/comctl32/treeview.c] [include/treeview.h] [include/comctl.h]
|
||||
Treeview implementation.
|
||||
|
||||
* [dlls/comctl32/trackbar.c] [include/trackbar.h]
|
||||
Trackbar implementation.
|
||||
|
||||
Sat Sep 26 20:49:13 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
|
||||
|
||||
* [if1632/thunk.c] [tools/build.c] [win32/kernel32.c]
|
||||
Bugfix: several problems with flat thunks fixed.
|
||||
|
||||
* [memory/selector.c]
|
||||
Bugfix: IsBad...Ptr16 didn't work for limit_in_pages segments.
|
||||
|
||||
* [scheduler/thread.c]
|
||||
Bugfix: CreateThread: Allow id parameter == NULL.
|
||||
|
||||
* [objects/gdiobj.c]
|
||||
Bugfix: IsGDIObject: Return correct object type for stock objects.
|
||||
|
||||
* [msdos/dpmi.c]
|
||||
Bugfix: fixed typo in INT_DoRealModeInt.
|
||||
|
||||
* [msdos/int21.c]
|
||||
Bugfix: int21 READ *must* use WIN16_hread, not _hread16.
|
||||
|
||||
* [if1632/kernel.spec] [if1632/dummy.c] [if1632/thunk.c]
|
||||
[loader/ne/module.c] [scheduler/event.c] [scheduler/synchro.c]
|
||||
[scheduler/thread.c] [win32/kernel32.c] [win32/ordinals.c]
|
||||
Added names/stubs for all undocumented KERNEL routines (Win95).
|
||||
Added the following undoc. 16-bit equivalents to Win32 routines:
|
||||
KERNEL.441-443,449-453,456-462,471-476,479-486,488.
|
||||
Added stubs for some other KERNEL routines.
|
||||
|
||||
* [memory/heap.c] [memory/global.c] [include/global.h]
|
||||
Implemented Local32... 32-bit local heap routines (KERNEL.208-215, 229).
|
||||
|
||||
* [miscemu/instr.c] [loader/module.c] [include/module.h]
|
||||
Implemented __GP fault handling and HasGPHandler (KERNEL.338).
|
||||
|
||||
* [misc/error.c]
|
||||
Implemented LogParamErrorRegs (KERNEL.327).
|
||||
|
||||
* [loader/task.c] [include/windows.h]
|
||||
Implemented GetCodeInfo (KERNEL.104).
|
||||
|
||||
* [loader/task.c] [scheduler/thread.c] [include/thread.h]
|
||||
Implemented [GS]etThreadQueue and [GS]etFastQueue (KERNEL.463/4, 624/5).
|
||||
|
||||
* [if1632/gdi.spec] [objects/dc.c] [objects/dib.c]
|
||||
[objects/bitmap.c] [include/windows.h]
|
||||
Bugfix: fixed wrong parameter for CreateDIBSection16.
|
||||
Added [GS]etDIBColorTable16, stub for GetBoundsRect16.
|
||||
Partially implemented BITMAP_GetObject16 for DIBs.
|
||||
|
||||
* [if1632/gdi.spec] [relay32/gdi32.spec] [objects/palette.c]
|
||||
Added some GDI stubs.
|
||||
|
||||
* [if1632/Makefile.in] [if1632/display.spec] [if1632/mouse.spec]
|
||||
[if1632/keyboard.spec] [if1632/builtin.c] [windows/keyboard.c]
|
||||
Added some stubs for Win16 drivers: KEYBOARD, MOUSE, DISPLAY.
|
||||
|
||||
* [if1632/wprocs.spec] [msdos/vxd.c]
|
||||
Added some stubs for VxDs: VMM, ConfigMG, TimerAPI.
|
||||
|
||||
* [msdos/int2f.c]
|
||||
Added some stubs for real-mode network drivers.
|
||||
|
||||
Sat Sep 26 18:18:18 1998 Marcus Meissner <marcus@jet.franken.de>
|
||||
|
||||
* [configure.in]
|
||||
Merged in some more of the FreeBSD ports/emulators/wine patches.
|
||||
(Maintainer(s) of this port: You can just submit these
|
||||
patches to Alexandre directly.)
|
||||
|
||||
* [loader/pe_image.c]
|
||||
Check filesize of image against size derived from header
|
||||
to spot truncated executeables without crashing.
|
||||
|
||||
* [files/directory.c]
|
||||
Set envvar "COMSPEC". One win32(!!) program crashes without it.
|
||||
|
||||
* [multimedia/mmio.c]
|
||||
Added mmioSetInfo32.
|
||||
|
||||
* [include/file.h]
|
||||
Return STD_ERROR_HANDLE for AUX and PRT dos handles.
|
||||
|
||||
* [loader/module.c]
|
||||
Handle executeables with spaces in their names a bit better in
|
||||
CreateProcess.
|
||||
|
||||
* [relay32/msvfw32.spec][if1632/msvideo.spec][multimedia/msvideo.c][include/vfw.h]
|
||||
Started on MS Video support (can load Win32 ICMs).
|
||||
|
||||
* [tools/testrun]
|
||||
A bit smarter use of ps.
|
||||
|
||||
* [memory/virtual.c]
|
||||
Report PAGE_GUARDed pages as PAGE_PROTECTED (AutoCAD LT R17 fails
|
||||
without that check (since Win95 doesn't know about PAGE_GUARD)).
|
||||
|
||||
Sat Sep 26 15:04:05 1998 Ove Kaaven <ovek@arcticnet.no>
|
||||
|
||||
* [include/miscemu.h] [if1632/builtin.c] [loader/task.c]
|
||||
[miscemu/instr.c] [msdos/dpmi.c] [msdos/int21.c]
|
||||
[msdos/interrupts.c] [windows/user.c]
|
||||
INT_[S|G]etHandler was renamed to INT_[S|G]etPMHandler.
|
||||
Added handlers to deal with real-mode interrupts; DOS
|
||||
programs are now able to hook real-mode interrupts.
|
||||
|
||||
* [loader/dos/module.c] [msdos/dosmem.c] [msdos/int21.c]
|
||||
Moved real-mode interrupt table initialization to
|
||||
msdos/dosmem.c, and made new V86 tasks get a full copy
|
||||
of the existing "system memory" instead of almost empty
|
||||
space. Misc fixes.
|
||||
|
||||
* [include/dosexe.h] [loader/dos/module.c] [msdos/dpmi.c]
|
||||
[msdos/int2f.c]
|
||||
First shot at letting DOS programs start up DPMI (but DPMI
|
||||
is still disabled for DOS programs, for pkunzip's sake).
|
||||
|
||||
* [include/debugger.h] [debugger/break.c] [debugger/dbg.y]
|
||||
[debugger/registers.c] [debugger/memory.c] [debugger/info.c]
|
||||
[loader/dos/dosvm.c]
|
||||
First shot at making Wine's debugger work for DOS programs.
|
||||
The -debug flag works, as do "nexti" and "stepi".
|
||||
|
||||
Sat Sep 26 13:13:13 1998 Juergen Schmied <juergen.schmied@metronet.de>
|
||||
|
||||
* [dlls/shell32/dataobject.c]
|
||||
New classes IEnumFORMATETC implemented, IDataObject stubs.
|
||||
|
||||
* [dlls/shell32/*.*][relay32/shell32.spec]
|
||||
Bugfixes.
|
||||
New: ICM_InsertItem(), ILCreateFromPath().
|
||||
Implemented: ILCloneFirst().
|
||||
Stubs: ILIsEqual(), ILFindChild(), SHLogILFromFSIL(),
|
||||
PathMatchSpec(), PathIsExe().
|
||||
Changed: ILGetSize(), _ILIsDesktop(), PathCombine().
|
||||
|
||||
* [include/shlobj.h]
|
||||
New SHLGUID's
|
||||
New structures: DVTARGETDEVICE32, STGMEDIUM32, FORMATETC32,
|
||||
CLIPFORMAT32.
|
||||
New interfaces: IEnumFORMATETC, IDataObject, ICommDlgBrowser
|
||||
IDockingWindowFrame, IServiceProvider.
|
||||
|
||||
* [dlls/shell32/folders.c]
|
||||
Stubs for IShellLink.
|
||||
|
||||
* [loader/resource.c]
|
||||
Small fixes.
|
||||
|
||||
* [misc/crtdll.c][relay32/crtdll.spec]
|
||||
New __dllonexit().
|
||||
|
||||
* [windows/message.c]
|
||||
SendNotifyMessageA, SendMessageCallBack32A half implemented.
|
||||
|
||||
* [controls/edit.c]
|
||||
EDIT_WM_SetText set EF_UPDATE flag not for ES_MULTILINE.
|
||||
|
||||
* [files/file.c]
|
||||
Handling of fileposition fixed.
|
||||
|
||||
Fri Sep 25 18:13:30 1998 Patrik Stridvall <ps@leissner.se>
|
||||
|
||||
* [include/windows.h] [include/wintypes.h]
|
||||
[ole/ole2nls.h] [relay32/kernel32.spec]
|
||||
Implemented EnumDateFormats and EnumTimeFormats.
|
||||
Only adds US English support.
|
||||
|
||||
* [Makefile.in] [configure.in]
|
||||
[dlls/Makefile.in] [dlls/psapi/Makefile.in]
|
||||
[dlls/psapi/psapi_main.c]
|
||||
New files to implement stubs for PSAPI.DLL (NT only).
|
||||
|
||||
* [relay32/Makefile.in] [relay32/builtin32.c]
|
||||
[relay32/psapi.spec]
|
||||
New spec file for PSAPI.DLL (NT only).
|
||||
|
||||
* [scheduler/handle.c]
|
||||
HANDLE_GetObjPtr should only interpret the pseudo handles as the
|
||||
current thread or the current process if a thread or a process is
|
||||
requested.
|
||||
|
||||
* [include/winversion.h] [misc/version.c]
|
||||
Adds the global function VERSION_GetVersion() so functions can
|
||||
have different behavior depending on the -winver flag.
|
||||
|
||||
* [include/oledlg.h] [ole/oledlg.c]
|
||||
Minor fixes.
|
||||
|
||||
* [windows/winproc.c]
|
||||
Minor changes.
|
||||
|
||||
* [include/imm.h] [misc/imm.c]
|
||||
Now returns correct values under both Windows 95 and NT 4.0.
|
||||
|
||||
Thu Sep 24 22:11:44 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
|
||||
|
||||
* [configure.in] [include/acconfig.h] [include/thread.h]
|
||||
[scheduler/sysdeps.c]
|
||||
Autoconfig test for non-reentrant libc.
|
||||
|
||||
Wed Sep 23 19:52:12 1998 Matthew Becker <mbecker@glasscity.net>
|
||||
|
||||
* [*/*.c]
|
||||
Miscellaneous documentation updates and debugging output
|
||||
standardizations.
|
||||
|
||||
* [objects/clipping.c]
|
||||
Added ExtSelectClipRgn.
|
||||
|
||||
Wed Sep 23 00:03:28 EDT 1998 Pete Ratzlaff <pratzlaff@cfa.harvard.edu>
|
||||
|
||||
* [include/windows.h] [if1632/user.spec] [relay32/user32.spec]
|
||||
[windows/keyboard.c]
|
||||
Added, marginally implemented, GetKeyboardLayoutName().
|
||||
Only returns US English keyboard name.
|
||||
|
||||
Tue Sep 22 16:32:41 1998 Marcel Baur <mbaur@iiic.ethz.ch>
|
||||
|
||||
* [programs/control/*]
|
||||
New Winelib application.
|
||||
|
||||
Mon Sep 21 00:29:18 1998 Peter Hunnisett <hunnise@nortel.ca>
|
||||
|
||||
* [include/dplay.h][multimedia/dplay.c][ole/compobj.c]
|
||||
Added all DirectPlayLobby interfaces and enhanced DirectPlay
|
||||
and DirectPlayLobby support. Still not all that much. Useful
|
||||
enough if you just need to start a program, don't try any
|
||||
real dplay/lobby stuff.
|
||||
|
||||
* [documentation/status/directplay]
|
||||
Added a very little bit.
|
||||
|
||||
* [graphics/ddraw.c]
|
||||
- Call to SetWindowLong32A wasn't working because there was no
|
||||
memory set aside when the window class was registered.
|
||||
- Fixed some xlib reference counting and change the behaviour
|
||||
of DirectDrawSurface3_SetPalette to mimic observed behaviour
|
||||
(palette is associated will all backbuffers)
|
||||
- Also stored all palette colour fields and spit back our saved
|
||||
colour fields rather than query X for them.
|
||||
- Added plenty of AddRef and Release traces.
|
||||
- Added Xlib support for using -desktop option.
|
||||
- Fixed Xlib message handling. Messages weren't being passed to
|
||||
the application. Fixes mouse movements in some xlib DDraw games.
|
||||
- Added a few stubs.
|
||||
|
||||
* [windows/win.c][include/winerror.h]
|
||||
Fixed up some error handling in WIN_SetWindowLong. SetLastError
|
||||
wasn't being used. Could cause problems with 0 return codes.
|
||||
Added new error in winerror (1400).
|
||||
|
||||
* [AUTHORS] [include/authors.h]
|
||||
Added myself as a Wine author.
|
||||
|
||||
Sun Sep 20 21:22:44 1998 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* [loader/module.c]
|
||||
Changed GetModuleFileName32A so that is returns the
|
||||
long version of the filename. Note that just the name
|
||||
is long, not the directories.
|
||||
|
||||
Sat Sep 19 20:05:30 1998 Per Ångström <pang@mind.nu>
|
||||
|
||||
* [controls/menu.c]
|
||||
Made a couple of fixes to make life easier for applications that alter
|
||||
their menus at runtime.
|
||||
|
||||
* [windows/defdlg.c]
|
||||
Removed the cast of the return value from dialog procedures to a 16-bit
|
||||
bool. The return value needs to retain all its 32 bits, since it is not
|
||||
always a bool, such as when responding to the WM_NCHITTEST message.
|
||||
|
||||
Fri Sep 18 11:30:38 1998 Sergey Turchanov <turchanov@usa.net>
|
||||
|
||||
* [loader/resource.c]
|
||||
Fixed very funny bug (though gravely affecting further excecution)
|
||||
with FindResource[Ex]32 functions.
|
||||
|
||||
* [include/multimon.h] [windows/multimon.c] [relay32/user32.spec]
|
||||
[include/windows.h] [windows/sysmetrics.c]
|
||||
Default implementation for Multimonitor API.
|
||||
|
||||
* [include/windows.h] [windows/winpos.c]
|
||||
Fixed incorrect declaration (and behaviour) of GetWindowRect32.
|
||||
|
||||
Wed Sep 16 10:21:15 1998 Gerard Patel <G.Patel@Wanadoo.fr>
|
||||
|
||||
* [controls/edit.c]
|
||||
Fixed EDIT_EM_GetLine to use correctly length of lines.
|
||||
|
||||
Tue Sep 15 20:40:16 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
|
||||
|
||||
* [misc/tweak.c][include/tweak.h][controls/menu.c]
|
||||
Replaced the tweak graphic routines by calls to DrawEdge32().
|
||||
|
||||
* [misc/tweak.c][include/tweak.h][documentation/win95look]
|
||||
[wine.ini][*/*]
|
||||
Changed "look and feel" selection. Allows Win3.1, Win95 and
|
||||
Win98 (no GUI code implemented) look and feel.
|
||||
|
||||
* [dlls/comctl32/header.c][include/header.h][include/commctrl.h]
|
||||
Started callback item support and did some minor improvements.
|
||||
|
||||
* [dlls/comctl32/imagelist.c]
|
||||
Fixed bug in transparent image display.
|
||||
ImageList_GetIcon is still buggy :-(
|
||||
|
||||
* [dlls/comctl32/toolbar.c]
|
||||
Fixed button drawing (partial hack).
|
||||
|
||||
* [dlls/comctl32/commctrl.c]
|
||||
Fixed MenuHelp().
|
||||
|
||||
* [controls/button.c]
|
||||
Added 3d effect for groupbox.
|
||||
|
||||
* [windows/msgbox.c]
|
||||
Added font support for message boxes.
|
||||
|
||||
* [windows/nonclient.c]
|
||||
Fixed window moving bug.
|
||||
|
||||
* [dlls/comctl32/*.c]
|
||||
Various improvements.
|
||||
|
||||
* [dlls/comctl32/listview.c][dlls/comctl32/rebar.c]
|
||||
[include/commctrl.h]
|
||||
More messages.
|
||||
|
||||
* [windows/syscolor.c][include/windows.h]
|
||||
Introduced new Win98 system colors.
|
||||
|
||||
Tue Sep 15 18:29:45 1998 Wesley Filardo <eightknots@aol.com>
|
||||
|
||||
* [files/profile.c]
|
||||
Added support in PROFILE_LoadWineIni for -config option
|
||||
|
||||
* [misc/main.c] [include/options.h]
|
||||
Added -config option.
|
||||
|
||||
Tue Sep 15 18:22:26 1998 Petter Reinholdtsen <pere@td.org.uit.no>
|
||||
|
||||
* [documentation/Makefile.in]
|
||||
Make sure directory exists before installing into it.
|
||||
|
||||
Tue Sep 15 01:47:33 1998 Pablo Saratxaga <pablo.sarachaga@ping.be>
|
||||
|
||||
* [ole/nls/*] [ole/ole2nls.c] [include/winnls.h]
|
||||
Fixed a few errors and completed some NLS files.
|
||||
|
||||
Mon Sep 14 01:23:45 1998 Joseph Pranevich <knight@baltimore.wwaves.com>
|
||||
|
||||
* [include/miscemu.h] [msdos/interrupts.c]
|
||||
Removed a compilation warning, added INT 25 to the list of interrupts
|
||||
callable from DOS applications, added a debug message when unsupported
|
||||
interrupts are used.
|
||||
|
||||
Sun Sep 13 19:55:22 1998 Lawson Whitney <lawson_whitney@juno.com>
|
||||
|
||||
* [if1632/relay.c]
|
||||
CallProcEx32W should not reverse arguments.
|
||||
|
||||
Sun Aug 17 21:18:12 1998 Eric Pouech <eric.pouech@lemel.fr>
|
||||
|
||||
* [multimedia/midi.c] [multimedia/init.c] [multimedia/mmsys.c]
|
||||
[include/multimedia.h] [include/mmsystem.h]
|
||||
[multimedia/Makefile.in] [multimedia/midipatch.c]
|
||||
[if1632/multimedia.spec]
|
||||
Made MIDI input and output functional on OSS capable systems.
|
||||
|
||||
* [multimedia/timer.c]
|
||||
Changes to trigger callbacks at the accurate pace even when
|
||||
fake timers are used.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Fri Sep 11 13:14:35 1998 Andreas Mohr <100.30936@germany.net>
|
||||
|
||||
|
|
|
@ -28,7 +28,10 @@ LIBSUBDIRS = \
|
|||
tools/wrc \
|
||||
controls \
|
||||
dlls/comctl32 \
|
||||
dlls/psapi \
|
||||
dlls/shell32 \
|
||||
dlls/winaspi \
|
||||
dlls/wnaspi32 \
|
||||
files \
|
||||
graphics \
|
||||
graphics/metafiledrv \
|
||||
|
@ -79,7 +82,10 @@ INSTALLSUBDIRS = $(DOCSUBDIRS)
|
|||
LIBOBJS = \
|
||||
controls/controls.o \
|
||||
dlls/comctl32/comctl32.o \
|
||||
dlls/psapi/psapi.o \
|
||||
dlls/shell32/shell32.o \
|
||||
dlls/winaspi/winaspi.o \
|
||||
dlls/wnaspi32/wnaspi32.o \
|
||||
files/files.o \
|
||||
graphics/graphics.o \
|
||||
graphics/metafiledrv/metafiledrv.o \
|
||||
|
|
|
@ -2070,8 +2070,55 @@ else
|
|||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for setrunelocale in -lxpg4""... $ac_c" 1>&6
|
||||
echo "configure:2075: checking for setrunelocale in -lxpg4" >&5
|
||||
ac_lib_var=`echo xpg4'_'setrunelocale | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lxpg4 $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2083 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char setrunelocale();
|
||||
|
||||
int main() {
|
||||
setrunelocale()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
LIBS="$ac_save_LIBS"
|
||||
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
ac_tr_lib=HAVE_LIB`echo xpg4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
|
||||
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
|
||||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_lib 1
|
||||
EOF
|
||||
|
||||
LIBS="-lxpg4 $LIBS"
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
|
||||
echo "configure:2075: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
|
||||
echo "configure:2122: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
|
||||
ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -2079,7 +2126,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lXxf86dga $X_LIBS -lXext -lX11 $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2083 "configure"
|
||||
#line 2130 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -2090,7 +2137,7 @@ int main() {
|
|||
XF86DGAQueryExtension()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -2118,17 +2165,17 @@ for ac_hdr in sys/soundcard.h machine/soundcard.h
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:2122: checking for $ac_hdr" >&5
|
||||
echo "configure:2169: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2127 "configure"
|
||||
#line 2174 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:2132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:2179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -2156,12 +2203,12 @@ done
|
|||
|
||||
|
||||
echo $ac_n "checking "for Open Sound System"""... $ac_c" 1>&6
|
||||
echo "configure:2160: checking "for Open Sound System"" >&5
|
||||
echo "configure:2207: checking "for Open Sound System"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_opensoundsystem'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2165 "configure"
|
||||
#line 2212 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOUNDCARD_H
|
||||
|
@ -2181,7 +2228,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_opensoundsystem="yes"
|
||||
else
|
||||
|
@ -2205,12 +2252,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "for union semun"""... $ac_c" 1>&6
|
||||
echo "configure:2209: checking "for union semun"" >&5
|
||||
echo "configure:2256: checking "for union semun"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_union_semun'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2214 "configure"
|
||||
#line 2261 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/sem.h>
|
||||
|
@ -2218,7 +2265,7 @@ int main() {
|
|||
union semun foo
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_union_semun="yes"
|
||||
else
|
||||
|
@ -2246,7 +2293,7 @@ if test "x${GCC}" = "xyes"
|
|||
then
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6
|
||||
echo "configure:2250: checking "for gcc strength-reduce bug"" >&5
|
||||
echo "configure:2297: checking "for gcc strength-reduce bug"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -2254,7 +2301,7 @@ else
|
|||
ac_cv_c_gcc_strength_bug="yes"
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2258 "configure"
|
||||
#line 2305 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main(void) {
|
||||
|
@ -2265,7 +2312,7 @@ int main(void) {
|
|||
exit( Array[1] != -2 );
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:2316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_c_gcc_strength_bug="no"
|
||||
else
|
||||
|
@ -2288,7 +2335,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "whether external symbols need an underscore prefix"""... $ac_c" 1>&6
|
||||
echo "configure:2292: checking "whether external symbols need an underscore prefix"" >&5
|
||||
echo "configure:2339: checking "whether external symbols need an underscore prefix"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_extern_prefix'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -2300,14 +2347,14 @@ _ac_test:
|
|||
.long 0
|
||||
EOF
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2304 "configure"
|
||||
#line 2351 "configure"
|
||||
#include "confdefs.h"
|
||||
extern int ac_test;
|
||||
int main() {
|
||||
if (ac_test) return 1
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_extern_prefix="yes"
|
||||
else
|
||||
|
@ -2331,7 +2378,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "whether assembler accepts .string"""... $ac_c" 1>&6
|
||||
echo "configure:2335: checking "whether assembler accepts .string"" >&5
|
||||
echo "configure:2382: checking "whether assembler accepts .string"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_asm_string'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -2341,14 +2388,14 @@ cat > conftest_asm.s <<EOF
|
|||
.string "test"
|
||||
EOF
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2345 "configure"
|
||||
#line 2392 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_asm_string="yes"
|
||||
else
|
||||
|
@ -2375,21 +2422,21 @@ DLLFLAGS=""
|
|||
if test "$LIB_TARGET" = "libwine.so.1.0"
|
||||
then
|
||||
echo $ac_n "checking "whether we can build a dll"""... $ac_c" 1>&6
|
||||
echo "configure:2379: checking "whether we can build a dll"" >&5
|
||||
echo "configure:2426: checking "whether we can build a dll"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_dll'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
saved_cflags=$CFLAGS
|
||||
CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2386 "configure"
|
||||
#line 2433 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
return 1
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_dll="yes"
|
||||
else
|
||||
|
@ -2414,8 +2461,48 @@ fi
|
|||
|
||||
|
||||
|
||||
echo $ac_n "checking "for reentrant libc"""... $ac_c" 1>&6
|
||||
echo "configure:2466: checking "for reentrant libc"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_libc_reentrant'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
wine_cv_libc_reentrant=yes
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2474 "configure"
|
||||
#include "confdefs.h"
|
||||
int myerrno = 0;
|
||||
char buf[256];
|
||||
int *__errno_location(){return &myerrno;}
|
||||
main(){connect(0,buf,255); exit(!myerrno);}
|
||||
EOF
|
||||
if { (eval echo configure:2481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
wine_cv_libc_reentrant=yes
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -fr conftest*
|
||||
wine_cv_libc_reentrant=no
|
||||
fi
|
||||
rm -fr conftest*
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
echo "$ac_t""$wine_cv_libc_reentrant" 1>&6
|
||||
if test "$wine_cv_libc_reentrant" = "no"
|
||||
then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define NO_REENTRANT_LIBC 1
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
echo $ac_n "checking "for reentrant X libraries"""... $ac_c" 1>&6
|
||||
echo "configure:2419: checking "for reentrant X libraries"" >&5
|
||||
echo "configure:2506: checking "for reentrant X libraries"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_x_reentrant'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -2460,12 +2547,12 @@ fi
|
|||
for ac_func in clone getpagesize memmove sendmsg sigaltstack strerror stricmp tcgetattr timegm usleep wait4 waitpid vfscanf
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:2464: checking for $ac_func" >&5
|
||||
echo "configure:2551: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2469 "configure"
|
||||
#line 2556 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -2488,7 +2575,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
|
@ -2516,17 +2603,17 @@ for ac_hdr in wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:2520: checking for $ac_hdr" >&5
|
||||
echo "configure:2607: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2525 "configure"
|
||||
#line 2612 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:2530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:2617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -2553,12 +2640,12 @@ fi
|
|||
done
|
||||
|
||||
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
|
||||
echo "configure:2557: checking whether stat file-mode macros are broken" >&5
|
||||
echo "configure:2644: checking whether stat file-mode macros are broken" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2562 "configure"
|
||||
#line 2649 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -2609,12 +2696,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for working const""... $ac_c" 1>&6
|
||||
echo "configure:2613: checking for working const" >&5
|
||||
echo "configure:2700: checking for working const" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2618 "configure"
|
||||
#line 2705 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
|
@ -2663,7 +2750,7 @@ ccp = (char const *const *) p;
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_const=yes
|
||||
else
|
||||
|
@ -2684,12 +2771,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
|
||||
echo "configure:2688: checking for ANSI C header files" >&5
|
||||
echo "configure:2775: checking for ANSI C header files" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2693 "configure"
|
||||
#line 2780 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -2697,7 +2784,7 @@ else
|
|||
#include <float.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:2701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:2788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -2714,7 +2801,7 @@ rm -f conftest*
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2718 "configure"
|
||||
#line 2805 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
EOF
|
||||
|
@ -2732,7 +2819,7 @@ fi
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2736 "configure"
|
||||
#line 2823 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
EOF
|
||||
|
@ -2753,7 +2840,7 @@ if test "$cross_compiling" = yes; then
|
|||
:
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2757 "configure"
|
||||
#line 2844 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
|
@ -2764,7 +2851,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
|||
exit (0); }
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:2768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
|
@ -2788,12 +2875,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for size_t""... $ac_c" 1>&6
|
||||
echo "configure:2792: checking for size_t" >&5
|
||||
echo "configure:2879: checking for size_t" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2797 "configure"
|
||||
#line 2884 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -2821,7 +2908,7 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking size of long long""... $ac_c" 1>&6
|
||||
echo "configure:2825: checking size of long long" >&5
|
||||
echo "configure:2912: checking size of long long" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -2829,7 +2916,7 @@ else
|
|||
ac_cv_sizeof_long_long=0
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2833 "configure"
|
||||
#line 2920 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
main()
|
||||
|
@ -2840,7 +2927,7 @@ main()
|
|||
exit(0);
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:2844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:2931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_sizeof_long_long=`cat conftestval`
|
||||
else
|
||||
|
@ -2863,7 +2950,7 @@ EOF
|
|||
|
||||
if test $ac_cv_func_sendmsg = no; then
|
||||
echo $ac_n "checking for sendmsg in -lsocket""... $ac_c" 1>&6
|
||||
echo "configure:2867: checking for sendmsg in -lsocket" >&5
|
||||
echo "configure:2954: checking for sendmsg in -lsocket" >&5
|
||||
ac_lib_var=`echo socket'_'sendmsg | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -2871,7 +2958,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lsocket $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2875 "configure"
|
||||
#line 2962 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -2882,7 +2969,7 @@ int main() {
|
|||
sendmsg()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -2915,12 +3002,12 @@ fi
|
|||
if test "$ac_cv_header_sys_vfs_h" = "yes"
|
||||
then
|
||||
echo $ac_n "checking "whether sys/vfs.h defines statfs"""... $ac_c" 1>&6
|
||||
echo "configure:2919: checking "whether sys/vfs.h defines statfs"" >&5
|
||||
echo "configure:3006: checking "whether sys/vfs.h defines statfs"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2924 "configure"
|
||||
#line 3011 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -2937,7 +3024,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_sys_vfs_has_statfs=yes
|
||||
else
|
||||
|
@ -2964,12 +3051,12 @@ fi
|
|||
if test "$ac_cv_header_sys_statfs_h" = "yes"
|
||||
then
|
||||
echo $ac_n "checking "whether sys/statfs.h defines statfs"""... $ac_c" 1>&6
|
||||
echo "configure:2968: checking "whether sys/statfs.h defines statfs"" >&5
|
||||
echo "configure:3055: checking "whether sys/statfs.h defines statfs"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2973 "configure"
|
||||
#line 3060 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -2984,7 +3071,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_sys_statfs_has_statfs=yes
|
||||
else
|
||||
|
@ -3011,12 +3098,12 @@ fi
|
|||
if test "$ac_cv_header_sys_mount_h" = "yes"
|
||||
then
|
||||
echo $ac_n "checking "whether sys/mount.h defines statfs"""... $ac_c" 1>&6
|
||||
echo "configure:3015: checking "whether sys/mount.h defines statfs"" >&5
|
||||
echo "configure:3102: checking "whether sys/mount.h defines statfs"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3020 "configure"
|
||||
#line 3107 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -3031,7 +3118,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_sys_mount_has_statfs=yes
|
||||
else
|
||||
|
@ -3057,7 +3144,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "for statfs.f_bfree"""... $ac_c" 1>&6
|
||||
echo "configure:3061: checking "for statfs.f_bfree"" >&5
|
||||
echo "configure:3148: checking "for statfs.f_bfree"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -3066,7 +3153,7 @@ else
|
|||
wine_cv_statfs_bfree=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3070 "configure"
|
||||
#line 3157 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -3093,7 +3180,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_statfs_bfree=yes
|
||||
else
|
||||
|
@ -3117,7 +3204,7 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking "for statfs.f_bavail"""... $ac_c" 1>&6
|
||||
echo "configure:3121: checking "for statfs.f_bavail"" >&5
|
||||
echo "configure:3208: checking "for statfs.f_bavail"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -3126,7 +3213,7 @@ else
|
|||
wine_cv_statfs_bavail=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3130 "configure"
|
||||
#line 3217 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -3153,7 +3240,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_statfs_bavail=yes
|
||||
else
|
||||
|
@ -3178,7 +3265,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "for working sigaltstack"""... $ac_c" 1>&6
|
||||
echo "configure:3182: checking "for working sigaltstack"" >&5
|
||||
echo "configure:3269: checking "for working sigaltstack"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_working_sigaltstack'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -3187,7 +3274,7 @@ else
|
|||
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3191 "configure"
|
||||
#line 3278 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -3225,7 +3312,7 @@ else
|
|||
}
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:3229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_c_working_sigaltstack="yes"
|
||||
else
|
||||
|
@ -3252,12 +3339,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "for msg_accrights in struct msghdr"""... $ac_c" 1>&6
|
||||
echo "configure:3256: checking "for msg_accrights in struct msghdr"" >&5
|
||||
echo "configure:3343: checking "for msg_accrights in struct msghdr"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_msg_accrights'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3261 "configure"
|
||||
#line 3348 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
@ -3265,7 +3352,7 @@ int main() {
|
|||
struct msghdr hdr; hdr.msg_accrights=0
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_msg_accrights="yes"
|
||||
else
|
||||
|
@ -3398,7 +3485,10 @@ controls/Makefile
|
|||
debugger/Makefile
|
||||
dlls/Makefile
|
||||
dlls/comctl32/Makefile
|
||||
dlls/psapi/Makefile
|
||||
dlls/shell32/Makefile
|
||||
dlls/winaspi/Makefile
|
||||
dlls/wnaspi32/Makefile
|
||||
documentation/Makefile
|
||||
files/Makefile
|
||||
graphics/Makefile
|
||||
|
@ -3422,6 +3512,7 @@ objects/Makefile
|
|||
ole/Makefile
|
||||
programs/Makefile
|
||||
programs/clock/Makefile
|
||||
programs/control/Makefile
|
||||
programs/notepad/Makefile
|
||||
programs/progman/Makefile
|
||||
programs/regtest/Makefile
|
||||
|
@ -3536,7 +3627,10 @@ controls/Makefile
|
|||
debugger/Makefile
|
||||
dlls/Makefile
|
||||
dlls/comctl32/Makefile
|
||||
dlls/psapi/Makefile
|
||||
dlls/shell32/Makefile
|
||||
dlls/winaspi/Makefile
|
||||
dlls/wnaspi32/Makefile
|
||||
documentation/Makefile
|
||||
files/Makefile
|
||||
graphics/Makefile
|
||||
|
@ -3560,6 +3654,7 @@ objects/Makefile
|
|||
ole/Makefile
|
||||
programs/Makefile
|
||||
programs/clock/Makefile
|
||||
programs/control/Makefile
|
||||
programs/notepad/Makefile
|
||||
programs/progman/Makefile
|
||||
programs/regtest/Makefile
|
||||
|
@ -3754,6 +3849,15 @@ rm -fr confdefs* $ac_clean_files
|
|||
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
|
||||
|
||||
|
||||
if test "$wine_cv_libc_reentrant" = "no"
|
||||
then
|
||||
echo
|
||||
echo "*** Warning: non-reentrant libc detected. Wine will be build without"
|
||||
echo "*** thread support. Consider upgrading libc to a more recent"
|
||||
echo "*** reentrant version of libc."
|
||||
echo
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Configure finished. Do 'make depend; make' to compile Wine."
|
||||
echo
|
||||
|
|
32
configure.in
32
configure.in
|
@ -79,6 +79,8 @@ dnl Check for -li386 for NetBSD and OpenBSD
|
|||
AC_CHECK_LIB(i386,i386_set_ldt)
|
||||
dnl Check for -lw for Solaris
|
||||
AC_CHECK_LIB(w,iswalnum)
|
||||
dnl Check for -lxpg4 for FreeBSD
|
||||
AC_CHECK_LIB(xpg4,setrunelocale)
|
||||
dnl Check for XFree86 DGA extension
|
||||
AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,AC_DEFINE(HAVE_LIBXXF86DGA) X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga",,$X_LIBS -lXext -lX11)
|
||||
|
||||
|
@ -200,6 +202,23 @@ then
|
|||
fi
|
||||
AC_SUBST(DLLFLAGS)
|
||||
|
||||
dnl **** Check for reentrant libc ****
|
||||
dnl
|
||||
dnl For cross-compiling we blindly assume that libc is reentrant. This is
|
||||
dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
|
||||
|
||||
AC_CACHE_CHECK("for reentrant libc", wine_cv_libc_reentrant,
|
||||
[AC_TRY_RUN([int myerrno = 0;
|
||||
char buf[256];
|
||||
int *__errno_location(){return &myerrno;}
|
||||
main(){connect(0,buf,255); exit(!myerrno);}],
|
||||
wine_cv_libc_reentrant=yes, wine_cv_libc_reentrant=no,
|
||||
wine_cv_libc_reentrant=yes ) ] )
|
||||
if test "$wine_cv_libc_reentrant" = "no"
|
||||
then
|
||||
AC_DEFINE(NO_REENTRANT_LIBC)
|
||||
fi
|
||||
|
||||
dnl **** Check for reentrant X libraries ****
|
||||
dnl
|
||||
dnl This may fail to determine whether X libraries are reentrant if
|
||||
|
@ -462,7 +481,10 @@ controls/Makefile
|
|||
debugger/Makefile
|
||||
dlls/Makefile
|
||||
dlls/comctl32/Makefile
|
||||
dlls/psapi/Makefile
|
||||
dlls/shell32/Makefile
|
||||
dlls/winaspi/Makefile
|
||||
dlls/wnaspi32/Makefile
|
||||
documentation/Makefile
|
||||
files/Makefile
|
||||
graphics/Makefile
|
||||
|
@ -486,6 +508,7 @@ objects/Makefile
|
|||
ole/Makefile
|
||||
programs/Makefile
|
||||
programs/clock/Makefile
|
||||
programs/control/Makefile
|
||||
programs/notepad/Makefile
|
||||
programs/progman/Makefile
|
||||
programs/regtest/Makefile
|
||||
|
@ -503,6 +526,15 @@ tsx11/Makefile
|
|||
win32/Makefile
|
||||
windows/Makefile ])
|
||||
|
||||
if test "$wine_cv_libc_reentrant" = "no"
|
||||
then
|
||||
echo
|
||||
echo "*** Warning: non-reentrant libc detected. Wine will be build without"
|
||||
echo "*** thread support. Consider upgrading libc to a more recent"
|
||||
echo "*** reentrant version of libc."
|
||||
echo
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Configure finished. Do 'make depend; make' to compile Wine."
|
||||
echo
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "graphics.h"
|
||||
#include "button.h"
|
||||
#include "windows.h"
|
||||
#include "tweak.h"
|
||||
|
||||
static void PB_Paint( WND *wndPtr, HDC32 hDC, WORD action );
|
||||
static void PB_PaintGrayOnGray(HDC32 hDC,HFONT32 hFont,RECT32 *rc,char *text);
|
||||
|
@ -485,7 +486,7 @@ static void BUTTON_CheckAutoRadioButton( WND *wndPtr )
|
|||
|
||||
static void GB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
||||
{
|
||||
RECT32 rc;
|
||||
RECT32 rc, rcFrame;
|
||||
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
||||
|
||||
if (action != ODA_DRAWENTIRE) return;
|
||||
|
@ -493,8 +494,20 @@ static void GB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
|||
BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
|
||||
|
||||
GetClientRect32( wndPtr->hwndSelf, &rc);
|
||||
if (TWEAK_WineLook == WIN31_LOOK)
|
||||
GRAPH_DrawRectangle( hDC, rc.left, rc.top + 2, rc.right - 1, rc.bottom - 1,
|
||||
GetSysColorPen32(COLOR_WINDOWFRAME) );
|
||||
else {
|
||||
TEXTMETRIC32A tm;
|
||||
rcFrame = rc;
|
||||
|
||||
if (infoPtr->hFont)
|
||||
SelectObject32 (hDC, infoPtr->hFont);
|
||||
GetTextMetrics32A (hDC, &tm);
|
||||
rcFrame.top += (tm.tmHeight / 2) - 1;
|
||||
DrawEdge32 (hDC, &rcFrame, EDGE_ETCHED, BF_RECT);
|
||||
}
|
||||
|
||||
if (wndPtr->text)
|
||||
{
|
||||
if (infoPtr->hFont) SelectObject32( hDC, infoPtr->hFont );
|
||||
|
|
|
@ -158,7 +158,7 @@ static void CBCalcPlacement( LPHEADCOMBO lphc, LPRECT32 lprEdit,
|
|||
mi32.CtlID = lphc->self->wIDmenu;
|
||||
mi32.itemID = -1;
|
||||
mi32.itemWidth = size.cx;
|
||||
mi32.itemHeight = size.cy - 6; /* ownerdrawn cb is taller */
|
||||
mi32.itemHeight = u - 6; /* ownerdrawn cb is taller */
|
||||
mi32.itemData = 0;
|
||||
SendMessage32A(lphc->owner, WM_MEASUREITEM,
|
||||
(WPARAM32)mi32.CtlID, (LPARAM)&mi32);
|
||||
|
@ -172,12 +172,13 @@ static void CBCalcPlacement( LPHEADCOMBO lphc, LPRECT32 lprEdit,
|
|||
{
|
||||
HDC32 hDC = GetDC32( lphc->self->hwndSelf );
|
||||
HFONT32 hPrevFont = 0;
|
||||
SIZE32 font_size;
|
||||
|
||||
if( lphc->hFont ) hPrevFont = SelectObject32( hDC, lphc->hFont );
|
||||
|
||||
GetTextExtentPoint32A( hDC, "0", 1, &size);
|
||||
GetTextExtentPoint32A( hDC, "0", 1, &font_size);
|
||||
|
||||
size.cy += size.cy / 4 + 4 * SYSMETRICS_CYBORDER;
|
||||
size.cy = font_size.cy + font_size.cy / 4 + 4 * SYSMETRICS_CYBORDER;
|
||||
|
||||
if( hPrevFont ) SelectObject32( hDC, hPrevFont );
|
||||
ReleaseDC32( lphc->self->hwndSelf, hDC );
|
||||
|
@ -1069,13 +1070,14 @@ static void COMBO_Size( LPHEADCOMBO lphc )
|
|||
|
||||
/* CreateWindow() may send a bogus WM_SIZE, ignore it */
|
||||
|
||||
if( w == (lphc->RectCombo.right - lphc->RectCombo.left) )
|
||||
if( w == (lphc->RectCombo.right - lphc->RectCombo.left) ) {
|
||||
if( (CB_GETTYPE(lphc) == CBS_SIMPLE) &&
|
||||
(h == (lphc->RectCombo.bottom - lphc->RectCombo.top)) )
|
||||
return;
|
||||
else if( (lphc->dwStyle & CBS_DROPDOWN) &&
|
||||
(h == (lphc->RectEdit.bottom - lphc->RectEdit.top)) )
|
||||
return;
|
||||
}
|
||||
|
||||
lphc->RectCombo = rect;
|
||||
CBCalcPlacement( lphc, &lphc->RectEdit, &lphc->RectButton, &rect );
|
||||
|
@ -1141,11 +1143,12 @@ static LRESULT COMBO_SelectString( LPHEADCOMBO lphc, INT32 start, LPCSTR pText )
|
|||
{
|
||||
INT32 index = SendMessage32A( lphc->hWndLBox, LB_SELECTSTRING32,
|
||||
(WPARAM32)start, (LPARAM)pText );
|
||||
if( index >= 0 )
|
||||
if( index >= 0 ) {
|
||||
if( lphc->wState & CBF_EDIT )
|
||||
CBUpdateEdit( lphc, index );
|
||||
else
|
||||
CBPaintText( lphc, 0 );
|
||||
}
|
||||
return (LRESULT)index;
|
||||
}
|
||||
|
||||
|
@ -1493,15 +1496,15 @@ LRESULT WINAPI ComboWndProc( HWND32 hwnd, UINT32 message,
|
|||
(LPSTR)lParam, (message == CB_DIR32));
|
||||
case CB_SHOWDROPDOWN16:
|
||||
case CB_SHOWDROPDOWN32:
|
||||
if( CB_GETTYPE(lphc) != CBS_SIMPLE )
|
||||
if( wParam )
|
||||
{
|
||||
if( CB_GETTYPE(lphc) != CBS_SIMPLE ) {
|
||||
if( wParam ) {
|
||||
if( !(lphc->wState & CBF_DROPPED) )
|
||||
CBDropDown( lphc );
|
||||
}
|
||||
else
|
||||
} else {
|
||||
if( lphc->wState & CBF_DROPPED )
|
||||
CBRollUp( lphc, FALSE, TRUE );
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
case CB_GETCOUNT16:
|
||||
|
|
|
@ -1766,7 +1766,7 @@ static void EDIT_SetRectNP(WND *wnd, EDITSTATE *es, LPRECT32 rc)
|
|||
CopyRect32(&es->format_rect, rc);
|
||||
if (es->style & WS_BORDER) {
|
||||
INT32 bw = GetSystemMetrics32(SM_CXBORDER) + 1;
|
||||
if(!TWEAK_Win95Look)
|
||||
if(TWEAK_WineLook == WIN31_LOOK)
|
||||
bw += 2;
|
||||
es->format_rect.left += bw;
|
||||
es->format_rect.top += bw;
|
||||
|
@ -2066,8 +2066,9 @@ static INT32 EDIT_EM_GetLine(WND *wnd, EDITSTATE *es, INT32 line, LPSTR lpch)
|
|||
return 0;
|
||||
} else
|
||||
line = 0;
|
||||
src = es->text + EDIT_EM_LineIndex(wnd, es, line);
|
||||
len = MIN(*(WORD *)lpch, EDIT_EM_LineLength(wnd, es, line));
|
||||
i = EDIT_EM_LineIndex(wnd, es, line);
|
||||
src = es->text + i;
|
||||
len = MIN(*(WORD *)lpch, EDIT_EM_LineLength(wnd, es, i));
|
||||
for (i = 0 ; i < len ; i++) {
|
||||
*lpch = *src;
|
||||
src++;
|
||||
|
@ -3366,7 +3367,7 @@ static LRESULT EDIT_WM_KeyDown(WND *wnd, EDITSTATE *es, INT32 key, DWORD key_dat
|
|||
EDIT_MovePageDown_ML(wnd, es, shift);
|
||||
break;
|
||||
case VK_BACK:
|
||||
if (!(es->style & ES_READONLY) && !control)
|
||||
if (!(es->style & ES_READONLY) && !control) {
|
||||
if (es->selection_start != es->selection_end)
|
||||
EDIT_WM_Clear(wnd, es);
|
||||
else {
|
||||
|
@ -3375,9 +3376,10 @@ static LRESULT EDIT_WM_KeyDown(WND *wnd, EDITSTATE *es, INT32 key, DWORD key_dat
|
|||
EDIT_MoveBackward(wnd, es, TRUE);
|
||||
EDIT_WM_Clear(wnd, es);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case VK_DELETE:
|
||||
if (!(es->style & ES_READONLY) && !(shift && control))
|
||||
if (!(es->style & ES_READONLY) && !(shift && control)) {
|
||||
if (es->selection_start != es->selection_end) {
|
||||
if (shift)
|
||||
EDIT_WM_Cut(wnd, es);
|
||||
|
@ -3401,6 +3403,7 @@ static LRESULT EDIT_WM_KeyDown(WND *wnd, EDITSTATE *es, INT32 key, DWORD key_dat
|
|||
EDIT_WM_Clear(wnd, es);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case VK_INSERT:
|
||||
if (shift) {
|
||||
|
@ -3538,13 +3541,19 @@ static LRESULT EDIT_WM_NCCreate(WND *wnd, LPCREATESTRUCT32A cs)
|
|||
if (!(es = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*es))))
|
||||
return FALSE;
|
||||
*(EDITSTATE **)wnd->wExtra = es;
|
||||
|
||||
/*
|
||||
* Note: since the EDITSTATE has not been fully initialized yet,
|
||||
* we can't use any API calls that may send
|
||||
* WM_XXX messages before WM_NCCREATE is completed.
|
||||
*/
|
||||
|
||||
if (!(es->heap = HeapCreate(0, 0x10000, 0)))
|
||||
return FALSE;
|
||||
es->style = cs->style;
|
||||
|
||||
if ((es->style & WS_BORDER) && !(es->style & WS_DLGFRAME))
|
||||
SetWindowLong32A(wnd->hwndSelf, GWL_STYLE,
|
||||
es->style & ~WS_BORDER);
|
||||
wnd->dwStyle &= ~WS_BORDER;
|
||||
|
||||
if (es->style & ES_MULTILINE) {
|
||||
es->buffer_size = BUFSTART_MULTI;
|
||||
|
@ -3756,7 +3765,7 @@ static void EDIT_WM_SetFont(WND *wnd, EDITSTATE *es, HFONT32 font, BOOL32 redraw
|
|||
if (font)
|
||||
SelectObject32(dc, old_font);
|
||||
ReleaseDC32(wnd->hwndSelf, dc);
|
||||
if (font & TWEAK_Win95Look)
|
||||
if (font && (TWEAK_WineLook > WIN31_LOOK))
|
||||
EDIT_EM_SetMargins(wnd, es, EC_LEFTMARGIN | EC_RIGHTMARGIN,
|
||||
EC_USEFONTINFO, EC_USEFONTINFO);
|
||||
if (es->style & ES_MULTILINE)
|
||||
|
@ -3782,6 +3791,13 @@ static void EDIT_WM_SetFont(WND *wnd, EDITSTATE *es, HFONT32 font, BOOL32 redraw
|
|||
*
|
||||
* WM_SETTEXT
|
||||
*
|
||||
* NOTES
|
||||
* For multiline controls (ES_MULTILINE), reception of WM_SETTEXT triggers:
|
||||
* The modified flag is reset. No notifications are sent.
|
||||
*
|
||||
* For single-line controls, reception of WM_SETTEXT triggers:
|
||||
* The modified flag is reset. EN_UPDATE and EN_CHANGE notifications are sent.
|
||||
*
|
||||
*/
|
||||
static void EDIT_WM_SetText(WND *wnd, EDITSTATE *es, LPCSTR text)
|
||||
{
|
||||
|
@ -3794,8 +3810,12 @@ static void EDIT_WM_SetText(WND *wnd, EDITSTATE *es, LPCSTR text)
|
|||
EDIT_EM_ReplaceSel(wnd, es, FALSE, "");
|
||||
}
|
||||
es->x_offset = 0;
|
||||
es->flags &= ~EF_MODIFIED;
|
||||
if (es->style & ES_MULTILINE) {
|
||||
es->flags &= ~EF_UPDATE;
|
||||
} else {
|
||||
es->flags |= EF_UPDATE;
|
||||
}
|
||||
es->flags &= ~EF_MODIFIED;
|
||||
EDIT_EM_SetSel(wnd, es, 0, 0, FALSE);
|
||||
EDIT_EM_ScrollCaret(wnd, es);
|
||||
}
|
||||
|
|
|
@ -2486,7 +2486,7 @@ LRESULT WINAPI ListBoxWndProc( HWND32 hwnd, UINT32 msg,
|
|||
break;
|
||||
|
||||
case WM_NCCREATE:
|
||||
if (TWEAK_Win95Look)
|
||||
if (TWEAK_WineLook > WIN31_LOOK)
|
||||
wnd->dwExStyle |= WS_EX_CLIENTEDGE;
|
||||
return DefWindowProc32A( hwnd, msg, wParam, lParam );
|
||||
|
||||
|
|
|
@ -35,15 +35,6 @@
|
|||
#include "debug.h"
|
||||
|
||||
|
||||
UINT32 MENU_BarItemTopNudge;
|
||||
UINT32 MENU_BarItemLeftNudge;
|
||||
UINT32 MENU_ItemTopNudge;
|
||||
UINT32 MENU_ItemLeftNudge;
|
||||
UINT32 MENU_HighlightTopNudge;
|
||||
UINT32 MENU_HighlightLeftNudge;
|
||||
UINT32 MENU_HighlightBottomNudge;
|
||||
UINT32 MENU_HighlightRightNudge;
|
||||
|
||||
/* internal popup menu window messages */
|
||||
|
||||
#define MM_SETMENUHANDLE (WM_USER + 0)
|
||||
|
@ -653,10 +644,10 @@ static void MENU_CalcItemSize( HDC32 hdc, MENUITEM *lpitem, HWND32 hwndOwner,
|
|||
{
|
||||
dwSize = GetTextExtent( hdc, lpitem->text, strlen(lpitem->text) );
|
||||
lpitem->rect.right += LOWORD(dwSize);
|
||||
if (TWEAK_Win95Look)
|
||||
lpitem->rect.bottom += MAX (HIWORD(dwSize), sysMetrics[SM_CYMENU]- 1);
|
||||
else
|
||||
if (TWEAK_WineLook == WIN31_LOOK)
|
||||
lpitem->rect.bottom += MAX( HIWORD(dwSize), SYSMETRICS_CYMENU );
|
||||
else
|
||||
lpitem->rect.bottom += MAX (HIWORD(dwSize), sysMetrics[SM_CYMENU]- 1);
|
||||
lpitem->xTab = 0;
|
||||
|
||||
if (menuBar) lpitem->rect.right += MENU_BAR_ITEMS_SPACE;
|
||||
|
@ -710,7 +701,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop, HWND32 hwndOwner )
|
|||
if ((i != start) &&
|
||||
(lpitem->fType & (MF_MENUBREAK | MF_MENUBARBREAK))) break;
|
||||
|
||||
if(TWEAK_Win95Look)
|
||||
if (TWEAK_WineLook > WIN31_LOOK)
|
||||
++orgY;
|
||||
|
||||
MENU_CalcItemSize( hdc, lpitem, hwndOwner, orgX, orgY, FALSE );
|
||||
|
@ -735,7 +726,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop, HWND32 hwndOwner )
|
|||
lppop->Height = MAX( lppop->Height, orgY );
|
||||
}
|
||||
|
||||
if(TWEAK_Win95Look)
|
||||
if(TWEAK_WineLook > WIN31_LOOK)
|
||||
lppop->Height++;
|
||||
|
||||
lppop->Width = maxX;
|
||||
|
@ -833,7 +824,7 @@ static void MENU_DrawMenuItem( HWND32 hwnd, HDC32 hdc, MENUITEM *lpitem,
|
|||
if (lpitem->fType & MF_SYSMENU)
|
||||
{
|
||||
if( !IsIconic32(hwnd) ) {
|
||||
if(TWEAK_Win95Look)
|
||||
if (TWEAK_WineLook > WIN31_LOOK)
|
||||
NC_DrawSysButton95( hwnd, hdc,
|
||||
lpitem->fState &
|
||||
(MF_HILITE | MF_MOUSESELECT) );
|
||||
|
@ -874,7 +865,7 @@ static void MENU_DrawMenuItem( HWND32 hwnd, HDC32 hdc, MENUITEM *lpitem,
|
|||
rect = lpitem->rect;
|
||||
|
||||
/* Draw the background */
|
||||
if(TWEAK_Win95Look) {
|
||||
if (TWEAK_WineLook > WIN31_LOOK) {
|
||||
rect.left += 2;
|
||||
rect.right -= 2;
|
||||
|
||||
|
@ -899,8 +890,13 @@ static void MENU_DrawMenuItem( HWND32 hwnd, HDC32 hdc, MENUITEM *lpitem,
|
|||
|
||||
if (!menuBar && (lpitem->fType & MF_MENUBARBREAK))
|
||||
{
|
||||
if(TWEAK_Win95Look)
|
||||
TWEAK_DrawMenuSeparatorVert95(hdc, rect.left - 1, 3, height - 3);
|
||||
/* vertical separator */
|
||||
if (TWEAK_WineLook > WIN31_LOOK) {
|
||||
RECT32 rc = rect;
|
||||
rc.top = 3;
|
||||
rc.bottom = height - 3;
|
||||
DrawEdge32 (hdc, &rc, EDGE_ETCHED, BF_LEFT);
|
||||
}
|
||||
else {
|
||||
SelectObject32( hdc, GetSysColorPen32(COLOR_WINDOWFRAME) );
|
||||
MoveTo( hdc, rect.left, 0 );
|
||||
|
@ -909,10 +905,14 @@ static void MENU_DrawMenuItem( HWND32 hwnd, HDC32 hdc, MENUITEM *lpitem,
|
|||
}
|
||||
if (lpitem->fType & MF_SEPARATOR)
|
||||
{
|
||||
if(TWEAK_Win95Look)
|
||||
TWEAK_DrawMenuSeparatorHoriz95(hdc, rect.left + 1,
|
||||
rect.top + SEPARATOR_HEIGHT / 2 + 1,
|
||||
rect.right - 1);
|
||||
/* horizontal separator */
|
||||
if (TWEAK_WineLook > WIN31_LOOK) {
|
||||
RECT32 rc = rect;
|
||||
rc.left++;
|
||||
rc.right--;
|
||||
rc.top += SEPARATOR_HEIGHT / 2;
|
||||
DrawEdge32 (hdc, &rc, EDGE_ETCHED, BF_TOP);
|
||||
}
|
||||
else {
|
||||
SelectObject32( hdc, GetSysColorPen32(COLOR_WINDOWFRAME) );
|
||||
MoveTo( hdc, rect.left, rect.top + SEPARATOR_HEIGHT/2 );
|
||||
|
@ -1000,21 +1000,15 @@ static void MENU_DrawMenuItem( HWND32 hwnd, HDC32 hdc, MENUITEM *lpitem,
|
|||
rect.left += MENU_BAR_ITEMS_SPACE / 2;
|
||||
rect.right -= MENU_BAR_ITEMS_SPACE / 2;
|
||||
i = strlen( lpitem->text );
|
||||
|
||||
rect.top += MENU_BarItemTopNudge;
|
||||
rect.left += MENU_BarItemLeftNudge;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; lpitem->text[i]; i++)
|
||||
if ((lpitem->text[i] == '\t') || (lpitem->text[i] == '\b'))
|
||||
break;
|
||||
|
||||
rect.top += MENU_ItemTopNudge;
|
||||
rect.left += MENU_ItemLeftNudge;
|
||||
}
|
||||
|
||||
if(!TWEAK_Win95Look || !(lpitem->fState & MF_GRAYED)) {
|
||||
if((TWEAK_WineLook == WIN31_LOOK) || !(lpitem->fState & MF_GRAYED)) {
|
||||
DrawText32A( hdc, lpitem->text, i, &rect,
|
||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE );
|
||||
}
|
||||
|
@ -1083,7 +1077,7 @@ static void MENU_DrawPopupMenu( HWND32 hwnd, HDC32 hdc, HMENU32 hmenu )
|
|||
POPUPMENU *menu;
|
||||
|
||||
/* draw 3-d shade */
|
||||
if(!TWEAK_Win95Look) {
|
||||
if(TWEAK_WineLook == WIN31_LOOK) {
|
||||
SelectObject32( hdc, hShadeBrush );
|
||||
SetBkMode32( hdc, TRANSPARENT );
|
||||
ropPrev = SetROP232( hdc, R2_MASKPEN );
|
||||
|
@ -1144,7 +1138,7 @@ UINT32 MENU_DrawMenuBar( HDC32 hDC, LPRECT32 lprect, HWND32 hwnd,
|
|||
|
||||
FillRect32(hDC, lprect, GetSysColorBrush32(COLOR_MENU) );
|
||||
|
||||
if(!TWEAK_Win95Look) {
|
||||
if (TWEAK_WineLook == WIN31_LOOK) {
|
||||
SelectObject32( hDC, GetSysColorPen32(COLOR_WINDOWFRAME) );
|
||||
MoveTo( hDC, lprect->left, lprect->bottom );
|
||||
LineTo32( hDC, lprect->right, lprect->bottom );
|
||||
|
@ -1362,10 +1356,10 @@ static void MENU_SelectItem( HWND32 hwndOwner, HMENU32 hmenu, UINT32 wIndex,
|
|||
hmenu) );
|
||||
}
|
||||
}
|
||||
else if (sendMenuSelect)
|
||||
else if (sendMenuSelect) {
|
||||
SendMessage16( hwndOwner, WM_MENUSELECT, hmenu,
|
||||
MAKELONG( lppop->wFlags | MF_MOUSESELECT, hmenu ) );
|
||||
|
||||
}
|
||||
ReleaseDC32( lppop->hWnd, hdc );
|
||||
}
|
||||
|
||||
|
@ -1476,7 +1470,10 @@ static BOOL32 MENU_SetItemData( MENUITEM *item, UINT32 flags, UINT32 id,
|
|||
item->fState = (flags & STATE_MASK) &
|
||||
~(MF_HILITE | MF_MOUSESELECT | MF_BYPOSITION);
|
||||
|
||||
SetRectEmpty32( &item->rect );
|
||||
|
||||
/* Don't call SetRectEmpty here! */
|
||||
|
||||
|
||||
if (prevText) HeapFree( SystemHeap, 0, prevText );
|
||||
|
||||
debug_print_menuitem("MENU_SetItemData to : ", item, "");
|
||||
|
@ -1741,10 +1738,13 @@ static HMENU32 MENU_ShowSubPopup( HWND32 hwndOwner, HMENU32 hmenu,
|
|||
|
||||
/* message must be send before using item,
|
||||
because nearly everything may by changed by the application ! */
|
||||
rect = item->rect;
|
||||
|
||||
SendMessage16( hwndOwner, WM_INITMENUPOPUP, (WPARAM16)item->hSubMenu,
|
||||
MAKELONG( menu->FocusedItem, IS_SYSTEM_MENU(menu) ));
|
||||
|
||||
item = &menu->items[menu->FocusedItem];
|
||||
rect = item->rect;
|
||||
|
||||
/* correct item if modified as a reaction to WM_INITMENUPOPUP-message */
|
||||
if (!(item->fState & MF_HILITE))
|
||||
{
|
||||
|
|
|
@ -175,7 +175,7 @@ LRESULT WINAPI StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
|
|||
switch (uMsg)
|
||||
{
|
||||
case WM_NCCREATE:
|
||||
if (TWEAK_Win95Look && (wndPtr->dwStyle & SS_SUNKEN))
|
||||
if ((TWEAK_WineLook > WIN31_LOOK) && (wndPtr->dwStyle & SS_SUNKEN))
|
||||
wndPtr->dwExStyle |= WS_EX_STATICEDGE;
|
||||
|
||||
if (style == SS_ICON)
|
||||
|
@ -432,7 +432,8 @@ static void STATIC_PaintEtchedfn( WND *wndPtr, HDC32 hdc )
|
|||
HBRUSH32 hbrush;
|
||||
HPEN32 hpen;
|
||||
|
||||
if (!TWEAK_Win95Look) return;
|
||||
if (TWEAK_WineLook == WIN31_LOOK)
|
||||
return;
|
||||
|
||||
GetClientRect32( wndPtr->hwndSelf, &rc );
|
||||
hbrush = SendMessage32A( GetParent32(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#include <sys/mman.h>
|
||||
#include "module.h"
|
||||
#include "process.h"
|
||||
#include "task.h"
|
||||
#include "miscemu.h"
|
||||
#include "toolhelp.h"
|
||||
#include "windows.h"
|
||||
#include "debugger.h"
|
||||
|
@ -42,10 +44,7 @@ static int next_bp = 1; /* breakpoint 0 is reserved for step-over */
|
|||
*/
|
||||
static void DEBUG_SetOpcode( const DBG_ADDR *addr, BYTE op )
|
||||
{
|
||||
BYTE *ptr;
|
||||
|
||||
if (addr->seg) ptr = (BYTE *)PTR_SEG_OFF_TO_LIN( addr->seg, addr->off );
|
||||
else ptr = (BYTE *)addr->off;
|
||||
BYTE *ptr = DBG_ADDR_TO_LIN(addr);
|
||||
|
||||
/* There are a couple of problems with this. On Linux prior to
|
||||
1.1.62, this call fails (ENOACCESS) due to a bug in fs/exec.c.
|
||||
|
@ -72,7 +71,8 @@ static void DEBUG_SetOpcode( const DBG_ADDR *addr, BYTE op )
|
|||
*/
|
||||
static BOOL32 DEBUG_IsStepOverInstr()
|
||||
{
|
||||
BYTE *instr = (BYTE *)PTR_SEG_OFF_TO_LIN( CS_reg(&DEBUG_context),
|
||||
BYTE *instr = (BYTE *)CTX_SEG_OFF_TO_LIN( &DEBUG_context,
|
||||
CS_reg(&DEBUG_context),
|
||||
EIP_reg(&DEBUG_context) );
|
||||
|
||||
for (;;)
|
||||
|
@ -138,7 +138,8 @@ static BOOL32 DEBUG_IsStepOverInstr()
|
|||
*/
|
||||
BOOL32 DEBUG_IsFctReturn(void)
|
||||
{
|
||||
BYTE *instr = (BYTE *)PTR_SEG_OFF_TO_LIN( CS_reg(&DEBUG_context),
|
||||
BYTE *instr = (BYTE *)CTX_SEG_OFF_TO_LIN( &DEBUG_context,
|
||||
CS_reg(&DEBUG_context),
|
||||
EIP_reg(&DEBUG_context) );
|
||||
|
||||
for (;;)
|
||||
|
@ -346,9 +347,16 @@ void DEBUG_AddModuleBreakpoints(void)
|
|||
if (!(pModule = NE_GetPtr( entry.hModule ))) continue;
|
||||
if (pModule->flags & NE_FFLAGS_LIBMODULE) continue; /* Library */
|
||||
|
||||
if (pModule->dos_image) { /* DOS module */
|
||||
addr.seg = pModule->cs | ((DWORD)pModule->self << 16);
|
||||
addr.off = pModule->ip;
|
||||
fprintf( stderr, "DOS task '%s': ", entry.szModule );
|
||||
DEBUG_AddBreakpoint( &addr );
|
||||
} else
|
||||
if (!(pModule->flags & NE_FFLAGS_WIN32)) /* NE module */
|
||||
{
|
||||
addr.seg = NE_SEG_TABLE(pModule)[pModule->cs-1].selector;
|
||||
addr.seg =
|
||||
GlobalHandleToSel(NE_SEG_TABLE(pModule)[pModule->cs-1].hSeg);
|
||||
addr.off = pModule->ip;
|
||||
fprintf( stderr, "Win16 task '%s': ", entry.szModule );
|
||||
DEBUG_AddBreakpoint( &addr );
|
||||
|
@ -395,14 +403,18 @@ BOOL32 DEBUG_ShouldContinue( enum exec_mode mode, int * count )
|
|||
DBG_ADDR cond_addr;
|
||||
int bpnum;
|
||||
struct list_id list;
|
||||
TDB *pTask = (TDB*)GlobalLock16( GetCurrentTask() );
|
||||
|
||||
/* If not single-stepping, back up over the int3 instruction */
|
||||
if (!(EFL_reg(&DEBUG_context) & STEP_FLAG)) EIP_reg(&DEBUG_context)--;
|
||||
|
||||
addr.seg = CS_reg(&DEBUG_context);
|
||||
addr.off = EIP_reg(&DEBUG_context);
|
||||
if (ISV86(&DEBUG_context)) addr.seg |= (DWORD)(pTask?(pTask->hModule):0)<<16; else
|
||||
if (IS_SELECTOR_SYSTEM(addr.seg)) addr.seg = 0;
|
||||
|
||||
GlobalUnlock16( GetCurrentTask() );
|
||||
|
||||
bpnum = DEBUG_FindBreakpoint( &addr );
|
||||
breakpoints[0].enabled = 0; /* disable the step-over breakpoint */
|
||||
|
||||
|
@ -519,11 +531,15 @@ enum exec_mode DEBUG_RestartExecution( enum exec_mode mode, int count )
|
|||
unsigned int * value;
|
||||
enum exec_mode ret_mode;
|
||||
BYTE *instr;
|
||||
TDB *pTask = (TDB*)GlobalLock16( GetCurrentTask() );
|
||||
|
||||
addr.seg = CS_reg(&DEBUG_context);
|
||||
addr.off = EIP_reg(&DEBUG_context);
|
||||
if (ISV86(&DEBUG_context)) addr.seg |= (DWORD)(pTask?(pTask->hModule):0)<<16; else
|
||||
if (IS_SELECTOR_SYSTEM(addr.seg)) addr.seg = 0;
|
||||
|
||||
GlobalUnlock16( GetCurrentTask() );
|
||||
|
||||
/*
|
||||
* This is the mode we will be running in after we finish. We would like
|
||||
* to be able to modify this in certain cases.
|
||||
|
@ -555,7 +571,8 @@ enum exec_mode DEBUG_RestartExecution( enum exec_mode mode, int count )
|
|||
mode = ret_mode = EXEC_STEPI_INSTR;
|
||||
}
|
||||
|
||||
instr = (BYTE *)PTR_SEG_OFF_TO_LIN( CS_reg(&DEBUG_context),
|
||||
instr = (BYTE *)CTX_SEG_OFF_TO_LIN( &DEBUG_context,
|
||||
CS_reg(&DEBUG_context),
|
||||
EIP_reg(&DEBUG_context) );
|
||||
/*
|
||||
* See if the function we are stepping into has debug info
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "winbase.h"
|
||||
#include "class.h"
|
||||
#include "module.h"
|
||||
#include "task.h"
|
||||
#include "options.h"
|
||||
#include "queue.h"
|
||||
#include "win.h"
|
||||
|
@ -465,18 +466,22 @@ static void DEBUG_Main( int signal )
|
|||
&dbg_exec_count ))
|
||||
{
|
||||
DBG_ADDR addr;
|
||||
TDB *pTask = (TDB*)GlobalLock16( GetCurrentTask() );
|
||||
|
||||
addr.seg = CS_reg(&DEBUG_context);
|
||||
addr.off = EIP_reg(&DEBUG_context);
|
||||
if (ISV86(&DEBUG_context)) addr.seg |= (DWORD)(pTask?(pTask->hModule):0)<<16;
|
||||
addr.type = NULL;
|
||||
DBG_FIX_ADDR_SEG( &addr, 0 );
|
||||
|
||||
GlobalUnlock16( GetCurrentTask() );
|
||||
|
||||
/* Put the display in a correct state */
|
||||
|
||||
XUngrabServer( display );
|
||||
XFlush( display );
|
||||
TSXUngrabServer( display );
|
||||
TSXFlush( display );
|
||||
|
||||
newmode = IS_SELECTOR_32BIT(addr.seg) ? 32 : 16;
|
||||
newmode = ISV86(&DEBUG_context) ? 16 : IS_SELECTOR_32BIT(addr.seg) ? 32 : 16;
|
||||
if (newmode != dbg_mode)
|
||||
fprintf(stderr,"In %d bit mode.\n", dbg_mode = newmode);
|
||||
|
||||
|
@ -526,7 +531,7 @@ static void DEBUG_Main( int signal )
|
|||
issue_prompt();
|
||||
yyparse();
|
||||
flush_symbols();
|
||||
addr.seg = CS_reg(&DEBUG_context);
|
||||
addr.seg = CS_reg(&DEBUG_context) | (addr.seg&0xffff0000);
|
||||
addr.off = EIP_reg(&DEBUG_context);
|
||||
DBG_FIX_ADDR_SEG( &addr, 0 );
|
||||
ret_ok = DEBUG_ValidateRegisters();
|
||||
|
@ -565,6 +570,13 @@ void DebugBreak( CONTEXT *regs )
|
|||
}
|
||||
|
||||
|
||||
void ctx_debug( int signal, CONTEXT *regs )
|
||||
{
|
||||
DEBUG_context = *regs;
|
||||
DEBUG_Main( signal );
|
||||
*regs = DEBUG_context;
|
||||
}
|
||||
|
||||
void wine_debug( int signal, SIGCONTEXT *regs )
|
||||
{
|
||||
#if 0
|
||||
|
|
|
@ -79,7 +79,7 @@ DEBUG_PrintAddress( const DBG_ADDR *addr, int addrlen, int flag )
|
|||
const char *name = DEBUG_FindNearestSymbol( addr, flag, &rtn.sym, 0,
|
||||
&rtn.list );
|
||||
|
||||
if (addr->seg) fprintf( stderr, "0x%04lx:", addr->seg );
|
||||
if (addr->seg) fprintf( stderr, "0x%04lx:", addr->seg&0xFFFF );
|
||||
if (addrlen == 16) fprintf( stderr, "0x%04lx", addr->off );
|
||||
else fprintf( stderr, "0x%08lx", addr->off );
|
||||
if (name) fprintf( stderr, " (%s)", name );
|
||||
|
|
|
@ -99,6 +99,7 @@ BOOL32 DEBUG_checkmap_bad(char *addr, size_t size, int rwflag)
|
|||
*/
|
||||
BOOL32 DEBUG_IsBadReadPtr( const DBG_ADDR *address, int size )
|
||||
{
|
||||
if (!IS_SELECTOR_V86(address->seg))
|
||||
if (address->seg) /* segmented addr */
|
||||
{
|
||||
if (IsBadReadPtr16( (SEGPTR)MAKELONG( (WORD)address->off,
|
||||
|
@ -116,6 +117,7 @@ BOOL32 DEBUG_IsBadReadPtr( const DBG_ADDR *address, int size )
|
|||
*/
|
||||
BOOL32 DEBUG_IsBadWritePtr( const DBG_ADDR *address, int size )
|
||||
{
|
||||
if (!IS_SELECTOR_V86(address->seg))
|
||||
if (address->seg) /* segmented addr */
|
||||
{
|
||||
/* Note: we use IsBadReadPtr here because we are */
|
||||
|
|
|
@ -156,6 +156,8 @@ void DEBUG_SetSigContext( const SIGCONTEXT *sigcontext )
|
|||
GET_GS( GS_reg(&DEBUG_context) );
|
||||
GS_reg(&DEBUG_context) &= 0xffff;
|
||||
#endif
|
||||
if (ISV86(&DEBUG_context))
|
||||
(char*)V86BASE(&DEBUG_context) = DOSMEM_MemoryBase(0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -298,6 +300,8 @@ BOOL32 DEBUG_ValidateRegisters(void)
|
|||
{
|
||||
WORD cs, ds;
|
||||
|
||||
if (ISV86(&DEBUG_context)) return TRUE;
|
||||
|
||||
/* Check that a selector is a valid ring-3 LDT selector, or a NULL selector */
|
||||
#define CHECK_SEG(seg,name) \
|
||||
if (((seg) & ~3) && \
|
||||
|
@ -319,6 +323,7 @@ BOOL32 DEBUG_ValidateRegisters(void)
|
|||
|
||||
/* Check that CS and SS are not NULL */
|
||||
|
||||
if (!ISV86(&DEBUG_context))
|
||||
if (!(CS_reg(&DEBUG_context) & ~3))
|
||||
{
|
||||
fprintf( stderr, "*** Invalid value for CS register: %04x\n",
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
SUBDIRS = \
|
||||
comctl32 \
|
||||
shell32
|
||||
psapi \
|
||||
shell32 \
|
||||
winaspi \
|
||||
wnaspi32
|
||||
|
||||
all: $(SUBDIRS)
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
*/
|
||||
|
||||
#include "windows.h"
|
||||
#include "winnt.h"
|
||||
#include "winbase.h"
|
||||
#include "commctrl.h"
|
||||
#include "animate.h"
|
||||
#include "win.h"
|
||||
|
@ -23,34 +25,136 @@
|
|||
#define ANIMATE_GetInfoPtr(wndPtr) ((ANIMATE_INFO *)wndPtr->wExtra[0])
|
||||
|
||||
|
||||
static BOOL32
|
||||
ANIMATE_LoadRes32A (ANIMATE_INFO *infoPtr, HINSTANCE32 hInst, LPSTR lpName)
|
||||
{
|
||||
HRSRC32 hrsrc;
|
||||
HGLOBAL32 handle;
|
||||
|
||||
hrsrc = FindResource32A (hInst, lpName, "AVI");
|
||||
if (!hrsrc)
|
||||
return FALSE;
|
||||
|
||||
handle = LoadResource32 (hInst, hrsrc);
|
||||
if (!handle)
|
||||
return FALSE;
|
||||
|
||||
infoPtr->lpAvi = LockResource32 (handle);
|
||||
if (!infoPtr->lpAvi)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static BOOL32
|
||||
ANIMATE_LoadFile32A (ANIMATE_INFO *infoPtr, LPSTR lpName)
|
||||
{
|
||||
HANDLE32 handle;
|
||||
|
||||
infoPtr->hFile =
|
||||
CreateFile32A (lpName, GENERIC_READ, 0, NULL, OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL, 0);
|
||||
if (!infoPtr->hFile)
|
||||
return FALSE;
|
||||
|
||||
handle =
|
||||
CreateFileMapping32A (infoPtr->hFile, NULL, PAGE_READONLY | SEC_COMMIT,
|
||||
0, 0, NULL);
|
||||
if (!handle) {
|
||||
CloseHandle (infoPtr->hFile);
|
||||
infoPtr->hFile = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
infoPtr->lpAvi = MapViewOfFile (handle, FILE_MAP_READ, 0, 0, 0);
|
||||
if (!infoPtr->lpAvi) {
|
||||
CloseHandle (infoPtr->hFile);
|
||||
infoPtr->hFile = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static VOID
|
||||
ANIMATE_Free (ANIMATE_INFO *infoPtr)
|
||||
{
|
||||
if (infoPtr->hFile) {
|
||||
UnmapViewOfFile (infoPtr->lpAvi);
|
||||
CloseHandle (infoPtr->hFile);
|
||||
infoPtr->lpAvi = NULL;
|
||||
}
|
||||
else {
|
||||
GlobalFree32 (infoPtr->lpAvi);
|
||||
infoPtr->lpAvi = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static VOID
|
||||
ANIMATE_GetAviInfo (infoPtr)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
ANIMATE_Open32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(wndPtr);
|
||||
HINSTANCE32 hInstance = (HINSTANCE32)wParam;
|
||||
|
||||
ANIMATE_Free (infoPtr);
|
||||
|
||||
if (!lParam) {
|
||||
|
||||
FIXME (animate, "close avi: empty stub!\n");
|
||||
|
||||
TRACE (animate, "closing avi!\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (HIWORD(lParam)) {
|
||||
|
||||
FIXME (animate, "(\"%s\") empty stub!\n", (LPSTR)lParam);
|
||||
|
||||
if (ANIMATE_LoadRes32A (infoPtr, hInstance, (LPSTR)lParam)) {
|
||||
|
||||
FIXME (animate, "AVI resource found!\n");
|
||||
|
||||
}
|
||||
else {
|
||||
FIXME (animate, "No AVI resource found!\n");
|
||||
if (ANIMATE_LoadFile32A (infoPtr, (LPSTR)lParam)) {
|
||||
FIXME (animate, "AVI file found!\n");
|
||||
}
|
||||
else {
|
||||
FIXME (animate, "No AVI file found!\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
FIXME (animate, "(%u) empty stub!\n", (WORD)LOWORD(lParam));
|
||||
|
||||
if (ANIMATE_LoadRes32A (infoPtr, hInstance,
|
||||
MAKEINTRESOURCE32A((INT32)lParam))) {
|
||||
FIXME (animate, "AVI resource found!\n");
|
||||
}
|
||||
else {
|
||||
FIXME (animate, "No AVI resource found!\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
ANIMATE_GetAviInfo (infoPtr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// << ANIMATE_Open32W >>
|
||||
|
||||
|
||||
static LRESULT
|
||||
ANIMATE_Play (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -131,7 +235,8 @@ ANIMATE_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(wndPtr);
|
||||
|
||||
|
||||
|
||||
/* free avi data */
|
||||
ANIMATE_Free (infoPtr);
|
||||
|
||||
/* free animate info data */
|
||||
COMCTL32_Free (infoPtr);
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
* COMCTL32.DLL (internally).
|
||||
*
|
||||
* TODO
|
||||
* - Write documentation.
|
||||
* - Add more functions.
|
||||
* - Write some documentation.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
@ -26,6 +27,22 @@ CRITICAL_SECTION cs_comctl_alloc;
|
|||
HANDLE32 hComctl32Heap = 0;
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* COMCTL32_11 [COMCTL32.11]
|
||||
*/
|
||||
|
||||
DWORD WINAPI
|
||||
COMCTL32_11 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3,
|
||||
DWORD dwParam4, DWORD dwParam5, DWORD dwParam6)
|
||||
{
|
||||
|
||||
FIXME (commctrl, "(%08lx, %08lx, %08lx, %08lx, %08lx, %08lx): empty stub\n",
|
||||
dwParam1, dwParam2, dwParam3, dwParam4, dwParam5, dwParam6);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* Alloc [COMCTL32.71]
|
||||
*
|
||||
|
@ -152,6 +169,25 @@ COMCTL32_GetSize (LPVOID lpMem)
|
|||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* The MRU-API is a set of functions to manipulate MRU(Most Recently Used)
|
||||
* lists.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct tagMRUINFO
|
||||
{
|
||||
DWORD dwParam1;
|
||||
DWORD dwParam2;
|
||||
DWORD dwParam3;
|
||||
HKEY hkeyMain;
|
||||
LPCSTR lpszSubKey;
|
||||
DWORD dwParam6;
|
||||
} MRUINFO, *LPMRUINFO;
|
||||
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* CreateMRUListA [COMCTL32.151]
|
||||
*
|
||||
|
@ -161,54 +197,233 @@ COMCTL32_GetSize (LPVOID lpMem)
|
|||
* RETURNS
|
||||
*/
|
||||
|
||||
DWORD WINAPI
|
||||
CreateMRUList32A (DWORD dwParam)
|
||||
LPVOID WINAPI
|
||||
CreateMRUListEx32A (LPMRUINFO lpmi, DWORD dwParam2,
|
||||
DWORD dwParam3, DWORD dwParam4);
|
||||
|
||||
LPVOID WINAPI
|
||||
CreateMRUList32A (LPMRUINFO lpmi)
|
||||
{
|
||||
|
||||
FIXME (commctrl, "(%lx)\n", dwParam);
|
||||
|
||||
return 1;
|
||||
return CreateMRUListEx32A (lpmi, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
DWORD WINAPI
|
||||
FreeMRUList32A (LPVOID ptr)
|
||||
{
|
||||
FIXME (commctrl, "(%p) empty stub!\n", ptr);
|
||||
|
||||
COMCTL32_Free (ptr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
LPVOID WINAPI
|
||||
CreateMRUListEx32A (LPMRUINFO lpmi, DWORD dwParam2, DWORD dwParam3, DWORD dwParam4)
|
||||
{
|
||||
DWORD dwLocal1;
|
||||
HKEY hkeyResult;
|
||||
DWORD dwLocal3;
|
||||
LPVOID lMRU;
|
||||
DWORD dwLocal5;
|
||||
DWORD dwLocal6;
|
||||
DWORD dwLocal7;
|
||||
DWORD dwDisposition;
|
||||
|
||||
/* internal variables */
|
||||
LPVOID ptr;
|
||||
|
||||
FIXME (commctrl, "(%p) empty stub!\n", lpmi);
|
||||
|
||||
if (lpmi) {
|
||||
FIXME (commctrl, "(%lx %lx %lx %lx \"%s\" %lx)\n",
|
||||
lpmi->dwParam1, lpmi->dwParam2, lpmi->dwParam3,
|
||||
lpmi->hkeyMain, lpmi->lpszSubKey, lpmi->dwParam6);
|
||||
}
|
||||
|
||||
/* dummy pointer creation */
|
||||
ptr = COMCTL32_Alloc (32);
|
||||
|
||||
FIXME (commctrl, "-- ret = %p\n", ptr);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
DWORD WINAPI
|
||||
AddMRUData (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
|
||||
{
|
||||
|
||||
FIXME (commctrl, "(%lx %lx %lx) empty stub!\n",
|
||||
dwParam1, dwParam2, dwParam3);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
DWORD WINAPI
|
||||
FindMRUData (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3, DWORD dwParam4)
|
||||
{
|
||||
|
||||
FIXME (commctrl, "(%lx %lx %lx %lx) empty stub!\n",
|
||||
dwParam1, dwParam2, dwParam3, dwParam4);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* Str_GetPtrA [COMCTL32.233]
|
||||
*
|
||||
* PARAMS
|
||||
* lpSrc [I]
|
||||
* lpDest [O]
|
||||
* nMaxLen [I]
|
||||
*
|
||||
* RETURNS
|
||||
*/
|
||||
|
||||
INT32 WINAPI
|
||||
Str_GetPtr32A (LPCSTR lpSrc, LPSTR lpDest, INT32 nMaxLen)
|
||||
{
|
||||
INT32 len;
|
||||
|
||||
TRACE (commctrl, "(%p %p %d)\n", lpSrc, lpDest, nMaxLen);
|
||||
|
||||
if (!lpDest && lpSrc)
|
||||
return lstrlen32A (lpSrc);
|
||||
|
||||
if (nMaxLen == 0)
|
||||
return 0;
|
||||
|
||||
if (lpSrc == NULL) {
|
||||
lpDest[0] = '\0';
|
||||
return 0;
|
||||
}
|
||||
|
||||
len = lstrlen32A (lpSrc);
|
||||
if (len >= nMaxLen)
|
||||
len = nMaxLen - 1;
|
||||
|
||||
RtlMoveMemory (lpDest, lpSrc, len);
|
||||
lpDest[len] = '\0';
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* Str_SetPtrA [COMCTL32.234]
|
||||
*
|
||||
* PARAMS
|
||||
* dwParam1 [I]
|
||||
* dwParam2 [I]
|
||||
* lppDest [O]
|
||||
* lpSrc [I]
|
||||
*
|
||||
* RETURNS
|
||||
*/
|
||||
|
||||
BOOL32 WINAPI
|
||||
COMCTL32_Str_SetPtrA (LPSTR lpStr, LPVOID *lpPtr)
|
||||
Str_SetPtr32A (LPSTR *lppDest, LPCSTR lpSrc)
|
||||
{
|
||||
TRACE (commctrl, "(%p %p)\n", lppDest, lpSrc);
|
||||
|
||||
if (lpSrc) {
|
||||
LPSTR ptr = COMCTL32_ReAlloc (lppDest, lstrlen32A (lpSrc) + 1);
|
||||
if (!ptr)
|
||||
return FALSE;
|
||||
lstrcpy32A (ptr, lpSrc);
|
||||
*lppDest = ptr;
|
||||
}
|
||||
else {
|
||||
if (*lppDest) {
|
||||
COMCTL32_Free (*lppDest);
|
||||
*lppDest = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* Str_GetPtrW [COMCTL32.235]
|
||||
*
|
||||
* PARAMS
|
||||
* lpSrc [I]
|
||||
* lpDest [O]
|
||||
* nMaxLen [I]
|
||||
*
|
||||
* RETURNS
|
||||
*/
|
||||
|
||||
INT32 WINAPI
|
||||
Str_GetPtr32W (LPCWSTR lpSrc, LPWSTR lpDest, INT32 nMaxLen)
|
||||
{
|
||||
INT32 len;
|
||||
LPSTR ptr;
|
||||
|
||||
TRACE (commctrl, "(%p %p)\n", lpStr, lpPtr);
|
||||
TRACE (commctrl, "(%p %p %d)\n", lpSrc, lpDest, nMaxLen);
|
||||
|
||||
if (lpStr) {
|
||||
len = lstrlen32A (lpStr);
|
||||
ptr = COMCTL32_ReAlloc (lpPtr, len + 1);
|
||||
if (!(ptr))
|
||||
return FALSE;
|
||||
lstrcpy32A (ptr, lpStr);
|
||||
if (!lpPtr)
|
||||
return FALSE;
|
||||
*lpPtr = ptr;
|
||||
return TRUE;
|
||||
if (!lpDest && lpSrc)
|
||||
return lstrlen32W (lpSrc);
|
||||
|
||||
if (nMaxLen == 0)
|
||||
return 0;
|
||||
|
||||
if (lpSrc == NULL) {
|
||||
lpDest[0] = L'\0';
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (*lpPtr) {
|
||||
COMCTL32_Free (*lpPtr);
|
||||
return TRUE;
|
||||
len = lstrlen32W (lpSrc);
|
||||
if (len >= nMaxLen)
|
||||
len = nMaxLen - 1;
|
||||
|
||||
RtlMoveMemory (lpDest, lpSrc, len*sizeof(WCHAR));
|
||||
lpDest[len] = L'\0';
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* Str_SetPtrW [COMCTL32.236]
|
||||
*
|
||||
* PARAMS
|
||||
* lpDest [O]
|
||||
* lpSrc [I]
|
||||
*
|
||||
* RETURNS
|
||||
*/
|
||||
|
||||
BOOL32 WINAPI
|
||||
Str_SetPtr32W (LPWSTR *lppDest, LPCWSTR lpSrc)
|
||||
{
|
||||
TRACE (commctrl, "(%p %p)\n", lppDest, lpSrc);
|
||||
|
||||
if (lpSrc) {
|
||||
INT32 len = lstrlen32W (lpSrc) + 1;
|
||||
LPWSTR ptr = COMCTL32_ReAlloc (lppDest, len * sizeof(WCHAR));
|
||||
if (!ptr)
|
||||
return FALSE;
|
||||
lstrcpy32W (ptr, lpSrc);
|
||||
*lppDest = ptr;
|
||||
}
|
||||
else {
|
||||
if (*lppDest) {
|
||||
COMCTL32_Free (*lppDest);
|
||||
*lppDest = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -636,7 +851,7 @@ DPA_Destroy (const HDPA hdpa)
|
|||
BOOL32 WINAPI
|
||||
DPA_Grow (const HDPA hdpa, INT32 nGrow)
|
||||
{
|
||||
FIXME (commctrl, "(%p %d) stub!\n", hdpa, nGrow);
|
||||
TRACE (commctrl, "(%p %d)\n", hdpa, nGrow);
|
||||
|
||||
if (!hdpa)
|
||||
return FALSE;
|
||||
|
@ -676,7 +891,7 @@ DPA_Clone (const HDPA hdpa, const HDPA hdpaNew)
|
|||
if (!hdpa)
|
||||
return NULL;
|
||||
|
||||
FIXME (commctrl, "(%p %p) stub!\n", hdpa, hdpaNew);
|
||||
TRACE (commctrl, "(%p %p)\n", hdpa, hdpaNew);
|
||||
|
||||
if (!hdpaNew) {
|
||||
/* create a new DPA */
|
||||
|
@ -1019,7 +1234,7 @@ DPA_QuickSort (LPVOID *lpPtrs , INT32 l, INT32 r,
|
|||
LPVOID t, v;
|
||||
INT32 i, j;
|
||||
|
||||
if (l > r) {
|
||||
if (r > l) {
|
||||
v = lpPtrs[r];
|
||||
i = l - 1;
|
||||
j = r;
|
||||
|
@ -1064,7 +1279,9 @@ DPA_Sort (const HDPA hdpa, PFNDPACOMPARE pfnCompare, LPARAM lParam)
|
|||
|
||||
TRACE (commctrl, "(%p %p 0x%lx)\n", hdpa, pfnCompare, lParam);
|
||||
|
||||
DPA_QuickSort (hdpa->ptrs, 0, hdpa->nItemCount - 1, pfnCompare, lParam);
|
||||
if ((hdpa->nItemCount > 1) && (hdpa->ptrs))
|
||||
DPA_QuickSort (hdpa->ptrs, 0, hdpa->nItemCount - 1,
|
||||
pfnCompare, lParam);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1107,6 +1324,8 @@ DPA_Search (const HDPA hdpa, LPVOID pFind, INT32 nStart,
|
|||
INT32 l, r, x, n;
|
||||
LPVOID *lpPtr;
|
||||
|
||||
TRACE (commctrl, "binary search\n");
|
||||
|
||||
l = (nStart == -1) ? 0 : nStart;
|
||||
r = hdpa->nItemCount - 1;
|
||||
lpPtr = hdpa->ptrs;
|
||||
|
@ -1138,7 +1357,7 @@ DPA_Search (const HDPA hdpa, LPVOID pFind, INT32 nStart,
|
|||
LPVOID *lpPtr;
|
||||
INT32 nIndex;
|
||||
|
||||
FIXME (commctrl, "linear search\n");
|
||||
TRACE (commctrl, "linear search\n");
|
||||
|
||||
nIndex = (nStart == -1)? 0 : nStart;
|
||||
lpPtr = hdpa->ptrs;
|
||||
|
@ -1267,3 +1486,63 @@ COMCTL32_StrToIntA (LPSTR lpString)
|
|||
return atoi(lpString);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* COMCTL32_385 [COMCTL32.385]
|
||||
*/
|
||||
|
||||
DWORD WINAPI
|
||||
COMCTL32_385 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
|
||||
{
|
||||
|
||||
FIXME (commctrl, "(%08lx, %08lx, %08lx): empty stub\n",
|
||||
dwParam1, dwParam2, dwParam3);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* COMCTL32_386 [COMCTL32.386]
|
||||
*/
|
||||
|
||||
DWORD WINAPI
|
||||
COMCTL32_386 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
|
||||
{
|
||||
|
||||
FIXME (commctrl, "(%08lx, %08lx, %08lx): empty stub\n",
|
||||
dwParam1, dwParam2, dwParam3);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* COMCTL32_387 [COMCTL32.387]
|
||||
*/
|
||||
|
||||
DWORD WINAPI
|
||||
COMCTL32_387 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
|
||||
{
|
||||
|
||||
FIXME (commctrl, "(%08lx, %08lx, %08lx): empty stub\n",
|
||||
dwParam1, dwParam2, dwParam3);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* COMCTL32_388 [COMCTL32.388]
|
||||
*/
|
||||
|
||||
DWORD WINAPI
|
||||
COMCTL32_388 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3)
|
||||
{
|
||||
|
||||
FIXME (commctrl, "(%08lx, %08lx, %08lx): empty stub\n",
|
||||
dwParam1, dwParam2, dwParam3);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,10 +32,13 @@
|
|||
* ComCtl32LibMain [Internal] Initializes the internal 'COMCTL32.DLL'.
|
||||
*
|
||||
* PARAMS
|
||||
* hinstDLL [I]
|
||||
* hinstDLL [I] handle to the 'dlls' instance
|
||||
* fdwReason [I]
|
||||
* lpvReserved [I]
|
||||
*
|
||||
* RETURNS
|
||||
* Success: TRUE
|
||||
* Failure: FALSE
|
||||
*/
|
||||
|
||||
BOOL32 WINAPI
|
||||
|
@ -68,29 +71,29 @@ ComCtl32LibMain (HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|||
* MenuHelp [COMCTL32.2]
|
||||
*
|
||||
* PARAMS
|
||||
* uMsg
|
||||
* wParam
|
||||
* lParam
|
||||
* hMainMenu
|
||||
* hInst
|
||||
* hwndStatus
|
||||
* lpwIDs
|
||||
* uMsg [I]
|
||||
* wParam [I]
|
||||
* lParam [I]
|
||||
* hMainMenu [I] handle to the applications main menu
|
||||
* hInst [I]
|
||||
* hwndStatus [I] handle to the status bar window
|
||||
* lpwIDs [I] pointer to an array of intergers (see NOTES)
|
||||
*
|
||||
* RETURNS
|
||||
* None
|
||||
* No return value
|
||||
*
|
||||
* NOTES
|
||||
* Some features are still missing because of incomplete WM_MENUSELECT
|
||||
* messages (16->32 bit conversion).
|
||||
* The official documentation is incomplete!
|
||||
*/
|
||||
|
||||
VOID WINAPI
|
||||
MenuHelp (UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, HMENU32 hMainMenu,
|
||||
HINSTANCE32 hInst, HWND32 hwndStatus, LPUINT32 lpwIDs)
|
||||
{
|
||||
char szStatusText[128];
|
||||
UINT32 uMenuID = 0;
|
||||
|
||||
if (!IsWindow32 (hwndStatus)) return;
|
||||
if (!IsWindow32 (hwndStatus))
|
||||
return;
|
||||
|
||||
switch (uMsg) {
|
||||
case WM_MENUSELECT:
|
||||
|
@ -99,23 +102,28 @@ MenuHelp (UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, HMENU32 hMainMenu,
|
|||
|
||||
if ((HIWORD(wParam) == 0xFFFF) && (lParam == 0)) {
|
||||
/* menu was closed */
|
||||
TRACE (commctrl, "menu was closed!\n");
|
||||
SendMessage32A (hwndStatus, SB_SIMPLE, FALSE, 0);
|
||||
}
|
||||
else {
|
||||
if (HIWORD(wParam) & MF_POPUP) {
|
||||
FIXME (commctrl, "popup 0x%08x 0x%08lx\n", wParam, lParam);
|
||||
/* menu item was selected */
|
||||
if (HIWORD(wParam) & MF_POPUP)
|
||||
uMenuID = (UINT32)*(lpwIDs+1);
|
||||
else
|
||||
uMenuID = (UINT32)LOWORD(wParam);
|
||||
TRACE (commctrl, "uMenuID = %u\n", uMenuID);
|
||||
|
||||
szStatusText[0] = 0;
|
||||
}
|
||||
else {
|
||||
TRACE (commctrl, "menu item selected!\n");
|
||||
if (!LoadString32A (hInst, LOWORD(wParam), szStatusText, 128))
|
||||
szStatusText[0] = 0;
|
||||
}
|
||||
SendMessage32A (hwndStatus, SB_SETTEXT32A, 255 | SBT_NOBORDERS,
|
||||
(LPARAM)szStatusText);
|
||||
if (uMenuID) {
|
||||
CHAR szText[256];
|
||||
|
||||
if (!LoadString32A (hInst, uMenuID, szText, 256))
|
||||
szText[0] = 0;
|
||||
|
||||
SendMessage32A (hwndStatus, SB_SETTEXT32A,
|
||||
255 | SBT_NOBORDERS, (LPARAM)szText);
|
||||
SendMessage32A (hwndStatus, SB_SIMPLE, TRUE, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -198,10 +206,10 @@ ShowHideMenuCtl (HWND32 hwnd, UINT32 uFlags, LPINT32 lpInfo)
|
|||
* lpInfo [I] pointer to an array of integers
|
||||
*
|
||||
* RETURNS
|
||||
* None.
|
||||
* No return value.
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
* The official documentation is incomplete!
|
||||
*/
|
||||
|
||||
VOID WINAPI
|
||||
|
@ -244,6 +252,9 @@ GetEffectiveClientRect (HWND32 hwnd, LPRECT32 lpRect, LPINT32 lpInfo)
|
|||
* lprc [I] pointer to a rectangle
|
||||
* text [I] pointer to the text
|
||||
* style [I]
|
||||
*
|
||||
* RETURNS
|
||||
* No return value.
|
||||
*/
|
||||
|
||||
VOID WINAPI
|
||||
|
@ -281,6 +292,9 @@ DrawStatusText32A (HDC32 hdc, LPRECT32 lprc, LPCSTR text, UINT32 style)
|
|||
* lprc [I] pointer to a rectangle
|
||||
* text [I] pointer to the text
|
||||
* style [I]
|
||||
*
|
||||
* RETURNS
|
||||
* No return value.
|
||||
*/
|
||||
|
||||
VOID WINAPI
|
||||
|
@ -293,8 +307,19 @@ DrawStatusText32W (HDC32 hdc, LPRECT32 lprc, LPCWSTR text, UINT32 style)
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* CreateStatusWindow32A [COMCTL32.6][COMCTL32.21]
|
||||
* CreateStatusWindow32A [COMCTL32.6][COMCTL32.21] Creates a status bar
|
||||
*
|
||||
* PARAMS
|
||||
* style [I]
|
||||
* text [I]
|
||||
* parent [I] handle to the parent window
|
||||
* wid [I]
|
||||
*
|
||||
* RETURNS
|
||||
* Success: handle to the control
|
||||
* Failure: 0
|
||||
*/
|
||||
|
||||
HWND32 WINAPI
|
||||
CreateStatusWindow32A (INT32 style, LPCSTR text, HWND32 parent, UINT32 wid)
|
||||
{
|
||||
|
@ -306,10 +331,21 @@ CreateStatusWindow32A (INT32 style, LPCSTR text, HWND32 parent, UINT32 wid)
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* CreateStatusWindow32W (COMCTL32.22)
|
||||
* CreateStatusWindow32W [COMCTL32.22] Creates a status bar control
|
||||
*
|
||||
* PARAMS
|
||||
* style [I]
|
||||
* text [I]
|
||||
* parent [I]
|
||||
* wid [I]
|
||||
*
|
||||
* RETURNS
|
||||
* Success: handle to the control
|
||||
* Failure: 0
|
||||
*/
|
||||
HWND32 WINAPI CreateStatusWindow32W( INT32 style, LPCWSTR text, HWND32 parent,
|
||||
UINT32 wid )
|
||||
|
||||
HWND32 WINAPI
|
||||
CreateStatusWindow32W (INT32 style, LPCWSTR text, HWND32 parent, UINT32 wid)
|
||||
{
|
||||
return CreateWindow32W((LPCWSTR)STATUSCLASSNAME32W, text, style,
|
||||
CW_USEDEFAULT32, CW_USEDEFAULT32,
|
||||
|
@ -317,9 +353,29 @@ HWND32 WINAPI CreateStatusWindow32W( INT32 style, LPCWSTR text, HWND32 parent,
|
|||
parent, wid, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CreateUpDownControl (COMCTL32.16)
|
||||
* CreateUpDownControl [COMCTL32.16] Creates an Up-Down control
|
||||
*
|
||||
* PARAMS
|
||||
* style
|
||||
* x
|
||||
* y
|
||||
* cx
|
||||
* cy
|
||||
* parent
|
||||
* id
|
||||
* inst
|
||||
* buddy
|
||||
* maxVal [I]
|
||||
* minVal [I]
|
||||
* curVal [I]
|
||||
*
|
||||
* RETURNS
|
||||
* Success: handle to the control
|
||||
* Failure: 0
|
||||
*/
|
||||
|
||||
HWND32 WINAPI
|
||||
CreateUpDownControl (DWORD style, INT32 x, INT32 y, INT32 cx, INT32 cy,
|
||||
HWND32 parent, INT32 id, HINSTANCE32 inst,
|
||||
|
@ -344,7 +400,10 @@ CreateUpDownControl (DWORD style, INT32 x, INT32 y, INT32 cx, INT32 cy,
|
|||
* Registers the common controls.
|
||||
*
|
||||
* PARAMS
|
||||
* None.
|
||||
* No parameters.
|
||||
*
|
||||
* RETURNS
|
||||
* No return values.
|
||||
*
|
||||
* NOTES
|
||||
* This function is just a dummy.
|
||||
|
@ -364,7 +423,11 @@ InitCommonControls (VOID)
|
|||
* Registers the common controls.
|
||||
*
|
||||
* PARAMS
|
||||
* lpInitCtrls [I] pointer to a INITCOMMONCONTROLS structure.
|
||||
* lpInitCtrls [I] pointer to an INITCOMMONCONTROLS structure.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: TRUE
|
||||
* Failure: FALSE
|
||||
*
|
||||
* NOTES
|
||||
* Only the additinal common controls are registered by this function.
|
||||
|
@ -401,10 +464,9 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
|
|||
|
||||
/* advanced classes - not included in Win95 */
|
||||
case ICC_DATE_CLASSES:
|
||||
TRACE (commctrl, "No month calendar class implemented!\n");
|
||||
TRACE (commctrl, "No date picker class implemented!\n");
|
||||
TRACE (commctrl, "No time picker class implemented!\n");
|
||||
UPDOWN_Register ();
|
||||
FIXME (commctrl, "No month calendar class implemented!\n");
|
||||
FIXME (commctrl, "No date picker class implemented!\n");
|
||||
FIXME (commctrl, "No time picker class implemented!\n");
|
||||
break;
|
||||
|
||||
case ICC_USEREX_CLASSES:
|
||||
|
@ -416,7 +478,7 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
|
|||
break;
|
||||
|
||||
case ICC_INTERNET_CLASSES:
|
||||
TRACE (commctrl, "No IPAddress class implemented!\n");
|
||||
FIXME (commctrl, "No IPAddress class implemented!\n");
|
||||
break;
|
||||
|
||||
case ICC_PAGESCROLLER_CLASS:
|
||||
|
@ -424,7 +486,7 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
|
|||
break;
|
||||
|
||||
case ICC_NATIVEFNTCTL_CLASS:
|
||||
TRACE (commctrl, "No native font class implemented!\n");
|
||||
FIXME (commctrl, "No native font class implemented!\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -438,10 +500,26 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* CreateToolbarEx [COMCTL32.32]
|
||||
*
|
||||
* CreateToolbarEx [COMCTL32.32] Creates a tool bar window
|
||||
*
|
||||
* PARAMS
|
||||
* hwnd
|
||||
* style
|
||||
* wID
|
||||
* nBitmaps
|
||||
* hBMInst
|
||||
* wBMID
|
||||
* lpButtons
|
||||
* iNumButtons
|
||||
* dxButton
|
||||
* dyButton
|
||||
* dxBitmap
|
||||
* dyBitmap
|
||||
* uStructSize
|
||||
*
|
||||
* RETURNS
|
||||
* Success: handle to the tool bar control
|
||||
* Failure: 0
|
||||
*/
|
||||
|
||||
HWND32 WINAPI
|
||||
|
@ -600,10 +678,24 @@ CreateMappedBitmap (HINSTANCE32 hInstance, INT32 idBitmap, UINT32 wFlags,
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* CreateToolbar [COMCTL32.7]
|
||||
* CreateToolbar [COMCTL32.7] Creates a tool bar control
|
||||
*
|
||||
* PARAMS
|
||||
* hwnd
|
||||
* style
|
||||
* wID
|
||||
* nBitmaps
|
||||
* hBMInst
|
||||
* wBMID
|
||||
* lpButtons
|
||||
* iNumButtons
|
||||
*
|
||||
* RETURNS
|
||||
* Success: handle to the tool bar control
|
||||
* Failure: 0
|
||||
*
|
||||
* NOTES
|
||||
* Do not use this functions anymore. Use CreateToolbarEx instead.
|
||||
*/
|
||||
|
||||
HWND32 WINAPI
|
||||
|
@ -625,22 +717,25 @@ CreateToolbar (HWND32 hwnd, DWORD style, UINT32 wID, INT32 nBitmaps,
|
|||
* PARAMS
|
||||
* pdvi [O] pointer to version information structure.
|
||||
*
|
||||
* REURNS
|
||||
* RETURNS
|
||||
* Success: S_OK
|
||||
* Failure: E_INVALIDARG
|
||||
*
|
||||
* NOTES
|
||||
* Returns version of a comctl32.dll from IE4.01 SP1.
|
||||
*/
|
||||
|
||||
HRESULT WINAPI
|
||||
COMCTL32_DllGetVersion (DLLVERSIONINFO *pdvi)
|
||||
{
|
||||
if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) {
|
||||
WARN(ver, "wrong DLLVERSIONINFO size from app");
|
||||
WARN (commctrl, "wrong DLLVERSIONINFO size from app");
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
pdvi->dwMajorVersion = 4;
|
||||
pdvi->dwMinorVersion = 72;
|
||||
pdvi->dwBuildNumber = 2106;
|
||||
pdvi->dwBuildNumber = 3110;
|
||||
pdvi->dwPlatformID = 1;
|
||||
|
||||
TRACE (commctrl, "%lu.%lu.%lu.%lu\n",
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* TODO:
|
||||
* - Imagelist support (partially).
|
||||
* - Callback items.
|
||||
* - Callback items (under construction).
|
||||
* - Order list support.
|
||||
* - Control specific cursors (over dividers).
|
||||
* - Hottrack support (partially).
|
||||
|
@ -22,7 +22,6 @@
|
|||
#include "windows.h"
|
||||
#include "commctrl.h"
|
||||
#include "header.h"
|
||||
#include "heap.h"
|
||||
#include "win.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -446,7 +445,7 @@ static BOOL32
|
|||
HEADER_SendHeaderNotify (WND *wndPtr, UINT32 code, INT32 iItem)
|
||||
{
|
||||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr(wndPtr);
|
||||
NMHEADERA nmhdr;
|
||||
NMHEADER32A nmhdr;
|
||||
HDITEM32A nmitem;
|
||||
|
||||
nmhdr.hdr.hwndFrom = wndPtr->hwndSelf;
|
||||
|
@ -455,11 +454,13 @@ HEADER_SendHeaderNotify (WND *wndPtr, UINT32 code, INT32 iItem)
|
|||
nmhdr.iItem = iItem;
|
||||
nmhdr.iButton = 0;
|
||||
nmhdr.pitem = &nmitem;
|
||||
nmitem.mask = infoPtr->items[iItem].mask;
|
||||
nmitem.mask = 0;
|
||||
nmitem.cxy = infoPtr->items[iItem].cxy;
|
||||
nmitem.hbm = infoPtr->items[iItem].hbm;
|
||||
nmitem.pszText = infoPtr->items[iItem].pszText;
|
||||
nmitem.cchTextMax = infoPtr->items[iItem].cchTextMax;
|
||||
nmitem.pszText = NULL;
|
||||
nmitem.cchTextMax = 0;
|
||||
// nmitem.pszText = infoPtr->items[iItem].pszText;
|
||||
// nmitem.cchTextMax = infoPtr->items[iItem].cchTextMax;
|
||||
nmitem.fmt = infoPtr->items[iItem].fmt;
|
||||
nmitem.lParam = infoPtr->items[iItem].lParam;
|
||||
nmitem.iOrder = infoPtr->items[iItem].iOrder;
|
||||
|
@ -473,7 +474,7 @@ HEADER_SendHeaderNotify (WND *wndPtr, UINT32 code, INT32 iItem)
|
|||
static BOOL32
|
||||
HEADER_SendClickNotify (WND *wndPtr, UINT32 code, INT32 iItem)
|
||||
{
|
||||
NMHEADERA nmhdr;
|
||||
NMHEADER32A nmhdr;
|
||||
|
||||
nmhdr.hdr.hwndFrom = wndPtr->hwndSelf;
|
||||
nmhdr.hdr.idFrom = wndPtr->wIDmenu;
|
||||
|
@ -499,21 +500,19 @@ static LRESULT
|
|||
HEADER_DeleteItem (WND *wndPtr, WPARAM32 wParam)
|
||||
{
|
||||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr(wndPtr);
|
||||
INT32 iItem = (INT32)wParam;
|
||||
HDC32 hdc;
|
||||
INT32 iItem;
|
||||
|
||||
iItem = (INT32)wParam;
|
||||
|
||||
TRACE(header, "[iItem=%d]\n", iItem);
|
||||
|
||||
if ((iItem < 0) || (iItem > infoPtr->uNumItem - 1))
|
||||
if ((iItem < 0) || (iItem >= (INT32)infoPtr->uNumItem))
|
||||
return FALSE;
|
||||
|
||||
if (infoPtr->uNumItem == 1) {
|
||||
TRACE(header, "Simple delete!\n");
|
||||
if (infoPtr->items[0].pszText)
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->items[0].pszText);
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->items);
|
||||
COMCTL32_Free (infoPtr->items[0].pszText);
|
||||
COMCTL32_Free (infoPtr->items);
|
||||
infoPtr->items = 0;
|
||||
infoPtr->uNumItem = 0;
|
||||
}
|
||||
|
@ -522,11 +521,10 @@ HEADER_DeleteItem (WND *wndPtr, WPARAM32 wParam)
|
|||
TRACE(header, "Complex delete! [iItem=%d]\n", iItem);
|
||||
|
||||
if (infoPtr->items[iItem].pszText)
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->items[iItem].pszText);
|
||||
COMCTL32_Free (infoPtr->items[iItem].pszText);
|
||||
|
||||
infoPtr->uNumItem--;
|
||||
infoPtr->items = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof (HEADER_ITEM) * infoPtr->uNumItem);
|
||||
infoPtr->items = COMCTL32_Alloc (sizeof (HEADER_ITEM) * infoPtr->uNumItem);
|
||||
/* pre delete copy */
|
||||
if (iItem > 0) {
|
||||
memcpy (&infoPtr->items[0], &oldItems[0],
|
||||
|
@ -539,7 +537,7 @@ HEADER_DeleteItem (WND *wndPtr, WPARAM32 wParam)
|
|||
(infoPtr->uNumItem - iItem) * sizeof(HEADER_ITEM));
|
||||
}
|
||||
|
||||
HeapFree (GetProcessHeap (), 0, oldItems);
|
||||
COMCTL32_Free (oldItems);
|
||||
}
|
||||
|
||||
HEADER_SetItemBounds (wndPtr);
|
||||
|
@ -565,60 +563,45 @@ static LRESULT
|
|||
HEADER_GetItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr(wndPtr);
|
||||
HDITEM32A *phdi;
|
||||
INT32 iItem;
|
||||
UINT32 uMask;
|
||||
HDITEM32A *phdi = (HDITEM32A*)lParam;
|
||||
INT32 nItem = (INT32)wParam;
|
||||
HEADER_ITEM *lpItem;
|
||||
|
||||
phdi = (HDITEM32A*)lParam;
|
||||
iItem = (INT32)wParam;
|
||||
|
||||
if (phdi == NULL)
|
||||
if (!phdi)
|
||||
return FALSE;
|
||||
if ((iItem < 0) || (iItem > infoPtr->uNumItem - 1))
|
||||
if ((nItem < 0) || (nItem >= (INT32)infoPtr->uNumItem))
|
||||
return FALSE;
|
||||
|
||||
TRACE (header, "[iItem=%d]\n", iItem);
|
||||
TRACE (header, "[nItem=%d]\n", nItem);
|
||||
|
||||
uMask = phdi->mask;
|
||||
if (uMask == 0)
|
||||
if (phdi->mask == 0)
|
||||
return TRUE;
|
||||
phdi->mask = 0;
|
||||
|
||||
if (uMask & infoPtr->items[iItem].mask & HDI_BITMAP) {
|
||||
phdi->hbm = infoPtr->items[iItem].hbm;
|
||||
phdi->mask |= HDI_BITMAP;
|
||||
lpItem = (HEADER_ITEM*)&infoPtr->items[nItem];
|
||||
if (phdi->mask & HDI_BITMAP)
|
||||
phdi->hbm = lpItem->hbm;
|
||||
|
||||
if (phdi->mask & HDI_FORMAT)
|
||||
phdi->fmt = lpItem->fmt;
|
||||
|
||||
if (phdi->mask & HDI_WIDTH)
|
||||
phdi->cxy = lpItem->cxy;
|
||||
|
||||
if (phdi->mask & HDI_LPARAM)
|
||||
phdi->lParam = lpItem->lParam;
|
||||
|
||||
if (phdi->mask & HDI_TEXT) {
|
||||
if (lpItem->pszText != LPSTR_TEXTCALLBACK32A)
|
||||
lstrcpyn32A (phdi->pszText, lpItem->pszText, phdi->cchTextMax);
|
||||
else
|
||||
phdi->pszText = LPSTR_TEXTCALLBACK32A;
|
||||
}
|
||||
|
||||
if (uMask & infoPtr->items[iItem].mask & HDI_FORMAT) {
|
||||
phdi->fmt = infoPtr->items[iItem].fmt;
|
||||
phdi->mask |= HDI_FORMAT;
|
||||
}
|
||||
if (phdi->mask & HDI_IMAGE)
|
||||
phdi->iImage = lpItem->iImage;
|
||||
|
||||
if (uMask & infoPtr->items[iItem].mask & HDI_WIDTH) {
|
||||
phdi->cxy = infoPtr->items[iItem].cxy;
|
||||
phdi->mask |= HDI_WIDTH;
|
||||
}
|
||||
|
||||
if (uMask & infoPtr->items[iItem].mask & HDI_LPARAM) {
|
||||
phdi->lParam = infoPtr->items[iItem].lParam;
|
||||
phdi->mask |= HDI_LPARAM;
|
||||
}
|
||||
|
||||
if (uMask & infoPtr->items[iItem].mask & HDI_TEXT) {
|
||||
phdi->pszText = infoPtr->items[iItem].pszText;
|
||||
phdi->cchTextMax = infoPtr->items[iItem].cchTextMax;
|
||||
phdi->mask |= HDI_TEXT;
|
||||
}
|
||||
|
||||
if (uMask & infoPtr->items[iItem].mask & HDI_IMAGE) {
|
||||
phdi->iImage = infoPtr->items[iItem].iImage;
|
||||
phdi->mask |= HDI_IMAGE;
|
||||
}
|
||||
|
||||
if (uMask & infoPtr->items[iItem].mask & HDI_ORDER) {
|
||||
phdi->iOrder = infoPtr->items[iItem].iOrder;
|
||||
phdi->mask |= HDI_ORDER;
|
||||
}
|
||||
if (phdi->mask & HDI_ORDER)
|
||||
phdi->iOrder = lpItem->iOrder;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -637,13 +620,10 @@ static LRESULT
|
|||
HEADER_GetItemRect (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr(wndPtr);
|
||||
INT32 iItem;
|
||||
LPRECT32 lpRect;
|
||||
INT32 iItem = (INT32)wParam;
|
||||
LPRECT32 lpRect = (LPRECT32)lParam;
|
||||
|
||||
iItem = (INT32)wParam;
|
||||
lpRect = (LPRECT32)lParam;
|
||||
|
||||
if ((iItem < 0) || (iItem > infoPtr->uNumItem - 1))
|
||||
if ((iItem < 0) || (iItem >= (INT32)infoPtr->uNumItem))
|
||||
return FALSE;
|
||||
|
||||
lpRect->left = infoPtr->items[iItem].rect.left;
|
||||
|
@ -671,69 +651,71 @@ HEADER_InsertItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
{
|
||||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr(wndPtr);
|
||||
HDITEM32A *phdi = (HDITEM32A*)lParam;
|
||||
INT32 iItem = (INT32)wParam;
|
||||
INT32 nItem = (INT32)wParam;
|
||||
HEADER_ITEM *lpItem;
|
||||
HDC32 hdc;
|
||||
INT32 len;
|
||||
|
||||
if (phdi == NULL) return -1;
|
||||
if (iItem < 0) return -1;
|
||||
if (iItem > infoPtr->uNumItem)
|
||||
iItem = infoPtr->uNumItem;
|
||||
if ((phdi == NULL) || (nItem < 0))
|
||||
return -1;
|
||||
|
||||
if (nItem > infoPtr->uNumItem)
|
||||
nItem = infoPtr->uNumItem;
|
||||
|
||||
if (infoPtr->uNumItem == 0) {
|
||||
infoPtr->items = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof (HEADER_ITEM));
|
||||
infoPtr->items = COMCTL32_Alloc (sizeof (HEADER_ITEM));
|
||||
infoPtr->uNumItem++;
|
||||
}
|
||||
else {
|
||||
HEADER_ITEM *oldItems = infoPtr->items;
|
||||
|
||||
infoPtr->uNumItem++;
|
||||
infoPtr->items = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof (HEADER_ITEM) * infoPtr->uNumItem);
|
||||
infoPtr->items = COMCTL32_Alloc (sizeof (HEADER_ITEM) * infoPtr->uNumItem);
|
||||
/* pre insert copy */
|
||||
if (iItem > 0) {
|
||||
if (nItem > 0) {
|
||||
memcpy (&infoPtr->items[0], &oldItems[0],
|
||||
iItem * sizeof(HEADER_ITEM));
|
||||
nItem * sizeof(HEADER_ITEM));
|
||||
}
|
||||
|
||||
/* post insert copy */
|
||||
if (iItem < infoPtr->uNumItem - 1) {
|
||||
memcpy (&infoPtr->items[iItem+1], &oldItems[iItem],
|
||||
(infoPtr->uNumItem - iItem) * sizeof(HEADER_ITEM));
|
||||
if (nItem < infoPtr->uNumItem - 1) {
|
||||
memcpy (&infoPtr->items[nItem+1], &oldItems[nItem],
|
||||
(infoPtr->uNumItem - nItem) * sizeof(HEADER_ITEM));
|
||||
}
|
||||
|
||||
HeapFree (GetProcessHeap (), 0, oldItems);
|
||||
COMCTL32_Free (oldItems);
|
||||
}
|
||||
|
||||
infoPtr->items[iItem].bDown = FALSE;
|
||||
lpItem = (HEADER_ITEM*)&infoPtr->items[nItem];
|
||||
lpItem->bDown = FALSE;
|
||||
|
||||
infoPtr->items[iItem].mask = phdi->mask;
|
||||
if (phdi->mask & HDI_WIDTH)
|
||||
infoPtr->items[iItem].cxy = phdi->cxy;
|
||||
lpItem->cxy = phdi->cxy;
|
||||
|
||||
if (phdi->mask & HDI_TEXT) {
|
||||
if (phdi->pszText != LPSTR_TEXTCALLBACK32A) {
|
||||
len = lstrlen32A (phdi->pszText);
|
||||
infoPtr->items[iItem].pszText =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len+1);
|
||||
lstrcpy32A (infoPtr->items[iItem].pszText, phdi->pszText);
|
||||
infoPtr->items[iItem].cchTextMax = phdi->cchTextMax;
|
||||
lpItem->pszText = COMCTL32_Alloc (len+1);
|
||||
lstrcpy32A (lpItem->pszText, phdi->pszText);
|
||||
}
|
||||
else
|
||||
lpItem->pszText = LPSTR_TEXTCALLBACK32A;
|
||||
}
|
||||
|
||||
if (phdi->mask & HDI_FORMAT)
|
||||
infoPtr->items[iItem].fmt = phdi->fmt;
|
||||
lpItem->fmt = phdi->fmt;
|
||||
|
||||
if (phdi->mask & HDI_BITMAP)
|
||||
infoPtr->items[iItem].hbm = phdi->hbm;
|
||||
lpItem->hbm = phdi->hbm;
|
||||
|
||||
if (phdi->mask & HDI_LPARAM)
|
||||
infoPtr->items[iItem].lParam = phdi->lParam;
|
||||
lpItem->lParam = phdi->lParam;
|
||||
|
||||
if (phdi->mask & HDI_IMAGE)
|
||||
infoPtr->items[iItem].iImage = phdi->iImage;
|
||||
lpItem->iImage = phdi->iImage;
|
||||
|
||||
if (phdi->mask & HDI_ORDER)
|
||||
infoPtr->items[iItem].iOrder = phdi->iOrder;
|
||||
lpItem->iOrder = phdi->iOrder;
|
||||
|
||||
HEADER_SetItemBounds (wndPtr);
|
||||
|
||||
|
@ -741,7 +723,7 @@ HEADER_InsertItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
HEADER_Refresh (wndPtr, hdc);
|
||||
ReleaseDC32 (wndPtr->hwndSelf, hdc);
|
||||
|
||||
return iItem;
|
||||
return nItem;
|
||||
}
|
||||
|
||||
|
||||
|
@ -798,60 +780,52 @@ HEADER_SetItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
{
|
||||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr(wndPtr);
|
||||
HDITEM32A *phdi = (HDITEM32A*)lParam;
|
||||
INT32 iItem = (INT32)wParam;
|
||||
INT32 nItem = (INT32)wParam;
|
||||
HEADER_ITEM *lpItem;
|
||||
HDC32 hdc;
|
||||
|
||||
if (phdi == NULL)
|
||||
return FALSE;
|
||||
if ((iItem < 0) || (iItem > infoPtr->uNumItem - 1))
|
||||
if ((nItem < 0) || (nItem >= (INT32)infoPtr->uNumItem))
|
||||
return FALSE;
|
||||
|
||||
TRACE (header, "[iItem=%d]\n", iItem);
|
||||
TRACE (header, "[nItem=%d]\n", nItem);
|
||||
|
||||
if (HEADER_SendHeaderNotify (wndPtr, HDN_ITEMCHANGING32A, iItem))
|
||||
if (HEADER_SendHeaderNotify (wndPtr, HDN_ITEMCHANGING32A, nItem))
|
||||
return FALSE;
|
||||
|
||||
if (phdi->mask & HDI_BITMAP) {
|
||||
infoPtr->items[iItem].hbm = phdi->hbm;
|
||||
infoPtr->items[iItem].mask |= HDI_BITMAP;
|
||||
}
|
||||
lpItem = (HEADER_ITEM*)&infoPtr->items[nItem];
|
||||
if (phdi->mask & HDI_BITMAP)
|
||||
lpItem->hbm = phdi->hbm;
|
||||
|
||||
if (phdi->mask & HDI_FORMAT) {
|
||||
infoPtr->items[iItem].fmt = phdi->fmt;
|
||||
infoPtr->items[iItem].mask |= HDI_FORMAT;
|
||||
}
|
||||
if (phdi->mask & HDI_FORMAT)
|
||||
lpItem->fmt = phdi->fmt;
|
||||
|
||||
if (phdi->mask & HDI_LPARAM) {
|
||||
infoPtr->items[iItem].lParam = phdi->lParam;
|
||||
infoPtr->items[iItem].mask |= HDI_LPARAM;
|
||||
}
|
||||
if (phdi->mask & HDI_LPARAM)
|
||||
lpItem->lParam = phdi->lParam;
|
||||
|
||||
if (phdi->mask & HDI_TEXT) {
|
||||
if (phdi->pszText != LPSTR_TEXTCALLBACK32A) {
|
||||
INT32 len = lstrlen32A (phdi->pszText);
|
||||
if (infoPtr->items[iItem].pszText)
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->items[iItem].pszText);
|
||||
infoPtr->items[iItem].pszText =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len+1);
|
||||
lstrcpy32A (infoPtr->items[iItem].pszText, phdi->pszText);
|
||||
infoPtr->items[iItem].cchTextMax = phdi->cchTextMax;
|
||||
if (lpItem->pszText)
|
||||
COMCTL32_Free (lpItem->pszText);
|
||||
lpItem->pszText = COMCTL32_Alloc (len+1);
|
||||
lstrcpy32A (lpItem->pszText, phdi->pszText);
|
||||
}
|
||||
else
|
||||
lpItem->pszText = LPSTR_TEXTCALLBACK32A;
|
||||
}
|
||||
|
||||
if (phdi->mask & HDI_WIDTH) {
|
||||
infoPtr->items[iItem].cxy = phdi->cxy;
|
||||
infoPtr->items[iItem].mask |= HDI_WIDTH;
|
||||
}
|
||||
if (phdi->mask & HDI_WIDTH)
|
||||
lpItem->cxy = phdi->cxy;
|
||||
|
||||
if (phdi->mask & HDI_IMAGE) {
|
||||
infoPtr->items[iItem].iImage = phdi->iImage;
|
||||
infoPtr->items[iItem].mask |= HDI_IMAGE;
|
||||
}
|
||||
if (phdi->mask & HDI_IMAGE)
|
||||
lpItem->iImage = phdi->iImage;
|
||||
|
||||
if (phdi->mask & HDI_ORDER) {
|
||||
infoPtr->items[iItem].iOrder = phdi->iOrder;
|
||||
infoPtr->items[iItem].mask |= HDI_ORDER;
|
||||
}
|
||||
if (phdi->mask & HDI_ORDER)
|
||||
lpItem->iOrder = phdi->iOrder;
|
||||
|
||||
HEADER_SendHeaderNotify (wndPtr, HDN_ITEMCHANGED32A, iItem);
|
||||
HEADER_SendHeaderNotify (wndPtr, HDN_ITEMCHANGED32A, nItem);
|
||||
|
||||
HEADER_SetItemBounds (wndPtr);
|
||||
hdc = GetDC32 (wndPtr->hwndSelf);
|
||||
|
@ -870,8 +844,7 @@ HEADER_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
HFONT32 hOldFont;
|
||||
HDC32 hdc;
|
||||
|
||||
infoPtr = (HEADER_INFO *)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof(HEADER_INFO));
|
||||
infoPtr = (HEADER_INFO *)COMCTL32_Alloc (sizeof(HEADER_INFO));
|
||||
wndPtr->wExtra[0] = (DWORD)infoPtr;
|
||||
|
||||
infoPtr->uNumItem = 0;
|
||||
|
@ -902,26 +875,28 @@ static LRESULT
|
|||
HEADER_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr(wndPtr);
|
||||
INT32 iItem;
|
||||
HEADER_ITEM *lpItem;
|
||||
INT32 nItem;
|
||||
|
||||
if (infoPtr->items) {
|
||||
for (iItem = 0; iItem < infoPtr->uNumItem; iItem++) {
|
||||
if (infoPtr->items[iItem].pszText)
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->items[iItem].pszText);
|
||||
lpItem = (HEADER_ITEM*)infoPtr->items;
|
||||
for (nItem = 0; nItem < infoPtr->uNumItem; nItem++, lpItem++) {
|
||||
if ((lpItem->pszText) && (lpItem->pszText != LPSTR_TEXTCALLBACK32A))
|
||||
COMCTL32_Free (lpItem->pszText);
|
||||
}
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->items);
|
||||
COMCTL32_Free (infoPtr->items);
|
||||
}
|
||||
|
||||
if (infoPtr->himl)
|
||||
ImageList_Destroy (infoPtr->himl);
|
||||
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr);
|
||||
COMCTL32_Free (infoPtr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
static __inline__ LRESULT
|
||||
HEADER_GetFont (WND *wndPtr)
|
||||
{
|
||||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr(wndPtr);
|
||||
|
@ -935,16 +910,16 @@ HEADER_LButtonDblClk (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
{
|
||||
POINT32 pt;
|
||||
UINT32 flags;
|
||||
INT32 iItem;
|
||||
INT32 nItem;
|
||||
|
||||
pt.x = (INT32)LOWORD(lParam);
|
||||
pt.y = (INT32)HIWORD(lParam);
|
||||
HEADER_InternalHitTest (wndPtr, &pt, &flags, &iItem);
|
||||
HEADER_InternalHitTest (wndPtr, &pt, &flags, &nItem);
|
||||
|
||||
if ((wndPtr->dwStyle & HDS_BUTTONS) && (flags == HHT_ONHEADER))
|
||||
HEADER_SendHeaderNotify (wndPtr, HDN_ITEMDBLCLICK32A, iItem);
|
||||
HEADER_SendHeaderNotify (wndPtr, HDN_ITEMDBLCLICK32A, nItem);
|
||||
else if ((flags == HHT_ONDIVIDER) || (flags == HHT_ONDIVOPEN))
|
||||
HEADER_SendHeaderNotify (wndPtr, HDN_DIVIDERDBLCLICK32A, iItem);
|
||||
HEADER_SendHeaderNotify (wndPtr, HDN_DIVIDERDBLCLICK32A, nItem);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -956,45 +931,45 @@ HEADER_LButtonDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr(wndPtr);
|
||||
POINT32 pt;
|
||||
UINT32 flags;
|
||||
INT32 iItem;
|
||||
INT32 nItem;
|
||||
HDC32 hdc;
|
||||
|
||||
pt.x = (INT32)LOWORD(lParam);
|
||||
pt.y = (INT32)HIWORD(lParam);
|
||||
HEADER_InternalHitTest (wndPtr, &pt, &flags, &iItem);
|
||||
HEADER_InternalHitTest (wndPtr, &pt, &flags, &nItem);
|
||||
|
||||
if ((wndPtr->dwStyle & HDS_BUTTONS) && (flags == HHT_ONHEADER)) {
|
||||
SetCapture32 (wndPtr->hwndSelf);
|
||||
infoPtr->bCaptured = TRUE;
|
||||
infoPtr->bPressed = TRUE;
|
||||
infoPtr->iMoveItem = iItem;
|
||||
infoPtr->iMoveItem = nItem;
|
||||
|
||||
infoPtr->items[iItem].bDown = TRUE;
|
||||
infoPtr->items[nItem].bDown = TRUE;
|
||||
|
||||
/* Send WM_CUSTOMDRAW */
|
||||
hdc = GetDC32 (wndPtr->hwndSelf);
|
||||
HEADER_RefreshItem (wndPtr, hdc, iItem);
|
||||
HEADER_RefreshItem (wndPtr, hdc, nItem);
|
||||
ReleaseDC32 (wndPtr->hwndSelf, hdc);
|
||||
|
||||
TRACE (header, "Pressed item %d!\n", iItem);
|
||||
TRACE (header, "Pressed item %d!\n", nItem);
|
||||
}
|
||||
else if ((flags == HHT_ONDIVIDER) || (flags == HHT_ONDIVOPEN)) {
|
||||
if (!(HEADER_SendHeaderNotify (wndPtr, HDN_BEGINTRACK32A, iItem))) {
|
||||
if (!(HEADER_SendHeaderNotify (wndPtr, HDN_BEGINTRACK32A, nItem))) {
|
||||
SetCapture32 (wndPtr->hwndSelf);
|
||||
infoPtr->bCaptured = TRUE;
|
||||
infoPtr->bTracking = TRUE;
|
||||
infoPtr->iMoveItem = iItem;
|
||||
infoPtr->nOldWidth = infoPtr->items[iItem].cxy;
|
||||
infoPtr->xTrackOffset = infoPtr->items[iItem].rect.right - pt.x;
|
||||
infoPtr->iMoveItem = nItem;
|
||||
infoPtr->nOldWidth = infoPtr->items[nItem].cxy;
|
||||
infoPtr->xTrackOffset = infoPtr->items[nItem].rect.right - pt.x;
|
||||
|
||||
if (!(wndPtr->dwStyle & HDS_FULLDRAG)) {
|
||||
infoPtr->xOldTrack = infoPtr->items[iItem].rect.right;
|
||||
infoPtr->xOldTrack = infoPtr->items[nItem].rect.right;
|
||||
hdc = GetDC32 (wndPtr->hwndSelf);
|
||||
HEADER_DrawTrackLine (wndPtr, hdc, infoPtr->xOldTrack);
|
||||
ReleaseDC32 (wndPtr->hwndSelf, hdc);
|
||||
}
|
||||
|
||||
TRACE (header, "Begin tracking item %d!\n", iItem);
|
||||
TRACE (header, "Begin tracking item %d!\n", nItem);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1008,15 +983,15 @@ HEADER_LButtonUp (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr(wndPtr);
|
||||
POINT32 pt;
|
||||
UINT32 flags;
|
||||
INT32 iItem, nWidth;
|
||||
INT32 nItem, nWidth;
|
||||
HDC32 hdc;
|
||||
|
||||
pt.x = (INT32)LOWORD(lParam);
|
||||
pt.y = (INT32)HIWORD(lParam);
|
||||
HEADER_InternalHitTest (wndPtr, &pt, &flags, &iItem);
|
||||
HEADER_InternalHitTest (wndPtr, &pt, &flags, &nItem);
|
||||
|
||||
if (infoPtr->bPressed) {
|
||||
if ((iItem == infoPtr->iMoveItem) && (flags == HHT_ONHEADER)) {
|
||||
if ((nItem == infoPtr->iMoveItem) && (flags == HHT_ONHEADER)) {
|
||||
infoPtr->items[infoPtr->iMoveItem].bDown = FALSE;
|
||||
hdc = GetDC32 (wndPtr->hwndSelf);
|
||||
HEADER_RefreshItem (wndPtr, hdc, infoPtr->iMoveItem);
|
||||
|
@ -1040,8 +1015,7 @@ HEADER_LButtonUp (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
if (HEADER_SendHeaderNotify (wndPtr, HDN_ITEMCHANGING32A, infoPtr->iMoveItem))
|
||||
infoPtr->items[infoPtr->iMoveItem].cxy = infoPtr->nOldWidth;
|
||||
else {
|
||||
nWidth = pt.x - infoPtr->items[infoPtr->iMoveItem].rect.left +
|
||||
infoPtr->xTrackOffset;
|
||||
nWidth = pt.x - infoPtr->items[infoPtr->iMoveItem].rect.left + infoPtr->xTrackOffset;
|
||||
if (nWidth < 0)
|
||||
nWidth = 0;
|
||||
infoPtr->items[infoPtr->iMoveItem].cxy = nWidth;
|
||||
|
@ -1071,16 +1045,16 @@ HEADER_MouseMove (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr(wndPtr);
|
||||
POINT32 pt;
|
||||
UINT32 flags;
|
||||
INT32 iItem, nWidth;
|
||||
INT32 nItem, nWidth;
|
||||
HDC32 hdc;
|
||||
|
||||
pt.x = (INT32)LOWORD(lParam);
|
||||
pt.y = (INT32)HIWORD(lParam);
|
||||
HEADER_InternalHitTest (wndPtr, &pt, &flags, &iItem);
|
||||
HEADER_InternalHitTest (wndPtr, &pt, &flags, &nItem);
|
||||
|
||||
if ((wndPtr->dwStyle & HDS_BUTTONS) && (wndPtr->dwStyle & HDS_HOTTRACK)) {
|
||||
if (flags & (HHT_ONHEADER | HHT_ONDIVIDER | HHT_ONDIVOPEN))
|
||||
infoPtr->iHotItem = iItem;
|
||||
infoPtr->iHotItem = nItem;
|
||||
else
|
||||
infoPtr->iHotItem = -1;
|
||||
hdc = GetDC32 (wndPtr->hwndSelf);
|
||||
|
@ -1090,7 +1064,7 @@ HEADER_MouseMove (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
if (infoPtr->bCaptured) {
|
||||
if (infoPtr->bPressed) {
|
||||
if ((iItem == infoPtr->iMoveItem) && (flags == HHT_ONHEADER))
|
||||
if ((nItem == infoPtr->iMoveItem) && (flags == HHT_ONHEADER))
|
||||
infoPtr->items[infoPtr->iMoveItem].bDown = TRUE;
|
||||
else
|
||||
infoPtr->items[infoPtr->iMoveItem].bDown = FALSE;
|
||||
|
@ -1105,8 +1079,7 @@ HEADER_MouseMove (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
if (HEADER_SendHeaderNotify (wndPtr, HDN_ITEMCHANGING32A, infoPtr->iMoveItem))
|
||||
infoPtr->items[infoPtr->iMoveItem].cxy = infoPtr->nOldWidth;
|
||||
else {
|
||||
nWidth = pt.x - infoPtr->items[infoPtr->iMoveItem].rect.left +
|
||||
infoPtr->xTrackOffset;
|
||||
nWidth = pt.x - infoPtr->items[infoPtr->iMoveItem].rect.left + infoPtr->xTrackOffset;
|
||||
if (nWidth < 0)
|
||||
nWidth = 0;
|
||||
infoPtr->items[infoPtr->iMoveItem].cxy = nWidth;
|
||||
|
@ -1170,14 +1143,14 @@ HEADER_SetCursor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr(wndPtr);
|
||||
POINT32 pt;
|
||||
UINT32 flags;
|
||||
INT32 iItem;
|
||||
INT32 nItem;
|
||||
|
||||
TRACE (header, "code=0x%X id=0x%X\n", LOWORD(lParam), HIWORD(lParam));
|
||||
|
||||
GetCursorPos32 (&pt);
|
||||
ScreenToClient32 (wndPtr->hwndSelf, &pt);
|
||||
|
||||
HEADER_InternalHitTest (wndPtr, &pt, &flags, &iItem);
|
||||
HEADER_InternalHitTest (wndPtr, &pt, &flags, &nItem);
|
||||
|
||||
if (flags == HHT_ONDIVIDER)
|
||||
SetCursor32 (infoPtr->hcurDivider);
|
||||
|
@ -1238,18 +1211,25 @@ HEADER_WindowProc (HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam)
|
|||
case HDM_GETITEM32A:
|
||||
return HEADER_GetItem32A (wndPtr, wParam, lParam);
|
||||
|
||||
// case HDM_GETITEM32W:
|
||||
|
||||
case HDM_GETITEMCOUNT:
|
||||
return HEADER_GetItemCount (wndPtr);
|
||||
|
||||
case HDM_GETITEMRECT:
|
||||
return HEADER_GetItemRect (wndPtr, wParam, lParam);
|
||||
|
||||
// case HDM_GETORDERARRAY:
|
||||
// case HDM_GETUNICODEFORMAT:
|
||||
|
||||
case HDM_HITTEST:
|
||||
return HEADER_HitTest (wndPtr, wParam, lParam);
|
||||
|
||||
case HDM_INSERTITEM32A:
|
||||
return HEADER_InsertItem32A (wndPtr, wParam, lParam);
|
||||
|
||||
// case HDM_INSERTITEM32W:
|
||||
|
||||
case HDM_LAYOUT:
|
||||
return HEADER_Layout (wndPtr, wParam, lParam);
|
||||
|
||||
|
@ -1259,6 +1239,10 @@ HEADER_WindowProc (HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam)
|
|||
case HDM_SETITEM32A:
|
||||
return HEADER_SetItem32A (wndPtr, wParam, lParam);
|
||||
|
||||
// case HDM_SETITEM32W:
|
||||
// case HDM_SETORDERARRAY:
|
||||
// case HDM_SETUNICODEFORMAT:
|
||||
|
||||
|
||||
case WM_CREATE:
|
||||
return HEADER_Create (wndPtr, wParam, lParam);
|
||||
|
|
|
@ -5,9 +5,7 @@
|
|||
*
|
||||
* TODO:
|
||||
* - Fix xBitmap and yBitmap in ImageList_DrawIndirect.
|
||||
* - Fix ILD_TRANSPARENT error in ImageList_DrawIndirect.
|
||||
* - Fix ImageList_GetIcon (might be a result of the
|
||||
* ILD_TRANSPARENT error in ImageList_DrawIndirect).
|
||||
* - Fix ImageList_GetIcon.
|
||||
* - Fix drag functions.
|
||||
* - Fix ImageList_Read and ImageList_Write.
|
||||
* - Fix ImageList_SetFilter (undocumented).
|
||||
|
@ -146,11 +144,11 @@ ImageList_Add (HIMAGELIST himl, HBITMAP32 hbmImage, HBITMAP32 hbmMask)
|
|||
{
|
||||
HDC32 hdcSrc, hdcDst;
|
||||
INT32 nFirstIndex, nImageCount;
|
||||
INT32 nStartX, nRunX, nRunY;
|
||||
INT32 nStartX;
|
||||
BITMAP32 bmp;
|
||||
|
||||
if (himl == NULL) return (-1);
|
||||
if (hbmImage == 0) return (-1);
|
||||
if (!himl || !hbmImage)
|
||||
return -1;
|
||||
|
||||
GetObject32A (hbmImage, sizeof(BITMAP32), (LPVOID)&bmp);
|
||||
nImageCount = bmp.bmWidth / himl->cx;
|
||||
|
@ -158,56 +156,33 @@ ImageList_Add (HIMAGELIST himl, HBITMAP32 hbmImage, HBITMAP32 hbmMask)
|
|||
if (himl->cCurImage + nImageCount >= himl->cMaxImage)
|
||||
IMAGELIST_InternalExpandBitmaps (himl, nImageCount);
|
||||
|
||||
nStartX = himl->cCurImage * himl->cx;
|
||||
|
||||
hdcSrc = CreateCompatibleDC32 (0);
|
||||
hdcDst = CreateCompatibleDC32 (0);
|
||||
|
||||
/* copy image bitmap */
|
||||
SelectObject32 (hdcDst, himl->hbmImage);
|
||||
SelectObject32 (hdcSrc, hbmImage);
|
||||
|
||||
BitBlt32 (hdcDst, himl->cCurImage * himl->cx, 0,
|
||||
bmp.bmWidth, himl->cy, hdcSrc, 0, 0, SRCCOPY);
|
||||
|
||||
if (himl->hbmMask) {
|
||||
if (hbmMask) {
|
||||
/* copy mask bitmap */
|
||||
SelectObject32 (hdcDst, himl->hbmMask);
|
||||
SelectObject32 (hdcSrc, hbmMask);
|
||||
BitBlt32 (hdcDst, himl->cCurImage * himl->cx, 0,
|
||||
bmp.bmWidth, himl->cy, hdcSrc, 0, 0, SRCCOPY);
|
||||
|
||||
/* fix transparent areas of the image bitmap*/
|
||||
SelectObject32 (hdcSrc, himl->hbmMask);
|
||||
SelectObject32 (hdcDst, himl->hbmImage);
|
||||
nStartX = himl->cCurImage * himl->cx;
|
||||
|
||||
for (nRunY = 0; nRunY < himl->cy; nRunY++) {
|
||||
for (nRunX = 0; nRunX < bmp.bmWidth; nRunX++) {
|
||||
if (GetPixel32 (hdcSrc, nStartX + nRunX, nRunY) !=
|
||||
RGB(0, 0, 0))
|
||||
SetPixel32 (hdcDst, nStartX + nRunX, nRunY,
|
||||
RGB(0, 0, 0));
|
||||
}
|
||||
}
|
||||
BitBlt32 (hdcDst, nStartX, 0, bmp.bmWidth, himl->cy,
|
||||
hdcSrc, 0, 0, SRCCOPY);
|
||||
}
|
||||
else {
|
||||
/* create mask from the imagelist's background color */
|
||||
/* copy monochrome image to the mask bitmap */
|
||||
SelectObject32 (hdcDst, himl->hbmMask);
|
||||
SelectObject32 (hdcSrc, himl->hbmImage);
|
||||
nStartX = himl->cCurImage * himl->cx;
|
||||
for (nRunY = 0; nRunY < himl->cy; nRunY++) {
|
||||
for (nRunX = 0; nRunX < bmp.bmWidth; nRunX++) {
|
||||
if (GetPixel32 (hdcSrc, nStartX + nRunX, nRunY) ==
|
||||
himl->clrBk)
|
||||
{
|
||||
SetPixel32 (hdcSrc, nStartX + nRunX, nRunY,
|
||||
RGB(0, 0, 0));
|
||||
SetPixel32 (hdcDst, nStartX + nRunX, nRunY,
|
||||
RGB(255, 255, 255));
|
||||
}
|
||||
else
|
||||
SetPixel32 (hdcDst, nStartX + nRunX, nRunY,
|
||||
RGB(0, 0, 0));
|
||||
}
|
||||
}
|
||||
SelectObject32 (hdcSrc, hbmImage);
|
||||
SetBkColor32 (hdcSrc, GetNearestColor32 (hdcSrc,
|
||||
GetPixel32 (hdcSrc, 0, 0)));
|
||||
BitBlt32 (hdcDst, nStartX, 0, bmp.bmWidth, himl->cy,
|
||||
hdcSrc, nStartX, 0, SRCCOPY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,7 +192,7 @@ ImageList_Add (HIMAGELIST himl, HBITMAP32 hbmImage, HBITMAP32 hbmMask)
|
|||
nFirstIndex = himl->cCurImage;
|
||||
himl->cCurImage += nImageCount;
|
||||
|
||||
return (nFirstIndex);
|
||||
return nFirstIndex;
|
||||
}
|
||||
|
||||
|
||||
|
@ -249,8 +224,8 @@ ImageList_AddIcon (HIMAGELIST himl, HICON32 hIcon)
|
|||
* specified bitmap using the mask color.
|
||||
*
|
||||
* PARAMS
|
||||
* himl [I] image list handle.
|
||||
* hbmImage [I] image bitmap handle.
|
||||
* himl [I] handle to image list.
|
||||
* hBitmap [I] handle to bitmap
|
||||
* clrMask [I] mask color.
|
||||
*
|
||||
* RETURNS
|
||||
|
@ -259,20 +234,18 @@ ImageList_AddIcon (HIMAGELIST himl, HICON32 hIcon)
|
|||
*/
|
||||
|
||||
INT32 WINAPI
|
||||
ImageList_AddMasked (HIMAGELIST himl, HBITMAP32 hbmImage, COLORREF clrMask)
|
||||
ImageList_AddMasked (HIMAGELIST himl, HBITMAP32 hBitmap, COLORREF clrMask)
|
||||
{
|
||||
HDC32 hdcImageList, hdcImage, hdcMask;
|
||||
HDC32 hdcImage, hdcMask, hdcBitmap;
|
||||
INT32 nIndex, nImageCount;
|
||||
BITMAP32 bmp;
|
||||
INT32 nStartX, nRunX, nRunY;
|
||||
COLORREF bkColor;
|
||||
|
||||
if (himl == NULL)
|
||||
return (-1);
|
||||
return -1;
|
||||
|
||||
bkColor = (clrMask == CLR_NONE) ? himl->clrBk : clrMask;
|
||||
if (!GetObject32A (hBitmap, sizeof(BITMAP32), &bmp))
|
||||
return -1;
|
||||
|
||||
GetObject32A (hbmImage, sizeof(BITMAP32), &bmp);
|
||||
nImageCount = bmp.bmWidth / himl->cx;
|
||||
|
||||
if (himl->cCurImage + nImageCount >= himl->cMaxImage)
|
||||
|
@ -281,39 +254,34 @@ ImageList_AddMasked (HIMAGELIST himl, HBITMAP32 hbmImage, COLORREF clrMask)
|
|||
nIndex = himl->cCurImage;
|
||||
himl->cCurImage += nImageCount;
|
||||
|
||||
hdcImageList = CreateCompatibleDC32 (0);
|
||||
hdcImage = CreateCompatibleDC32 (0);
|
||||
hdcBitmap = CreateCompatibleDC32 (0);
|
||||
|
||||
SelectObject32 (hdcImageList, himl->hbmImage);
|
||||
SelectObject32 (hdcImage, hbmImage);
|
||||
BitBlt32 (hdcImageList, nIndex * himl->cx, 0, bmp.bmWidth, himl->cy,
|
||||
hdcImage, 0, 0, SRCCOPY);
|
||||
SelectObject32 (hdcBitmap, hBitmap);
|
||||
SelectObject32 (hdcImage, himl->hbmImage);
|
||||
BitBlt32 (hdcImage, nIndex * himl->cx, 0, bmp.bmWidth, himl->cy,
|
||||
hdcBitmap, 0, 0, SRCCOPY);
|
||||
|
||||
if (himl->hbmMask) {
|
||||
/* create Mask */
|
||||
COLORREF bkColor = (clrMask != CLR_DEFAULT) ? clrMask :
|
||||
GetNearestColor32 (hdcBitmap, GetPixel32 (hdcBitmap, 0, 0));
|
||||
|
||||
/* create mask from image */
|
||||
hdcMask = CreateCompatibleDC32 (0);
|
||||
SelectObject32 (hdcMask, himl->hbmMask);
|
||||
nStartX = nIndex * himl->cx;
|
||||
for (nRunY = 0; nRunY < himl->cy; nRunY++) {
|
||||
for (nRunX = 0; nRunX < bmp.bmWidth; nRunX++) {
|
||||
if (GetPixel32 (hdcImageList, nStartX + nRunX, nRunY) ==
|
||||
bkColor) {
|
||||
SetPixel32 (hdcImageList, nStartX + nRunX, nRunY,
|
||||
RGB(0, 0, 0));
|
||||
SetPixel32 (hdcMask, nStartX + nRunX, nRunY,
|
||||
RGB(255, 255, 255));
|
||||
}
|
||||
else
|
||||
SetPixel32 (hdcMask, nStartX + nRunX, nRunY, RGB(0, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
/* create monochrome image to the mask bitmap */
|
||||
SetBkColor32 (hdcBitmap, bkColor);
|
||||
BitBlt32 (hdcMask, nIndex * himl->cx, 0, bmp.bmWidth, himl->cy,
|
||||
hdcBitmap, 0, 0, SRCCOPY);
|
||||
|
||||
DeleteDC32 (hdcMask);
|
||||
}
|
||||
|
||||
DeleteDC32 (hdcImageList);
|
||||
DeleteDC32 (hdcImage);
|
||||
DeleteDC32 (hdcBitmap);
|
||||
|
||||
return (nIndex);
|
||||
return nIndex;
|
||||
}
|
||||
|
||||
|
||||
|
@ -969,6 +937,8 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp)
|
|||
{
|
||||
/* draw the mask */
|
||||
SelectObject32 (hdcImageList, himlLocal->hbmMask);
|
||||
SetBkColor32 (hdcImageList, RGB(255, 255, 255));
|
||||
SetTextColor32 (hdcImageList, RGB(0, 0, 0));
|
||||
BitBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y, cx, cy,
|
||||
hdcImageList, himlLocal->cx * pimldp->i, 0,
|
||||
bMaskTrans ? SRCAND : SRCCOPY);
|
||||
|
@ -989,8 +959,7 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp)
|
|||
}
|
||||
|
||||
BitBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y, cx, cy,
|
||||
hdcImageList, himlLocal->cx * pimldp->i, 0,
|
||||
SRCPAINT);
|
||||
hdcImageList, himlLocal->cx * pimldp->i, 0, SRCPAINT);
|
||||
|
||||
if (bBlend25 || bBlend50)
|
||||
{
|
||||
|
@ -1225,7 +1194,7 @@ ImageList_GetIcon (HIMAGELIST himl, INT32 i, UINT32 fStyle)
|
|||
{
|
||||
ICONINFO ii;
|
||||
HICON32 hIcon;
|
||||
HDC32 hdc;
|
||||
HDC32 hdcSrc, hdcDst;
|
||||
INT32 nWidth, nHeight;
|
||||
|
||||
if (himl == NULL) return 0;
|
||||
|
@ -1234,27 +1203,36 @@ ImageList_GetIcon (HIMAGELIST himl, INT32 i, UINT32 fStyle)
|
|||
nWidth = GetSystemMetrics32 (SM_CXICON);
|
||||
nHeight = GetSystemMetrics32 (SM_CYICON);
|
||||
|
||||
hdcSrc = CreateCompatibleDC32(0);
|
||||
hdcDst = CreateCompatibleDC32(0);
|
||||
|
||||
ii.fIcon = TRUE;
|
||||
ii.xHotspot = 0;
|
||||
ii.yHotspot = 0;
|
||||
ii.hbmMask = CreateBitmap32 (nWidth, nHeight, 1, 1, NULL);
|
||||
ii.hbmColor = CreateBitmap32 (nWidth, nHeight, 1, himl->uBitsPixel, NULL);
|
||||
ii.hbmMask = CreateCompatibleBitmap32 (hdcDst, nWidth, nHeight);
|
||||
ii.hbmColor = CreateCompatibleBitmap32 (hdcDst, nWidth, nHeight);
|
||||
|
||||
hdc = CreateCompatibleDC32(0);
|
||||
|
||||
/* draw image*/
|
||||
SelectObject32 (hdc, ii.hbmColor);
|
||||
PatBlt32 (hdc, 0, 0, nWidth, nHeight, BLACKNESS);
|
||||
ImageList_Draw (himl, i, hdc, 0, 0, fStyle | ILD_TRANSPARENT);
|
||||
|
||||
/* draw mask*/
|
||||
SelectObject32 (hdc, ii.hbmMask);
|
||||
PatBlt32 (hdc, 0, 0, nWidth, nHeight, WHITENESS);
|
||||
ImageList_Draw (himl, i, hdc, 0, 0, fStyle | ILD_MASK);
|
||||
SelectObject32 (hdcDst, ii.hbmMask);
|
||||
if (himl->hbmMask) {
|
||||
SelectObject32 (hdcSrc, himl->hbmMask);
|
||||
BitBlt32 (hdcDst, 0, 0, nWidth, nHeight,
|
||||
hdcSrc, i * himl->cx, 0, SRCCOPY);
|
||||
}
|
||||
else
|
||||
PatBlt32 (hdcDst, 0, 0, nWidth, nHeight, BLACKNESS);
|
||||
|
||||
/* draw image*/
|
||||
SelectObject32 (hdcDst, ii.hbmColor);
|
||||
SelectObject32 (hdcSrc, himl->hbmImage);
|
||||
BitBlt32 (hdcDst, 0, 0, nWidth, nHeight,
|
||||
hdcSrc, i * himl->cx, 0, SRCCOPY);
|
||||
|
||||
hIcon = CreateIconIndirect (&ii);
|
||||
|
||||
DeleteDC32 (hdc);
|
||||
DeleteDC32 (hdcSrc);
|
||||
DeleteDC32 (hdcDst);
|
||||
DeleteObject32 (ii.hbmMask);
|
||||
DeleteObject32 (ii.hbmColor);
|
||||
|
||||
|
@ -2040,7 +2018,7 @@ ImageList_SetFilter (HIMAGELIST himl, INT32 i, DWORD dwFilter)
|
|||
* Sets the image size of the bitmap and deletes all images.
|
||||
*
|
||||
* PARAMS
|
||||
* himl [I] image list handle
|
||||
* himl [I] handle to image list
|
||||
* cx [I] image width
|
||||
* cy [I] image height
|
||||
*
|
||||
|
@ -2054,7 +2032,8 @@ ImageList_SetIconSize (HIMAGELIST himl, INT32 cx, INT32 cy)
|
|||
{
|
||||
INT32 nCount;
|
||||
|
||||
if (himl == NULL) return (FALSE);
|
||||
if (!himl)
|
||||
return FALSE;
|
||||
|
||||
/* remove all images*/
|
||||
himl->cMaxImage = himl->cInitial + himl->cGrow;
|
||||
|
@ -2088,7 +2067,7 @@ ImageList_SetIconSize (HIMAGELIST himl, INT32 cx, INT32 cy)
|
|||
* Resizes an image list to the specified number of images.
|
||||
*
|
||||
* PARAMS
|
||||
* himl [I] image list handle
|
||||
* himl [I] handle to image list
|
||||
* iImageCount [I] number of images in the image list
|
||||
*
|
||||
* RETURNS
|
||||
|
@ -2103,9 +2082,12 @@ ImageList_SetImageCount (HIMAGELIST himl, INT32 iImageCount)
|
|||
HBITMAP32 hbmNewBitmap;
|
||||
INT32 nNewCount, nCopyCount;
|
||||
|
||||
if (himl == NULL) return (FALSE);
|
||||
if (himl->cCurImage <= iImageCount) return (FALSE);
|
||||
if (himl->cMaxImage > iImageCount) return (TRUE);
|
||||
if (!himl)
|
||||
return FALSE;
|
||||
if (himl->cCurImage <= iImageCount)
|
||||
return FALSE;
|
||||
if (himl->cMaxImage > iImageCount)
|
||||
return TRUE;
|
||||
|
||||
nNewCount = iImageCount + himl->cGrow;
|
||||
nCopyCount = _MIN(himl->cCurImage, iImageCount);
|
||||
|
@ -2126,7 +2108,7 @@ ImageList_SetImageCount (HIMAGELIST himl, INT32 iImageCount)
|
|||
}
|
||||
else
|
||||
{
|
||||
WARN (imagelist, "Could not create new image bitmap !\n");
|
||||
ERR (imagelist, "Could not create new image bitmap !\n");
|
||||
}
|
||||
|
||||
if (himl->hbmMask)
|
||||
|
@ -2144,7 +2126,7 @@ ImageList_SetImageCount (HIMAGELIST himl, INT32 iImageCount)
|
|||
}
|
||||
else
|
||||
{
|
||||
WARN (imagelist, "Could not create new mask bitmap!\n");
|
||||
ERR (imagelist, "Could not create new mask bitmap!\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2156,7 +2138,7 @@ ImageList_SetImageCount (HIMAGELIST himl, INT32 iImageCount)
|
|||
if (himl->cCurImage > nCopyCount)
|
||||
himl->cCurImage = nCopyCount;
|
||||
|
||||
return (TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2178,8 +2160,12 @@ ImageList_SetImageCount (HIMAGELIST himl, INT32 iImageCount)
|
|||
BOOL32 WINAPI
|
||||
ImageList_SetOverlayImage (HIMAGELIST himl, INT32 iImage, INT32 iOverlay)
|
||||
{
|
||||
if ((iOverlay < 1) || (iOverlay > MAX_OVERLAYIMAGE)) return (FALSE);
|
||||
if ((iImage < 0) || (iImage > himl->cCurImage)) return (FALSE);
|
||||
if (!himl)
|
||||
return FALSE;
|
||||
if ((iOverlay < 1) || (iOverlay > MAX_OVERLAYIMAGE))
|
||||
return FALSE;
|
||||
if ((iImage < 0) || (iImage > himl->cCurImage))
|
||||
return FALSE;
|
||||
|
||||
himl->nOvlIdx[iOverlay - 1] = iImage;
|
||||
return TRUE;
|
||||
|
@ -2210,9 +2196,10 @@ ImageList_SetOverlayImage (HIMAGELIST himl, INT32 iImage, INT32 iOverlay)
|
|||
BOOL32 WINAPI
|
||||
ImageList_Write (HIMAGELIST himl, LPSTREAM32 pstm)
|
||||
{
|
||||
FIXME (imagelist, "empty stub!\n");
|
||||
if (!himl)
|
||||
return FALSE;
|
||||
|
||||
if (himl == NULL) return (FALSE);
|
||||
FIXME (imagelist, "empty stub!\n");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -169,7 +169,7 @@ PAGER_SetChild (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
SetParent32 (infoPtr->hwndChild, wndPtr->hwndSelf);
|
||||
SetWindowPos32 (infoPtr->hwndChild, wndPtr->hwndSelf,
|
||||
0, 0, 40, 40, SWP_SHOWWINDOW);
|
||||
RedrawWindow32 (wndPtr->hwndSelf, NULL, 0, RDW_INVALIDATE);
|
||||
RedrawWindow32 (wndPtr->hwndSelf, NULL, NULL, RDW_INVALIDATE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -8,9 +8,8 @@
|
|||
*/
|
||||
|
||||
#include "windows.h"
|
||||
#include "progress.h"
|
||||
#include "commctrl.h"
|
||||
#include "heap.h"
|
||||
#include "progress.h"
|
||||
#include "win.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -185,8 +184,7 @@ LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message,
|
|||
case WM_CREATE:
|
||||
/* allocate memory for info struct */
|
||||
infoPtr =
|
||||
(PROGRESS_INFO *)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof(PROGRESS_INFO));
|
||||
(PROGRESS_INFO *)COMCTL32_Alloc (sizeof(PROGRESS_INFO));
|
||||
wndPtr->wExtra[0] = (DWORD)infoPtr;
|
||||
|
||||
/* initialize the info struct */
|
||||
|
@ -201,7 +199,7 @@ LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message,
|
|||
|
||||
case WM_DESTROY:
|
||||
TRACE (progress, "Progress Ctrl destruction, hwnd=%04x\n", hwnd);
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr);
|
||||
COMCTL32_Free (infoPtr);
|
||||
break;
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
|
@ -333,6 +331,7 @@ LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message,
|
|||
* Registers the progress bar window class.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
PROGRESS_Register(void)
|
||||
{
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "windows.h"
|
||||
#include "commctrl.h"
|
||||
#include "rebar.h"
|
||||
#include "heap.h"
|
||||
#include "win.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -42,10 +41,24 @@ REBAR_Refresh (WND *wndPtr, HDC32 hdc)
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
// << REBAR_BeginDrag >>
|
||||
// << REBAR_DeleteBand >>
|
||||
|
||||
|
||||
static LRESULT
|
||||
REBAR_DeleteBand (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
REBAR_INFO *infoPtr = REBAR_GetInfoPtr (wndPtr);
|
||||
UINT32 uBand = (UINT32)wParam;
|
||||
|
||||
if (uBand >= infoPtr->uNumBands)
|
||||
return FALSE;
|
||||
|
||||
FIXME (rebar, "deleting band %u!\n", uBand);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// << REBAR_DragMove >>
|
||||
// << REBAR_EndDrag >>
|
||||
// << REBAR_GetBandBorders >>
|
||||
|
@ -246,16 +259,13 @@ REBAR_InsertBand32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
TRACE (rebar, "insert band at %u!\n", uIndex);
|
||||
|
||||
if (infoPtr->uNumBands == 0) {
|
||||
infoPtr->bands =
|
||||
(REBAR_BAND *)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof (REBAR_BAND));
|
||||
infoPtr->bands = (REBAR_BAND *)COMCTL32_Alloc (sizeof (REBAR_BAND));
|
||||
uIndex = 0;
|
||||
}
|
||||
else {
|
||||
REBAR_BAND *oldBands = infoPtr->bands;
|
||||
infoPtr->bands =
|
||||
(REBAR_BAND *)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
(infoPtr->uNumBands+1)*sizeof(REBAR_BAND));
|
||||
(REBAR_BAND *)COMCTL32_Alloc ((infoPtr->uNumBands+1)*sizeof(REBAR_BAND));
|
||||
if (((INT32)uIndex == -1) || (uIndex > infoPtr->uNumBands))
|
||||
uIndex = infoPtr->uNumBands;
|
||||
|
||||
|
@ -271,7 +281,7 @@ REBAR_InsertBand32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
(infoPtr->uNumBands - uIndex - 1) * sizeof(REBAR_BAND));
|
||||
}
|
||||
|
||||
HeapFree (GetProcessHeap (), 0, &oldBands);
|
||||
COMCTL32_Free (&oldBands);
|
||||
}
|
||||
|
||||
infoPtr->uNumBands++;
|
||||
|
@ -292,8 +302,7 @@ REBAR_InsertBand32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
if ((lprbbi->fMask & RBBIM_TEXT) && (lprbbi->lpText)) {
|
||||
INT32 len = lstrlen32A (lprbbi->lpText);
|
||||
if (len > 0) {
|
||||
lpBand->lpText =
|
||||
(LPSTR)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len + 1);
|
||||
lpBand->lpText = (LPSTR)COMCTL32_Alloc (len + 1);
|
||||
lstrcpy32A (lpBand->lpText, lprbbi->lpText);
|
||||
}
|
||||
}
|
||||
|
@ -377,8 +386,7 @@ REBAR_SetBandInfo32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
/*
|
||||
INT32 len = lstrlen32A (lprbbi->lpText);
|
||||
if (len > 0) {
|
||||
lpBand->lpText =
|
||||
(LPSTR)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len + 1);
|
||||
lpBand->lpText = (LPSTR)COMCTL32_Alloc (len + 1);
|
||||
lstrcpy32A (lpBand->lpText, lprbbi->lpText);
|
||||
}
|
||||
*/
|
||||
|
@ -566,13 +574,13 @@ REBAR_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
/* delete text strings */
|
||||
if (lpBand->lpText) {
|
||||
HeapFree (GetProcessHeap (), 0, lpBand->lpText);
|
||||
COMCTL32_Free (lpBand->lpText);
|
||||
lpBand->lpText = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* free band array */
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->bands);
|
||||
COMCTL32_Free (infoPtr->bands);
|
||||
infoPtr->bands = NULL;
|
||||
}
|
||||
|
||||
|
@ -608,7 +616,10 @@ REBAR_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
|||
switch (uMsg)
|
||||
{
|
||||
// case RB_BEGINDRAG:
|
||||
// case RB_DELETEBAND:
|
||||
|
||||
case RB_DELETEBAND:
|
||||
return REBAR_DeleteBand (wndPtr, wParam, lParam);
|
||||
|
||||
// case RB_DRAGMOVE:
|
||||
// case RB_ENDDRAG:
|
||||
// case RB_GETBANDBORDERS:
|
||||
|
@ -621,7 +632,6 @@ REBAR_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
|||
case RB_GETBANDINFO32A:
|
||||
return REBAR_GetBandInfo32A (wndPtr, wParam, lParam);
|
||||
|
||||
|
||||
// case RB_GETBANDINFO32W:
|
||||
|
||||
case RB_GETBARHEIGHT:
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
*/
|
||||
|
||||
#include "windows.h"
|
||||
#include "status.h"
|
||||
#include "commctrl.h"
|
||||
#include "heap.h"
|
||||
#include "status.h"
|
||||
#include "win.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -528,17 +527,16 @@ STATUSBAR_SetParts (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
if (oldNumParts > self->numParts) {
|
||||
for (i = self->numParts ; i < oldNumParts; i++) {
|
||||
if (self->parts[i].text && (self->parts[i].style != SBT_OWNERDRAW))
|
||||
HeapFree(GetProcessHeap (), 0, self->parts[i].text);
|
||||
COMCTL32_Free (self->parts[i].text);
|
||||
}
|
||||
}
|
||||
else if (oldNumParts < self->numParts) {
|
||||
tmp = HeapAlloc(GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof(STATUSWINDOWPART) * self->numParts);
|
||||
tmp = COMCTL32_Alloc (sizeof(STATUSWINDOWPART) * self->numParts);
|
||||
for (i = 0; i < oldNumParts; i++) {
|
||||
tmp[i] = self->parts[i];
|
||||
}
|
||||
if (self->parts)
|
||||
HeapFree(GetProcessHeap (), 0, self->parts);
|
||||
COMCTL32_Free (self->parts);
|
||||
self->parts = tmp;
|
||||
}
|
||||
|
||||
|
@ -614,10 +612,10 @@ STATUSBAR_SetText32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
else {
|
||||
/* duplicate string */
|
||||
if (part->text)
|
||||
HeapFree (GetProcessHeap (), 0, part->text);
|
||||
COMCTL32_Free (part->text);
|
||||
part->text = 0;
|
||||
if (text && (len = lstrlen32A(text))) {
|
||||
part->text = HeapAlloc (GetProcessHeap (), 0, len+1);
|
||||
part->text = COMCTL32_Alloc (len+1);
|
||||
lstrcpy32A(part->text, text);
|
||||
}
|
||||
}
|
||||
|
@ -694,8 +692,7 @@ STATUSBAR_WMCreate (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
HDC32 hdc;
|
||||
STATUSWINDOWINFO *self;
|
||||
|
||||
self = (STATUSWINDOWINFO*)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof(STATUSWINDOWINFO));
|
||||
self = (STATUSWINDOWINFO*)COMCTL32_Alloc (sizeof(STATUSWINDOWINFO));
|
||||
wndPtr->wExtra[0] = (DWORD)self;
|
||||
|
||||
self->numParts = 1;
|
||||
|
@ -717,8 +714,7 @@ STATUSBAR_WMCreate (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
self->part0.hIcon = 0;
|
||||
|
||||
/* initialize first part */
|
||||
self->parts = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof(STATUSWINDOWPART));
|
||||
self->parts = COMCTL32_Alloc (sizeof(STATUSWINDOWPART));
|
||||
self->parts[0].bound = rect;
|
||||
self->parts[0].text = 0;
|
||||
self->parts[0].x = -1;
|
||||
|
@ -726,7 +722,7 @@ STATUSBAR_WMCreate (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
self->parts[0].hIcon = 0;
|
||||
|
||||
if ((len = lstrlen32A (lpCreate->lpszName))) {
|
||||
self->parts[0].text = HeapAlloc (GetProcessHeap (), 0, len + 1);
|
||||
self->parts[0].text = COMCTL32_Alloc (len + 1);
|
||||
lstrcpy32A (self->parts[0].text, lpCreate->lpszName);
|
||||
}
|
||||
|
||||
|
@ -781,11 +777,11 @@ STATUSBAR_WMDestroy (WND *wndPtr)
|
|||
|
||||
for (i = 0; i < self->numParts; i++) {
|
||||
if (self->parts[i].text && (self->parts[i].style != SBT_OWNERDRAW))
|
||||
HeapFree(GetProcessHeap (), 0, self->parts[i].text);
|
||||
COMCTL32_Free (self->parts[i].text);
|
||||
}
|
||||
if (self->part0.text && (self->part0.style != SBT_OWNERDRAW))
|
||||
HeapFree(GetProcessHeap (), 0, self->part0.text);
|
||||
HeapFree(GetProcessHeap (), 0, self->parts);
|
||||
COMCTL32_Free (self->part0.text);
|
||||
COMCTL32_Free (self->parts);
|
||||
|
||||
/* delete default font */
|
||||
if (self->hDefaultFont)
|
||||
|
@ -795,7 +791,7 @@ STATUSBAR_WMDestroy (WND *wndPtr)
|
|||
if (self->hwndToolTip)
|
||||
DestroyWindow32 (self->hwndToolTip);
|
||||
|
||||
HeapFree(GetProcessHeap (), 0, self);
|
||||
COMCTL32_Free (self);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -939,10 +935,10 @@ STATUSBAR_WMSetText (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
part = &self->parts[0];
|
||||
/* duplicate string */
|
||||
if (part->text)
|
||||
HeapFree(GetProcessHeap (), 0, part->text);
|
||||
COMCTL32_Free (part->text);
|
||||
part->text = 0;
|
||||
if (lParam && (len = lstrlen32A((LPCSTR)lParam))) {
|
||||
part->text = HeapAlloc (GetProcessHeap (), 0, len+1);
|
||||
part->text = COMCTL32_Alloc (len+1);
|
||||
lstrcpy32A (part->text, (LPCSTR)lParam);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,11 +4,9 @@
|
|||
* Copyright 1998 Eric Kohl
|
||||
*
|
||||
* TODO:
|
||||
* - Bitmap drawing.
|
||||
* - Button wrapping.
|
||||
* - Messages.
|
||||
* - Notifications.
|
||||
* - Fix TB_GETBITMAPFLAGS.
|
||||
* - Fix TB_GETROWS and TB_SETROWS.
|
||||
* - Tooltip support (almost complete).
|
||||
* - Unicode suppport.
|
||||
|
@ -27,11 +25,10 @@
|
|||
*/
|
||||
|
||||
#include "windows.h"
|
||||
#include "sysmetrics.h"
|
||||
#include "commctrl.h"
|
||||
#include "sysmetrics.h"
|
||||
#include "cache.h"
|
||||
#include "toolbar.h"
|
||||
#include "heap.h"
|
||||
#include "win.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -70,10 +67,10 @@ TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
|
|||
RECT32 rcText = btnPtr->rect;
|
||||
HFONT32 hOldFont;
|
||||
INT32 nOldBkMode;
|
||||
COLORREF clrOld;
|
||||
|
||||
/* draw text */
|
||||
if ((btnPtr->iString > -1) && (btnPtr->iString < infoPtr->nNumStrings)) {
|
||||
|
||||
InflateRect32 (&rcText, -3, -3);
|
||||
rcText.top += infoPtr->nBitmapHeight;
|
||||
if (nState & (TBSTATE_PRESSED | TBSTATE_CHECKED))
|
||||
|
@ -82,28 +79,27 @@ TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
|
|||
hOldFont = SelectObject32 (hdc, infoPtr->hFont);
|
||||
nOldBkMode = SetBkMode32 (hdc, TRANSPARENT);
|
||||
if (!(nState & TBSTATE_ENABLED)) {
|
||||
COLORREF clrOld =
|
||||
SetTextColor32 (hdc, GetSysColor32 (COLOR_3DHILIGHT));
|
||||
clrOld = SetTextColor32 (hdc, GetSysColor32 (COLOR_3DHILIGHT));
|
||||
OffsetRect32 (&rcText, 1, 1);
|
||||
DrawText32A (hdc, infoPtr->strings[btnPtr->iString], -1, &rcText,
|
||||
DT_CENTER);
|
||||
DrawText32A (hdc, infoPtr->strings[btnPtr->iString], -1,
|
||||
&rcText, infoPtr->dwDTFlags);
|
||||
SetTextColor32 (hdc, GetSysColor32 (COLOR_3DSHADOW));
|
||||
OffsetRect32 (&rcText, -1, -1);
|
||||
DrawText32A (hdc, infoPtr->strings[btnPtr->iString], -1, &rcText,
|
||||
DT_CENTER);
|
||||
SetTextColor32 (hdc, clrOld);
|
||||
DrawText32A (hdc, infoPtr->strings[btnPtr->iString], -1,
|
||||
&rcText, infoPtr->dwDTFlags);
|
||||
}
|
||||
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);
|
||||
clrOld = SetTextColor32 (hdc, GetSysColor32 (COLOR_3DSHADOW));
|
||||
DrawText32A (hdc, infoPtr->strings[btnPtr->iString], -1,
|
||||
&rcText, infoPtr->dwDTFlags);
|
||||
}
|
||||
else {
|
||||
clrOld = SetTextColor32 (hdc, GetSysColor32 (COLOR_BTNTEXT));
|
||||
DrawText32A (hdc, infoPtr->strings[btnPtr->iString], -1,
|
||||
&rcText, infoPtr->dwDTFlags);
|
||||
}
|
||||
else
|
||||
DrawText32A (hdc, infoPtr->strings[btnPtr->iString], -1, &rcText,
|
||||
DT_CENTER);
|
||||
|
||||
SetTextColor32 (hdc, clrOld);
|
||||
SelectObject32 (hdc, hOldFont);
|
||||
if (nOldBkMode != TRANSPARENT)
|
||||
SetBkMode32 (hdc, nOldBkMode);
|
||||
|
@ -111,6 +107,46 @@ TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
TOOLBAR_DrawPattern (HDC32 hdc, LPRECT32 lpRect)
|
||||
{
|
||||
HBRUSH32 hbr = SelectObject32 (hdc, CACHE_GetPattern55AABrush ());
|
||||
INT32 cx = lpRect->right - lpRect->left;
|
||||
INT32 cy = lpRect->bottom - lpRect->top;
|
||||
PatBlt32 (hdc, lpRect->left, lpRect->top, cx, cy, 0x00FA0089);
|
||||
SelectObject32 (hdc, hbr);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
TOOLBAR_DrawMasked (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
|
||||
HDC32 hdc, INT32 x, INT32 y)
|
||||
{
|
||||
/* FIXME: this function is a hack since it uses image list
|
||||
internals directly */
|
||||
|
||||
HDC32 hdcImageList = CreateCompatibleDC32 (0);
|
||||
HIMAGELIST himl = infoPtr->himlDef;
|
||||
|
||||
/* draw the mask */
|
||||
SelectObject32 (hdcImageList, himl->hbmMask);
|
||||
SetBkColor32 (hdcImageList, RGB(255, 255, 255));
|
||||
SetTextColor32 (hdcImageList, RGB(0, 0, 0));
|
||||
|
||||
SelectObject32 (hdc, GetSysColorBrush32 (COLOR_3DHILIGHT));
|
||||
BitBlt32 (hdc, x+1, y+1, himl->cx, himl->cy,
|
||||
hdcImageList, himl->cx * btnPtr->iBitmap, 0,
|
||||
0xB8074A);
|
||||
|
||||
SelectObject32 (hdc, GetSysColorBrush32 (COLOR_3DSHADOW));
|
||||
BitBlt32 (hdc, x, y, himl->cx, himl->cy,
|
||||
hdcImageList, himl->cx * btnPtr->iBitmap, 0,
|
||||
0xB8074A);
|
||||
|
||||
DeleteDC32 (hdcImageList);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
|
||||
{
|
||||
|
@ -129,12 +165,11 @@ TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
|
|||
|
||||
/* disabled */
|
||||
if (!(btnPtr->fsState & TBSTATE_ENABLED)) {
|
||||
HICON32 hIcon;
|
||||
DrawEdge32 (hdc, &rc, EDGE_RAISED,
|
||||
BF_SOFT | BF_RECT | BF_MIDDLE | BF_ADJUST);
|
||||
|
||||
// ImageList_Draw (infoPtr->himlDis, btnPtr->iBitmap, hdc,
|
||||
// rc.left+1, rc.top+1, ILD_NORMAL);
|
||||
TOOLBAR_DrawMasked (infoPtr, btnPtr, hdc, rc.left+1, rc.top+1);
|
||||
|
||||
TOOLBAR_DrawString (infoPtr, btnPtr, hdc, btnPtr->fsState);
|
||||
return;
|
||||
}
|
||||
|
@ -152,7 +187,6 @@ TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
|
|||
/* checked TBSTYLE_CHECK*/
|
||||
if ((btnPtr->fsStyle & TBSTYLE_CHECK) &&
|
||||
(btnPtr->fsState & TBSTATE_CHECKED)) {
|
||||
HBRUSH32 hbr;
|
||||
if (bFlat)
|
||||
DrawEdge32 (hdc, &rc, BDR_SUNKENOUTER,
|
||||
BF_RECT | BF_MIDDLE | BF_ADJUST);
|
||||
|
@ -160,10 +194,7 @@ TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
|
|||
DrawEdge32 (hdc, &rc, EDGE_SUNKEN,
|
||||
BF_RECT | BF_MIDDLE | BF_ADJUST);
|
||||
|
||||
hbr = SelectObject32 (hdc, CACHE_GetPattern55AABrush ());
|
||||
PatBlt32 (hdc, rc.left, rc.top, rc.right - rc.left,
|
||||
rc.bottom - rc.top, 0x00FA0089);
|
||||
SelectObject32 (hdc, hbr);
|
||||
TOOLBAR_DrawPattern (hdc, &rc);
|
||||
ImageList_Draw (infoPtr->himlDef, btnPtr->iBitmap, hdc,
|
||||
rc.left+2, rc.top+2, ILD_NORMAL);
|
||||
TOOLBAR_DrawString (infoPtr, btnPtr, hdc, btnPtr->fsState);
|
||||
|
@ -172,16 +203,11 @@ TOOLBAR_DrawButton (WND *wndPtr, TBUTTON_INFO *btnPtr, HDC32 hdc)
|
|||
|
||||
/* indeterminate */
|
||||
if (btnPtr->fsState & TBSTATE_INDETERMINATE) {
|
||||
HBRUSH32 hbr;
|
||||
DrawEdge32 (hdc, &rc, EDGE_RAISED,
|
||||
BF_SOFT | BF_RECT | BF_MIDDLE | BF_ADJUST);
|
||||
|
||||
hbr = SelectObject32 (hdc, CACHE_GetPattern55AABrush ());
|
||||
PatBlt32 (hdc, rc.left, rc.top, rc.right - rc.left,
|
||||
rc.bottom - rc.top, 0x00FA0089);
|
||||
SelectObject32 (hdc, hbr);
|
||||
// ImageList_Draw (infoPtr->himlDis, btnPtr->iBitmap, hdc,
|
||||
// rc.left+1, rc.top+1, ILD_NORMAL);
|
||||
TOOLBAR_DrawPattern (hdc, &rc);
|
||||
TOOLBAR_DrawMasked (infoPtr, btnPtr, hdc, rc.left+1, rc.top+1);
|
||||
TOOLBAR_DrawString (infoPtr, btnPtr, hdc, btnPtr->fsState);
|
||||
return;
|
||||
}
|
||||
|
@ -495,7 +521,7 @@ TOOLBAR_AddBitmap (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
if (lpAddBmp->hInst == (HINSTANCE32)0) {
|
||||
nIndex =
|
||||
ImageList_AddMasked (infoPtr->himlDef, (HBITMAP32)lpAddBmp->nID,
|
||||
GetSysColor32 (COLOR_3DFACE));
|
||||
CLR_DEFAULT);
|
||||
}
|
||||
else if (lpAddBmp->hInst == HINST_COMMCTRL) {
|
||||
/* add internal bitmaps */
|
||||
|
@ -510,7 +536,7 @@ TOOLBAR_AddBitmap (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
HBITMAP32 hBmp =
|
||||
LoadBitmap32A (lpAddBmp->hInst, (LPSTR)lpAddBmp->nID);
|
||||
|
||||
nIndex = ImageList_Add (infoPtr->himlDef, hBmp, (HBITMAP32)0);
|
||||
nIndex = ImageList_AddMasked (infoPtr->himlDef, hBmp, CLR_DEFAULT);
|
||||
|
||||
DeleteObject32 (hBmp);
|
||||
}
|
||||
|
@ -538,17 +564,15 @@ TOOLBAR_AddButtons32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
if (infoPtr->nNumButtons == 0) {
|
||||
infoPtr->buttons =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof (TBUTTON_INFO) * nNewButtons);
|
||||
COMCTL32_Alloc (sizeof(TBUTTON_INFO) * nNewButtons);
|
||||
}
|
||||
else {
|
||||
TBUTTON_INFO *oldButtons = infoPtr->buttons;
|
||||
infoPtr->buttons =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof (TBUTTON_INFO) * nNewButtons);
|
||||
COMCTL32_Alloc (sizeof(TBUTTON_INFO) * nNewButtons);
|
||||
memcpy (&infoPtr->buttons[0], &oldButtons[0],
|
||||
nOldButtons * sizeof(TBUTTON_INFO));
|
||||
HeapFree (GetProcessHeap (), 0, oldButtons);
|
||||
COMCTL32_Free (oldButtons);
|
||||
}
|
||||
|
||||
infoPtr->nNumButtons = nNewButtons;
|
||||
|
@ -609,20 +633,19 @@ TOOLBAR_AddString32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
nIndex = infoPtr->nNumStrings;
|
||||
if (infoPtr->nNumStrings == 0) {
|
||||
infoPtr->strings =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(char *));
|
||||
COMCTL32_Alloc (sizeof(char *));
|
||||
}
|
||||
else {
|
||||
char **oldStrings = infoPtr->strings;
|
||||
infoPtr->strings =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof(char *) * (infoPtr->nNumStrings + 1));
|
||||
COMCTL32_Alloc (sizeof(char *) * (infoPtr->nNumStrings + 1));
|
||||
memcpy (&infoPtr->strings[0], &oldStrings[0],
|
||||
sizeof(char *) * infoPtr->nNumStrings);
|
||||
HeapFree (GetProcessHeap (), 0, oldStrings);
|
||||
COMCTL32_Free (oldStrings);
|
||||
}
|
||||
|
||||
infoPtr->strings[infoPtr->nNumStrings] =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(char)*(len+1));
|
||||
COMCTL32_Alloc (sizeof(char)*(len+1));
|
||||
lstrcpy32A (infoPtr->strings[infoPtr->nNumStrings], szString);
|
||||
infoPtr->nNumStrings++;
|
||||
}
|
||||
|
@ -639,20 +662,19 @@ TOOLBAR_AddString32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
if (infoPtr->nNumStrings == 0) {
|
||||
infoPtr->strings =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(char *));
|
||||
COMCTL32_Alloc (sizeof(char *));
|
||||
}
|
||||
else {
|
||||
char **oldStrings = infoPtr->strings;
|
||||
infoPtr->strings =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof(char *) * (infoPtr->nNumStrings + 1));
|
||||
COMCTL32_Alloc (sizeof(char *) * (infoPtr->nNumStrings + 1));
|
||||
memcpy (&infoPtr->strings[0], &oldStrings[0],
|
||||
sizeof(char *) * infoPtr->nNumStrings);
|
||||
HeapFree (GetProcessHeap (), 0, oldStrings);
|
||||
COMCTL32_Free (oldStrings);
|
||||
}
|
||||
|
||||
infoPtr->strings[infoPtr->nNumStrings] =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(char)*(len+1));
|
||||
COMCTL32_Alloc (sizeof(char)*(len+1));
|
||||
lstrcpy32A (infoPtr->strings[infoPtr->nNumStrings], p);
|
||||
infoPtr->nNumStrings++;
|
||||
|
||||
|
@ -841,7 +863,7 @@ TOOLBAR_DeleteButton (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
if (infoPtr->nNumButtons == 1) {
|
||||
TRACE (toolbar, " simple delete!\n");
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->buttons);
|
||||
COMCTL32_Free (infoPtr->buttons);
|
||||
infoPtr->buttons = NULL;
|
||||
infoPtr->nNumButtons = 0;
|
||||
}
|
||||
|
@ -850,8 +872,7 @@ TOOLBAR_DeleteButton (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
TRACE(toolbar, "complex delete! [nIndex=%d]\n", nIndex);
|
||||
|
||||
infoPtr->nNumButtons--;
|
||||
infoPtr->buttons = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof (TBUTTON_INFO) * infoPtr->nNumButtons);
|
||||
infoPtr->buttons = COMCTL32_Alloc (sizeof (TBUTTON_INFO) * infoPtr->nNumButtons);
|
||||
if (nIndex > 0) {
|
||||
memcpy (&infoPtr->buttons[0], &oldButtons[0],
|
||||
nIndex * sizeof(TBUTTON_INFO));
|
||||
|
@ -862,7 +883,7 @@ TOOLBAR_DeleteButton (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
(infoPtr->nNumButtons - nIndex) * sizeof(TBUTTON_INFO));
|
||||
}
|
||||
|
||||
HeapFree (GetProcessHeap (), 0, oldButtons);
|
||||
COMCTL32_Free (oldButtons);
|
||||
}
|
||||
|
||||
TOOLBAR_CalcToolbar (wndPtr);
|
||||
|
@ -911,17 +932,16 @@ TOOLBAR_GetBitmap (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT32)wParam);
|
||||
if (nIndex == -1)
|
||||
return 0;
|
||||
return -1;
|
||||
|
||||
return infoPtr->buttons[nIndex].iBitmap;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
static __inline__ LRESULT
|
||||
TOOLBAR_GetBitmapFlags (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
FIXME (toolbar, "stub!\n");
|
||||
return 0;
|
||||
return (GetDeviceCaps32 (0, LOGPIXELSX) >= 120) ? TBBF_LARGE : 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1312,8 +1332,7 @@ TOOLBAR_InsertButton32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
oldButtons = infoPtr->buttons;
|
||||
infoPtr->nNumButtons++;
|
||||
infoPtr->buttons = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof (TBUTTON_INFO) * infoPtr->nNumButtons);
|
||||
infoPtr->buttons = COMCTL32_Alloc (sizeof (TBUTTON_INFO) * infoPtr->nNumButtons);
|
||||
/* pre insert copy */
|
||||
if (nIndex > 0) {
|
||||
memcpy (&infoPtr->buttons[0], &oldButtons[0],
|
||||
|
@ -1348,7 +1367,7 @@ TOOLBAR_InsertButton32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
(infoPtr->nNumButtons - nIndex - 1) * sizeof(TBUTTON_INFO));
|
||||
}
|
||||
|
||||
HeapFree (GetProcessHeap (), 0, oldButtons);
|
||||
COMCTL32_Free (oldButtons);
|
||||
|
||||
TOOLBAR_CalcToolbar (wndPtr);
|
||||
|
||||
|
@ -1486,6 +1505,7 @@ TOOLBAR_PressButton (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
static LRESULT
|
||||
TOOLBAR_SaveRestore32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
#if 0
|
||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr);
|
||||
LPTBSAVEPARAMS32A lpSave = (LPTBSAVEPARAMS32A)lParam;
|
||||
|
||||
|
@ -1506,6 +1526,7 @@ TOOLBAR_SaveRestore32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1565,13 +1586,13 @@ TOOLBAR_SetButtonInfo32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
if ((btnPtr->iString >= 0) ||
|
||||
(btnPtr->iString < infoPtr->nNumStrings)) {
|
||||
#if 0
|
||||
CHAR *lpString = infoPtr->strings[btnPtr->iString];
|
||||
CHAR **lpString = &infoPtr->strings[btnPtr->iString];
|
||||
INT32 len = lstrlen32A (lptbbi->pszText);
|
||||
|
||||
lpString = HeapReAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(char)*(len+1));
|
||||
|
||||
*lpString = COMCTL32_ReAlloc (lpString, sizeof(char)*(len+1));
|
||||
#endif
|
||||
|
||||
/* this is the ultimate sollution */
|
||||
// Str_SetPtrA (&infoPtr->strings[btnPtr->iString], lptbbi->pszText);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1654,7 +1675,18 @@ TOOLBAR_SetDisabledImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
}
|
||||
|
||||
|
||||
// << TOOLBAR_SetDrawTextFlags >>
|
||||
static LRESULT
|
||||
TOOLBAR_SetDrawTextFlags (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr);
|
||||
DWORD dwTemp;
|
||||
|
||||
dwTemp = infoPtr->dwDTFlags;
|
||||
infoPtr->dwDTFlags =
|
||||
(infoPtr->dwDTFlags & (DWORD)wParam) | (DWORD)lParam;
|
||||
|
||||
return (LRESULT)dwTemp;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
|
@ -1910,6 +1942,7 @@ TOOLBAR_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
infoPtr->hwndNotify = GetParent32 (wndPtr->hwndSelf);
|
||||
infoPtr->bTransparent = (wndPtr->dwStyle & TBSTYLE_FLAT);
|
||||
infoPtr->nHotItem = -1;
|
||||
infoPtr->dwDTFlags = DT_CENTER;
|
||||
|
||||
SystemParametersInfo32A (SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
|
||||
infoPtr->hFont = CreateFontIndirect32A (&logFont);
|
||||
|
@ -1951,16 +1984,16 @@ TOOLBAR_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
/* delete button data */
|
||||
if (infoPtr->buttons)
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->buttons);
|
||||
COMCTL32_Free (infoPtr->buttons);
|
||||
|
||||
/* delete strings */
|
||||
if (infoPtr->strings) {
|
||||
INT32 i;
|
||||
for (i = 0; i < infoPtr->nNumStrings; i++)
|
||||
if (infoPtr->strings[i])
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->strings[i]);
|
||||
COMCTL32_Free (infoPtr->strings[i]);
|
||||
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->strings);
|
||||
COMCTL32_Free (infoPtr->strings);
|
||||
}
|
||||
|
||||
/* destroy default image list */
|
||||
|
@ -1980,7 +2013,7 @@ TOOLBAR_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
DeleteObject32 (infoPtr->hFont);
|
||||
|
||||
/* free toolbar info data */
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr);
|
||||
COMCTL32_Free (infoPtr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -2178,7 +2211,15 @@ TOOLBAR_MouseMove (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
}
|
||||
|
||||
|
||||
// << TOOLBAR_NCActivate >>
|
||||
__inline__ static LRESULT
|
||||
TOOLBAR_NCActivate (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
// if (wndPtr->dwStyle & CCS_NODIVIDER)
|
||||
return DefWindowProc32A (wndPtr->hwndSelf, WM_NCACTIVATE,
|
||||
wParam, lParam);
|
||||
// else
|
||||
// return TOOLBAR_NCPaint (wndPtr, wParam, lParam);
|
||||
}
|
||||
|
||||
|
||||
__inline__ static LRESULT
|
||||
|
@ -2197,8 +2238,7 @@ TOOLBAR_NCCreate (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
TOOLBAR_INFO *infoPtr;
|
||||
|
||||
/* allocate memory for info structure */
|
||||
infoPtr = (TOOLBAR_INFO *)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof(TOOLBAR_INFO));
|
||||
infoPtr = (TOOLBAR_INFO *)COMCTL32_Alloc (sizeof(TOOLBAR_INFO));
|
||||
wndPtr->wExtra[0] = (DWORD)infoPtr;
|
||||
|
||||
if (infoPtr == NULL) {
|
||||
|
@ -2568,7 +2608,8 @@ ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
|||
case TB_SETDISABLEDIMAGELIST:
|
||||
return TOOLBAR_SetDisabledImageList (wndPtr, wParam, lParam);
|
||||
|
||||
// case TB_SETDRAWTEXTFLAGS: /* 4.71 */
|
||||
case TB_SETDRAWTEXTFLAGS:
|
||||
return TOOLBAR_SetDrawTextFlags (wndPtr, wParam, lParam);
|
||||
|
||||
case TB_SETEXTENDEDSTYLE:
|
||||
return TOOLBAR_SetExtendedStyle (wndPtr, wParam, lParam);
|
||||
|
@ -2640,8 +2681,8 @@ ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
|||
case WM_MOUSEMOVE:
|
||||
return TOOLBAR_MouseMove (wndPtr, wParam, lParam);
|
||||
|
||||
// case WM_NCACTIVATE:
|
||||
// return TOOLBAR_NCActivate (wndPtr, wParam, lParam);
|
||||
case WM_NCACTIVATE:
|
||||
return TOOLBAR_NCActivate (wndPtr, wParam, lParam);
|
||||
|
||||
case WM_NCCALCSIZE:
|
||||
return TOOLBAR_NCCalcSize (wndPtr, wParam, lParam);
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "windows.h"
|
||||
#include "commctrl.h"
|
||||
#include "tooltips.h"
|
||||
#include "heap.h"
|
||||
#include "win.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -108,8 +107,7 @@ TOOLTIPS_GetTipText (WND *wndPtr, TOOLTIPS_INFO *infoPtr)
|
|||
if (ttnmdi.uFlags & TTF_DI_SETITEM) {
|
||||
INT32 len = lstrlen32A (ttnmdi.szText) + 1;
|
||||
toolPtr->hinst = 0;
|
||||
toolPtr->lpszText =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len);
|
||||
toolPtr->lpszText = COMCTL32_Alloc (len);
|
||||
lstrcpy32A (toolPtr->lpszText, ttnmdi.szText);
|
||||
}
|
||||
}
|
||||
|
@ -124,8 +122,7 @@ TOOLTIPS_GetTipText (WND *wndPtr, TOOLTIPS_INFO *infoPtr)
|
|||
if (ttnmdi.uFlags & TTF_DI_SETITEM) {
|
||||
INT32 len = lstrlen32A (ttnmdi.lpszText) + 1;
|
||||
toolPtr->hinst = 0;
|
||||
toolPtr->lpszText =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len);
|
||||
toolPtr->lpszText = COMCTL32_Alloc (len);
|
||||
lstrcpy32A (toolPtr->lpszText, ttnmdi.lpszText);
|
||||
}
|
||||
}
|
||||
|
@ -177,7 +174,7 @@ static VOID
|
|||
TOOLTIPS_Show (WND *wndPtr, TOOLTIPS_INFO *infoPtr)
|
||||
{
|
||||
TTTOOL_INFO *toolPtr;
|
||||
POINT32 pt;
|
||||
RECT32 rect;
|
||||
SIZE32 size;
|
||||
NMHDR hdr;
|
||||
|
||||
|
@ -212,31 +209,37 @@ TOOLTIPS_Show (WND *wndPtr, TOOLTIPS_INFO *infoPtr)
|
|||
TRACE (tooltips, "size %d - %d\n", size.cx, size.cy);
|
||||
|
||||
if ((toolPtr->uFlags & TTF_TRACK) && (toolPtr->uFlags & TTF_ABSOLUTE)) {
|
||||
pt.x = infoPtr->xTrackPos;
|
||||
pt.y = infoPtr->yTrackPos;
|
||||
rect.left = infoPtr->xTrackPos;
|
||||
rect.top = infoPtr->yTrackPos;
|
||||
}
|
||||
else if (toolPtr->uFlags & TTF_CENTERTIP) {
|
||||
RECT32 rect;
|
||||
RECT32 rc;
|
||||
|
||||
if (toolPtr->uFlags & TTF_IDISHWND)
|
||||
GetWindowRect32 ((HWND32)toolPtr->uId, &rect);
|
||||
GetWindowRect32 ((HWND32)toolPtr->uId, &rc);
|
||||
else {
|
||||
rect = toolPtr->rect;
|
||||
MapWindowPoints32 (toolPtr->hwnd, (HWND32)0, (LPPOINT32)&rect, 2);
|
||||
rc = toolPtr->rect;
|
||||
MapWindowPoints32 (toolPtr->hwnd, (HWND32)0, (LPPOINT32)&rc, 2);
|
||||
}
|
||||
pt.x = (rect.left + rect.right - size.cx) / 2;
|
||||
pt.y = rect.bottom + 2;
|
||||
rect.left = (rc.left + rc.right - size.cx) / 2;
|
||||
rect.top = rc.bottom + 2;
|
||||
}
|
||||
else {
|
||||
GetCursorPos32 (&pt);
|
||||
pt.y += 20;
|
||||
GetCursorPos32 ((LPPOINT32)&rect);
|
||||
rect.top += 20;
|
||||
}
|
||||
|
||||
TRACE (tooltips, "pos %d - %d\n", pt.x, pt.y);
|
||||
TRACE (tooltips, "pos %d - %d\n", rect.left, rect.top);
|
||||
|
||||
rect.right = rect.left + size.cx;
|
||||
rect.bottom = rect.top + size.cy;
|
||||
|
||||
AdjustWindowRectEx32 (&rect, wndPtr->dwStyle, FALSE, wndPtr->dwExStyle);
|
||||
|
||||
// SetWindowPos32 (wndPtr->hwndSelf, HWND_TOP, 1, 1,
|
||||
SetWindowPos32 (wndPtr->hwndSelf, HWND_TOP, pt.x, pt.y,
|
||||
size.cx, size.cy, SWP_SHOWWINDOW);
|
||||
SetWindowPos32 (wndPtr->hwndSelf, HWND_TOP, rect.left, rect.top,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
SWP_SHOWWINDOW);
|
||||
|
||||
SetTimer32 (wndPtr->hwndSelf, ID_TIMER2, infoPtr->nAutoPopTime, 0);
|
||||
}
|
||||
|
@ -263,7 +266,8 @@ TOOLTIPS_Hide (WND *wndPtr, TOOLTIPS_INFO *infoPtr)
|
|||
|
||||
infoPtr->nCurrentTool = -1;
|
||||
|
||||
SetWindowPos32 (wndPtr->hwndSelf, HWND_TOP, 0, 0, 0, 0, SWP_HIDEWINDOW);
|
||||
SetWindowPos32 (wndPtr->hwndSelf, HWND_TOP, 0, 0, 0, 0,
|
||||
SWP_NOZORDER | SWP_HIDEWINDOW);
|
||||
}
|
||||
|
||||
|
||||
|
@ -406,19 +410,16 @@ TOOLTIPS_AddTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
(lpToolInfo->uFlags & TTF_IDISHWND) ? " TTF_IDISHWND" : "");
|
||||
|
||||
if (infoPtr->uNumTools == 0) {
|
||||
infoPtr->tools =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof(TTTOOL_INFO));
|
||||
infoPtr->tools = COMCTL32_Alloc (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));
|
||||
COMCTL32_Alloc (sizeof(TTTOOL_INFO) * (infoPtr->uNumTools + 1));
|
||||
memcpy (infoPtr->tools, oldTools,
|
||||
infoPtr->uNumTools * sizeof(TTTOOL_INFO));
|
||||
HeapFree (GetProcessHeap (), 0, oldTools);
|
||||
COMCTL32_Free (oldTools);
|
||||
toolPtr = &infoPtr->tools[infoPtr->uNumTools];
|
||||
}
|
||||
|
||||
|
@ -443,8 +444,7 @@ TOOLTIPS_AddTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
else {
|
||||
INT32 len = lstrlen32A (lpToolInfo->lpszText);
|
||||
TRACE (tooltips, "add text \"%s\"!\n", lpToolInfo->lpszText);
|
||||
toolPtr->lpszText =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len + 1);
|
||||
toolPtr->lpszText = COMCTL32_Alloc (len + 1);
|
||||
lstrcpy32A (toolPtr->lpszText, lpToolInfo->lpszText);
|
||||
}
|
||||
}
|
||||
|
@ -458,8 +458,8 @@ TOOLTIPS_AddTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
LPTT_SUBCLASS_INFO lpttsi =
|
||||
(LPTT_SUBCLASS_INFO)GetProp32A ((HWND32)toolPtr->uId, TT_SUBCLASS_PROP);
|
||||
if (lpttsi == NULL) {
|
||||
lpttsi = (LPTT_SUBCLASS_INFO)HeapAlloc (GetProcessHeap(),
|
||||
HEAP_ZERO_MEMORY, sizeof(TT_SUBCLASS_INFO));
|
||||
lpttsi =
|
||||
(LPTT_SUBCLASS_INFO)COMCTL32_Alloc (sizeof(TT_SUBCLASS_INFO));
|
||||
lpttsi->wpOrigProc =
|
||||
(WNDPROC32)SetWindowLong32A ((HWND32)toolPtr->uId,
|
||||
GWL_WNDPROC,(LONG)TOOLTIPS_SubclassProc);
|
||||
|
@ -475,8 +475,8 @@ TOOLTIPS_AddTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
LPTT_SUBCLASS_INFO lpttsi =
|
||||
(LPTT_SUBCLASS_INFO)GetProp32A (toolPtr->hwnd, TT_SUBCLASS_PROP);
|
||||
if (lpttsi == NULL) {
|
||||
lpttsi = (LPTT_SUBCLASS_INFO)HeapAlloc (GetProcessHeap(),
|
||||
HEAP_ZERO_MEMORY, sizeof(TT_SUBCLASS_INFO));
|
||||
lpttsi =
|
||||
(LPTT_SUBCLASS_INFO)COMCTL32_Alloc (sizeof(TT_SUBCLASS_INFO));
|
||||
lpttsi->wpOrigProc =
|
||||
(WNDPROC32)SetWindowLong32A (toolPtr->hwnd,
|
||||
GWL_WNDPROC,(LONG)TOOLTIPS_SubclassProc);
|
||||
|
@ -521,7 +521,7 @@ TOOLTIPS_DelTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
toolPtr = &infoPtr->tools[nTool];
|
||||
if ((toolPtr->hinst) && (toolPtr->lpszText)) {
|
||||
if (toolPtr->lpszText != LPSTR_TEXTCALLBACK32A)
|
||||
HeapFree (GetProcessHeap (), 0, toolPtr->lpszText);
|
||||
COMCTL32_Free (toolPtr->lpszText);
|
||||
}
|
||||
|
||||
/* remove subclassing */
|
||||
|
@ -533,7 +533,7 @@ TOOLTIPS_DelTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
SetWindowLong32A ((HWND32)toolPtr->uId, GWL_WNDPROC,
|
||||
(LONG)lpttsi->wpOrigProc);
|
||||
RemoveProp32A ((HWND32)toolPtr->uId, TT_SUBCLASS_PROP);
|
||||
HeapFree (GetProcessHeap(), 0, &lpttsi);
|
||||
COMCTL32_Free (&lpttsi);
|
||||
}
|
||||
else
|
||||
ERR (tooltips, "Invalid data handle!\n");
|
||||
|
@ -546,7 +546,7 @@ TOOLTIPS_DelTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
SetWindowLong32A ((HWND32)toolPtr->uId, GWL_WNDPROC,
|
||||
(LONG)lpttsi->wpOrigProc);
|
||||
RemoveProp32A ((HWND32)toolPtr->uId, TT_SUBCLASS_PROP);
|
||||
HeapFree (GetProcessHeap(), 0, &lpttsi);
|
||||
COMCTL32_Free (&lpttsi);
|
||||
}
|
||||
else
|
||||
lpttsi->uRefCount--;
|
||||
|
@ -558,14 +558,13 @@ TOOLTIPS_DelTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
/* delete tool from tool list */
|
||||
if (infoPtr->uNumTools == 1) {
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->tools);
|
||||
COMCTL32_Free (infoPtr->tools);
|
||||
infoPtr->tools = NULL;
|
||||
}
|
||||
else {
|
||||
TTTOOL_INFO *oldTools = infoPtr->tools;
|
||||
infoPtr->tools =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof(TTTOOL_INFO) * (infoPtr->uNumTools - 1));
|
||||
COMCTL32_Alloc (sizeof(TTTOOL_INFO) * (infoPtr->uNumTools - 1));
|
||||
|
||||
if (nTool > 0)
|
||||
memcpy (&infoPtr->tools[0], &oldTools[0],
|
||||
|
@ -575,7 +574,7 @@ TOOLTIPS_DelTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
memcpy (&infoPtr->tools[nTool], &oldTools[nTool + 1],
|
||||
(infoPtr->uNumTools - nTool - 1) * sizeof(TTTOOL_INFO));
|
||||
|
||||
HeapFree (GetProcessHeap (), 0, oldTools);
|
||||
COMCTL32_Free (oldTools);
|
||||
}
|
||||
|
||||
infoPtr->uNumTools--;
|
||||
|
@ -1051,9 +1050,8 @@ TOOLTIPS_SetToolInfo32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
toolPtr->lpszText = lpToolInfo->lpszText;
|
||||
else {
|
||||
INT32 len = lstrlen32A (lpToolInfo->lpszText);
|
||||
HeapFree (GetProcessHeap (), 0, toolPtr->lpszText);
|
||||
toolPtr->lpszText =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len + 1);
|
||||
COMCTL32_Free (toolPtr->lpszText);
|
||||
toolPtr->lpszText = COMCTL32_Alloc (len + 1);
|
||||
lstrcpy32A (toolPtr->lpszText, lpToolInfo->lpszText);
|
||||
}
|
||||
}
|
||||
|
@ -1160,9 +1158,8 @@ TOOLTIPS_UpdateTipText32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
toolPtr->lpszText = lpToolInfo->lpszText;
|
||||
else {
|
||||
INT32 len = lstrlen32A (lpToolInfo->lpszText);
|
||||
HeapFree (GetProcessHeap (), 0, toolPtr->lpszText);
|
||||
toolPtr->lpszText =
|
||||
HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, len + 1);
|
||||
COMCTL32_Free (toolPtr->lpszText);
|
||||
toolPtr->lpszText = COMCTL32_Alloc (len + 1);
|
||||
lstrcpy32A (toolPtr->lpszText, lpToolInfo->lpszText);
|
||||
}
|
||||
}
|
||||
|
@ -1189,8 +1186,7 @@ TOOLTIPS_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
NONCLIENTMETRICS32A nclm;
|
||||
|
||||
/* allocate memory for info structure */
|
||||
infoPtr = (TOOLTIPS_INFO *)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof(TOOLTIPS_INFO));
|
||||
infoPtr = (TOOLTIPS_INFO *)COMCTL32_Alloc (sizeof(TOOLTIPS_INFO));
|
||||
wndPtr->wExtra[0] = (DWORD)infoPtr;
|
||||
|
||||
if (infoPtr == NULL) {
|
||||
|
@ -1219,7 +1215,8 @@ TOOLTIPS_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
infoPtr->nAutoPopTime = 5000;
|
||||
infoPtr->nInitialTime = 500;
|
||||
|
||||
SetWindowPos32 (wndPtr->hwndSelf, HWND_TOP, 0, 0, 0, 0, SWP_HIDEWINDOW);
|
||||
SetWindowPos32 (wndPtr->hwndSelf, HWND_TOP, 0, 0, 0, 0,
|
||||
SWP_NOZORDER | SWP_HIDEWINDOW);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1230,15 +1227,15 @@ TOOLTIPS_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
{
|
||||
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr);
|
||||
TTTOOL_INFO *toolPtr;
|
||||
INT32 i;
|
||||
|
||||
/* free tools */
|
||||
if (infoPtr->tools) {
|
||||
INT32 i;
|
||||
for (i = 0; i < infoPtr->uNumTools; i++) {
|
||||
toolPtr = &infoPtr->tools[i];
|
||||
if ((toolPtr->hinst) && (toolPtr->lpszText)) {
|
||||
if (toolPtr->lpszText != LPSTR_TEXTCALLBACK32A)
|
||||
HeapFree (GetProcessHeap (), 0, toolPtr->lpszText);
|
||||
COMCTL32_Free (toolPtr->lpszText);
|
||||
}
|
||||
|
||||
/* remove subclassing */
|
||||
|
@ -1254,18 +1251,18 @@ TOOLTIPS_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
SetWindowLong32A ((HWND32)toolPtr->uId, GWL_WNDPROC,
|
||||
(LONG)lpttsi->wpOrigProc);
|
||||
RemoveProp32A ((HWND32)toolPtr->uId, TT_SUBCLASS_PROP);
|
||||
HeapFree (GetProcessHeap(), 0, &lpttsi);
|
||||
COMCTL32_Free (&lpttsi);
|
||||
}
|
||||
}
|
||||
}
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->tools);
|
||||
COMCTL32_Free (infoPtr->tools);
|
||||
}
|
||||
|
||||
/* delete font */
|
||||
DeleteObject32 (infoPtr->hFont);
|
||||
|
||||
/* free tool tips info data */
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr);
|
||||
COMCTL32_Free (infoPtr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1327,7 +1324,10 @@ static LRESULT
|
|||
TOOLTIPS_NcCreate (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
wndPtr->dwStyle &= 0x0000FFFF;
|
||||
wndPtr->dwStyle |= (WS_POPUP | WS_BORDER);
|
||||
wndPtr->dwStyle |= (WS_POPUP | WS_BORDER | WS_CLIPSIBLINGS);
|
||||
|
||||
// FIXME (tooltips, "style 0x%08x\n", wndPtr->dwStyle);
|
||||
// SetParent32 (wndPtr->hwndSelf, NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -1,21 +1,31 @@
|
|||
/*
|
||||
* Trackbar control
|
||||
*
|
||||
* Copyright 1998 Eric Kohl
|
||||
* Copyright 1998 Eric Kohli <ekohl@abo.rhein-zeitung.de>
|
||||
* Copyright 1998 Alex Priem <alexp@sci.kun.nl>
|
||||
*
|
||||
* NOTES
|
||||
* Development in progress. Author needed! Any volunteers?
|
||||
* I will only improve this control once in a while.
|
||||
* Eric <ekohl@abo.rhein-zeitung.de>
|
||||
|
||||
*
|
||||
* TODO:
|
||||
* - Some messages.
|
||||
* - display code.
|
||||
* - user interaction.
|
||||
* - tic handling.
|
||||
* - All notifications.
|
||||
* - more display code.
|
||||
* - dragging slider
|
||||
* - better tic handling.
|
||||
* - more notifications.
|
||||
* - tooltips
|
||||
*/
|
||||
|
||||
/* known bugs:
|
||||
|
||||
-TBM_SETRANGEMAX & TBM_SETRANGEMIN should only change the view of the
|
||||
trackbar, not the actual amount of tics in the list.
|
||||
-TBM_GETTIC & TBM_GETTICPOS shouldn't rely on infoPtr->tics being sorted.
|
||||
-code currently only handles horizontal trackbars correct.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "windows.h"
|
||||
#include "commctrl.h"
|
||||
#include "trackbar.h"
|
||||
|
@ -27,43 +37,77 @@
|
|||
#define TRACKBAR_GetInfoPtr(wndPtr) ((TRACKBAR_INFO *)wndPtr->wExtra[0])
|
||||
|
||||
|
||||
static VOID
|
||||
TRACKBAR_Refresh (WND *wndPtr, HDC32 hdc)
|
||||
/* Used by TRACKBAR_Refresh to find out which parts of the control
|
||||
need to be recalculated */
|
||||
|
||||
#define TB_THUMBCHANGED 1
|
||||
#define TB_SELECTIONCHANGED 2
|
||||
|
||||
|
||||
|
||||
static BOOL32 TRACKBAR_SendNotify (WND *wndPtr, UINT32 code);
|
||||
|
||||
void TRACKBAR_RecalculateTics (TRACKBAR_INFO *infoPtr)
|
||||
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
RECT32 rcClient, rcChannel;
|
||||
int i,tic,nrTics;
|
||||
|
||||
GetClientRect32 (wndPtr->hwndSelf, &rcClient);
|
||||
|
||||
/* draw channel */
|
||||
rcChannel = infoPtr->rcChannel;
|
||||
DrawEdge32 (hdc, &rcChannel, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
|
||||
if (wndPtr->dwStyle & TBS_ENABLESELRANGE) {
|
||||
/* fill the channel */
|
||||
HBRUSH32 hbr = CreateSolidBrush32 (RGB(255,255,255));
|
||||
FillRect32 (hdc, &rcChannel, hbr);
|
||||
DeleteObject32 (hbr);
|
||||
if (infoPtr->uTicFreq)
|
||||
nrTics=(infoPtr->nRangeMax - infoPtr->nRangeMin)/infoPtr->uTicFreq;
|
||||
else {
|
||||
nrTics=0;
|
||||
HeapFree (SystemHeap,0,infoPtr->tics);
|
||||
infoPtr->tics=NULL;
|
||||
infoPtr->uNumTics=0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* draw ticks */
|
||||
if (!(wndPtr->dwStyle & TBS_NOTICKS)) {
|
||||
|
||||
if (nrTics!=infoPtr->uNumTics) {
|
||||
infoPtr->tics=HeapReAlloc( SystemHeap, 0, infoPtr->tics,
|
||||
(nrTics+1)*sizeof (DWORD));
|
||||
infoPtr->uNumTics=nrTics;
|
||||
}
|
||||
infoPtr->uNumTics=nrTics;
|
||||
tic=infoPtr->nRangeMin+infoPtr->uTicFreq;
|
||||
for (i=0; i<nrTics; i++,tic+=infoPtr->uTicFreq)
|
||||
infoPtr->tics[i]=tic;
|
||||
}
|
||||
|
||||
/* draw thumb */
|
||||
if (!(wndPtr->dwStyle & TBS_NOTHUMB)) {
|
||||
|
||||
|
||||
static INT32
|
||||
TRACKBAR_ConvertPositionToTic (WND *wndPtr, TRACKBAR_INFO *infoPtr, POINT32 pt)
|
||||
{
|
||||
double newpos,newtic;
|
||||
int i,range,width,delta,currentdelta,currenttic;
|
||||
|
||||
/* buggy */
|
||||
|
||||
range=infoPtr->nRangeMax - infoPtr->nRangeMin;
|
||||
width=infoPtr->rcChannel.right - infoPtr->rcChannel.left;
|
||||
|
||||
newpos=(pt.x-infoPtr->rcChannel.left) / (double) width;
|
||||
|
||||
newtic=infoPtr->nRangeMin+newpos*range;
|
||||
currenttic=0;
|
||||
currentdelta=currenttic-infoPtr->nRangeMin;
|
||||
for (i=0; i<infoPtr->uNumTics; i++) {
|
||||
delta=newtic-infoPtr->tics[i];
|
||||
if ((delta>0) && (delta<currentdelta)) {
|
||||
currentdelta=delta;
|
||||
currenttic=i;
|
||||
}
|
||||
|
||||
if (infoPtr->bFocus)
|
||||
DrawFocusRect32 (hdc, &rcClient);
|
||||
}
|
||||
|
||||
return (INT32) currenttic;
|
||||
}
|
||||
|
||||
static VOID
|
||||
TRACKBAR_Calc (WND *wndPtr, TRACKBAR_INFO *infoPtr, LPRECT32 lpRect)
|
||||
TRACKBAR_Calc (WND *wndPtr, TRACKBAR_INFO *infoPtr)
|
||||
{
|
||||
INT32 cyChannel;
|
||||
RECT32 lpRect,*channel = & infoPtr->rcChannel;
|
||||
|
||||
GetClientRect32 (wndPtr->hwndSelf, &lpRect);
|
||||
|
||||
if (wndPtr->dwStyle & TBS_ENABLESELRANGE)
|
||||
cyChannel = MAX(infoPtr->uThumbLen - 8, 4);
|
||||
|
@ -72,43 +116,224 @@ TRACKBAR_Calc (WND *wndPtr, TRACKBAR_INFO *infoPtr, LPRECT32 lpRect)
|
|||
|
||||
/* calculate channel rect */
|
||||
if (wndPtr->dwStyle & TBS_VERT) {
|
||||
infoPtr->rcChannel.top = lpRect->top + 8;
|
||||
infoPtr->rcChannel.bottom = lpRect->bottom - 8;
|
||||
channel->top = lpRect.top + 8;
|
||||
channel->bottom = lpRect.bottom - 8;
|
||||
|
||||
if (wndPtr->dwStyle & TBS_BOTH) {
|
||||
infoPtr->rcChannel.left = (lpRect->bottom - cyChannel ) / 2;
|
||||
infoPtr->rcChannel.right = (lpRect->bottom + cyChannel) / 2;
|
||||
channel->left = (lpRect.bottom - cyChannel) / 2;
|
||||
channel->right = (lpRect.bottom + cyChannel) / 2;
|
||||
}
|
||||
else if (wndPtr->dwStyle & TBS_LEFT) {
|
||||
infoPtr->rcChannel.left = lpRect->left + 10;
|
||||
infoPtr->rcChannel.right = infoPtr->rcChannel.left + cyChannel;
|
||||
channel->left = lpRect.left + 10;
|
||||
channel->right = channel->left + cyChannel;
|
||||
}
|
||||
else {
|
||||
/* TBS_RIGHT */
|
||||
infoPtr->rcChannel.right = lpRect->right - 10;
|
||||
infoPtr->rcChannel.left = infoPtr->rcChannel.right - cyChannel;
|
||||
else { /* TBS_RIGHT */
|
||||
channel->right = lpRect.right - 10;
|
||||
channel->left = channel->right - cyChannel;
|
||||
}
|
||||
}
|
||||
else {
|
||||
infoPtr->rcChannel.left = lpRect->left + 8;
|
||||
infoPtr->rcChannel.right = lpRect->right - 8;
|
||||
|
||||
channel->left = lpRect.left + 8;
|
||||
channel->right = lpRect.right - 8;
|
||||
if (wndPtr->dwStyle & TBS_BOTH) {
|
||||
infoPtr->rcChannel.top = (lpRect->bottom - cyChannel ) / 2;
|
||||
infoPtr->rcChannel.bottom = (lpRect->bottom + cyChannel) / 2;
|
||||
channel->top = (lpRect.bottom - cyChannel) / 2;
|
||||
channel->bottom = (lpRect.bottom + cyChannel) / 2;
|
||||
}
|
||||
else if (wndPtr->dwStyle & TBS_TOP) {
|
||||
infoPtr->rcChannel.top = lpRect->top + 10;
|
||||
infoPtr->rcChannel.bottom = infoPtr->rcChannel.top + cyChannel;
|
||||
channel->top = lpRect.top + 10;
|
||||
channel->bottom = channel->top + cyChannel;
|
||||
}
|
||||
else {
|
||||
/* TBS_BOTTOM */
|
||||
infoPtr->rcChannel.bottom = lpRect->bottom - 10;
|
||||
infoPtr->rcChannel.top = infoPtr->rcChannel.bottom - cyChannel;
|
||||
else { /* TBS_BOTTOM */
|
||||
channel->bottom = lpRect.bottom - 10;
|
||||
channel->top = channel->bottom - cyChannel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static VOID
|
||||
TRACKBAR_CalcThumb (WND *wndPtr, TRACKBAR_INFO *infoPtr)
|
||||
|
||||
{
|
||||
RECT32 *thumb;
|
||||
int range, width;
|
||||
|
||||
thumb=&infoPtr->rcThumb;
|
||||
range=infoPtr->nRangeMax - infoPtr->nRangeMin;
|
||||
width=infoPtr->rcChannel.right - infoPtr->rcChannel.left;
|
||||
|
||||
thumb->left = infoPtr->rcChannel.left +
|
||||
width*(65536*infoPtr->nPos/range)/65536 - 5;
|
||||
thumb->right = thumb->left + 10;
|
||||
thumb->top = infoPtr->rcChannel.top - 1;
|
||||
thumb->bottom = infoPtr->rcChannel.top + infoPtr->uThumbLen - 8;
|
||||
}
|
||||
|
||||
static VOID
|
||||
TRACKBAR_CalcSelection (WND *wndPtr, TRACKBAR_INFO *infoPtr)
|
||||
{
|
||||
RECT32 *selection;
|
||||
int range, width;
|
||||
|
||||
selection= & infoPtr->rcSelection;
|
||||
range=infoPtr->nRangeMax - infoPtr->nRangeMin;
|
||||
width=infoPtr->rcChannel.right - infoPtr->rcChannel.left;
|
||||
|
||||
selection->left = infoPtr->rcChannel.left +
|
||||
width*(65536*infoPtr->nSelMin/range)/65536;
|
||||
selection->right = infoPtr->rcChannel.left +
|
||||
width*(65536*infoPtr->nSelMax/range)/65536;
|
||||
selection->top = infoPtr->rcChannel.top + 2;
|
||||
selection->bottom = infoPtr->rcChannel.bottom - 2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static VOID
|
||||
TRACKBAR_Refresh (WND *wndPtr, HDC32 hdc)
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
RECT32 rcClient, rcChannel, rcSelection;
|
||||
HBRUSH32 hBrush = CreateSolidBrush32 (infoPtr->clrBk);
|
||||
INT32 x,y,tic;
|
||||
int i,range,width;
|
||||
|
||||
GetClientRect32 (wndPtr->hwndSelf, &rcClient);
|
||||
hBrush = CreateSolidBrush32 (infoPtr->clrBk);
|
||||
FillRect32 (hdc, &rcClient, hBrush);
|
||||
DeleteObject32 (hBrush);
|
||||
|
||||
|
||||
|
||||
if (infoPtr->flags & TB_THUMBCHANGED)
|
||||
TRACKBAR_CalcThumb (wndPtr, infoPtr);
|
||||
if (infoPtr->flags & TB_SELECTIONCHANGED)
|
||||
TRACKBAR_CalcSelection (wndPtr, infoPtr);
|
||||
infoPtr->flags &= ~ (TB_THUMBCHANGED | TB_SELECTIONCHANGED);
|
||||
|
||||
/* draw channel */
|
||||
|
||||
rcChannel = infoPtr->rcChannel;
|
||||
rcSelection= infoPtr->rcSelection;
|
||||
DrawEdge32 (hdc, &rcChannel, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
|
||||
|
||||
if (wndPtr->dwStyle & TBS_ENABLESELRANGE) { /* fill the channel */
|
||||
HBRUSH32 hbr = CreateSolidBrush32 (RGB(255,255,255));
|
||||
FillRect32 (hdc, &rcChannel, hbr);
|
||||
if (rcSelection.left!=rcSelection.right) {
|
||||
hbr=CreateSolidBrush32 (COLOR_HIGHLIGHT);
|
||||
FillRect32 (hdc, &rcSelection, hbr);
|
||||
}
|
||||
DeleteObject32 (hbr);
|
||||
}
|
||||
|
||||
|
||||
/* draw tics */
|
||||
|
||||
if (!(wndPtr->dwStyle & TBS_NOTICKS)) {
|
||||
COLORREF clrTic=GetSysColor32 (COLOR_3DDKSHADOW);
|
||||
|
||||
x=rcChannel.left;
|
||||
y=rcChannel.bottom+2;
|
||||
range=infoPtr->nRangeMax - infoPtr->nRangeMin;
|
||||
width=rcChannel.right - rcChannel.left;
|
||||
if (wndPtr->dwStyle & TBS_VERT) { /* swap x/y */
|
||||
}
|
||||
|
||||
if ((wndPtr->dwStyle & TBS_TOP) || (wndPtr->dwStyle & TBS_BOTH)) {
|
||||
/* draw upper tics */
|
||||
}
|
||||
|
||||
// if (!((wndPtr->dwStyle & TBS_TOP) || (!(wndPtr->dwStyle & TBS_BOTH))))
|
||||
/* draw lower tics */
|
||||
// if (wndPtr->dwStyle & TBS_AUTOTICKS)
|
||||
for (i=0; i<infoPtr->uNumTics; i++) {
|
||||
tic=infoPtr->tics[i];
|
||||
if ((tic>infoPtr->nRangeMin) && (tic<infoPtr->nRangeMax)) {
|
||||
x=rcChannel.left + width*(65536*tic/range)/65536;
|
||||
SetPixel32 (hdc, x,y+5, clrTic);
|
||||
SetPixel32 (hdc, x,y+6, clrTic);
|
||||
SetPixel32 (hdc, x,y+7, clrTic);
|
||||
}
|
||||
}
|
||||
if ((wndPtr->dwStyle & TBS_ENABLESELRANGE) &&
|
||||
(rcSelection.left!=rcSelection.right)) {
|
||||
x=rcChannel.left + width*(65536*infoPtr->nSelMin/range)/65536 - 1;
|
||||
SetPixel32 (hdc, x,y+6, clrTic);
|
||||
SetPixel32 (hdc, x,y+7, clrTic);
|
||||
x=rcChannel.left + width*(65536*infoPtr->nSelMax/range)/65536 + 1;
|
||||
SetPixel32 (hdc, x,y+6, clrTic);
|
||||
SetPixel32 (hdc, x,y+7, clrTic);
|
||||
}
|
||||
|
||||
x=rcChannel.left;
|
||||
SetPixel32 (hdc, x,y+5, clrTic);
|
||||
SetPixel32 (hdc, x,y+6, clrTic);
|
||||
SetPixel32 (hdc, x,y+7, clrTic);
|
||||
SetPixel32 (hdc, x,y+8, clrTic);
|
||||
x=rcChannel.right;
|
||||
SetPixel32 (hdc, x,y+5, clrTic);
|
||||
SetPixel32 (hdc, x,y+6, clrTic);
|
||||
SetPixel32 (hdc, x,y+7, clrTic);
|
||||
SetPixel32 (hdc, x,y+8, clrTic);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
/* draw thumb */
|
||||
|
||||
if (!(wndPtr->dwStyle & TBS_NOTHUMB)) {
|
||||
HBRUSH32 hbr = CreateSolidBrush32 (COLOR_BACKGROUND);
|
||||
RECT32 thumb = infoPtr->rcThumb;
|
||||
|
||||
SelectObject32 (hdc, hbr);
|
||||
|
||||
if (wndPtr->dwStyle & TBS_BOTH) {
|
||||
FillRect32 (hdc, &thumb, hbr);
|
||||
DrawEdge32 (hdc, &thumb, EDGE_RAISED, BF_TOPLEFT);
|
||||
} else {
|
||||
|
||||
POINT32 points[6];
|
||||
RECT32 triangle; /* for correct shadows of thumb */
|
||||
|
||||
/* first, fill the thumb */
|
||||
|
||||
SetPolyFillMode32 (hdc,WINDING);
|
||||
points[0].x=thumb.left;
|
||||
points[0].y=thumb.top;
|
||||
points[1].x=thumb.right - 1;
|
||||
points[1].y=thumb.top;
|
||||
points[2].x=thumb.right - 1;
|
||||
points[2].y=thumb.bottom -2;
|
||||
points[3].x=(thumb.right + thumb.left-1)/2;
|
||||
points[3].y=thumb.bottom+4;
|
||||
points[4].x=thumb.left;
|
||||
points[4].y=thumb.bottom -2;
|
||||
points[5].x=points[0].x;
|
||||
points[5].y=points[0].y;
|
||||
Polygon32 (hdc, points, 6);
|
||||
DrawEdge32 (hdc, &thumb, EDGE_RAISED, BF_TOPLEFT);
|
||||
// DrawEdge32 (hdc, &thumb, EDGE_SUNKEN, BF_BOTTOMRIGHT);
|
||||
|
||||
/* draw notch */
|
||||
|
||||
triangle.right = thumb.right+5;
|
||||
triangle.left = points[3].x+5;
|
||||
triangle.top = thumb.bottom +5;
|
||||
triangle.bottom= thumb.bottom +1;
|
||||
DrawEdge32 (hdc, &triangle, EDGE_SUNKEN, BF_DIAGONAL | BF_TOP | BF_RIGHT);
|
||||
triangle.left = thumb.left+6;
|
||||
triangle.right = points[3].x+6;
|
||||
DrawEdge32 (hdc, &triangle, EDGE_RAISED, BF_DIAGONAL | BF_TOP | BF_LEFT);
|
||||
}
|
||||
DeleteObject32 (hbr);
|
||||
}
|
||||
|
||||
if (infoPtr->bFocus)
|
||||
DrawFocusRect32 (hdc, &rcClient);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static VOID
|
||||
TRACKBAR_AlignBuddies (WND *wndPtr, TRACKBAR_INFO *infoPtr)
|
||||
|
@ -169,6 +394,7 @@ TRACKBAR_ClearSel (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
infoPtr->nSelMin = 0;
|
||||
infoPtr->nSelMax = 0;
|
||||
infoPtr->flags |=TB_SELECTIONCHANGED;
|
||||
|
||||
if ((BOOL32)wParam) {
|
||||
HDC32 hdc = GetDC32 (wndPtr->hwndSelf);
|
||||
|
@ -186,10 +412,9 @@ TRACKBAR_ClearTics (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
|
||||
if (infoPtr->tics) {
|
||||
FIXME (trackbar, "is this correct??\n");
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr->tics);
|
||||
infoPtr->tics = NULL;
|
||||
infoPtr->uNumTics = 2;
|
||||
infoPtr->uNumTics = 0;
|
||||
}
|
||||
|
||||
if (wParam) {
|
||||
|
@ -207,8 +432,7 @@ TRACKBAR_GetBuddy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
|
||||
if (wParam)
|
||||
/* buddy is left or above */
|
||||
if (wParam) /* buddy is left or above */
|
||||
return (LRESULT)infoPtr->hwndBuddyLA;
|
||||
|
||||
/* buddy is right or below */
|
||||
|
@ -251,7 +475,7 @@ TRACKBAR_GetNumTics (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
if (wndPtr->dwStyle & TBS_NOTICKS)
|
||||
return 0;
|
||||
|
||||
return infoPtr->uNumTics;
|
||||
return infoPtr->uNumTics+2;
|
||||
}
|
||||
|
||||
|
||||
|
@ -273,7 +497,6 @@ TRACKBAR_GetPos (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
}
|
||||
|
||||
|
||||
// << TRACKBAR_GetPTics >>
|
||||
|
||||
|
||||
static LRESULT
|
||||
|
@ -320,13 +543,71 @@ TRACKBAR_GetThumbLength (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
return infoPtr->uThumbLen;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TRACKBAR_GetPTics (WND *wndPtr)
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
|
||||
return (LRESULT) infoPtr->tics;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TRACKBAR_GetThumbRect (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
LPRECT32 lprc = (LPRECT32)lParam;
|
||||
|
||||
if (lprc == NULL)
|
||||
return 0;
|
||||
|
||||
lprc->left = infoPtr->rcThumb.left;
|
||||
lprc->right = infoPtr->rcThumb.right;
|
||||
lprc->bottom = infoPtr->rcThumb.bottom;
|
||||
lprc->top = infoPtr->rcThumb.top;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// << TRACKBAR_GetThumbRect >>
|
||||
// case TBM_GETTIC:
|
||||
// case TBM_GETTICPOS:
|
||||
|
||||
|
||||
|
||||
static LRESULT
|
||||
TRACKBAR_GetTic (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
INT32 iTic;
|
||||
|
||||
iTic=(INT32) wParam;
|
||||
if ((iTic<0) || (iTic>infoPtr->uNumTics))
|
||||
return -1;
|
||||
|
||||
return (LRESULT) infoPtr->tics[iTic];
|
||||
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
TRACKBAR_GetTicPos (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
INT32 iTic, range, width, pos;
|
||||
|
||||
|
||||
iTic=(INT32 ) wParam;
|
||||
if ((iTic<0) || (iTic>infoPtr->uNumTics))
|
||||
return -1;
|
||||
|
||||
range=infoPtr->nRangeMax - infoPtr->nRangeMin;
|
||||
width=infoPtr->rcChannel.right - infoPtr->rcChannel.left;
|
||||
pos=infoPtr->rcChannel.left + width*(65536*infoPtr->tics[iTic]/range)/65536;
|
||||
|
||||
|
||||
return (LRESULT) pos;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TRACKBAR_GetToolTips (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -404,6 +685,7 @@ TRACKBAR_SetPos (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
if (infoPtr->nPos > infoPtr->nRangeMax)
|
||||
infoPtr->nPos = infoPtr->nRangeMax;
|
||||
infoPtr->flags |=TB_THUMBCHANGED;
|
||||
|
||||
if (wParam) {
|
||||
HDC32 hdc = GetDC32 (wndPtr->hwndSelf);
|
||||
|
@ -419,15 +701,21 @@ static LRESULT
|
|||
TRACKBAR_SetRange (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
|
||||
infoPtr->nRangeMin = (INT32)LOWORD(lParam);
|
||||
infoPtr->nRangeMax = (INT32)HIWORD(lParam);
|
||||
|
||||
if (infoPtr->nPos < infoPtr->nRangeMin)
|
||||
if (infoPtr->nPos < infoPtr->nRangeMin) {
|
||||
infoPtr->nPos = infoPtr->nRangeMin;
|
||||
infoPtr->flags |=TB_THUMBCHANGED;
|
||||
}
|
||||
|
||||
if (infoPtr->nPos > infoPtr->nRangeMax)
|
||||
if (infoPtr->nPos > infoPtr->nRangeMax) {
|
||||
infoPtr->nPos = infoPtr->nRangeMax;
|
||||
infoPtr->flags |=TB_THUMBCHANGED;
|
||||
}
|
||||
|
||||
infoPtr->nPageSize=(infoPtr->nRangeMax - infoPtr->nRangeMin)/5;
|
||||
TRACKBAR_RecalculateTics (infoPtr);
|
||||
|
||||
if (wParam) {
|
||||
HDC32 hdc = GetDC32 (wndPtr->hwndSelf);
|
||||
|
@ -445,8 +733,13 @@ TRACKBAR_SetRangeMax (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
|
||||
infoPtr->nRangeMax = (INT32)lParam;
|
||||
if (infoPtr->nPos > infoPtr->nRangeMax)
|
||||
if (infoPtr->nPos > infoPtr->nRangeMax) {
|
||||
infoPtr->nPos = infoPtr->nRangeMax;
|
||||
infoPtr->flags |=TB_THUMBCHANGED;
|
||||
}
|
||||
|
||||
infoPtr->nPageSize=(infoPtr->nRangeMax - infoPtr->nRangeMin)/5;
|
||||
TRACKBAR_RecalculateTics (infoPtr);
|
||||
|
||||
if (wParam) {
|
||||
HDC32 hdc = GetDC32 (wndPtr->hwndSelf);
|
||||
|
@ -464,8 +757,13 @@ TRACKBAR_SetRangeMin (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
|
||||
infoPtr->nRangeMin = (INT32)lParam;
|
||||
if (infoPtr->nPos < infoPtr->nRangeMin)
|
||||
if (infoPtr->nPos < infoPtr->nRangeMin) {
|
||||
infoPtr->nPos = infoPtr->nRangeMin;
|
||||
infoPtr->flags |=TB_THUMBCHANGED;
|
||||
}
|
||||
|
||||
infoPtr->nPageSize=(infoPtr->nRangeMax - infoPtr->nRangeMin)/5;
|
||||
TRACKBAR_RecalculateTics (infoPtr);
|
||||
|
||||
if (wParam) {
|
||||
HDC32 hdc = GetDC32 (wndPtr->hwndSelf);
|
||||
|
@ -476,17 +774,35 @@ TRACKBAR_SetRangeMin (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TRACKBAR_SetTicFreq (WND *wndPtr, WPARAM32 wParam)
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
HDC32 hdc;
|
||||
|
||||
if (wndPtr->dwStyle & TBS_AUTOTICKS)
|
||||
infoPtr->uTicFreq=(UINT32) wParam;
|
||||
|
||||
TRACKBAR_RecalculateTics (infoPtr);
|
||||
|
||||
hdc = GetDC32 (wndPtr->hwndSelf);
|
||||
TRACKBAR_Refresh (wndPtr, hdc);
|
||||
ReleaseDC32 (wndPtr->hwndSelf, hdc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
TRACKBAR_SetSel (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
|
||||
if (!wndPtr->dwStyle & TBS_ENABLESELRANGE)
|
||||
return 0;
|
||||
|
||||
infoPtr->nSelMin = (INT32)LOWORD(lParam);
|
||||
infoPtr->nSelMax = (INT32)HIWORD(lParam);
|
||||
infoPtr->flags |=TB_SELECTIONCHANGED;
|
||||
|
||||
if (!wndPtr->dwStyle & TBS_ENABLESELRANGE)
|
||||
return 0;
|
||||
|
||||
if (infoPtr->nSelMin < infoPtr->nRangeMin)
|
||||
infoPtr->nSelMin = infoPtr->nRangeMin;
|
||||
|
@ -512,6 +828,8 @@ TRACKBAR_SetSelEnd (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
return 0;
|
||||
|
||||
infoPtr->nSelMax = (INT32)lParam;
|
||||
infoPtr->flags |=TB_SELECTIONCHANGED;
|
||||
|
||||
if (infoPtr->nSelMax > infoPtr->nRangeMax)
|
||||
infoPtr->nSelMax = infoPtr->nRangeMax;
|
||||
|
||||
|
@ -534,6 +852,7 @@ TRACKBAR_SetSelStart (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
return 0;
|
||||
|
||||
infoPtr->nSelMin = (INT32)lParam;
|
||||
infoPtr->flags |=TB_SELECTIONCHANGED;
|
||||
if (infoPtr->nSelMin < infoPtr->nRangeMin)
|
||||
infoPtr->nSelMin = infoPtr->nRangeMin;
|
||||
|
||||
|
@ -551,10 +870,16 @@ static LRESULT
|
|||
TRACKBAR_SetThumbLength (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
HDC32 hdc;
|
||||
|
||||
if (wndPtr->dwStyle & TBS_FIXEDLENGTH)
|
||||
infoPtr->uThumbLen = (UINT32)wParam;
|
||||
|
||||
hdc = GetDC32 (wndPtr->hwndSelf);
|
||||
infoPtr->flags |=TB_THUMBCHANGED;
|
||||
TRACKBAR_Refresh (wndPtr, hdc);
|
||||
ReleaseDC32 (wndPtr->hwndSelf, hdc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -564,19 +889,24 @@ TRACKBAR_SetTic (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
INT32 nPos = (INT32)lParam;
|
||||
HDC32 hdc;
|
||||
|
||||
if (nPos < infoPtr->nRangeMin)
|
||||
return FALSE;
|
||||
if (nPos > infoPtr->nRangeMax)
|
||||
if ((nPos < infoPtr->nRangeMin) || (nPos> infoPtr->nRangeMax))
|
||||
return FALSE;
|
||||
|
||||
FIXME (trackbar, "%d - empty stub!\n", nPos);
|
||||
infoPtr->uNumTics++;
|
||||
infoPtr->tics=HeapReAlloc( SystemHeap, 0, infoPtr->tics,
|
||||
(infoPtr->uNumTics)*sizeof (DWORD));
|
||||
infoPtr->tics[infoPtr->uNumTics-1]=nPos;
|
||||
|
||||
hdc = GetDC32 (wndPtr->hwndSelf);
|
||||
TRACKBAR_Refresh (wndPtr, hdc);
|
||||
ReleaseDC32 (wndPtr->hwndSelf, hdc);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// case TBM_SETTICFREQ:
|
||||
|
||||
|
||||
static LRESULT
|
||||
|
@ -605,6 +935,19 @@ TRACKBAR_SetToolTips (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
// case TBM_SETUNICODEFORMAT:
|
||||
|
||||
|
||||
static LRESULT
|
||||
TRACKBAR_InitializeThumb (WND *wndPtr)
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
|
||||
infoPtr->uThumbLen = 23; /* initial thumb length */
|
||||
|
||||
TRACKBAR_Calc (wndPtr,infoPtr);
|
||||
TRACKBAR_CalcThumb (wndPtr, infoPtr);
|
||||
infoPtr->flags &= ~TB_SELECTIONCHANGED;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
|
@ -617,17 +960,20 @@ TRACKBAR_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
wndPtr->wExtra[0] = (DWORD)infoPtr;
|
||||
|
||||
|
||||
/* default values */
|
||||
infoPtr->nRangeMin = 0;
|
||||
infoPtr->nRangeMin = 0; /* default values */
|
||||
infoPtr->nRangeMax = 100;
|
||||
infoPtr->nLineSize = 1;
|
||||
infoPtr->nPageSize = 20;
|
||||
infoPtr->nSelMin = 0;
|
||||
infoPtr->nSelMax = 0;
|
||||
infoPtr->nPos = 0;
|
||||
infoPtr->uThumbLen = 23; /* initial thumb length */
|
||||
infoPtr->uNumTics = 2; /* default start and end tic */
|
||||
|
||||
infoPtr->uNumTics = 0; /* start and end tic are not included in count*/
|
||||
infoPtr->uTicFreq = 1;
|
||||
infoPtr->tics = NULL;
|
||||
infoPtr->clrBk = GetSysColor32 (COLOR_BACKGROUND);
|
||||
|
||||
TRACKBAR_InitializeThumb (wndPtr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -667,12 +1013,64 @@ static LRESULT
|
|||
TRACKBAR_LButtonDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
int prevPlace,range,width,clickPlace,prevPos;
|
||||
|
||||
SetFocus32 (wndPtr->hwndSelf);
|
||||
|
||||
clickPlace=(INT32)LOWORD(lParam);
|
||||
range=infoPtr->nRangeMax - infoPtr->nRangeMin;
|
||||
width=infoPtr->rcChannel.right - infoPtr->rcChannel.left;
|
||||
prevPlace = infoPtr->rcChannel.left +
|
||||
width*(65536*infoPtr->nPos/range)/65536;
|
||||
printf ("%d->%d\n",prevPlace,clickPlace);
|
||||
|
||||
prevPos = infoPtr->nPos;
|
||||
if (clickPlace > prevPlace) { /* similar to VK_NEXT */
|
||||
infoPtr->nPos += infoPtr->nPageSize;
|
||||
if (infoPtr->nPos > infoPtr->nRangeMax)
|
||||
infoPtr->nPos = infoPtr->nRangeMax;
|
||||
TRACKBAR_SendNotify (wndPtr, TB_PAGEUP);
|
||||
} else {
|
||||
infoPtr->nPos -= infoPtr->nPageSize; /* similar to VK_PRIOR */
|
||||
if (infoPtr->nPos < infoPtr->nRangeMin)
|
||||
infoPtr->nPos = infoPtr->nRangeMin;
|
||||
TRACKBAR_SendNotify (wndPtr, TB_PAGEDOWN);
|
||||
}
|
||||
|
||||
printf ("%d->%d\n",prevPos,infoPtr->nPos);
|
||||
if (prevPos!=infoPtr->nPos) {
|
||||
HDC32 hdc;
|
||||
|
||||
hdc=GetDC32 (wndPtr->hwndSelf);
|
||||
infoPtr->flags |=TB_THUMBCHANGED;
|
||||
TRACKBAR_Refresh (wndPtr, hdc);
|
||||
ReleaseDC32 (wndPtr->hwndSelf, hdc);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TRACKBAR_LButtonUp (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
|
||||
FIXME (trackbar,"stub\n");
|
||||
|
||||
TRACKBAR_SendNotify (wndPtr, TB_ENDTRACK);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TRACKBAR_CaptureChanged (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
FIXME (trackbar,"stub\n");
|
||||
|
||||
TRACKBAR_SendNotify (wndPtr, TB_ENDTRACK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TRACKBAR_Paint (WND *wndPtr, WPARAM32 wParam)
|
||||
|
@ -708,11 +1106,8 @@ static LRESULT
|
|||
TRACKBAR_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
RECT32 rcClient;
|
||||
|
||||
GetClientRect32 (wndPtr->hwndSelf, &rcClient);
|
||||
|
||||
TRACKBAR_Calc (wndPtr, infoPtr, &rcClient);
|
||||
TRACKBAR_Calc (wndPtr, infoPtr);
|
||||
TRACKBAR_AlignBuddies (wndPtr, infoPtr);
|
||||
|
||||
return 0;
|
||||
|
@ -720,9 +1115,111 @@ TRACKBAR_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
|
||||
// << TRACKBAR_Timer >>
|
||||
// << TRACKBAR_WinIniChange >>
|
||||
|
||||
|
||||
static BOOL32
|
||||
TRACKBAR_SendNotify (WND *wndPtr, UINT32 code)
|
||||
|
||||
{
|
||||
TRACE (trackbar, "%x\n",code);
|
||||
if (wndPtr->dwStyle & TBS_VERT)
|
||||
return (BOOL32) SendMessage32A (GetParent32 (wndPtr->hwndSelf),
|
||||
WM_VSCROLL, (WPARAM32)code, (LPARAM) wndPtr->hwndSelf);
|
||||
|
||||
return (BOOL32) SendMessage32A (GetParent32 (wndPtr->hwndSelf),
|
||||
WM_HSCROLL, (WPARAM32)code, (LPARAM) wndPtr->hwndSelf);
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TRACKBAR_MouseMove (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
TRACKBAR_KeyDown (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr(wndPtr);
|
||||
INT32 pos;
|
||||
|
||||
TRACE (trackbar, "%x\n",wParam);
|
||||
|
||||
pos=infoPtr->nPos;
|
||||
switch (wParam) {
|
||||
case VK_LEFT:
|
||||
case VK_UP:
|
||||
if (infoPtr->nPos == infoPtr->nRangeMin) return FALSE;
|
||||
infoPtr->nPos -= infoPtr->nLineSize;
|
||||
if (infoPtr->nPos < infoPtr->nRangeMin)
|
||||
infoPtr->nPos = infoPtr->nRangeMin;
|
||||
TRACKBAR_SendNotify (wndPtr, TB_LINEUP);
|
||||
break;
|
||||
case VK_RIGHT:
|
||||
case VK_DOWN:
|
||||
if (infoPtr->nPos == infoPtr->nRangeMax) return FALSE;
|
||||
infoPtr->nPos += infoPtr->nLineSize;
|
||||
if (infoPtr->nPos > infoPtr->nRangeMax)
|
||||
infoPtr->nPos = infoPtr->nRangeMax;
|
||||
TRACKBAR_SendNotify (wndPtr, TB_LINEDOWN);
|
||||
break;
|
||||
case VK_NEXT:
|
||||
if (infoPtr->nPos == infoPtr->nRangeMax) return FALSE;
|
||||
infoPtr->nPos += infoPtr->nPageSize;
|
||||
if (infoPtr->nPos > infoPtr->nRangeMax)
|
||||
infoPtr->nPos = infoPtr->nRangeMax;
|
||||
TRACKBAR_SendNotify (wndPtr, TB_PAGEUP);
|
||||
break;
|
||||
case VK_PRIOR:
|
||||
if (infoPtr->nPos == infoPtr->nRangeMin) return FALSE;
|
||||
infoPtr->nPos -= infoPtr->nPageSize;
|
||||
if (infoPtr->nPos < infoPtr->nRangeMin)
|
||||
infoPtr->nPos = infoPtr->nRangeMin;
|
||||
TRACKBAR_SendNotify (wndPtr, TB_PAGEDOWN);
|
||||
break;
|
||||
case VK_HOME:
|
||||
if (infoPtr->nPos == infoPtr->nRangeMin) return FALSE;
|
||||
infoPtr->nPos = infoPtr->nRangeMin;
|
||||
TRACKBAR_SendNotify (wndPtr, TB_TOP);
|
||||
break;
|
||||
case VK_END:
|
||||
if (infoPtr->nPos == infoPtr->nRangeMax) return FALSE;
|
||||
infoPtr->nPos = infoPtr->nRangeMax;
|
||||
TRACKBAR_SendNotify (wndPtr, TB_BOTTOM);
|
||||
break;
|
||||
}
|
||||
|
||||
if (pos!=infoPtr->nPos) {
|
||||
HDC32 hdc;
|
||||
|
||||
hdc=GetDC32 (wndPtr->hwndSelf);
|
||||
infoPtr->flags |=TB_THUMBCHANGED;
|
||||
TRACKBAR_Refresh (wndPtr, hdc);
|
||||
ReleaseDC32 (wndPtr->hwndSelf, hdc);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TRACKBAR_KeyUp (WND *wndPtr, WPARAM32 wParam)
|
||||
{
|
||||
switch (wParam) {
|
||||
case VK_LEFT:
|
||||
case VK_UP:
|
||||
case VK_RIGHT:
|
||||
case VK_DOWN:
|
||||
case VK_NEXT:
|
||||
case VK_PRIOR:
|
||||
case VK_HOME:
|
||||
case VK_END: TRACKBAR_SendNotify (wndPtr, TB_ENDTRACK);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LRESULT WINAPI
|
||||
TRACKBAR_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -754,7 +1251,8 @@ TRACKBAR_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
|||
case TBM_GETPOS:
|
||||
return TRACKBAR_GetPos (wndPtr, wParam, lParam);
|
||||
|
||||
// case TBM_GETPTICS:
|
||||
case TBM_GETPTICS:
|
||||
return TRACKBAR_GetPTics (wndPtr);
|
||||
|
||||
case TBM_GETRANGEMAX:
|
||||
return TRACKBAR_GetRangeMax (wndPtr, wParam, lParam);
|
||||
|
@ -771,9 +1269,14 @@ TRACKBAR_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
|||
case TBM_GETTHUMBLENGTH:
|
||||
return TRACKBAR_GetThumbLength (wndPtr, wParam, lParam);
|
||||
|
||||
// case TBM_GETTHUMBRECT:
|
||||
// case TBM_GETTIC:
|
||||
// case TBM_GETTICPOS:
|
||||
case TBM_GETTHUMBRECT:
|
||||
return TRACKBAR_GetThumbRect (wndPtr, wParam, lParam);
|
||||
|
||||
case TBM_GETTIC:
|
||||
return TRACKBAR_GetTic (wndPtr, wParam, lParam);
|
||||
|
||||
case TBM_GETTICPOS:
|
||||
return TRACKBAR_GetTicPos (wndPtr, wParam, lParam);
|
||||
|
||||
case TBM_GETTOOLTIPS:
|
||||
return TRACKBAR_GetToolTips (wndPtr, wParam, lParam);
|
||||
|
@ -816,7 +1319,9 @@ TRACKBAR_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
|||
case TBM_SETTIC:
|
||||
return TRACKBAR_SetTic (wndPtr, wParam, lParam);
|
||||
|
||||
// case TBM_SETTICFREQ:
|
||||
case TBM_SETTICFREQ:
|
||||
return TRACKBAR_SetTicFreq (wndPtr, wParam);
|
||||
|
||||
|
||||
case TBM_SETTIPSIDE:
|
||||
return TRACKBAR_SetTipSide (wndPtr, wParam, lParam);
|
||||
|
@ -827,7 +1332,8 @@ TRACKBAR_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
|||
// case TBM_SETUNICODEFORMAT:
|
||||
|
||||
|
||||
// case WM_CAPTURECHANGED:
|
||||
case WM_CAPTURECHANGED:
|
||||
return TRACKBAR_CaptureChanged (wndPtr, wParam, lParam);
|
||||
|
||||
case WM_CREATE:
|
||||
return TRACKBAR_Create (wndPtr, wParam, lParam);
|
||||
|
@ -843,9 +1349,11 @@ TRACKBAR_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
|||
case WM_GETDLGCODE:
|
||||
return DLGC_WANTARROWS;
|
||||
|
||||
// case WM_KEYDOWN:
|
||||
case WM_KEYDOWN:
|
||||
return TRACKBAR_KeyDown (wndPtr, wParam, lParam);
|
||||
|
||||
// case WM_KEYUP:
|
||||
case WM_KEYUP:
|
||||
return TRACKBAR_KeyUp (wndPtr, wParam);
|
||||
|
||||
case WM_KILLFOCUS:
|
||||
return TRACKBAR_KillFocus (wndPtr, wParam, lParam);
|
||||
|
@ -853,10 +1361,11 @@ TRACKBAR_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
|||
case WM_LBUTTONDOWN:
|
||||
return TRACKBAR_LButtonDown (wndPtr, wParam, lParam);
|
||||
|
||||
// case WM_LBUTTONUP:
|
||||
case WM_LBUTTONUP:
|
||||
return TRACKBAR_LButtonUp (wndPtr, wParam, lParam);
|
||||
|
||||
// case WM_MOUSEMOVE:
|
||||
// return TRACKBAR_MouseMove (wndPtr, wParam, lParam);
|
||||
case WM_MOUSEMOVE:
|
||||
return TRACKBAR_MouseMove (wndPtr, wParam, lParam);
|
||||
|
||||
case WM_PAINT:
|
||||
return TRACKBAR_Paint (wndPtr, wParam);
|
||||
|
@ -869,7 +1378,8 @@ TRACKBAR_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
|||
|
||||
// case WM_TIMER:
|
||||
|
||||
// case WM_WININICHANGE:
|
||||
case WM_WININICHANGE:
|
||||
return TRACKBAR_InitializeThumb (wndPtr);
|
||||
|
||||
default:
|
||||
if (uMsg >= WM_USER)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -27,14 +27,12 @@
|
|||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "windows.h"
|
||||
#include "commctrl.h"
|
||||
#include "winnls.h"
|
||||
#include "sysmetrics.h"
|
||||
#include "updown.h"
|
||||
#include "graphics.h"
|
||||
#include "heap.h"
|
||||
#include "win.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -249,7 +247,7 @@ static BOOL32 UPDOWN_SetBuddyInt(WND *wndPtr)
|
|||
if (!(wndPtr->dwStyle & UDS_NOTHOUSANDS)) {
|
||||
char txt2[20], *src = txt1, *dst = txt2;
|
||||
if(len%3 > 0){
|
||||
strncpy(dst, src, len%3);
|
||||
lstrcpyn32A (dst, src, len%3);
|
||||
dst += len%3;
|
||||
src += len%3;
|
||||
}
|
||||
|
@ -597,9 +595,7 @@ LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
|
|||
return TRUE;
|
||||
|
||||
case WM_CREATE:
|
||||
infoPtr =
|
||||
(UPDOWN_INFO*)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY,
|
||||
sizeof(UPDOWN_INFO));
|
||||
infoPtr = (UPDOWN_INFO*)COMCTL32_Alloc (sizeof(UPDOWN_INFO));
|
||||
wndPtr->wExtra[0] = (DWORD)infoPtr;
|
||||
|
||||
/* initialize the info struct */
|
||||
|
@ -618,9 +614,9 @@ LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
|
|||
|
||||
case WM_DESTROY:
|
||||
if(infoPtr->AccelVect)
|
||||
free(infoPtr->AccelVect);
|
||||
COMCTL32_Free (infoPtr->AccelVect);
|
||||
|
||||
HeapFree (GetProcessHeap (), 0, infoPtr);
|
||||
COMCTL32_Free (infoPtr);
|
||||
wndPtr->wExtra[0] = 0;
|
||||
|
||||
TRACE(updown, "UpDown Ctrl destruction, hwnd=%04x\n", hwnd);
|
||||
|
@ -715,13 +711,13 @@ LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
|
|||
case UDM_SETACCEL:
|
||||
TRACE(updown, "UpDown Ctrl new accel info, hwnd=%04x\n", hwnd);
|
||||
if(infoPtr->AccelVect){
|
||||
free(infoPtr->AccelVect);
|
||||
COMCTL32_Free (infoPtr->AccelVect);
|
||||
infoPtr->AccelCount = 0;
|
||||
infoPtr->AccelVect = 0;
|
||||
}
|
||||
if(wParam==0)
|
||||
return TRUE;
|
||||
infoPtr->AccelVect = malloc(wParam*sizeof(UDACCEL));
|
||||
infoPtr->AccelVect = COMCTL32_Alloc (wParam*sizeof(UDACCEL));
|
||||
if(infoPtr->AccelVect==0)
|
||||
return FALSE;
|
||||
memcpy(infoPtr->AccelVect, (void*)lParam, wParam*sizeof(UDACCEL));
|
||||
|
@ -816,7 +812,7 @@ LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
|
|||
|
||||
default:
|
||||
if (message >= WM_USER)
|
||||
WARN(updown, "unknown msg %04x wp=%04x lp=%08lx\n",
|
||||
ERR (updown, "unknown msg %04x wp=%04x lp=%08lx\n",
|
||||
message, wParam, lParam);
|
||||
return DefWindowProc32A (hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
DEFS = @DLLFLAGS@ -D__WINE__
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = psapi
|
||||
|
||||
C_SRCS = \
|
||||
psapi_main.c
|
||||
|
||||
all: $(MODULE).o
|
||||
|
||||
@MAKE_RULES@
|
||||
|
||||
### Dependencies:
|
||||
|
|
@ -0,0 +1,301 @@
|
|||
/*
|
||||
* PSAPI library
|
||||
*
|
||||
* Copyright 1998 Patrik Stridvall
|
||||
*/
|
||||
|
||||
#include "windows.h"
|
||||
#include "winbase.h"
|
||||
#include "wintypes.h"
|
||||
#include "winerror.h"
|
||||
#include "debug.h"
|
||||
#include "psapi.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/***********************************************************************
|
||||
* EmptyWorkingSet (PSAPI.1)
|
||||
*/
|
||||
BOOL32 WINAPI EmptyWorkingSet32(HANDLE32 hProcess)
|
||||
{
|
||||
return SetProcessWorkingSetSize(hProcess, 0xFFFFFFFF, 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* EnumDeviceDrivers (PSAPI.2)
|
||||
*/
|
||||
BOOL32 WINAPI EnumDeviceDrivers(
|
||||
LPVOID *lpImageBase, DWORD cb, LPDWORD lpcbNeeded)
|
||||
{
|
||||
FIXME(psapi, "(%p, %ld, %p): stub\n", lpImageBase, cb, lpcbNeeded);
|
||||
|
||||
if(lpcbNeeded)
|
||||
*lpcbNeeded = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* EnumProcesses (PSAPI.3)
|
||||
*/
|
||||
BOOL32 WINAPI EnumProcesses(DWORD *lpidProcess, DWORD cb, DWORD *lpcbNeeded)
|
||||
{
|
||||
FIXME(psapi, "(%p, %ld, %p): stub\n", lpidProcess,cb, lpcbNeeded);
|
||||
|
||||
if(lpcbNeeded)
|
||||
*lpcbNeeded = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* EnumProcessModules (PSAPI.4)
|
||||
*/
|
||||
BOOL32 WINAPI EnumProcessModules(
|
||||
HANDLE32 hProcess, HMODULE32 *lphModule, DWORD cb, LPDWORD lpcbNeeded)
|
||||
{
|
||||
FIXME(psapi, "(hProcess=0x%08x, %p, %ld, %p): stub\n",
|
||||
hProcess, lphModule, cb, lpcbNeeded
|
||||
);
|
||||
|
||||
if(lpcbNeeded)
|
||||
*lpcbNeeded = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetDeviceDriverBaseName32A (PSAPI.5)
|
||||
*/
|
||||
DWORD WINAPI GetDeviceDriverBaseName32A(
|
||||
LPVOID ImageBase, LPSTR lpBaseName, DWORD nSize)
|
||||
{
|
||||
FIXME(psapi, "(%p, %s, %ld): stub\n",
|
||||
ImageBase, debugstr_a(lpBaseName), nSize
|
||||
);
|
||||
|
||||
if(lpBaseName && nSize)
|
||||
lpBaseName[0] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetDeviceDriverBaseName32W (PSAPI.6)
|
||||
*/
|
||||
DWORD WINAPI GetDeviceDriverBaseName32W(
|
||||
LPVOID ImageBase, LPWSTR lpBaseName, DWORD nSize)
|
||||
{
|
||||
FIXME(psapi, "(%p, %s, %ld): stub\n",
|
||||
ImageBase, debugstr_w(lpBaseName), nSize
|
||||
);
|
||||
|
||||
if(lpBaseName && nSize)
|
||||
lpBaseName[0] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetDeviceDriverFileName32A (PSAPI.7)
|
||||
*/
|
||||
DWORD WINAPI GetDeviceDriverFileName32A(
|
||||
LPVOID ImageBase, LPSTR lpFilename, DWORD nSize)
|
||||
{
|
||||
FIXME(psapi, "(%p, %s, %ld): stub\n",
|
||||
ImageBase, debugstr_a(lpFilename), nSize
|
||||
);
|
||||
|
||||
if(lpFilename && nSize)
|
||||
lpFilename[0] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetDeviceDriverFileName32W (PSAPI.8)
|
||||
*/
|
||||
DWORD WINAPI GetDeviceDriverFileName32W(
|
||||
LPVOID ImageBase, LPWSTR lpFilename, DWORD nSize)
|
||||
{
|
||||
FIXME(psapi, "(%p, %s, %ld): stub\n",
|
||||
ImageBase, debugstr_w(lpFilename), nSize
|
||||
);
|
||||
|
||||
if(lpFilename && nSize)
|
||||
lpFilename[0] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetMappedFileName32A (PSAPI.9)
|
||||
*/
|
||||
DWORD WINAPI GetMappedFileName32A(
|
||||
HANDLE32 hProcess, LPVOID lpv, LPSTR lpFilename, DWORD nSize)
|
||||
{
|
||||
FIXME(psapi, "(hProcess=0x%08x, %p, %s, %ld): stub\n",
|
||||
hProcess, lpv, debugstr_a(lpFilename), nSize
|
||||
);
|
||||
|
||||
if(lpFilename && nSize)
|
||||
lpFilename[0] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetMappedFileName32W (PSAPI.10)
|
||||
*/
|
||||
DWORD WINAPI GetMappedFileName32W(
|
||||
HANDLE32 hProcess, LPVOID lpv, LPWSTR lpFilename, DWORD nSize)
|
||||
{
|
||||
FIXME(psapi, "(hProcess=0x%08x, %p, %s, %ld): stub\n",
|
||||
hProcess, lpv, debugstr_w(lpFilename), nSize
|
||||
);
|
||||
|
||||
if(lpFilename && nSize)
|
||||
lpFilename[0] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetModuleBaseName32A (PSAPI.11)
|
||||
*/
|
||||
DWORD WINAPI GetModuleBaseName32A(
|
||||
HANDLE32 hProcess, HMODULE32 hModule, LPSTR lpBaseName, DWORD nSize)
|
||||
{
|
||||
FIXME(psapi, "(hProcess=0x%08x, hModule=0x%08x, %s, %ld): stub\n",
|
||||
hProcess, hModule, debugstr_a(lpBaseName), nSize
|
||||
);
|
||||
|
||||
if(lpBaseName && nSize)
|
||||
lpBaseName[0] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetModuleBaseName32W (PSAPI.12)
|
||||
*/
|
||||
DWORD WINAPI GetModuleBaseName32W(
|
||||
HANDLE32 hProcess, HMODULE32 hModule, LPWSTR lpBaseName, DWORD nSize)
|
||||
{
|
||||
FIXME(psapi, "(hProcess=0x%08x, hModule=0x%08x, %s, %ld): stub\n",
|
||||
hProcess, hModule, debugstr_w(lpBaseName), nSize);
|
||||
|
||||
if(lpBaseName && nSize)
|
||||
lpBaseName[0] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetModuleFileNameEx32A (PSAPI.13)
|
||||
*/
|
||||
DWORD WINAPI GetModuleFileNameEx32A(
|
||||
HANDLE32 hProcess, HMODULE32 hModule, LPSTR lpFilename, DWORD nSize)
|
||||
{
|
||||
FIXME(psapi, "(hProcess=0x%08x,hModule=0x%08x, %s, %ld): stub\n",
|
||||
hProcess, hModule, debugstr_a(lpFilename), nSize
|
||||
);
|
||||
|
||||
if(lpFilename&&nSize)
|
||||
lpFilename[0]='\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetModuleFileNameEx32W (PSAPI.14)
|
||||
*/
|
||||
DWORD WINAPI GetModuleFileNameEx32W(
|
||||
HANDLE32 hProcess, HMODULE32 hModule, LPWSTR lpFilename, DWORD nSize)
|
||||
{
|
||||
FIXME(psapi, "(hProcess=0x%08x,hModule=0x%08x, %s, %ld): stub\n",
|
||||
hProcess, hModule, debugstr_w(lpFilename), nSize
|
||||
);
|
||||
|
||||
if(lpFilename && nSize)
|
||||
lpFilename[0] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetModuleInformation32 (PSAPI.15)
|
||||
*/
|
||||
BOOL32 WINAPI GetModuleInformation32(
|
||||
HANDLE32 hProcess, HMODULE32 hModule, LPMODULEINFO32 lpmodinfo, DWORD cb)
|
||||
{
|
||||
FIXME(psapi, "(hProcess=0x%08x, hModule=0x%08x, %p, %ld): stub\n",
|
||||
hProcess, hModule, lpmodinfo, cb
|
||||
);
|
||||
|
||||
memset(lpmodinfo, 0, cb);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetProcessMemoryInfo32 (PSAPI.16)
|
||||
*/
|
||||
BOOL32 WINAPI GetProcessMemoryInfo32(
|
||||
HANDLE32 Process, PPROCESS_MEMORY_COUNTERS32 ppsmemCounters, DWORD cb)
|
||||
{
|
||||
FIXME(psapi, "(hProcess=0x%08x, %p, %ld): stub\n",
|
||||
Process, ppsmemCounters, cb
|
||||
);
|
||||
|
||||
memset(ppsmemCounters, 0, cb);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetWsChanges32 (PSAPI.17)
|
||||
*/
|
||||
BOOL32 WINAPI GetWsChanges32(
|
||||
HANDLE32 hProcess, PPSAPI_WS_WATCH_INFORMATION32 lpWatchInfo, DWORD cb)
|
||||
{
|
||||
FIXME(psapi, "(hProcess=0x%08x, %p, %ld): stub\n",
|
||||
hProcess, lpWatchInfo, cb
|
||||
);
|
||||
|
||||
memset(lpWatchInfo, 0, cb);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* InitializeProcessForWsWatch32 (PSAPI.18)
|
||||
*/
|
||||
BOOL32 WINAPI InitializeProcessForWsWatch32(HANDLE32 hProcess)
|
||||
{
|
||||
FIXME(psapi, "(hProcess=0x%08x): stub\n", hProcess);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* QueryWorkingSet32 (PSAPI.?)
|
||||
* FIXME
|
||||
* I haven't been able to find the ordinal for this function,
|
||||
* This means it can't be called from outside the DLL.
|
||||
*/
|
||||
BOOL32 WINAPI QueryWorkingSet32(HANDLE32 hProcess, LPVOID pv, DWORD cb)
|
||||
{
|
||||
FIXME(psapi, "(hProcess=0x%08x, %p, %ld)", hProcess, pv, cb);
|
||||
|
||||
if(pv && cb)
|
||||
((DWORD *) pv)[0] = 0; /* Empty WorkingSet */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -8,6 +8,7 @@ WRCEXTRA = -A -p $*
|
|||
|
||||
C_SRCS = \
|
||||
contmenu.c \
|
||||
dataobject.c \
|
||||
enumidlist.c \
|
||||
folders.c \
|
||||
pidl.c \
|
||||
|
|
|
@ -10,11 +10,6 @@
|
|||
#include "shlobj.h"
|
||||
#include "shell32_main.h"
|
||||
|
||||
#define IDM_EXPLORE 0
|
||||
#define IDM_OPEN 1
|
||||
#define IDM_RENAME 2
|
||||
#define IDM_LAST IDM_RENAME
|
||||
|
||||
#define __T(x) x
|
||||
#define _T(x) __T(x)
|
||||
#define TEXT _T
|
||||
|
@ -132,8 +127,26 @@ LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST *a
|
|||
TRACE(shell,"(%p)->()\n",cm);
|
||||
return cm;
|
||||
}
|
||||
/**************************************************************************
|
||||
* ICM_InsertItem()
|
||||
*/
|
||||
static void ICM_InsertItem (HMENU32 hmenu, UINT32 indexMenu, UINT32 wID, UINT32 fType, LPSTR dwTypeData, UINT32 fState)
|
||||
{ MENUITEMINFO32A mii;
|
||||
|
||||
|
||||
ZeroMemory(&mii, sizeof(mii));
|
||||
mii.cbSize = sizeof(mii);
|
||||
if (fType == MFT_SEPARATOR)
|
||||
{ mii.fMask = MIIM_ID | MIIM_TYPE;
|
||||
}
|
||||
else
|
||||
{ mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
|
||||
mii.dwTypeData = dwTypeData;
|
||||
mii.fState = MFS_ENABLED | MFS_DEFAULT;
|
||||
}
|
||||
mii.wID = wID;
|
||||
mii.fType = fType;
|
||||
InsertMenuItem32A( hmenu, indexMenu, TRUE, &mii);
|
||||
}
|
||||
/**************************************************************************
|
||||
* IContextMenu_QueryContextMenu()
|
||||
*/
|
||||
|
@ -141,67 +154,24 @@ LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST *a
|
|||
static HRESULT WINAPI IContextMenu_QueryContextMenu( LPCONTEXTMENU this, HMENU32 hmenu,
|
||||
UINT32 indexMenu,UINT32 idCmdFirst,UINT32 idCmdLast,UINT32 uFlags)
|
||||
{ BOOL32 fExplore ;
|
||||
MENUITEMINFO32A mii;
|
||||
|
||||
TRACE(shell,"(%p)->(hmenu=%x indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n",this, hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
|
||||
|
||||
if(!(CMF_DEFAULTONLY & uFlags))
|
||||
{ if(!this->bAllValues)
|
||||
{ fExplore = uFlags & CMF_EXPLORE;
|
||||
if(fExplore)
|
||||
{ ZeroMemory(&mii, sizeof(mii));
|
||||
mii.cbSize = sizeof(mii);
|
||||
mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
|
||||
mii.wID = idCmdFirst + IDM_EXPLORE;
|
||||
mii.fType = MFT_STRING;
|
||||
mii.dwTypeData = TEXT("&Explore");
|
||||
mii.fState = MFS_ENABLED | MFS_DEFAULT;
|
||||
InsertMenuItem32A( hmenu, indexMenu++, TRUE, &mii);
|
||||
|
||||
ZeroMemory(&mii, sizeof(mii));
|
||||
mii.cbSize = sizeof(mii);
|
||||
mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
|
||||
mii.wID = idCmdFirst + IDM_OPEN;
|
||||
mii.fType = MFT_STRING;
|
||||
mii.dwTypeData = TEXT("&Open");
|
||||
mii.fState = MFS_ENABLED;
|
||||
InsertMenuItem32A( hmenu, indexMenu++, TRUE, &mii);
|
||||
{ ICM_InsertItem(hmenu, indexMenu++, idCmdFirst+IDM_EXPLORE, MFT_STRING, TEXT("&Explore"), MFS_ENABLED|MFS_DEFAULT);
|
||||
ICM_InsertItem(hmenu, indexMenu++, idCmdFirst+IDM_OPEN, MFT_STRING, TEXT("&Open"), MFS_ENABLED);
|
||||
}
|
||||
else
|
||||
{ ZeroMemory(&mii, sizeof(mii));
|
||||
mii.cbSize = sizeof(mii);
|
||||
mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
|
||||
mii.wID = idCmdFirst + IDM_OPEN;
|
||||
mii.fType = MFT_STRING;
|
||||
mii.dwTypeData = TEXT("&Open");
|
||||
mii.fState = MFS_ENABLED | MFS_DEFAULT;
|
||||
InsertMenuItem32A( hmenu, indexMenu++, TRUE, &mii);
|
||||
|
||||
ZeroMemory(&mii, sizeof(mii));
|
||||
mii.cbSize = sizeof(mii);
|
||||
mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
|
||||
mii.wID = idCmdFirst + IDM_EXPLORE;
|
||||
mii.fType = MFT_STRING;
|
||||
mii.dwTypeData = TEXT("&Explore");
|
||||
mii.fState = MFS_ENABLED;
|
||||
InsertMenuItem32A( hmenu, indexMenu++, TRUE, &mii);
|
||||
{ ICM_InsertItem(hmenu, indexMenu++, idCmdFirst+IDM_OPEN, MFT_STRING, TEXT("&Open"), MFS_ENABLED|MFS_DEFAULT);
|
||||
ICM_InsertItem(hmenu, indexMenu++, idCmdFirst+IDM_EXPLORE, MFT_STRING, TEXT("&Explore"), MFS_ENABLED);
|
||||
}
|
||||
|
||||
if(uFlags & CMF_CANRENAME)
|
||||
{ ZeroMemory(&mii, sizeof(mii));
|
||||
mii.cbSize = sizeof(mii);
|
||||
mii.fMask = MIIM_ID | MIIM_TYPE;
|
||||
mii.wID = 0;
|
||||
mii.fType = MFT_SEPARATOR;
|
||||
InsertMenuItem32A( hmenu, indexMenu++, TRUE, &mii);
|
||||
|
||||
ZeroMemory(&mii, sizeof(mii));
|
||||
mii.cbSize = sizeof(mii);
|
||||
mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
|
||||
mii.wID = idCmdFirst + IDM_RENAME;
|
||||
mii.fType = MFT_STRING;
|
||||
mii.dwTypeData = TEXT("&Rename");
|
||||
mii.fState = (IContextMenu_CanRenameItems(this) ? MFS_ENABLED : MFS_DISABLED);
|
||||
InsertMenuItem32A( hmenu, indexMenu++, TRUE, &mii);
|
||||
{ ICM_InsertItem(hmenu, indexMenu++, 0, MFT_SEPARATOR, NULL, 0);
|
||||
ICM_InsertItem(hmenu, indexMenu++, idCmdFirst+IDM_RENAME, MFT_STRING, TEXT("&Rename"), (IContextMenu_CanRenameItems(this) ? MFS_ENABLED : MFS_DISABLED));
|
||||
}
|
||||
}
|
||||
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (IDM_LAST + 1));
|
||||
|
@ -231,7 +201,7 @@ static HRESULT WINAPI IContextMenu_InvokeCommand(LPCONTEXTMENU this, LPCMINVOKEC
|
|||
{ case IDM_EXPLORE:
|
||||
case IDM_OPEN:
|
||||
/* Find the first item in the list that is not a value. These commands
|
||||
should never be invoked if there isn't at least one key item in the list.*/
|
||||
should never be invoked if there isn't at least one folder item in the list.*/
|
||||
|
||||
for(i = 0; this->aPidls[i]; i++)
|
||||
{ if(!_ILIsValue(this->aPidls[i]))
|
||||
|
|
|
@ -0,0 +1,259 @@
|
|||
/*
|
||||
* IEnumFORMATETC, IDataObject
|
||||
*
|
||||
* selecting and droping objects within the shell and/or common dialogs
|
||||
*
|
||||
* Copyright 1998 <juergen.schmied@metronet.de>
|
||||
*/
|
||||
#include "debug.h"
|
||||
#include "shlobj.h"
|
||||
#include "winerror.h"
|
||||
#include "shell32_main.h"
|
||||
/***********************************************************************
|
||||
* IEnumFORMATETC implementation
|
||||
*/
|
||||
static HRESULT WINAPI IEnumFORMATETC_QueryInterface (LPENUMFORMATETC this, REFIID riid, LPVOID * ppvObj);
|
||||
static ULONG WINAPI IEnumFORMATETC_AddRef (LPENUMFORMATETC this);
|
||||
static ULONG WINAPI IEnumFORMATETC_Release (LPENUMFORMATETC this);
|
||||
static HRESULT WINAPI IEnumFORMATETC_Next(LPENUMFORMATETC this, ULONG celt, FORMATETC32 *rgelt, ULONG *pceltFethed);
|
||||
static HRESULT WINAPI IEnumFORMATETC_Skip(LPENUMFORMATETC this, ULONG celt);
|
||||
static HRESULT WINAPI IEnumFORMATETC_Reset(LPENUMFORMATETC this);
|
||||
static HRESULT WINAPI IEnumFORMATETC_Clone(LPENUMFORMATETC this, LPENUMFORMATETC* ppenum);
|
||||
|
||||
static struct IEnumFORMATETC_VTable efvt =
|
||||
{ IEnumFORMATETC_QueryInterface,
|
||||
IEnumFORMATETC_AddRef,
|
||||
IEnumFORMATETC_Release,
|
||||
IEnumFORMATETC_Next,
|
||||
IEnumFORMATETC_Skip,
|
||||
IEnumFORMATETC_Reset,
|
||||
IEnumFORMATETC_Clone
|
||||
};
|
||||
|
||||
extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT32 cfmt, const FORMATETC32 afmt[])
|
||||
{ LPENUMFORMATETC ef;
|
||||
DWORD size=cfmt * sizeof(FORMATETC32);
|
||||
|
||||
ef=(LPENUMFORMATETC)HeapAlloc(GetProcessHeap(),0,sizeof(IEnumFORMATETC));
|
||||
ef->ref=1;
|
||||
ef->lpvtbl=&efvt;
|
||||
|
||||
ef->posFmt = 0;
|
||||
ef->countFmt = cfmt;
|
||||
ef->pFmt = SHAlloc (size);
|
||||
|
||||
if (ef->pFmt)
|
||||
{ memcpy(ef->pFmt, afmt, size);
|
||||
}
|
||||
|
||||
TRACE(shell,"(%p)->()\n",ef);
|
||||
return ef;
|
||||
}
|
||||
static HRESULT WINAPI IEnumFORMATETC_QueryInterface (LPENUMFORMATETC this, REFIID riid, LPVOID * ppvObj)
|
||||
{ char xriid[50];
|
||||
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
||||
TRACE(shell,"(%p)->(\n\tIID:\t%s,%p)\n",this,xriid,ppvObj);
|
||||
|
||||
*ppvObj = NULL;
|
||||
|
||||
if(IsEqualIID(riid, &IID_IUnknown))
|
||||
{ *ppvObj = this;
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IEnumFORMATETC))
|
||||
{ *ppvObj = (IDataObject*)this;
|
||||
}
|
||||
|
||||
if(*ppvObj)
|
||||
{ (*(LPENUMFORMATETC*)ppvObj)->lpvtbl->fnAddRef(this);
|
||||
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
||||
return S_OK;
|
||||
}
|
||||
TRACE(shell,"-- Interface: E_NOINTERFACE\n");
|
||||
return E_NOINTERFACE;
|
||||
|
||||
}
|
||||
static ULONG WINAPI IEnumFORMATETC_AddRef (LPENUMFORMATETC this)
|
||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1);
|
||||
return ++(this->ref);
|
||||
}
|
||||
static ULONG WINAPI IEnumFORMATETC_Release (LPENUMFORMATETC this)
|
||||
{ TRACE(shell,"(%p)->()\n",this);
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell," destroying IEnumFORMATETC(%p)\n",this);
|
||||
if (this->pFmt)
|
||||
{ SHFree (this->pFmt);
|
||||
}
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
return 0;
|
||||
}
|
||||
return this->ref;
|
||||
}
|
||||
static HRESULT WINAPI IEnumFORMATETC_Next(LPENUMFORMATETC this, ULONG celt, FORMATETC32 *rgelt, ULONG *pceltFethed)
|
||||
{ UINT32 cfetch;
|
||||
HRESULT hres = S_FALSE;
|
||||
|
||||
TRACE (shell, "(%p)->()\n", this);
|
||||
|
||||
if (this->posFmt < this->countFmt)
|
||||
{ cfetch = this->countFmt - this->posFmt;
|
||||
if (cfetch >= celt)
|
||||
{ cfetch = celt;
|
||||
hres = S_OK;
|
||||
}
|
||||
memcpy(rgelt, &this->pFmt[this->posFmt], cfetch * sizeof(FORMATETC32));
|
||||
this->posFmt += cfetch;
|
||||
}
|
||||
else
|
||||
{ cfetch = 0;
|
||||
}
|
||||
|
||||
if (pceltFethed)
|
||||
{ *pceltFethed = cfetch;
|
||||
}
|
||||
|
||||
return hres;
|
||||
}
|
||||
static HRESULT WINAPI IEnumFORMATETC_Skip(LPENUMFORMATETC this, ULONG celt)
|
||||
{ FIXME (shell, "(%p)->(num=%lu)\n", this, celt);
|
||||
|
||||
this->posFmt += celt;
|
||||
if (this->posFmt > this->countFmt)
|
||||
{ this->posFmt = this->countFmt;
|
||||
return S_FALSE;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
static HRESULT WINAPI IEnumFORMATETC_Reset(LPENUMFORMATETC this)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
|
||||
this->posFmt = 0;
|
||||
return S_OK;
|
||||
}
|
||||
static HRESULT WINAPI IEnumFORMATETC_Clone(LPENUMFORMATETC this, LPENUMFORMATETC* ppenum)
|
||||
{ FIXME (shell, "(%p)->(ppenum=%p)\n", this, ppenum);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* IDataObject implementation
|
||||
*/
|
||||
|
||||
static HRESULT WINAPI IDataObject_QueryInterface (LPDATAOBJECT, REFIID riid, LPVOID * ppvObj);
|
||||
static ULONG WINAPI IDataObject_AddRef (LPDATAOBJECT);
|
||||
static ULONG WINAPI IDataObject_Release (LPDATAOBJECT);
|
||||
static HRESULT WINAPI IDataObject_GetData (LPDATAOBJECT, LPFORMATETC32 pformatetcIn, STGMEDIUM32 *pmedium);
|
||||
static HRESULT WINAPI IDataObject_GetDataHere(LPDATAOBJECT, LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium);
|
||||
static HRESULT WINAPI IDataObject_QueryGetData(LPDATAOBJECT, LPFORMATETC32 pformatetc);
|
||||
static HRESULT WINAPI IDataObject_GetCanonicalFormatEtc(LPDATAOBJECT, LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut);
|
||||
static HRESULT WINAPI IDataObject_SetData(LPDATAOBJECT, LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium, BOOL32 fRelease);
|
||||
static HRESULT WINAPI IDataObject_EnumFormatEtc(LPDATAOBJECT, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc);
|
||||
static HRESULT WINAPI IDataObject_DAdvise (LPDATAOBJECT, LPFORMATETC32 *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection);
|
||||
static HRESULT WINAPI IDataObject_DUnadvise(LPDATAOBJECT, DWORD dwConnection);
|
||||
static HRESULT WINAPI IDataObject_EnumDAdvise(LPDATAOBJECT, IEnumSTATDATA **ppenumAdvise);
|
||||
|
||||
static struct IDataObject_VTable dtovt =
|
||||
{ IDataObject_QueryInterface,
|
||||
IDataObject_AddRef,
|
||||
IDataObject_Release,
|
||||
IDataObject_GetData,
|
||||
IDataObject_GetDataHere,
|
||||
IDataObject_QueryGetData,
|
||||
IDataObject_GetCanonicalFormatEtc,
|
||||
IDataObject_SetData,
|
||||
IDataObject_EnumFormatEtc,
|
||||
IDataObject_DAdvise,
|
||||
IDataObject_DUnadvise,
|
||||
IDataObject_EnumDAdvise
|
||||
};
|
||||
|
||||
/**************************************************************************
|
||||
* IDataObject_Constructor
|
||||
*/
|
||||
LPDATAOBJECT IDataObject_Constructor(HWND32 hwndOwner, LPSHELLFOLDER pcf, LPITEMIDLIST * apit, UINT32 cpit)
|
||||
{ LPDATAOBJECT dto;
|
||||
dto=(LPDATAOBJECT)HeapAlloc(GetProcessHeap(),0,sizeof(IDataObject));
|
||||
dto->ref=1;
|
||||
dto->lpvtbl=&dtovt;
|
||||
TRACE(shell,"(%p)->()\n",dto);
|
||||
return dto;
|
||||
}
|
||||
/***************************************************************************
|
||||
* IDataObject_QueryInterface
|
||||
*/
|
||||
static HRESULT WINAPI IDataObject_QueryInterface (LPDATAOBJECT this, REFIID riid, LPVOID * ppvObj)
|
||||
{ char xriid[50];
|
||||
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
||||
TRACE(shell,"(%p)->(\n\tIID:\t%s,%p)\n",this,xriid,ppvObj);
|
||||
|
||||
*ppvObj = NULL;
|
||||
|
||||
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
|
||||
{ *ppvObj = this;
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IDataObject)) /*IDataObject*/
|
||||
{ *ppvObj = (IDataObject*)this;
|
||||
}
|
||||
|
||||
if(*ppvObj)
|
||||
{ (*(LPDATAOBJECT*)ppvObj)->lpvtbl->fnAddRef(this);
|
||||
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
||||
return S_OK;
|
||||
}
|
||||
TRACE(shell,"-- Interface: E_NOINTERFACE\n");
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
/**************************************************************************
|
||||
* IDataObject_AddRef
|
||||
*/
|
||||
static ULONG WINAPI IDataObject_AddRef(LPDATAOBJECT this)
|
||||
{ TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1);
|
||||
return ++(this->ref);
|
||||
}
|
||||
/**************************************************************************
|
||||
* IDataObject_Release
|
||||
*/
|
||||
static ULONG WINAPI IDataObject_Release(LPDATAOBJECT this)
|
||||
{ TRACE(shell,"(%p)->()\n",this);
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell," destroying IDataObject(%p)\n",this);
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
return 0;
|
||||
}
|
||||
return this->ref;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_GetData (LPDATAOBJECT this, LPFORMATETC32 pformatetcIn, STGMEDIUM32 *pmedium)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_GetDataHere(LPDATAOBJECT this, LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_QueryGetData(LPDATAOBJECT this, LPFORMATETC32 pformatetc)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_GetCanonicalFormatEtc(LPDATAOBJECT this, LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_SetData(LPDATAOBJECT this, LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium, BOOL32 fRelease)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_EnumFormatEtc(LPDATAOBJECT this, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_DAdvise (LPDATAOBJECT this, LPFORMATETC32 *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_DUnadvise(LPDATAOBJECT this, DWORD dwConnection)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
static HRESULT WINAPI IDataObject_EnumDAdvise(LPDATAOBJECT this, IEnumSTATDATA **ppenumAdvise)
|
||||
{ FIXME (shell, "(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
|
@ -53,24 +53,26 @@ static IEnumIDList_VTable eidlvt =
|
|||
* IEnumIDList_Constructor
|
||||
*/
|
||||
|
||||
LPENUMIDLIST IEnumIDList_Constructor( LPCSTR lpszPath, DWORD dwFlags, HRESULT* pResult)
|
||||
LPENUMIDLIST IEnumIDList_Constructor( LPCSTR lpszPath, DWORD dwFlags)
|
||||
{ LPENUMIDLIST lpeidl;
|
||||
|
||||
lpeidl = (LPENUMIDLIST)HeapAlloc(GetProcessHeap(),0,sizeof(IEnumIDList));
|
||||
if (! lpeidl)
|
||||
return NULL;
|
||||
|
||||
lpeidl->ref = 1;
|
||||
lpeidl->lpvtbl = &eidlvt;
|
||||
lpeidl->mpFirst=NULL;
|
||||
lpeidl->mpLast=NULL;
|
||||
lpeidl->mpCurrent=NULL;
|
||||
|
||||
TRACE(shell,"(%p)->(%s 0x%08lx %p)\n",lpeidl,debugstr_a(lpszPath),dwFlags,pResult);
|
||||
TRACE(shell,"(%p)->(%s flags=0x%08lx)\n",lpeidl,debugstr_a(lpszPath),dwFlags);
|
||||
|
||||
if(!IEnumIDList_CreateEnumList(lpeidl, lpszPath, dwFlags))
|
||||
{ if(pResult)
|
||||
{ *pResult = E_OUTOFMEMORY;
|
||||
HeapFree(GetProcessHeap(),0,lpeidl);
|
||||
return NULL;
|
||||
{ if (lpeidl)
|
||||
{ HeapFree(GetProcessHeap(),0,lpeidl);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TRACE(shell,"-- (%p)->()\n",lpeidl);
|
||||
|
@ -214,7 +216,7 @@ static BOOL32 WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPa
|
|||
CHAR szDriveName[4];
|
||||
CHAR szPath[MAX_PATH];
|
||||
|
||||
TRACE(shell,"(%p)->(%s 0x%08lx) \n",this,debugstr_a(lpszPath),dwFlags);
|
||||
TRACE(shell,"(%p)->(path=%s flags=0x%08lx) \n",this,debugstr_a(lpszPath),dwFlags);
|
||||
|
||||
if (lpszPath && lpszPath[0]!='\0')
|
||||
{ strcpy(szPath, lpszPath);
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "winnls.h"
|
||||
#include "winproc.h"
|
||||
#include "commctrl.h"
|
||||
#include "pidl.h"
|
||||
|
||||
#include "shell32_main.h"
|
||||
|
||||
|
@ -42,6 +43,24 @@ static HRESULT WINAPI IExtractIcon_Extract(LPEXTRACTICON, LPCSTR, UINT32, HICON3
|
|||
static HRESULT WINAPI IShellLink_QueryInterface(LPSHELLLINK,REFIID,LPVOID*);
|
||||
static ULONG WINAPI IShellLink_AddRef(LPSHELLLINK);
|
||||
static ULONG WINAPI IShellLink_Release(LPSHELLLINK);
|
||||
static HRESULT WINAPI IShellLink_GetPath(LPSHELLLINK, LPSTR,INT32, WIN32_FIND_DATA32A *, DWORD);
|
||||
static HRESULT WINAPI IShellLink_GetIDList(LPSHELLLINK, LPITEMIDLIST *);
|
||||
static HRESULT WINAPI IShellLink_SetIDList(LPSHELLLINK, LPCITEMIDLIST);
|
||||
static HRESULT WINAPI IShellLink_GetDescription(LPSHELLLINK, LPSTR,INT32);
|
||||
static HRESULT WINAPI IShellLink_SetDescription(LPSHELLLINK, LPCSTR);
|
||||
static HRESULT WINAPI IShellLink_GetWorkingDirectory(LPSHELLLINK, LPSTR,INT32);
|
||||
static HRESULT WINAPI IShellLink_SetWorkingDirectory(LPSHELLLINK, LPCSTR);
|
||||
static HRESULT WINAPI IShellLink_GetArguments(LPSHELLLINK, LPSTR,INT32);
|
||||
static HRESULT WINAPI IShellLink_SetArguments(LPSHELLLINK, LPCSTR);
|
||||
static HRESULT WINAPI IShellLink_GetHotkey(LPSHELLLINK, WORD *);
|
||||
static HRESULT WINAPI IShellLink_SetHotkey(LPSHELLLINK, WORD);
|
||||
static HRESULT WINAPI IShellLink_GetShowCmd(LPSHELLLINK, INT32 *);
|
||||
static HRESULT WINAPI IShellLink_SetShowCmd(LPSHELLLINK, INT32);
|
||||
static HRESULT WINAPI IShellLink_GetIconLocation(LPSHELLLINK, LPSTR,INT32,INT32 *);
|
||||
static HRESULT WINAPI IShellLink_SetIconLocation(LPSHELLLINK, LPCSTR,INT32);
|
||||
static HRESULT WINAPI IShellLink_SetRelativePath(LPSHELLLINK, LPCSTR, DWORD);
|
||||
static HRESULT WINAPI IShellLink_Resolve(LPSHELLLINK, HWND32, DWORD);
|
||||
static HRESULT WINAPI IShellLink_SetPath(LPSHELLLINK, LPCSTR);
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -144,28 +163,28 @@ static HRESULT WINAPI IExtractIcon_Extract(LPEXTRACTICON this, LPCSTR pszFile, U
|
|||
* IShellLink Implementation
|
||||
*/
|
||||
|
||||
static struct IShellLink_VTable slvt = {
|
||||
IShellLink_QueryInterface,
|
||||
static struct IShellLink_VTable slvt =
|
||||
{ IShellLink_QueryInterface,
|
||||
IShellLink_AddRef,
|
||||
IShellLink_Release,
|
||||
(void *)0xcafe0004,
|
||||
(void *)0xcafe0005,
|
||||
(void *)0xcafe0006,
|
||||
(void *)0xcafe0007,
|
||||
(void *)0xcafe0008,
|
||||
(void *)0xcafe0009,
|
||||
(void *)0xcafe0010,
|
||||
(void *)0xcafe0011,
|
||||
(void *)0xcafe0012,
|
||||
(void *)0xcafe0013,
|
||||
(void *)0xcafe0014,
|
||||
(void *)0xcafe0015,
|
||||
(void *)0xcafe0016,
|
||||
(void *)0xcafe0017,
|
||||
(void *)0xcafe0018,
|
||||
(void *)0xcafe0019,
|
||||
(void *)0xcafe0020,
|
||||
(void *)0xcafe0021
|
||||
IShellLink_GetPath,
|
||||
IShellLink_GetIDList,
|
||||
IShellLink_SetIDList,
|
||||
IShellLink_GetDescription,
|
||||
IShellLink_SetDescription,
|
||||
IShellLink_GetWorkingDirectory,
|
||||
IShellLink_SetWorkingDirectory,
|
||||
IShellLink_GetArguments,
|
||||
IShellLink_SetArguments,
|
||||
IShellLink_GetHotkey,
|
||||
IShellLink_SetHotkey,
|
||||
IShellLink_GetShowCmd,
|
||||
IShellLink_SetShowCmd,
|
||||
IShellLink_GetIconLocation,
|
||||
IShellLink_SetIconLocation,
|
||||
IShellLink_SetRelativePath,
|
||||
IShellLink_Resolve,
|
||||
IShellLink_SetPath
|
||||
};
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -227,4 +246,85 @@ static ULONG WINAPI IShellLink_Release(LPSHELLLINK this)
|
|||
return this->ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IShellLink_GetPath(LPSHELLLINK this, LPSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags)
|
||||
{ FIXME(shell,"(%p)->(pfile=%p len=%u find_data=%p flags=%lu)\n",this, pszFile, cchMaxPath, pfd, fFlags);
|
||||
strncpy(pszFile,"c:\\foo.bar", cchMaxPath);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_GetIDList(LPSHELLLINK this, LPITEMIDLIST * ppidl)
|
||||
{ FIXME(shell,"(%p)->(ppidl=%p)\n",this, ppidl);
|
||||
*ppidl = _ILCreateDesktop();
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_SetIDList(LPSHELLLINK this, LPCITEMIDLIST pidl)
|
||||
{ FIXME(shell,"(%p)->(pidl=%p)\n",this, pidl);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_GetDescription(LPSHELLLINK this, LPSTR pszName,INT32 cchMaxName)
|
||||
{ FIXME(shell,"(%p)->(%p len=%u)\n",this, pszName, cchMaxName);
|
||||
strncpy(pszName,"Description, FIXME",cchMaxName);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_SetDescription(LPSHELLLINK this, LPCSTR pszName)
|
||||
{ FIXME(shell,"(%p)->(desc=%s)\n",this, pszName);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_GetWorkingDirectory(LPSHELLLINK this, LPSTR pszDir,INT32 cchMaxPath)
|
||||
{ FIXME(shell,"(%p)->()\n",this);
|
||||
strncpy(pszDir,"c:\\", cchMaxPath);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_SetWorkingDirectory(LPSHELLLINK this, LPCSTR pszDir)
|
||||
{ FIXME(shell,"(%p)->(dir=%s)\n",this, pszDir);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_GetArguments(LPSHELLLINK this, LPSTR pszArgs,INT32 cchMaxPath)
|
||||
{ FIXME(shell,"(%p)->(%p len=%u)\n",this, pszArgs, cchMaxPath);
|
||||
strncpy(pszArgs, "", cchMaxPath);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_SetArguments(LPSHELLLINK this, LPCSTR pszArgs)
|
||||
{ FIXME(shell,"(%p)->(args=%s)\n",this, pszArgs);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_GetHotkey(LPSHELLLINK this, WORD *pwHotkey)
|
||||
{ FIXME(shell,"(%p)->(%p)\n",this, pwHotkey);
|
||||
*pwHotkey=0x0;
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_SetHotkey(LPSHELLLINK this, WORD wHotkey)
|
||||
{ FIXME(shell,"(%p)->(hotkey=%x)\n",this, wHotkey);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_GetShowCmd(LPSHELLLINK this, INT32 *piShowCmd)
|
||||
{ FIXME(shell,"(%p)->(%p)\n",this, piShowCmd);
|
||||
*piShowCmd=0;
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_SetShowCmd(LPSHELLLINK this, INT32 iShowCmd)
|
||||
{ FIXME(shell,"(%p)->(showcmd=%x)\n",this, iShowCmd);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_GetIconLocation(LPSHELLLINK this, LPSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon)
|
||||
{ FIXME(shell,"(%p)->(%p len=%u iicon=%p)\n",this, pszIconPath, cchIconPath, piIcon);
|
||||
strncpy(pszIconPath,"shell32.dll",cchIconPath);
|
||||
*piIcon=1;
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_SetIconLocation(LPSHELLLINK this, LPCSTR pszIconPath,INT32 iIcon)
|
||||
{ FIXME(shell,"(%p)->(path=%s iicon=%u)\n",this, pszIconPath, iIcon);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_SetRelativePath(LPSHELLLINK this, LPCSTR pszPathRel, DWORD dwReserved)
|
||||
{ FIXME(shell,"(%p)->(path=%s %lx)\n",this, pszPathRel, dwReserved);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_Resolve(LPSHELLLINK this, HWND32 hwnd, DWORD fFlags)
|
||||
{ FIXME(shell,"(%p)->(hwnd=%x flags=%lx)\n",this, hwnd, fFlags);
|
||||
return NOERROR;
|
||||
}
|
||||
static HRESULT WINAPI IShellLink_SetPath(LPSHELLLINK this, LPCSTR pszFile)
|
||||
{ FIXME(shell,"(%p)->(path=%s)\n",this, pszFile);
|
||||
return NOERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
*
|
||||
* Copyright 1998 Juergen Schmied
|
||||
*
|
||||
* !!! currently work in progress on all classes !!!
|
||||
* <contact juergen.schmied@metronet.de, 980801>
|
||||
* NOTES
|
||||
* a pidl == NULL means desktop and is legal
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
|
@ -29,8 +30,13 @@ void pdump (LPCITEMIDLIST pidl)
|
|||
{ DWORD type;
|
||||
CHAR * szData;
|
||||
LPITEMIDLIST pidltemp = pidl;
|
||||
TRACE(pidl,"---------- pidl=%p \n", pidl);
|
||||
do
|
||||
if (! pidltemp)
|
||||
{ TRACE(pidl,"-------- pidl = NULL (Root)\n");
|
||||
return;
|
||||
}
|
||||
TRACE(pidl,"-------- pidl=%p \n", pidl);
|
||||
if (pidltemp->mkid.cb)
|
||||
{ do
|
||||
{ type = _ILGetDataPointer(pidltemp)->type;
|
||||
szData = _ILGetTextPointer(type, _ILGetDataPointer(pidltemp));
|
||||
|
||||
|
@ -38,6 +44,10 @@ void pdump (LPCITEMIDLIST pidl)
|
|||
|
||||
pidltemp = ILGetNext(pidltemp);
|
||||
} while (pidltemp->mkid.cb);
|
||||
return;
|
||||
}
|
||||
else
|
||||
TRACE(pidl,"empty pidl (Desktop)\n");
|
||||
}
|
||||
/*************************************************************************
|
||||
* ILGetDisplayName [SHELL32.15]
|
||||
|
@ -88,6 +98,8 @@ LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl)
|
|||
|
||||
TRACE(pidl,"%p\n",pidl);
|
||||
|
||||
pdump(pidl);
|
||||
|
||||
if (!pidl)
|
||||
return NULL;
|
||||
|
||||
|
@ -104,8 +116,40 @@ LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl)
|
|||
* duplicates the first idlist of a complex pidl
|
||||
*/
|
||||
LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl)
|
||||
{ FIXME(pidl,"pidl=%p\n",pidl);
|
||||
return NULL;
|
||||
{ DWORD len;
|
||||
LPITEMIDLIST newpidl=NULL;
|
||||
TRACE(pidl,"pidl=%p\n",pidl);
|
||||
|
||||
if (pidl)
|
||||
{ len = pidl->mkid.cb;
|
||||
newpidl = (LPITEMIDLIST) SHAlloc (len+2);
|
||||
if (newpidl)
|
||||
{ memcpy(newpidl,pidl,len);
|
||||
ILGetNext(newpidl)->mkid.cb = 0x00;
|
||||
}
|
||||
}
|
||||
|
||||
return newpidl;
|
||||
}
|
||||
/*************************************************************************
|
||||
* ILIsEqual [SHELL32.21]
|
||||
*
|
||||
*/
|
||||
BOOL32 WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
|
||||
{ FIXME(pidl,"pidl1=%p pidl2=%p stub\n",pidl1, pidl2);
|
||||
pdump (pidl1);
|
||||
pdump (pidl2);
|
||||
return FALSE;
|
||||
}
|
||||
/*************************************************************************
|
||||
* ILFindChild [SHELL32.24]
|
||||
*
|
||||
*/
|
||||
DWORD WINAPI ILFindChild(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2)
|
||||
{ FIXME(pidl,"%p %p stub\n",pidl1,pidl2);
|
||||
pdump (pidl1);
|
||||
pdump (pidl2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -126,6 +170,9 @@ LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2)
|
|||
{ return NULL;
|
||||
}
|
||||
|
||||
pdump (pidl1);
|
||||
pdump (pidl2);
|
||||
|
||||
if(!pidl1)
|
||||
{ pidlNew = ILClone(pidl2);
|
||||
return pidlNew;
|
||||
|
@ -148,6 +195,18 @@ LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2)
|
|||
/* TRACE(pidl,"--new pidl=%p\n",pidlNew);*/
|
||||
return pidlNew;
|
||||
}
|
||||
/*************************************************************************
|
||||
* SHLogILFromFSIL [SHELL32.95]
|
||||
*
|
||||
* NOTES
|
||||
* might be the prepending of MyComputer to a filesystem pidl (?)
|
||||
*/
|
||||
LPITEMIDLIST WINAPI SHLogILFromFSIL(LPITEMIDLIST pidl)
|
||||
{ FIXME(pidl,"(pidl=%p)\n",pidl);
|
||||
pdump(pidl);
|
||||
return ILClone(pidl);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* ILGetSize [SHELL32.152]
|
||||
* gets the byte size of an idlist including zero terminator (pidl)
|
||||
|
@ -165,7 +224,7 @@ DWORD WINAPI ILGetSize(LPITEMIDLIST pidl)
|
|||
{ LPSHITEMID si = &(pidl->mkid);
|
||||
DWORD len=0;
|
||||
|
||||
TRACE(pidl,"pidl=%p\n",pidl);
|
||||
/*TRACE(pidl,"pidl=%p\n",pidl);*/
|
||||
|
||||
if (pidl)
|
||||
{ while (si->cb)
|
||||
|
@ -191,7 +250,7 @@ DWORD WINAPI ILGetSize(LPITEMIDLIST pidl)
|
|||
LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl)
|
||||
{ LPITEMIDLIST nextpidl;
|
||||
|
||||
TRACE(pidl,"(pidl=%p)\n",pidl);
|
||||
/* TRACE(pidl,"(pidl=%p)\n",pidl);*/
|
||||
if(pidl)
|
||||
{ nextpidl = (LPITEMIDLIST)(LPBYTE)(((LPBYTE)pidl) + pidl->mkid.cb);
|
||||
return nextpidl;
|
||||
|
@ -210,7 +269,7 @@ LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl)
|
|||
* Destroys the passed in idlist!
|
||||
*/
|
||||
LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl,LPCITEMIDLIST item,BOOL32 bEnd)
|
||||
{ TRACE(pidl,"(pidl=%p,pidl=%p,%08u)\n",pidl,item,bEnd);
|
||||
{ FIXME(pidl,"(pidl=%p,pidl=%p,%08u)stub\n",pidl,item,bEnd);
|
||||
return NULL;
|
||||
}
|
||||
/*************************************************************************
|
||||
|
@ -227,6 +286,27 @@ DWORD WINAPI ILFree(LPVOID pidl)
|
|||
return 0;
|
||||
return SHFree(pidl);
|
||||
}
|
||||
/*************************************************************************
|
||||
* ILCreateFromPath [SHELL32.157]
|
||||
*
|
||||
*/
|
||||
LPITEMIDLIST WINAPI ILCreateFromPath(LPSTR path)
|
||||
{ LPSHELLFOLDER shellfolder;
|
||||
LPITEMIDLIST pidlnew;
|
||||
CHAR pszTemp[MAX_PATH*2];
|
||||
LPWSTR lpszDisplayName = (LPWSTR)&pszTemp[0];
|
||||
DWORD pchEaten;
|
||||
|
||||
TRACE(pidl,"(path=%s)\n",path);
|
||||
|
||||
LocalToWideChar32(lpszDisplayName, path, MAX_PATH);
|
||||
|
||||
if (SHGetDesktopFolder(&shellfolder)==S_OK)
|
||||
{ shellfolder->lpvtbl->fnParseDisplayName(shellfolder,0, NULL,lpszDisplayName,&pchEaten,&pidlnew,NULL);
|
||||
shellfolder->lpvtbl->fnRelease(shellfolder);
|
||||
}
|
||||
return pidlnew;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* internal functions
|
||||
|
@ -308,7 +388,7 @@ BOOL32 WINAPI _ILIsDesktop(LPCITEMIDLIST pidl)
|
|||
{ TRACE(pidl,"(%p)\n",pidl);
|
||||
|
||||
if (! pidl)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
|
||||
return ( pidl->mkid.cb == 0x00 );
|
||||
}
|
||||
|
@ -695,7 +775,7 @@ LPPIDLDATA WINAPI _ILGetDataPointer(LPITEMIDLIST pidl)
|
|||
{ if(!pidl)
|
||||
{ return NULL;
|
||||
}
|
||||
TRACE(pidl,"(%p)\n", pidl);
|
||||
/* TRACE(pidl,"(%p)\n", pidl);*/
|
||||
return (LPPIDLDATA)(&pidl->mkid.abID);
|
||||
}
|
||||
/**************************************************************************
|
||||
|
@ -703,7 +783,7 @@ LPPIDLDATA WINAPI _ILGetDataPointer(LPITEMIDLIST pidl)
|
|||
* gets a pointer to the string stored in the pidl
|
||||
*/
|
||||
LPSTR WINAPI _ILGetTextPointer(PIDLTYPE type, LPPIDLDATA pidldata)
|
||||
{ TRACE(pidl,"(type=%x data=%p)\n", type, pidldata);
|
||||
{/* TRACE(pidl,"(type=%x data=%p)\n", type, pidldata);*/
|
||||
|
||||
if(!pidldata)
|
||||
{ return NULL;
|
||||
|
|
|
@ -90,8 +90,9 @@ LPWSTR* WINAPI CommandLineToArgvW(LPWSTR cmdline,LPDWORD numargs)
|
|||
*/
|
||||
|
||||
void WINAPI Control_RunDLL( HWND32 hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4 )
|
||||
{ FIXME(shell, "(%08x, %p, \"%s\", %08lx)\n",
|
||||
hwnd, code ? code : "(null)", cmd ? cmd : "(null)", arg4);
|
||||
{
|
||||
FIXME(shell, "(0x%08x, %p, %s, 0x%08lx): stub\n", hwnd, code,
|
||||
debugstr_a(cmd), arg4);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -108,10 +109,10 @@ void WINAPI Control_RunDLL (HWND32 hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4)
|
|||
BOOL32 WINAPI Shell_GetImageList(HIMAGELIST * imglist1,HIMAGELIST * imglist2)
|
||||
{ WARN(shell,"(%p,%p):semi-stub.\n",imglist1,imglist2);
|
||||
if (imglist1)
|
||||
{ *imglist1=ShellBigIconList;
|
||||
{ *imglist1=ShellSmallIconList;
|
||||
}
|
||||
if (imglist2)
|
||||
{ *imglist2=ShellSmallIconList;
|
||||
{ *imglist2=ShellBigIconList;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -351,7 +352,7 @@ UINT32 WINAPI SHAppBarMessage32(DWORD msg, PAPPBARDATA data)
|
|||
*
|
||||
*/
|
||||
LPITEMIDLIST WINAPI SHBrowseForFolder32A (LPBROWSEINFO32A lpbi)
|
||||
{ FIXME (shell, "(%lx,%s) empty stub!\n", (DWORD)lpbi, lpbi->lpszTitle);
|
||||
{ FIXME (shell, "(0x%lx,%s): stub\n", (DWORD)lpbi, debugstr_a(lpbi->lpszTitle));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@ LPCLASSFACTORY IClassFactory_Constructor()
|
|||
return lpclf;
|
||||
}
|
||||
/**************************************************************************
|
||||
* IClassFactory::QueryInterface
|
||||
* IClassFactory_QueryInterface
|
||||
*/
|
||||
static HRESULT WINAPI IClassFactory_QueryInterface(
|
||||
LPCLASSFACTORY this, REFIID riid, LPVOID *ppvObj)
|
||||
|
@ -316,6 +316,9 @@ static HRESULT WINAPI IClassFactory_CreateInstance(
|
|||
else if (IsEqualIID(riid, &IID_IContextMenu))
|
||||
{ pObj = (IUnknown *)IContextMenu_Constructor(NULL, NULL, 0);
|
||||
}
|
||||
else if (IsEqualIID(riid, &IID_IDataObject))
|
||||
{ pObj = (IUnknown *)IDataObject_Constructor();
|
||||
}
|
||||
else
|
||||
{ ERR(shell,"unknown IID requested\n\tIID:\t%s\n",xriid);
|
||||
return(E_NOINTERFACE);
|
||||
|
|
|
@ -231,28 +231,26 @@ LPSTR WINAPI PathAppend(LPSTR x1,LPSTR x2) {
|
|||
* PathCombine [SHELL32.37]
|
||||
*
|
||||
* NOTES
|
||||
* concat_paths(char*target,const char*add);
|
||||
* concats "target\\add" and writes them to target
|
||||
* if lpszFile='.' skip it
|
||||
*/
|
||||
LPSTR WINAPI PathCombine(LPSTR target,LPSTR x1,LPSTR x2) {
|
||||
char buf[260];
|
||||
TRACE(shell,"%s %s\n",x1,x2);
|
||||
if (!x2 || !x2[0]) {
|
||||
lstrcpy32A(target,x1);
|
||||
return target;
|
||||
LPSTR WINAPI PathCombine(LPSTR szDest, LPCSTR lpszDir, LPCSTR lpszFile)
|
||||
{ TRACE(shell,"%s %s\n",lpszDir,lpszFile);
|
||||
|
||||
if (!lpszFile || !lpszFile[0] || (lpszFile[0]=='.' && !lpszFile[1]) )
|
||||
{ strcpy(szDest,lpszDir);
|
||||
return szDest;
|
||||
}
|
||||
lstrcpy32A(buf,x1);
|
||||
PathAddBackslash(buf); /* append \ if not there */
|
||||
lstrcat32A(buf,x2);
|
||||
lstrcpy32A(target,buf);
|
||||
return target;
|
||||
strcpy(szDest,lpszDir);
|
||||
PathAddBackslash(szDest);
|
||||
strcat(szDest,lpszFile);
|
||||
return szDest;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* PathIsUNC [SHELL32.39]
|
||||
*
|
||||
* NOTES
|
||||
* isUNC(const char*path);
|
||||
* PathIsUNC(char*path);
|
||||
*/
|
||||
BOOL32 WINAPI PathIsUNC(LPCSTR path) {
|
||||
TRACE(shell,"%s\n",path);
|
||||
|
@ -260,6 +258,14 @@ BOOL32 WINAPI PathIsUNC(LPCSTR path) {
|
|||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
/*************************************************************************
|
||||
* PathIsExe [SHELL32.43]
|
||||
*
|
||||
*/
|
||||
BOOL32 WINAPI PathIsExe (LPCSTR path)
|
||||
{ TRACE(shell,"path=%s\n",path);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* PathFileExists [SHELL32.45]
|
||||
|
@ -274,6 +280,17 @@ BOOL32 WINAPI PathFileExists(LPSTR fn) {
|
|||
else
|
||||
return TRUE;
|
||||
}
|
||||
/*************************************************************************
|
||||
* PathMatchSpec [SHELL32.46]
|
||||
*
|
||||
* NOTES
|
||||
* used from COMDLG32
|
||||
*/
|
||||
|
||||
BOOL32 WINAPI PathMatchSpec(LPSTR x, LPSTR y)
|
||||
{ FIXME(shell,"%s %s stub\n",x,y);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* PathResolve [SHELL32.51]
|
||||
|
@ -417,7 +434,7 @@ BOOL32 WINAPI PathYetAnotherMakeUniqueName(LPDWORD x,LPDWORD y) {
|
|||
*/
|
||||
DWORD WINAPI
|
||||
SHMapPIDLToSystemImageListIndex(LPSHELLFOLDER sh,DWORD y,DWORD z)
|
||||
{ FIXME(shell,"(folder=%p,%08lx,%08lx):stub.\n",sh,y,z);
|
||||
{ FIXME(shell,"(SF=%p,pidl=%08lx,%08lx):stub.\n",sh,y,z);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -872,7 +889,8 @@ HRESULT WINAPI SHRunConrolPanel (DWORD x, DWORD z)
|
|||
*/
|
||||
BOOL32 WINAPI ShellExecuteEx32A (LPSHELLEXECUTEINFO32A sei)
|
||||
{ CHAR szTemp[MAX_PATH];
|
||||
FIXME(shell,"%p stub\n",sei);
|
||||
|
||||
FIXME(shell,"(%p): stub\n",sei);
|
||||
|
||||
if (sei->fMask & SEE_MASK_IDLIST)
|
||||
{ SHGetPathFromIDList32A (sei->lpIDList,szTemp);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright 1997 Marcus Meissner
|
||||
* Copyright 1998 Juergen Schmied
|
||||
*
|
||||
* !!! currently work in progress on all classes 980818 !!!
|
||||
* !!! currently work in progress on all classes 980930 !!!
|
||||
* <contact juergen.schmied@metronet.de>
|
||||
*/
|
||||
|
||||
|
@ -105,8 +105,8 @@ LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl)
|
|||
sf=(LPSHELLFOLDER)HeapAlloc(GetProcessHeap(),0,sizeof(IShellFolder));
|
||||
sf->ref=1;
|
||||
sf->lpvtbl=&sfvt;
|
||||
sf->mlpszFolder=NULL;
|
||||
sf->mpSFParent=pParent;
|
||||
sf->mlpszFolder=NULL; /* path of the folder */
|
||||
sf->mpSFParent=pParent; /* parrent shellfolder */
|
||||
|
||||
TRACE(shell,"(%p)->(parent=%p, pidl=%p)\n",sf,pParent, pidl);
|
||||
|
||||
|
@ -116,22 +116,22 @@ LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl)
|
|||
|
||||
if(sf->mpidl) /* do we have a pidl? */
|
||||
{ dwSize = 0;
|
||||
if(sf->mpSFParent->mlpszFolder)
|
||||
if(sf->mpSFParent->mlpszFolder) /* get the size of the parents path */
|
||||
{ dwSize += strlen(sf->mpSFParent->mlpszFolder) + 1;
|
||||
TRACE(shell,"-- (%p)->(parent's path=%s)\n",sf, debugstr_a(sf->mpSFParent->mlpszFolder));
|
||||
}
|
||||
dwSize += _ILGetFolderText(sf->mpidl,NULL,0);
|
||||
dwSize += _ILGetFolderText(sf->mpidl,NULL,0); /* add the size of the foldername*/
|
||||
sf->mlpszFolder = SHAlloc(dwSize);
|
||||
if(sf->mlpszFolder)
|
||||
{ *(sf->mlpszFolder)=0x00;
|
||||
if(sf->mpSFParent->mlpszFolder)
|
||||
if(sf->mpSFParent->mlpszFolder) /* if the parent has a path, get it*/
|
||||
{ strcpy(sf->mlpszFolder, sf->mpSFParent->mlpszFolder);
|
||||
PathAddBackslash (sf->mlpszFolder);
|
||||
}
|
||||
_ILGetFolderText(sf->mpidl, sf->mlpszFolder+strlen(sf->mlpszFolder), dwSize-strlen(sf->mlpszFolder));
|
||||
TRACE(shell,"-- (%p)->(my path=%s)\n",sf, debugstr_a(sf->mlpszFolder));
|
||||
}
|
||||
}
|
||||
|
||||
TRACE(shell,"-- (%p)->(%p,%p,parent=%s)\n",sf,pParent, pidl, debugstr_a(sf->mlpszFolder));
|
||||
return sf;
|
||||
}
|
||||
/**************************************************************************
|
||||
|
@ -288,14 +288,13 @@ static HRESULT WINAPI IShellFolder_EnumObjects(
|
|||
HWND32 hwndOwner,
|
||||
DWORD dwFlags,
|
||||
LPENUMIDLIST* ppEnumIDList)
|
||||
{ HRESULT hr;
|
||||
TRACE(shell,"(%p)->(HWND=0x%08x,0x%08lx,%p)\n",this,hwndOwner,dwFlags,ppEnumIDList);
|
||||
{ TRACE(shell,"(%p)->(HWND=0x%08x flags=0x%08lx pplist=%p)\n",this,hwndOwner,dwFlags,ppEnumIDList);
|
||||
|
||||
*ppEnumIDList = NULL;
|
||||
*ppEnumIDList = IEnumIDList_Constructor (this->mlpszFolder, dwFlags, &hr);
|
||||
*ppEnumIDList = IEnumIDList_Constructor (this->mlpszFolder, dwFlags);
|
||||
TRACE(shell,"-- (%p)->(new ID List: %p)\n",this,*ppEnumIDList);
|
||||
if(!*ppEnumIDList)
|
||||
{ return hr;
|
||||
{ return E_OUTOFMEMORY;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -496,19 +495,21 @@ static HRESULT WINAPI IShellFolder_GetAttributesOf(LPSHELLFOLDER this,UINT32 cid
|
|||
do
|
||||
{ if (*pidltemp)
|
||||
{ if (_ILIsDesktop( *pidltemp))
|
||||
{ *rgfInOut |= (SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR);
|
||||
{ *rgfInOut |= ( SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANLINK );
|
||||
}
|
||||
else if (_ILIsMyComputer( *pidltemp))
|
||||
{ *rgfInOut |= (SFGAO_FOLDER | SFGAO_HASSUBFOLDER);
|
||||
{ *rgfInOut |= ( SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR
|
||||
| SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANRENAME | SFGAO_CANLINK );
|
||||
}
|
||||
else if (_ILIsDrive( *pidltemp))
|
||||
{ *rgfInOut |= (SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSTEM);
|
||||
{ *rgfInOut |= ( SFGAO_HASSUBFOLDER | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR |
|
||||
SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANLINK );
|
||||
}
|
||||
else if (_ILIsFolder( *pidltemp))
|
||||
{ *rgfInOut |= (SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSTEM );
|
||||
{ *rgfInOut |= ( SFGAO_HASSUBFOLDER | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_CAPABILITYMASK );
|
||||
}
|
||||
else if (_ILIsValue( *pidltemp))
|
||||
{ *rgfInOut |= (SFGAO_FILESYSTEM);
|
||||
{ *rgfInOut |= (SFGAO_FILESYSTEM | SFGAO_CAPABILITYMASK );
|
||||
}
|
||||
}
|
||||
pidltemp++;
|
||||
|
@ -624,17 +625,14 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
|
|||
|
||||
TRACE(shell,"(%p)->(pidl=%p,0x%08lx,%p)\n",this,pidl,dwFlags,lpName);
|
||||
|
||||
if (!pidl)
|
||||
{ return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
szSpecial[0]=0x00;
|
||||
szDrive[0]=0x00;
|
||||
|
||||
/* test if simple(relative) or complex(absolute) pidl */
|
||||
pidlTemp = ILGetNext(pidl);
|
||||
if (pidlTemp->mkid.cb==0x00)
|
||||
if (pidlTemp && pidlTemp->mkid.cb==0x00)
|
||||
{ bSimplePidl = TRUE;
|
||||
TRACE(shell,"-- simple pidl\n");
|
||||
}
|
||||
if (_ILIsDesktop( pidl))
|
||||
{ strcpy (szText,"Desktop");
|
||||
|
@ -667,12 +665,15 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
|
|||
{ case SHGDN_NORMAL:
|
||||
_ILGetPidlPath( pidl, szText, MAX_PATH);
|
||||
break;
|
||||
|
||||
case SHGDN_INFOLDER | SHGDN_FORPARSING: /*fall thru*/
|
||||
case SHGDN_INFOLDER:
|
||||
pidlTemp = ILFindLastID(pidl);
|
||||
if (pidlTemp)
|
||||
{ _ILGetItemText( pidlTemp, szText, MAX_PATH);
|
||||
}
|
||||
break;
|
||||
|
||||
case SHGDN_FORPARSING:
|
||||
if (bSimplePidl)
|
||||
{ /* if the IShellFolder has parents, get the path from the
|
||||
|
@ -696,6 +697,7 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
|
|||
}
|
||||
break;
|
||||
default:
|
||||
TRACE(shell,"--- wrong flags=%lx\n", dwFlags);
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
if ((szText[0]==0x00 && szDrive[0]!=0x00)|| (bSimplePidl && szDrive[0]!=0x00))
|
||||
|
@ -706,7 +708,7 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
|
|||
}
|
||||
}
|
||||
|
||||
TRACE(shell,"-- (%p)->(%s,%s,%s)\n",this,szSpecial,szDrive,szText);
|
||||
TRACE(shell,"-- (%p)->(%s)\n",this,szText);
|
||||
|
||||
if(!(lpName))
|
||||
{ return E_OUTOFMEMORY;
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
/*
|
||||
* ShellView
|
||||
*
|
||||
* Copyright 1998 Juergen Schmied
|
||||
*
|
||||
* !!! currently work in progress on all classes 980801 !!!
|
||||
* <contact juergen.schmied@metronet.de>
|
||||
* Copyright 1998 <juergen.schmied@metronet.de>
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
|
@ -48,6 +45,8 @@ static HRESULT WINAPI IShellView_SaveViewState(LPSHELLVIEW);
|
|||
static HRESULT WINAPI IShellView_SelectItem(LPSHELLVIEW, LPCITEMIDLIST pidlItem, UINT32 uFlags);
|
||||
static HRESULT WINAPI IShellView_GetItemObject(LPSHELLVIEW, UINT32 uItem, REFIID riid,LPVOID *ppv);
|
||||
|
||||
static BOOL32 ShellView_CanDoIDockingWindow(LPSHELLVIEW);
|
||||
|
||||
static struct IShellView_VTable svvt =
|
||||
{ IShellView_QueryInterface,
|
||||
IShellView_AddRef,
|
||||
|
@ -71,8 +70,17 @@ static struct IShellView_VTable svvt =
|
|||
#define IDM_VIEW_FILES (FCIDM_SHVIEWFIRST + 0x500)
|
||||
#define IDM_VIEW_IDW (FCIDM_SHVIEWFIRST + 0x501)
|
||||
#define IDM_MYFILEITEM (FCIDM_SHVIEWFIRST + 0x502)
|
||||
#define ID_LISTVIEW 2000
|
||||
#define MENU_OFFSET 1
|
||||
#define MENU_MAX 100
|
||||
#define TOOLBAR_ID (L"SHELLDLL_DefView")
|
||||
//windowsx.h
|
||||
#define GET_WM_COMMAND_ID(wp, lp) LOWORD(wp)
|
||||
#define GET_WM_COMMAND_HWND(wp, lp) (HWND32)(lp)
|
||||
#define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp)
|
||||
// winuser.h
|
||||
#define WM_SETTINGCHANGE WM_WININICHANGE
|
||||
|
||||
#define TOOLBAR_ID (L"ShellView")
|
||||
typedef struct
|
||||
{ int idCommand;
|
||||
int iImage;
|
||||
|
@ -87,6 +95,11 @@ MYTOOLINFO g_Tools[] =
|
|||
{ {IDM_VIEW_FILES, 0, IDS_TB_VIEW_FILES, IDS_MI_VIEW_FILES, 0, TBSTATE_ENABLED, TBSTYLE_BUTTON},
|
||||
{-1, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
BOOL32 g_bViewKeys;
|
||||
BOOL32 g_bShowIDW;
|
||||
|
||||
typedef void (CALLBACK *PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
|
||||
|
||||
/**************************************************************************
|
||||
* IShellView_Constructor
|
||||
*/
|
||||
|
@ -106,25 +119,65 @@ LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER pFolder, LPCITEMIDLIST pidl)
|
|||
TRACE(shell,"(%p)->(%p pidl=%p)\n",sv, pFolder, pidl);
|
||||
return sv;
|
||||
}
|
||||
/**************************************************************************
|
||||
* helperfunctions for communication with ICommDlgBrowser
|
||||
*
|
||||
*/
|
||||
static BOOL32 IsInCommDlg(LPSHELLVIEW this)
|
||||
{ return(this->pCommDlgBrowser != NULL);
|
||||
}
|
||||
static HRESULT IncludeObject(LPSHELLVIEW this, LPCITEMIDLIST pidl)
|
||||
{ if ( IsInCommDlg(this) )
|
||||
{ TRACE(shell,"ICommDlgBrowser::IncludeObject pidl=%p\n", pidl);
|
||||
return (this->pCommDlgBrowser->lpvtbl->fnIncludeObject(this->pCommDlgBrowser, this, pidl));
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
static HRESULT OnDefaultCommand(LPSHELLVIEW this)
|
||||
{ if (IsInCommDlg(this))
|
||||
{ TRACE(shell,"ICommDlgBrowser::OnDefaultCommand\n");
|
||||
return (this->pCommDlgBrowser->lpvtbl->fnOnDefaultCommand(this->pCommDlgBrowser, this));
|
||||
}
|
||||
return S_FALSE;
|
||||
}
|
||||
static HRESULT OnStateChange(LPSHELLVIEW this, UINT32 uFlags)
|
||||
{ if (IsInCommDlg(this))
|
||||
{ TRACE(shell,"ICommDlgBrowser::OnStateChange flags=%x\n", uFlags);
|
||||
return (this->pCommDlgBrowser->lpvtbl->fnOnStateChange(this->pCommDlgBrowser, this, uFlags));
|
||||
}
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* ShellView_CreateList()
|
||||
*
|
||||
* NOTES
|
||||
* internal
|
||||
*/
|
||||
#define ID_LISTVIEW 2000
|
||||
|
||||
BOOL32 ShellView_CreateList (LPSHELLVIEW this)
|
||||
{ DWORD dwStyle;
|
||||
|
||||
TRACE(shell,"%p\n",this);
|
||||
|
||||
dwStyle = WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER |
|
||||
LVS_ICON | LVS_SHAREIMAGELISTS | LVS_EDITLABELS ;
|
||||
dwStyle = WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER | LVS_SHAREIMAGELISTS | LVS_EDITLABELS;
|
||||
switch (this->FolderSettings.ViewMode)
|
||||
{ case FVM_ICON: dwStyle |= LVS_ICON; break;
|
||||
case FVM_SMALLICON: dwStyle |= LVS_SMALLICON; break;
|
||||
case FVM_LIST: dwStyle |= LVS_LIST; break;
|
||||
case FVM_DETAILS: dwStyle |= LVS_REPORT; break;
|
||||
}
|
||||
if (this->FolderSettings.fFlags && FWF_AUTOARRANGE) dwStyle |= LVS_AUTOARRANGE;
|
||||
/*if (this->FolderSettings.fFlags && FWF_DESKTOP); used from explorer*/
|
||||
if (this->FolderSettings.fFlags && FWF_SINGLESEL) dwStyle |= LVS_SINGLESEL;
|
||||
|
||||
this->hWndList=CreateWindowEx32A( WS_EX_CLIENTEDGE,WC_LISTVIEW32A,NULL,dwStyle,
|
||||
this->hWndList=CreateWindowEx32A( WS_EX_CLIENTEDGE,
|
||||
WC_LISTVIEW32A,
|
||||
NULL,
|
||||
dwStyle,
|
||||
0,0,0,0,
|
||||
this->hWnd,(HMENU32)ID_LISTVIEW,shell32_hInstance,NULL);
|
||||
this->hWnd,
|
||||
(HMENU32)ID_LISTVIEW,
|
||||
shell32_hInstance,
|
||||
NULL);
|
||||
|
||||
if(!this->hWndList)
|
||||
return FALSE;
|
||||
|
@ -177,7 +230,6 @@ BOOL32 ShellView_InitList(LPSHELLVIEW this)
|
|||
|
||||
ListView_SetImageList(this->hWndList, ShellSmallIconList, LVSIL_SMALL);
|
||||
ListView_SetImageList(this->hWndList, ShellBigIconList, LVSIL_NORMAL);
|
||||
ListView_SetBkColor(this->hWndList, 0x00800000 );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -223,11 +275,18 @@ void ShellView_FillList(LPSHELLVIEW this)
|
|||
lvItem.lParam = (LPARAM)ILClone(pidl); /*set the item's data*/
|
||||
lvItem.pszText = LPSTR_TEXTCALLBACK32A; /*get text on a callback basis*/
|
||||
lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/
|
||||
ListView_InsertItem32A(this->hWndList, &lvItem); /*add the item*/
|
||||
if ( S_OK == IncludeObject(this, ILClone(pidl) )) /* fixme free the pidl*/
|
||||
{ ListView_InsertItem32A(this->hWndList, &lvItem); /*add the item*/
|
||||
}
|
||||
else
|
||||
{ SHFree(pidl); /* not viewed */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*sort the items*/
|
||||
ListView_SortItems(this->hWndList, ShellView_CompareItems, (LPARAM)this->pSFParent);
|
||||
/* ListView_SortItems(this->hWndList, ShellView_CompareItems, (LPARAM)this->pSFParent);*/
|
||||
|
||||
|
||||
/*turn the listview's redrawing back on and force it to draw*/
|
||||
SendMessage32A(this->hWndList, WM_SETREDRAW, TRUE, 0);
|
||||
|
@ -246,11 +305,13 @@ void ShellView_FillList(LPSHELLVIEW this)
|
|||
*/
|
||||
LRESULT ShellView_OnCreate(LPSHELLVIEW this)
|
||||
{ TRACE(shell,"%p\n",this);
|
||||
|
||||
if(ShellView_CreateList(this))
|
||||
{ if(ShellView_InitList(this))
|
||||
{ ShellView_FillList(this);
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
/**************************************************************************
|
||||
|
@ -258,10 +319,12 @@ LRESULT ShellView_OnCreate(LPSHELLVIEW this)
|
|||
*/
|
||||
LRESULT ShellView_OnSize(LPSHELLVIEW this, WORD wWidth, WORD wHeight)
|
||||
{ TRACE(shell,"%p width=%u height=%u\n",this, wWidth,wHeight);
|
||||
//resize the ListView to fit our window
|
||||
|
||||
/*resize the ListView to fit our window*/
|
||||
if(this->hWndList)
|
||||
{ MoveWindow32(this->hWndList, 0, 0, wWidth, wHeight, TRUE);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
/**************************************************************************
|
||||
|
@ -273,16 +336,16 @@ HMENU32 ShellView_BuildFileMenu(LPSHELLVIEW this)
|
|||
int nTools,i;
|
||||
HMENU32 hSubMenu;
|
||||
|
||||
TRACE(shell,"(%p) stub\n",this);
|
||||
TRACE(shell,"(%p) semi-stub\n",this);
|
||||
|
||||
hSubMenu = CreatePopupMenu32();
|
||||
if(hSubMenu)
|
||||
{ /*get the number of items in our global array*/
|
||||
for(nTools = 0; g_Tools[nTools].idCommand != -1; nTools++){}
|
||||
|
||||
//add the menu items
|
||||
/*add the menu items*/
|
||||
for(i = 0; i < nTools; i++)
|
||||
{ strcpy(szText, "dummy 44");
|
||||
{ strcpy(szText, "dummy BuildFileMenu");
|
||||
|
||||
ZeroMemory(&mii, sizeof(mii));
|
||||
mii.cbSize = sizeof(mii);
|
||||
|
@ -366,6 +429,24 @@ void ShellView_MergeViewMenu(LPSHELLVIEW this, HMENU32 hSubMenu)
|
|||
InsertMenuItem32A(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii);
|
||||
}
|
||||
}
|
||||
/**************************************************************************
|
||||
* ShellView_UpdateMenu()
|
||||
*/
|
||||
LRESULT ShellView_UpdateMenu(LPSHELLVIEW this, HMENU32 hMenu)
|
||||
{ TRACE(shell,"(%p)->(menu=0x%08x\n",this,hMenu);
|
||||
CheckMenuItem32(hMenu, IDM_VIEW_FILES, MF_BYCOMMAND | (g_bViewKeys ? MF_CHECKED: MF_UNCHECKED));
|
||||
|
||||
if(ShellView_CanDoIDockingWindow(this))
|
||||
{ EnableMenuItem32(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | MF_ENABLED);
|
||||
CheckMenuItem32(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | (g_bShowIDW ? MF_CHECKED: MF_UNCHECKED));
|
||||
}
|
||||
else
|
||||
{ EnableMenuItem32(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
|
||||
CheckMenuItem32(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* ShellView_OnDeactivate()
|
||||
*
|
||||
|
@ -411,8 +492,7 @@ LRESULT ShellView_OnActivate(LPSHELLVIEW this, UINT32 uState)
|
|||
if(this->hMenu)
|
||||
{ this->pShellBrowser->lpvtbl->fnInsertMenusSB(this->pShellBrowser, this->hMenu, &omw);
|
||||
|
||||
//build the top level menu
|
||||
//get the menu item's text
|
||||
/*build the top level menu get the menu item's text*/
|
||||
strcpy(szText,"dummy 31");
|
||||
|
||||
ZeroMemory(&mii, sizeof(mii));
|
||||
|
@ -423,12 +503,12 @@ LRESULT ShellView_OnActivate(LPSHELLVIEW this, UINT32 uState)
|
|||
mii.dwTypeData = szText;
|
||||
mii.hSubMenu = ShellView_BuildFileMenu(this);
|
||||
|
||||
//insert our menu into the menu bar
|
||||
/*insert our menu into the menu bar*/
|
||||
if(mii.hSubMenu)
|
||||
{ InsertMenuItem32A(this->hMenu, FCIDM_MENU_HELP, FALSE, &mii);
|
||||
}
|
||||
|
||||
//get the view menu so we can merge with it
|
||||
/*get the view menu so we can merge with it*/
|
||||
ZeroMemory(&mii, sizeof(mii));
|
||||
mii.cbSize = sizeof(mii);
|
||||
mii.fMask = MIIM_SUBMENU;
|
||||
|
@ -437,7 +517,7 @@ LRESULT ShellView_OnActivate(LPSHELLVIEW this, UINT32 uState)
|
|||
{ ShellView_MergeViewMenu(this, mii.hSubMenu);
|
||||
}
|
||||
|
||||
//add the items that should only be added if we have the focus
|
||||
/*add the items that should only be added if we have the focus*/
|
||||
if(SVUIA_ACTIVATE_FOCUS == uState)
|
||||
{ //get the file menu so we can merge with it
|
||||
ZeroMemory(&mii, sizeof(mii));
|
||||
|
@ -472,8 +552,6 @@ LRESULT ShellView_OnSetFocus(LPSHELLVIEW this)
|
|||
return 0;
|
||||
}
|
||||
|
||||
BOOL32 g_bViewKeys;
|
||||
BOOL32 g_bShowIDW;
|
||||
/**************************************************************************
|
||||
* ShellView_OnKillFocus()
|
||||
*/
|
||||
|
@ -487,112 +565,85 @@ LRESULT ShellView_OnKillFocus(LPSHELLVIEW this)
|
|||
* ShellView_AddRemoveDockingWindow()
|
||||
*/
|
||||
BOOL32 ShellView_AddRemoveDockingWindow(LPSHELLVIEW this, BOOL32 bAdd)
|
||||
{ TRACE(shell,"(%p)->(badd=0x%08x) stub\n",this,bAdd);
|
||||
return FALSE;
|
||||
/*
|
||||
BOOL32 bReturn = FALSE;
|
||||
HRESULT32 hr;
|
||||
IServiceProvider *pSP;
|
||||
*/
|
||||
{ BOOL32 bReturn = FALSE;
|
||||
HRESULT hr;
|
||||
LPSERVICEPROVIDER pSP;
|
||||
LPDOCKINGWINDOWFRAME pFrame;
|
||||
|
||||
FIXME(shell,"(%p)->(badd=0x%08x) stub\n",this,bAdd);
|
||||
|
||||
/* get the browser's IServiceProvider */
|
||||
/* hr = this->pShellBrowser->QueryInterface((REFIID)IID_IServiceProvider, (LPVOID*)&pSP);
|
||||
hr = this->pShellBrowser->lpvtbl->fnQueryInterface(this->pShellBrowser, (REFIID)&IID_IServiceProvider, (LPVOID*)&pSP);
|
||||
if(SUCCEEDED(hr))
|
||||
{
|
||||
IDockingWindowFrame *pFrame;
|
||||
*/
|
||||
/*get the IDockingWindowFrame pointer*/
|
||||
/*
|
||||
hr = pSP->QueryService(SID_SShellBrowser, IID_IDockingWindowFrame, (LPVOID*)&pFrame);
|
||||
{ /*get the IDockingWindowFrame pointer*/
|
||||
hr = pSP->lpvtbl->fnQueryService(pSP, &SID_SShellBrowser, &IID_IDockingWindowFrame, (LPVOID*)&pFrame);
|
||||
if(SUCCEEDED(hr))
|
||||
{ if(bAdd)
|
||||
{ hr = S_OK;
|
||||
if(!this->pDockingWindow)
|
||||
/*if(!this->pDockingWindow)
|
||||
{ //create the toolbar object
|
||||
this->pDockingWindow = new CDockingWindow(this, this->hWnd);
|
||||
this->pDockingWindow = DockingWindow_Constructor(this, this->hWnd);
|
||||
}
|
||||
|
||||
if(this->pDockingWindow)
|
||||
{ //add the toolbar object
|
||||
hr = pFrame->AddToolbar((IDockingWindow*)this->pDockingWindow, TOOLBAR_ID, 0);
|
||||
hr = pFrame->lpvtbl->fnAddToolbar(pFrame, (IDockingWindow*)this->pDockingWindow, TOOLBAR_ID, 0);
|
||||
|
||||
if(SUCCEEDED(hr))
|
||||
{ bReturn = TRUE;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
else
|
||||
{ if(this->pDockingWindow)
|
||||
{ hr = pFrame->RemoveToolbar((IDockingWindow*)this->pDockingWindow, DWFRF_NORMAL);
|
||||
{ /*if(this->pDockingWindow)
|
||||
{ hr = pFrame->->lpvtbl->fnRemoveToolbar(pFrame, (IDockingWindow*)this->pDockingWindow, DWFRF_NORMAL);
|
||||
|
||||
if(SUCCEEDED(hr))
|
||||
{*/
|
||||
/* RemoveToolbar should release the toolbar object which will cause
|
||||
it to destroy itself. Our toolbar object is no longer valid at
|
||||
this point.*/
|
||||
{ // RemoveToolbar should release the toolbar object which will cause
|
||||
//it to destroy itself. Our toolbar object is no longer valid at
|
||||
//this point.
|
||||
|
||||
/* this->pDockingWindow = NULL;
|
||||
this->pDockingWindow = NULL;
|
||||
bReturn = TRUE;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
pFrame->lpvtbl->fnRelease(pFrame);
|
||||
}
|
||||
pFrame->Release();
|
||||
pSP->lpvtbl->fnRelease(pSP);
|
||||
}
|
||||
pSP->Release();
|
||||
}
|
||||
return bReturn;*/
|
||||
return bReturn;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* ShellView_CanDoIDockingWindow()
|
||||
*/
|
||||
BOOL32 ShellView_CanDoIDockingWindow(LPSHELLVIEW this)
|
||||
{ TRACE(shell,"(%p) stub\n",this);
|
||||
return FALSE;
|
||||
/*
|
||||
BOOL32 bReturn = FALSE;
|
||||
HRESULT32 hr;
|
||||
IServiceProvider *pSP;
|
||||
IDockingWindowFrame *pFrame;
|
||||
{ BOOL32 bReturn = FALSE;
|
||||
HRESULT hr;
|
||||
LPSERVICEPROVIDER pSP;
|
||||
LPDOCKINGWINDOWFRAME pFrame;
|
||||
|
||||
//get the browser's IServiceProvider
|
||||
hr = this->pShellBrowser->lpvtbl->fnQueryInterface(this->pShellBrowser, (REFIID)IID_IServiceProvider, (LPVOID*)&pSP);
|
||||
FIXME(shell,"(%p) stub\n",this);
|
||||
|
||||
/*get the browser's IServiceProvider*/
|
||||
hr = this->pShellBrowser->lpvtbl->fnQueryInterface(this->pShellBrowser, (REFIID)&IID_IServiceProvider, (LPVOID*)&pSP);
|
||||
if(hr==S_OK)
|
||||
{ hr = pSP->lpvtbl->fnQueryService(pSP, SID_SShellBrowser, IID_IDockingWindowFrame, (LPVOID*)&pFrame);
|
||||
{ hr = pSP->lpvtbl->fnQueryService(pSP, &SID_SShellBrowser, &IID_IDockingWindowFrame, (LPVOID*)&pFrame);
|
||||
if(SUCCEEDED(hr))
|
||||
{ bReturn = TRUE;
|
||||
pFrame->lpvtbl->fnRelease(pFrame);
|
||||
}
|
||||
pSP->lpvtbl->fnRelease(pSP);
|
||||
}
|
||||
return bReturn;*/
|
||||
}
|
||||
/**************************************************************************
|
||||
* ShellView_UpdateMenu()
|
||||
*/
|
||||
LRESULT ShellView_UpdateMenu(LPSHELLVIEW this, HMENU32 hMenu)
|
||||
{ TRACE(shell,"(%p)->(menu=0x%08x\n",this,hMenu);
|
||||
CheckMenuItem32(hMenu, IDM_VIEW_FILES, MF_BYCOMMAND | (g_bViewKeys ? MF_CHECKED: MF_UNCHECKED));
|
||||
|
||||
if(ShellView_CanDoIDockingWindow(this))
|
||||
{ EnableMenuItem32(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | MF_ENABLED);
|
||||
CheckMenuItem32(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | (g_bShowIDW ? MF_CHECKED: MF_UNCHECKED));
|
||||
}
|
||||
else
|
||||
{ EnableMenuItem32(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
|
||||
CheckMenuItem32(hMenu, IDM_VIEW_IDW, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
}
|
||||
return 0;
|
||||
return bReturn;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* ShellView_UpdateShellSettings()
|
||||
|
||||
**************************************************************************/
|
||||
typedef void (CALLBACK *PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
|
||||
|
||||
|
||||
*/
|
||||
void ShellView_UpdateShellSettings(LPSHELLVIEW this)
|
||||
{ TRACE(shell,"(%p) stub\n",this);
|
||||
{ FIXME(shell,"(%p) stub\n",this);
|
||||
return ;
|
||||
/*
|
||||
SHELLFLAGSTATE sfs;
|
||||
|
@ -641,14 +692,12 @@ LRESULT ShellView_OnSettingChange(LPSHELLVIEW this, LPCSTR lpszSection)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#define MENU_OFFSET 1
|
||||
#define MENU_MAX 100
|
||||
|
||||
/**************************************************************************
|
||||
* ShellView_DoContextMenu()
|
||||
*/
|
||||
void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
|
||||
{ UINT32 uCommand, i, uSelected = ListView_GetSelectedCount(this->hWndList);
|
||||
DWORD wFlags;
|
||||
HMENU32 hMenu;
|
||||
BOOL32 fExplore = FALSE;
|
||||
HWND32 hwndTree = 0;
|
||||
|
@ -663,7 +712,7 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
|
|||
aSelectedItems = (LPITEMIDLIST*)SHAlloc(uSelected * sizeof(LPITEMIDLIST));
|
||||
|
||||
if(aSelectedItems)
|
||||
{ TRACE(shell,"-- aSelectedItems\n");
|
||||
{ TRACE(shell,"-- Items selected =%u\n", uSelected);
|
||||
ZeroMemory(&lvItem, sizeof(lvItem));
|
||||
lvItem.mask = LVIF_STATE | LVIF_PARAM;
|
||||
lvItem.stateMask = LVIS_SELECTED;
|
||||
|
@ -675,12 +724,18 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
|
|||
{ if(lvItem.state & LVIS_SELECTED)
|
||||
{ aSelectedItems[i] = (LPITEMIDLIST)lvItem.lParam;
|
||||
i++;
|
||||
TRACE(shell,"-- selected Item found\n");
|
||||
}
|
||||
lvItem.iItem++;
|
||||
}
|
||||
|
||||
this->pSFParent->lpvtbl->fnGetUIObjectOf(this->pSFParent, this->hWndParent, uSelected,
|
||||
(LPCITEMIDLIST*)aSelectedItems, &IID_IContextMenu, NULL,(LPVOID*)&pContextMenu);
|
||||
this->pSFParent->lpvtbl->fnGetUIObjectOf( this->pSFParent,
|
||||
this->hWndParent,
|
||||
uSelected,
|
||||
(LPCITEMIDLIST*)aSelectedItems,
|
||||
&IID_IContextMenu,
|
||||
NULL,
|
||||
(LPVOID*)&pContextMenu);
|
||||
|
||||
if(pContextMenu)
|
||||
{ TRACE(shell,"-- pContextMenu\n");
|
||||
|
@ -697,9 +752,11 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
|
|||
}
|
||||
|
||||
if(hMenu && SUCCEEDED(pContextMenu->lpvtbl->fnQueryContextMenu( pContextMenu,
|
||||
hMenu,0,MENU_OFFSET,MENU_MAX,CMF_NORMAL |
|
||||
(uSelected != 1 ? 0 : CMF_CANRENAME) |
|
||||
(fExplore ? CMF_EXPLORE : 0))))
|
||||
hMenu,
|
||||
0,
|
||||
MENU_OFFSET,
|
||||
MENU_MAX,
|
||||
CMF_NORMAL | (uSelected != 1 ? 0 : CMF_CANRENAME) | (fExplore ? CMF_EXPLORE : 0))))
|
||||
{ if(fDefault)
|
||||
{ TRACE(shell,"-- fDefault\n");
|
||||
uCommand = 0;
|
||||
|
@ -725,13 +782,28 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
|
|||
}
|
||||
|
||||
if(uCommand > 0)
|
||||
{ TRACE(shell,"-- ! uCommand\n");
|
||||
ZeroMemory(&cmi, sizeof(cmi));
|
||||
{ TRACE(shell,"-- uCommand=%u\n", uCommand);
|
||||
if (((uCommand-MENU_OFFSET) == IDM_EXPLORE) || ((uCommand-MENU_OFFSET) == IDM_OPEN))
|
||||
{ if (IsInCommDlg(this)) /* are we part of a commctrl? */
|
||||
{ TRACE(shell,"-- fnOnDefaultCommand\n");
|
||||
OnDefaultCommand(this);
|
||||
}
|
||||
else /* we are acting with a full featured IShellBrowser */
|
||||
{ TRACE(shell,"-- fnBrowseObject pidl =%p\n", aSelectedItems[0]);
|
||||
wFlags = SBSP_DEFBROWSER | SBSP_DEFMODE | SBSP_RELATIVE;
|
||||
this->pShellBrowser->lpvtbl->fnBrowseObject( this->pShellBrowser,
|
||||
aSelectedItems[0],
|
||||
wFlags);
|
||||
}
|
||||
}
|
||||
else
|
||||
{ ZeroMemory(&cmi, sizeof(cmi));
|
||||
cmi.cbSize = sizeof(cmi);
|
||||
cmi.hwnd = this->hWndParent;
|
||||
cmi.lpVerb = (LPCSTR)MAKEINTRESOURCE32A(uCommand - MENU_OFFSET);
|
||||
pContextMenu->lpvtbl->fnInvokeCommand(pContextMenu, &cmi);
|
||||
}
|
||||
}
|
||||
DestroyMenu32(hMenu);
|
||||
}
|
||||
pContextMenu->lpvtbl->fnRelease(pContextMenu);
|
||||
|
@ -761,7 +833,7 @@ LRESULT ShellView_OnCommand(LPSHELLVIEW this,DWORD dwCmdID, DWORD dwCmd, HWND32
|
|||
break;
|
||||
|
||||
default:
|
||||
FIXME(shell,"-- unknown command\n");
|
||||
FIXME(shell,"-- COMMAND unhandled\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -783,43 +855,44 @@ LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT32 CtlID, LPNMHDR lpnmh)
|
|||
|
||||
switch(lpnmh->code)
|
||||
{ case NM_SETFOCUS:
|
||||
TRACE(shell,"NM_SETFOCUS %p\n",this);
|
||||
TRACE(shell,"-- NM_SETFOCUS %p\n",this);
|
||||
ShellView_OnSetFocus(this);
|
||||
break;
|
||||
|
||||
case NM_KILLFOCUS:
|
||||
TRACE(shell,"NM_KILLFOCUS %p\n",this);
|
||||
TRACE(shell,"-- NM_KILLFOCUS %p\n",this);
|
||||
ShellView_OnDeactivate(this);
|
||||
break;
|
||||
|
||||
case HDN_ENDTRACK32A:
|
||||
TRACE(shell,"HDN_ENDTRACK32A %p\n",this);
|
||||
TRACE(shell,"-- HDN_ENDTRACK32A %p\n",this);
|
||||
/*nColumn1 = ListView_GetColumnWidth(this->hWndList, 0);
|
||||
nColumn2 = ListView_GetColumnWidth(this->hWndList, 1);*/
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case LVN_DELETEITEM:
|
||||
TRACE(shell,"LVN_DELETEITEM %p\n",this);
|
||||
TRACE(shell,"-- LVN_DELETEITEM %p\n",this);
|
||||
SHFree((LPITEMIDLIST)lpnmlv->lParam); /*delete the pidl because we made a copy of it*/
|
||||
break;
|
||||
|
||||
#ifdef LVN_ITEMACTIVATE
|
||||
case LVN_ITEMACTIVATE:
|
||||
#else
|
||||
case NM_DBLCLK:
|
||||
case NM_RETURN:
|
||||
#endif
|
||||
TRACE(shell,"LVN_ITEMACTIVATE | NM_RETURN %p\n",this);
|
||||
TRACE(shell,"-- NM_RETURN|NM_DBLCLK ignored, waiting for LVN_ITEMACTIVATE\n");
|
||||
break;
|
||||
|
||||
case LVN_ITEMACTIVATE:
|
||||
TRACE(shell,"-- LVN_ITEMACTIVATE %p\n",this);
|
||||
ShellView_DoContextMenu(this, 0, 0, TRUE);
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case NM_RCLICK:
|
||||
TRACE(shell,"NM_RCLICK %p\n",this);
|
||||
TRACE(shell,"-- NM_RCLICK %p\n",this);
|
||||
dwCursor = GetMessagePos();
|
||||
ShellView_DoContextMenu(this, LOWORD(dwCursor), HIWORD(dwCursor), FALSE);
|
||||
break;
|
||||
|
||||
case LVN_GETDISPINFO32A:
|
||||
TRACE(shell,"LVN_GETDISPINFO32A %p\n",this);
|
||||
TRACE(shell,"-- LVN_GETDISPINFO32A %p\n",this);
|
||||
pidl = (LPITEMIDLIST)lpdi->item.lParam;
|
||||
|
||||
|
||||
|
@ -858,27 +931,40 @@ LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT32 CtlID, LPNMHDR lpnmh)
|
|||
}
|
||||
}
|
||||
TRACE(shell,"-- text=%s image=%x\n",lpdi->item.pszText, lpdi->item.iImage);
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case NM_CLICK:
|
||||
TRACE(shell,"NM_CLICK %p\n",this);
|
||||
WARN(shell,"-- NM_CLICK %p\n",this);
|
||||
break;
|
||||
|
||||
case LVN_ITEMCHANGING:
|
||||
TRACE(shell,"LVN_ITEMCHANGING %p\n",this);
|
||||
WARN(shell,"-- LVN_ITEMCHANGING %p\n",this);
|
||||
break;
|
||||
|
||||
case LVN_ITEMCHANGED:
|
||||
TRACE(shell,"LVN_ITEMCHANGED %p\n",this);
|
||||
WARN(shell,"-- LVN_ITEMCHANGED %p\n",this);
|
||||
OnStateChange(this, CDBOSC_SELCHANGE);
|
||||
break;
|
||||
|
||||
case LVN_DELETEALLITEMS:
|
||||
WARN(shell,"-- LVN_DELETEALLITEMS %p\n",this);
|
||||
break;
|
||||
|
||||
case LVN_INSERTITEM:
|
||||
WARN(shell,"-- LVN_INSERTITEM %p\n",this);
|
||||
break;
|
||||
|
||||
case LVN_BEGINDRAG:
|
||||
WARN(shell,"-- LVN_BEGINDRAG %p\n",this);
|
||||
break;
|
||||
|
||||
case NM_CUSTOMDRAW:
|
||||
TRACE(shell,"NM_CUSTOMDRAW %p\n",this);
|
||||
WARN(shell,"NM_CUSTOMDRAW %p\n",this);
|
||||
break;
|
||||
|
||||
default:
|
||||
WARN (shell,"-- WM_NOTIFY unhandled\n");
|
||||
return 0;
|
||||
FIXME (shell,"-- WM_NOTIFY unhandled\n");
|
||||
break;;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -886,23 +972,17 @@ LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT32 CtlID, LPNMHDR lpnmh)
|
|||
/**************************************************************************
|
||||
* ShellView_WndProc
|
||||
*/
|
||||
//windowsx.h
|
||||
#define GET_WM_COMMAND_ID(wp, lp) LOWORD(wp)
|
||||
#define GET_WM_COMMAND_HWND(wp, lp) (HWND32)(lp)
|
||||
#define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp)
|
||||
// winuser.h
|
||||
#define WM_SETTINGCHANGE WM_WININICHANGE
|
||||
|
||||
LRESULT CALLBACK ShellView_WndProc(HWND32 hWnd, UINT32 uMessage, WPARAM32 wParam, LPARAM lParam)
|
||||
{ LPSHELLVIEW pThis = (LPSHELLVIEW)GetWindowLong32A(hWnd, GWL_USERDATA);
|
||||
LPCREATESTRUCT32A lpcs;
|
||||
DWORD dwCursor;
|
||||
|
||||
FIXME(shell,"(hwnd=%x msg=%x wparm=%x lparm=%lx)\n",hWnd, uMessage, wParam, lParam);
|
||||
TRACE(shell,"(hwnd=%x msg=%x wparm=%x lparm=%lx)\n",hWnd, uMessage, wParam, lParam);
|
||||
|
||||
switch (uMessage)
|
||||
{ case WM_NCCREATE:
|
||||
{ TRACE(shell,"WM_NCCREATE\n");
|
||||
{ TRACE(shell,"-- WM_NCCREATE\n");
|
||||
lpcs = (LPCREATESTRUCT32A)lParam;
|
||||
pThis = (LPSHELLVIEW)(lpcs->lpCreateParams);
|
||||
SetWindowLong32A(hWnd, GWL_USERDATA, (LONG)pThis);
|
||||
|
@ -911,87 +991,50 @@ LRESULT CALLBACK ShellView_WndProc(HWND32 hWnd, UINT32 uMessage, WPARAM32 wParam
|
|||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
TRACE(shell,"WM_SIZE\n");
|
||||
TRACE(shell,"-- WM_SIZE\n");
|
||||
return ShellView_OnSize(pThis,LOWORD(lParam), HIWORD(lParam));
|
||||
|
||||
case WM_SETFOCUS:
|
||||
TRACE(shell,"WM_SETFOCUS\n");
|
||||
TRACE(shell,"-- WM_SETFOCUS\n");
|
||||
return ShellView_OnSetFocus(pThis);
|
||||
|
||||
case WM_KILLFOCUS:
|
||||
TRACE(shell,"WM_KILLFOCUS\n");
|
||||
TRACE(shell,"-- WM_KILLFOCUS\n");
|
||||
return ShellView_OnKillFocus(pThis);
|
||||
|
||||
case WM_CREATE:
|
||||
TRACE(shell,"WM_CREATE\n");
|
||||
TRACE(shell,"-- WM_CREATE\n");
|
||||
return ShellView_OnCreate(pThis);
|
||||
|
||||
case WM_SHOWWINDOW:
|
||||
TRACE(shell,"WM_SHOWWINDOW\n");
|
||||
TRACE(shell,"-- WM_SHOWWINDOW\n");
|
||||
UpdateWindow32(pThis->hWndList);
|
||||
break;
|
||||
|
||||
case WM_ACTIVATE:
|
||||
TRACE(shell,"WM_ACTIVATE\n");
|
||||
TRACE(shell,"-- WM_ACTIVATE\n");
|
||||
return ShellView_OnActivate(pThis, SVUIA_ACTIVATE_FOCUS);
|
||||
|
||||
case WM_COMMAND:
|
||||
TRACE(shell,"WM_COMMAND\n");
|
||||
TRACE(shell,"-- WM_COMMAND\n");
|
||||
return ShellView_OnCommand(pThis, GET_WM_COMMAND_ID(wParam, lParam),
|
||||
GET_WM_COMMAND_CMD(wParam, lParam),
|
||||
GET_WM_COMMAND_HWND(wParam, lParam));
|
||||
|
||||
case WM_INITMENUPOPUP:
|
||||
TRACE(shell,"WM_INITMENUPOPUP\n");
|
||||
TRACE(shell,"-- WM_INITMENUPOPUP\n");
|
||||
return ShellView_UpdateMenu(pThis, (HMENU32)wParam);
|
||||
|
||||
case WM_NOTIFY:
|
||||
TRACE(shell,"WM_NOTIFY\n");
|
||||
TRACE(shell,"-- WM_NOTIFY\n");
|
||||
return ShellView_OnNotify(pThis,(UINT32)wParam, (LPNMHDR)lParam);
|
||||
|
||||
case WM_SETTINGCHANGE:
|
||||
TRACE(shell,"WM_SETTINGCHANGE\n");
|
||||
TRACE(shell,"-- WM_SETTINGCHANGE\n");
|
||||
return ShellView_OnSettingChange(pThis,(LPCSTR)lParam);
|
||||
|
||||
/* -------------*/
|
||||
case WM_MOVE:
|
||||
TRACE(shell,"WM_MOVE\n");
|
||||
break;
|
||||
|
||||
case WM_ACTIVATEAPP:
|
||||
TRACE(shell,"WM_ACTIVATEAPP\n");
|
||||
break;
|
||||
|
||||
case WM_NOTIFYFORMAT:
|
||||
TRACE(shell,"WM_NOTIFYFORMAT\n");
|
||||
break;
|
||||
|
||||
case WM_NCPAINT:
|
||||
TRACE(shell,"WM_NCPAINT\n");
|
||||
break;
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
TRACE(shell,"WM_ERASEBKGND\n");
|
||||
break;
|
||||
|
||||
case WM_PAINT:
|
||||
TRACE(shell,"WM_PAINT\n");
|
||||
break;
|
||||
|
||||
case WM_NCCALCSIZE:
|
||||
TRACE(shell,"WM_NCCALCSIZE\n");
|
||||
break;
|
||||
|
||||
case WM_WINDOWPOSCHANGING:
|
||||
TRACE(shell,"WM_WINDOWPOSCHANGING\n");
|
||||
break;
|
||||
|
||||
case WM_WINDOWPOSCHANGED:
|
||||
TRACE(shell,"WM_WINDOWPOSCHANGED\n");
|
||||
break;
|
||||
|
||||
case WM_PARENTNOTIFY:
|
||||
TRACE(shell,"WM_PARENTNOTIFY\n");
|
||||
TRACE(shell,"-- WM_PARENTNOTIFY\n");
|
||||
if ( LOWORD(wParam) == WM_RBUTTONDOWN ) /* fixme: should not be handled here*/
|
||||
{ dwCursor = GetMessagePos();
|
||||
ShellView_DoContextMenu(pThis, LOWORD(dwCursor), HIWORD(dwCursor), FALSE);
|
||||
|
@ -999,19 +1042,92 @@ LRESULT CALLBACK ShellView_WndProc(HWND32 hWnd, UINT32 uMessage, WPARAM32 wParam
|
|||
}
|
||||
break;
|
||||
|
||||
/* -------------*/
|
||||
case WM_MOVE:
|
||||
WARN(shell,"-- WM_MOVE\n");
|
||||
break;
|
||||
|
||||
case WM_ACTIVATEAPP:
|
||||
WARN(shell,"-- WM_ACTIVATEAPP\n");
|
||||
break;
|
||||
|
||||
case WM_NOTIFYFORMAT:
|
||||
WARN(shell,"-- WM_NOTIFYFORMAT\n");
|
||||
break;
|
||||
|
||||
case WM_NCPAINT:
|
||||
WARN(shell,"-- WM_NCPAINT\n");
|
||||
break;
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
WARN(shell,"-- WM_ERASEBKGND\n");
|
||||
break;
|
||||
|
||||
case WM_PAINT:
|
||||
WARN(shell,"-- WM_PAINT\n");
|
||||
break;
|
||||
|
||||
case WM_NCCALCSIZE:
|
||||
WARN(shell,"-- WM_NCCALCSIZE\n");
|
||||
break;
|
||||
|
||||
case WM_WINDOWPOSCHANGING:
|
||||
WARN(shell,"-- WM_WINDOWPOSCHANGING\n");
|
||||
break;
|
||||
|
||||
case WM_WINDOWPOSCHANGED:
|
||||
WARN(shell,"-- WM_WINDOWPOSCHANGED\n");
|
||||
break;
|
||||
|
||||
case WM_MOUSEACTIVATE:
|
||||
TRACE(shell,"WM_MOUSEACTIVATE\n");
|
||||
WARN(shell,"-- WM_MOUSEACTIVATE\n");
|
||||
break;
|
||||
|
||||
case WM_SETCURSOR:
|
||||
TRACE(shell,"WM_SETCURSOR\n");
|
||||
WARN(shell,"-- WM_SETCURSOR\n");
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
WARN(shell,"-- WM_DESTROY\n");
|
||||
break;
|
||||
|
||||
case WM_NCDESTROY:
|
||||
WARN(shell,"-- WM_NCDESTROY\n");
|
||||
break;
|
||||
|
||||
case WM_CONTEXTMENU:
|
||||
WARN(shell,"-- WM_CONTEXTMENU\n");
|
||||
break;
|
||||
|
||||
case WM_MENUSELECT:
|
||||
WARN(shell,"-- WM_MENUSELECT\n");
|
||||
break;
|
||||
|
||||
case WM_CAPTURECHANGED:
|
||||
WARN(shell,"-- WM_CAPTURECHANGED\n");
|
||||
break;
|
||||
|
||||
case WM_CHILDACTIVATE:
|
||||
WARN(shell,"-- WM_CHILDACTIVATE\n");
|
||||
break;
|
||||
|
||||
case WM_ENTERIDLE:
|
||||
WARN(shell,"-- WM_ENTERIDLE\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
FIXME(shell,"-- MESSAGE unhandled\n");
|
||||
break;
|
||||
}
|
||||
return DefWindowProc32A (hWnd, uMessage, wParam, lParam);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
*
|
||||
* The INTERFACE of the IShellView object
|
||||
*
|
||||
*
|
||||
***************************************************************************
|
||||
* IShellView::QueryInterface
|
||||
*/
|
||||
static HRESULT WINAPI IShellView_QueryInterface(LPSHELLVIEW this,REFIID riid, LPVOID *ppvObj)
|
||||
|
@ -1049,7 +1165,7 @@ static ULONG WINAPI IShellView_AddRef(LPSHELLVIEW this)
|
|||
static ULONG WINAPI IShellView_Release(LPSHELLVIEW this)
|
||||
{ TRACE(shell,"(%p)->()\n",this);
|
||||
if (!--(this->ref))
|
||||
{ TRACE(shell," destroying IEnumIDList(%p)\n",this);
|
||||
{ TRACE(shell," destroying IShellView(%p)\n",this);
|
||||
|
||||
if(this->pSFParent)
|
||||
this->pSFParent->lpvtbl->fnRelease(this->pSFParent);
|
||||
|
@ -1095,34 +1211,44 @@ static HRESULT WINAPI IShellView_UIActivate(LPSHELLVIEW this,UINT32 uState)
|
|||
LRESULT lResult;
|
||||
int nPartArray[1] = {-1};
|
||||
|
||||
FIXME(shell,"(%p) stub\n",this);
|
||||
//don't do anything if the state isn't really changing
|
||||
FIXME(shell,"(%p)->(state=%x) stub\n",this, uState);
|
||||
/*don't do anything if the state isn't really changing*/
|
||||
if(this->uState == uState)
|
||||
{ return S_OK;
|
||||
}
|
||||
|
||||
//OnActivate handles the menu merging and internal state
|
||||
/*OnActivate handles the menu merging and internal state*/
|
||||
ShellView_OnActivate(this, uState);
|
||||
|
||||
//remove the docking window
|
||||
/*remove the docking window*/
|
||||
if(g_bShowIDW)
|
||||
{ ShellView_AddRemoveDockingWindow(this, FALSE);
|
||||
}
|
||||
|
||||
//only do this if we are active
|
||||
/*only do this if we are active*/
|
||||
if(uState != SVUIA_DEACTIVATE)
|
||||
{ //update the status bar
|
||||
strcpy(szName, "dummy32");
|
||||
|
||||
this->pSFParent->lpvtbl->fnGetFolderPath(this->pSFParent, szName + strlen(szName), sizeof(szName) - strlen(szName));
|
||||
this->pSFParent->lpvtbl->fnGetFolderPath( this->pSFParent,
|
||||
szName + strlen(szName),
|
||||
sizeof(szName) - strlen(szName));
|
||||
|
||||
/* set the number of parts */
|
||||
this->pShellBrowser->lpvtbl->fnSendControlMsg(this->pShellBrowser,FCW_STATUS,
|
||||
SB_SETPARTS, 1, (LPARAM)nPartArray, &lResult);
|
||||
this->pShellBrowser->lpvtbl->fnSendControlMsg(this->pShellBrowser,
|
||||
FCW_STATUS,
|
||||
SB_SETPARTS,
|
||||
1,
|
||||
(LPARAM)nPartArray,
|
||||
&lResult);
|
||||
|
||||
/* set the text for the parts */
|
||||
this->pShellBrowser->lpvtbl->fnSendControlMsg(this->pShellBrowser,FCW_STATUS,
|
||||
SB_SETTEXT32A, 0, (LPARAM)szName, &lResult);
|
||||
this->pShellBrowser->lpvtbl->fnSendControlMsg(this->pShellBrowser,
|
||||
FCW_STATUS,
|
||||
SB_SETTEXT32A,
|
||||
0,
|
||||
(LPARAM)szName,
|
||||
&lResult);
|
||||
|
||||
//add the docking window if necessary
|
||||
if(g_bShowIDW)
|
||||
|
@ -1132,9 +1258,11 @@ static HRESULT WINAPI IShellView_UIActivate(LPSHELLVIEW this,UINT32 uState)
|
|||
return S_OK;
|
||||
}
|
||||
static HRESULT WINAPI IShellView_Refresh(LPSHELLVIEW this)
|
||||
{ TRACE(shell,"(%p) stub\n",this);
|
||||
{ TRACE(shell,"(%p)\n",this);
|
||||
|
||||
ListView_DeleteAllItems(this->hWndList);
|
||||
ShellView_FillList(this);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
static HRESULT WINAPI IShellView_CreateViewWindow(LPSHELLVIEW this, IShellView *lpPrevView,
|
||||
|
@ -1143,9 +1271,25 @@ static HRESULT WINAPI IShellView_CreateViewWindow(LPSHELLVIEW this, IShellView *
|
|||
*phWnd = 0;
|
||||
|
||||
TRACE(shell,"(%p)->(shlview=%p set=%p shlbrs=%p rec=%p hwnd=%p) incomplete\n",this, lpPrevView,lpfs, psb, prcView, phWnd);
|
||||
TRACE(shell,"-- left=%i top=%i right=%i bottom=%i\n",prcView->left,prcView->top, prcView->right, prcView->bottom);
|
||||
TRACE(shell,"-- vmode=%x flags=%x left=%i top=%i right=%i bottom=%i\n",lpfs->ViewMode, lpfs->fFlags ,prcView->left,prcView->top, prcView->right, prcView->bottom);
|
||||
|
||||
//if our window class has not been registered, then do so
|
||||
/*set up the member variables*/
|
||||
this->pShellBrowser = psb;
|
||||
this->FolderSettings = *lpfs;
|
||||
|
||||
/*get our parent window*/
|
||||
this->pShellBrowser->lpvtbl->fnAddRef(this->pShellBrowser);
|
||||
this->pShellBrowser->lpvtbl->fnGetWindow(this->pShellBrowser, &(this->hWndParent));
|
||||
|
||||
/* try to get the ICommDlgBrowserInterface */
|
||||
this->pCommDlgBrowser=NULL;
|
||||
if ( SUCCEEDED (this->pShellBrowser->lpvtbl->fnQueryInterface( this->pShellBrowser,
|
||||
&IID_ICommDlgBrowser,
|
||||
(LPVOID*) &this->pCommDlgBrowser)))
|
||||
{ TRACE(shell,"-- CommDlgBrowser\n");
|
||||
}
|
||||
|
||||
/*if our window class has not been registered, then do so*/
|
||||
if(!GetClassInfo32A(shell32_hInstance, SV_CLASS_NAME, &wc))
|
||||
{ ZeroMemory(&wc, sizeof(wc));
|
||||
wc.style = CS_HREDRAW | CS_VREDRAW;
|
||||
|
@ -1162,12 +1306,6 @@ static HRESULT WINAPI IShellView_CreateViewWindow(LPSHELLVIEW this, IShellView *
|
|||
if(!RegisterClass32A(&wc))
|
||||
return E_FAIL;
|
||||
}
|
||||
//set up the member variables
|
||||
this->pShellBrowser = psb;
|
||||
this->FolderSettings = *lpfs;
|
||||
|
||||
//get our parent window
|
||||
this->pShellBrowser->lpvtbl->fnGetWindow(this->pShellBrowser, &(this->hWndParent));
|
||||
|
||||
*phWnd = CreateWindowEx32A(0, SV_CLASS_NAME, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS,
|
||||
prcView->left, prcView->top, prcView->right - prcView->left, prcView->bottom - prcView->top,
|
||||
|
@ -1176,13 +1314,11 @@ static HRESULT WINAPI IShellView_CreateViewWindow(LPSHELLVIEW this, IShellView *
|
|||
if(!*phWnd)
|
||||
return E_FAIL;
|
||||
|
||||
this->pShellBrowser->lpvtbl->fnAddRef(this->pShellBrowser);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IShellView_DestroyViewWindow(LPSHELLVIEW this)
|
||||
{ TRACE(shell,"(%p) stub\n",this);
|
||||
{ TRACE(shell,"(%p)\n",this);
|
||||
|
||||
/*Make absolutely sure all our UI is cleaned up.*/
|
||||
IShellView_UIActivate(this, SVUIA_DEACTIVATE);
|
||||
|
@ -1194,10 +1330,15 @@ static HRESULT WINAPI IShellView_DestroyViewWindow(LPSHELLVIEW this)
|
|||
return S_OK;
|
||||
}
|
||||
static HRESULT WINAPI IShellView_GetCurrentInfo(LPSHELLVIEW this, LPFOLDERSETTINGS lpfs)
|
||||
{ FIXME(shell,"(%p)->(%p)stub\n",this, lpfs);
|
||||
{ TRACE(shell,"(%p)->(%p) vmode=%x flags=%x\n",this, lpfs,
|
||||
this->FolderSettings.ViewMode, this->FolderSettings.fFlags);
|
||||
|
||||
*lpfs = this->FolderSettings;
|
||||
return S_OK;
|
||||
if (lpfs)
|
||||
{ *lpfs = this->FolderSettings;
|
||||
return NOERROR;
|
||||
}
|
||||
else
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
static HRESULT WINAPI IShellView_AddPropertySheetPages(LPSHELLVIEW this, DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam)
|
||||
{ FIXME(shell,"(%p) stub\n",this);
|
||||
|
@ -1215,7 +1356,7 @@ static HRESULT WINAPI IShellView_GetItemObject(LPSHELLVIEW this, UINT32 uItem, R
|
|||
{ char xriid[50];
|
||||
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
||||
|
||||
FIXME(shell,"(%p)->(0x%08x,\n\t%s, %p)stub\n",this, uItem, xriid, ppvOut);
|
||||
FIXME(shell,"(%p)->(uItem=0x%08x,\n\tIID=%s, ppv=%p)stub\n",this, uItem, xriid, ppvOut);
|
||||
|
||||
*ppvOut = NULL;
|
||||
return E_NOTIMPL;
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
DEFS = @DLLFLAGS@ -D__WINE__
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = winaspi
|
||||
|
||||
C_SRCS = \
|
||||
winaspi16.c
|
||||
|
||||
all: $(MODULE).o
|
||||
|
||||
@MAKE_RULES@
|
||||
|
||||
### Dependencies:
|
|
@ -9,6 +9,7 @@
|
|||
#include <callback.h>
|
||||
#include "windows.h"
|
||||
#include "aspi.h"
|
||||
#include "winaspi.h"
|
||||
#include "options.h"
|
||||
#include "heap.h"
|
||||
#include "debug.h"
|
||||
|
@ -23,83 +24,6 @@
|
|||
* 3) Only linux supported so far
|
||||
*/
|
||||
|
||||
#ifdef linux
|
||||
|
||||
/* This is a duplicate of the sg_header from /usr/src/linux/include/scsi/sg.h
|
||||
* kernel 2.0.30
|
||||
* This will probably break at some point, but for those who don't have
|
||||
* kernels installed, I think this should still work.
|
||||
*
|
||||
*/
|
||||
|
||||
struct sg_header
|
||||
{
|
||||
int pack_len; /* length of incoming packet <4096 (including header) */
|
||||
int reply_len; /* maximum length <4096 of expected reply */
|
||||
int pack_id; /* id number of packet */
|
||||
int result; /* 0==ok, otherwise refer to errno codes */
|
||||
unsigned int twelve_byte:1; /* Force 12 byte command length for group 6 & 7 commands */
|
||||
unsigned int other_flags:31; /* for future use */
|
||||
unsigned char sense_buffer[16]; /* used only by reads */
|
||||
/* command follows then data for command */
|
||||
};
|
||||
|
||||
#define SCSI_OFF sizeof(struct sg_header)
|
||||
#endif
|
||||
|
||||
#define ASPI_POSTING(prb) (prb->SRB_Flags & 0x1)
|
||||
|
||||
#define HOST_TO_TARGET(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x2)
|
||||
#define TARGET_TO_HOST(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x1)
|
||||
#define NO_DATA_TRANSFERED(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x3)
|
||||
|
||||
#define SRB_ENABLE_RESIDUAL_COUNT 0x4
|
||||
|
||||
#define INQUIRY_VENDOR 8
|
||||
|
||||
#define MUSTEK_SCSI_AREA_AND_WINDOWS 0x04
|
||||
#define MUSTEK_SCSI_READ_SCANNED_DATA 0x08
|
||||
#define MUSTEK_SCSI_GET_IMAGE_STATUS 0x0f
|
||||
#define MUSTEK_SCSI_ADF_AND_BACKTRACE 0x10
|
||||
#define MUSTEK_SCSI_CCD_DISTANCE 0x11
|
||||
#define MUSTEK_SCSI_START_STOP 0x1b
|
||||
|
||||
#define CMD_TEST_UNIT_READY 0x00
|
||||
#define CMD_REQUEST_SENSE 0x03
|
||||
#define CMD_INQUIRY 0x12
|
||||
|
||||
/* scanner commands - just for debug */
|
||||
#define CMD_SCAN_GET_DATA_BUFFER_STATUS 0x34
|
||||
#define CMD_SCAN_GET_WINDOW 0x25
|
||||
#define CMD_SCAN_OBJECT_POSITION 0x31
|
||||
#define CMD_SCAN_READ 0x28
|
||||
#define CMD_SCAN_RELEASE_UNIT 0x17
|
||||
#define CMD_SCAN_RESERVE_UNIT 0x16
|
||||
#define CMD_SCAN_SCAN 0x1b
|
||||
#define CMD_SCAN_SEND 0x2a
|
||||
#define CMD_SCAN_CHANGE_DEFINITION 0x40
|
||||
|
||||
#define INQURIY_CMDLEN 6
|
||||
#define INQURIY_REPLY_LEN 96
|
||||
#define INQUIRY_VENDOR 8
|
||||
|
||||
#define SENSE_BUFFER(prb) (&prb->CDBByte[prb->SRB_CDBLen])
|
||||
|
||||
|
||||
/* Just a container for seeing what devices are open */
|
||||
struct ASPI_DEVICE_INFO {
|
||||
struct ASPI_DEVICE_INFO * next;
|
||||
int fd;
|
||||
int hostId;
|
||||
int target;
|
||||
int lun;
|
||||
};
|
||||
|
||||
typedef struct ASPI_DEVICE_INFO ASPI_DEVICE_INFO;
|
||||
static ASPI_DEVICE_INFO *ASPI_open_devices = NULL;
|
||||
|
||||
static BOOL16 DOSASPI = FALSE;
|
||||
|
||||
#ifdef linux
|
||||
static int
|
||||
ASPI_OpenDevice16(SRB_ExecSCSICmd16 *prb)
|
||||
|
@ -135,7 +59,7 @@ ASPI_OpenDevice16(SRB_ExecSCSICmd16 *prb)
|
|||
fd = open(device_str, O_RDWR);
|
||||
if (fd == -1) {
|
||||
int save_error = errno;
|
||||
WARN(aspi, "Error opening device errno=%d\n", save_error);
|
||||
ERR(aspi, "Error opening device %s, errno=%d\n", device_str, save_error);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -154,18 +78,25 @@ ASPI_OpenDevice16(SRB_ExecSCSICmd16 *prb)
|
|||
|
||||
|
||||
static void
|
||||
ASPI_DebugPrintCmd16(SRB_ExecSCSICmd16 *prb)
|
||||
ASPI_DebugPrintCmd(SRB_ExecSCSICmd16 *prb, UINT16 mode)
|
||||
{
|
||||
BYTE cmd;
|
||||
int i;
|
||||
BYTE *cdb;
|
||||
BYTE *lpBuf;
|
||||
BYTE *lpBuf = 0;
|
||||
dbg_decl_str(aspi, 512);
|
||||
|
||||
if ((DOSASPI) && (prb->SRB_BufPointer)) /* translate real mode address */
|
||||
switch (mode)
|
||||
{
|
||||
case ASPI_DOS:
|
||||
/* translate real mode address */
|
||||
if (prb->SRB_BufPointer)
|
||||
lpBuf = (BYTE *)DOSMEM_MapRealToLinear((UINT32)prb->SRB_BufPointer);
|
||||
else
|
||||
break;
|
||||
case ASPI_WIN16:
|
||||
lpBuf = PTR_SEG_TO_LIN(prb->SRB_BufPointer);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (prb->CDBByte[0]) {
|
||||
case CMD_INQUIRY:
|
||||
|
@ -218,7 +149,7 @@ ASPI_DebugPrintCmd16(SRB_ExecSCSICmd16 *prb)
|
|||
}
|
||||
|
||||
static void
|
||||
PrintSenseArea16(SRB_ExecSCSICmd16 *prb)
|
||||
ASPI_PrintSenseArea16(SRB_ExecSCSICmd16 *prb)
|
||||
{
|
||||
int i;
|
||||
BYTE *cdb;
|
||||
|
@ -233,80 +164,107 @@ PrintSenseArea16(SRB_ExecSCSICmd16 *prb)
|
|||
}
|
||||
|
||||
static void
|
||||
ASPI_DebugPrintResult16(SRB_ExecSCSICmd16 *prb)
|
||||
ASPI_DebugPrintResult(SRB_ExecSCSICmd16 *prb, UINT16 mode)
|
||||
{
|
||||
BYTE *lpBuf;
|
||||
BYTE *lpBuf = 0;
|
||||
|
||||
if ((DOSASPI) && (prb->SRB_BufPointer)) /* translate real mode address */
|
||||
switch (mode)
|
||||
{
|
||||
case ASPI_DOS:
|
||||
/* translate real mode address */
|
||||
if (prb->SRB_BufPointer)
|
||||
lpBuf = (BYTE *)DOSMEM_MapRealToLinear((UINT32)prb->SRB_BufPointer);
|
||||
else
|
||||
break;
|
||||
case ASPI_WIN16:
|
||||
lpBuf = PTR_SEG_TO_LIN(prb->SRB_BufPointer);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (prb->CDBByte[0]) {
|
||||
case CMD_INQUIRY:
|
||||
TRACE(aspi, "Vendor: %s\n", lpBuf + INQUIRY_VENDOR);
|
||||
TRACE(aspi, "Vendor: '%s'\n", lpBuf + INQUIRY_VENDOR);
|
||||
break;
|
||||
case CMD_TEST_UNIT_READY:
|
||||
PrintSenseArea16(prb);
|
||||
ASPI_PrintSenseArea16(prb);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static WORD
|
||||
ASPI_ExecScsiCmd16(SRB_ExecSCSICmd16 *prb, SEGPTR segptr_prb)
|
||||
ASPI_ExecScsiCmd(DWORD ptrPRB, UINT16 mode)
|
||||
{
|
||||
SRB_ExecSCSICmd16 *lpPRB = 0;
|
||||
struct sg_header *sg_hd, *sg_reply_hdr;
|
||||
int status;
|
||||
BYTE *lpBuf;
|
||||
BYTE *lpBuf = 0;
|
||||
int in_len, out_len;
|
||||
int error_code = 0;
|
||||
int fd;
|
||||
|
||||
ASPI_DebugPrintCmd16(prb);
|
||||
switch (mode)
|
||||
{
|
||||
case ASPI_DOS:
|
||||
if (ptrPRB)
|
||||
lpPRB = (SRB_ExecSCSICmd16 *)DOSMEM_MapRealToLinear(ptrPRB);
|
||||
break;
|
||||
case ASPI_WIN16:
|
||||
lpPRB = PTR_SEG_TO_LIN(ptrPRB);
|
||||
break;
|
||||
}
|
||||
|
||||
fd = ASPI_OpenDevice16(prb);
|
||||
ASPI_DebugPrintCmd(lpPRB, mode);
|
||||
|
||||
fd = ASPI_OpenDevice16(lpPRB);
|
||||
if (fd == -1) {
|
||||
WARN(aspi, "ASPI_ExecScsiCmd16 failed: could not open device.\n");
|
||||
prb->SRB_Status = SS_ERR;
|
||||
ERR(aspi, "Failed: could not open device. Device permissions !?\n");
|
||||
lpPRB->SRB_Status = SS_ERR;
|
||||
return SS_ERR;
|
||||
}
|
||||
|
||||
sg_hd = NULL;
|
||||
sg_reply_hdr = NULL;
|
||||
|
||||
prb->SRB_Status = SS_PENDING;
|
||||
if ((DOSASPI) && (prb->SRB_BufPointer)) /* translate real mode address */
|
||||
lpBuf = (BYTE *)DOSMEM_MapRealToLinear((UINT32)prb->SRB_BufPointer);
|
||||
else
|
||||
lpBuf = PTR_SEG_TO_LIN(prb->SRB_BufPointer);
|
||||
lpPRB->SRB_Status = SS_PENDING;
|
||||
|
||||
if (!prb->SRB_CDBLen) {
|
||||
WARN(aspi, "ASPI_ExecScsiCmd16 failed: prb->SRB_CDBLen = 0.\n");
|
||||
prb->SRB_Status = SS_ERR;
|
||||
switch (mode)
|
||||
{
|
||||
case ASPI_DOS:
|
||||
/* translate real mode address */
|
||||
if (ptrPRB)
|
||||
lpBuf = (BYTE *)DOSMEM_MapRealToLinear((UINT32)lpPRB->SRB_BufPointer);
|
||||
break;
|
||||
case ASPI_WIN16:
|
||||
lpBuf = PTR_SEG_TO_LIN(lpPRB->SRB_BufPointer);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!lpPRB->SRB_CDBLen) {
|
||||
WARN(aspi, "Failed: lpPRB->SRB_CDBLen = 0.\n");
|
||||
lpPRB->SRB_Status = SS_ERR;
|
||||
return SS_ERR;
|
||||
}
|
||||
|
||||
/* build up sg_header + scsi cmd */
|
||||
if (HOST_TO_TARGET(prb)) {
|
||||
if (HOST_TO_TARGET(lpPRB)) {
|
||||
/* send header, command, and then data */
|
||||
in_len = SCSI_OFF + prb->SRB_CDBLen + prb->SRB_BufLen;
|
||||
in_len = SCSI_OFF + lpPRB->SRB_CDBLen + lpPRB->SRB_BufLen;
|
||||
sg_hd = (struct sg_header *) malloc(in_len);
|
||||
memset(sg_hd, 0, SCSI_OFF);
|
||||
memcpy(sg_hd + 1, &prb->CDBByte[0], prb->SRB_CDBLen);
|
||||
if (prb->SRB_BufLen) {
|
||||
memcpy(((BYTE *) sg_hd) + SCSI_OFF + prb->SRB_CDBLen, lpBuf, prb->SRB_BufLen);
|
||||
memcpy(sg_hd + 1, &lpPRB->CDBByte[0], lpPRB->SRB_CDBLen);
|
||||
if (lpPRB->SRB_BufLen) {
|
||||
memcpy(((BYTE *) sg_hd) + SCSI_OFF + lpPRB->SRB_CDBLen, lpBuf, lpPRB->SRB_BufLen);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* send header and command - no data */
|
||||
in_len = SCSI_OFF + prb->SRB_CDBLen;
|
||||
in_len = SCSI_OFF + lpPRB->SRB_CDBLen;
|
||||
sg_hd = (struct sg_header *) malloc(in_len);
|
||||
memset(sg_hd, 0, SCSI_OFF);
|
||||
memcpy(sg_hd + 1, &prb->CDBByte[0], prb->SRB_CDBLen);
|
||||
memcpy(sg_hd + 1, &lpPRB->CDBByte[0], lpPRB->SRB_CDBLen);
|
||||
}
|
||||
|
||||
if (TARGET_TO_HOST(prb)) {
|
||||
out_len = SCSI_OFF + prb->SRB_BufLen;
|
||||
if (TARGET_TO_HOST(lpPRB)) {
|
||||
out_len = SCSI_OFF + lpPRB->SRB_BufLen;
|
||||
sg_reply_hdr = (struct sg_header *) malloc(out_len);
|
||||
memset(sg_reply_hdr, 0, SCSI_OFF);
|
||||
sg_hd->reply_len = out_len;
|
||||
|
@ -344,55 +302,69 @@ ASPI_ExecScsiCmd16(SRB_ExecSCSICmd16 *prb, SEGPTR segptr_prb)
|
|||
goto error_exit;
|
||||
}
|
||||
|
||||
if (TARGET_TO_HOST(prb) && prb->SRB_BufLen) {
|
||||
memcpy(lpBuf, sg_reply_hdr + 1, prb->SRB_BufLen);
|
||||
if (TARGET_TO_HOST(lpPRB) && lpPRB->SRB_BufLen) {
|
||||
memcpy(lpBuf, sg_reply_hdr + 1, lpPRB->SRB_BufLen);
|
||||
}
|
||||
|
||||
/* copy in sense buffer to amount that is available in client */
|
||||
if (prb->SRB_SenseLen) {
|
||||
int sense_len = prb->SRB_SenseLen;
|
||||
if (prb->SRB_SenseLen > 16)
|
||||
if (lpPRB->SRB_SenseLen) {
|
||||
int sense_len = lpPRB->SRB_SenseLen;
|
||||
if (lpPRB->SRB_SenseLen > 16)
|
||||
sense_len = 16;
|
||||
memcpy(SENSE_BUFFER(prb), &sg_reply_hdr->sense_buffer[0], sense_len);
|
||||
memcpy(SENSE_BUFFER(lpPRB), &sg_reply_hdr->sense_buffer[0], sense_len);
|
||||
}
|
||||
|
||||
|
||||
prb->SRB_Status = SS_COMP;
|
||||
prb->SRB_HaStat = HASTAT_OK;
|
||||
prb->SRB_TargStat = STATUS_GOOD;
|
||||
lpPRB->SRB_Status = SS_COMP;
|
||||
lpPRB->SRB_HaStat = HASTAT_OK;
|
||||
lpPRB->SRB_TargStat = STATUS_GOOD;
|
||||
|
||||
/* now do posting */
|
||||
|
||||
if (ASPI_POSTING(prb) && prb->SRB_PostProc) {
|
||||
TRACE(aspi, "Post Routine (%lx) called\n", (DWORD) prb->SRB_PostProc);
|
||||
Callbacks->CallASPIPostProc(prb->SRB_PostProc, segptr_prb);
|
||||
if (ASPI_POSTING(lpPRB) && lpPRB->SRB_PostProc) {
|
||||
TRACE(aspi, "Post Routine (%lx) called\n", (DWORD) lpPRB->SRB_PostProc);
|
||||
switch (mode)
|
||||
{
|
||||
case ASPI_DOS:
|
||||
{
|
||||
SEGPTR spPRB = MapLS(lpPRB);
|
||||
|
||||
Callbacks->CallASPIPostProc(lpPRB->SRB_PostProc, spPRB);
|
||||
UnMapLS(spPRB);
|
||||
break;
|
||||
}
|
||||
case ASPI_WIN16:
|
||||
Callbacks->CallASPIPostProc(lpPRB->SRB_PostProc, ptrPRB);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
free(sg_reply_hdr);
|
||||
free(sg_hd);
|
||||
ASPI_DebugPrintResult16(prb);
|
||||
ASPI_DebugPrintResult(lpPRB, mode);
|
||||
return SS_COMP;
|
||||
|
||||
error_exit:
|
||||
if (error_code == EBUSY) {
|
||||
prb->SRB_Status = SS_ASPI_IS_BUSY;
|
||||
lpPRB->SRB_Status = SS_ASPI_IS_BUSY;
|
||||
TRACE(aspi, "Device busy\n");
|
||||
}
|
||||
else {
|
||||
WARN(aspi, "ASPI_GenericHandleScsiCmd failed\n");
|
||||
prb->SRB_Status = SS_ERR;
|
||||
WARN(aspi, "Failed\n");
|
||||
lpPRB->SRB_Status = SS_ERR;
|
||||
}
|
||||
|
||||
/* I'm not sure exactly error codes work here
|
||||
* We probably should set prb->SRB_TargStat, SRB_HaStat ?
|
||||
* We probably should set lpPRB->SRB_TargStat, SRB_HaStat ?
|
||||
*/
|
||||
WARN(aspi, "ASPI_GenericHandleScsiCmd: error_exit\n");
|
||||
WARN(aspi, "error_exit\n");
|
||||
free(sg_reply_hdr);
|
||||
free(sg_hd);
|
||||
return prb->SRB_Status;
|
||||
return lpPRB->SRB_Status;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetASPISupportInfo16 (WINASPI.1)
|
||||
*/
|
||||
|
@ -400,48 +372,61 @@ error_exit:
|
|||
WORD WINAPI GetASPISupportInfo16()
|
||||
{
|
||||
#ifdef linux
|
||||
TRACE(aspi, "GETASPISupportInfo\n");
|
||||
TRACE(aspi, "GETASPISupportInfo16\n");
|
||||
/* high byte SS_COMP - low byte number of host adapters.
|
||||
* FIXME!!! The number of host adapters is incorrect.
|
||||
* I'm not sure how to determine this under linux etc.
|
||||
*/
|
||||
return ((SS_COMP << 8) | 0x1);
|
||||
return ((SS_COMP << 8) | 1);
|
||||
#else
|
||||
return ((SS_COMP << 8) | 0x0);
|
||||
return ((SS_COMP << 8) | 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SendASPICommand16 (WINASPI.2)
|
||||
*/
|
||||
|
||||
WORD WINAPI SendASPICommand16(SEGPTR segptr_srb)
|
||||
DWORD ASPI_SendASPICommand(DWORD ptrSRB, UINT16 mode)
|
||||
{
|
||||
#ifdef linux
|
||||
LPSRB16 lpSRB = PTR_SEG_TO_LIN(segptr_srb);
|
||||
LPSRB16 lpSRB = 0;
|
||||
|
||||
switch (lpSRB->common.SRB_cmd) {
|
||||
switch (mode)
|
||||
{
|
||||
case ASPI_DOS:
|
||||
if (ptrSRB)
|
||||
lpSRB = (LPSRB16)DOSMEM_MapRealToLinear(ptrSRB);
|
||||
break;
|
||||
case ASPI_WIN16:
|
||||
lpSRB = PTR_SEG_TO_LIN(ptrSRB);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (lpSRB->common.SRB_Cmd) {
|
||||
case SC_HA_INQUIRY:
|
||||
lpSRB->inquiry.SRB_Status = 0x1; /* completed successfully */
|
||||
lpSRB->inquiry.SRB_HaId = 1; /* bogus value */
|
||||
lpSRB->inquiry.SRB_Status = SS_COMP; /* completed successfully */
|
||||
if (lpSRB->inquiry.SRB_55AASignature == 0x55aa) {
|
||||
TRACE(aspi, "Extended request detected (Adaptec's ASPIxDOS).\nWe don't support it at the moment.\n");
|
||||
}
|
||||
lpSRB->inquiry.SRB_ExtBufferSize = 0x2000; /* bogus value */
|
||||
lpSRB->inquiry.HA_Count = 1; /* not always */
|
||||
lpSRB->inquiry.HA_SCSI_ID = 7; /* not always ID 7 */
|
||||
strcat(lpSRB->inquiry.HA_ManagerId, "Wine ASPI"); /* max 15 chars */
|
||||
lpSRB->inquiry.SRB_55AASignature = 0x55aa; /* correct ??? */
|
||||
lpSRB->inquiry.SRB_ExtBufferSize = 0x2000; /* bogus value */
|
||||
FIXME(aspi, "ASPI: Partially implemented SC_HA_INQUIRY\n");
|
||||
break;
|
||||
strcat(lpSRB->inquiry.HA_ManagerId, "Wine ASPI16"); /* max 15 chars */
|
||||
strcat(lpSRB->inquiry.HA_Identifier, "Wine host"); /* FIXME: return host
|
||||
adapter name */
|
||||
memset(lpSRB->inquiry.HA_Unique, 0, 16); /* default HA_Unique content */
|
||||
lpSRB->inquiry.HA_Unique[6] = 0x02; /* Maximum Transfer Length (128K, Byte> 4-7) */
|
||||
FIXME(aspi, "ASPI: Partially implemented SC_HA_INQUIRY for adapter %d.\n", lpSRB->inquiry.SRB_HaId);
|
||||
return SS_COMP;
|
||||
case SC_GET_DEV_TYPE:
|
||||
FIXME(aspi, "Not implemented SC_GET_DEV_TYPE\n");
|
||||
break;
|
||||
case SC_EXEC_SCSI_CMD:
|
||||
return ASPI_ExecScsiCmd16(&lpSRB->cmd, segptr_srb);
|
||||
return ASPI_ExecScsiCmd((DWORD)ptrSRB, mode);
|
||||
break;
|
||||
case SC_RESET_DEV:
|
||||
FIXME(aspi, "Not implemented SC_RESET_DEV\n");
|
||||
break;
|
||||
default:
|
||||
WARN(aspi, "Unknown command %d\n", lpSRB->common.SRB_cmd);
|
||||
WARN(aspi, "Unknown command %d\n", lpSRB->common.SRB_Cmd);
|
||||
}
|
||||
return SS_INVALID_SRB;
|
||||
#else
|
||||
|
@ -449,11 +434,25 @@ WORD WINAPI SendASPICommand16(SEGPTR segptr_srb)
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetASPIDLLVersion (WINASPI.4)
|
||||
* SendASPICommand16 (WINASPI.2)
|
||||
*/
|
||||
WORD WINAPI SendASPICommand16(SEGPTR segptr_srb)
|
||||
{
|
||||
#ifdef linux
|
||||
return ASPI_SendASPICommand(segptr_srb, ASPI_WIN16);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetASPIDLLVersion16 (WINASPI.4)
|
||||
*/
|
||||
|
||||
DWORD WINAPI GetASPIDLLVersion()
|
||||
DWORD WINAPI GetASPIDLLVersion16()
|
||||
{
|
||||
#ifdef linux
|
||||
return (DWORD)2;
|
||||
|
@ -465,14 +464,7 @@ DWORD WINAPI GetASPIDLLVersion()
|
|||
|
||||
void WINAPI ASPI_DOS_func(DWORD srb)
|
||||
{
|
||||
LPSRB16 lpSRB = (LPSRB16)DOSMEM_MapRealToLinear(srb);
|
||||
SEGPTR spSRB = MapLS(lpSRB);
|
||||
|
||||
TRACE(aspi, "DOSASPI: function #%d\n", lpSRB->common.SRB_cmd);
|
||||
DOSASPI = TRUE;
|
||||
SendASPICommand16(spSRB);
|
||||
DOSASPI = FALSE;
|
||||
UnMapLS(spSRB);
|
||||
ASPI_SendASPICommand(srb, ASPI_DOS);
|
||||
}
|
||||
|
||||
|
||||
|
@ -498,19 +490,3 @@ void ASPI_DOS_HandleInt(CONTEXT *context)
|
|||
SET_CFLAG(context);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* GetASPI32SupportInfo [WNASPI32.0]
|
||||
*
|
||||
* Checks if the ASPI subsystem is initialized correctly.
|
||||
*
|
||||
* RETURNS
|
||||
* HIWORD: 0.
|
||||
* HIBYTE of LOWORD: status (SS_COMP or SS_FAILED_INIT)
|
||||
* LOBYTE of LOWORD: # of host adapters.
|
||||
*/
|
||||
DWORD WINAPI GetASPI32SupportInfo()
|
||||
{
|
||||
return (SS_COMP << 8) | 1; /* FIXME: get # of host adapters installed */
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
DEFS = @DLLFLAGS@ -D__WINE__
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = wnaspi32
|
||||
|
||||
C_SRCS = \
|
||||
winaspi32.c
|
||||
|
||||
all: $(MODULE).o
|
||||
|
||||
@MAKE_RULES@
|
||||
|
||||
### Dependencies:
|
|
@ -0,0 +1,373 @@
|
|||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <ldt.h>
|
||||
#include <memory.h>
|
||||
#include <unistd.h>
|
||||
#include <callback.h>
|
||||
#include "windows.h"
|
||||
#include "aspi.h"
|
||||
#include "wnaspi32.h"
|
||||
#include "options.h"
|
||||
#include "heap.h"
|
||||
#include "debug.h"
|
||||
#include "selectors.h"
|
||||
#include "module.h"
|
||||
#include "miscemu.h"
|
||||
|
||||
|
||||
/* FIXME!
|
||||
* 1) Residual byte length reporting not handled
|
||||
* 2) Make this code re-entrant for multithreading
|
||||
* 3) Only linux supported so far
|
||||
*/
|
||||
|
||||
#ifdef linux
|
||||
static int
|
||||
ASPI_OpenDevice32(SRB_ExecSCSICmd32 *prb)
|
||||
{
|
||||
int fd;
|
||||
char idstr[20];
|
||||
char device_str[50];
|
||||
ASPI_DEVICE_INFO *curr;
|
||||
|
||||
/* search list of devices to see if we've opened it already.
|
||||
* There is not an explicit open/close in ASPI land, so hopefully
|
||||
* keeping a device open won't be a problem.
|
||||
*/
|
||||
|
||||
for (curr = ASPI_open_devices; curr; curr = curr->next) {
|
||||
if (curr->hostId == prb->SRB_HaId &&
|
||||
curr->target == prb->SRB_Target &&
|
||||
curr->lun == prb->SRB_Lun) {
|
||||
return curr->fd;
|
||||
}
|
||||
}
|
||||
|
||||
/* device wasn't cached, go ahead and open it */
|
||||
sprintf(idstr, "scsi c%1dt%1dd%1d", prb->SRB_HaId, prb->SRB_Target, prb->SRB_Lun);
|
||||
|
||||
if (!PROFILE_GetWineIniString(idstr, "Device", "", device_str, sizeof(device_str))) {
|
||||
TRACE(aspi, "Trying to open unlisted scsi device %s\n", idstr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
TRACE(aspi, "Opening device %s=%s\n", idstr, device_str);
|
||||
|
||||
fd = open(device_str, O_RDWR);
|
||||
if (fd == -1) {
|
||||
int save_error = errno;
|
||||
ERR(aspi, "Error opening device %s, errno=%d\n", device_str, save_error);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* device is now open */
|
||||
curr = HeapAlloc( SystemHeap, 0, sizeof(ASPI_DEVICE_INFO) );
|
||||
curr->fd = fd;
|
||||
curr->hostId = prb->SRB_HaId;
|
||||
curr->target = prb->SRB_Target;
|
||||
curr->lun = prb->SRB_Lun;
|
||||
|
||||
/* insert new record at beginning of open device list */
|
||||
curr->next = ASPI_open_devices;
|
||||
ASPI_open_devices = curr;
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ASPI_DebugPrintCmd32(SRB_ExecSCSICmd32 *prb)
|
||||
{
|
||||
BYTE cmd;
|
||||
int i;
|
||||
BYTE *cdb;
|
||||
dbg_decl_str(aspi, 512);
|
||||
|
||||
switch (prb->CDBByte[0]) {
|
||||
case CMD_INQUIRY:
|
||||
TRACE(aspi, "{\n");
|
||||
TRACE(aspi, "\tEVPD: %d\n", prb->CDBByte[1] & 1);
|
||||
TRACE(aspi, "\tLUN: %d\n", (prb->CDBByte[1] & 0xc) >> 1);
|
||||
TRACE(aspi, "\tPAGE CODE: %d\n", prb->CDBByte[2]);
|
||||
TRACE(aspi, "\tALLOCATION LENGTH: %d\n", prb->CDBByte[4]);
|
||||
TRACE(aspi, "\tCONTROL: %d\n", prb->CDBByte[5]);
|
||||
TRACE(aspi, "}\n");
|
||||
break;
|
||||
case CMD_SCAN_SCAN:
|
||||
TRACE(aspi, "Transfer Length: %d\n", prb->CDBByte[4]);
|
||||
break;
|
||||
}
|
||||
|
||||
TRACE(aspi, "Host Adapter: %d\n", prb->SRB_HaId);
|
||||
TRACE(aspi, "Flags: %d\n", prb->SRB_Flags);
|
||||
if (TARGET_TO_HOST(prb)) {
|
||||
TRACE(aspi, "\tData transfer: Target to host. Length checked.\n");
|
||||
}
|
||||
else if (HOST_TO_TARGET(prb)) {
|
||||
TRACE(aspi, "\tData transfer: Host to target. Length checked.\n");
|
||||
}
|
||||
else if (NO_DATA_TRANSFERED(prb)) {
|
||||
TRACE(aspi, "\tData transfer: none\n");
|
||||
}
|
||||
else {
|
||||
WARN(aspi, "\tTransfer by scsi cmd. Length not checked.\n");
|
||||
}
|
||||
|
||||
TRACE(aspi, "\tResidual byte length reporting %s\n", prb->SRB_Flags & 0x4 ? "enabled" : "disabled");
|
||||
TRACE(aspi, "\tLinking %s\n", prb->SRB_Flags & 0x2 ? "enabled" : "disabled");
|
||||
TRACE(aspi, "\tPosting %s\n", prb->SRB_Flags & 0x1 ? "enabled" : "disabled");
|
||||
TRACE(aspi, "Target: %d\n", prb->SRB_Target);
|
||||
TRACE(aspi, "Lun: %d\n", prb->SRB_Lun);
|
||||
TRACE(aspi, "BufLen: %ld\n", prb->SRB_BufLen);
|
||||
TRACE(aspi, "SenseLen: %d\n", prb->SRB_SenseLen);
|
||||
TRACE(aspi, "BufPtr: %p\n", prb->SRB_BufPointer);
|
||||
TRACE(aspi, "CDB Length: %d\n", prb->SRB_CDBLen);
|
||||
TRACE(aspi, "POST Proc: %lx\n", (DWORD) prb->SRB_PostProc);
|
||||
cdb = &prb->CDBByte[0];
|
||||
cmd = prb->CDBByte[0];
|
||||
for (i = 0; i < prb->SRB_CDBLen; i++) {
|
||||
if (i != 0) dsprintf(aspi, ",");
|
||||
dsprintf(aspi, "%02x", *cdb++);
|
||||
}
|
||||
TRACE(aspi, "CDB buffer[%s]\n", dbg_str(aspi));
|
||||
}
|
||||
|
||||
static void
|
||||
ASPI_PrintSenseArea32(SRB_ExecSCSICmd32 *prb)
|
||||
{
|
||||
int i;
|
||||
BYTE *cdb;
|
||||
dbg_decl_str(aspi, 512);
|
||||
|
||||
cdb = &prb->CDBByte[0];
|
||||
for (i = 0; i < prb->SRB_SenseLen; i++) {
|
||||
if (i) dsprintf(aspi, ",");
|
||||
dsprintf(aspi, "%02x", *cdb++);
|
||||
}
|
||||
TRACE(aspi, "SenseArea[%s]\n", dbg_str(aspi));
|
||||
}
|
||||
|
||||
static void
|
||||
ASPI_DebugPrintResult32(SRB_ExecSCSICmd32 *prb)
|
||||
{
|
||||
|
||||
switch (prb->CDBByte[0]) {
|
||||
case CMD_INQUIRY:
|
||||
TRACE(aspi, "Vendor: '%s'\n", prb->SRB_BufPointer + INQUIRY_VENDOR);
|
||||
break;
|
||||
case CMD_TEST_UNIT_READY:
|
||||
ASPI_PrintSenseArea32(prb);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static WORD
|
||||
ASPI_ExecScsiCmd32(SRB_ExecSCSICmd32 *lpPRB)
|
||||
{
|
||||
struct sg_header *sg_hd, *sg_reply_hdr;
|
||||
int status;
|
||||
int in_len, out_len;
|
||||
int error_code = 0;
|
||||
int fd;
|
||||
|
||||
ASPI_DebugPrintCmd32(lpPRB);
|
||||
|
||||
fd = ASPI_OpenDevice32(lpPRB);
|
||||
if (fd == -1) {
|
||||
ERR(aspi, "Failed: could not open device. Device permissions !?\n");
|
||||
lpPRB->SRB_Status = SS_ERR;
|
||||
return SS_ERR;
|
||||
}
|
||||
|
||||
sg_hd = NULL;
|
||||
sg_reply_hdr = NULL;
|
||||
|
||||
lpPRB->SRB_Status = SS_PENDING;
|
||||
|
||||
if (!lpPRB->SRB_CDBLen) {
|
||||
WARN(aspi, "Failed: lpPRB->SRB_CDBLen = 0.\n");
|
||||
lpPRB->SRB_Status = SS_ERR;
|
||||
return SS_ERR;
|
||||
}
|
||||
|
||||
/* build up sg_header + scsi cmd */
|
||||
if (HOST_TO_TARGET(lpPRB)) {
|
||||
/* send header, command, and then data */
|
||||
in_len = SCSI_OFF + lpPRB->SRB_CDBLen + lpPRB->SRB_BufLen;
|
||||
sg_hd = (struct sg_header *) malloc(in_len);
|
||||
memset(sg_hd, 0, SCSI_OFF);
|
||||
memcpy(sg_hd + 1, &lpPRB->CDBByte[0], lpPRB->SRB_CDBLen);
|
||||
if (lpPRB->SRB_BufLen) {
|
||||
memcpy(((BYTE *) sg_hd) + SCSI_OFF + lpPRB->SRB_CDBLen, lpPRB->SRB_BufPointer, lpPRB->SRB_BufLen);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* send header and command - no data */
|
||||
in_len = SCSI_OFF + lpPRB->SRB_CDBLen;
|
||||
sg_hd = (struct sg_header *) malloc(in_len);
|
||||
memset(sg_hd, 0, SCSI_OFF);
|
||||
memcpy(sg_hd + 1, &lpPRB->CDBByte[0], lpPRB->SRB_CDBLen);
|
||||
}
|
||||
|
||||
if (TARGET_TO_HOST(lpPRB)) {
|
||||
out_len = SCSI_OFF + lpPRB->SRB_BufLen;
|
||||
sg_reply_hdr = (struct sg_header *) malloc(out_len);
|
||||
memset(sg_reply_hdr, 0, SCSI_OFF);
|
||||
sg_hd->reply_len = out_len;
|
||||
}
|
||||
else {
|
||||
out_len = SCSI_OFF;
|
||||
sg_reply_hdr = (struct sg_header *) malloc(out_len);
|
||||
memset(sg_reply_hdr, 0, SCSI_OFF);
|
||||
sg_hd->reply_len = out_len;
|
||||
}
|
||||
|
||||
status = write(fd, sg_hd, in_len);
|
||||
if (status < 0 || status != in_len) {
|
||||
int myerror = errno;
|
||||
|
||||
WARN(aspi, "Not enough bytes written to scsi device bytes=%d .. %d\n", in_len, status);
|
||||
if (status < 0) {
|
||||
if (myerror == ENOMEM) {
|
||||
MSG("ASPI: Linux generic scsi driver\n You probably need to re-compile your kernel with a larger SG_BIG_BUFF value (sg.h)\n Suggest 130560\n");
|
||||
}
|
||||
WARN(aspi, "errno: = %d\n", myerror);
|
||||
}
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
status = read(fd, sg_reply_hdr, out_len);
|
||||
if (status < 0 || status != out_len) {
|
||||
WARN(aspi, "not enough bytes read from scsi device%d\n", status);
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
if (sg_reply_hdr->result != 0) {
|
||||
error_code = sg_reply_hdr->result;
|
||||
WARN(aspi, "reply header error (%d)\n", sg_reply_hdr->result);
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
if (TARGET_TO_HOST(lpPRB) && lpPRB->SRB_BufLen) {
|
||||
memcpy(lpPRB->SRB_BufPointer, sg_reply_hdr + 1, lpPRB->SRB_BufLen);
|
||||
}
|
||||
|
||||
/* copy in sense buffer to amount that is available in client */
|
||||
if (lpPRB->SRB_SenseLen) {
|
||||
int sense_len = lpPRB->SRB_SenseLen;
|
||||
if (lpPRB->SRB_SenseLen > 16)
|
||||
sense_len = 16;
|
||||
memcpy(SENSE_BUFFER(lpPRB), &sg_reply_hdr->sense_buffer[0], sense_len);
|
||||
}
|
||||
|
||||
|
||||
lpPRB->SRB_Status = SS_COMP;
|
||||
lpPRB->SRB_HaStat = HASTAT_OK;
|
||||
lpPRB->SRB_TargStat = STATUS_GOOD;
|
||||
|
||||
/* now do posting */
|
||||
|
||||
if (lpPRB->SRB_PostProc) {
|
||||
if (ASPI_POSTING(lpPRB)) {
|
||||
TRACE(aspi, "Post Routine (%lx) called\n", (DWORD) lpPRB->SRB_PostProc);
|
||||
(*lpPRB->SRB_PostProc)(lpPRB);
|
||||
}
|
||||
else
|
||||
if (lpPRB->SRB_Flags & SRB_EVENT_NOTIFY) {
|
||||
TRACE(aspi, "Setting event %04x\n", (HANDLE32)lpPRB->SRB_PostProc);
|
||||
SetEvent((HANDLE32)lpPRB->SRB_PostProc); /* FIXME: correct ? */
|
||||
}
|
||||
}
|
||||
free(sg_reply_hdr);
|
||||
free(sg_hd);
|
||||
ASPI_DebugPrintResult32(lpPRB);
|
||||
return SS_COMP;
|
||||
|
||||
error_exit:
|
||||
if (error_code == EBUSY) {
|
||||
lpPRB->SRB_Status = SS_ASPI_IS_BUSY;
|
||||
TRACE(aspi, "Device busy\n");
|
||||
}
|
||||
else {
|
||||
WARN(aspi, "Failed\n");
|
||||
lpPRB->SRB_Status = SS_ERR;
|
||||
}
|
||||
|
||||
/* I'm not sure exactly error codes work here
|
||||
* We probably should set lpPRB->SRB_TargStat, SRB_HaStat ?
|
||||
*/
|
||||
WARN(aspi, "error_exit\n");
|
||||
free(sg_reply_hdr);
|
||||
free(sg_hd);
|
||||
return lpPRB->SRB_Status;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetASPI32SupportInfo32 [WNASPI32.0]
|
||||
*
|
||||
* Checks if the ASPI subsystem is initialized correctly.
|
||||
*
|
||||
* RETURNS
|
||||
* HIWORD: 0.
|
||||
* HIBYTE of LOWORD: status (SS_COMP or SS_FAILED_INIT)
|
||||
* LOBYTE of LOWORD: # of host adapters.
|
||||
*/
|
||||
DWORD WINAPI GetASPI32SupportInfo32()
|
||||
{
|
||||
return ((SS_COMP << 8) | 1); /* FIXME: get # of host adapters installed */
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SendASPI32Command32 (WNASPI32.1)
|
||||
*/
|
||||
DWORD WINAPI SendASPI32Command32(LPSRB32 lpSRB)
|
||||
{
|
||||
#ifdef linux
|
||||
switch (lpSRB->common.SRB_Cmd) {
|
||||
case SC_HA_INQUIRY:
|
||||
lpSRB->inquiry.SRB_Status = SS_COMP; /* completed successfully */
|
||||
lpSRB->inquiry.HA_Count = 1; /* not always */
|
||||
lpSRB->inquiry.HA_SCSI_ID = 7; /* not always ID 7 */
|
||||
strcat(lpSRB->inquiry.HA_ManagerId, "ASPI for WIN32"); /* max 15 chars, don't change */
|
||||
strcat(lpSRB->inquiry.HA_Identifier, "Wine host"); /* FIXME: return host adapter name */
|
||||
memset(lpSRB->inquiry.HA_Unique, 0, 16); /* default HA_Unique content */
|
||||
lpSRB->inquiry.HA_Unique[6] = 0x02; /* Maximum Transfer Length (128K, Byte> 4-7) */
|
||||
FIXME(aspi, "ASPI: Partially implemented SC_HA_INQUIRY for adapter %d.\n", lpSRB->inquiry.SRB_HaId);
|
||||
return SS_COMP;
|
||||
case SC_GET_DEV_TYPE:
|
||||
FIXME(aspi, "Not implemented SC_GET_DEV_TYPE\n");
|
||||
break;
|
||||
case SC_EXEC_SCSI_CMD:
|
||||
return ASPI_ExecScsiCmd32(&lpSRB->cmd);
|
||||
break;
|
||||
case SC_RESET_DEV:
|
||||
FIXME(aspi, "Not implemented SC_RESET_DEV\n");
|
||||
break;
|
||||
default:
|
||||
WARN(aspi, "Unknown command %d\n", lpSRB->common.SRB_Cmd);
|
||||
}
|
||||
return SS_INVALID_SRB;
|
||||
#else
|
||||
return SS_INVALID_SRB;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetASPI32DLLVersion32 (WNASPI32.3)
|
||||
*/
|
||||
|
||||
DWORD WINAPI GetASPI32DLLVersion32()
|
||||
{
|
||||
#ifdef linux
|
||||
return (DWORD)1;
|
||||
#else
|
||||
return (DWORD)0;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -50,6 +50,7 @@ $(INCLUDES):
|
|||
for i in $(INCLUDES); do $(LN_S) $(TOPSRCDIR)/$$i $$i || exit 1; done
|
||||
|
||||
install::
|
||||
[ -d $(mandir) ] || mkdir -p $(mandir)
|
||||
$(INSTALL_DATA) $(SRCDIR)/wine.man $(mandir)/wine$(manext)
|
||||
|
||||
uninstall::
|
||||
|
@ -57,6 +58,7 @@ uninstall::
|
|||
|
||||
# Not done by default because of makeinfo bugs
|
||||
install_info: $(INFOFILES)
|
||||
[ -d $(infodir) ] || mkdir -p $(infodir)
|
||||
for i in $(INFOFILES); do $(INSTALL_DATA) $$i $(infodir)/$$i; done
|
||||
|
||||
uninstall_info:
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
*** VOLUME LABEL
|
||||
|
||||
If a program depends on the correct label and/or serial number for the
|
||||
CD-Rom, you can use the following command to extract that information:
|
||||
|
||||
|
@ -8,6 +10,8 @@ Put the resulting string (without trailing blanks) into your
|
|||
wine.ini/.winerc file like:
|
||||
Label=<the label>
|
||||
|
||||
*** SERIAL NUMBER
|
||||
|
||||
[FIXME: if someone knows how to get the serial number in Linux, please
|
||||
put this information here].
|
||||
|
||||
|
@ -39,4 +43,18 @@ int main(int argc,char **argv[])
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Probably you can get that information also from the File Manager in
|
||||
Windows.
|
||||
|
||||
------------------------- end volinfo.c -----------------------------
|
||||
|
||||
|
||||
*** DRIVE LETTER
|
||||
|
||||
Some installed programs only look for the CD-Rom in the drive letter
|
||||
that the CD-Rom had when the program was installed. In this case, make
|
||||
sure you use the correct letter, especially if you installed the
|
||||
program under Windows and are now trying to run it in Wine.
|
||||
Some programs reportedly store the drive letter in their .INI file,
|
||||
so you might look there and try to change it.
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
Dummy written by Eric Kohl. <ekohl@abo.rhein-zeitung.de>
|
||||
|
||||
Status:
|
||||
- Dummy control. No functionality.
|
||||
Dummy control. No functionality.
|
||||
|
||||
Notes:
|
||||
Author needed!! Any volunteers??
|
||||
|
@ -48,7 +48,7 @@
|
|||
Dummy written by Eric Kohl. <ekohl@abo.rhein-zeitung.de>
|
||||
|
||||
Status:
|
||||
- Dummy control. No functionality.
|
||||
Dummy control. No functionality.
|
||||
|
||||
Notes:
|
||||
Author needed!! Any volunteers??
|
||||
|
@ -57,7 +57,7 @@
|
|||
3.3 Date and Time Picker Control
|
||||
--------------------------------
|
||||
Status:
|
||||
- Nothing done at all.
|
||||
Nothing done at all.
|
||||
|
||||
Notes:
|
||||
Author needed!! Any volunteers??
|
||||
|
@ -66,7 +66,7 @@
|
|||
3.4 Drag List Box Control
|
||||
-------------------------
|
||||
Status:
|
||||
- Nothing done at all.
|
||||
Nothing done at all.
|
||||
|
||||
Notes:
|
||||
Author needed!! Any volunteers??
|
||||
|
@ -75,7 +75,7 @@
|
|||
3.5 Flat Scroll Bar Control
|
||||
---------------------------
|
||||
Status:
|
||||
- Nothing done at all.
|
||||
Nothing done at all.
|
||||
|
||||
Notes:
|
||||
Author needed!! Any volunteers??
|
||||
|
@ -87,7 +87,7 @@
|
|||
Eric Kohl <ekohl@abo.rhein-zeitung.de>
|
||||
|
||||
Status:
|
||||
- Almost finished.
|
||||
Almost finished.
|
||||
|
||||
|
||||
3.7 Hot Key Control
|
||||
|
@ -108,18 +108,13 @@
|
|||
Eric Kohl <ekohl@abo.rhein-zeitung.de>
|
||||
|
||||
Status:
|
||||
- Almost finished.
|
||||
|
||||
Notes:
|
||||
Most of my test programs work as expected. But when image lists are used
|
||||
in other controls (e.g. Toolbar) they don't seem to be error-free.
|
||||
It looks like I have to do a major re-write (use DIB's instead of DDB's).
|
||||
Almost finished.
|
||||
|
||||
|
||||
3.9 IP Address Control
|
||||
----------------------
|
||||
Status:
|
||||
- Nothing done at all.
|
||||
Nothing done at all.
|
||||
|
||||
Notes:
|
||||
Author needed!! Any volunteers??
|
||||
|
@ -129,9 +124,10 @@
|
|||
----------------------
|
||||
Author:
|
||||
Dummy written by Eric Kohl. <ekohl@abo.rhein-zeitung.de>
|
||||
Ben Williams <.edu>
|
||||
|
||||
Status:
|
||||
- Development in progress.
|
||||
Under construction.
|
||||
|
||||
Notes:
|
||||
Author needed!! Any volunteers??
|
||||
|
@ -140,13 +136,22 @@
|
|||
3.11 Month Calendar Control
|
||||
---------------------------
|
||||
Status:
|
||||
- Nothing done at all.
|
||||
Nothing done at all.
|
||||
|
||||
Notes:
|
||||
Author needed!! Any volunteers??
|
||||
|
||||
|
||||
3.12 Pager Control
|
||||
3.12 Native font control
|
||||
------------------------
|
||||
Status:
|
||||
Nothing done at all.
|
||||
|
||||
Notes:
|
||||
Author needed!! Any volunteers??
|
||||
|
||||
|
||||
3.13 Pager Control
|
||||
------------------
|
||||
Author:
|
||||
Dummy written by Eric Kohl.
|
||||
|
@ -158,14 +163,14 @@
|
|||
Author needed!! Any volunteers??
|
||||
|
||||
|
||||
3.13 Progress Bar Control
|
||||
3.14 Progress Bar Control
|
||||
-------------------------
|
||||
Author:
|
||||
Original implementation by Dimitrie O. Paun.
|
||||
Fixes and improvements by Eric Kohl.
|
||||
|
||||
Status:
|
||||
- Almost finished (should behave like the original).
|
||||
Almost finished (should behave like the original).
|
||||
|
||||
Notes:
|
||||
WM_GETFONT and WM_SETFONT are not implemented yet. They seem to be
|
||||
|
@ -174,7 +179,7 @@
|
|||
textual information (e.g. percentage) these messages would make sense.
|
||||
|
||||
|
||||
3.14 Property Sheet
|
||||
3.15 Property Sheet
|
||||
-------------------
|
||||
Author:
|
||||
Anders Carlsson <anders.carlsson@linux.nu>
|
||||
|
@ -187,33 +192,33 @@
|
|||
Tab control must be implemented first.
|
||||
|
||||
|
||||
3.15 Rebar Control (Cool Bar)
|
||||
3.16 Rebar Control (Cool Bar)
|
||||
-----------------------------
|
||||
Author:
|
||||
Dummy written by Eric Kohl.
|
||||
|
||||
Status:
|
||||
- Dummy control. No functionality.
|
||||
Dummy control. No functionality.
|
||||
|
||||
Notes:
|
||||
Author needed!! Any volunteers??
|
||||
|
||||
|
||||
3.16 Status Bar Control
|
||||
3.17 Status Bar Control
|
||||
-----------------------
|
||||
Author:
|
||||
Original implementation by Bruce Milner.
|
||||
Fixes and improvements by Eric Kohl.
|
||||
|
||||
Status:
|
||||
- Almost finished.
|
||||
Almost finished.
|
||||
|
||||
Notes:
|
||||
- Unicode support is still missing.
|
||||
- Tooltip integration is almost complete.
|
||||
|
||||
|
||||
3.17 Tab Control
|
||||
3.18 Tab Control
|
||||
----------------
|
||||
Author:
|
||||
Anders Carlsson <anders.carlsson@linux.nu>
|
||||
|
@ -223,7 +228,7 @@
|
|||
- Not yet published.
|
||||
|
||||
|
||||
3.18 Toolbar Control
|
||||
3.19 Toolbar Control
|
||||
--------------------
|
||||
Author:
|
||||
Eric Kohl <ekohl@abo.rhein-zeitung.de>
|
||||
|
@ -236,7 +241,7 @@
|
|||
- Bitmaps are not correctly displayed.
|
||||
|
||||
|
||||
3.19 Tooltip Control
|
||||
3.20 Tooltip Control
|
||||
--------------------
|
||||
Author:
|
||||
Eric Kohl <ekohl@abo.rhein-zeitung.de>
|
||||
|
@ -248,7 +253,7 @@
|
|||
- Unicode support is still missing.
|
||||
|
||||
|
||||
3.20 Trackbar Control
|
||||
3.21 Trackbar Control
|
||||
---------------------
|
||||
Author:
|
||||
Dummy written by Eric Kohl <ekohl@abo.rhein-zeitung.de>
|
||||
|
@ -258,7 +263,7 @@
|
|||
Under construction.
|
||||
|
||||
|
||||
3.21 Tree View Control
|
||||
3.22 Tree View Control
|
||||
----------------------
|
||||
Author:
|
||||
Dummy written by Eric Kohl.
|
||||
|
@ -268,7 +273,7 @@
|
|||
Under contstruction.
|
||||
|
||||
|
||||
3.22 Updown Control
|
||||
3.23 Updown Control
|
||||
-------------------
|
||||
Author:
|
||||
Original implementation by Dimitrie O. Paun.
|
||||
|
@ -306,30 +311,31 @@
|
|||
Have a look at relay32/comctl32.spec.
|
||||
|
||||
|
||||
5.1 Dymnamic Storage Arrays (DSA)
|
||||
5.1 Dymnamic Storage Array (DSA)
|
||||
---------------------------------
|
||||
Most of the DSA functions are implemented. I used TASKMAN.EXE to write them.
|
||||
Since TASKMAN.EXE doesn't bail out or crash I think I've done it right.
|
||||
The DSA functions are used to store and manage dynamic arrays of fixed size
|
||||
memory blocks. They are used by TASKMAN.EXE, Explorer, IE4 and other
|
||||
Programs and DLL's that are "parts of the Windows Operating System".
|
||||
The implementation should be complete.
|
||||
|
||||
Have a look at the source code to get more information.
|
||||
|
||||
Further documentation will be written...
|
||||
|
||||
|
||||
5.2 Dynamic Pointer Arrays ??? (DPA)
|
||||
5.2 Dynamic Pointer Array (DPA)
|
||||
------------------------------------
|
||||
Similar to the DSA functions, but they just store pointers. I have written
|
||||
some stubs and semi-stubs. They are used by Explorer and IE4 but the
|
||||
implementation is still incomplete since both programs seem to crash because
|
||||
of other incomplete functions.
|
||||
Similar to the DSA functions, but they just store pointers. They are used by
|
||||
Explorer, IE4 and other Programs and DLL's that are "parts of the Windows
|
||||
Operating System". The implementation should be complete.
|
||||
|
||||
Have a look at the source code to get more information.
|
||||
Further documentation will be written...
|
||||
|
||||
|
||||
5.3 "Most Recently Used" - List (MRU)
|
||||
-------------------------------------
|
||||
Currently no information available!
|
||||
The function 'COMCTL32_157()' could be called 'CreateMRUListEx32A()'.
|
||||
Only stubs are implemented to keep Explorer from bailing out.
|
||||
|
||||
No more information available at this time!
|
||||
|
||||
|
||||
5.4 MenuHelp
|
||||
|
@ -353,6 +359,14 @@
|
|||
...
|
||||
|
||||
|
||||
5.7 Other undocumented functions
|
||||
--------------------------------
|
||||
Several other undocumented functions are used by IE4.
|
||||
|
||||
COMCTL32_11, COMCTL_385, COMCTL32_386 and COMCTL32_388.
|
||||
Their stubs are implemented to keep IE4 from bailing out.
|
||||
|
||||
|
||||
6. Epilogue
|
||||
-----------
|
||||
You see, much work has still to be done. If you are interested in writing
|
||||
|
|
|
@ -1,6 +1,37 @@
|
|||
This file describes where to start debugging Wine and how to write
|
||||
useful bug reports.
|
||||
|
||||
To avoid debugging
|
||||
==================
|
||||
|
||||
Sometimes you can bring applications to run by using some of the
|
||||
native Windows DLL's, together with Wine. Here are some Tips by
|
||||
Juergen Schmied on how to proceed. This assumes that your C:\windows
|
||||
directory in the configuration file does not point to a native Windows
|
||||
installation but is in a separate Unix file system. (For instance,
|
||||
C:\windows is really /home/ego/wine/drives/c).
|
||||
|
||||
- Create empty C:\windows and C:\windows\system directories.
|
||||
Do not point Wine to a Windows directory full of old installations
|
||||
and a messy registry. (Wine creates a special registry in your home
|
||||
directory, in $HOME/.wine/*.reg. Perhaps you have to remove these
|
||||
files).
|
||||
- Run the application with -debugmsg +module,+file to find out
|
||||
which files are needed. Copy the required DLL's one by one to the
|
||||
C:\windows\system directory.
|
||||
- Note that some network DLL's are not needed even though Wine is
|
||||
looking for them. Do not copy the MPR.DLL into the directory,
|
||||
use the internal implementation.
|
||||
- Copy SHELL/SHELL32 and COMDLG/COMDLG32 COMMCTRL/COMCTL32
|
||||
only as pairs to your Wine directory (these DLL's are
|
||||
"clean" to use)
|
||||
- Be consistent: Use only DLLS from the same Windows version
|
||||
together.
|
||||
- Put regedit.exe in the C:\windows directory (office95 imports
|
||||
a *.reg file when it runs with a empty registry, don't know
|
||||
about office97).
|
||||
|
||||
|
||||
Crashes
|
||||
=======
|
||||
|
||||
|
@ -336,3 +367,30 @@ file management problems etc.
|
|||
|
||||
pedump: http://oak.oakland.edu/pub/simtelnet/win95/prog/pedump.zip
|
||||
Dumps the imports and exports of a PE (Portable Executable) DLL.
|
||||
|
||||
|
||||
Some basic debugger usages:
|
||||
===========================
|
||||
|
||||
After starting you program with
|
||||
wine -debug myprog.exe
|
||||
the program loads and you get a prompt at the program starting point.
|
||||
Then you can set breakpoints:
|
||||
b RoutineName (by outine name) OR
|
||||
b *0x812575 (by address)
|
||||
Then you hit 'c' (continue) to run the program. It stops at
|
||||
the breakpoint. You can type
|
||||
step (to step one line) OR
|
||||
stepi (to step one machine instruction at a time;
|
||||
here, it helps to know the basic 386
|
||||
instruction set)
|
||||
info reg (to see registers)
|
||||
info stack (to see hex values in the stack)
|
||||
info local (to see local variables)
|
||||
list <line number> (to list source code)
|
||||
x <variable name> (to examine a variable; only works if code
|
||||
is not compiled with optimization)
|
||||
x 0x4269978 (to examine a memory location)
|
||||
? (help)
|
||||
q (quit)
|
||||
By hitting Enter, you repeat the last command.
|
||||
|
|
|
@ -5,13 +5,18 @@ Most methods and APIs are not implemented at this point. Examine the code
|
|||
to see what has been implemented. Stay tuned for some information here once
|
||||
there is more implementation (and I figure out what the heck I'm doing).
|
||||
|
||||
The files are include/dplay.h and multimedia/dplay.c.
|
||||
The files are include/dplay.h and multimedia/dplay.c. They're getting a
|
||||
little cumbersome at present perhaps they will be broken out in a later
|
||||
version.
|
||||
|
||||
I think I can safely say that any application which requires direct play
|
||||
or direct play lobby will not work at this point. Priority will be to get
|
||||
lserver.exe and star wars rebellion going (at least the direct play portions).
|
||||
lserver.exe from the sdk running.
|
||||
|
||||
|
||||
|
||||
TODO:
|
||||
Just about everything
|
||||
- Just about everything
|
||||
|
||||
|
||||
Peter Hunnisett - hunnise@nortel.ca
|
||||
|
|
|
@ -57,14 +57,23 @@ midlevel (MCI commands) and highlevel abstraction layers.
|
|||
They call the lowlevel driver functions in multimedia/midi.c using the
|
||||
midMessage and the modMessage functions.
|
||||
|
||||
The current implementation is completely broken. (I think open(), read()
|
||||
and write() of the /dev/midi device would make this implementation nearly
|
||||
complete...)
|
||||
The lowlevel audio driver is currently only implemented for the
|
||||
OpenSoundSystem (OSS) as supplied in the Linux and FreeBSD kernels by
|
||||
4Front Technologies (http://www.4front-tech.com/). The presence of this
|
||||
driver is checked by configure (depends on the <sys/soundcard.h> file).
|
||||
Both Midi in and Midi out are provided. The type of MIDI devices supported
|
||||
is external MIDI port (requires an MIDI capable device - keyboard...) and
|
||||
OPL/2 synthesis (the OPL/2patches for all instruments are in midiPatch.c).
|
||||
|
||||
TODO:
|
||||
- Implement correct MIDI output
|
||||
- Do not implement a software synthesizer. This should be done
|
||||
using MIDI loopback devices in an external program (like timidity).
|
||||
the only trouble is that timidity is GPL'ed...
|
||||
- use better instrument definition for OPL/2 (midiPatch.c)
|
||||
- have a look at OPL/3 ?
|
||||
- a hack is used in mmsystem.c (setting reserved to the 32 bit linear
|
||||
address of the block whatever the call is made from 16 or 32 bits
|
||||
code...). this should be in midi.c I think
|
||||
|
||||
1.4 Timers
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Win95 interface code is being introduced.
|
||||
Win95/Win98 interface code is being introduced.
|
||||
|
||||
Instead of compiling Wine for Win3.1 vs. Win95 using #define switches,
|
||||
the code now looks in a special [Tweaks.Layout] section of wine.conf
|
||||
for a "Win95Look=true" entry.
|
||||
for a "WineLook=Win95" or "WineLook=Win98" entry.
|
||||
|
||||
A few new sections and a number of entries have been added to the
|
||||
wine.conf file -- these are for debugging the Win95 tweaks only and may
|
||||
|
@ -20,13 +20,5 @@ AnsiVar.xxx # Same parameters for the Ansi variable typeface
|
|||
SystemFixed.xxx # Same parameters for the System fixed typeface
|
||||
|
||||
[Tweak.Layout]
|
||||
Win95Look=[true|false] # Enables/disables the Win95 look and feel
|
||||
MenuBarItemTopNudge=<pixels> # Nudges the menu bar items down/up
|
||||
MenuBarItemLeftNudge=<pixels> # Nudges the menu bar items left/right
|
||||
MenuItemTopNudge=<pixels> # Nudges the menu items down/up
|
||||
MenuItemLeftNudge=<pixels> # Nudges the menu items left/right
|
||||
MenuHighlightTopNudge=<pixels> # Nudges the top of the highlight bar
|
||||
MenuHighlightLeftNudge=<pixels> # Nudges the left side of the highlight bar
|
||||
MenuHighlightRightNudge=<pixels> # Nudges the right side of the highlight bar
|
||||
MenuHighlightBottomNudge=<pixels> # Nudges the bottom of the highlight bar
|
||||
WineLook=[Win31|Win95|Win98] # Changes Wine's look and feel
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/errno.h>
|
||||
|
||||
#include "windows.h"
|
||||
#include "winerror.h"
|
||||
|
@ -76,16 +77,20 @@ int DIR_Init(void)
|
|||
DRIVE_Chdir( drive, cwd );
|
||||
}
|
||||
|
||||
if (!(DIR_GetPath( "windows", "c:\\windows", &DIR_Windows )))
|
||||
return 0;
|
||||
if (!(DIR_GetPath( "system", "c:\\windows\\system", &DIR_System )))
|
||||
return 0;
|
||||
if (!(DIR_GetPath( "temp", "c:\\windows", &tmp_dir )))
|
||||
if (!(DIR_GetPath( "windows", "c:\\windows", &DIR_Windows )) ||
|
||||
!(DIR_GetPath( "system", "c:\\windows\\system", &DIR_System )) ||
|
||||
!(DIR_GetPath( "temp", "c:\\windows", &tmp_dir )))
|
||||
{
|
||||
PROFILE_UsageWineIni();
|
||||
return 0;
|
||||
}
|
||||
if (-1 == access( tmp_dir.long_name, W_OK ))
|
||||
{
|
||||
if (errno==EACCES)
|
||||
MSG("Warning: The Temporary Directory (as specified in wine.conf or ~/.winerc) is NOT writeable. Please check your configuration.\n");
|
||||
{
|
||||
MSG("Warning: The Temporary Directory (as specified in your configuration file) is NOT writeable.\n");
|
||||
PROFILE_UsageWineIni();
|
||||
}
|
||||
else
|
||||
MSG("Warning: Access to Temporary Directory failed (%s).\n",
|
||||
strerror(errno));
|
||||
|
@ -104,6 +109,7 @@ int DIR_Init(void)
|
|||
/* Set the environment variables */
|
||||
|
||||
SetEnvironmentVariable32A( "PATH", path );
|
||||
SetEnvironmentVariable32A( "COMSPEC", "c:\\command.com" );
|
||||
SetEnvironmentVariable32A( "TEMP", tmp_dir.short_name );
|
||||
SetEnvironmentVariable32A( "windir", DIR_Windows.short_name );
|
||||
SetEnvironmentVariable32A( "winsysdir", DIR_System.short_name );
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <sys/errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -769,13 +769,43 @@ UINT16 WINAPI GetDriveType16(
|
|||
|
||||
/***********************************************************************
|
||||
* GetDriveType32A (KERNEL32.208)
|
||||
*
|
||||
* Returns the type of the disk drive specified. If root is NULL the
|
||||
* root of the current directory is used.
|
||||
*
|
||||
* RETURNS
|
||||
*
|
||||
* Type of drive (from Win32 SDK):
|
||||
*
|
||||
* DRIVE_UNKNOWN unable to find out anything about the drive
|
||||
* DRIVE_NO_ROOT_DIR nonexistand root dir
|
||||
* DRIVE_REMOVABLE the disk can be removed from the machine
|
||||
* DRIVE_FIXED the disk can not be removed from the machine
|
||||
* DRIVE_REMOTE network disk
|
||||
* DRIVE_CDROM CDROM drive
|
||||
* DRIVE_RAMDISK virtual disk in ram
|
||||
*
|
||||
* DRIVE_DOESNOTEXIST XXX Not valid return value
|
||||
*
|
||||
* BUGS
|
||||
*
|
||||
* Currently returns DRIVE_DOESNOTEXIST when it really should return
|
||||
* DRIVE_UNKNOWN or DRIVE_NO_ROOT_DIR. DRIVE_RAMDISK is unsupported.
|
||||
* Should determine current directory and use that root if param is
|
||||
* NULL.
|
||||
*/
|
||||
UINT32 WINAPI GetDriveType32A( LPCSTR root )
|
||||
UINT32 WINAPI GetDriveType32A(LPCSTR root /* String describing drive */)
|
||||
{
|
||||
TRACE(dosfs, "(%s)\n", root );
|
||||
TRACE(dosfs, "(%s)\n", NULL != root ? root : "NULL");
|
||||
if (NULL == root)
|
||||
{
|
||||
FIXME(dosfs,"(NULL) should use current dir, hardcoded c: instead\n");
|
||||
root = "C:";
|
||||
}
|
||||
|
||||
if ((root[1]) && (root[1] != ':'))
|
||||
{
|
||||
WARN(dosfs, "invalid root '%s'\n", root );
|
||||
WARN(dosfs, "invalid root '%s'\n", NULL != root ? root : "NULL");
|
||||
return DRIVE_DOESNOTEXIST;
|
||||
}
|
||||
switch(DRIVE_GetType(toupper(root[0]) - 'A'))
|
||||
|
|
|
@ -119,6 +119,7 @@ static BOOL32 FILE_Read(K32OBJ *ptr, LPVOID lpBuffer, DWORD nNumberOfChars,
|
|||
FILE_SetDosError();
|
||||
return FALSE;
|
||||
}
|
||||
file->pos += result;
|
||||
*lpNumberOfChars = result;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -156,6 +157,7 @@ static BOOL32 FILE_Write(K32OBJ *ptr, LPCVOID lpBuffer, DWORD nNumberOfChars,
|
|||
result = write(file->unix_handle, lpBuffer, nNumberOfChars);
|
||||
if (result != -1) {
|
||||
*lpNumberOfChars = result;
|
||||
file->pos += result;
|
||||
return TRUE;
|
||||
}
|
||||
if (errno != EINTR) {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "file.h"
|
||||
#include "heap.h"
|
||||
#include "debug.h"
|
||||
#include "options.h"
|
||||
|
||||
typedef struct tagPROFILEKEY
|
||||
{
|
||||
|
@ -57,6 +58,9 @@ static PROFILESECTION *WineProfile;
|
|||
/* Wine profile name in $HOME directory; must begin with slash */
|
||||
static const char PROFILE_WineIniName[] = "/.winerc";
|
||||
|
||||
/* Wine profile: the profile file being used */
|
||||
static char PROFILE_WineIniUsed[MAX_PATHNAME_LEN] = "";
|
||||
|
||||
/* Check for comments in profile */
|
||||
#define IS_ENTRY_COMMENT(str) ((str)[0] == ';')
|
||||
|
||||
|
@ -824,10 +828,20 @@ int PROFILE_LoadWineIni(void)
|
|||
const char *p;
|
||||
FILE *f;
|
||||
|
||||
if ( (Options.configFileName!=NULL) && (f = fopen(Options.configFileName, "r")) )
|
||||
{
|
||||
/* Open -config specified file */
|
||||
WineProfile = PROFILE_Load ( f);
|
||||
fclose ( f );
|
||||
strncpy(PROFILE_WineIniUsed,Options.configFileName,MAX_PATHNAME_LEN-1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( (p = getenv( "WINE_INI" )) && (f = fopen( p, "r" )) )
|
||||
{
|
||||
WineProfile = PROFILE_Load( f );
|
||||
fclose( f );
|
||||
strncpy(PROFILE_WineIniUsed,p,MAX_PATHNAME_LEN-1);
|
||||
return 1;
|
||||
}
|
||||
if ((p = getenv( "HOME" )) != NULL)
|
||||
|
@ -838,6 +852,7 @@ int PROFILE_LoadWineIni(void)
|
|||
{
|
||||
WineProfile = PROFILE_Load( f );
|
||||
fclose( f );
|
||||
strncpy(PROFILE_WineIniUsed,buffer,MAX_PATHNAME_LEN-1);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -849,6 +864,7 @@ int PROFILE_LoadWineIni(void)
|
|||
{
|
||||
WineProfile = PROFILE_Load( f );
|
||||
fclose( f );
|
||||
strncpy(PROFILE_WineIniUsed,WINE_INI_GLOBAL,MAX_PATHNAME_LEN-1);
|
||||
return 1;
|
||||
}
|
||||
MSG( "Can't open configuration file %s or $HOME%s\n",
|
||||
|
@ -857,6 +873,26 @@ int PROFILE_LoadWineIni(void)
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PROFILE_UsageWineIni
|
||||
*
|
||||
* Explain the wine.ini file to those who don't read documentation.
|
||||
* Keep below one screenful in length so that error messages above are
|
||||
* noticed.
|
||||
*/
|
||||
void PROFILE_UsageWineIni(void)
|
||||
{
|
||||
MSG("Perhaps you have not properly edited or created "
|
||||
"your Wine configuration file.\n");
|
||||
MSG("This is either %s or $HOME%s\n",WINE_INI_GLOBAL,PROFILE_WineIniName);
|
||||
MSG(" or it is determined by the -config option or from\n"
|
||||
" the WINE_INI environment variable.\n");
|
||||
if (*PROFILE_WineIniUsed)
|
||||
MSG("Wine has used %s as configuration file.\n", PROFILE_WineIniUsed);
|
||||
/* RTFM, so to say */
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PROFILE_GetStringItem
|
||||
*
|
||||
|
|
287
graphics/ddraw.c
287
graphics/ddraw.c
|
@ -18,6 +18,9 @@
|
|||
* running X clients, even though I am polling X events and answering
|
||||
* them. But you can switch to another console (ctrl-alt-fx) and
|
||||
* "killall wine" processes. Any help on this one appreciated. -Marcus
|
||||
* NOTE: The hanging only seems to happen with -managed. I have
|
||||
* implemented support for the -desktop option. This seems
|
||||
* to not have the hanging problems. - Peter Hunnisett
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -359,8 +362,12 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface3_Unlock(
|
|||
Xlib_MessagePump(this->s.ddraw->e.xlib.window);
|
||||
|
||||
TRACE(ddraw,"(%p)->Unlock(%p)\n",this,surface);
|
||||
|
||||
if (!this->s.ddraw->e.xlib.paintable)
|
||||
return 0;
|
||||
{
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
TSXPutImage( display,
|
||||
this->s.ddraw->e.xlib.drawable,
|
||||
DefaultGCOfScreen(screen),
|
||||
|
@ -370,7 +377,8 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface3_Unlock(
|
|||
this->t.xlib.image->height
|
||||
);
|
||||
TSXSetWindowColormap(display,this->s.ddraw->e.xlib.drawable,this->s.palette->cm);
|
||||
return 0;
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DGA_IDirectDrawSurface3_Flip(
|
||||
|
@ -423,6 +431,7 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface3_Flip(
|
|||
else
|
||||
flipto = this;
|
||||
}
|
||||
|
||||
TSXPutImage(display,
|
||||
this->s.ddraw->e.xlib.drawable,
|
||||
DefaultGCOfScreen(screen),
|
||||
|
@ -444,11 +453,49 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface3_Flip(
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* The IDirectDrawSurface3::SetPalette method attaches the specified
|
||||
* DirectDrawPalette object to a surface. The surface uses this palette for all
|
||||
* subsequent operations. The palette change takes place immediately.
|
||||
*/
|
||||
static HRESULT WINAPI IDirectDrawSurface3_SetPalette(
|
||||
LPDIRECTDRAWSURFACE3 this,LPDIRECTDRAWPALETTE pal
|
||||
) {
|
||||
TRACE(ddraw,"(%p)->SetPalette(%p)\n",this,pal);
|
||||
this->s.palette = pal; /* probably addref it too */
|
||||
|
||||
/* According to spec, we are only supposed to
|
||||
* AddRef if this is not the same palette.
|
||||
*/
|
||||
if( this->s.palette != pal )
|
||||
{
|
||||
if( pal != NULL )
|
||||
{
|
||||
pal->lpvtbl->fnAddRef( pal );
|
||||
}
|
||||
if( this->s.palette != NULL )
|
||||
{
|
||||
this->s.palette->lpvtbl->fnRelease( this->s.palette );
|
||||
}
|
||||
this->s.palette = pal;
|
||||
|
||||
/* I think that we need to attach it to all backbuffers...*/
|
||||
if( this->s.backbuffer )
|
||||
{
|
||||
if( this->s.backbuffer->s.palette )
|
||||
{
|
||||
this->s.backbuffer->s.palette->lpvtbl->fnRelease(
|
||||
this->s.backbuffer->s.palette );
|
||||
}
|
||||
this->s.backbuffer->s.palette = pal;
|
||||
if( pal )
|
||||
{
|
||||
pal->lpvtbl->fnAddRef( pal );
|
||||
}
|
||||
}
|
||||
|
||||
/* Perform the refresh */
|
||||
TSXSetWindowColormap(display,this->s.ddraw->e.xlib.drawable,this->s.palette->cm);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -583,12 +630,14 @@ static HRESULT WINAPI IDirectDrawSurface3_GetSurfaceDesc(
|
|||
}
|
||||
|
||||
static ULONG WINAPI IDirectDrawSurface3_AddRef(LPDIRECTDRAWSURFACE3 this) {
|
||||
TRACE(ddraw,"(%p)->AddRef()\n",this);
|
||||
TRACE( ddraw, "(%p)->() incrementing from %lu.\n", this, this->ref );
|
||||
|
||||
return ++(this->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI DGA_IDirectDrawSurface3_Release(LPDIRECTDRAWSURFACE3 this) {
|
||||
TRACE(ddraw,"(%p)->Release()\n",this);
|
||||
TRACE( ddraw, "(%p)->() decrementing from %lu.\n", this, this->ref );
|
||||
|
||||
#ifdef HAVE_LIBXXF86DGA
|
||||
if (!--(this->ref)) {
|
||||
this->s.ddraw->lpvtbl->fnRelease(this->s.ddraw);
|
||||
|
@ -606,13 +655,23 @@ static ULONG WINAPI DGA_IDirectDrawSurface3_Release(LPDIRECTDRAWSURFACE3 this) {
|
|||
}
|
||||
|
||||
static ULONG WINAPI Xlib_IDirectDrawSurface3_Release(LPDIRECTDRAWSURFACE3 this) {
|
||||
TRACE(ddraw,"(%p)->Release()\n",this);
|
||||
TRACE( ddraw, "(%p)->() decrementing from %lu.\n", this, this->ref );
|
||||
|
||||
if (!--(this->ref)) {
|
||||
this->s.ddraw->lpvtbl->fnRelease(this->s.ddraw);
|
||||
HeapFree(GetProcessHeap(),0,this->s.surface);
|
||||
|
||||
if( this->s.backbuffer )
|
||||
{
|
||||
this->s.backbuffer->lpvtbl->fnRelease(this->s.backbuffer);
|
||||
}
|
||||
|
||||
this->t.xlib.image->data = NULL;
|
||||
TSXDestroyImage(this->t.xlib.image);
|
||||
this->t.xlib.image = 0;
|
||||
|
||||
this->s.palette->lpvtbl->fnRelease(this->s.palette);
|
||||
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
return 0;
|
||||
}
|
||||
|
@ -624,16 +683,25 @@ static HRESULT WINAPI IDirectDrawSurface3_GetAttachedSurface(
|
|||
) {
|
||||
TRACE(ddraw, "(%p)->GetAttachedSurface(%p,%p)\n",
|
||||
this, lpddsd, lpdsf);
|
||||
|
||||
if (TRACE_ON(ddraw)) {
|
||||
TRACE(ddraw," caps ");
|
||||
_dump_DDSCAPS(lpddsd->dwCaps);
|
||||
}
|
||||
|
||||
if (!(lpddsd->dwCaps & DDSCAPS_BACKBUFFER)) {
|
||||
FIXME(ddraw,"whoops, can only handle backbuffers for now\n");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* FIXME: should handle more than one backbuffer */
|
||||
*lpdsf = this->s.backbuffer;
|
||||
|
||||
if( this->s.backbuffer )
|
||||
{
|
||||
this->s.backbuffer->lpvtbl->fnAddRef( this->s.backbuffer );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -727,10 +795,21 @@ static HRESULT WINAPI IDirectDrawSurface3_Restore(LPDIRECTDRAWSURFACE3 this) {
|
|||
}
|
||||
|
||||
static HRESULT WINAPI IDirectDrawSurface3_SetColorKey(
|
||||
LPDIRECTDRAWSURFACE3 this,DWORD x,LPDDCOLORKEY ckey
|
||||
LPDIRECTDRAWSURFACE3 this, DWORD dwFlags, LPDDCOLORKEY ckey
|
||||
) {
|
||||
FIXME(ddraw,"(%p)->(0x%08lx,%p),stub!\n",this,x,ckey);
|
||||
return 0;
|
||||
FIXME(ddraw,"(%p)->(0x%08lx,%p),stub!\n",this,dwFlags,ckey);
|
||||
|
||||
if( dwFlags & DDCKEY_SRCBLT )
|
||||
{
|
||||
dwFlags &= ~DDCKEY_SRCBLT;
|
||||
}
|
||||
|
||||
if( dwFlags )
|
||||
{
|
||||
TRACE( ddraw, "unhandled dwFlags: %08lx\n", dwFlags );
|
||||
}
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
static struct IDirectDrawSurface3_VTable dga_dds3vt = {
|
||||
|
@ -830,6 +909,8 @@ static HRESULT WINAPI IDirectDrawClipper_SetHwnd(
|
|||
}
|
||||
|
||||
static ULONG WINAPI IDirectDrawClipper_Release(LPDIRECTDRAWCLIPPER this) {
|
||||
TRACE( ddraw, "(%p)->() decrementing from %lu.\n", this, this->ref );
|
||||
|
||||
this->ref--;
|
||||
if (this->ref)
|
||||
return this->ref;
|
||||
|
@ -878,11 +959,20 @@ static HRESULT WINAPI IDirectDrawPalette_GetEntries(
|
|||
return DDERR_GENERIC;
|
||||
}
|
||||
for (i=0;i<count;i++) {
|
||||
#if 0
|
||||
PH
|
||||
xc.pixel = i+start;
|
||||
TSXQueryColor(display,this->cm,&xc);
|
||||
palent[i].peRed = xc.red>>8;
|
||||
palent[i].peGreen = xc.green>>8;
|
||||
palent[i].peBlue = xc.blue>>8;
|
||||
#endif
|
||||
|
||||
palent[i].peRed = this->palents[start+i].peRed;
|
||||
palent[i].peBlue = this->palents[start+i].peBlue;
|
||||
palent[i].peGreen = this->palents[start+i].peGreen;
|
||||
palent[i].peFlags = this->palents[start+i].peFlags;
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -908,10 +998,13 @@ static HRESULT WINAPI Xlib_IDirectDrawPalette_SetEntries(
|
|||
xc.green = palent[i].peGreen<<8;
|
||||
xc.flags = DoRed|DoBlue|DoGreen;
|
||||
xc.pixel = start+i;
|
||||
|
||||
TSXStoreColor(display,this->cm,&xc);
|
||||
|
||||
this->palents[start+i].peRed = palent[i].peRed;
|
||||
this->palents[start+i].peBlue = palent[i].peBlue;
|
||||
this->palents[start+i].peGreen = palent[i].peGreen;
|
||||
this->palents[start+i].peFlags = palent[i].peFlags;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -942,10 +1035,13 @@ static HRESULT WINAPI DGA_IDirectDrawPalette_SetEntries(
|
|||
xc.green = palent[i].peGreen<<8;
|
||||
xc.flags = DoRed|DoBlue|DoGreen;
|
||||
xc.pixel = i+start;
|
||||
|
||||
TSXStoreColor(display,this->cm,&xc);
|
||||
|
||||
this->palents[start+i].peRed = palent[i].peRed;
|
||||
this->palents[start+i].peBlue = palent[i].peBlue;
|
||||
this->palents[start+i].peGreen = palent[i].peGreen;
|
||||
this->palents[start+i].peFlags = palent[i].peFlags;
|
||||
}
|
||||
TSXF86DGAInstallColormap(display,DefaultScreen(display),this->cm);
|
||||
return 0;
|
||||
|
@ -955,6 +1051,7 @@ static HRESULT WINAPI DGA_IDirectDrawPalette_SetEntries(
|
|||
}
|
||||
|
||||
static ULONG WINAPI IDirectDrawPalette_Release(LPDIRECTDRAWPALETTE this) {
|
||||
TRACE( ddraw, "(%p)->() decrementing from %lu.\n", this, this->ref );
|
||||
if (!--(this->ref)) {
|
||||
if (this->cm) {
|
||||
TSXFreeColormap(display,this->cm);
|
||||
|
@ -967,6 +1064,8 @@ static ULONG WINAPI IDirectDrawPalette_Release(LPDIRECTDRAWPALETTE this) {
|
|||
}
|
||||
|
||||
static ULONG WINAPI IDirectDrawPalette_AddRef(LPDIRECTDRAWPALETTE this) {
|
||||
|
||||
TRACE( ddraw, "(%p)->() incrementing from %lu.\n", this, this->ref );
|
||||
return ++(this->ref);
|
||||
}
|
||||
|
||||
|
@ -976,21 +1075,39 @@ static HRESULT WINAPI IDirectDrawPalette_Initialize(
|
|||
return DDERR_ALREADYINITIALIZED;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectDrawPalette_GetCaps(
|
||||
LPDIRECTDRAWPALETTE this, LPDWORD lpdwCaps )
|
||||
{
|
||||
FIXME( ddraw, "(%p)->(%p) stub.\n", this, lpdwCaps );
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectDrawPalette_QueryInterface(
|
||||
LPDIRECTDRAWPALETTE this,REFIID refiid,LPVOID *obj )
|
||||
{
|
||||
char xrefiid[50];
|
||||
|
||||
WINE_StringFromCLSID((LPCLSID)refiid,xrefiid);
|
||||
FIXME(ddraw,"(%p)->(%s,%p) stub.\n",this,xrefiid,obj);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static struct IDirectDrawPalette_VTable dga_ddpalvt = {
|
||||
(void*)1,
|
||||
IDirectDrawPalette_QueryInterface,
|
||||
IDirectDrawPalette_AddRef,
|
||||
IDirectDrawPalette_Release,
|
||||
(void*)4,
|
||||
IDirectDrawPalette_GetCaps,
|
||||
IDirectDrawPalette_GetEntries,
|
||||
IDirectDrawPalette_Initialize,
|
||||
DGA_IDirectDrawPalette_SetEntries
|
||||
};
|
||||
|
||||
static struct IDirectDrawPalette_VTable xlib_ddpalvt = {
|
||||
(void*)1,
|
||||
IDirectDrawPalette_QueryInterface,
|
||||
IDirectDrawPalette_AddRef,
|
||||
IDirectDrawPalette_Release,
|
||||
(void*)4,
|
||||
IDirectDrawPalette_GetCaps,
|
||||
IDirectDrawPalette_GetEntries,
|
||||
IDirectDrawPalette_Initialize,
|
||||
Xlib_IDirectDrawPalette_SetEntries
|
||||
|
@ -1036,12 +1153,15 @@ static HRESULT WINAPI IDirect3D_QueryInterface(
|
|||
}
|
||||
|
||||
static ULONG WINAPI IDirect3D_AddRef(LPDIRECT3D this) {
|
||||
TRACE( ddraw, "(%p)->() incrementing from %lu.\n", this, this->ref );
|
||||
|
||||
return ++(this->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI IDirect3D_Release(LPDIRECT3D this)
|
||||
{
|
||||
TRACE(ddraw,"(%p)->Release()\n",this);
|
||||
TRACE( ddraw, "(%p)->() decrementing from %lu.\n", this, this->ref );
|
||||
|
||||
if (!--(this->ref)) {
|
||||
this->ddraw->lpvtbl->fnRelease(this->ddraw);
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
|
@ -1050,6 +1170,18 @@ static ULONG WINAPI IDirect3D_Release(LPDIRECT3D this)
|
|||
return this->ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D_Initialize(
|
||||
LPDIRECT3D this, REFIID refiid )
|
||||
{
|
||||
/* FIXME: Not sure if this is correct */
|
||||
char xrefiid[50];
|
||||
|
||||
WINE_StringFromCLSID((LPCLSID)refiid,xrefiid);
|
||||
FIXME(ddraw,"(%p)->(%s):stub.\n",this,xrefiid);
|
||||
|
||||
return DDERR_ALREADYINITIALIZED;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* IDirect3D
|
||||
*/
|
||||
|
@ -1057,7 +1189,7 @@ static struct IDirect3D_VTable d3dvt = {
|
|||
(void*)IDirect3D_QueryInterface,
|
||||
(void*)IDirect3D_AddRef,
|
||||
(void*)IDirect3D_Release,
|
||||
(void*)4,
|
||||
IDirect3D_Initialize,
|
||||
(void*)5,
|
||||
(void*)6,
|
||||
(void*)7,
|
||||
|
@ -1069,6 +1201,8 @@ static struct IDirect3D_VTable d3dvt = {
|
|||
* IDirect3D2
|
||||
*/
|
||||
static ULONG WINAPI IDirect3D2_Release(LPDIRECT3D2 this) {
|
||||
TRACE( ddraw, "(%p)->() decrementing from %lu.\n", this, this->ref );
|
||||
|
||||
if (!--(this->ref)) {
|
||||
this->ddraw->lpvtbl->fnRelease(this->ddraw);
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
|
@ -1107,6 +1241,12 @@ static struct IDirect3D2_VTable d3d2vt = {
|
|||
/*******************************************************************************
|
||||
* IDirectDraw
|
||||
*/
|
||||
|
||||
/* Used in conjunction with cbWndExtra for storage of the this ptr for the window.
|
||||
* Please adjust allocation in Xlib_DirectDrawCreate if you store more data here.
|
||||
*/
|
||||
static INT32 ddrawXlibThisOffset = 0;
|
||||
|
||||
static HRESULT WINAPI DGA_IDirectDraw2_CreateSurface(
|
||||
LPDIRECTDRAW2 this,LPDDSURFACEDESC lpddsd,LPDIRECTDRAWSURFACE *lpdsf,IUnknown *lpunk
|
||||
) {
|
||||
|
@ -1191,8 +1331,10 @@ static HRESULT WINAPI Xlib_IDirectDraw2_CreateSurface(
|
|||
LPDIRECTDRAW2 this,LPDDSURFACEDESC lpddsd,LPDIRECTDRAWSURFACE *lpdsf,IUnknown *lpunk
|
||||
) {
|
||||
XImage *img;
|
||||
|
||||
TRACE(ddraw, "(%p)->CreateSurface(%p,%p,%p)\n",
|
||||
this,lpddsd,lpdsf,lpunk);
|
||||
|
||||
if (TRACE_ON(ddraw)) {
|
||||
fprintf(stderr,"[w=%ld,h=%ld,flags ",lpddsd->dwWidth,lpddsd->dwHeight);
|
||||
_dump_DDSD(lpddsd->dwFlags);
|
||||
|
@ -1202,9 +1344,12 @@ static HRESULT WINAPI Xlib_IDirectDraw2_CreateSurface(
|
|||
}
|
||||
|
||||
*lpdsf = (LPDIRECTDRAWSURFACE)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawSurface));
|
||||
|
||||
this->lpvtbl->fnAddRef(this);
|
||||
(*lpdsf)->s.ddraw = this;
|
||||
(*lpdsf)->ref = 1;
|
||||
(*lpdsf)->lpvtbl = (LPDIRECTDRAWSURFACE_VTABLE)&xlib_dds3vt;
|
||||
|
||||
if ( (lpddsd->dwFlags & DDSD_CAPS) &&
|
||||
(lpddsd->ddsCaps.dwCaps & DDSCAPS_OFFSCREENPLAIN)
|
||||
) {
|
||||
|
@ -1225,7 +1370,6 @@ static HRESULT WINAPI Xlib_IDirectDraw2_CreateSurface(
|
|||
(*lpdsf)->s.width = lpddsd->dwWidth;
|
||||
(*lpdsf)->s.height = lpddsd->dwHeight;
|
||||
}
|
||||
(*lpdsf)->s.ddraw = this;
|
||||
|
||||
{
|
||||
(*lpdsf)->t.xlib.image = img =
|
||||
|
@ -1251,7 +1395,10 @@ static HRESULT WINAPI Xlib_IDirectDraw2_CreateSurface(
|
|||
FIXME(ddraw,"urks, wants to have more than one backbuffer (%ld)!\n",lpddsd->dwBackBufferCount);
|
||||
|
||||
(*lpdsf)->s.backbuffer = back = (LPDIRECTDRAWSURFACE3)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawSurface3));
|
||||
|
||||
this->lpvtbl->fnAddRef(this);
|
||||
back->s.ddraw = this;
|
||||
|
||||
back->ref = 1;
|
||||
back->lpvtbl = (LPDIRECTDRAWSURFACE3_VTABLE)&xlib_dds3vt;
|
||||
/* FIXME: !8 bit images */
|
||||
|
@ -1273,7 +1420,6 @@ static HRESULT WINAPI Xlib_IDirectDraw2_CreateSurface(
|
|||
);
|
||||
back->s.width = this->d.width;
|
||||
back->s.height = this->d.height;
|
||||
back->s.ddraw = this;
|
||||
back->s.lpitch = back->t.xlib.image->bytes_per_line;
|
||||
back->s.backbuffer = NULL; /* does not have a backbuffer, it is
|
||||
* one! */
|
||||
|
@ -1316,7 +1462,7 @@ static HRESULT WINAPI IDirectDraw2_SetCooperativeLevel(
|
|||
dsprintf(ddraw, "%s ", flagmap[i].name);
|
||||
TRACE(ddraw," cooperative level %s\n", dbg_str(ddraw));
|
||||
}
|
||||
/* this->d.mainwindow = hwnd;*/
|
||||
this->d.mainWindow = hwnd;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1404,12 +1550,25 @@ static HRESULT WINAPI Xlib_IDirectDraw_SetDisplayMode(
|
|||
0,
|
||||
NULL
|
||||
);
|
||||
SetWindowLong32A(this->e.xlib.window,0,(LONG)this);
|
||||
|
||||
/* Store this with the window. We'll use it for the window procedure */
|
||||
SetWindowLong32A(this->e.xlib.window,ddrawXlibThisOffset,(LONG)this);
|
||||
|
||||
this->e.xlib.paintable = 1;
|
||||
|
||||
ShowWindow32(this->e.xlib.window,TRUE);
|
||||
UpdateWindow32(this->e.xlib.window);
|
||||
|
||||
assert(this->e.xlib.window);
|
||||
|
||||
this->e.xlib.drawable = WIN_FindWndPtr(this->e.xlib.window)->window;
|
||||
|
||||
/* We don't have a context for this window. Host off the desktop */
|
||||
if( !this->e.xlib.drawable )
|
||||
{
|
||||
this->e.xlib.drawable = WIN_GetDesktop()->window;
|
||||
}
|
||||
|
||||
this->d.width = width;
|
||||
this->d.height = height;
|
||||
/* adjust fb_height, so we don't overlap */
|
||||
|
@ -1503,16 +1662,23 @@ static HRESULT WINAPI Xlib_IDirectDraw2_CreatePalette(
|
|||
if (*lpddpal == NULL) return E_OUTOFMEMORY;
|
||||
(*lpddpal)->ref = 1;
|
||||
(*lpddpal)->installed = 0;
|
||||
|
||||
(*lpddpal)->ddraw = (LPDIRECTDRAW)this;
|
||||
this->lpvtbl->fnAddRef(this);
|
||||
|
||||
if (this->d.depth<=8) {
|
||||
(*lpddpal)->cm = TSXCreateColormap(display,this->e.xlib.drawable,DefaultVisualOfScreen(screen),AllocAll);
|
||||
/* later installed ...
|
||||
* TSXInstallColormap(display,(*lpddpal)->cm);
|
||||
* TSXSetWindowColormap(display,this->e.xlib.drawable,(*lpddpal)->cm);
|
||||
*/
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
/* we don't want palettes in hicolor or truecolor */
|
||||
(*lpddpal)->cm = 0;
|
||||
}
|
||||
|
||||
(*lpddpal)->lpvtbl = &xlib_ddpalvt;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1545,10 +1711,14 @@ static HRESULT WINAPI IDirectDraw2_WaitForVerticalBlank(
|
|||
}
|
||||
|
||||
static ULONG WINAPI IDirectDraw2_AddRef(LPDIRECTDRAW2 this) {
|
||||
TRACE( ddraw, "(%p)->() incrementing from %lu.\n", this, this->ref );
|
||||
|
||||
return ++(this->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI DGA_IDirectDraw2_Release(LPDIRECTDRAW2 this) {
|
||||
TRACE( ddraw, "(%p)->() decrementing from %lu.\n", this, this->ref );
|
||||
|
||||
#ifdef HAVE_LIBXXF86DGA
|
||||
if (!--(this->ref)) {
|
||||
TSXF86DGADirectVideo(display,DefaultScreen(display),0);
|
||||
|
@ -1563,6 +1733,8 @@ static ULONG WINAPI DGA_IDirectDraw2_Release(LPDIRECTDRAW2 this) {
|
|||
}
|
||||
|
||||
static ULONG WINAPI Xlib_IDirectDraw2_Release(LPDIRECTDRAW2 this) {
|
||||
TRACE( ddraw, "(%p)->() decrementing from %lu.\n", this, this->ref );
|
||||
|
||||
if (!--(this->ref)) {
|
||||
HeapFree(GetProcessHeap(),0,this);
|
||||
return 0;
|
||||
|
@ -1779,6 +1951,15 @@ static HRESULT WINAPI IDirectDraw2_EnumSurfaces(
|
|||
return 0;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectDraw2_Compact(
|
||||
LPDIRECTDRAW2 this )
|
||||
{
|
||||
FIXME(ddraw,"(%p)->()\n", this );
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
|
||||
/* Note: Hack so we can reuse the old functions without compiler warnings */
|
||||
#ifdef __GNUC__
|
||||
# define XCAST(fun) (typeof(dga_ddvt.fn##fun))
|
||||
|
@ -1790,7 +1971,7 @@ static struct IDirectDraw_VTable dga_ddvt = {
|
|||
XCAST(QueryInterface)DGA_IDirectDraw2_QueryInterface,
|
||||
XCAST(AddRef)IDirectDraw2_AddRef,
|
||||
XCAST(Release)DGA_IDirectDraw2_Release,
|
||||
XCAST(Compact)4,
|
||||
XCAST(Compact)IDirectDraw2_Compact,
|
||||
XCAST(CreateClipper)IDirectDraw2_CreateClipper,
|
||||
XCAST(CreatePalette)DGA_IDirectDraw2_CreatePalette,
|
||||
XCAST(CreateSurface)DGA_IDirectDraw2_CreateSurface,
|
||||
|
@ -1816,7 +1997,7 @@ static struct IDirectDraw_VTable xlib_ddvt = {
|
|||
XCAST(QueryInterface)Xlib_IDirectDraw2_QueryInterface,
|
||||
XCAST(AddRef)IDirectDraw2_AddRef,
|
||||
XCAST(Release)Xlib_IDirectDraw2_Release,
|
||||
XCAST(Compact)4,
|
||||
XCAST(Compact)IDirectDraw2_Compact,
|
||||
XCAST(CreateClipper)IDirectDraw2_CreateClipper,
|
||||
XCAST(CreatePalette)Xlib_IDirectDraw2_CreatePalette,
|
||||
XCAST(CreateSurface)Xlib_IDirectDraw2_CreateSurface,
|
||||
|
@ -1843,6 +2024,7 @@ static struct IDirectDraw_VTable xlib_ddvt = {
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
static HRESULT WINAPI DGA_IDirectDraw2_SetDisplayMode(
|
||||
LPDIRECTDRAW2 this,DWORD width,DWORD height,DWORD depth,DWORD xx,DWORD yy
|
||||
) {
|
||||
|
@ -1881,7 +2063,7 @@ static IDirectDraw2_VTable dga_dd2vt = {
|
|||
DGA_IDirectDraw2_QueryInterface,
|
||||
IDirectDraw2_AddRef,
|
||||
DGA_IDirectDraw2_Release,
|
||||
(void*)4,
|
||||
IDirectDraw2_Compact,
|
||||
IDirectDraw2_CreateClipper,
|
||||
DGA_IDirectDraw2_CreatePalette,
|
||||
DGA_IDirectDraw2_CreateSurface,
|
||||
|
@ -1908,7 +2090,7 @@ static struct IDirectDraw2_VTable xlib_dd2vt = {
|
|||
Xlib_IDirectDraw2_QueryInterface,
|
||||
IDirectDraw2_AddRef,
|
||||
Xlib_IDirectDraw2_Release,
|
||||
(void*)4,
|
||||
IDirectDraw2_Compact,
|
||||
IDirectDraw2_CreateClipper,
|
||||
Xlib_IDirectDraw2_CreatePalette,
|
||||
Xlib_IDirectDraw2_CreateSurface,
|
||||
|
@ -1987,22 +2169,65 @@ HRESULT WINAPI DGA_DirectDrawCreate( LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter)
|
|||
#endif /* defined(HAVE_LIBXXF86DGA) */
|
||||
}
|
||||
|
||||
LRESULT WINAPI Xlib_DDWndProc(HWND32 hwnd,UINT32 msg,WPARAM32 wParam,LPARAM lParam) {
|
||||
LRESULT WINAPI Xlib_DDWndProc(HWND32 hwnd,UINT32 msg,WPARAM32 wParam,LPARAM lParam)
|
||||
{
|
||||
LRESULT ret;
|
||||
LPDIRECTDRAW ddraw = NULL;
|
||||
DWORD lastError;
|
||||
|
||||
/*FIXME(ddraw,"(0x%04x,%s,0x%08lx,0x%08lx),stub!\n",(int)hwnd,SPY_GetMsgName(msg),(long)wParam,(long)lParam); */
|
||||
if (msg==WM_PAINT){
|
||||
LPDIRECTDRAW ddraw = (LPDIRECTDRAW)GetWindowLong32A(hwnd,0);
|
||||
|
||||
SetLastError( ERROR_SUCCESS );
|
||||
ddraw = (LPDIRECTDRAW)GetWindowLong32A( hwnd, ddrawXlibThisOffset );
|
||||
if( (!ddraw) &&
|
||||
( ( lastError = GetLastError() ) != ERROR_SUCCESS )
|
||||
)
|
||||
{
|
||||
ERR( ddraw, "Unable to retrieve this ptr from window. Error %08lx\n", lastError );
|
||||
}
|
||||
|
||||
if( ddraw )
|
||||
{
|
||||
/* Perform any special direct draw functions */
|
||||
if (msg==WM_PAINT)
|
||||
{
|
||||
ddraw->e.xlib.paintable = 1;
|
||||
}
|
||||
|
||||
/* Now let the application deal with the rest of this */
|
||||
if( ddraw->d.mainWindow )
|
||||
{
|
||||
|
||||
/* Don't think that we actually need to call this but...
|
||||
might as well be on the safe side of things... */
|
||||
ret = DefWindowProc32A( hwnd, msg, wParam, lParam );
|
||||
|
||||
if( !ret )
|
||||
{
|
||||
/* We didn't handle the message - give it to the application */
|
||||
ret = CallWindowProc32A( WIN_FindWndPtr( ddraw->d.mainWindow )->winproc,
|
||||
ddraw->d.mainWindow, msg, wParam, lParam );
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = DefWindowProc32A( ddraw->d.mainWindow, msg, wParam, lParam );
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = DefWindowProc32A(hwnd,msg,wParam,lParam);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT WINAPI Xlib_DirectDrawCreate( LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter) {
|
||||
WNDCLASS32A wc;
|
||||
int have_xshm = 0;
|
||||
WND* pParentWindow;
|
||||
|
||||
*lplpDD = (LPDIRECTDRAW)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDraw));
|
||||
(*lplpDD)->lpvtbl = &xlib_ddvt;
|
||||
|
@ -2012,8 +2237,14 @@ HRESULT WINAPI Xlib_DirectDrawCreate( LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter)
|
|||
wc.style = CS_GLOBALCLASS;
|
||||
wc.lpfnWndProc = Xlib_DDWndProc;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
wc.cbWndExtra = /* Defines extra mem for window. This is used for storing this */
|
||||
sizeof( LPDIRECTDRAW ); /* ddrawXlibThisOffset */
|
||||
|
||||
/* We can be a child of the desktop since we're really important */
|
||||
pParentWindow = WIN_GetDesktop();
|
||||
wc.hInstance = pParentWindow ? pParentWindow->hwndSelf : 0;
|
||||
wc.hInstance = 0;
|
||||
|
||||
wc.hIcon = 0;
|
||||
wc.hCursor = (HCURSOR32)IDC_ARROW32A;
|
||||
wc.hbrBackground= NULL_BRUSH;
|
||||
|
|
|
@ -116,9 +116,27 @@ INT32 WINAPI Escape32( HDC32 hdc, INT32 nEscape, INT32 cbInput,
|
|||
return ret;
|
||||
}
|
||||
|
||||
INT32 WINAPI ExtEscape32(HDC32 hdc,INT32 nEscape,INT32 cbInput,LPCSTR x,INT32 cbOutput,LPSTR out) {
|
||||
FIXME(driver,"(0x%04x,0x%x,%d,%s,%d,%p),stub!\n",
|
||||
hdc,nEscape,cbInput,x,cbOutput,out
|
||||
);
|
||||
return 1;
|
||||
/******************************************************************************
|
||||
* ExtEscape32 [GDI32.95]
|
||||
*
|
||||
* PARAMS
|
||||
* hdc [I] Handle to device context
|
||||
* nEscape [I] Escape function
|
||||
* cbInput [I] Number of bytes in input structure
|
||||
* lpszInData [I] Pointer to input structure
|
||||
* cbOutput [I] Number of bytes in output structure
|
||||
* lpszOutData [O] Pointer to output structure
|
||||
*
|
||||
* RETURNS
|
||||
* Success: >0
|
||||
* Not implemented: 0
|
||||
* Failure: <0
|
||||
*/
|
||||
INT32 WINAPI ExtEscape32( HDC32 hdc, INT32 nEscape, INT32 cbInput,
|
||||
LPCSTR lpszInData, INT32 cbOutput, LPSTR lpszOutData )
|
||||
{
|
||||
FIXME(driver,"(0x%04x,0x%x,%d,%s,%d,%p):stub\n",
|
||||
hdc,nEscape,cbInput,debugstr_a(lpszInData),cbOutput,lpszOutData);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -812,8 +812,7 @@ BOOL32 WINAPI DrawAnimatedRects32( HWND32 hwnd, int idAni,
|
|||
const LPRECT32 lprcFrom,
|
||||
const LPRECT32 lprcTo )
|
||||
{
|
||||
FIXME(gdi,"(%x,%d,%p,%p): empty stub!\n",
|
||||
hwnd, idAni, lprcFrom, lprcTo );
|
||||
FIXME(gdi,"(0x%x,%d,%p,%p): stub\n",hwnd,idAni,lprcFrom,lprcTo);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@ BOOL32 WINAPI CloseFigure32(HDC32 hdc)
|
|||
INT16 WINAPI GetPath16(HDC16 hdc, LPPOINT16 pPoints, LPBYTE pTypes,
|
||||
INT16 nSize)
|
||||
{
|
||||
FIXME(gdi, "Unimplemented stub\n");
|
||||
FIXME(gdi, "(%d,%p,%p): stub\n",hdc,pPoints,pTypes);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -73,18 +73,18 @@ static aliasTemplate faTemplate[4] = {
|
|||
{ "-adobe-helvetica-", "Arial" }
|
||||
};
|
||||
|
||||
/* Charset translation table, cp125-.. encoded fonts are produced by
|
||||
* the fnt2bdf */
|
||||
/* Charset translation table, microsoft-cp125.. encoded fonts are produced by
|
||||
* the fnt2bdf or the True Type X11 font servers */
|
||||
|
||||
static int numCPTranslation = 8;
|
||||
static BYTE CPTranslation[] = { EE_CHARSET, /* cp125-0 */
|
||||
RUSSIAN_CHARSET, /* cp125-1 */
|
||||
ANSI_CHARSET, /* cp125-2 */
|
||||
GREEK_CHARSET, /* cp125-3 */
|
||||
TURKISH_CHARSET, /* cp125-4 */
|
||||
HEBREW_CHARSET, /* cp125-5 */
|
||||
ARABIC_CHARSET, /* cp125-6 */
|
||||
BALTIC_CHARSET /* cp125-7 */
|
||||
static BYTE CPTranslation[] = { EE_CHARSET, /* cp1250 */
|
||||
RUSSIAN_CHARSET, /* cp1251 */
|
||||
ANSI_CHARSET, /* cp1252 */
|
||||
GREEK_CHARSET, /* cp1253 */
|
||||
TURKISH_CHARSET, /* cp1254 */
|
||||
HEBREW_CHARSET, /* cp1255 */
|
||||
ARABIC_CHARSET, /* cp1256 */
|
||||
BALTIC_CHARSET /* cp1257 */
|
||||
};
|
||||
|
||||
UINT16 XTextCaps = TC_OP_CHARACTER | TC_OP_STROKE |
|
||||
|
@ -104,7 +104,7 @@ static const char* INIResolution = "Resolution";
|
|||
static const char* INIGlobalMetrics = "FontMetrics";
|
||||
|
||||
static const char* LFDSeparator = "*-";
|
||||
static const char* localMSEncoding = "cp125-";
|
||||
static const char* localMSEncoding = "microsoft-cp125";
|
||||
static const char* iso8859Encoding = "iso8859-";
|
||||
static const char* iso646Encoding = "iso646.1991-";
|
||||
static const char* ansiEncoding = "ansi-";
|
||||
|
@ -372,7 +372,7 @@ static int LFD_InitFontInfo( fontInfo* fi, LPSTR lpstr )
|
|||
fi->fi_flags |= FI_ENC_ISO646;
|
||||
else if( strstr(lpch, ansiEncoding) ) /* fnt2bdf produces -ansi-0 LFD */
|
||||
fi->fi_flags |= FI_ENC_ANSI;
|
||||
else /* ... and -cp125-x */
|
||||
else /* ... and -microsoft-cp125x */
|
||||
{
|
||||
fi->df.dfCharSet = OEM_CHARSET;
|
||||
if( !strncasecmp(lpch, localMSEncoding, 6) )
|
||||
|
@ -384,7 +384,8 @@ static int LFD_InitFontInfo( fontInfo* fi, LPSTR lpstr )
|
|||
fi->df.dfCharSet = CPTranslation[i];
|
||||
}
|
||||
}
|
||||
else if( strstr(lpch, "fontspecific") )
|
||||
else if( strstr(lpch, "fontspecific") ||
|
||||
strstr(lpch, "microsoft-symbol") )
|
||||
fi->df.dfCharSet = SYMBOL_CHARSET;
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -1993,14 +1994,14 @@ static BOOL32 XFONT_SetX11Trans( fontObject *pfo )
|
|||
int i;
|
||||
char *cp, *start;
|
||||
|
||||
XGetFontProperty( pfo->fs, XA_FONT, &nameAtom );
|
||||
fontName = XGetAtomName( display, nameAtom );
|
||||
TSXGetFontProperty( pfo->fs, XA_FONT, &nameAtom );
|
||||
fontName = TSXGetAtomName( display, nameAtom );
|
||||
for(i = 0, cp = fontName; i < 7; i++) {
|
||||
cp = strchr(cp, '-');
|
||||
cp++;
|
||||
}
|
||||
if(*cp != '[') {
|
||||
XFree(fontName);
|
||||
TSXFree(fontName);
|
||||
return FALSE;
|
||||
}
|
||||
start = cp;
|
||||
|
@ -2010,10 +2011,10 @@ static BOOL32 XFONT_SetX11Trans( fontObject *pfo )
|
|||
#define PX pfo->lpX11Trans
|
||||
|
||||
sscanf(start, "[%f%f%f%f]", &PX->a, &PX->b, &PX->c, &PX->d);
|
||||
XFree(fontName);
|
||||
TSXFree(fontName);
|
||||
|
||||
XGetFontProperty( pfo->fs, RAW_ASCENT, &PX->RAW_ASCENT );
|
||||
XGetFontProperty( pfo->fs, RAW_DESCENT, &PX->RAW_DESCENT );
|
||||
TSXGetFontProperty( pfo->fs, RAW_ASCENT, &PX->RAW_ASCENT );
|
||||
TSXGetFontProperty( pfo->fs, RAW_DESCENT, &PX->RAW_DESCENT );
|
||||
|
||||
PX->pixelsize = hypot(PX->a, PX->b);
|
||||
PX->ascent = PX->pixelsize / 1000.0 * PX->RAW_ASCENT;
|
||||
|
|
|
@ -6,9 +6,11 @@ VPATH = @srcdir@
|
|||
MODULE = if1632
|
||||
|
||||
DLLS = \
|
||||
avifile.spec \
|
||||
commdlg.spec \
|
||||
compobj.spec \
|
||||
ddeml.spec \
|
||||
display.spec \
|
||||
gdi.spec \
|
||||
kernel.spec \
|
||||
keyboard.spec \
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
name avifile
|
||||
type win16
|
||||
|
||||
1 stub WEP
|
||||
2 stub DLLGETCLASSOBJECT
|
||||
3 stub DLLCANUNLOADNOW
|
||||
4 stub ___EXPORTEDSTUB
|
||||
10 stub _IID_IAVISTREAM
|
||||
11 stub _IID_IAVIFILE
|
||||
12 stub _IID_IAVIEDITSTREAM
|
||||
13 stub _IID_IGETFRAME
|
||||
14 stub _CLSID_AVISIMPLEUNMARSHAL
|
||||
100 stub AVIFILEINIT
|
||||
101 stub AVIFILEEXIT
|
||||
102 stub AVIFILEOPEN
|
||||
103 stub AVISTREAMOPENFROMFILE
|
||||
104 stub AVISTREAMCREATE
|
||||
105 stub AVIMAKECOMPRESSEDSTREAM
|
||||
106 stub AVIMAKEFILEFROMSTREAMS
|
||||
107 stub AVIMAKESTREAMFROMCLIPBOARD
|
||||
110 stub AVISTREAMGETFRAME
|
||||
111 stub AVISTREAMGETFRAMECLOSE
|
||||
112 stub AVISTREAMGETFRAMEOPEN
|
||||
120 stub _AVISAVE
|
||||
121 stub AVISAVEV
|
||||
122 stub AVISAVEOPTIONS
|
||||
123 stub AVIBUILDFILTER
|
||||
124 stub AVISAVEOPTIONSFREE
|
||||
130 stub AVISTREAMSTART
|
||||
131 stub AVISTREAMLENGTH
|
||||
132 stub AVISTREAMTIMETOSAMPLE
|
||||
133 stub AVISTREAMSAMPLETOTIME
|
||||
140 stub AVIFILEADDREF
|
||||
141 stub AVIFILERELEASE
|
||||
142 stub AVIFILEINFO
|
||||
143 stub AVIFILEGETSTREAM
|
||||
144 stub AVIFILECREATESTREAM
|
||||
146 stub AVIFILEWRITEDATA
|
||||
147 stub AVIFILEREADDATA
|
||||
148 stub AVIFILEENDRECORD
|
||||
160 stub AVISTREAMADDREF
|
||||
161 stub AVISTREAMRELEASE
|
||||
162 stub AVISTREAMINFO
|
||||
163 stub AVISTREAMFINDSAMPLE
|
||||
164 stub AVISTREAMREADFORMAT
|
||||
165 stub AVISTREAMREADDATA
|
||||
166 stub AVISTREAMWRITEDATA
|
||||
167 stub AVISTREAMREAD
|
||||
168 stub AVISTREAMWRITE
|
||||
169 stub AVISTREAMSETFORMAT
|
||||
180 stub EDITSTREAMCOPY
|
||||
181 stub EDITSTREAMCUT
|
||||
182 stub EDITSTREAMPASTE
|
||||
184 stub CREATEEDITABLESTREAM
|
||||
185 stub AVIPUTFILEONCLIPBOARD
|
||||
187 stub AVIGETFROMCLIPBOARD
|
||||
188 stub AVICLEARCLIPBOARD
|
||||
190 stub EDITSTREAMCLONE
|
||||
191 stub EDITSTREAMSETNAME
|
||||
192 stub EDITSTREAMSETINFO
|
||||
200 stub AVISTREAMBEGINSTREAMING
|
||||
201 stub AVISTREAMENDSTREAMING
|
|
@ -46,9 +46,11 @@ typedef struct
|
|||
|
||||
/* 16-bit DLLs */
|
||||
|
||||
extern const WIN16_DESCRIPTOR AVIFILE_Descriptor;
|
||||
extern const WIN16_DESCRIPTOR COMMDLG_Descriptor;
|
||||
extern const WIN16_DESCRIPTOR COMPOBJ_Descriptor;
|
||||
extern const WIN16_DESCRIPTOR DDEML_Descriptor;
|
||||
extern const WIN16_DESCRIPTOR DISPLAY_Descriptor;
|
||||
extern const WIN16_DESCRIPTOR GDI_Descriptor;
|
||||
extern const WIN16_DESCRIPTOR KERNEL_Descriptor;
|
||||
extern const WIN16_DESCRIPTOR KEYBOARD_Descriptor;
|
||||
|
@ -92,8 +94,10 @@ static BUILTIN16_DLL BuiltinDLLs[] =
|
|||
{ &USER_Descriptor, DLL_FLAG_ALWAYS_USED },
|
||||
{ &GDI_Descriptor, DLL_FLAG_ALWAYS_USED },
|
||||
{ &SYSTEM_Descriptor, DLL_FLAG_ALWAYS_USED },
|
||||
{ &DISPLAY_Descriptor, DLL_FLAG_ALWAYS_USED },
|
||||
{ &WPROCS_Descriptor, DLL_FLAG_ALWAYS_USED },
|
||||
{ &WINDEBUG_Descriptor, DLL_FLAG_NOT_USED },
|
||||
{ &AVIFILE_Descriptor, DLL_FLAG_NOT_USED },
|
||||
{ &COMMDLG_Descriptor, DLL_FLAG_NOT_USED },
|
||||
{ &COMPOBJ_Descriptor, DLL_FLAG_NOT_USED },
|
||||
{ &DDEML_Descriptor, DLL_FLAG_NOT_USED },
|
||||
|
@ -159,10 +163,10 @@ static HMODULE16 BUILTIN_DoLoadModule16( const WIN16_DESCRIPTOR *descr )
|
|||
/* Allocate the code segment */
|
||||
|
||||
pSegTable = NE_SEG_TABLE( pModule );
|
||||
pSegTable->selector = GLOBAL_CreateBlock( GMEM_FIXED, descr->code_start,
|
||||
pSegTable->hSeg = GLOBAL_CreateBlock( GMEM_FIXED, descr->code_start,
|
||||
pSegTable->minsize, hModule,
|
||||
TRUE, TRUE, FALSE, NULL );
|
||||
if (!pSegTable->selector) return 0;
|
||||
if (!pSegTable->hSeg) return 0;
|
||||
pSegTable++;
|
||||
|
||||
/* Allocate the data segment */
|
||||
|
@ -170,13 +174,14 @@ static HMODULE16 BUILTIN_DoLoadModule16( const WIN16_DESCRIPTOR *descr )
|
|||
minsize = pSegTable->minsize ? pSegTable->minsize : 0x10000;
|
||||
minsize += pModule->heap_size;
|
||||
if (minsize > 0x10000) minsize = 0x10000;
|
||||
pSegTable->selector = GLOBAL_Alloc( GMEM_FIXED, minsize,
|
||||
pSegTable->hSeg = GLOBAL_Alloc( GMEM_FIXED, minsize,
|
||||
hModule, FALSE, FALSE, FALSE );
|
||||
if (!pSegTable->selector) return 0;
|
||||
if (pSegTable->minsize) memcpy( GlobalLock16( pSegTable->selector ),
|
||||
if (!pSegTable->hSeg) return 0;
|
||||
if (pSegTable->minsize) memcpy( GlobalLock16( pSegTable->hSeg ),
|
||||
descr->data_start, pSegTable->minsize);
|
||||
if (pModule->heap_size)
|
||||
LocalInit( pSegTable->selector, pSegTable->minsize, minsize );
|
||||
LocalInit( GlobalHandleToSel(pSegTable->hSeg),
|
||||
pSegTable->minsize, minsize );
|
||||
|
||||
NE_RegisterModule( pModule );
|
||||
return hModule;
|
||||
|
@ -207,9 +212,9 @@ BOOL32 BUILTIN_Init(void)
|
|||
/* Set the USER and GDI heap selectors */
|
||||
|
||||
pModule = NE_GetPtr( GetModuleHandle16( "USER" ));
|
||||
USER_HeapSel = (NE_SEG_TABLE( pModule ) + pModule->dgroup - 1)->selector;
|
||||
USER_HeapSel = pModule ? GlobalHandleToSel((NE_SEG_TABLE( pModule ) + pModule->dgroup - 1)->hSeg) : 0;
|
||||
pModule = NE_GetPtr( GetModuleHandle16( "GDI" ));
|
||||
GDI_HeapSel = (NE_SEG_TABLE( pModule ) + pModule->dgroup - 1)->selector;
|
||||
GDI_HeapSel = pModule ? GlobalHandleToSel((NE_SEG_TABLE( pModule ) + pModule->dgroup - 1)->hSeg) : 0;
|
||||
|
||||
/* Initialize KERNEL.178 (__WINFLAGS) with the correct flags value */
|
||||
|
||||
|
@ -254,7 +259,7 @@ BOOL32 BUILTIN_Init(void)
|
|||
FARPROC16 proc = NE_GetEntryPoint( hModule,
|
||||
FIRST_INTERRUPT_ORDINAL + vector );
|
||||
assert(proc);
|
||||
INT_SetHandler( vector, proc );
|
||||
INT_SetPMHandler( vector, proc );
|
||||
}
|
||||
|
||||
SNOOP16_Init();
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
name display
|
||||
type win16
|
||||
|
||||
1 stub BitBlt
|
||||
2 stub ColorInfo
|
||||
3 stub Control
|
||||
4 stub Disable
|
||||
5 stub Enable
|
||||
6 stub EnumFonts
|
||||
7 stub EnumObj
|
||||
8 stub Output
|
||||
9 stub Pixel
|
||||
10 stub RealizeObject
|
||||
11 stub StrBlt
|
||||
12 stub ScanLR
|
||||
13 stub DeviceMode
|
||||
14 stub ExtTextOut
|
||||
15 stub GetCharWidth
|
||||
16 stub DeviceBitmap
|
||||
17 stub FastBorder
|
||||
18 stub SetAttribute
|
||||
19 stub DeviceBitmapBits
|
||||
20 stub CreateBitmap
|
||||
21 stub DIBScreenBlt
|
||||
90 stub Do_Polylines
|
||||
91 stub Do_Scanlines
|
||||
92 stub SaveScreenBitmap
|
||||
101 pascal16 Inquire(ptr) DisplayInquire
|
||||
102 pascal16 SetCursor(ptr) DisplaySetCursor
|
||||
103 pascal16 MoveCursor(word word) DisplayMoveCursor
|
||||
140 stub CheckCursor
|
||||
500 pascal16 UserRepaintDisable(word) UserRepaintDisable
|
||||
600 stub InkReady
|
||||
601 stub GetLPDevice
|
||||
|
|
@ -31,7 +31,6 @@ long WINAPI stub_GDI_573(void) { FIXME(relay, "stub\n"); return 0; }
|
|||
long WINAPI stub_GDI_556(void) { FIXME(relay, "stub\n"); return 0; }
|
||||
long WINAPI stub_GDI_558(void) { FIXME(relay, "stub\n"); return 0; }
|
||||
long WINAPI stub_GDI_569(void) { FIXME(relay, "stub\n"); return 0; }
|
||||
long WINAPI stub_KERNEL_450(void) { FIXME(relay, "stub\n"); return 0; }
|
||||
long WINAPI stub_USER_489(void) { FIXME(relay, "stub\n"); return 0; }
|
||||
long WINAPI stub_USER_490(void) { FIXME(relay, "stub\n"); return 0; }
|
||||
long WINAPI stub_USER_492(void) { FIXME(relay, "stub\n"); return 0; }
|
||||
|
@ -53,4 +52,3 @@ long WINAPI stub_USER_919(void) { FIXME(relay, "stub\n"); return 0; }
|
|||
long WINAPI stub_USER_920(void) { FIXME(relay, "stub\n"); return 0; }
|
||||
long WINAPI stub_USER_922(void) { FIXME(relay, "stub\n"); return 0; }
|
||||
long WINAPI stub_USER_923(void) { FIXME(relay, "stub\n"); return 0; }
|
||||
long WINAPI stub_KERNEL_700(void) { FIXME(relay, "stub\n"); return 1; }
|
||||
|
|
|
@ -117,8 +117,8 @@ file gdi.exe
|
|||
106 pascal SetBitmapBits(word long ptr) SetBitmapBits16
|
||||
117 pascal SetDCOrg(word s_word s_word) SetDCOrg
|
||||
119 pascal16 AddFontResource(str) AddFontResource16
|
||||
#121 pascal Death
|
||||
#122 pascal ReSurRection
|
||||
121 stub Death
|
||||
122 stub ReSurRection
|
||||
123 pascal16 PlayMetaFile(word word) PlayMetaFile16
|
||||
124 pascal16 GetMetaFile(str) GetMetaFile16
|
||||
125 pascal16 CreateMetaFile(str) CreateMetaFile16
|
||||
|
@ -161,7 +161,7 @@ file gdi.exe
|
|||
191 pascal GetDCHook(word ptr) THUNK_GetDCHook
|
||||
192 pascal16 SetHookFlags(word word) SetHookFlags
|
||||
193 stub SetBoundsRect
|
||||
194 stub GetBoundsRect
|
||||
194 pascal16 GetBoundsRect(word ptr word) GetBoundsRect16
|
||||
195 stub SelectBitmap
|
||||
196 pascal16 SetMetaFileBitsBetter(word) SetMetaFileBitsBetter
|
||||
201 stub DMBITBLT
|
||||
|
@ -289,7 +289,7 @@ file gdi.exe
|
|||
460 stub GDITASKTERMINATION
|
||||
461 pascal16 SetObjectOwner(word word) SetObjectOwner16
|
||||
462 pascal16 IsGDIObject(word) IsGDIObject
|
||||
463 stub MAKEOBJECTPRIVATE
|
||||
463 pascal16 MakeObjectPrivate(word word) MakeObjectPrivate
|
||||
464 stub FIXUPBOGUSPUBLISHERMETAFILE
|
||||
465 pascal16 RectVisible(word ptr) RectVisible16
|
||||
466 pascal16 RectInRegion(word ptr) RectInRegion16
|
||||
|
@ -315,7 +315,7 @@ file gdi.exe
|
|||
485 pascal16 ScaleWindowExtEx(word s_word s_word s_word s_word ptr)
|
||||
ScaleWindowExtEx16
|
||||
486 pascal16 GetAspectRatioFilterEx(word ptr) GetAspectRatioFilterEx16
|
||||
489 pascal16 CreateDIBSection(word ptr word ptr word long) CreateDIBSection16
|
||||
489 pascal16 CreateDIBSection(word ptr word ptr long long) CreateDIBSection16
|
||||
490 stub CloseEnhMetafile
|
||||
491 stub CopyEnhMetafile
|
||||
492 stub CreateEnhMetafile
|
||||
|
@ -371,10 +371,10 @@ file gdi.exe
|
|||
556 pascal16 GDI_556() stub_GDI_556
|
||||
558 pascal16 GDI_558() stub_GDI_558
|
||||
569 pascal16 GDI_569() stub_GDI_569
|
||||
602 stub SetDIBColorTable
|
||||
603 stub GetDIBColorTable
|
||||
602 pascal16 SetDIBColorTable(word word word ptr) SetDIBColorTable16
|
||||
603 pascal16 GetDIBColorTable(word word word ptr) GetDIBColorTable16
|
||||
604 stub SetSolidBrush
|
||||
605 stub SysDeleteObject
|
||||
605 pascal16 SysDeleteObject(word) DeleteObject16 # ???
|
||||
606 stub SetMagicColors
|
||||
607 stub GetRegionData
|
||||
608 stub ExtCreateRegion
|
||||
|
|
|
@ -2,6 +2,9 @@ name kernel
|
|||
type win16
|
||||
file krnl386.exe
|
||||
|
||||
# 1-207 are the basic functions, those are (with minor variations)
|
||||
# present in win31, win95 and nt351
|
||||
|
||||
1 stub FatalExit
|
||||
2 stub ExitKernel
|
||||
3 pascal GetVersion() GetVersion16
|
||||
|
@ -102,7 +105,7 @@ file krnl386.exe
|
|||
101 stub NoHookDosCall
|
||||
102 register DOS3Call() DOS3Call
|
||||
103 register NetBIOSCall() NetBIOSCall
|
||||
104 stub GetCodeInfo
|
||||
104 pascal16 GetCodeInfo(segptr ptr) GetCodeInfo
|
||||
105 pascal16 GetExeVersion() GetExeVersion
|
||||
106 pascal SetSwapAreaSize(word) SetSwapAreaSize16
|
||||
107 pascal16 SetErrorMode(word) SetErrorMode16
|
||||
|
@ -207,26 +210,32 @@ file krnl386.exe
|
|||
205 stub CVWBreak
|
||||
206 pascal16 AllocSelectorArray(word) AllocSelectorArray
|
||||
207 pascal16 IsDBCSLeadByte(word) IsDBCSLeadByte16
|
||||
208 stub KERNEL_208
|
||||
209 stub KERNEL_209
|
||||
210 stub KERNEL_210
|
||||
211 stub KERNEL_211
|
||||
213 stub KERNEL_213
|
||||
214 stub KERNEL_214
|
||||
216 pascal RegEnumKey(long long ptr long) RegEnumKey16
|
||||
217 pascal RegOpenKey(long str ptr) RegOpenKey16
|
||||
|
||||
|
||||
# 208-237 are Win95 extensions; a few of those are also present in WinNT
|
||||
|
||||
208 pascal K208(word long long long) Local32Init
|
||||
209 pascal K209(long long word long) Local32Alloc
|
||||
210 pascal K210(long long word long long) Local32ReAlloc
|
||||
211 pascal K211(long long word) Local32Free
|
||||
213 pascal K213(long long word word) Local32Translate
|
||||
214 pascal K214(long long word) Local32Size
|
||||
215 pascal K215(long word) Local32ValidHandle # Win95 only -- CONFLICT!
|
||||
#215 stub WOWShouldWeSayWin95 # WinNT only -- CONFLICT!
|
||||
216 pascal RegEnumKey(long long ptr long) RegEnumKey16 # Both 95/NT
|
||||
217 pascal RegOpenKey(long str ptr) RegOpenKey16 # Both 95/NT
|
||||
218 pascal RegCreateKey(long str ptr) RegCreateKey16
|
||||
219 pascal RegDeleteKey(long str) RegDeleteKey16
|
||||
220 pascal RegCloseKey(long) RegCloseKey
|
||||
220 pascal RegCloseKey(long) RegCloseKey # Both 95/NT
|
||||
221 pascal RegSetValue(long str long ptr long) RegSetValue16
|
||||
222 pascal RegDeleteValue(long str) RegDeleteValue16
|
||||
223 pascal RegEnumValue(long long ptr ptr ptr ptr ptr ptr) RegEnumValue16
|
||||
223 pascal RegEnumValue(long long ptr ptr ptr ptr ptr ptr) RegEnumValue16 # Both 95/NT
|
||||
224 pascal RegQueryValue(long str ptr ptr) RegQueryValue16
|
||||
225 pascal RegQueryValueEx(long str ptr ptr ptr ptr) RegQueryValueEx16
|
||||
226 pascal RegSetValueEx(long str long long ptr long) RegSetValueEx16
|
||||
227 pascal RegFlushKey(long) RegFlushKey
|
||||
228 stub K228
|
||||
229 stub K229
|
||||
229 pascal16 K229(long) Local32GetSegment
|
||||
230 pascal GlobalSmartPageLock(word) GlobalPageLock #?
|
||||
231 stub GlobalSmartPageUnlock
|
||||
232 stub RegLoadKey
|
||||
|
@ -234,9 +243,19 @@ file krnl386.exe
|
|||
234 stub RegSaveKey
|
||||
235 stub InvalidateNlsCache
|
||||
236 stub GetProductName
|
||||
237 stub KERNEL_237
|
||||
262 stub KERNEL_262
|
||||
263 stub KERNEL_263
|
||||
237 stub K237
|
||||
|
||||
|
||||
# 262-274 are WinNT extensions; those are not present in Win95
|
||||
|
||||
262 stub WOWWaitForMsgAndEvent
|
||||
263 stub WOWMsgBox
|
||||
273 stub K273
|
||||
274 stub GetShortPathName
|
||||
|
||||
|
||||
# 310-356 are again shared between all versions
|
||||
|
||||
310 pascal16 LocalHandleDelta(word) LocalHandleDelta
|
||||
311 pascal GetSetKernelDOSProc(ptr) GetSetKernelDOSProc
|
||||
314 stub DebugDefineSegment
|
||||
|
@ -245,12 +264,11 @@ file krnl386.exe
|
|||
318 stub FatalExitHook
|
||||
319 stub FlushCachedFileHandle
|
||||
320 pascal16 IsTask(word) IsTask
|
||||
321 stub KERNEL_321
|
||||
323 return IsRomModule 2 0
|
||||
324 pascal16 LogError(word ptr) LogError
|
||||
325 pascal16 LogParamError(word ptr ptr) LogParamError
|
||||
326 return IsRomFile 2 0
|
||||
327 stub KERNEL_327
|
||||
327 register K327() LogParamErrorRegs
|
||||
328 stub _DebugOutput
|
||||
329 pascal16 K329(str word) DebugFillBuffer
|
||||
332 long THHOOK(0 0 0 0 0 0 0 0)
|
||||
|
@ -258,11 +276,11 @@ file krnl386.exe
|
|||
335 pascal16 IsBadWritePtr(segptr word) IsBadWritePtr16
|
||||
336 pascal16 IsBadCodePtr(segptr) IsBadCodePtr16
|
||||
337 pascal16 IsBadStringPtr(segptr word) IsBadStringPtr16
|
||||
338 stub HasGPHandler
|
||||
338 pascal16 HasGPHandler(segptr) HasGPHandler
|
||||
339 pascal16 DiagQuery() DiagQuery
|
||||
340 pascal16 DiagOutput(str) DiagOutput
|
||||
341 pascal ToolHelpHook(ptr) ToolHelpHook
|
||||
342 stub __GP
|
||||
342 word __GP(0 0 0 0)
|
||||
343 stub RegisterWinOldApHook
|
||||
344 stub GetWinOldApHooks
|
||||
345 pascal16 IsSharedSelector(word) IsSharedSelector
|
||||
|
@ -271,22 +289,40 @@ file krnl386.exe
|
|||
348 pascal16 hmemcpy(ptr ptr long) hmemcpy
|
||||
349 pascal _hread(word segptr long) WIN16_hread
|
||||
350 pascal _hwrite(word ptr long) _hwrite16
|
||||
#351 BUNNY_351
|
||||
351 stub BUNNY_351
|
||||
352 pascal lstrcatn(segstr str word) lstrcatn16
|
||||
353 pascal lstrcpyn(segptr str word) lstrcpyn16
|
||||
354 pascal GetAppCompatFlags(word) GetAppCompatFlags16
|
||||
355 pascal16 GetWinDebugInfo(ptr word) GetWinDebugInfo
|
||||
356 pascal16 SetWinDebugInfo(ptr) SetWinDebugInfo
|
||||
|
||||
|
||||
# 357-365 are present in Win95 only
|
||||
# Note that from here on most of the Win95-only functions are exported
|
||||
# ordinal-only; the names given here are mostly guesses :-)
|
||||
|
||||
357 pascal MapSL(segptr) MapSL
|
||||
358 pascal MapLS(long) MapLS
|
||||
359 pascal UnMapLS(segptr) UnMapLS
|
||||
360 pascal16 OpenFileEx(str ptr word) OpenFile16
|
||||
#361 PIGLET_361
|
||||
361 return PIGLET_361 0 0
|
||||
362 stub ThunkTerminateProcess
|
||||
365 stub KERNEL_365
|
||||
|
||||
|
||||
# 403-404 are common to all versions
|
||||
|
||||
403 pascal16 FarSetOwner(word word) FarSetOwner
|
||||
404 pascal16 FarGetOwner(word) FarGetOwner
|
||||
|
||||
|
||||
# 406-494 are present only in Win95
|
||||
|
||||
406 stub WritePrivateProfileStruct
|
||||
407 stub GetPrivateProfileStruct
|
||||
408 stub KERNEL_408
|
||||
409 stub KERNEL_409
|
||||
410 stub CreateProcessFromWinExec
|
||||
411 pascal GetCurrentDirectory(long ptr) GetCurrentDirectory16
|
||||
412 pascal16 SetCurrentDirectory(ptr) SetCurrentDirectory16
|
||||
413 pascal16 FindFirstFile(ptr ptr) FindFirstFile16
|
||||
|
@ -299,37 +335,76 @@ file krnl386.exe
|
|||
420 pascal GetFileAttributes(ptr) GetFileAttributes16
|
||||
421 pascal16 SetFileAttributes(ptr long) SetFileAttributes16
|
||||
422 pascal16 GetDiskFreeSpace(ptr ptr ptr ptr ptr) GetDiskFreeSpace16
|
||||
423 stub LogApiThk
|
||||
431 pascal16 IsPeFormat(str word) IsPeFormat
|
||||
432 stub FileTimeToLocalFileTime
|
||||
434 stub KERNEL_434
|
||||
435 stub KERNEL_435
|
||||
439 stub KERNEL_439
|
||||
440 stub KERNEL_440
|
||||
444 stub KERNEL_444
|
||||
445 stub KERNEL_445
|
||||
446 stub KERNEL_446
|
||||
435 stub GetTaskFlags
|
||||
436 stub _ConfirmSysLevel
|
||||
437 stub _CheckNotSysLevel
|
||||
438 stub _CreateSysLevel
|
||||
439 stub _EnterSysLevel
|
||||
440 stub _LeaveSysLevel
|
||||
441 pascal CreateThread16(ptr long segptr segptr long ptr) THUNK_CreateThread16
|
||||
442 pascal VWin32_EventCreate() VWin32_EventCreate
|
||||
443 pascal VWin32_EventDestroy(long) VWin32_EventDestroy
|
||||
444 stub KERNEL_444 # Local32 ???
|
||||
445 stub KERNEL_445 # Local32 ???
|
||||
446 stub KERNEL_446 # Local32 ???
|
||||
447 stub KERNEL_447
|
||||
448 stub KERNEL_448
|
||||
449 pascal GetpWin16Lock() GetpWin16Lock16
|
||||
450 pascal16 KERNEL_450() stub_KERNEL_450
|
||||
452 stub KERNEL_452
|
||||
453 stub KERNEL_453
|
||||
450 pascal VWin32_EventWait(long) VWin32_EventWait
|
||||
451 pascal VWin32_EventSet(long) VWin32_EventSet
|
||||
452 pascal LoadLibrary32(str) LoadLibrary32A
|
||||
453 pascal GetProcAddress32(long str) GetProcAddress32
|
||||
454 equate __FLATCS 0 # initialized by BUILTIN_Init()
|
||||
455 equate __FLATDS 0 # initialized by BUILTIN_Init()
|
||||
471 pascal KERNEL_471() _KERNEL_471
|
||||
472 register KERNEL_472() _KERNEL_472
|
||||
473 stub KERNEL_473
|
||||
475 register KERNEL_475() _KERNEL_475
|
||||
480 stub KERNEL_480
|
||||
481 stub KERNEL_481
|
||||
482 pascal LoadLibrary32(str) LoadLibrary32A
|
||||
456 pascal DefResourceHandler(word word word) NE_DefResourceHandler
|
||||
457 pascal CreateW32Event(long long) WIN16_CreateEvent
|
||||
458 pascal SetW32Event(long) SetEvent
|
||||
459 pascal ResetW32Event(long) ResetEvent
|
||||
460 pascal WaitForSingleObject(long long) WIN16_WaitForSingleObject
|
||||
461 pascal WaitForMultipleObjects(long ptr long long) WIN16_WaitForMultipleObjects
|
||||
462 pascal GetCurrentThreadId() GetCurrentThreadId
|
||||
463 pascal SetThreadQueue(long word) SetThreadQueue
|
||||
464 pascal GetThreadQueue(long) GetThreadQueue
|
||||
465 stub NukeProcess
|
||||
466 stub ExitProcess
|
||||
467 stub WOACreateConsole
|
||||
468 stub WOASpawnConApp
|
||||
469 stub WOAGimmeTitle
|
||||
470 stub WOADestroyConsole
|
||||
471 pascal GetCurrentProcessId() GetCurrentProcessId
|
||||
472 register MapHInstLS() WIN16_MapHInstLS
|
||||
473 register MapHInstSL() WIN16_MapHInstSL
|
||||
474 pascal CloseW32Handle(long) CloseHandle
|
||||
475 register GetTEBSelectorFS() GetTEBSelectorFS
|
||||
476 pascal ConvertToGlobalHandle(long) ConvertToGlobalHandle
|
||||
477 stub WOAFullScreen
|
||||
478 stub WOATerminateProcess
|
||||
479 pascal KERNEL_479(long) VWin32_EventSet # ???
|
||||
480 pascal16 _EnterWin16Lock() SYSLEVEL_EnterWin16Lock
|
||||
481 pascal16 _LeaveWin16Lock() SYSLEVEL_LeaveWin16Lock
|
||||
482 pascal LoadSystemLibrary32(str) LoadLibrary32A # FIXME!
|
||||
483 pascal GetModuleFileName32(long str long) GetModuleFileName32A
|
||||
484 pascal SetProcessDWORD(long s_word long) SetProcessDword
|
||||
485 pascal GetProcessDWORD(long s_word) GetProcessDword
|
||||
486 stub KERNEL_486
|
||||
486 pascal FreeLibrary32(long) FreeLibrary32
|
||||
487 stub MapProcessHandle
|
||||
488 pascal GetModuleHandle32(str) GetModuleHandle32A
|
||||
489 stub KERNEL_489 # VWin32_BoostWithDecay
|
||||
490 stub KERNEL_490
|
||||
491 stub RegisterServiceProcess
|
||||
492 stub WOAAbort
|
||||
493 stub UTInit
|
||||
494 stub KERNEL_494
|
||||
|
||||
|
||||
# 500-544 are WinNT extensions; some are also available in Win95
|
||||
|
||||
# Those stubs can be found in WindowNT3.51 krnl386.exe. Some are used by Win95
|
||||
# too, some seem to specify different functions in Win95... Ugh.
|
||||
500 pascal WOW16Call(word word word) WOW16Call
|
||||
501 stub KDDBGOUT
|
||||
501 stub KDDBGOUT # Both NT/95 (?)
|
||||
502 stub WOWGETNEXTVDMCOMMAND
|
||||
503 stub WOWREGISTERSHELLWINDOWHANDLE
|
||||
504 stub WOWLOADMODULE
|
||||
|
@ -340,14 +415,14 @@ file krnl386.exe
|
|||
509 stub WOWKILLREMOTETASK
|
||||
511 stub WOWKILLREMOTETASK
|
||||
512 stub WOWQUERYDEBUG
|
||||
513 pascal LoadLibraryEx32W(ptr long long) LoadLibraryEx32W16
|
||||
514 pascal16 FreeLibrary32W(long) FreeLibrary32
|
||||
515 pascal GetProcAddress32W(long str) GetProcAddress32
|
||||
516 pascal GetVDMPointer32W(segptr long) GetVDMPointer32W
|
||||
517 pascal CallProc32W() WIN16_CallProc32W
|
||||
518 pascal CallProcEx32W() WIN16_CallProcEx32W
|
||||
513 pascal LoadLibraryEx32W(ptr long long) LoadLibraryEx32W16 # Both NT/95
|
||||
514 pascal16 FreeLibrary32W(long) FreeLibrary32 # Both NT/95
|
||||
515 pascal GetProcAddress32W(long str) GetProcAddress32 # Both NT/95
|
||||
516 pascal GetVDMPointer32W(segptr long) GetVDMPointer32W # Both NT/95
|
||||
517 pascal CallProc32W() WIN16_CallProc32W # Both NT/95
|
||||
518 pascal CallProcEx32W() WIN16_CallProcEx32W # Both NT/95
|
||||
519 stub EXITKERNELTHUNK
|
||||
# the __MOD_ variables are WORD datareferences.
|
||||
# the __MOD_ variables are WORD datareferences, the current values are invented.
|
||||
520 equate __MOD_KERNEL 4200
|
||||
521 equate __MOD_DKERNEL 4201
|
||||
522 equate __MOD_USER 4203
|
||||
|
@ -361,25 +436,83 @@ file krnl386.exe
|
|||
530 equate __MOD_TOOLHELP 4211
|
||||
531 equate __MOD_MMEDIA 4212
|
||||
532 equate __MOD_COMMDLG 4213
|
||||
540 stub KERNEL_540
|
||||
541 stub WOWSETEXITONLASTAPP
|
||||
544 stub WOWSETCOMPATHANDLE
|
||||
|
||||
600 stub KERNEL_600
|
||||
601 stub KERNEL_601
|
||||
604 stub KERNEL_604
|
||||
605 stub KERNEL_605
|
||||
606 stub KERNEL_606
|
||||
607 pascal KERNEL_607(long long long) _KERNEL_607
|
||||
608 pascal KERNEL_608(long long long) _KERNEL_608
|
||||
611 pascal KERNEL_611(long long) _KERNEL_611
|
||||
612 stub KERNEL_612
|
||||
613 stub KERNEL_613
|
||||
614 stub KERNEL_614
|
||||
619 pascal KERNEL_619(word long long) _KERNEL_619
|
||||
621 stub KERNEL_621
|
||||
|
||||
# 531-568 are Win95-only extensions.
|
||||
# NOTE: Ordinals 531,532,541 clash with the WinNT extensions given above! Argh!
|
||||
|
||||
#531 stub ConvertClipboardHandleLS
|
||||
#532 stub ConvertClipboardHandleSL
|
||||
533 stub ConvertDDEHandleLS
|
||||
534 stub ConvertDDEHandleSL
|
||||
535 pascal VWin32_BoostThreadGroup(long long) VWin32_BoostThreadGroup
|
||||
536 pascal VWin32_BoostThreadStatic(long long) VWin32_BoostThreadStatic
|
||||
537 stub KERNEL_537
|
||||
538 stub ThunkTheTemplateHandle
|
||||
540 stub KERNEL_540
|
||||
#541 stub KERNEL_541
|
||||
542 stub KERNEL_542
|
||||
543 stub KERNEL_543
|
||||
560 stub KERNEL_560 # (thunklet) # InitThunkletHandler
|
||||
561 stub KERNEL_561 # (thunklet) # AllocLSThunklet
|
||||
562 stub KERNEL_562 # (thunklet) # AllocSLThunklet
|
||||
563 stub KERNEL_563 # (thunklet) # FindSLThunklet
|
||||
564 stub KERNEL_564 # (thunklet) # FindLSThunklet
|
||||
565 stub KERNEL_565 # (thunklet) # AllocLSThunklet_Special
|
||||
566 stub KERNEL_566 # (thunklet) # AllocSLThunklet_Special
|
||||
567 stub KERNEL_567 # (thunklet) # AllocLSThunkletEx
|
||||
568 stub KERNEL_568 # (thunklet) # AllocSLThunkletEx
|
||||
|
||||
|
||||
# 600-653 are Win95 only
|
||||
|
||||
600 stub KERNEL_600 # AllocSelector (?)
|
||||
601 stub KERNEL_601 # FreeSelector (?)
|
||||
602 stub GetCurrentHInstanceDS
|
||||
603 stub KERNEL_603 # OutputDebugString (?)
|
||||
604 stub KERNEL_604 # (cbclient) # Thunk_CBClient
|
||||
605 stub KERNEL_605 # (thunklet) # AllocSLThunklet
|
||||
606 stub KERNEL_606 # (thunklet) # AllocLSThunklet
|
||||
607 pascal KERNEL_607(long long long) _KERNEL_607 # AllocLSThunklet_Systhunk
|
||||
608 pascal KERNEL_608(long long long) _KERNEL_608 # AllocSLThunklet_Systhunk
|
||||
609 stub KERNEL_609 # (thunklet) # FindSLThunklet
|
||||
610 stub KERNEL_610 # (thunklet) # FindLSThunklet
|
||||
611 pascal16 KERNEL_611(long long) _KERNEL_611 # FreeThunklet
|
||||
612 pascal16 KERNEL_612(ptr) _KERNEL_612 # IsSLThunklet
|
||||
613 stub KERNEL_613 # (cbclient)
|
||||
614 stub KERNEL_614 # (cbclient)
|
||||
615 stub KERNEL_615 # (cbclient)
|
||||
616 stub KERNEL_616 # (cbclient)
|
||||
617 stub KERNEL_617 # (cbclient)
|
||||
618 stub KERNEL_618 # (cbclient)
|
||||
619 pascal16 RegisterCBClient(word long long) RegisterCBClient
|
||||
620 stub KERNEL_620 # (cbclient)
|
||||
621 stub KERNEL_621 # (cbclient)
|
||||
622 stub UnRegisterCBClient
|
||||
623 pascal16 InitCBClient(long) InitCBClient
|
||||
624 pascal SetFastQueue(long long) SetFastQueue
|
||||
625 pascal GetFastQueue() GetFastQueue
|
||||
626 stub SmashEnvironment
|
||||
627 stub IsBadFlatReadWritePtr
|
||||
630 register C16ThkSL() C16ThkSL
|
||||
631 register C16ThkSL01() C16ThkSL01
|
||||
651 pascal ThunkConnect16(str str word long ptr str word) ThunkConnect16
|
||||
700 pascal KERNEL_700() stub_KERNEL_700
|
||||
652 stub IsThreadId
|
||||
653 stub OkWithKernelToChangeUsers
|
||||
|
||||
|
||||
# 700-704 are Win95 only
|
||||
|
||||
700 pascal SSInit() SSInit
|
||||
701 stub SSOnBigStack
|
||||
702 stub SSCall
|
||||
703 stub CallProc32WFix
|
||||
704 stub SSConfirmSmallStack
|
||||
|
||||
|
||||
# Win95 krnl386.exe also exports ordinals 802-864,
|
||||
# however, those seem to be only callback stubs that are
|
||||
# never called directly by other modules ...
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
name keyboard
|
||||
type win16
|
||||
|
||||
#1 pascal Inquire
|
||||
#2 pascal Enable
|
||||
#3 pascal Disable
|
||||
1 pascal16 Inquire(ptr) KeyboardInquire
|
||||
2 pascal16 Enable(segptr ptr) KeyboardEnable
|
||||
3 pascal16 Disable() KeyboardDisable
|
||||
4 pascal16 ToAscii(word word ptr ptr word) ToAscii16
|
||||
5 pascal16 AnsiToOem(str ptr) AnsiToOem16
|
||||
6 pascal16 OemToAnsi(str ptr) OemToAnsi16
|
||||
|
|
|
@ -49,7 +49,7 @@ type win16
|
|||
301 pascal midiInGetNumDevs() midiInGetNumDevs16
|
||||
302 pascal midiInGetDevCaps(word ptr word) midiInGetDevCaps16
|
||||
303 pascal midiInGetErrorText(word ptr word) midiInGetErrorText16
|
||||
304 pascal midiInOpen(ptr word ptr long long long) midiInOpen16
|
||||
304 pascal midiInOpen(ptr word long long long) midiInOpen16
|
||||
305 pascal midiInClose(word) midiInClose16
|
||||
306 pascal midiInPrepareHeader(word ptr word) midiInPrepareHeader16
|
||||
307 pascal midiInUnprepareHeader(word ptr word) midiInUnprepareHeader16
|
||||
|
@ -155,7 +155,7 @@ type win16
|
|||
1213 pascal mmioWrite(word ptr long) mmioWrite16
|
||||
1214 pascal mmioSeek(word long word) mmioSeek16
|
||||
1215 pascal mmioGetInfo(word ptr word) mmioGetInfo16
|
||||
1216 pascal MMIOSETINFO(word ptr word) mmioSetInfo
|
||||
1216 pascal MMIOSETINFO(word ptr word) mmioSetInfo16
|
||||
1217 pascal MMIOSETBUFFER(word ptr long word) mmioSetBuffer
|
||||
1218 pascal mmioFlush(word word) mmioFlush16
|
||||
1219 pascal mmioAdvance(word ptr word) mmioAdvance16
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
name mouse
|
||||
type win16
|
||||
|
||||
1 stub INQUIRE
|
||||
2 stub ENABLE
|
||||
3 stub DISABLE
|
||||
1 pascal16 Inquire(ptr) MouseInquire
|
||||
2 pascal16 Enable(segptr) MouseEnable
|
||||
3 pascal16 Disable() MouseDisable
|
||||
4 stub MOUSEGETINTVECT
|
||||
5 stub GETSETMOUSEDATA
|
||||
#Control Panel thinks this is implemented if it is available
|
||||
|
|
|
@ -425,6 +425,7 @@ static DWORD RELAY_CallProc32W(int Ex)
|
|||
DWORD *args, ret;
|
||||
VA_LIST16 valist;
|
||||
int i;
|
||||
int aix;
|
||||
dbg_decl_str(relay, 1024);
|
||||
|
||||
VA_START16( valist );
|
||||
|
@ -434,17 +435,23 @@ static DWORD RELAY_CallProc32W(int Ex)
|
|||
dsprintf(relay, "CallProc32W(%ld,%ld,%p, Ex%d args[",nrofargs,argconvmask,proc32,Ex);
|
||||
args = (DWORD*)HEAP_xalloc( GetProcessHeap(), 0,
|
||||
sizeof(DWORD)*nrofargs );
|
||||
/* CallProcEx doesn't need its args reversed */
|
||||
for (i=0;i<nrofargs;i++) {
|
||||
if (Ex) {
|
||||
aix = i;
|
||||
} else {
|
||||
aix = nrofargs - i - 1;
|
||||
}
|
||||
if (argconvmask & (1<<i))
|
||||
{
|
||||
SEGPTR ptr = VA_ARG16( valist, SEGPTR );
|
||||
args[nrofargs-i-1] = (DWORD)PTR_SEG_TO_LIN(ptr);
|
||||
args[aix] = (DWORD)PTR_SEG_TO_LIN(ptr);
|
||||
dsprintf(relay,"%08lx(%p),",ptr,PTR_SEG_TO_LIN(ptr));
|
||||
}
|
||||
else
|
||||
{
|
||||
args[nrofargs-i-1] = VA_ARG16( valist, DWORD );
|
||||
dsprintf(relay,"%ld,",args[nrofargs-i-1]);
|
||||
args[aix] = VA_ARG16( valist, DWORD );
|
||||
dsprintf(relay,"%ld,",args[aix]);
|
||||
}
|
||||
}
|
||||
dsprintf(relay,"])");
|
||||
|
|
|
@ -32,7 +32,7 @@ type win16
|
|||
102 pascal16 RegisterShellHook(word word) RegisterShellHook
|
||||
103 pascal ShellHookProc(word word long) ShellHookProc
|
||||
|
||||
# 157 RESTARTDIALOG
|
||||
157 stub RESTARTDIALOG
|
||||
# 166 PICKICONDLG
|
||||
|
||||
262 pascal16 DriveType(long) GetDriveType16
|
||||
|
|
|
@ -566,6 +566,28 @@ FARPROC16 WINAPI THUNK_SetTaskSignalProc( HTASK16 hTask, FARPROC16 proc )
|
|||
return defSignalProc16;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* THUNK_CreateThread16 (KERNEL.441)
|
||||
*/
|
||||
static DWORD CALLBACK THUNK_StartThread16( LPVOID threadArgs )
|
||||
{
|
||||
FARPROC16 start = ((FARPROC16 *)threadArgs)[0];
|
||||
DWORD param = ((DWORD *)threadArgs)[1];
|
||||
HeapFree( GetProcessHeap(), 0, threadArgs );
|
||||
|
||||
return CallTo16_long_l( start, param );
|
||||
}
|
||||
HANDLE32 WINAPI THUNK_CreateThread16( SECURITY_ATTRIBUTES *sa, DWORD stack,
|
||||
FARPROC16 start, SEGPTR param,
|
||||
DWORD flags, LPDWORD id )
|
||||
{
|
||||
DWORD *threadArgs = HeapAlloc( GetProcessHeap(), 0, 2*sizeof(DWORD) );
|
||||
if (!threadArgs) return INVALID_HANDLE_VALUE32;
|
||||
threadArgs[0] = (DWORD)start;
|
||||
threadArgs[1] = (DWORD)param;
|
||||
|
||||
return CreateThread( sa, stack, THUNK_StartThread16, threadArgs, flags, id );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* THUNK_WOWCallback16Ex (WOW32.3)(KERNEL32.55)
|
||||
|
@ -783,7 +805,7 @@ void WINAPI C16ThkSL(CONTEXT *context)
|
|||
|
||||
*x++ = 0xB8; *((WORD *)x)++ = ds;
|
||||
*x++ = 0x8E; *x++ = 0xC0;
|
||||
*x++ = 0x60; *x++ = 0x0F; *x++ = 0xB7; *x++ = 0xC9;
|
||||
*x++ = 0x66; *x++ = 0x0F; *x++ = 0xB7; *x++ = 0xC9;
|
||||
*x++ = 0x67; *x++ = 0x66; *x++ = 0x26; *x++ = 0x8B;
|
||||
*x++ = 0x91; *((DWORD *)x)++ = EDX_reg(context);
|
||||
|
||||
|
|
|
@ -431,7 +431,7 @@ file user.exe
|
|||
473 pascal AnsiPrev(segptr segptr) AnsiPrev16
|
||||
475 pascal16 SetScrollInfo(word s_word ptr word) SetScrollInfo16
|
||||
476 pascal16 GetScrollInfo(word s_word ptr) GetScrollInfo16
|
||||
477 stub GetKeyboardLayoutName
|
||||
477 pascal16 GetKeyboardLayoutName(ptr) GetKeyboardLayoutName16
|
||||
478 stub LoadKeyboardLayout
|
||||
479 stub MenuItemFromPoint
|
||||
480 stub GetUserLocalObjType
|
||||
|
|
|
@ -4,5 +4,5 @@ type win16
|
|||
1 pascal16 GetASPISupportInfo() GetASPISupportInfo16
|
||||
2 pascal16 SendASPICommand(segptr) SendASPICommand16
|
||||
3 stub INSERTINASPICHAIN
|
||||
4 pascal GETASPIDLLVERSION() GetASPIDLLVersion
|
||||
4 pascal GETASPIDLLVERSION() GetASPIDLLVersion16
|
||||
5 stub ___EXPORTEDSTUB
|
||||
|
|
|
@ -281,9 +281,12 @@ type win16
|
|||
#
|
||||
#400+VXD_ID register <VxD handler>() <VxD handler>
|
||||
#
|
||||
401 register VXD_VMM() VXD_VMM
|
||||
405 register VXD_Timer() VXD_Timer
|
||||
414 register VXD_Comm() VXD_Comm
|
||||
#415 register VXD_Printer() VXD_Printer
|
||||
423 register VXD_Shell() VXD_Shell
|
||||
433 register VXD_PageFile() VXD_PageFile
|
||||
445 register VXD_Win32s() VXD_Win32s
|
||||
451 register VXD_ConfigMG() VXD_ConfigMG
|
||||
1490 register VXD_TimerAPI() VXD_TimerAPI
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
/* Define if X libraries are not reentrant (compiled without -D_REENTRANT). */
|
||||
#undef NO_REENTRANT_X11
|
||||
|
||||
/* Define if libc is not reentrant */
|
||||
#undef NO_REENTRANT_LIBC
|
||||
|
||||
/* Define if all debug messages are to be compiled out */
|
||||
#undef NO_DEBUG_MSGS
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
|
||||
typedef struct tagANIMATE_INFO
|
||||
{
|
||||
DWORD dwDummy;
|
||||
LPVOID lpAvi; /* pointer to avi data */
|
||||
HFILE32 hFile; /* handle to avi file */
|
||||
} ANIMATE_INFO;
|
||||
|
||||
|
||||
|
|
183
include/aspi.h
183
include/aspi.h
|
@ -1,3 +1,5 @@
|
|||
/* ASPI definitions used for both WNASPI16 and WNASPI32 */
|
||||
|
||||
#if !defined(ASPI_H)
|
||||
#define ASPI_H
|
||||
|
||||
|
@ -22,6 +24,7 @@
|
|||
#define SC_ABORT_SRB 0x03
|
||||
#define SC_RESET_DEV 0x04
|
||||
|
||||
|
||||
/* Host adapter status codes */
|
||||
#define HASTAT_OK 0x00
|
||||
#define HASTAT_SEL_TO 0x11
|
||||
|
@ -35,139 +38,81 @@
|
|||
#define STATUS_BUSY 0x08
|
||||
#define STATUS_RESCONF 0x18
|
||||
|
||||
#ifdef linux
|
||||
|
||||
typedef union SRB16 * LPSRB16;
|
||||
|
||||
struct SRB_HaInquiry16 {
|
||||
BYTE SRB_cmd;
|
||||
BYTE SRB_Status;
|
||||
BYTE SRB_HaId;
|
||||
BYTE SRB_Flags;
|
||||
WORD SRB_55AASignature;
|
||||
WORD SRB_ExtBufferSize;
|
||||
BYTE HA_Count;
|
||||
BYTE HA_SCSI_ID;
|
||||
BYTE HA_ManagerId[16];
|
||||
BYTE HA_Identifier[16];
|
||||
BYTE HA_Unique[16];
|
||||
BYTE HA_ExtBuffer[4];
|
||||
} WINE_PACKED;
|
||||
|
||||
typedef struct SRB_HaInquiry16 SRB_HaInquiry16;
|
||||
|
||||
struct SRB_ExecSCSICmd16 {
|
||||
BYTE SRB_Cmd; /* ASPI command code (W) */
|
||||
BYTE SRB_Status; /* ASPI command status byte (R) */
|
||||
BYTE SRB_HaId; /* ASPI host adapter number (W) */
|
||||
BYTE SRB_Flags; /* ASPI request flags (W) */
|
||||
DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 (-) */
|
||||
BYTE SRB_Target; /* Target's SCSI ID (W) */
|
||||
BYTE SRB_Lun; /* Target's LUN number (W) */
|
||||
DWORD SRB_BufLen; /* Data Allocation LengthPG (W/R)*/
|
||||
BYTE SRB_SenseLen; /* Sense Allocation Length (W) */
|
||||
SEGPTR SRB_BufPointer; /* Data Buffer Pointer (W) */
|
||||
DWORD SRB_Rsvd1; /* Reserved, MUST = 0 (-/W)*/
|
||||
BYTE SRB_CDBLen; /* CDB Length = 6 (W) */
|
||||
BYTE SRB_HaStat; /* Host Adapter Status (R) */
|
||||
BYTE SRB_TargStat; /* Target Status (R) */
|
||||
FARPROC16 SRB_PostProc; /* Post routine (W) */
|
||||
BYTE SRB_Rsvd2[34]; /* Reserved, MUST = 0 */
|
||||
BYTE CDBByte[0]; /* SCSI CBD - variable length (W) */
|
||||
/* variable example for 6 byte cbd
|
||||
* BYTE CDBByte[6]; * SCSI CDB (W) *
|
||||
* BYTE SenseArea6[SENSE_LEN]; * Request Sense buffer (R) *
|
||||
/* This is a duplicate of the sg_header from /usr/src/linux/include/scsi/sg.h
|
||||
* kernel 2.0.30
|
||||
* This will probably break at some point, but for those who don't have
|
||||
* kernels installed, I think this should still work.
|
||||
*
|
||||
*/
|
||||
} WINE_PACKED ;
|
||||
|
||||
typedef struct SRB_ExecSCSICmd16 SRB_ExecSCSICmd16;
|
||||
|
||||
struct SRB_ExecSCSICmd32 {
|
||||
BYTE SRB_Cmd; /* ASPI command code = SC_EXEC_SCSI_CMD */
|
||||
BYTE SRB_Status; /* ASPI command status byte */
|
||||
BYTE SRB_HaId; /* ASPI host adapter number */
|
||||
BYTE SRB_Flags; /* ASPI request flags */
|
||||
DWORD SRB_Hdr_Rsvd; /* Reserved */
|
||||
BYTE SRB_Target; /* Target's SCSI ID */
|
||||
BYTE SRB_Lun; /* Target's LUN number */
|
||||
WORD SRB_Rsvd1; /* Reserved for Alignment */
|
||||
DWORD SRB_BufLen; /* Data Allocation Length */
|
||||
BYTE *SRB_BufPointer; /* Data Buffer Point */
|
||||
BYTE SRB_SenseLen; /* Sense Allocation Length */
|
||||
BYTE SRB_CDBLen; /* CDB Length */
|
||||
BYTE SRB_HaStat; /* Host Adapter Status */
|
||||
BYTE SRB_TargStat; /* Target Status */
|
||||
void (*SRB_PostProc)(); /* Post routine */
|
||||
void *SRB_Rsvd2; /* Reserved */
|
||||
BYTE SRB_Rsvd3[16]; /* Reserved for expansion */
|
||||
BYTE CDBByte[16]; /* SCSI CDB */
|
||||
BYTE SenseArea[0]; /* Request sense buffer - var length */
|
||||
struct sg_header
|
||||
{
|
||||
int pack_len; /* length of incoming packet <4096 (including header) */
|
||||
int reply_len; /* maximum length <4096 of expected reply */
|
||||
int pack_id; /* id number of packet */
|
||||
int result; /* 0==ok, otherwise refer to errno codes */
|
||||
unsigned int twelve_byte:1; /* Force 12 byte command length for group 6 & 7
|
||||
commands */
|
||||
unsigned int other_flags:31; /* for future use */
|
||||
unsigned char sense_buffer[16]; /* used only by reads */
|
||||
/* command follows then data for command */
|
||||
};
|
||||
|
||||
typedef struct SRB_ExecSCSICmd32 SRB_ExecSCSICmd32;
|
||||
#define SCSI_OFF sizeof(struct sg_header)
|
||||
#endif
|
||||
|
||||
struct SRB_Abort16 {
|
||||
BYTE SRB_Cmd; /* ASPI command code = SC_ABORT_SRB */
|
||||
BYTE SRB_Status; /* ASPI command status byte */
|
||||
BYTE SRB_HaId; /* ASPI host adapter number */
|
||||
BYTE SRB_Flags; /* ASPI request flags */
|
||||
DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
|
||||
LPSRB16 SRB_ToAbort; /* Pointer to SRB to abort */
|
||||
} WINE_PACKED;
|
||||
#define ASPI_POSTING(prb) (prb->SRB_Flags & 0x1)
|
||||
|
||||
typedef struct SRB_Abort16 SRB_Abort16;
|
||||
#define HOST_TO_TARGET(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x2)
|
||||
#define TARGET_TO_HOST(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x1)
|
||||
#define NO_DATA_TRANSFERED(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x3)
|
||||
|
||||
struct SRB_BusDeviceReset16 {
|
||||
BYTE SRB_Cmd; /* ASPI command code = SC_RESET_DEV */
|
||||
BYTE SRB_Status; /* ASPI command status byte */
|
||||
BYTE SRB_HaId; /* ASPI host adapter number */
|
||||
BYTE SRB_Flags; /* ASPI request flags */
|
||||
DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
|
||||
BYTE SRB_Target; /* Target's SCSI ID */
|
||||
BYTE SRB_Lun; /* Target's LUN number */
|
||||
BYTE SRB_ResetRsvd1[14]; /* Reserved, MUST = 0 */
|
||||
BYTE SRB_HaStat; /* Host Adapter Status */
|
||||
BYTE SRB_TargStat; /* Target Status */
|
||||
SEGPTR SRB_PostProc; /* Post routine */
|
||||
BYTE SRB_ResetRsvd2[34]; /* Reserved, MUST = 0 */
|
||||
} WINE_PACKED;
|
||||
#define SRB_ENABLE_RESIDUAL_COUNT 0x4
|
||||
#define SRB_EVENT_NOTIFY 0x40 /* Enable ASPI event notification */
|
||||
|
||||
typedef struct SRB_BusDeviceReset16 SRB_BusDeviceReset16;
|
||||
#define INQUIRY_VENDOR 8
|
||||
|
||||
struct SRB_GDEVBlock16 {
|
||||
BYTE SRB_Cmd; /* ASPI command code = SC_GET_DEV_TYPE */
|
||||
BYTE SRB_Status; /* ASPI command status byte */
|
||||
BYTE SRB_HaId; /* ASPI host adapter number */
|
||||
BYTE SRB_Flags; /* ASPI request flags */
|
||||
DWORD SRB_Hdr_Rsvd; /* Reserved, MUST = 0 */
|
||||
BYTE SRB_Target; /* Target's SCSI ID */
|
||||
BYTE SRB_Lun; /* Target's LUN number */
|
||||
BYTE SRB_DeviceType; /* Target's peripheral device type */
|
||||
} WINE_PACKED;
|
||||
#define MUSTEK_SCSI_AREA_AND_WINDOWS 0x04
|
||||
#define MUSTEK_SCSI_READ_SCANNED_DATA 0x08
|
||||
#define MUSTEK_SCSI_GET_IMAGE_STATUS 0x0f
|
||||
#define MUSTEK_SCSI_ADF_AND_BACKTRACE 0x10
|
||||
#define MUSTEK_SCSI_CCD_DISTANCE 0x11
|
||||
#define MUSTEK_SCSI_START_STOP 0x1b
|
||||
|
||||
typedef struct SRB_GDEVBlock16 SRB_GDEVBlock16;
|
||||
#define CMD_TEST_UNIT_READY 0x00
|
||||
#define CMD_REQUEST_SENSE 0x03
|
||||
#define CMD_INQUIRY 0x12
|
||||
|
||||
/* scanner commands - just for debug */
|
||||
#define CMD_SCAN_GET_DATA_BUFFER_STATUS 0x34
|
||||
#define CMD_SCAN_GET_WINDOW 0x25
|
||||
#define CMD_SCAN_OBJECT_POSITION 0x31
|
||||
#define CMD_SCAN_READ 0x28
|
||||
#define CMD_SCAN_RELEASE_UNIT 0x17
|
||||
#define CMD_SCAN_RESERVE_UNIT 0x16
|
||||
#define CMD_SCAN_SCAN 0x1b
|
||||
#define CMD_SCAN_SEND 0x2a
|
||||
#define CMD_SCAN_CHANGE_DEFINITION 0x40
|
||||
|
||||
#define INQURIY_CMDLEN 6
|
||||
#define INQURIY_REPLY_LEN 96
|
||||
#define INQUIRY_VENDOR 8
|
||||
|
||||
#define SENSE_BUFFER(prb) (&prb->CDBByte[prb->SRB_CDBLen])
|
||||
|
||||
|
||||
|
||||
struct SRB_Common16 {
|
||||
BYTE SRB_cmd;
|
||||
/* Just a container for seeing what devices are open */
|
||||
struct ASPI_DEVICE_INFO {
|
||||
struct ASPI_DEVICE_INFO * next;
|
||||
int fd;
|
||||
int hostId;
|
||||
int target;
|
||||
int lun;
|
||||
};
|
||||
|
||||
|
||||
typedef struct SRB_Common16 SRB_Common16;
|
||||
|
||||
|
||||
union SRB16 {
|
||||
SRB_Common16 common;
|
||||
SRB_HaInquiry16 inquiry;
|
||||
SRB_ExecSCSICmd16 cmd;
|
||||
SRB_Abort16 abort;
|
||||
SRB_BusDeviceReset16 reset;
|
||||
SRB_GDEVBlock16 devtype;
|
||||
};
|
||||
|
||||
typedef union SRB16 SRB16;
|
||||
|
||||
|
||||
|
||||
typedef struct ASPI_DEVICE_INFO ASPI_DEVICE_INFO;
|
||||
static ASPI_DEVICE_INFO *ASPI_open_devices = NULL;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -30,6 +30,7 @@ static const char * const SHELL_People[] =
|
|||
"Carsten Fallesen",
|
||||
"Paul Falstad",
|
||||
"David Faure",
|
||||
"Wesley Filardo",
|
||||
"Claus Fischer",
|
||||
"Olaf Flebbe",
|
||||
"Chad Fraleigh",
|
||||
|
@ -47,6 +48,7 @@ static const char * const SHELL_People[] =
|
|||
"Jochen Hoenicke",
|
||||
"Onno Hovers",
|
||||
"Jeffrey Hsu",
|
||||
"Peter Hunnisett",
|
||||
"Miguel de Icaza",
|
||||
"Jukka Iivonen",
|
||||
"Lee Jaekil",
|
||||
|
@ -89,6 +91,7 @@ static const char * const SHELL_People[] =
|
|||
"Dimitrie O. Paun",
|
||||
"Jim Peterson",
|
||||
"Robert Pouliot",
|
||||
"Petter Reinholdtsen",
|
||||
"Keith Reynolds",
|
||||
"Slaven Rezic",
|
||||
"John Richardson",
|
||||
|
|
|
@ -429,12 +429,13 @@ BOOL32 WINAPI ImageList_Write (HIMAGELIST, LPSTREAM32);
|
|||
#define HDM_SETIMAGELIST (HDM_FIRST+8)
|
||||
#define HDM_GETIMAGELIST (HDM_FIRST+9)
|
||||
|
||||
|
||||
#define HDM_ORDERTOINDEX (HDM_FIRST+15)
|
||||
#define HDM_CREATEDRAGIMAGE (HDM_FIRST+16)
|
||||
#define HDM_GETORDERARRAY (HDM_FIRST+17)
|
||||
#define HDM_SETORDERARRAY (HDM_FIRST+18)
|
||||
#define HDM_SETHOTDIVIDER (HDM_FIRST+19)
|
||||
#define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
|
||||
#define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
|
||||
|
||||
#define HDN_FIRST (0U-300U)
|
||||
#define HDN_LAST (0U-399U)
|
||||
|
@ -468,7 +469,6 @@ BOOL32 WINAPI ImageList_Write (HIMAGELIST, LPSTREAM32);
|
|||
#define HDN_BEGINDRACK (HDN_FIRST-10)
|
||||
#define HDN_ENDDRACK (HDN_FIRST-11)
|
||||
|
||||
|
||||
typedef struct _HD_LAYOUT
|
||||
{
|
||||
RECT32 *prc;
|
||||
|
@ -477,7 +477,7 @@ typedef struct _HD_LAYOUT
|
|||
|
||||
#define HD_LAYOUT HDLAYOUT
|
||||
|
||||
typedef struct _HD_ITEMA
|
||||
typedef struct _HD_ITEM32A
|
||||
{
|
||||
UINT32 mask;
|
||||
INT32 cxy;
|
||||
|
@ -490,7 +490,7 @@ typedef struct _HD_ITEMA
|
|||
INT32 iOrder;
|
||||
} HDITEM32A, *LPHDITEM32A;
|
||||
|
||||
typedef struct _HD_ITEMW
|
||||
typedef struct _HD_ITEM32W
|
||||
{
|
||||
UINT32 mask;
|
||||
INT32 cxy;
|
||||
|
@ -519,48 +519,91 @@ typedef struct _HD_HITTESTINFO
|
|||
|
||||
#define HD_HITTESTINFO HDHITTESTINFO
|
||||
|
||||
typedef struct tagNMHEADERA
|
||||
typedef struct tagNMHEADER32A
|
||||
{
|
||||
NMHDR hdr;
|
||||
INT32 iItem;
|
||||
INT32 iButton;
|
||||
HDITEM32A *pitem;
|
||||
} NMHEADERA, *LPNMHEADERA;
|
||||
} NMHEADER32A, *LPNMHEADER32A;
|
||||
|
||||
typedef struct tagNMHEADER32W
|
||||
{
|
||||
NMHDR hdr;
|
||||
INT32 iItem;
|
||||
INT32 iButton;
|
||||
HDITEM32W *pitem;
|
||||
} NMHEADER32W, *LPNMHEADER32W;
|
||||
|
||||
#define NMHEADER WINELIB_NAME_AW(NMHEADER)
|
||||
#define LPNMHEADER WINELIB_NAME_AW(LPNMHEADER)
|
||||
|
||||
typedef struct tagNMHDDISPINFO32A
|
||||
{
|
||||
NMHDR hdr;
|
||||
INT32 iItem;
|
||||
UINT32 mask;
|
||||
LPSTR pszText;
|
||||
INT32 cchTextMax;
|
||||
INT32 iImage;
|
||||
LPARAM lParam;
|
||||
} NMHDDISPINFO32A, *LPNMHDDISPINFO32A;
|
||||
|
||||
typedef struct tagNMHDDISPINFO32W
|
||||
{
|
||||
NMHDR hdr;
|
||||
INT32 iItem;
|
||||
UINT32 mask;
|
||||
LPWSTR pszText;
|
||||
INT32 cchTextMax;
|
||||
INT32 iImage;
|
||||
LPARAM lParam;
|
||||
} NMHDDISPINFO32W, *LPNMHDDISPINFO32W;
|
||||
|
||||
#define NMHDDISPINFO WINELIB_NAME_AW(NMHDDISPINFO)
|
||||
#define LPNMHDDISPINFO WINELIB_NAME_AW(LPNMHDDISPINFO)
|
||||
|
||||
#ifndef __WINE__
|
||||
#define Header_GetItemCount(hwndHD) \
|
||||
(INT32)SNDMSG((hwndHD),HDM_GETITEMCOUNT,0,0L)
|
||||
#define Header_InsertItem(hwndHD,i,phdi) \
|
||||
(INT32)SNDMSG((hwndHD),HDM_INSERTITEM,(WPARAM32)(INT32)(i),(LPARAM)(const HDITEM *)(phdi))
|
||||
(INT32)SendMessage32A((hwndHD),HDM_GETITEMCOUNT,0,0L)
|
||||
#define Header_InsertItem32A(hwndHD,i,phdi) \
|
||||
(INT32)SendMessage32A((hwndHD),HDM_INSERTITEM32A,(WPARAM32)(INT32)(i),(LPARAM)(const HDITEM32A*)(phdi))
|
||||
#define Header_InsertItem32W(hwndHD,i,phdi) \
|
||||
(INT32)SendMessage32W((hwndHD),HDM_INSERTITEM32W,(WPARAM32)(INT32)(i),(LPARAM)(const HDITEM32W*)(phdi))
|
||||
#define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem)
|
||||
#define Header_DeleteItem(hwndHD,i) \
|
||||
(BOOL32)SNDMSG((hwndHD),HDM_DELETEITEM,(WPARAM32)(INT32)(i),0L)
|
||||
#define Header_GetItem(hwndHD,i,phdi) \
|
||||
(BOOL32)SNDMSG((hwndHD),HDM_GETITEM,(WPARAM32)(INT32)(i),(LPARAM)(HDITEM *)(phdi))
|
||||
#define Header_SetItem(hwndHD,i,phdi) \
|
||||
(BOOL32)SNDMSG((hwndHD),HDM_SETITEM,(WPARAM32)(INT32)(i),(LPARAM)(const HDITEM *)(phdi))
|
||||
(BOOL32)SendMessage32A((hwndHD),HDM_DELETEITEM,(WPARAM32)(INT32)(i),0L)
|
||||
#define Header_GetItem32A(hwndHD,i,phdi) \
|
||||
(BOOL32)SendMessage32A((hwndHD),HDM_GETITEM32A,(WPARAM32)(INT32)(i),(LPARAM)(HDITEM32A*)(phdi))
|
||||
#define Header_GetItem32W(hwndHD,i,phdi) \
|
||||
(BOOL32)SendMessage32W((hwndHD),HDM_GETITEM32W,(WPARAM32)(INT32)(i),(LPARAM)(HDITEM32W*)(phdi))
|
||||
#define Header_GetItem WINELIB_NAME_AW(Header_GetItem)
|
||||
#define Header_SetItem32A(hwndHD,i,phdi) \
|
||||
(BOOL32)SendMessage32A((hwndHD),HDM_SETITEM32A,(WPARAM32)(INT32)(i),(LPARAM)(const HDITEM32A*)(phdi))
|
||||
#define Header_SetItem32W(hwndHD,i,phdi) \
|
||||
(BOOL32)SendMessage32W((hwndHD),HDM_SETITEM32W,(WPARAM32)(INT32)(i),(LPARAM)(const HDITEM32W*)(phdi))
|
||||
#define Header_SetItem WINELIB_NAME_AW(Header_SetItem)
|
||||
#define Header_Layout(hwndHD,playout) \
|
||||
(BOOL32)SNDMSG((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
|
||||
(BOOL32)SendMessage32A((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
|
||||
#define Header_GetItemRect(hwnd,iItem,lprc) \
|
||||
(BOOL32)SNDMSG((hwnd),HDM_GETITEMRECT,(WPARAM32)iItem,(LPARAM)lprc)
|
||||
(BOOL32)SendMessage32A((hwnd),HDM_GETITEMRECT,(WPARAM32)iItem,(LPARAM)lprc)
|
||||
#define Header_SetImageList(hwnd,himl) \
|
||||
(HIMAGELIST)SNDMSG((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
|
||||
(HIMAGELIST)SendMessage32A((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
|
||||
#define Header_GetImageList(hwnd) \
|
||||
(HIMAGELIST)SNDMSG((hwnd),HDM_GETIMAGELIST,0,0)
|
||||
(HIMAGELIST)SendMessage32A((hwnd),HDM_GETIMAGELIST,0,0)
|
||||
#define Header_OrderToIndex(hwnd,i) \
|
||||
(INT32)SNDMSG((hwnd),HDM_ORDERTOINDEX,(WPARAM32)i,0)
|
||||
(INT32)SendMessage32A((hwnd),HDM_ORDERTOINDEX,(WPARAM32)i,0)
|
||||
#define Header_CreateDragImage(hwnd,i) \
|
||||
(HIMAGELIST)SNDMSG((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM32)i,0)
|
||||
(HIMAGELIST)SendMessage32A((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM32)i,0)
|
||||
#define Header_GetOrderArray(hwnd,iCount,lpi) \
|
||||
(BOOL32)SNDMSG((hwnd),HDM_GETORDERARRAY,(WPARAM32)iCount,(LPARAM)lpi)
|
||||
(BOOL32)SendMessage32A((hwnd),HDM_GETORDERARRAY,(WPARAM32)iCount,(LPARAM)lpi)
|
||||
#define Header_SetOrderArray(hwnd,iCount,lpi) \
|
||||
(BOOL32)SNDMSG((hwnd),HDM_SETORDERARRAY,(WPARAM32)iCount,(LPARAM)lpi)
|
||||
(BOOL32)SendMessage32A((hwnd),HDM_SETORDERARRAY,(WPARAM32)iCount,(LPARAM)lpi)
|
||||
#define Header_SetHotDivider(hwnd,fPos,dw) \
|
||||
(INT32)SNDMSG((hwnd),HDM_SETHOTDIVIDER,(WPARAM32)fPos,(LPARAM)dw)
|
||||
(INT32)SendMessage32A((hwnd),HDM_SETHOTDIVIDER,(WPARAM32)fPos,(LPARAM)dw)
|
||||
#define Header_SetUnicodeFormat(hwnd,fUnicode) \
|
||||
(BOOL32)SNDMSG((hwnd),HDM_SETUNICODEFORMAT,(WPARAM32)(fUnicode),0)
|
||||
(BOOL32)SendMessage32A((hwnd),HDM_SETUNICODEFORMAT,(WPARAM32)(fUnicode),0)
|
||||
#define Header_GetUnicodeFormat(hwnd) \
|
||||
(BOOL32)SNDMSG((hwnd),HDM_GETUNICODEFORMAT,0,0)
|
||||
#endif /* #ifndef __WINE__ */
|
||||
(BOOL32)SendMessage32A((hwnd),HDM_GETUNICODEFORMAT,0,0)
|
||||
|
||||
|
||||
/* Toolbar */
|
||||
|
@ -603,6 +646,7 @@ typedef struct tagNMHEADERA
|
|||
#define TBIF_COMMAND 0x00000020
|
||||
#define TBIF_SIZE 0x00000040
|
||||
|
||||
#define TBBF_LARGE 0x0001
|
||||
|
||||
#define TB_ENABLEBUTTON (WM_USER+1)
|
||||
#define TB_CHECKBUTTON (WM_USER+2)
|
||||
|
@ -1342,6 +1386,330 @@ typedef struct
|
|||
#define TVN_FIRST (0U-400U)
|
||||
#define TVN_LAST (0U-499U)
|
||||
|
||||
#define TVN_SELCHANGING (TVN_FIRST-1)
|
||||
#define TVN_SELCHANGED (TVN_FIRST-2)
|
||||
#define TVN_GETDISPINFO (TVN_FIRST-3)
|
||||
#define TVN_SETDISPINFO (TVN_FIRST-4)
|
||||
#define TVN_ITEMEXPANDING (TVN_FIRST-5)
|
||||
#define TVN_ITEMEXPANDED (TVN_FIRST-6)
|
||||
#define TVN_BEGINDRAG (TVN_FIRST-7)
|
||||
#define TVN_BEGINRDRAG (TVN_FIRST-8)
|
||||
#define TVN_DELETEITEM (TVN_FIRST-9)
|
||||
#define TVN_BEGINLABELEDIT (TVN_FIRST-10)
|
||||
#define TVN_ENDLABELEDIT (TVN_FIRST-11)
|
||||
#define TVN_KEYDOWN (TVN_FIRST-12)
|
||||
#define TVN_GETINFOTIPA (TVN_FIRST-13)
|
||||
#define TVN_GETINFOTIPW (TVN_FIRST-14)
|
||||
#define TVN_SINGLEEXPAND (TVN_FIRST-15)
|
||||
|
||||
|
||||
#define TVN_SELCHANGINGW (TVN_FIRST-50)
|
||||
#define TVN_SELCHANGEDW (TVN_FIRST-51)
|
||||
#define TVN_GETDISPINFOW (TVN_FIRST-52)
|
||||
#define TVN_SETDISPINFOW (TVN_FIRST-53)
|
||||
#define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
|
||||
#define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
|
||||
#define TVN_BEGINDRAGW (TVN_FIRST-56)
|
||||
#define TVN_BEGINRDRAGW (TVN_FIRST-57)
|
||||
#define TVN_DELETEITEMW (TVN_FIRST-58)
|
||||
#define TVN_BEGINLABELEDITW (TVN_FIRST-59)
|
||||
#define TVN_ENDLABELEDITW (TVN_FIRST-60)
|
||||
|
||||
|
||||
|
||||
#define TVIF_TEXT 0x0001
|
||||
#define TVIF_IMAGE 0x0002
|
||||
#define TVIF_PARAM 0x0004
|
||||
#define TVIF_STATE 0x0008
|
||||
#define TVIF_HANDLE 0x0010
|
||||
#define TVIF_SELECTEDIMAGE 0x0020
|
||||
#define TVIF_CHILDREN 0x0040
|
||||
#define TVIF_INTEGRAL 0x0080
|
||||
#define TVIF_DI_SETITEM 0x1000
|
||||
|
||||
#define TVI_ROOT 0xffff0000 /* -65536 */
|
||||
#define TVI_FIRST 0xffff0001 /* -65535 */
|
||||
#define TVI_LAST 0xffff0002 /* -65534 */
|
||||
#define TVI_SORT 0xffff0003 /* -65533 */
|
||||
|
||||
#define TVIS_FOCUSED 0x0001
|
||||
#define TVIS_SELECTED 0x0002
|
||||
#define TVIS_CUT 0x0004
|
||||
#define TVIS_DROPHILITED 0x0008
|
||||
#define TVIS_BOLD 0x0010
|
||||
#define TVIS_EXPANDED 0x0020
|
||||
#define TVIS_EXPANDEDONCE 0x0040
|
||||
#define TVIS_OVERLAYMASK 0x0f00
|
||||
#define TVIS_STATEIMAGEMASK 0xf000
|
||||
#define TVIS_USERMASK 0xf000
|
||||
|
||||
#define TVHT_NOWHERE 0x0001
|
||||
#define TVHT_ONITEMICON 0x0002
|
||||
#define TVHT_ONITEMLABEL 0x0004
|
||||
#define TVHT_ONITEMINDENT 0x0008
|
||||
#define TVHT_ONITEMBUTTON 0x0010
|
||||
#define TVHT_ONITEMRIGHT 0x0020
|
||||
#define TVHT_ONITEMSTATEICON 0x0040
|
||||
#define TVHT_ONITEM 0x0046
|
||||
#define TVHT_ABOVE 0x0100
|
||||
#define TVHT_BELOW 0x0200
|
||||
#define TVHT_TORIGHT 0x0400
|
||||
#define TVHT_TOLEFT 0x0800
|
||||
|
||||
#define TVS_HASBUTTONS 0x0001
|
||||
#define TVS_HASLINES 0x0002
|
||||
#define TVS_LINESATROOT 0x0004
|
||||
#define TVS_EDITLABELS 0x0008
|
||||
#define TVS_DISABLEDRAGDROP 0x0010
|
||||
#define TVS_SHOWSELALWAYS 0x0020
|
||||
#define TVS_RTLREADING 0x0040
|
||||
#define TVS_NOTOOLTIPS 0x0080
|
||||
#define TVS_CHECKBOXES 0x0100
|
||||
#define TVS_TRACKSELECT 0x0200
|
||||
#define TVS_SINGLEEXPAND 0x0400
|
||||
#define TVS_INFOTIP 0x0800
|
||||
#define TVS_FULLROWSELECT 0x1000
|
||||
#define TVS_NOSCROLL 0x2000
|
||||
#define TVS_NONEVENHEIGHT 0x4000
|
||||
|
||||
#define TVS_SHAREDIMAGELISTS 0x0000
|
||||
#define TVS_PRIVATEIMAGELISTS 0x0400
|
||||
|
||||
|
||||
#define TVE_COLLAPSE 0x0001
|
||||
#define TVE_EXPAND 0x0002
|
||||
#define TVE_TOGGLE 0x0003
|
||||
#define TVE_EXPANDPARTIAL 0x4000
|
||||
#define TVE_COLLAPSERESET 0x8000
|
||||
|
||||
#define TVGN_ROOT 0
|
||||
#define TVGN_NEXT 1
|
||||
#define TVGN_PREVIOUS 2
|
||||
#define TVGN_PARENT 3
|
||||
#define TVGN_CHILD 4
|
||||
#define TVGN_FIRSTVISIBLE 5
|
||||
#define TVGN_NEXTVISIBLE 6
|
||||
#define TVGN_PREVIOUSVISIBLE 7
|
||||
#define TVGN_DROPHILITE 8
|
||||
#define TVGN_CARET 9
|
||||
#define TVGN_LASTVISIBLE 10
|
||||
|
||||
#define TVC_UNKNOWN 0x00
|
||||
#define TVC_BYMOUSE 0x01
|
||||
#define TVC_BYKEYBOARD 0x02
|
||||
|
||||
|
||||
typedef HANDLE32 HTREEITEM;
|
||||
|
||||
typedef struct {
|
||||
UINT32 mask;
|
||||
HTREEITEM hItem;
|
||||
UINT32 state;
|
||||
UINT32 stateMask;
|
||||
LPSTR pszText;
|
||||
int cchTextMax;
|
||||
int iImage;
|
||||
int iSelectedImage;
|
||||
int cChildren;
|
||||
LPARAM lParam;
|
||||
} TV_ITEM, *LPTVITEM;
|
||||
|
||||
typedef struct {
|
||||
UINT32 mask;
|
||||
HTREEITEM hItem;
|
||||
UINT32 state;
|
||||
UINT32 stateMask;
|
||||
LPSTR pszText;
|
||||
int cchTextMax;
|
||||
int iImage;
|
||||
int iSelectedImage;
|
||||
int cChildren;
|
||||
LPARAM lParam;
|
||||
int iIntegral;
|
||||
} TV_ITEMEX, *LPTVITEMEX;
|
||||
|
||||
#define TVITEM TV_ITEM
|
||||
|
||||
|
||||
|
||||
typedef struct tagTVINSERTSTRUCT {
|
||||
HTREEITEM hParent;
|
||||
HTREEITEM hInsertAfter;
|
||||
TV_ITEM item;
|
||||
} TVINSERTSTRUCT, *LPTVINSERTSTRUCT;
|
||||
|
||||
typedef struct tagNMTREEVIEW {
|
||||
NMHDR hdr;
|
||||
UINT32 action;
|
||||
TVITEM itemOld;
|
||||
TVITEM itemNew;
|
||||
POINT32 ptDrag;
|
||||
} NMTREEVIEW, *LPNMTREEVIEW;
|
||||
|
||||
typedef struct tagTVDISPINFO {
|
||||
NMHDR hdr;
|
||||
TVITEM item;
|
||||
} NMTVDISPINFO, *LPNMTVDISPINFO;
|
||||
|
||||
|
||||
|
||||
typedef struct tagTVHITTESTINFO {
|
||||
POINT32 pt;
|
||||
UINT32 flags;
|
||||
HTREEITEM hItem;
|
||||
} TVHITTESTINFO, *LPTVHITTESTINFO;
|
||||
|
||||
|
||||
#define TreeView_InsertItem(hwndHD, phdi) \
|
||||
(INT32)SendMessage32A((hwnd), TVM_INSERTITEM, 0, \
|
||||
(LPARAM)(LPTV_INSERTSTRUCT)(phdi))
|
||||
#define TreeView_DeleteItem(hwnd, hItem) \
|
||||
(BOOL32)SendMessage32A((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
|
||||
#define TreeView_DeleteAllItems(hwnd) \
|
||||
(BOOL32)SendMessage32A((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
|
||||
#define TreeView_Expand(hwnd, hitem, code) \
|
||||
(BOOL32)SendMessage32A((hwnd), TVM_EXPAND, (WPARAM)code, \
|
||||
(LPARAM)(HTREEITEM)(hitem))
|
||||
|
||||
#define TreeView_GetItemRect(hwnd, hitem, prc, code) \
|
||||
(*(HTREEITEM *)prc = (hitem), (BOOL)SendMessage32A((hwnd), \
|
||||
TVM_GETITEMRECT, (WPARAM32)(code), (LPARAM)(RECT *)(prc)))
|
||||
|
||||
#define TreeView_GetCount(hwnd) \
|
||||
(UINT32)SendMessage32A((hwnd), TVM_GETCOUNT, 0, 0)
|
||||
#define TreeView_GetIndent(hwnd) \
|
||||
(UINT32)SendMessage32A((hwnd), TVM_GETINDENT, 0, 0)
|
||||
#define TreeView_SetIndent(hwnd, indent) \
|
||||
(BOOL32)SendMessage32A((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
|
||||
|
||||
#define TreeView_GetImageList(hwnd, iImage) \
|
||||
(HIMAGELIST)SendMessage32A((hwnd), TVM_GETIMAGELIST, iImage, 0)
|
||||
|
||||
#define TreeView_SetImageList(hwnd, himl, iImage) \
|
||||
(HIMAGELIST)SendMessage32A((hwnd), TVM_SETIMAGELIST, iImage, \
|
||||
(LPARAM)(UINT32)(HIMAGELIST)(himl))
|
||||
|
||||
#define TreeView_GetNextItem(hwnd, hitem, code) \
|
||||
(HTREEITEM)SendMessage32A((hwnd), TVM_GETNEXTITEM, (WPARAM)code,\
|
||||
(LPARAM)(HTREEITEM) (hitem))
|
||||
|
||||
#define TreeView_GetChild(hwnd, hitem) \
|
||||
TreeView_GetNextItem(hwnd, hitem , TVGN_CHILD)
|
||||
#define TreeView_GetNextSibling(hwnd, hitem) \
|
||||
TreeView_GetNextItem(hwnd, hitem , TVGN_NEXT)
|
||||
#define TreeView_GetPrevSibling(hwnd, hitem) \
|
||||
TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUS)
|
||||
#define TreeView_GetParent(hwnd, hitem) \
|
||||
TreeView_GetNextItem(hwnd, hitem , TVGN_PARENT)
|
||||
#define TreeView_GetFirstVisible(hwnd) \
|
||||
TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
|
||||
#define TreeView_GetLastVisible(hwnd) \
|
||||
TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
|
||||
#define TreeView_GetNextVisible(hwnd, hitem) \
|
||||
TreeView_GetNextItem(hwnd, hitem , TVGN_NEXTVISIBLE)
|
||||
#define TreeView_GetPrevVisible(hwnd, hitem) \
|
||||
TreeView_GetNextItem(hwnd, hitem , TVGN_PREVIOUSVISIBLE)
|
||||
#define TreeView_GetSelection(hwnd) \
|
||||
TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
|
||||
#define TreeView_GetDropHilight(hwnd) \
|
||||
TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
|
||||
#define TreeView_GetRoot(hwnd) \
|
||||
TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
|
||||
#define TreeView_GetLastVisible(hwnd) \
|
||||
TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
|
||||
|
||||
|
||||
#define TreeView_Select(hwnd, hitem, code) \
|
||||
(UINT32)SendMessage32A((hwnd), TVM_SELECTITEM, (WPARAM)code, \
|
||||
(LPARAM)(UINT32)(hitem))
|
||||
|
||||
|
||||
#define TreeView_SelectItem(hwnd, hitem) \
|
||||
TreeView_Select(hwnd, hitem, TVGN_CARET)
|
||||
#define TreeView_SelectDropTarget(hwnd, hitem) \
|
||||
TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
|
||||
/* FIXME
|
||||
#define TreeView_SelectSetFirstVisible(hwnd, hitem) \
|
||||
TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
|
||||
*/
|
||||
|
||||
#define TreeView_GetItem(hwnd, pitem) \
|
||||
(BOOL32)SendMessage32A((hwnd), TVM_GETITEM, 0, (LPARAM) (TV_ITEM *)(pitem))
|
||||
|
||||
#define TreeView_SetItem(hwnd, pitem) \
|
||||
(BOOL32)SendMessage32A((hwnd), TVM_SETITEM, 0, (LPARAM)(const TV_ITEM *)(pitem))
|
||||
|
||||
#define TreeView_EditLabel(hwnd, hitem) \
|
||||
(HWND)SendMessage32A((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
|
||||
|
||||
|
||||
#define TreeView_GetEditControl(hwnd) \
|
||||
(HWND)SendMessage32A((hwnd), TVM_GETEDITCONTROL, 0, 0)
|
||||
|
||||
#define TreeView_GetVisibleCount(hwnd) \
|
||||
(UINT32)SendMessage32A((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
|
||||
|
||||
#define TreeView_HitTest(hwnd, lpht) \
|
||||
(HTREEITEM)SendMessage32A((hwnd), TVM_HITTEST, 0,\
|
||||
(LPARAM)(LPTV_HITTESTINFO)(lpht))
|
||||
|
||||
#define TreeView_CreateDragImage(hwnd, hitem) \
|
||||
(HIMAGELIST)SendMessage32A((hwnd), TVM_CREATEDRAGIMAGE, 0,\
|
||||
(LPARAM)(HTREEITEM)(hitem))
|
||||
|
||||
#define TreeView_SortChildren(hwnd, hitem, recurse) \
|
||||
(BOOL)SendMessage32A((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse,\
|
||||
(LPARAM)(HTREEITEM)(hitem))
|
||||
|
||||
#define TreeView_EnsureVisible(hwnd, hitem) \
|
||||
(BOOL)SendMessage32A((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(UINT32)(hitem))
|
||||
|
||||
#define TreeView_SortChildrenCB(hwnd, psort, recurse) \
|
||||
(BOOL)SendMessage32A((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse, \
|
||||
(LPARAM)(LPTV_SORTCB)(psort))
|
||||
|
||||
#define TreeView_EndEditLabelNow(hwnd, fCancel) \
|
||||
(BOOL)SendMessage32A((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
|
||||
|
||||
#define TreeView_GetISearchString(hwndTV, lpsz) \
|
||||
(BOOL)SendMessage32A((hwndTV), TVM_GETISEARCHSTRING, 0, \
|
||||
(LPARAM)(LPTSTR)lpsz)
|
||||
|
||||
#define TreeView_SetItemHeight(hwnd, iHeight) \
|
||||
(INT32)SendMessage32A((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
|
||||
#define TreeView_GetItemHeight(hwnd) \
|
||||
(INT32)SendMessage32A((hwnd), TVM_GETITEMHEIGHT, 0, 0)
|
||||
|
||||
#define TreeView_SetBkColor(hwnd, clr) \
|
||||
(COLORREF)SendMessage32A((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
|
||||
|
||||
#define TreeView_SetTextColor(hwnd, clr) \
|
||||
(COLORREF)SendMessage32A((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
|
||||
|
||||
#define TreeView_GetBkColor(hwnd) \
|
||||
(COLORREF)SendMessage32A((hwnd), TVM_GETBKCOLOR, 0, 0)
|
||||
|
||||
#define TreeView_GetTextColor(hwnd) \
|
||||
(COLORREF)SendMessage32A((hwnd), TVM_GETTEXTCOLOR, 0, 0)
|
||||
|
||||
#define TreeView_SetScrollTime(hwnd, uTime) \
|
||||
(UINT32)SendMessage32A((hwnd), TVM_SETSCROLLTIME, uTime, 0)
|
||||
|
||||
#define TreeView_GetScrollTime(hwnd) \
|
||||
(UINT32)SendMessage32A((hwnd), TVM_GETSCROLLTIME, 0, 0)
|
||||
|
||||
#define TreeView_SetInsertMarkColor(hwnd, clr) \
|
||||
(COLORREF)SendMessage32A((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
|
||||
#define TreeView_GetInsertMarkColor(hwnd) \
|
||||
(COLORREF)SendMessage32A((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Listview control */
|
||||
|
||||
|
@ -1456,14 +1824,63 @@ typedef struct
|
|||
#define LVM_INSERTCOLUMN WINELIB_NAME_AW(LVM_INSERTCOLUMN)
|
||||
#define LVM_DELETECOLUMN (LVM_FIRST+28)
|
||||
#define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
|
||||
#define LVM_GETHEADER (LVM_FIRST+30)
|
||||
#define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
|
||||
#define LVM_GETHEADER (LVM_FIRST+31)
|
||||
|
||||
#define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
|
||||
#define LVM_GETVIEWRECT (LVM_FIRST+34)
|
||||
#define LVM_GETTEXTCOLOR (LVM_FIRST+35)
|
||||
#define LVM_SETTEXTCOLOR (LVM_FIRST+36)
|
||||
#define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
|
||||
#define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
|
||||
#define LVM_GETTOPINDEX (LVM_FIRST+39)
|
||||
#define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
|
||||
#define LVM_GETORIGIN (LVM_FIRST+41)
|
||||
#define LVM_UPDATE (LVM_FIRST+42)
|
||||
#define LVM_SETITEMSTATE (LVM_FIRST+43)
|
||||
#define LVM_GETITEMSTATE (LVM_FIRST+44)
|
||||
#define LVM_GETITEMTEXT32A (LVM_FIRST+45)
|
||||
#define LVM_GETITEMTEXT32W (LVM_FIRST+115)
|
||||
#define LVM_GETITEMTEXT WINELIB_NAME_AW(LVM_GETITEMTEXT)
|
||||
#define LVM_SETITEMTEXT32A (LVM_FIRST+46)
|
||||
#define LVM_SETITEMTEXT32W (LVM_FIRST+116)
|
||||
#define LVM_SETITEMTEXT WINELIB_NAME_AW(LVM_SETITEMTEXT)
|
||||
#define LVM_SETITEMCOUNT (LVM_FIRST+47)
|
||||
#define LVM_SORTITEMS (LVM_FIRST+48)
|
||||
#define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
|
||||
#define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
|
||||
|
||||
#define LVM_GETITEMSPACING (LVM_FIRST+51)
|
||||
#define LVM_GETISEARCHSTRING32A (LVM_FIRST+52)
|
||||
#define LVM_GETISEARCHSTRING32W (LVM_FIRST+117)
|
||||
#define LVM_GETISEARCHSTRING WINELIB_NAME_AW(LVM_GETISEARCHSTRING)
|
||||
#define LVM_SETICONSPACING (LVM_FIRST+53)
|
||||
#define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
|
||||
#define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
|
||||
#define LVM_GETSUBITEMRECT (LVM_FIRST+56)
|
||||
#define LVM_SUBITEMHITTEST (LVM_FIRST+57)
|
||||
#define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
|
||||
#define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
|
||||
#define LVM_SETHOTITEM (LVM_FIRST+60)
|
||||
#define LVM_GETHOTITEM (LVM_FIRST+61)
|
||||
#define LVM_SETHOTCURSOR (LVM_FIRST+62)
|
||||
#define LVM_GETHOTCURSOR (LVM_FIRST+63)
|
||||
#define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
|
||||
#define LVM_SETWORKAREAS (LVM_FIRST+65)
|
||||
#define LVM_GETSELECTIONMARK (LVM_FIRST+66)
|
||||
#define LVM_SETSELECTIONMARK (LVM_FIRST+67)
|
||||
#define LVM_SETBKIMAGE32A (LVM_FIRST+68)
|
||||
#define LVM_SETBKIMAGE32W (LVM_FIRST+138)
|
||||
#define LVM_SETBKIMAGE WINELIB_NAME_AW(LVM_SETBKIMAGE)
|
||||
#define LVM_GETBKIMAGE32A (LVM_FIRST+69)
|
||||
#define LVM_GETBKIMAGE32W (LVM_FIRST+139)
|
||||
#define LVM_GETBKIMAGE WINELIB_NAME_AW(LVM_GETBKIMAGE)
|
||||
#define LVM_GETWORKAREAS (LVM_FIRST+70)
|
||||
#define LVM_SETHOVERTIME (LVM_FIRST+71)
|
||||
#define LVM_GETHOVERTIME (LVM_FIRST+72)
|
||||
#define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
|
||||
#define LVM_SETTOOLTIPS (LVM_FIRST+74)
|
||||
|
||||
#define LVM_GETTOOLTIPS (LVM_FIRST+78)
|
||||
|
||||
#define LVN_FIRST (0U-100U)
|
||||
#define LVN_LAST (0U-199U)
|
||||
|
@ -1747,22 +2164,29 @@ typedef INT32 (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
|
|||
#define ACN_START 1
|
||||
#define ACN_STOP 2
|
||||
|
||||
#ifndef __WINE__
|
||||
#define Animate_Create(hwndP,id,dwStyle,hInstance) \
|
||||
CreateWindow(ANIMATE_CLASS,NULL,dwStyle,0,0,0,0,hwndP,(HMENU32)(id),hInstance,NULL)
|
||||
#define Animate_Open(hwnd,szName) \
|
||||
(BOOL32)SNDMSG(hwnd,ACM_OPEN,0,(LPARAM)(LPTSTR)(szName))
|
||||
#define Animate_OpenEx(hwnd,hInst,szName) \
|
||||
(BOOL32)SNDMSG(hwnd,ACM_OPEN,(WPARAM32)hInst,(LPARAM)(LPTSTR)(szName))
|
||||
#define Animate_Create32A(hwndP,id,dwStyle,hInstance) \
|
||||
CreateWindow32A(ANIMATE_CLASS32A,NULL,dwStyle,0,0,0,0,hwndP,(HMENU32)(id),hInstance,NULL)
|
||||
#define Animate_Create32W(hwndP,id,dwStyle,hInstance) \
|
||||
CreateWindow32W(ANIMATE_CLASS32W,NULL,dwStyle,0,0,0,0,hwndP,(HMENU32)(id),hInstance,NULL)
|
||||
#define Animate_Create WINELIB_NAME_AW(Animate_Create)
|
||||
#define Animate_Open32A(hwnd,szName) \
|
||||
(BOOL32)SendMessage32A(hwnd,ACM_OPEN32A,0,(LPARAM)(LPSTR)(szName))
|
||||
#define Animate_Open32W(hwnd,szName) \
|
||||
(BOOL32)SendMessage32W(hwnd,ACM_OPEN32W,0,(LPARAM)(LPWSTR)(szName))
|
||||
#define Animate_Open WINELIB_NAME_AW(Animate_Open)
|
||||
#define Animate_OpenEx32A(hwnd,hInst,szName) \
|
||||
(BOOL32)SendMessage32A(hwnd,ACM_OPEN32A,(WPARAM32)hInst,(LPARAM)(LPSTR)(szName))
|
||||
#define Animate_OpenEx32W(hwnd,hInst,szName) \
|
||||
(BOOL32)SendMessage32W(hwnd,ACM_OPEN32W,(WPARAM32)hInst,(LPARAM)(LPWSTR)(szName))
|
||||
#define Animate_OpenEx WINELIB_NAME_AW(Animate_OpenEx)
|
||||
#define Animate_Play(hwnd,from,to,rep) \
|
||||
(BOOL32)SNDMSG(hwnd,ACM_PLAY,(WPARAM32)(UINT32)(rep),(LPARAM)MAKELONG(from,to))
|
||||
(BOOL32)SendMessage32A(hwnd,ACM_PLAY,(WPARAM32)(UINT32)(rep),(LPARAM)MAKELONG(from,to))
|
||||
#define Animate_Stop(hwnd) \
|
||||
(BOOL32)SNDMSG(hwnd,ACM_STOP,0,0)
|
||||
(BOOL32)SendMessage32A(hwnd,ACM_STOP,0,0)
|
||||
#define Animate_Close(hwnd) \
|
||||
Animate_Open(hwnd,NULL)
|
||||
(BOOL32)SendMessage32A(hwnd,ACM_OPEN32A,0,0)
|
||||
#define Animate_Seek(hwnd,frame) \
|
||||
Animate_Play(hwnd,frame,frame,1)
|
||||
#endif /* __WINE__ */
|
||||
(BOOL32)SendMessage32A(hwnd,ACM_PLAY,1,(LPARAM)MAKELONG(frame,frame))
|
||||
|
||||
|
||||
|
||||
|
@ -1778,6 +2202,14 @@ BOOL32 WINAPI COMCTL32_Free (LPVOID lpMem);
|
|||
DWORD WINAPI COMCTL32_GetSize (LPVOID lpMem);
|
||||
|
||||
|
||||
INT32 WINAPI Str_GetPtr32A (LPCSTR lpSrc, LPSTR lpDest, INT32 nMaxLen);
|
||||
BOOL32 WINAPI Str_SetPtr32A (LPSTR *lppDest, LPCSTR lpSrc);
|
||||
INT32 WINAPI Str_GetPtr32W (LPCWSTR lpSrc, LPWSTR lpDest, INT32 nMaxLen);
|
||||
BOOL32 WINAPI Str_SetPtr32W (LPWSTR *lppDest, LPCWSTR lpSrc);
|
||||
#define Str_GetPtr WINELIB_NAME_AW(Str_GetPtr)
|
||||
#define Str_SetPtr WINELIB_NAME_AW(Str_SetPtr)
|
||||
|
||||
|
||||
/* Dynamic Storage Array */
|
||||
|
||||
typedef struct _DSA
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
/* Define if X libraries are not reentrant (compiled without -D_REENTRANT). */
|
||||
#undef NO_REENTRANT_X11
|
||||
|
||||
/* Define if libc is not reentrant */
|
||||
#undef NO_REENTRANT_LIBC
|
||||
|
||||
/* Define if all debug messages are to be compiled out */
|
||||
#undef NO_DEBUG_MSGS
|
||||
|
||||
|
@ -161,3 +164,6 @@
|
|||
|
||||
/* Define if you have the w library (-lw). */
|
||||
#undef HAVE_LIBW
|
||||
|
||||
/* Define if you have the xpg4 library (-lxpg4). */
|
||||
#undef HAVE_LIBXPG4
|
||||
|
|
|
@ -431,6 +431,14 @@ typedef struct _DDCAPS
|
|||
#define DDCAPS2_CANFLIPODDEVEN 0x00002000
|
||||
#define DDCAPS2_CANBOBHARDWARE 0x00004000
|
||||
|
||||
|
||||
/* Set/Get Colour Key Flags */
|
||||
#define DDCKEY_COLORSPACE 0x00000001 /* Struct is ingle colour space */
|
||||
#define DDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */
|
||||
#define DDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */
|
||||
#define DDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */
|
||||
#define DDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */
|
||||
|
||||
typedef struct _DDCOLORKEY
|
||||
{
|
||||
DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
|
||||
|
@ -876,6 +884,7 @@ FAR * ) PURE;
|
|||
struct _common_directdrawdata {
|
||||
DWORD depth;
|
||||
DWORD height,width; /* SetDisplayMode */
|
||||
HWND32 mainWindow; /* SetCooperativeLevel */
|
||||
};
|
||||
|
||||
struct _dga_directdrawdata {
|
||||
|
|
149
include/debug.h
149
include/debug.h
|
@ -59,32 +59,32 @@
|
|||
#define dbch_hotkey 51
|
||||
#define dbch_icon 52
|
||||
#define dbch_imagelist 53
|
||||
#define dbch_int 54
|
||||
#define dbch_int10 55
|
||||
#define dbch_int21 56
|
||||
#define dbch_int31 57
|
||||
#define dbch_key 58
|
||||
#define dbch_keyboard 59
|
||||
#define dbch_ldt 60
|
||||
#define dbch_listbox 61
|
||||
#define dbch_listview 62
|
||||
#define dbch_local 63
|
||||
#define dbch_mci 64
|
||||
#define dbch_mcianim 65
|
||||
#define dbch_mciwave 66
|
||||
#define dbch_mdi 67
|
||||
#define dbch_menu 68
|
||||
#define dbch_message 69
|
||||
#define dbch_metafile 70
|
||||
#define dbch_midi 71
|
||||
#define dbch_mmaux 72
|
||||
#define dbch_mmio 73
|
||||
#define dbch_mmsys 74
|
||||
#define dbch_mmtime 75
|
||||
#define dbch_module 76
|
||||
#define dbch_mpr 77
|
||||
#define dbch_msg 78
|
||||
#define dbch_msvideo 79
|
||||
#define dbch_imm 54
|
||||
#define dbch_int 55
|
||||
#define dbch_int10 56
|
||||
#define dbch_int21 57
|
||||
#define dbch_int31 58
|
||||
#define dbch_key 59
|
||||
#define dbch_keyboard 60
|
||||
#define dbch_ldt 61
|
||||
#define dbch_listbox 62
|
||||
#define dbch_listview 63
|
||||
#define dbch_local 64
|
||||
#define dbch_mci 65
|
||||
#define dbch_mcianim 66
|
||||
#define dbch_mciwave 67
|
||||
#define dbch_mdi 68
|
||||
#define dbch_menu 69
|
||||
#define dbch_message 70
|
||||
#define dbch_metafile 71
|
||||
#define dbch_midi 72
|
||||
#define dbch_mmaux 73
|
||||
#define dbch_mmio 74
|
||||
#define dbch_mmsys 75
|
||||
#define dbch_mmtime 76
|
||||
#define dbch_module 77
|
||||
#define dbch_mpr 78
|
||||
#define dbch_msg 79
|
||||
#define dbch_nonclient 80
|
||||
#define dbch_ntdll 81
|
||||
#define dbch_ole 82
|
||||
|
@ -96,54 +96,55 @@
|
|||
#define dbch_profile 88
|
||||
#define dbch_progress 89
|
||||
#define dbch_prop 90
|
||||
#define dbch_psdrv 91
|
||||
#define dbch_rebar 92
|
||||
#define dbch_reg 93
|
||||
#define dbch_region 94
|
||||
#define dbch_relay 95
|
||||
#define dbch_resource 96
|
||||
#define dbch_s 97
|
||||
#define dbch_scroll 98
|
||||
#define dbch_security 99
|
||||
#define dbch_segment 100
|
||||
#define dbch_selector 101
|
||||
#define dbch_sem 102
|
||||
#define dbch_sendmsg 103
|
||||
#define dbch_shell 104
|
||||
#define dbch_shm 105
|
||||
#define dbch_snoop 106
|
||||
#define dbch_sound 107
|
||||
#define dbch_static 108
|
||||
#define dbch_statusbar 109
|
||||
#define dbch_stress 110
|
||||
#define dbch_string 111
|
||||
#define dbch_syscolor 112
|
||||
#define dbch_system 113
|
||||
#define dbch_tab 114
|
||||
#define dbch_task 115
|
||||
#define dbch_text 116
|
||||
#define dbch_thread 117
|
||||
#define dbch_thunk 118
|
||||
#define dbch_timer 119
|
||||
#define dbch_toolbar 120
|
||||
#define dbch_toolhelp 121
|
||||
#define dbch_tooltips 122
|
||||
#define dbch_trackbar 123
|
||||
#define dbch_treeview 124
|
||||
#define dbch_tweak 125
|
||||
#define dbch_uitools 126
|
||||
#define dbch_updown 127
|
||||
#define dbch_ver 128
|
||||
#define dbch_virtual 129
|
||||
#define dbch_vxd 130
|
||||
#define dbch_win 131
|
||||
#define dbch_win16drv 132
|
||||
#define dbch_win32 133
|
||||
#define dbch_wing 134
|
||||
#define dbch_winsock 135
|
||||
#define dbch_wnet 136
|
||||
#define dbch_x11 137
|
||||
#define dbch_x11drv 138
|
||||
#define dbch_psapi 91
|
||||
#define dbch_psdrv 92
|
||||
#define dbch_rebar 93
|
||||
#define dbch_reg 94
|
||||
#define dbch_region 95
|
||||
#define dbch_relay 96
|
||||
#define dbch_resource 97
|
||||
#define dbch_s 98
|
||||
#define dbch_scroll 99
|
||||
#define dbch_security 100
|
||||
#define dbch_segment 101
|
||||
#define dbch_selector 102
|
||||
#define dbch_sem 103
|
||||
#define dbch_sendmsg 104
|
||||
#define dbch_shell 105
|
||||
#define dbch_shm 106
|
||||
#define dbch_snoop 107
|
||||
#define dbch_sound 108
|
||||
#define dbch_static 109
|
||||
#define dbch_statusbar 110
|
||||
#define dbch_stress 111
|
||||
#define dbch_string 112
|
||||
#define dbch_syscolor 113
|
||||
#define dbch_system 114
|
||||
#define dbch_tab 115
|
||||
#define dbch_task 116
|
||||
#define dbch_text 117
|
||||
#define dbch_thread 118
|
||||
#define dbch_thunk 119
|
||||
#define dbch_timer 120
|
||||
#define dbch_toolbar 121
|
||||
#define dbch_toolhelp 122
|
||||
#define dbch_tooltips 123
|
||||
#define dbch_trackbar 124
|
||||
#define dbch_treeview 125
|
||||
#define dbch_tweak 126
|
||||
#define dbch_uitools 127
|
||||
#define dbch_updown 128
|
||||
#define dbch_ver 129
|
||||
#define dbch_virtual 130
|
||||
#define dbch_vxd 131
|
||||
#define dbch_win 132
|
||||
#define dbch_win16drv 133
|
||||
#define dbch_win32 134
|
||||
#define dbch_wing 135
|
||||
#define dbch_winsock 136
|
||||
#define dbch_wnet 137
|
||||
#define dbch_x11 138
|
||||
#define dbch_x11drv 139
|
||||
/* Definitions for classes identifiers */
|
||||
#define dbcl_fixme 0
|
||||
#define dbcl_err 1
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "debugtools.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_CHANNEL_COUNT 139
|
||||
#define DEBUG_CHANNEL_COUNT 140
|
||||
#ifdef DEBUG_RUNTIME
|
||||
short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
|
||||
{1, 1, 0, 0},
|
||||
|
@ -146,6 +146,7 @@ short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
|
|||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
};
|
||||
const char* debug_ch_name[] = {
|
||||
"1",
|
||||
|
@ -202,6 +203,7 @@ const char* debug_ch_name[] = {
|
|||
"hotkey",
|
||||
"icon",
|
||||
"imagelist",
|
||||
"imm",
|
||||
"int",
|
||||
"int10",
|
||||
"int21",
|
||||
|
@ -227,7 +229,6 @@ const char* debug_ch_name[] = {
|
|||
"module",
|
||||
"mpr",
|
||||
"msg",
|
||||
"msvideo",
|
||||
"nonclient",
|
||||
"ntdll",
|
||||
"ole",
|
||||
|
@ -239,6 +240,7 @@ const char* debug_ch_name[] = {
|
|||
"profile",
|
||||
"progress",
|
||||
"prop",
|
||||
"psapi",
|
||||
"psdrv",
|
||||
"rebar",
|
||||
"reg",
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "selectors.h"
|
||||
#include "sig_context.h"
|
||||
#include "pe_image.h"
|
||||
#include "miscemu.h"
|
||||
|
||||
#define STEP_FLAG 0x100 /* single step flag */
|
||||
|
||||
|
@ -85,13 +86,20 @@ struct wine_locals {
|
|||
typedef struct wine_locals WineLocals;
|
||||
|
||||
|
||||
#define DBG_V86_MODULE(seg) ((seg)>>16)
|
||||
#define IS_SELECTOR_V86(seg) DBG_V86_MODULE(seg)
|
||||
|
||||
#define DBG_FIX_ADDR_SEG(addr,default) { \
|
||||
if ((addr)->seg == 0xffffffff) (addr)->seg = (default); \
|
||||
if (!IS_SELECTOR_V86((addr)->seg)) \
|
||||
if (IS_SELECTOR_SYSTEM((addr)->seg)) (addr)->seg = 0; }
|
||||
|
||||
#define DBG_ADDR_TO_LIN(addr) \
|
||||
(IS_SELECTOR_V86((addr)->seg) \
|
||||
? (char*)(DOSMEM_MemoryBase(DBG_V86_MODULE((addr)->seg)) + \
|
||||
((((addr)->seg)&0xFFFF)<<4)+(addr)->off) : \
|
||||
(IS_SELECTOR_SYSTEM((addr)->seg) ? (char *)(addr)->off \
|
||||
: (char *)PTR_SEG_OFF_TO_LIN((addr)->seg,(addr)->off))
|
||||
: (char *)PTR_SEG_OFF_TO_LIN((addr)->seg,(addr)->off)))
|
||||
|
||||
#define DBG_CHECK_READ_PTR(addr,len) \
|
||||
(!DEBUG_IsBadReadPtr((addr),(len)) || \
|
||||
|
@ -310,6 +318,7 @@ extern void DEBUG_NukePath(void);
|
|||
extern void DEBUG_Disassemble( const DBG_ADDR *, const DBG_ADDR*, int offset );
|
||||
|
||||
/* debugger/dbg.y */
|
||||
extern void ctx_debug( int signal, CONTEXT *regs );
|
||||
extern void wine_debug( int signal, SIGCONTEXT *regs );
|
||||
|
||||
#endif /* __WINE_DEBUGGER_H */
|
||||
|
|
|
@ -37,8 +37,8 @@ extern short debug_msg_enabled[][DEBUG_CLASS_COUNT];
|
|||
#define DPRINTF(format, args...) fprintf(stddeb, format, ## args)
|
||||
|
||||
#define DPRINTF_(cl, ch, format, args...) \
|
||||
if(!DEBUGGING(cl, ch)) ; \
|
||||
else DPRINTF(# cl ":" # ch ":%s " format, __FUNCTION__ , ## args)
|
||||
do {if(!DEBUGGING(cl, ch)) ; \
|
||||
else DPRINTF(# cl ":" # ch ":%s " format, __FUNCTION__ , ## args); } while (0)
|
||||
|
||||
/* use configure to allow user to compile out debugging messages */
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ typedef struct _DOSTASK {
|
|||
LPVOID img;
|
||||
unsigned img_ofs;
|
||||
WORD psp_seg,load_seg;
|
||||
WORD dpmi_seg,dpmi_sel,dpmi_flag;
|
||||
HMODULE16 hModule;
|
||||
struct vm86plus_struct VM86;
|
||||
int fn, state;
|
||||
|
|
483
include/dplay.h
483
include/dplay.h
|
@ -2,9 +2,9 @@
|
|||
#ifndef __WINE_DPLAY_H
|
||||
#define __WINE_DPLAY_H
|
||||
|
||||
#include "mmsystem.h"
|
||||
#pragma pack(1)
|
||||
|
||||
/* Return Values */
|
||||
/* Return Values for Direct Play */
|
||||
#define _FACDP 0x877
|
||||
#define MAKE_DPHRESULT( code ) MAKE_HRESULT( 1, _FACDP, code )
|
||||
|
||||
|
@ -107,10 +107,6 @@ DEFINE_GUID(DPSPGUID_SERIAL, 0xf1d6860, 0x88d9, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0
|
|||
/* GUID for Modem service provider {44EAA760-CB68-11cf-9C4E-00A0C905425E} */
|
||||
DEFINE_GUID(DPSPGUID_MODEM, 0x44eaa760, 0xcb68, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
|
||||
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/* Direct Play */
|
||||
typedef struct IDirectPlay IDirectPlay, *LPDIRECTPLAY;
|
||||
|
||||
/* Direct Play 2 */
|
||||
|
@ -154,60 +150,110 @@ typedef struct tagDPNAME
|
|||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags; /* Not used must be 0 */
|
||||
union playerShortName /* Player's Handle? */
|
||||
|
||||
union /*playerShortName */ /* Player's Handle? */
|
||||
{
|
||||
LPWSTR lpszShortName;
|
||||
LPSTR lpszShortNameA;
|
||||
};
|
||||
union playerLongName /* Player's formal/real name */
|
||||
}psn;
|
||||
|
||||
union /*playerLongName */ /* Player's formal/real name */
|
||||
{
|
||||
LPWSTR lpszLongName;
|
||||
LPSTR lpszLongNameA;
|
||||
};
|
||||
}pln;
|
||||
|
||||
} DPNAME, *LPDPNAME;
|
||||
|
||||
#define DPLONGNAMELEN 52
|
||||
#define DPSHORTNAMELEN 20
|
||||
#define DPSESSIONNAMELEN 32
|
||||
#define DPPASSWORDLEN 16
|
||||
#define DPUSERRESERVED 16
|
||||
|
||||
typedef struct tagDPSESSIONDESC
|
||||
{
|
||||
DWORD dwSize;
|
||||
GUID guidSession;
|
||||
DWORD dwSession;
|
||||
DWORD dwMaxPlayers;
|
||||
DWORD dwCurrentPlayers;
|
||||
DWORD dwFlags;
|
||||
char szSessionName[ DPSESSIONNAMELEN ];
|
||||
char szUserField[ DPUSERRESERVED ];
|
||||
DWORD dwReserved1;
|
||||
char szPassword[ DPPASSWORDLEN ];
|
||||
DWORD dwReserved2;
|
||||
DWORD dwUser1;
|
||||
DWORD dwUser2;
|
||||
DWORD dwUser3;
|
||||
DWORD dwUser4;
|
||||
} DPSESSIONDESC, *LPDPSESSIONDESC;
|
||||
|
||||
typedef struct tagDPSESSIONDESC2
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
GUID guidInstance;
|
||||
GUID guidApplication;
|
||||
GUID guidApplication; /* GUID of the DP application, GUID_NULL if
|
||||
* all applications! */
|
||||
|
||||
DWORD dwMaxPlayers;
|
||||
DWORD dwCurrentPlayers;
|
||||
DWORD dwCurrentPlayers; /* (read only value) */
|
||||
|
||||
union sessionName
|
||||
union /* Session name */
|
||||
{
|
||||
LPWSTR lpszSessionName;
|
||||
LPSTR lpszSessionNameA;
|
||||
};
|
||||
}sess;
|
||||
|
||||
union optnlSessionPasswd
|
||||
union /* Optional password */
|
||||
{
|
||||
LPWSTR lpszPassword;
|
||||
LPSTR lpszPasswordA;
|
||||
};
|
||||
}pass;
|
||||
|
||||
DWORD dwReserved1;
|
||||
DWORD dwReserved2;
|
||||
DWORD dwUser1;
|
||||
|
||||
DWORD dwUser1; /* For use by the application */
|
||||
DWORD dwUser2;
|
||||
DWORD dwUser3;
|
||||
DWORD dwUser4;
|
||||
} DPSESSIONDESC2, *LPDPSESSIONDESC2;
|
||||
typedef const DPSESSIONDESC2* LPCDPSESSIONDESC2;
|
||||
|
||||
#define DPOPEN_JOIN 0x00000001
|
||||
#define DPOPEN_CREATE 0x00000002
|
||||
#define DPOPEN_RETURNSTATUS DPENUMSESSIONS_RETURNSTATUS
|
||||
|
||||
#define DPSESSION_NEWPLAYERSDISABLED 0x00000001
|
||||
#define DPSESSION_MIGRATEHOST 0x00000004
|
||||
#define DPSESSION_NOMESSAGEID 0x00000008
|
||||
#define DPSESSION_JOINDISABLED 0x00000020
|
||||
#define DPSESSION_KEEPALIVE 0x00000040
|
||||
#define DPSESSION_NODATAMESSAGES 0x00000080
|
||||
#define DPSESSION_SECURESERVER 0x00000100
|
||||
#define DPSESSION_PRIVATE 0x00000200
|
||||
#define DPSESSION_PASSWORDREQUIRED 0x00000400
|
||||
#define DPSESSION_MULTICASTSERVER 0x00000800
|
||||
#define DPSESSION_CLIENTSERVER 0x00001000
|
||||
|
||||
typedef struct tagDPLCONNECTION
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
LPDPSESSIONDESC2 lpSessionDesc;
|
||||
LPDPNAME lpPlayerName;
|
||||
GUID guidSP;
|
||||
LPVOID lpAddress;
|
||||
DWORD dwAddressSize;
|
||||
LPDPSESSIONDESC2 lpSessionDesc; /* Ptr to session desc to use for connect */
|
||||
LPDPNAME lpPlayerName; /* Ptr to player name structure */
|
||||
GUID guidSP; /* GUID of Service Provider to use */
|
||||
LPVOID lpAddress; /* Ptr to Address of Service Provider to use */
|
||||
DWORD dwAddressSize; /* Size of address data */
|
||||
} DPLCONNECTION, *LPDPLCONNECTION;
|
||||
|
||||
/* DPLCONNECTION flags (for dwFlags) */
|
||||
#define DPLCONNECTION_CREATESESSION DPOPEN_CREATE
|
||||
#define DPLCONNECTION_JOINSESSION DPOPEN_JOIN
|
||||
|
||||
typedef struct tagDPLAPPINFO
|
||||
{
|
||||
DWORD dwSize;
|
||||
|
@ -230,6 +276,62 @@ typedef struct DPCOMPOUNDADDRESSELEMENT
|
|||
} DPCOMPOUNDADDRESSELEMENT, *LPDPCOMPOUNDADDRESSELEMENT;
|
||||
typedef const DPCOMPOUNDADDRESSELEMENT *LPCDPCOMPOUNDADDRESSELEMENT;
|
||||
|
||||
typedef struct tagDPCHAT
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
union
|
||||
{ // Message string
|
||||
LPWSTR lpszMessage; // Unicode
|
||||
LPSTR lpszMessageA; // ANSI
|
||||
}msgstr;
|
||||
} DPCHAT, *LPDPCHAT;
|
||||
|
||||
typedef struct tagDPSECURITYDESC
|
||||
{
|
||||
DWORD dwSize; // Size of structure
|
||||
DWORD dwFlags; // Not used. Must be zero.
|
||||
union
|
||||
{ // SSPI provider name
|
||||
LPWSTR lpszSSPIProvider; // Unicode
|
||||
LPSTR lpszSSPIProviderA; // ANSI
|
||||
}sspi;
|
||||
union
|
||||
{ // CAPI provider name
|
||||
LPWSTR lpszCAPIProvider; // Unicode
|
||||
LPSTR lpszCAPIProviderA; // ANSI
|
||||
}capi;
|
||||
DWORD dwCAPIProviderType; // Crypto Service Provider type
|
||||
DWORD dwEncryptionAlgorithm; // Encryption Algorithm type
|
||||
} DPSECURITYDESC, *LPDPSECURITYDESC;
|
||||
|
||||
typedef const DPSECURITYDESC *LPCDPSECURITYDESC;
|
||||
|
||||
typedef struct tagDPCREDENTIALS
|
||||
{
|
||||
DWORD dwSize; // Size of structure
|
||||
DWORD dwFlags; // Not used. Must be zero.
|
||||
union
|
||||
{ // User name of the account
|
||||
LPWSTR lpszUsername; // Unicode
|
||||
LPSTR lpszUsernameA; // ANSI
|
||||
}name;
|
||||
union
|
||||
{ // Password of the account
|
||||
LPWSTR lpszPassword; // Unicode
|
||||
LPSTR lpszPasswordA; // ANSI
|
||||
}pass;
|
||||
union
|
||||
{ // Domain name of the account
|
||||
LPWSTR lpszDomain; // Unicode
|
||||
LPSTR lpszDomainA; // ANSI
|
||||
}domain;
|
||||
} DPCREDENTIALS, *LPDPCREDENTIALS;
|
||||
|
||||
typedef const DPCREDENTIALS *LPCDPCREDENTIALS;
|
||||
|
||||
|
||||
|
||||
typedef BOOL32 (CALLBACK* LPDPENUMDPCALLBACKW)(
|
||||
LPGUID lpguidSP,
|
||||
LPWSTR lpSPName,
|
||||
|
@ -255,9 +357,16 @@ typedef BOOL32 (CALLBACK* LPDPENUMCONNECTIONSCALLBACK)(
|
|||
DWORD dwFlags,
|
||||
LPVOID lpContext);
|
||||
|
||||
typedef BOOL32 (CALLBACK* LPDPENUMSESSIONSCALLBACK)(
|
||||
LPDPSESSIONDESC lpDPSessionDesc,
|
||||
LPVOID lpContext,
|
||||
LPDWORD lpdwTimeOut,
|
||||
DWORD dwFlags);
|
||||
|
||||
|
||||
extern HRESULT WINAPI DirectPlayEnumerateA( LPDPENUMDPCALLBACKA, LPVOID );
|
||||
extern HRESULT WINAPI DirectPlayEnumerateW( LPDPENUMDPCALLBACKW, LPVOID );
|
||||
extern HRESULT WINAPI DirectPlayCreate( LPGUID lpGUID, LPDIRECTPLAY *lplpDP, IUnknown *pUnk);
|
||||
extern HRESULT WINAPI DirectPlayCreate( LPGUID lpGUID, LPDIRECTPLAY2 *lplpDP, IUnknown *pUnk);
|
||||
|
||||
|
||||
/* Direct Play Lobby 1 */
|
||||
|
@ -268,8 +377,8 @@ typedef struct IDirectPlayLobby IDirectPlayLobbyA, *LPDIRECTPLAYLOBBYA;
|
|||
typedef struct IDirectPlayLobby2 IDirectPlayLobby2, *LPDIRECTPLAYLOBBY2;
|
||||
typedef struct IDirectPlayLobby2 IDirectPlayLobby2A, *LPDIRECTPLAYLOBBY2A;
|
||||
|
||||
extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY2 *, IUnknown *, LPVOID, DWORD );
|
||||
extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBY2A *, IUnknown *, LPVOID, DWORD );
|
||||
extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY *, IUnknown *, LPVOID, DWORD );
|
||||
extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBYA *, IUnknown *, LPVOID, DWORD );
|
||||
|
||||
|
||||
|
||||
|
@ -289,6 +398,20 @@ typedef BOOL32 (CALLBACK* LPDPLENUMLOCALAPPLICATIONSCALLBACK)(
|
|||
LPVOID lpContext,
|
||||
DWORD dwFlags );
|
||||
|
||||
typedef BOOL32 (CALLBACK* LPDPENUMPLAYERSCALLBACK2)(
|
||||
DPID dpId,
|
||||
DWORD dwPlayerType,
|
||||
LPCDPNAME lpName,
|
||||
DWORD dwFlags,
|
||||
LPVOID lpContext );
|
||||
|
||||
typedef BOOL32 (CALLBACK* LPDPENUMSESSIONSCALLBACK2)(
|
||||
LPCDPSESSIONDESC2 lpThisSD,
|
||||
LPDWORD lpdwTimeOut,
|
||||
DWORD dwFlags,
|
||||
LPVOID lpContext );
|
||||
|
||||
|
||||
|
||||
#define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
|
||||
#define STDMETHOD_(ret,xfn) ret (CALLBACK *fn##xfn)
|
||||
|
@ -296,8 +419,264 @@ typedef BOOL32 (CALLBACK* LPDPLENUMLOCALAPPLICATIONSCALLBACK)(
|
|||
#define FAR
|
||||
#define THIS_ THIS,
|
||||
|
||||
#define THIS LPDIRECTPLAY2 this
|
||||
typedef struct tagLPDIRECTPLAY2_VTABLE
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
/*** IDirectPlay2 methods ***/
|
||||
STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE;
|
||||
STDMETHOD(Close) (THIS) PURE;
|
||||
STDMETHOD(CreateGroup) (THIS_ LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE;
|
||||
STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPDPNAME,HANDLE32,LPVOID,DWORD,DWORD) PURE;
|
||||
STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE;
|
||||
STDMETHOD(DestroyGroup) (THIS_ DPID) PURE;
|
||||
STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE;
|
||||
STDMETHOD(EnumGroupPlayers) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
||||
STDMETHOD(EnumGroups) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
||||
STDMETHOD(EnumPlayers) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
||||
STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC2,DWORD,LPDPENUMSESSIONSCALLBACK2,LPVOID,DWORD) PURE;
|
||||
STDMETHOD(GetCaps) (THIS_ LPDPCAPS,DWORD) PURE;
|
||||
STDMETHOD(GetGroupData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE;
|
||||
STDMETHOD(GetGroupName) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
||||
STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE;
|
||||
STDMETHOD(GetPlayerAddress) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
||||
STDMETHOD(GetPlayerCaps) (THIS_ DPID,LPDPCAPS,DWORD) PURE;
|
||||
STDMETHOD(GetPlayerData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE;
|
||||
STDMETHOD(GetPlayerName) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
||||
STDMETHOD(GetSessionDesc) (THIS_ LPVOID,LPDWORD) PURE;
|
||||
STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
|
||||
STDMETHOD(Open) (THIS_ LPDPSESSIONDESC2,DWORD) PURE;
|
||||
STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE;
|
||||
STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE;
|
||||
STDMETHOD(SetGroupData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE;
|
||||
STDMETHOD(SetGroupName) (THIS_ DPID,LPDPNAME,DWORD) PURE;
|
||||
STDMETHOD(SetPlayerData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE;
|
||||
STDMETHOD(SetPlayerName) (THIS_ DPID,LPDPNAME,DWORD) PURE;
|
||||
STDMETHOD(SetSessionDesc) (THIS_ LPDPSESSIONDESC2,DWORD) PURE;
|
||||
} DIRECTPLAY2_VTABLE, *LPDIRECTPLAY2_VTABLE;
|
||||
#undef THIS
|
||||
|
||||
#define THIS LPDIRECTPLAY3 this
|
||||
typedef struct tagLPDIRECTPLAY3_VTABLE
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
/*** IDirectPlay2 methods ***/
|
||||
STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE;
|
||||
STDMETHOD(Close) (THIS) PURE;
|
||||
STDMETHOD(CreateGroup) (THIS_ LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE;
|
||||
STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPDPNAME,HANDLE32,LPVOID,DWORD,DWORD) PURE;
|
||||
STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE;
|
||||
STDMETHOD(DestroyGroup) (THIS_ DPID) PURE;
|
||||
STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE;
|
||||
STDMETHOD(EnumGroupPlayers) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
||||
STDMETHOD(EnumGroups) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
||||
STDMETHOD(EnumPlayers) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
||||
STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC2,DWORD,LPDPENUMSESSIONSCALLBACK2,LPVOID,DWORD) PURE;
|
||||
STDMETHOD(GetCaps) (THIS_ LPDPCAPS,DWORD) PURE;
|
||||
STDMETHOD(GetGroupData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE;
|
||||
STDMETHOD(GetGroupName) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
||||
STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE;
|
||||
STDMETHOD(GetPlayerAddress) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
||||
STDMETHOD(GetPlayerCaps) (THIS_ DPID,LPDPCAPS,DWORD) PURE;
|
||||
STDMETHOD(GetPlayerData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE;
|
||||
STDMETHOD(GetPlayerName) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
||||
STDMETHOD(GetSessionDesc) (THIS_ LPVOID,LPDWORD) PURE;
|
||||
STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
|
||||
STDMETHOD(Open) (THIS_ LPDPSESSIONDESC2,DWORD) PURE;
|
||||
STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE;
|
||||
STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE;
|
||||
STDMETHOD(SetGroupData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE;
|
||||
STDMETHOD(SetGroupName) (THIS_ DPID,LPDPNAME,DWORD) PURE;
|
||||
STDMETHOD(SetPlayerData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE;
|
||||
STDMETHOD(SetPlayerName) (THIS_ DPID,LPDPNAME,DWORD) PURE;
|
||||
STDMETHOD(SetSessionDesc) (THIS_ LPDPSESSIONDESC2,DWORD) PURE;
|
||||
|
||||
/*** IDirectPlay3 methods ***/
|
||||
STDMETHOD(AddGroupToGroup) (THIS_ DPID, DPID) PURE;
|
||||
STDMETHOD(CreateGroupInGroup) (THIS_ DPID,LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE;
|
||||
STDMETHOD(DeleteGroupFromGroup) (THIS_ DPID,DPID) PURE;
|
||||
STDMETHOD(EnumConnections) (THIS_ LPCGUID,LPDPENUMCONNECTIONSCALLBACK,LPVOID,DWORD) PURE;
|
||||
STDMETHOD(EnumGroupsInGroup) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
||||
STDMETHOD(GetGroupConnectionSettings) (THIS_ DWORD, DPID, LPVOID, LPDWORD) PURE;
|
||||
STDMETHOD(InitializeConnection) (THIS_ LPVOID,DWORD) PURE;
|
||||
STDMETHOD(SecureOpen) (THIS_ LPCDPSESSIONDESC2,DWORD,LPCDPSECURITYDESC,LPCDPCREDENTIALS) PURE;
|
||||
STDMETHOD(SendChatMessage) (THIS_ DPID,DPID,DWORD,LPDPCHAT);
|
||||
STDMETHOD(SetGroupConnectionSettings) (THIS_ DWORD,DPID,LPDPLCONNECTION) PURE;
|
||||
STDMETHOD(StartSession) (THIS_ DWORD,DPID);
|
||||
STDMETHOD(GetGroupFlags) (THIS_ DPID,LPDWORD);
|
||||
STDMETHOD(GetGroupParent) (THIS_ DPID,LPDPID);
|
||||
STDMETHOD(GetPlayerAccount) (THIS_ DPID, DWORD, LPVOID, LPDWORD) PURE;
|
||||
STDMETHOD(GetPlayerFlags) (THIS_ DPID,LPDWORD);
|
||||
} DIRECTPLAY3_VTABLE, *LPDIRECTPLAY3_VTABLE;
|
||||
#undef THIS
|
||||
|
||||
|
||||
/**********************************************************************************
|
||||
*
|
||||
* Macros for a nicer interface to DirectPlay
|
||||
*
|
||||
**********************************************************************************/
|
||||
|
||||
/* COM Interface */
|
||||
#define IDirectPlay_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectPlay_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectPlay_Release(p) (p)->lpVtbl->Release(p)
|
||||
|
||||
#define IDirectPlay2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectPlay2_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectPlay2_Release(p) (p)->lpVtbl->Release(p)
|
||||
|
||||
#define IDirectPlay3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectPlay3_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectPlay3_Release(p) (p)->lpVtbl->Release(p)
|
||||
|
||||
/* Direct Play 1&2 Interface */
|
||||
#define IDirectPlay_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
|
||||
#define IDirectPlay_Close(p) (p)->lpVtbl->Close(p)
|
||||
#define IDirectPlay_CreateGroup(p,a,b,c) (p)->lpVtbl->CreateGroup(p,a,b,c)
|
||||
#define IDirectPlay_CreatePlayer(p,a,b,c,d) (p)->lpVtbl->CreatePlayer(p,a,b,c,d)
|
||||
#define IDirectPlay_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
|
||||
#define IDirectPlay_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
|
||||
#define IDirectPlay_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
|
||||
#define IDirectPlay_EnableNewPlayers(p,a) (p)->lpVtbl->EnableNewPlayers(p,a)
|
||||
#define IDirectPlay_EnumGroupPlayers(p,a,b,c,d) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d)
|
||||
#define IDirectPlay_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
|
||||
#define IDirectPlay_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
|
||||
#define IDirectPlay_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
|
||||
#define IDirectPlay_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
|
||||
#define IDirectPlay_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
|
||||
#define IDirectPlay_GetPlayerCaps(p,a,b) (p)->lpVtbl->GetPlayerCaps(p,a,b)
|
||||
#define IDirectPlay_GetPlayerName(p,a,b,c,d,e) (p)->lpVtbl->GetPlayerName(p,a,b,c,d,e)
|
||||
#define IDirectPlay_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
|
||||
#define IDirectPlay_Open(p,a) (p)->lpVtbl->Open(p,a)
|
||||
#define IDirectPlay_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
|
||||
#define IDirectPlay_SaveSession(p,a) (p)->lpVtbl->SaveSession(p,a)
|
||||
#define IDirectPlay_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
|
||||
#define IDirectPlay_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
|
||||
|
||||
#define IDirectPlay2_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
|
||||
#define IDirectPlay2_Close(p) (p)->lpVtbl->Close(p)
|
||||
#define IDirectPlay2_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
|
||||
#define IDirectPlay2_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f)
|
||||
#define IDirectPlay2_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
|
||||
#define IDirectPlay2_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
|
||||
#define IDirectPlay2_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
|
||||
#define IDirectPlay2_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e)
|
||||
#define IDirectPlay2_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
|
||||
#define IDirectPlay2_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
|
||||
#define IDirectPlay2_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
|
||||
#define IDirectPlay2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
|
||||
#define IDirectPlay2_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
|
||||
#define IDirectPlay2_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d)
|
||||
#define IDirectPlay2_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c)
|
||||
#define IDirectPlay2_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c)
|
||||
#define IDirectPlay2_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c)
|
||||
#define IDirectPlay2_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d)
|
||||
#define IDirectPlay2_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c)
|
||||
#define IDirectPlay2_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b)
|
||||
#define IDirectPlay2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
|
||||
#define IDirectPlay2_Open(p,a,b) (p)->lpVtbl->Open(p,a,b)
|
||||
#define IDirectPlay2_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
|
||||
#define IDirectPlay2_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
|
||||
#define IDirectPlay2_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d)
|
||||
#define IDirectPlay2_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c)
|
||||
#define IDirectPlay2_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d)
|
||||
#define IDirectPlay2_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
|
||||
#define IDirectPlay2_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b)
|
||||
|
||||
#define IDirectPlay3_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
|
||||
#define IDirectPlay3_Close(p) (p)->lpVtbl->Close(p)
|
||||
#define IDirectPlay3_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
|
||||
#define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f)
|
||||
#define IDirectPlay3_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
|
||||
#define IDirectPlay3_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
|
||||
#define IDirectPlay3_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
|
||||
#define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e)
|
||||
#define IDirectPlay3_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
|
||||
#define IDirectPlay3_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
|
||||
#define IDirectPlay3_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
|
||||
#define IDirectPlay3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
|
||||
#define IDirectPlay3_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
|
||||
#define IDirectPlay3_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d)
|
||||
#define IDirectPlay3_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c)
|
||||
#define IDirectPlay3_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c)
|
||||
#define IDirectPlay3_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c)
|
||||
#define IDirectPlay3_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d)
|
||||
#define IDirectPlay3_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c)
|
||||
#define IDirectPlay3_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b)
|
||||
#define IDirectPlay3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
|
||||
#define IDirectPlay3_Open(p,a,b) (p)->lpVtbl->Open(p,a,b)
|
||||
#define IDirectPlay3_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
|
||||
#define IDirectPlay3_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
|
||||
#define IDirectPlay3_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d)
|
||||
#define IDirectPlay3_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c)
|
||||
#define IDirectPlay3_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d)
|
||||
#define IDirectPlay3_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
|
||||
#define IDirectPlay3_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b)
|
||||
|
||||
|
||||
/* Direct Play 3 Interface. */
|
||||
|
||||
#define IDirectPlay3_AddGroupToGroup(p,a,b) (p)->lpVtbl->AddGroupToGroup(p,a,b)
|
||||
#define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->lpVtbl->CreateGroupInGroup(p,a,b,c,d,e,f)
|
||||
#define IDirectPlay3_DeleteGroupFromGroup(p,a,b) (p)->lpVtbl->DeleteGroupFromGroup(p,a,b)
|
||||
#define IDirectPlay3_EnumConnections(p,a,b,c,d) (p)->lpVtbl->EnumConnections(p,a,b,c,d)
|
||||
#define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupsInGroup(p,a,b,c,d,e)
|
||||
#define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetGroupConnectionSettings(p,a,b,c,d)
|
||||
#define IDirectPlay3_InitializeConnection(p,a,b) (p)->lpVtbl->InitializeConnection(p,a,b)
|
||||
#define IDirectPlay3_SecureOpen(p,a,b,c,d) (p)->lpVtbl->SecureOpen(p,a,b,c,d)
|
||||
#define IDirectPlay3_SendChatMessage(p,a,b,c,d) (p)->lpVtbl->SendChatMessage(p,a,b,c,d)
|
||||
#define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) (p)->lpVtbl->SetGroupConnectionSettings(p,a,b,c)
|
||||
#define IDirectPlay3_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b)
|
||||
#define IDirectPlay3_GetGroupFlags(p,a,b) (p)->lpVtbl->GetGroupFlags(p,a,b)
|
||||
#define IDirectPlay3_GetGroupParent(p,a,b) (p)->lpVtbl->GetGroupParent(p,a,b)
|
||||
#define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) (p)->lpVtbl->GetPlayerAccount(p,a,b,c,d)
|
||||
#define IDirectPlay3_GetPlayerFlags(p,a,b) (p)->lpVtbl->GetPlayerFlags(p,a,b)
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DIRECT PLAY LOBBY VIRTUAL TABLE DEFINITIONS
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#define THIS LPDIRECTPLAYLOBBY this
|
||||
typedef struct tagLPDIRECTPLAYLOBBY_VTABLE
|
||||
{
|
||||
/* IUnknown Methods "Inherited Methods" */
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
/* IDirectPlayLobby Methods */
|
||||
STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY *, IUnknown *) PURE;
|
||||
STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE;
|
||||
STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE;
|
||||
STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE;
|
||||
STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE;
|
||||
STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE;
|
||||
STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE;
|
||||
STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE32) PURE;
|
||||
STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE;
|
||||
STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE;
|
||||
STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE32) PURE;
|
||||
|
||||
|
||||
} DIRECTPLAYLOBBY_VTABLE, *LPDIRECTPLAYLOBBY_VTABLE;
|
||||
#undef THIS
|
||||
|
||||
#define THIS LPDIRECTPLAYLOBBY2 this
|
||||
typedef struct tagLPDIRECTPLAYLOBBY2_VTABLE {
|
||||
typedef struct tagLPDIRECTPLAYLOBBY2_VTABLE
|
||||
{
|
||||
/* IUnknown Methods "Inherited Methods" */
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
|
@ -320,12 +699,54 @@ typedef struct tagLPDIRECTPLAYLOBBY2_VTABLE {
|
|||
STDMETHOD(CreateCompoundAddress)(THIS_ LPCDPCOMPOUNDADDRESSELEMENT, DWORD, LPVOID, LPDWORD) PURE;
|
||||
|
||||
} DIRECTPLAYLOBBY2_VTABLE, *LPDIRECTPLAYLOBBY2_VTABLE;
|
||||
#undef THIS
|
||||
|
||||
/* Is this right? How does one know? */
|
||||
struct IDirectPlayLobby2 {
|
||||
LPDIRECTPLAYLOBBY2_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
};
|
||||
/**********************************************************************************
|
||||
*
|
||||
* Macros for a nicer interface to DirectPlayLobby
|
||||
*
|
||||
**********************************************************************************/
|
||||
|
||||
/* COM Interface */
|
||||
|
||||
#define IDirectPlayLobby_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectPlayLobby_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectPlayLobby_Release(p) (p)->lpVtbl->Release(p)
|
||||
|
||||
#define IDirectPlayLobby2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectPlayLobby2_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectPlayLobby2_Release(p) (p)->lpVtbl->Release(p)
|
||||
|
||||
/* Direct Play Lobby 1 */
|
||||
|
||||
#define IDirectPlayLobby_Connect(p,a,b,c) (p)->lpVtbl->Connect(p,a,b,c)
|
||||
#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->lpVtbl->CreateAddress(p,a,b,c,d,e,f)
|
||||
#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->lpVtbl->EnumAddress(p,a,b,c,d)
|
||||
#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->lpVtbl->EnumAddressTypes(p,a,b,c,d)
|
||||
#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->lpVtbl->EnumLocalApplications(p,a,b,c)
|
||||
#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->lpVtbl->GetConnectionSettings(p,a,b,c)
|
||||
#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->lpVtbl->ReceiveLobbyMessage(p,a,b,c,d,e)
|
||||
#define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->lpVtbl->RunApplication(p,a,b,c,d)
|
||||
#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->lpVtbl->SendLobbyMessage(p,a,b,c,d)
|
||||
#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c)
|
||||
#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->lpVtbl->SetLobbyMessageEvent(p,a,b,c)
|
||||
|
||||
#define IDirectPlayLobby2_Connect(p,a,b,c) (p)->lpVtbl->Connect(p,a,b,c)
|
||||
#define IDirectPlayLobby2_CreateAddress(p,a,b,c,d,e,f) (p)->lpVtbl->CreateAddress(p,a,b,c,d,e,f)
|
||||
#define IDirectPlayLobby2_EnumAddress(p,a,b,c,d) (p)->lpVtbl->EnumAddress(p,a,b,c,d)
|
||||
#define IDirectPlayLobby2_EnumAddressTypes(p,a,b,c,d) (p)->lpVtbl->EnumAddressTypes(p,a,b,c,d)
|
||||
#define IDirectPlayLobby2_EnumLocalApplications(p,a,b,c) (p)->lpVtbl->EnumLocalApplications(p,a,b,c)
|
||||
#define IDirectPlayLobby2_GetConnectionSettings(p,a,b,c) (p)->lpVtbl->GetConnectionSettings(p,a,b,c)
|
||||
#define IDirectPlayLobby2_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->lpVtbl->ReceiveLobbyMessage(p,a,b,c,d,e)
|
||||
#define IDirectPlayLobby2_RunApplication(p,a,b,c,d) (p)->lpVtbl->RunApplication(p,a,b,c,d)
|
||||
#define IDirectPlayLobby2_SendLobbyMessage(p,a,b,c,d) (p)->lpVtbl->SendLobbyMessage(p,a,b,c,d)
|
||||
#define IDirectPlayLobby2_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c)
|
||||
#define IDirectPlayLobby2_SetLobbyMessageEvent(p,a,b,c) (p)->lpVtbl->SetLobbyMessageEvent(p,a,b,c)
|
||||
|
||||
|
||||
/* Direct Play Lobby 2 */
|
||||
|
||||
#define IDirectPlayLobby2_CreateCompoundAddress(p,a,b,c,d) (p)->lpVtbl->CreateCompoundAddress(p,a,b,c,d)
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
|
|
|
@ -47,6 +47,8 @@ typedef struct
|
|||
(((handle)==0) ? GetStdHandle(STD_INPUT_HANDLE) : \
|
||||
((handle)==1) ? GetStdHandle(STD_OUTPUT_HANDLE) : \
|
||||
((handle)==2) ? GetStdHandle(STD_ERROR_HANDLE) : \
|
||||
((handle)==3) ? GetStdHandle(STD_ERROR_HANDLE) : \
|
||||
((handle)==4) ? GetStdHandle(STD_ERROR_HANDLE) : \
|
||||
((handle)>=0x400) ? handle : \
|
||||
(handle)-5)
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ extern HGLOBAL16 GLOBAL_CreateBlock( UINT16 flags, const void *ptr, DWORD size,
|
|||
BOOL16 is32Bit, BOOL16 isReadOnly,
|
||||
SHMDATA *shmdata);
|
||||
extern BOOL16 GLOBAL_FreeBlock( HGLOBAL16 handle );
|
||||
extern BOOL16 GLOBAL_MoveBlock( HGLOBAL16 handle, const void *ptr, DWORD size );
|
||||
extern HGLOBAL16 GLOBAL_Alloc( WORD flags, DWORD size, HGLOBAL16 hOwner,
|
||||
BOOL16 isCode, BOOL16 is32Bit,
|
||||
BOOL16 isReadOnly );
|
||||
|
|
|
@ -10,11 +10,9 @@
|
|||
|
||||
typedef struct
|
||||
{
|
||||
UINT32 mask;
|
||||
INT32 cxy;
|
||||
HBITMAP32 hbm;
|
||||
LPSTR pszText;
|
||||
INT32 cchTextMax;
|
||||
INT32 fmt;
|
||||
LPARAM lParam;
|
||||
INT32 iImage;
|
||||
|
|
|
@ -5,8 +5,10 @@
|
|||
#ifndef __WINE_IMM_H
|
||||
#define __WINE_IMM_H
|
||||
|
||||
typedef DWORD HIMC32;
|
||||
typedef DWORD HIMCC32;
|
||||
#include "wintypes.h"
|
||||
|
||||
typedef HANDLE32 HIMC32;
|
||||
typedef HANDLE32 HIMCC32;
|
||||
|
||||
typedef HKL32 *LPHKL32;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue