Release 980201
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [files/drive.c] Added Device= parameter to drive configuration. * [if1632/relay.c] Throw() and Catch() now use the correct CATCHBUF layout (untested). * [tools/build.c] [include/stackframe.h] [loader/task.c] Moved 16-bit stack pointer into thread database. Save current %fs while running 16-bit code. Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de> * [graphics/mapping.c] Made DPtoLP32 and LPtoDP32 respect world transforms. * [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec] [include/path.h] More path support. * [include/gdi.h] [include/windows.h] [objects/dc.c] [relay/gdi32.spec] Support for Get/SetArcDirection and Get/SetWorldTransform * [windows/hook.c] Fixed a bug in HOOK_Map16To32Common. Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com> * [graphics/metafiledrv/init.c] [objects/metafile.c] Documentation for metafile related API calls. Fixed a bug to avoid documenting it. * [include/windows.h] Declaration for LoadImage. Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [graphics/win16drv/*] Changes to printing code to enable use of printer fonts with the win3.1 postscript driver. Remember to add printer=on to [wine] section of wine.conf . You will also need to disable truetype fonts from control panel. Winword 6.0 and Write seem to be happy with this... * [include/bitmap.h] Fix Widthbytes for 15bpp displays. Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk> * [tsx11/*] [include/ts*] [tools/make_X11wrappers] Implemented thread-safe X11 wrappers. Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu> * [windows/queue.c] Forgot to convert thdb to thread_id. * [misc/registry.c] Sped up Windows 95 registry reading. Changed code to traverse registry as a tree rather than read in all possible keys (including dead ones). Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [loader/pe_image.c][Makefile.in][scheduler/thread.c] [libtest/hello5.c] Don't exit() on failed to load referenced dlls. Fixed static tls allocation for multiple threads. WINELIB should now be able to load PE dlls. A sample winelib program, that dynamically loads a internal dll is included. * [graphics/ddraw.c][include/ddraw.h][include/d3d.h] Cleaned up and enhanced further. Added several DirectX5 interface definitions and DirectSurface3 implementation. Stubs for D3D (NOT coming soon, just there so it fails safely). * [multimedia/dsound.c][include/dsound.h] Actually works now for a lot of cases. Some DirectX5 stuff added. Still lacking several features. * [windows/dinput.c][include/dinput.h] Started implementing DirectInput. Doesn't work yet, don't know why. * [if1632/thunk.c][misc/callbacks.c] [win32/kernel.c][include/callbacks.h] Added WOWCallback16Ex, WOWHandle32. * [misc/cpu.c] Fixed GetSystemInfo, IsProcessorFeaturePresent. * [multimedia/joystick.c][multimedia/time.c] Several fixes. Small hack to get timerevents in timeGetTime() loops. Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de> * [configure.in] Fixed check for union semun on FreeBSD systems. Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com> * [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc] [resources/sysres_Sw.rc] Added/updated Swedish language support. Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c] [windows/win.c] [windows/dce.c] [windows/winpos.c] Bug fixes. Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net> * [msdos/int25.c] [msdos/int26.c] Implemented "native" absolute disk read/write access. * [msdos/int13.c] [msdos/ioports.c] Enhanced GET DRIVE PARAMETERS (int13 AH=08). * [graphics/win16drv/prtdrv.c] [if1632/gdi.spec] Fixed typos, implemented dmEnumDFonts, Started implementation of dmRealizeObject. * [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec] Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented CoFileTimeNow. * [if1632/kernel.spec] [include/windows.h] [memory/global.c] [memory/string.c] [misc/kernel.c] [misc/Makefile.in] [misc/toolhelp.c] [msdos/int21.c] Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer, stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook (Undocumented Windows). * [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c] Misc stubs. * [if1632/winaspi.spec] [misc/aspi.c] Implemented GetASPIDLLVersion. * [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in] Added handler for Int 0x20 (terminate program, _very_ old-fashioned). * [misc/w32scomb.c] Implemented Get16DLLAddress() partially (big thanks to Marcus and Alexandre). * [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec] Added built-in DPLAY.DLL. * [relay32/winmm.spec] [multimedia/joystick.c] Added joySetThreshold. * [misc/windebug.c] Added WinNotify. * [win32/console.c] Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer, WriteConsoleOutput32A. * [windows/user.c] Stub SetEventHook. Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com> * [windows/painting.c] Fixed broken restore-to-maximized. Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es> * [documentation/wine.man] [include/options.h] [misc/main.c] [ole/ole2nls.c] [resources/sysres.c] [resources/sysres_Ca.rc] [resources/Makefile.in] Added language catalan. (Afegit l'idioma catal).
This commit is contained in:
parent
0623a6f3cf
commit
60ce85c965
18
ANNOUNCE
18
ANNOUNCE
|
@ -1,13 +1,15 @@
|
|||
This is release 980118 of Wine, the MS Windows emulator. This is still a
|
||||
This is release 980201 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-980118: (see ChangeLog for details)
|
||||
- New region implementation based on X11 code.
|
||||
- Improvements to DirectDraw and DirectSound.
|
||||
WHAT'S NEW with Wine-980201: (see ChangeLog for details)
|
||||
- Support for Catalan and Swedish languages.
|
||||
- More Direct* support.
|
||||
- X11 thread-safe wrappers.
|
||||
- Support for Postscript printer fonts.
|
||||
- Lots of bug fixes.
|
||||
|
||||
See the README file in the distribution for installation instructions.
|
||||
|
@ -16,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-980118.tar.gz
|
||||
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-980118.tar.gz
|
||||
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-980118.tar.gz
|
||||
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-980118.tar.gz
|
||||
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-980201.tar.gz
|
||||
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-980201.tar.gz
|
||||
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-980201.tar.gz
|
||||
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-980201.tar.gz
|
||||
|
||||
It should also be available from any site that mirrors tsx-11 or sunsite.
|
||||
|
||||
|
|
6
BUGS
6
BUGS
|
@ -30,6 +30,10 @@ General:
|
|||
- You can find information about most of the Win32 API calls
|
||||
on the www.microsoft.com (go to 'search').
|
||||
|
||||
* A lot of the extensions to the GDI that were introduced with Win32 are
|
||||
not supported at all or only in a very rudimentary way. (World transforms,
|
||||
arc direction, GM_ADVANCED to name but a few)
|
||||
|
||||
Miscellaneous:
|
||||
|
||||
* 16-bit Eudora 1.5.2 goes into recursion trying to display
|
||||
|
@ -64,8 +68,6 @@ Miscellaneous:
|
|||
* AllocCSToDSAlias() shouldn't alloc alias for the same segment multiple
|
||||
times.
|
||||
|
||||
* X11DRV_PaintRgn doesn't respect mapping modes
|
||||
|
||||
Where to look in source files:
|
||||
|
||||
* grep for FIXME in the source files.
|
||||
|
|
179
ChangeLog
179
ChangeLog
|
@ -1,3 +1,182 @@
|
|||
----------------------------------------------------------------------
|
||||
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
|
||||
|
||||
* [files/drive.c]
|
||||
Added Device= parameter to drive configuration.
|
||||
|
||||
* [if1632/relay.c]
|
||||
Throw() and Catch() now use the correct CATCHBUF layout (untested).
|
||||
|
||||
* [tools/build.c] [include/stackframe.h] [loader/task.c]
|
||||
Moved 16-bit stack pointer into thread database.
|
||||
Save current %fs while running 16-bit code.
|
||||
|
||||
Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
|
||||
|
||||
* [graphics/mapping.c]
|
||||
Made DPtoLP32 and LPtoDP32 respect world transforms.
|
||||
|
||||
* [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec]
|
||||
[include/path.h]
|
||||
More path support.
|
||||
|
||||
* [include/gdi.h] [include/windows.h] [objects/dc.c]
|
||||
[relay/gdi32.spec]
|
||||
Support for Get/SetArcDirection and Get/SetWorldTransform
|
||||
|
||||
* [windows/hook.c]
|
||||
Fixed a bug in HOOK_Map16To32Common.
|
||||
|
||||
Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com>
|
||||
|
||||
* [graphics/metafiledrv/init.c] [objects/metafile.c]
|
||||
Documentation for metafile related API calls. Fixed a bug to avoid
|
||||
documenting it.
|
||||
|
||||
* [include/windows.h]
|
||||
Declaration for LoadImage.
|
||||
|
||||
Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
|
||||
|
||||
* [graphics/win16drv/*]
|
||||
Changes to printing code to enable use of printer fonts with the
|
||||
win3.1 postscript driver. Remember to add printer=on to [wine]
|
||||
section of wine.conf . You will also need to disable truetype
|
||||
fonts from control panel. Winword 6.0 and Write seem to be happy
|
||||
with this...
|
||||
|
||||
* [include/bitmap.h]
|
||||
Fix Widthbytes for 15bpp displays.
|
||||
|
||||
Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
|
||||
|
||||
* [tsx11/*] [include/ts*] [tools/make_X11wrappers]
|
||||
Implemented thread-safe X11 wrappers.
|
||||
|
||||
Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
|
||||
|
||||
* [windows/queue.c]
|
||||
Forgot to convert thdb to thread_id.
|
||||
|
||||
* [misc/registry.c]
|
||||
Sped up Windows 95 registry reading. Changed code to traverse
|
||||
registry as a tree rather than read in all possible keys
|
||||
(including dead ones).
|
||||
|
||||
Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
|
||||
|
||||
* [loader/pe_image.c][Makefile.in][scheduler/thread.c]
|
||||
[libtest/hello5.c]
|
||||
Don't exit() on failed to load referenced dlls.
|
||||
Fixed static tls allocation for multiple threads.
|
||||
WINELIB should now be able to load PE dlls. A sample
|
||||
winelib program, that dynamically loads a internal dll
|
||||
is included.
|
||||
|
||||
* [graphics/ddraw.c][include/ddraw.h][include/d3d.h]
|
||||
Cleaned up and enhanced further. Added several DirectX5
|
||||
interface definitions and DirectSurface3 implementation.
|
||||
Stubs for D3D (NOT coming soon, just there so it fails safely).
|
||||
|
||||
* [multimedia/dsound.c][include/dsound.h]
|
||||
Actually works now for a lot of cases. Some DirectX5 stuff
|
||||
added. Still lacking several features.
|
||||
|
||||
* [windows/dinput.c][include/dinput.h]
|
||||
Started implementing DirectInput. Doesn't work yet, don't
|
||||
know why.
|
||||
|
||||
* [if1632/thunk.c][misc/callbacks.c]
|
||||
[win32/kernel.c][include/callbacks.h]
|
||||
Added WOWCallback16Ex, WOWHandle32.
|
||||
|
||||
* [misc/cpu.c]
|
||||
Fixed GetSystemInfo, IsProcessorFeaturePresent.
|
||||
|
||||
* [multimedia/joystick.c][multimedia/time.c]
|
||||
Several fixes. Small hack to get timerevents in timeGetTime() loops.
|
||||
|
||||
Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de>
|
||||
|
||||
* [configure.in]
|
||||
Fixed check for union semun on FreeBSD systems.
|
||||
|
||||
Sun Jan 18 23:05:04 1998 Karl Backström <karl_b@geocities.com>
|
||||
|
||||
* [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc]
|
||||
[resources/sysres_Sw.rc]
|
||||
Added/updated Swedish language support.
|
||||
|
||||
Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu>
|
||||
|
||||
* [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c]
|
||||
[windows/win.c] [windows/dce.c] [windows/winpos.c]
|
||||
Bug fixes.
|
||||
|
||||
Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net>
|
||||
|
||||
* [msdos/int25.c] [msdos/int26.c]
|
||||
Implemented "native" absolute disk read/write access.
|
||||
|
||||
* [msdos/int13.c] [msdos/ioports.c]
|
||||
Enhanced GET DRIVE PARAMETERS (int13 AH=08).
|
||||
|
||||
* [graphics/win16drv/prtdrv.c] [if1632/gdi.spec]
|
||||
Fixed typos, implemented dmEnumDFonts,
|
||||
Started implementation of dmRealizeObject.
|
||||
|
||||
* [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec]
|
||||
Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented
|
||||
CoFileTimeNow.
|
||||
|
||||
* [if1632/kernel.spec] [include/windows.h] [memory/global.c]
|
||||
[memory/string.c] [misc/kernel.c] [misc/Makefile.in]
|
||||
[misc/toolhelp.c] [msdos/int21.c]
|
||||
Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer,
|
||||
stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook
|
||||
(Undocumented Windows).
|
||||
|
||||
* [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c]
|
||||
Misc stubs.
|
||||
|
||||
* [if1632/winaspi.spec] [misc/aspi.c]
|
||||
Implemented GetASPIDLLVersion.
|
||||
|
||||
* [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in]
|
||||
Added handler for Int 0x20 (terminate program, _very_ old-fashioned).
|
||||
|
||||
* [misc/w32scomb.c]
|
||||
Implemented Get16DLLAddress() partially
|
||||
(big thanks to Marcus and Alexandre).
|
||||
|
||||
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec]
|
||||
Added built-in DPLAY.DLL.
|
||||
|
||||
* [relay32/winmm.spec] [multimedia/joystick.c]
|
||||
Added joySetThreshold.
|
||||
|
||||
* [misc/windebug.c]
|
||||
Added WinNotify.
|
||||
|
||||
* [win32/console.c]
|
||||
Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer,
|
||||
WriteConsoleOutput32A.
|
||||
|
||||
* [windows/user.c]
|
||||
Stub SetEventHook.
|
||||
|
||||
Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com>
|
||||
|
||||
* [windows/painting.c]
|
||||
Fixed broken restore-to-maximized.
|
||||
|
||||
Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es>
|
||||
|
||||
* [documentation/wine.man] [include/options.h]
|
||||
[misc/main.c] [ole/ole2nls.c] [resources/sysres.c]
|
||||
[resources/sysres_Ca.rc] [resources/Makefile.in]
|
||||
Added language catalan. (Afegit l'idioma català).
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Sun Jan 18 17:05:58 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
|
||||
|
||||
|
|
10
Makefile.in
10
Makefile.in
|
@ -40,8 +40,10 @@ LIBSUBDIRS = \
|
|||
multimedia \
|
||||
objects \
|
||||
ole \
|
||||
relay32 \
|
||||
resources \
|
||||
scheduler \
|
||||
tsx11 \
|
||||
win32 \
|
||||
windows
|
||||
|
||||
|
@ -49,8 +51,7 @@ EMUSUBDIRS = \
|
|||
debugger \
|
||||
graphics/win16drv \
|
||||
if1632 \
|
||||
miscemu \
|
||||
relay32
|
||||
miscemu
|
||||
|
||||
PROGSUBDIRS = libtest programs
|
||||
|
||||
|
@ -83,8 +84,10 @@ LIBOBJS = \
|
|||
multimedia/multimedia.o \
|
||||
objects/objects.o \
|
||||
ole/ole.o \
|
||||
relay32/relay32.o \
|
||||
resources/resources.o \
|
||||
scheduler/scheduler.o \
|
||||
tsx11/tsx11.o \
|
||||
win32/win32.o \
|
||||
windows/windows.o
|
||||
|
||||
|
@ -92,8 +95,7 @@ EMUOBJS = \
|
|||
debugger/debugger.o \
|
||||
graphics/win16drv/win16drv.o \
|
||||
if1632/if1632.o \
|
||||
miscemu/miscemu.o \
|
||||
relay32/relay32.o
|
||||
miscemu/miscemu.o
|
||||
|
||||
all: $(MAIN_TARGET)
|
||||
|
||||
|
|
|
@ -2039,8 +2039,8 @@ else
|
|||
#include <sys/soundcard.h>
|
||||
int main() {
|
||||
|
||||
/* check for open sound system and one of the SNDCTL_ defines to be sure */
|
||||
#if !defined(OPEN_SOUND_SYSTEM) || !defined(SNDCTL_DSP_STEREO)
|
||||
/* check for one of the Open Sound System specific SNDCTL_ defines */
|
||||
#if !defined(SNDCTL_DSP_STEREO)
|
||||
#error No open sound system
|
||||
#endif
|
||||
|
||||
|
@ -2077,12 +2077,13 @@ else
|
|||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2079 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/sem.h>
|
||||
int main() {
|
||||
union semun foo
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_union_semun="yes"
|
||||
else
|
||||
|
@ -2110,7 +2111,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:2114: checking "for gcc strength-reduce bug"" >&5
|
||||
echo "configure:2115: 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
|
||||
|
@ -2118,7 +2119,7 @@ else
|
|||
ac_cv_c_gcc_strength_bug="yes"
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2122 "configure"
|
||||
#line 2123 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main(void) {
|
||||
|
@ -2129,7 +2130,7 @@ int main(void) {
|
|||
exit( Array[1] != -2 );
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:2133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:2134: \"$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
|
||||
|
@ -2152,7 +2153,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "whether external symbols need an underscore prefix"""... $ac_c" 1>&6
|
||||
echo "configure:2156: checking "whether external symbols need an underscore prefix"" >&5
|
||||
echo "configure:2157: 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
|
||||
|
@ -2164,14 +2165,14 @@ _ac_test:
|
|||
.long 0
|
||||
EOF
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2168 "configure"
|
||||
#line 2169 "configure"
|
||||
#include "confdefs.h"
|
||||
extern int ac_test;
|
||||
int main() {
|
||||
if (ac_test) return 1
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_extern_prefix="yes"
|
||||
else
|
||||
|
@ -2195,7 +2196,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "whether assembler accepts .string"""... $ac_c" 1>&6
|
||||
echo "configure:2199: checking "whether assembler accepts .string"" >&5
|
||||
echo "configure:2200: 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
|
||||
|
@ -2205,14 +2206,14 @@ cat > conftest_asm.s <<EOF
|
|||
.string "test"
|
||||
EOF
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2209 "configure"
|
||||
#line 2210 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_asm_string="yes"
|
||||
else
|
||||
|
@ -2239,21 +2240,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:2243: checking "whether we can build a dll"" >&5
|
||||
echo "configure:2244: 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 2250 "configure"
|
||||
#line 2251 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
return 1
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_dll="yes"
|
||||
else
|
||||
|
@ -2281,12 +2282,12 @@ fi
|
|||
for ac_func in clone memmove strerror tcgetattr usleep wait4 waitpid
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:2285: checking for $ac_func" >&5
|
||||
echo "configure:2286: 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 2290 "configure"
|
||||
#line 2291 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -2309,7 +2310,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
|
@ -2337,17 +2338,17 @@ for ac_hdr in wctype.h
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:2341: checking for $ac_hdr" >&5
|
||||
echo "configure:2342: 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 2346 "configure"
|
||||
#line 2347 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:2351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:2352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -2374,12 +2375,12 @@ fi
|
|||
done
|
||||
|
||||
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
|
||||
echo "configure:2378: checking whether stat file-mode macros are broken" >&5
|
||||
echo "configure:2379: 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 2383 "configure"
|
||||
#line 2384 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -2430,12 +2431,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for working const""... $ac_c" 1>&6
|
||||
echo "configure:2434: checking for working const" >&5
|
||||
echo "configure:2435: 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 2439 "configure"
|
||||
#line 2440 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
|
@ -2484,7 +2485,7 @@ ccp = (char const *const *) p;
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_const=yes
|
||||
else
|
||||
|
@ -2505,12 +2506,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
|
||||
echo "configure:2509: checking for ANSI C header files" >&5
|
||||
echo "configure:2510: 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 2514 "configure"
|
||||
#line 2515 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -2518,7 +2519,7 @@ else
|
|||
#include <float.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:2522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:2523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -2535,7 +2536,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 2539 "configure"
|
||||
#line 2540 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
EOF
|
||||
|
@ -2553,7 +2554,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 2557 "configure"
|
||||
#line 2558 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
EOF
|
||||
|
@ -2574,7 +2575,7 @@ if test "$cross_compiling" = yes; then
|
|||
:
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2578 "configure"
|
||||
#line 2579 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
|
@ -2585,7 +2586,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
|||
exit (0); }
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:2589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
|
@ -2609,12 +2610,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for size_t""... $ac_c" 1>&6
|
||||
echo "configure:2613: checking for size_t" >&5
|
||||
echo "configure:2614: 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 2618 "configure"
|
||||
#line 2619 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -2780,6 +2781,7 @@ relay32/Makefile
|
|||
resources/Makefile
|
||||
scheduler/Makefile
|
||||
tools/Makefile
|
||||
tsx11/Makefile
|
||||
win32/Makefile
|
||||
windows/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
|
@ -2905,6 +2907,7 @@ relay32/Makefile
|
|||
resources/Makefile
|
||||
scheduler/Makefile
|
||||
tools/Makefile
|
||||
tsx11/Makefile
|
||||
win32/Makefile
|
||||
windows/Makefile "}
|
||||
EOF
|
||||
|
|
|
@ -58,8 +58,8 @@ dnl **** Check for Open Sound System ****
|
|||
AC_CACHE_CHECK("for Open Sound System",
|
||||
ac_cv_c_opensoundsystem,
|
||||
AC_TRY_COMPILE([#include <sys/soundcard.h>],[
|
||||
/* check for open sound system and one of the SNDCTL_ defines to be sure */
|
||||
#if !defined(OPEN_SOUND_SYSTEM) || !defined(SNDCTL_DSP_STEREO)
|
||||
/* check for one of the Open Sound System specific SNDCTL_ defines */
|
||||
#if !defined(SNDCTL_DSP_STEREO)
|
||||
#error No open sound system
|
||||
#endif
|
||||
],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
|
||||
|
@ -72,7 +72,8 @@ fi
|
|||
dnl **** Check for union semun ****
|
||||
|
||||
AC_CACHE_CHECK("for union semun", ac_cv_c_union_semun,
|
||||
AC_TRY_COMPILE([#include <sys/sem.h>],[union semun foo],
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/sem.h>],[union semun foo],
|
||||
ac_cv_c_union_semun="yes", ac_cv_c_union_semun="no"))
|
||||
if test "$ac_cv_c_union_semun" = "yes"
|
||||
then
|
||||
|
@ -207,6 +208,7 @@ relay32/Makefile
|
|||
resources/Makefile
|
||||
scheduler/Makefile
|
||||
tools/Makefile
|
||||
tsx11/Makefile
|
||||
win32/Makefile
|
||||
windows/Makefile ])
|
||||
|
||||
|
|
|
@ -362,10 +362,9 @@ static void CBPaintButton(LPHEADCOMBO lphc, HDC16 hdc)
|
|||
UINT32 x, y;
|
||||
BOOL32 bBool;
|
||||
|
||||
if( lphc->wState & CBF_NOREDRAW )
|
||||
return;
|
||||
if( lphc->wState & CBF_NOREDRAW ) return;
|
||||
|
||||
hPrevBrush=(HBRUSH32)SelectObject32(hdc,GetSysColorBrush32(COLOR_BTNFACE));
|
||||
hPrevBrush = (HBRUSH32)SelectObject32(hdc, GetSysColorBrush32(COLOR_BTNFACE));
|
||||
CONV_RECT16TO32( &lphc->RectButton, &r );
|
||||
|
||||
Rectangle32(hdc, r.left, r.top, r.right, r.bottom );
|
||||
|
@ -403,8 +402,7 @@ static void CBPaintText(LPHEADCOMBO lphc, HDC16 hdc)
|
|||
INT32 id, size = 0;
|
||||
LPSTR pText = NULL;
|
||||
|
||||
if( lphc->wState & CBF_NOREDRAW )
|
||||
return;
|
||||
if( lphc->wState & CBF_NOREDRAW ) return;
|
||||
|
||||
/* follow Windows combobox that sends a bunch of text
|
||||
* inquiries to its listbox while processing WM_PAINT. */
|
||||
|
@ -537,9 +535,9 @@ static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC16 hParamDC)
|
|||
/* paint text field */
|
||||
|
||||
GRAPH_DrawRectangle( hDC, lphc->RectEdit.left, lphc->RectEdit.top,
|
||||
lphc->RectEdit.right - lphc->RectEdit.left,
|
||||
lphc->RectButton.bottom - lphc->RectButton.top,
|
||||
GetSysColorPen32(COLOR_WINDOWFRAME) );
|
||||
lphc->RectEdit.right - lphc->RectEdit.left,
|
||||
lphc->RectButton.bottom - lphc->RectButton.top,
|
||||
GetSysColorPen32(COLOR_WINDOWFRAME) );
|
||||
CBPaintText( lphc, hDC );
|
||||
}
|
||||
if( hPrevBrush ) SelectObject32( hDC, hPrevBrush );
|
||||
|
@ -679,13 +677,12 @@ static void CBDropDown( LPHEADCOMBO lphc )
|
|||
SetWindowPos32( lphc->hWndLBox, HWND_TOP, rect.left, rect.top,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOREDRAW);
|
||||
|
||||
if( !(lphc->wState & CBF_NOREDRAW) )
|
||||
{
|
||||
if( pRect )
|
||||
RedrawWindow16( lphc->self->hwndSelf, pRect, 0, RDW_INVALIDATE |
|
||||
RDW_ERASE | RDW_UPDATENOW | RDW_NOCHILDREN );
|
||||
ShowWindow32( lphc->hWndLBox, SW_SHOWNA );
|
||||
}
|
||||
ShowWindow32( lphc->hWndLBox, SW_SHOWNA );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -953,7 +950,7 @@ static LRESULT COMBO_ItemOp32( LPHEADCOMBO lphc, UINT32 msg,
|
|||
break;
|
||||
}
|
||||
|
||||
return SendMessage32A( lphc->owner, msg, lphc->self->wIDmenu, lParam );
|
||||
return SendMessage32A( lphc->owner, msg, lphc->self->wIDmenu, lParam );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -961,41 +958,42 @@ static LRESULT COMBO_ItemOp32( LPHEADCOMBO lphc, UINT32 msg,
|
|||
*/
|
||||
static LRESULT COMBO_GetText( LPHEADCOMBO lphc, UINT32 N, LPSTR lpText)
|
||||
{
|
||||
INT32 idx;
|
||||
|
||||
if( lphc->wState & CBF_EDIT )
|
||||
return SendMessage32A( lphc->hWndEdit, WM_GETTEXT,
|
||||
(WPARAM32)N, (LPARAM)lpText );
|
||||
|
||||
/* get it from the listbox */
|
||||
|
||||
idx = SendMessage32A( lphc->hWndLBox, LB_GETCURSEL32, 0, 0 );
|
||||
if( idx != LB_ERR )
|
||||
if( lphc->hWndLBox )
|
||||
{
|
||||
LPSTR lpBuffer;
|
||||
INT32 length = SendMessage32A( lphc->hWndLBox, LB_GETTEXTLEN32,
|
||||
(WPARAM32)idx, 0 );
|
||||
|
||||
/* 'length' is without the terminating character */
|
||||
if( length >= N )
|
||||
lpBuffer = (LPSTR) HeapAlloc( GetProcessHeap(), 0, length + 1 );
|
||||
else
|
||||
lpBuffer = lpText;
|
||||
|
||||
if( lpBuffer )
|
||||
INT32 idx = SendMessage32A( lphc->hWndLBox, LB_GETCURSEL32, 0, 0 );
|
||||
if( idx != LB_ERR )
|
||||
{
|
||||
INT32 n = SendMessage32A( lphc->hWndLBox, LB_GETTEXT32,
|
||||
(WPARAM32)idx, (LPARAM)lpText );
|
||||
LPSTR lpBuffer;
|
||||
INT32 length = SendMessage32A( lphc->hWndLBox, LB_GETTEXTLEN32,
|
||||
(WPARAM32)idx, 0 );
|
||||
|
||||
/* truncate if buffer is too short */
|
||||
/* 'length' is without the terminating character */
|
||||
if( length >= N )
|
||||
lpBuffer = (LPSTR) HeapAlloc( GetProcessHeap(), 0, length + 1 );
|
||||
else
|
||||
lpBuffer = lpText;
|
||||
|
||||
if( length >= N )
|
||||
{
|
||||
if( n != LB_ERR ) memcpy( lpText, lpBuffer, (N>n) ? n+1 : N-1 );
|
||||
lpText[N - 1] = '\0';
|
||||
HeapFree( GetProcessHeap(), 0, lpBuffer );
|
||||
if( lpBuffer )
|
||||
{
|
||||
INT32 n = SendMessage32A( lphc->hWndLBox, LB_GETTEXT32,
|
||||
(WPARAM32)idx, (LPARAM)lpText );
|
||||
|
||||
/* truncate if buffer is too short */
|
||||
|
||||
if( length >= N )
|
||||
{
|
||||
if( n != LB_ERR ) memcpy( lpText, lpBuffer, (N>n) ? n+1 : N-1 );
|
||||
lpText[N - 1] = '\0';
|
||||
HeapFree( GetProcessHeap(), 0, lpBuffer );
|
||||
}
|
||||
return (LRESULT)n;
|
||||
}
|
||||
return (LRESULT)n;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -1044,6 +1042,7 @@ static void CBResetPos( LPHEADCOMBO lphc, LPRECT16 lbRect, BOOL32 bRedraw )
|
|||
lphc->RectEdit.bottom - lphc->RectEdit.top,
|
||||
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW );
|
||||
lphc->wState &= ~CBF_NORESIZE;
|
||||
|
||||
if( bRedraw && !(lphc->wState & CBF_NOREDRAW) )
|
||||
RedrawWindow32( lphc->self->hwndSelf, NULL, 0,
|
||||
RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW );
|
||||
|
@ -1352,7 +1351,7 @@ LRESULT WINAPI ComboWndProc( HWND32 hwnd, UINT32 message,
|
|||
if( lphc->wState & CBF_EDIT )
|
||||
SendMessage32A( lphc->hWndEdit, message, wParam, lParam );
|
||||
SendMessage32A( lphc->hWndLBox, message, wParam, lParam );
|
||||
break;
|
||||
return 0;
|
||||
|
||||
case WM_SYSKEYDOWN:
|
||||
if( KEYDATA_ALT & HIWORD(lParam) )
|
||||
|
|
|
@ -2566,6 +2566,11 @@ LRESULT WINAPI ComboLBWndProc( HWND32 hwnd, UINT32 msg,
|
|||
}
|
||||
return LISTBOX_HandleKeyDown( wnd, descr, wParam );
|
||||
|
||||
case WM_NCDESTROY:
|
||||
if( CB_GETTYPE(lphc) != CBS_SIMPLE )
|
||||
lphc->hWndLBox = 0;
|
||||
/* fall through */
|
||||
|
||||
default:
|
||||
return ListBoxWndProc( hwnd, msg, wParam, lParam );
|
||||
}
|
||||
|
|
|
@ -798,16 +798,11 @@ static void DEBUG_LoadEntryPoints32( HMODULE32 hModule, const char *name )
|
|||
int i, j;
|
||||
IMAGE_SECTION_HEADER *pe_seg;
|
||||
IMAGE_EXPORT_DIRECTORY *exports;
|
||||
IMAGE_DATA_DIRECTORY *debug_dir;
|
||||
IMAGE_DATA_DIRECTORY *dir;
|
||||
WORD *ordinals;
|
||||
void **functions;
|
||||
const char **names;
|
||||
|
||||
PE_MODREF *pem = PROCESS_Current()->modref_list;
|
||||
while (pem && (pem->module != hModule)) pem = pem->next;
|
||||
if (!pem) return;
|
||||
exports = pem->pe_export;
|
||||
|
||||
addr.seg = 0;
|
||||
addr.type = NULL;
|
||||
|
||||
|
@ -835,7 +830,10 @@ static void DEBUG_LoadEntryPoints32( HMODULE32 hModule, const char *name )
|
|||
|
||||
/* Add exported functions */
|
||||
|
||||
if (!exports) return;
|
||||
dir = &PE_HEADER(hModule)->OptionalHeader.
|
||||
DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT];
|
||||
if (!dir->Size) return;
|
||||
exports = (IMAGE_EXPORT_DIRECTORY *)RVA( dir->VirtualAddress );
|
||||
ordinals = (WORD *)RVA( exports->AddressOfNameOrdinals );
|
||||
names = (const char **)RVA( exports->AddressOfNames );
|
||||
functions = (void **)RVA( exports->AddressOfFunctions );
|
||||
|
@ -860,10 +858,9 @@ static void DEBUG_LoadEntryPoints32( HMODULE32 hModule, const char *name )
|
|||
DEBUG_AddSymbol( buffer, &addr, NULL, SYM_WIN32 | SYM_FUNC );
|
||||
}
|
||||
|
||||
debug_dir = &PE_HEADER(hModule)->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DEBUG];
|
||||
if (debug_dir->Size)
|
||||
DEBUG_RegisterDebugInfo( hModule, name,
|
||||
debug_dir->VirtualAddress, debug_dir->Size );
|
||||
dir = &PE_HEADER(hModule)->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DEBUG];
|
||||
if (dir->Size)
|
||||
DEBUG_RegisterDebugInfo(hModule, name, dir->VirtualAddress, dir->Size);
|
||||
#undef RVA
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ struct known_typedef
|
|||
|
||||
#define NR_STAB_HASH 521
|
||||
|
||||
struct known_typedef * ktd_head[NR_STAB_HASH];
|
||||
struct known_typedef * ktd_head[NR_STAB_HASH] = {NULL,};
|
||||
|
||||
static unsigned int stab_hash( const char * name )
|
||||
{
|
||||
|
|
|
@ -6,7 +6,39 @@ KERNEL MODULE
|
|||
GDI MODULE
|
||||
==========
|
||||
|
||||
...
|
||||
1. X Windows System interface
|
||||
-----------------------------
|
||||
|
||||
The X libraries used to implement X clients (such as Wine) do not work
|
||||
properly if multiple threads access the same display concurrently. It is
|
||||
possible to compile the X libraries to perform their own synchronization
|
||||
(initiated by calling XInitThreads()). However, Wine does not use this
|
||||
approach. Instead Wine performs its own synchronization py putting a
|
||||
wrapper around every X call that is used. This wrapper protects library
|
||||
access with a critical section, and also arranges things so that X
|
||||
libraries compiled without -D_REENTRANT (eg. with global errno variable)
|
||||
will work with Wine.
|
||||
|
||||
To make this scheme work, all calls to X must use the proper wrapper
|
||||
functions (or do their own synchronization that is compatible with the
|
||||
wrappers). The wrapper for a function X...() is calles TSX...() (for
|
||||
"Thread Safe X ..."). So for example, instead of calling XOpenDisplay()
|
||||
in the code, TSXOpenDisplay() must be used. Likewise, X include files
|
||||
that contain function prototypes are wrapped, so that eg. "TSXutil.h" must
|
||||
be included rather than <X11/Xutil.h>. It is important that this scheme
|
||||
is used everywhere to avoid the introduction of nondeterministic and
|
||||
hard-to-find errors in Wine.
|
||||
|
||||
The code for the thread safe X wrappers is contained in the tsx11/
|
||||
directory and in include/TS*.h. To use a new (ie. not previously used) X
|
||||
function in Wine, a new wrapper must be created. The wrappers are
|
||||
generated (semi-)automatically from the X11R6 includes using the
|
||||
tools/make_X11wrappers perl script. In simple cases it should be enough
|
||||
to add the name of the new function to the list in tsx11/X11_calls; if
|
||||
this does not work the wrapper must be added manually to the
|
||||
make_X11wrappers script. See comments in tsx11/X11_calls and
|
||||
tools/make_X11wrappers for further details.
|
||||
|
||||
|
||||
USER MODULE
|
||||
===========
|
||||
|
|
|
@ -109,7 +109,7 @@ Start as an icon
|
|||
.I -language xx
|
||||
Set the language to
|
||||
.I xx
|
||||
(one of En, Es, De, No, Fr, Fi, Da, Cz, Eo, It, Ko, Hu, Pl, Po)
|
||||
(one of En, Es, De, No, Fr, Fi, Da, Cz, Eo, It, Ko, Hu, Pl, Po, Sw, Ca)
|
||||
.TP
|
||||
.I -managed
|
||||
Create each top-level window as a properly managed X window
|
||||
|
|
|
@ -40,6 +40,7 @@ typedef struct
|
|||
char *root; /* root dir in Unix format without trailing / */
|
||||
char *dos_cwd; /* cwd in DOS format without leading or trailing \ */
|
||||
char *unix_cwd; /* cwd in Unix format without leading or trailing / */
|
||||
char *device; /* raw device path */
|
||||
char label[12]; /* drive label */
|
||||
DWORD serial; /* drive serial number */
|
||||
DRIVETYPE type; /* drive type */
|
||||
|
@ -126,7 +127,7 @@ int DRIVE_Init(void)
|
|||
int i, len, count = 0;
|
||||
char name[] = "Drive A";
|
||||
char path[MAX_PATHNAME_LEN];
|
||||
char buffer[20];
|
||||
char buffer[80];
|
||||
struct stat drive_stat_buffer;
|
||||
char *p;
|
||||
DOSDRIVE *drive;
|
||||
|
@ -157,6 +158,7 @@ int DRIVE_Init(void)
|
|||
drive->dos_cwd = HEAP_strdupA( SystemHeap, 0, "" );
|
||||
drive->unix_cwd = HEAP_strdupA( SystemHeap, 0, "" );
|
||||
drive->type = DRIVE_GetDriveType( name );
|
||||
drive->device = NULL;
|
||||
drive->flags = 0;
|
||||
drive->dev = drive_stat_buffer.st_dev;
|
||||
drive->ino = drive_stat_buffer.st_ino;
|
||||
|
@ -180,6 +182,12 @@ int DRIVE_Init(void)
|
|||
buffer, sizeof(buffer) );
|
||||
drive->flags = DRIVE_GetFSFlags( name, buffer );
|
||||
|
||||
/* Get the device */
|
||||
PROFILE_GetWineIniString( name, "Device", "",
|
||||
buffer, sizeof(buffer) );
|
||||
if (buffer[0])
|
||||
drive->device = HEAP_strdupA( SystemHeap, 0, buffer );
|
||||
|
||||
/* Make the first hard disk the current drive */
|
||||
if ((DRIVE_CurDrive == -1) && (drive->type == TYPE_HD))
|
||||
DRIVE_CurDrive = i;
|
||||
|
@ -550,6 +558,17 @@ int DRIVE_SetLogicalMapping ( int existing_drive, int new_drive )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DRIVE_OpenDevice
|
||||
*
|
||||
* Open the drive raw device and return a Unix fd (or -1 on error).
|
||||
*/
|
||||
int DRIVE_OpenDevice( int drive, int flags )
|
||||
{
|
||||
if (!DRIVE_IsValid( drive )) return NULL;
|
||||
return open( DOSDrives[drive].device, flags );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DRIVE_GetFreeSpace
|
||||
|
|
1443
graphics/ddraw.c
1443
graphics/ddraw.c
File diff suppressed because it is too large
Load Diff
|
@ -57,13 +57,35 @@ BOOL16 WINAPI DPtoLP16( HDC16 hdc, LPPOINT16 points, INT16 count )
|
|||
*/
|
||||
BOOL32 WINAPI DPtoLP32( HDC32 hdc, LPPOINT32 points, INT32 count )
|
||||
{
|
||||
FLOAT determinant=1.0, x, y;
|
||||
|
||||
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
||||
if (!dc) return FALSE;
|
||||
|
||||
if (dc->w.UseWorldXform)
|
||||
{
|
||||
determinant = dc->w.WorldXform.eM11*dc->w.WorldXform.eM22 -
|
||||
dc->w.WorldXform.eM12*dc->w.WorldXform.eM21;
|
||||
if (determinant > -1e-12 && determinant < 1e-12)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
while (count--)
|
||||
{
|
||||
points->x = XDPTOLP( dc, points->x );
|
||||
points->y = YDPTOLP( dc, points->y );
|
||||
if (dc->w.UseWorldXform)
|
||||
{
|
||||
x = (FLOAT)points->x - dc->w.WorldXform.eDx;
|
||||
y = (FLOAT)points->y - dc->w.WorldXform.eDy;
|
||||
points->x = (INT32)( (x*dc->w.WorldXform.eM22 -
|
||||
y*dc->w.WorldXform.eM21) / determinant );
|
||||
points->y = (INT32)( (-x*dc->w.WorldXform.eM12 +
|
||||
y*dc->w.WorldXform.eM11) / determinant );
|
||||
}
|
||||
else
|
||||
{
|
||||
points->x = XLPTODP( dc, points->x );
|
||||
points->y = YLPTODP( dc, points->y );
|
||||
}
|
||||
points++;
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -93,13 +115,30 @@ BOOL16 WINAPI LPtoDP16( HDC16 hdc, LPPOINT16 points, INT16 count )
|
|||
*/
|
||||
BOOL32 WINAPI LPtoDP32( HDC32 hdc, LPPOINT32 points, INT32 count )
|
||||
{
|
||||
FLOAT x, y;
|
||||
|
||||
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
||||
if (!dc) return FALSE;
|
||||
|
||||
while (count--)
|
||||
{
|
||||
points->x = XLPTODP( dc, points->x );
|
||||
points->y = YLPTODP( dc, points->y );
|
||||
if (dc->w.UseWorldXform)
|
||||
{
|
||||
x = (FLOAT)points->x * dc->w.WorldXform.eM11 +
|
||||
(FLOAT)points->y * dc->w.WorldXform.eM21 +
|
||||
dc->w.WorldXform.eDx;
|
||||
y = (FLOAT)points->x * dc->w.WorldXform.eM12 +
|
||||
(FLOAT)points->y * dc->w.WorldXform.eM22 +
|
||||
dc->w.WorldXform.eDy;
|
||||
points->x = XDPTOLP( dc, (INT32)x );
|
||||
points->y = YDPTOLP( dc, (INT32)y );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
points->x = XDPTOLP( dc, points->x );
|
||||
points->y = YDPTOLP( dc, points->y );
|
||||
}
|
||||
points++;
|
||||
}
|
||||
return TRUE;
|
||||
|
|
|
@ -135,9 +135,17 @@ static BOOL32 MFDRV_DeleteDC( DC *dc )
|
|||
|
||||
|
||||
/**********************************************************************
|
||||
* CreateMetafile16 (GDI.125)
|
||||
* CreateMetaFile16 (GDI.125)
|
||||
*
|
||||
* Create a new DC and associate it with a metafile. Pass a filename
|
||||
* to create a disk-based metafile, NULL to create a memory metafile.
|
||||
*
|
||||
* RETURNS
|
||||
* A handle to the metafile DC if successful, NULL on failure.
|
||||
*/
|
||||
HDC16 WINAPI CreateMetaFile16( LPCSTR filename )
|
||||
HDC16 WINAPI CreateMetaFile16(
|
||||
LPCSTR filename /* Filename of disk metafile */
|
||||
)
|
||||
{
|
||||
DC *dc;
|
||||
METAFILEDRV_PDEVICE *physDev;
|
||||
|
@ -174,9 +182,17 @@ HDC16 WINAPI CreateMetaFile16( LPCSTR filename )
|
|||
|
||||
|
||||
/******************************************************************
|
||||
* CloseMetafile16 (GDI.126)
|
||||
* CloseMetaFile16 (GDI.126)
|
||||
*
|
||||
* Stop recording graphics operations in metafile associated with
|
||||
* hdc and retrieve metafile.
|
||||
*
|
||||
* RETURNS
|
||||
* Handle of newly created metafile on success, NULL on failure.
|
||||
*/
|
||||
HMETAFILE16 WINAPI CloseMetaFile16( HDC16 hdc )
|
||||
HMETAFILE16 WINAPI CloseMetaFile16(
|
||||
HDC16 hdc /* Metafile DC to close */
|
||||
)
|
||||
{
|
||||
DC *dc;
|
||||
HMETAFILE16 hmf;
|
||||
|
@ -228,9 +244,16 @@ HMETAFILE16 WINAPI CloseMetaFile16( HDC16 hdc )
|
|||
|
||||
|
||||
/******************************************************************
|
||||
* DeleteMetafile16 (GDI.127)
|
||||
* DeleteMetaFile16 (GDI.127)
|
||||
*
|
||||
* Delete a memory-based metafile.
|
||||
*
|
||||
*/
|
||||
BOOL16 WINAPI DeleteMetaFile16( HMETAFILE16 hmf )
|
||||
BOOL16 WINAPI DeleteMetaFile16(
|
||||
HMETAFILE16 hmf
|
||||
/* Handle of memory metafile to delete */
|
||||
)
|
||||
{
|
||||
return !GlobalFree16( hmf );
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include "ts_xlib.h"
|
||||
#include "ts_xutil.h"
|
||||
#include <X11/Intrinsic.h>
|
||||
#ifndef PI
|
||||
#define PI M_PI
|
||||
|
@ -117,6 +117,11 @@ BOOL32 WINAPI Arc32( HDC32 hdc, INT32 left, INT32 top, INT32 right,
|
|||
{
|
||||
DC * dc = DC_GetDCPtr( hdc );
|
||||
|
||||
if(dc && PATH_IsPathOpen(dc->w.path))
|
||||
if(!PATH_Arc(hdc, left, top, right, bottom, xstart, ystart, xend,
|
||||
yend))
|
||||
return FALSE;
|
||||
|
||||
return dc && dc->funcs->pArc &&
|
||||
dc->funcs->pArc(dc,left,top,right,bottom,xstart,ystart,xend,yend);
|
||||
}
|
||||
|
@ -533,7 +538,7 @@ void WINAPI DrawFocusRect32( HDC32 hdc, const RECT32* rc )
|
|||
dc->u.x.pen.pixel = (1 << screenDepth) - 1;
|
||||
|
||||
if (DC_SetupGCForPen( dc ))
|
||||
XDrawRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
||||
right-left-1, bottom-top-1 );
|
||||
|
||||
|
|
331
graphics/path.c
331
graphics/path.c
|
@ -1,11 +1,12 @@
|
|||
/*
|
||||
* Graphics paths (BeginPath, EndPath etc.)
|
||||
*
|
||||
* Copyright 1997 Martin Boehme
|
||||
* Copyright 1997, 1998 Martin Boehme
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <malloc.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "windows.h"
|
||||
#include "winerror.h"
|
||||
|
@ -64,6 +65,22 @@ static void PATH_EmptyPath(GdiPath *pPath);
|
|||
static BOOL32 PATH_AddEntry(GdiPath *pPath, POINT32 point, BYTE flags);
|
||||
static BOOL32 PATH_ReserveEntries(GdiPath *pPath, INT32 numEntries);
|
||||
static BOOL32 PATH_GetPathFromHDC(HDC32 hdc, GdiPath **ppPath);
|
||||
static BOOL32 PATH_DoArcPart(GdiPath *pPath, POINT32 corners[],
|
||||
double angleStart, double angleEnd, BOOL32 addMoveTo);
|
||||
static void PATH_ScaleNormalizedPoint(POINT32 corners[], double x, double y,
|
||||
POINT32 *pPoint);
|
||||
static void PATH_NormalizePoint(POINT32 corners[], const POINT32 *pPoint,
|
||||
double *pX, double *pY);
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* BeginPath16 (GDI.512)
|
||||
*/
|
||||
BOOL16 WINAPI BeginPath16(HDC16 hdc)
|
||||
{
|
||||
return (BOOL16)BeginPath32((HDC32)hdc);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* BeginPath32 (GDI32.9)
|
||||
|
@ -94,6 +111,15 @@ BOOL32 WINAPI BeginPath32(HDC32 hdc)
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* EndPath16 (GDI.514)
|
||||
*/
|
||||
BOOL16 WINAPI EndPath16(HDC16 hdc)
|
||||
{
|
||||
return (BOOL16)EndPath32((HDC32)hdc);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* EndPath32 (GDI32.78)
|
||||
*/
|
||||
|
@ -122,6 +148,15 @@ BOOL32 WINAPI EndPath32(HDC32 hdc)
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* AbortPath16 (GDI.511)
|
||||
*/
|
||||
BOOL16 WINAPI AbortPath16(HDC16 hdc)
|
||||
{
|
||||
return (BOOL16)AbortPath32((HDC32)hdc);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* AbortPath32 (GDI32.1)
|
||||
*/
|
||||
|
@ -144,6 +179,15 @@ BOOL32 WINAPI AbortPath32(HDC32 hdc)
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CloseFigure16 (GDI.513)
|
||||
*/
|
||||
BOOL16 WINAPI CloseFigure16(HDC16 hdc)
|
||||
{
|
||||
return (BOOL16)CloseFigure32((HDC32)hdc);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CloseFigure32 (GDI32.16)
|
||||
*/
|
||||
|
@ -177,6 +221,19 @@ BOOL32 WINAPI CloseFigure32(HDC32 hdc)
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetPath16 (GDI.517)
|
||||
*/
|
||||
INT16 WINAPI GetPath16(HDC16 hdc, LPPOINT16 pPoints, LPBYTE pTypes,
|
||||
INT16 nSize)
|
||||
{
|
||||
/* FIXME: Not implemented */
|
||||
fprintf(stdnimp, "GetPath16: Unimplemented stub\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetPath32 (GDI32.210)
|
||||
*/
|
||||
|
@ -184,7 +241,6 @@ INT32 WINAPI GetPath32(HDC32 hdc, LPPOINT32 pPoints, LPBYTE pTypes,
|
|||
INT32 nSize)
|
||||
{
|
||||
GdiPath *pPath;
|
||||
BOOL32 temp_flag;
|
||||
|
||||
/* Get pointer to path */
|
||||
if(!PATH_GetPathFromHDC(hdc, &pPath))
|
||||
|
@ -213,10 +269,12 @@ INT32 WINAPI GetPath32(HDC32 hdc, LPPOINT32 pPoints, LPBYTE pTypes,
|
|||
memcpy(pTypes, pPath->pFlags, sizeof(BYTE)*pPath->numEntriesUsed);
|
||||
|
||||
/* Convert the points to logical coordinates */
|
||||
temp_flag=DPtoLP32(hdc, pPoints, pPath->numEntriesUsed);
|
||||
|
||||
/* Since hdc is valid, conversion should never fail */
|
||||
assert(temp_flag);
|
||||
if(!DPtoLP32(hdc, pPoints, pPath->numEntriesUsed))
|
||||
{
|
||||
/* FIXME: Is this the correct value? */
|
||||
SetLastError(ERROR_CAN_NOT_COMPLETE);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return pPath->numEntriesUsed;
|
||||
}
|
||||
|
@ -266,8 +324,9 @@ BOOL32 WINAPI FillPath32(HDC32 hdc)
|
|||
/* FIXME: Check that SetLastError is being called correctly */
|
||||
{
|
||||
GdiPath *pPath;
|
||||
INT32 mapMode;
|
||||
INT32 mapMode, graphicsMode;
|
||||
POINT32 ptViewportExt, ptViewportOrg, ptWindowExt, ptWindowOrg;
|
||||
XFORM xform;
|
||||
HRGN32 hrgn;
|
||||
|
||||
/* Get pointer to path */
|
||||
|
@ -290,6 +349,9 @@ BOOL32 WINAPI FillPath32(HDC32 hdc)
|
|||
/* Since PaintRgn interprets the region as being in logical coordinates
|
||||
* but the points we store for the path are already in device
|
||||
* coordinates, we have to set the mapping mode to MM_TEXT temporarily.
|
||||
* Using SaveDC to save information about the mapping mode / world
|
||||
* transform would be easier but would require more overhead, especially
|
||||
* now that SaveDC saves the current path.
|
||||
*/
|
||||
|
||||
/* Save the information about the old mapping mode */
|
||||
|
@ -299,13 +361,14 @@ BOOL32 WINAPI FillPath32(HDC32 hdc)
|
|||
GetWindowExtEx32(hdc, &ptWindowExt);
|
||||
GetWindowOrgEx32(hdc, &ptWindowOrg);
|
||||
|
||||
/* FIXME: Once world transforms become available, we will have to do
|
||||
* a GetWorldTransform, too (along with a SetWorldTransform later on).
|
||||
* Moral: Perhaps I should have used SaveDC right away. The reason why
|
||||
* I didn't is that I wanted to avoid the overhead of a full SaveDC
|
||||
* (especially since SaveDC now saves the current path as well).
|
||||
/* Save world transform
|
||||
* NB: The Windows documentation on world transforms would lead one to
|
||||
* believe that this has to be done only in GM_ADVANCED; however, my
|
||||
* tests show that resetting the graphics mode to GM_COMPATIBLE does
|
||||
* not reset the world transform.
|
||||
*/
|
||||
|
||||
GetWorldTransform(hdc, &xform);
|
||||
|
||||
/* Set MM_TEXT */
|
||||
SetMapMode32(hdc, MM_TEXT);
|
||||
|
||||
|
@ -319,6 +382,12 @@ BOOL32 WINAPI FillPath32(HDC32 hdc)
|
|||
SetWindowExtEx32(hdc, ptWindowExt.x, ptWindowExt.y, NULL);
|
||||
SetWindowOrgEx32(hdc, ptWindowOrg.x, ptWindowOrg.y, NULL);
|
||||
|
||||
/* Go to GM_ADVANCED temporarily to restore the world transform */
|
||||
graphicsMode=GetGraphicsMode(hdc);
|
||||
SetGraphicsMode(hdc, GM_ADVANCED);
|
||||
SetWorldTransform(hdc, &xform);
|
||||
SetGraphicsMode(hdc, graphicsMode);
|
||||
|
||||
/* Empty the path */
|
||||
PATH_EmptyPath(pPath);
|
||||
return TRUE;
|
||||
|
@ -335,12 +404,12 @@ BOOL32 WINAPI FillPath32(HDC32 hdc)
|
|||
/***********************************************************************
|
||||
* SelectClipPath32 (GDI32.296)
|
||||
*/
|
||||
BOOL32 WINAPI SelectClipPath32(HDC32 hdc, int iMode)
|
||||
BOOL32 WINAPI SelectClipPath32(HDC32 hdc, INT32 iMode)
|
||||
/* FIXME: Check that SetLastError is being called correctly */
|
||||
{
|
||||
GdiPath *pPath;
|
||||
HRGN32 hrgnPath, hrgnClip;
|
||||
BOOL32 success = FALSE;
|
||||
BOOL32 success;
|
||||
|
||||
/* Get pointer to path */
|
||||
if(!PATH_GetPathFromHDC(hdc, &pPath))
|
||||
|
@ -360,7 +429,9 @@ BOOL32 WINAPI SelectClipPath32(HDC32 hdc, int iMode)
|
|||
if(PATH_PathToRegion(pPath, GetPolyFillMode32(hdc), &hrgnPath))
|
||||
{
|
||||
hrgnClip=CreateRectRgn32(0, 0, 0, 0);
|
||||
if(hrgnClip!=NULL)
|
||||
if(hrgnClip==NULL)
|
||||
success=FALSE;
|
||||
else
|
||||
{
|
||||
success=(GetClipRgn32(hdc, hrgnClip)!=-1) &&
|
||||
(CombineRgn32(hrgnClip, hrgnClip, hrgnPath, iMode)!=ERROR) &&
|
||||
|
@ -510,6 +581,152 @@ BOOL32 PATH_LineTo(HDC32 hdc, INT32 x, INT32 y)
|
|||
return PATH_AddEntry(pPath, point, PT_LINETO);
|
||||
}
|
||||
|
||||
/* PATH_Ellipse
|
||||
*
|
||||
* Should be called when a call to Ellipse is performed on a DC that has
|
||||
* an open path. This adds four Bezier splines representing the ellipse
|
||||
* to the path. Returns TRUE if successful, else FALSE.
|
||||
*/
|
||||
BOOL32 PATH_Ellipse(HDC32 hdc, INT32 x1, INT32 y1, INT32 x2, INT32 y2)
|
||||
{
|
||||
return PATH_Arc(hdc, x1, y1, x2, y2, x1, 0, x1, 0);
|
||||
}
|
||||
|
||||
/* PATH_Arc
|
||||
*
|
||||
* Should be called when a call to Arc is performed on a DC that has
|
||||
* an open path. This adds up to five Bezier splines representing the arc
|
||||
* to the path. Returns TRUE if successful, else FALSE.
|
||||
*/
|
||||
BOOL32 PATH_Arc(HDC32 hdc, INT32 x1, INT32 y1, INT32 x2, INT32 y2,
|
||||
INT32 xStart, INT32 yStart, INT32 xEnd, INT32 yEnd)
|
||||
{
|
||||
GdiPath *pPath;
|
||||
double angleStart, angleEnd, angleStartQuadrant, angleEndQuadrant=0.0;
|
||||
/* Initialize angleEndQuadrant to silence gcc's warning */
|
||||
double x, y;
|
||||
POINT32 corners[2], pointStart, pointEnd;
|
||||
BOOL32 start, end;
|
||||
INT32 temp;
|
||||
|
||||
/* FIXME: This function should check for all possible error returns */
|
||||
|
||||
/* Get pointer to path */
|
||||
if(!PATH_GetPathFromHDC(hdc, &pPath))
|
||||
return FALSE;
|
||||
|
||||
/* Check that path is open */
|
||||
if(pPath->state!=PATH_Open)
|
||||
return FALSE;
|
||||
|
||||
/* Check for zero height / width */
|
||||
/* FIXME: Should we do this before or after LPtoDP? */
|
||||
if(x1==x2 || y1==y2)
|
||||
return TRUE;
|
||||
|
||||
/* In GM_COMPATIBLE, don't include bottom and right edges */
|
||||
if(GetGraphicsMode(hdc)==GM_COMPATIBLE)
|
||||
{
|
||||
/* FIXME: Should we do this before or after LPtoDP? */
|
||||
x2--;
|
||||
y2--;
|
||||
}
|
||||
|
||||
/* Convert points to device coordinates */
|
||||
corners[0].x=x1;
|
||||
corners[0].y=y1;
|
||||
corners[1].x=x2;
|
||||
corners[1].y=y2;
|
||||
pointStart.x=xStart;
|
||||
pointStart.y=yStart;
|
||||
pointEnd.x=xEnd;
|
||||
pointEnd.y=yEnd;
|
||||
if(!LPtoDP32(hdc, corners, 2) || !LPtoDP32(hdc, &pointStart, 1) ||
|
||||
!LPtoDP32(hdc, &pointEnd, 1))
|
||||
return FALSE;
|
||||
|
||||
/* Make sure first corner is top left and right corner is bottom right */
|
||||
/* FIXME: Should we do this before or after LPtoDP? */
|
||||
if(corners[0].x>corners[1].x)
|
||||
{
|
||||
temp=corners[0].x;
|
||||
corners[0].x=corners[1].x;
|
||||
corners[1].x=temp;
|
||||
}
|
||||
if(corners[0].y>corners[1].y)
|
||||
{
|
||||
temp=corners[0].y;
|
||||
corners[0].y=corners[1].y;
|
||||
corners[1].y=temp;
|
||||
}
|
||||
|
||||
/* Compute start and end angle */
|
||||
PATH_NormalizePoint(corners, &pointStart, &x, &y);
|
||||
angleStart=atan2(y, x);
|
||||
PATH_NormalizePoint(corners, &pointEnd, &x, &y);
|
||||
angleEnd=atan2(y, x);
|
||||
|
||||
/* Make sure the end angle is "on the right side" of the start angle */
|
||||
if(GetArcDirection32(hdc)==AD_CLOCKWISE)
|
||||
{
|
||||
if(angleEnd<=angleStart)
|
||||
{
|
||||
angleEnd+=2*M_PI;
|
||||
assert(angleEnd>=angleStart);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(angleEnd>=angleStart)
|
||||
{
|
||||
angleEnd-=2*M_PI;
|
||||
assert(angleEnd<=angleStart);
|
||||
}
|
||||
}
|
||||
|
||||
/* Add the arc to the path with one Bezier spline per quadrant that the
|
||||
* arc spans */
|
||||
start=TRUE;
|
||||
end=FALSE;
|
||||
do
|
||||
{
|
||||
/* Determine the start and end angles for this quadrant */
|
||||
if(start)
|
||||
{
|
||||
angleStartQuadrant=angleStart;
|
||||
if(GetArcDirection32(hdc)==AD_CLOCKWISE)
|
||||
angleEndQuadrant=(floor(angleStart/M_PI_2)+1.0)*M_PI_2;
|
||||
else
|
||||
angleEndQuadrant=(ceil(angleStart/M_PI_2)-1.0)*M_PI_2;
|
||||
}
|
||||
else
|
||||
{
|
||||
angleStartQuadrant=angleEndQuadrant;
|
||||
if(GetArcDirection32(hdc)==AD_CLOCKWISE)
|
||||
angleEndQuadrant+=M_PI_2;
|
||||
else
|
||||
angleEndQuadrant-=M_PI_2;
|
||||
}
|
||||
|
||||
/* Have we reached the last part of the arc? */
|
||||
if((GetArcDirection32(hdc)==AD_CLOCKWISE &&
|
||||
angleEnd<=angleEndQuadrant) ||
|
||||
(GetArcDirection32(hdc)==AD_COUNTERCLOCKWISE &&
|
||||
angleEnd>=angleEndQuadrant))
|
||||
{
|
||||
/* Adjust the end angle for this quadrant */
|
||||
angleEndQuadrant=angleEnd;
|
||||
end=TRUE;
|
||||
}
|
||||
|
||||
/* Add the Bezier spline to the path */
|
||||
PATH_DoArcPart(pPath, corners, angleStartQuadrant, angleEndQuadrant,
|
||||
start);
|
||||
start=FALSE;
|
||||
} while(!end);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* Internal functions
|
||||
|
@ -702,3 +919,85 @@ static BOOL32 PATH_GetPathFromHDC(HDC32 hdc, GdiPath **ppPath)
|
|||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* PATH_DoArcPart
|
||||
*
|
||||
* Creates a Bezier spline that corresponds to part of an arc and appends the
|
||||
* corresponding points to the path. The start and end angles are passed in
|
||||
* "angleStart" and "angleEnd"; these angles should span a quarter circle
|
||||
* at most. If "addMoveTo" is true, a PT_MOVETO entry for the first control
|
||||
* point is added to the path; otherwise, it is assumed that the current
|
||||
* position is equal to the first control point.
|
||||
*/
|
||||
static BOOL32 PATH_DoArcPart(GdiPath *pPath, POINT32 corners[],
|
||||
double angleStart, double angleEnd, BOOL32 addMoveTo)
|
||||
{
|
||||
double halfAngle, a;
|
||||
double xNorm[4], yNorm[4];
|
||||
POINT32 point;
|
||||
int i;
|
||||
|
||||
assert(fabs(angleEnd-angleStart)<=M_PI_2);
|
||||
|
||||
/* FIXME: Is there an easier way of computing this? */
|
||||
|
||||
/* Compute control points */
|
||||
halfAngle=(angleEnd-angleStart)/2.0;
|
||||
a=4.0/3.0*(1-cos(halfAngle))/sin(halfAngle);
|
||||
xNorm[0]=cos(angleStart);
|
||||
yNorm[0]=sin(angleStart);
|
||||
xNorm[1]=xNorm[0] - a*yNorm[0];
|
||||
yNorm[1]=yNorm[0] + a*xNorm[0];
|
||||
xNorm[3]=cos(angleEnd);
|
||||
yNorm[3]=sin(angleEnd);
|
||||
xNorm[2]=xNorm[3] + a*yNorm[3];
|
||||
yNorm[2]=yNorm[3] - a*xNorm[3];
|
||||
|
||||
/* Add starting point to path if desired */
|
||||
if(addMoveTo)
|
||||
{
|
||||
PATH_ScaleNormalizedPoint(corners, xNorm[0], yNorm[0], &point);
|
||||
if(!PATH_AddEntry(pPath, point, PT_MOVETO))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Add remaining control points */
|
||||
for(i=1; i<4; i++)
|
||||
{
|
||||
PATH_ScaleNormalizedPoint(corners, xNorm[i], yNorm[i], &point);
|
||||
if(!PATH_AddEntry(pPath, point, PT_BEZIERTO))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* PATH_ScaleNormalizedPoint
|
||||
*
|
||||
* Scales a normalized point (x, y) with respect to the box whose corners are
|
||||
* passed in "corners". The point is stored in "*pPoint". The normalized
|
||||
* coordinates (-1.0, -1.0) correspond to corners[0], the coordinates
|
||||
* (1.0, 1.0) correspond to corners[1].
|
||||
*/
|
||||
static void PATH_ScaleNormalizedPoint(POINT32 corners[], double x, double y,
|
||||
POINT32 *pPoint)
|
||||
{
|
||||
pPoint->x=(INT32)floor( (double)corners[0].x +
|
||||
(double)(corners[1].x-corners[0].x)*0.5*(x+1.0) );
|
||||
pPoint->y=(INT32)floor( (double)corners[0].y +
|
||||
(double)(corners[1].y-corners[0].y)*0.5*(y+1.0) );
|
||||
}
|
||||
|
||||
/* PATH_NormalizePoint
|
||||
*
|
||||
* Normalizes a point with respect to the box whose corners are passed in
|
||||
* "corners". The normalized coordinates are stored in "*pX" and "*pY".
|
||||
*/
|
||||
static void PATH_NormalizePoint(POINT32 corners[], const POINT32 *pPoint,
|
||||
double *pX, double *pY)
|
||||
{
|
||||
*pX=(double)(pPoint->x-corners[0].x)/(double)(corners[1].x-corners[0].x) *
|
||||
2.0 - 1.0;
|
||||
*pY=(double)(pPoint->y-corners[0].y)/(double)(corners[1].y-corners[0].y) *
|
||||
2.0 - 1.0;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <stdlib.h>
|
||||
#include "brush.h"
|
||||
#include "win16drv.h"
|
||||
#include "heap.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -21,14 +22,26 @@ HBRUSH32 WIN16DRV_BRUSH_SelectObject( DC * dc, HBRUSH32 hbrush,
|
|||
lBrush16.lbStyle = brush->logbrush.lbStyle;
|
||||
lBrush16.lbColor = brush->logbrush.lbColor;
|
||||
lBrush16.lbHatch = brush->logbrush.lbHatch;
|
||||
nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, DRVOBJ_BRUSH,
|
||||
&lBrush16, NULL,
|
||||
0);
|
||||
/* may need to realloc segptrFOntInfo*/
|
||||
physDev->segptrBrushInfo = WIN16_GlobalLock16(GlobalAlloc16(GHND, nSize));
|
||||
|
||||
|
||||
if ( physDev->BrushInfo )
|
||||
{
|
||||
dprintf_win16drv(stddeb, "UnRealizing BrushInfo\n");
|
||||
nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, -DRVOBJ_BRUSH,
|
||||
physDev->BrushInfo,
|
||||
physDev->BrushInfo, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, DRVOBJ_BRUSH,
|
||||
&lBrush16, 0, 0);
|
||||
physDev->BrushInfo = SEGPTR_ALLOC( nSize );
|
||||
}
|
||||
|
||||
|
||||
nSize = PRTDRV_RealizeObject(physDev->segptrPDEVICE, DRVOBJ_BRUSH,
|
||||
&lBrush16,
|
||||
(LPVOID)physDev->segptrBrushInfo,
|
||||
physDev->BrushInfo,
|
||||
win16drv_SegPtr_TextXForm);
|
||||
|
||||
return prevHandle;
|
||||
|
|
|
@ -2,13 +2,18 @@
|
|||
* Windows driver font functions
|
||||
*
|
||||
* Copyright 1996 John Harvey
|
||||
* 1998 Huw Davies
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "windows.h"
|
||||
#include "win16drv.h"
|
||||
#include "gdi.h"
|
||||
#include "module.h"
|
||||
#include "font.h"
|
||||
#include "heap.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -20,22 +25,18 @@ BOOL32 WIN16DRV_GetTextExtentPoint( DC *dc, LPCSTR str, INT32 count,
|
|||
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
|
||||
DWORD dwRet;
|
||||
|
||||
printf("LPGDI_GetTextExtPoint: %04x %s %d %p\n", dc->hSelf, str, count, size);
|
||||
|
||||
/* TTD support PS fonts */
|
||||
/* Assume fixed font */
|
||||
size->cx = count * physDev->tm.tmAveCharWidth;
|
||||
size->cy = physDev->tm.tmHeight;
|
||||
|
||||
|
||||
printf("LPGDI_GetTextExtPoint: cx=%d, cy=%d\n", size->cx,size->cy);
|
||||
dprintf_win16drv(stddeb, "WIN16DRV_GetTextExtPoint: %04x %s %d %p\n",
|
||||
dc->hSelf, str, count, size);
|
||||
|
||||
dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, 0, 0,
|
||||
NULL, str,
|
||||
-count, physDev->segptrFontInfo, win16drv_SegPtr_DrawMode,
|
||||
-count, physDev->FontInfo,
|
||||
win16drv_SegPtr_DrawMode,
|
||||
win16drv_SegPtr_TextXForm, NULL, NULL, 0);
|
||||
printf("LPGDI_GetTextExtPoint: cx=0x%x, cy=0x%x Ret 0x%lx\n", size->cx, size->cy, dwRet);
|
||||
|
||||
size->cx = XDSTOLS(dc,LOWORD(dwRet));
|
||||
size->cy = YDSTOLS(dc,HIWORD(dwRet));
|
||||
dprintf_win16drv(stddeb, "WIN16DRV_GetTextExtPoint: cx=0x%x, cy=0x%x\n",
|
||||
size->cx, size->cy );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -47,30 +48,90 @@ BOOL32 WIN16DRV_GetTextMetrics( DC *dc, TEXTMETRIC32A *metrics )
|
|||
{
|
||||
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
|
||||
|
||||
printf("LPGDI_GetTextMetrics: %04x \n", dc->hSelf);
|
||||
dprintf_win16drv(stddeb, "WIN16DRV_GetTextMetrics: %04x \n", dc->hSelf);
|
||||
|
||||
metrics->tmHeight = physDev->tm.tmHeight;
|
||||
metrics->tmAscent = physDev->tm.tmAscent;
|
||||
metrics->tmDescent = physDev->tm.tmDescent;
|
||||
metrics->tmInternalLeading = physDev->tm.tmInternalLeading;
|
||||
metrics->tmExternalLeading = physDev->tm.tmExternalLeading;
|
||||
metrics->tmAveCharWidth = physDev->tm.tmAveCharWidth;
|
||||
metrics->tmMaxCharWidth = physDev->tm.tmMaxCharWidth;
|
||||
metrics->tmWeight = physDev->tm.tmWeight;
|
||||
metrics->tmOverhang = physDev->tm.tmOverhang;
|
||||
metrics->tmDigitizedAspectX = physDev->tm.tmDigitizedAspectX;
|
||||
metrics->tmDigitizedAspectY = physDev->tm.tmDigitizedAspectY;
|
||||
metrics->tmFirstChar = physDev->tm.tmFirstChar;
|
||||
metrics->tmLastChar = physDev->tm.tmLastChar;
|
||||
metrics->tmDefaultChar = physDev->tm.tmDefaultChar;
|
||||
metrics->tmBreakChar = physDev->tm.tmBreakChar;
|
||||
metrics->tmItalic = physDev->tm.tmItalic;
|
||||
metrics->tmUnderlined = physDev->tm.tmUnderlined;
|
||||
metrics->tmStruckOut = physDev->tm.tmStruckOut;
|
||||
metrics->tmPitchAndFamily = physDev->tm.tmPitchAndFamily;
|
||||
metrics->tmCharSet = physDev->tm.tmCharSet;
|
||||
FONT_TextMetric16to32A( &physDev->tm, metrics );
|
||||
|
||||
printf("H %d, A %d, D %d, Int %d, Ext %d, AW %d, MW %d, W %d\n",
|
||||
dprintf_win16drv(stddeb,
|
||||
"H %d, A %d, D %d, Int %d, Ext %d, AW %d, MW %d, W %d\n",
|
||||
metrics->tmHeight,
|
||||
metrics->tmAscent,
|
||||
metrics->tmDescent,
|
||||
metrics->tmInternalLeading,
|
||||
metrics->tmExternalLeading,
|
||||
metrics->tmAveCharWidth,
|
||||
metrics->tmMaxCharWidth,
|
||||
metrics->tmWeight);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
HFONT32 WIN16DRV_FONT_SelectObject( DC * dc, HFONT32 hfont, FONTOBJ * font)
|
||||
{
|
||||
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
|
||||
HPEN32 prevHandle = dc->w.hFont;
|
||||
int nSize;
|
||||
|
||||
dc->w.hFont = hfont;
|
||||
|
||||
dprintf_win16drv(stddeb, "WIN16DRV_FONT_SelectObject '%s' h=%d\n",
|
||||
font->logfont.lfFaceName, font->logfont.lfHeight);
|
||||
|
||||
|
||||
if( physDev->FontInfo )
|
||||
{
|
||||
dprintf_win16drv(stddeb, "UnRealizing FontInfo\n");
|
||||
nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, -DRVOBJ_FONT,
|
||||
physDev->FontInfo,
|
||||
physDev->FontInfo, 0);
|
||||
}
|
||||
|
||||
memcpy(&physDev->lf, &font->logfont, sizeof(LOGFONT16));
|
||||
nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, DRVOBJ_FONT,
|
||||
&physDev->lf, 0, 0);
|
||||
|
||||
if( physDev->FontInfo &&
|
||||
HeapSize( SegptrHeap, 0, physDev->FontInfo ) < nSize )
|
||||
{
|
||||
SEGPTR_FREE( physDev->FontInfo );
|
||||
physDev->FontInfo = NULL;
|
||||
}
|
||||
|
||||
if( !physDev->FontInfo )
|
||||
physDev->FontInfo = SEGPTR_ALLOC( nSize );
|
||||
|
||||
|
||||
nSize = PRTDRV_RealizeObject(physDev->segptrPDEVICE, DRVOBJ_FONT,
|
||||
&physDev->lf,
|
||||
physDev->FontInfo,
|
||||
win16drv_SegPtr_TextXForm );
|
||||
|
||||
#define fi physDev->FontInfo
|
||||
physDev->tm.tmHeight = YDSTOLS(dc, fi->dfPixHeight);
|
||||
physDev->tm.tmAscent = YDSTOLS(dc, fi->dfAscent);
|
||||
physDev->tm.tmDescent = physDev->tm.tmHeight -
|
||||
physDev->tm.tmAscent;
|
||||
physDev->tm.tmInternalLeading = YDSTOLS(dc, fi->dfInternalLeading);
|
||||
physDev->tm.tmExternalLeading = YDSTOLS(dc, fi->dfExternalLeading);
|
||||
physDev->tm.tmAveCharWidth = XDSTOLS(dc, fi->dfAvgWidth);
|
||||
physDev->tm.tmMaxCharWidth = XDSTOLS(dc, fi->dfMaxWidth);
|
||||
physDev->tm.tmWeight = fi->dfWeight;
|
||||
physDev->tm.tmOverhang = 0; /*FIXME*/
|
||||
physDev->tm.tmDigitizedAspectX = fi->dfHorizRes;
|
||||
physDev->tm.tmDigitizedAspectY = fi->dfVertRes;
|
||||
physDev->tm.tmFirstChar = fi->dfFirstChar;
|
||||
physDev->tm.tmLastChar = fi->dfLastChar;
|
||||
physDev->tm.tmDefaultChar = fi->dfDefaultChar;
|
||||
physDev->tm.tmBreakChar = fi->dfBreakChar;
|
||||
physDev->tm.tmItalic = fi->dfItalic;
|
||||
physDev->tm.tmUnderlined = fi->dfUnderline;
|
||||
physDev->tm.tmStruckOut = fi->dfStrikeOut;
|
||||
physDev->tm.tmPitchAndFamily = fi->dfPitchAndFamily;
|
||||
physDev->tm.tmCharSet = fi->dfCharSet;
|
||||
#undef fi
|
||||
|
||||
dprintf_win16drv(stddeb,
|
||||
"H %d, A %d, D %d, Int %d, Ext %d, AW %d, MW %d, W %d\n",
|
||||
physDev->tm.tmHeight,
|
||||
physDev->tm.tmAscent,
|
||||
physDev->tm.tmDescent,
|
||||
|
@ -80,14 +141,7 @@ BOOL32 WIN16DRV_GetTextMetrics( DC *dc, TEXTMETRIC32A *metrics )
|
|||
physDev->tm.tmMaxCharWidth,
|
||||
physDev->tm.tmWeight);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
HFONT32 WIN16DRV_FONT_SelectObject( DC * dc, HFONT32 hfont, FONTOBJ * font)
|
||||
{
|
||||
/* TTD */
|
||||
printf("In WIN16DRV_FONT_SelectObject\n");
|
||||
return GetStockObject32(SYSTEM_FIXED_FONT);
|
||||
return prevHandle;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -97,12 +151,64 @@ BOOL32 WIN16DRV_GetCharWidth( DC *dc, UINT32 firstChar, UINT32 lastChar,
|
|||
LPINT32 buffer )
|
||||
{
|
||||
int i;
|
||||
WORD wRet;
|
||||
|
||||
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
|
||||
/* TTD Need to cope with PS fonts */
|
||||
for (i = firstChar; i <= lastChar; i++)
|
||||
*buffer++ = physDev->tm.tmAveCharWidth;
|
||||
return TRUE;
|
||||
|
||||
dprintf_win16drv( stddeb, "WIN16DRV_GetCharWidth: %d - %d into %p\n",
|
||||
firstChar, lastChar, buffer );
|
||||
|
||||
wRet = PRTDRV_GetCharWidth( physDev->segptrPDEVICE, buffer, firstChar,
|
||||
lastChar, physDev->FontInfo,
|
||||
win16drv_SegPtr_DrawMode,
|
||||
win16drv_SegPtr_TextXForm );
|
||||
if( debugging_win16drv )
|
||||
for(i = 0; i <= lastChar - firstChar; i++)
|
||||
dprintf_win16drv(stddeb, "Char %x: width %d\n", i + firstChar,
|
||||
buffer[i]);
|
||||
|
||||
return wRet;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* WIN16DRV_EnumDeviceFonts
|
||||
*/
|
||||
|
||||
BOOL32 WIN16DRV_EnumDeviceFonts( DC* dc, LPLOGFONT16 plf,
|
||||
DEVICEFONTENUMPROC proc, LPARAM lp )
|
||||
{
|
||||
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
|
||||
WORD wRet;
|
||||
WEPFC wepfc = {proc, lp};
|
||||
|
||||
/* EnumDFontCallback is GDI.158 */
|
||||
FARPROC16 pfnCallback = MODULE_GetEntryPoint( GetModuleHandle16("GDI"),
|
||||
158 );
|
||||
|
||||
wRet = PRTDRV_EnumDFonts(physDev->segptrPDEVICE, plf->lfFaceName[0] ?
|
||||
plf->lfFaceName : NULL , pfnCallback , &wepfc );
|
||||
return wRet;
|
||||
}
|
||||
|
||||
/*
|
||||
* EnumCallback (GDI.158)
|
||||
*
|
||||
* This is the callback function used when EnumDFonts is called.
|
||||
* (The printer drivers uses it to pass info on available fonts).
|
||||
*
|
||||
* lpvClientData is the pointer passed to EnumDFonts, which points to a WEPFC
|
||||
* structure (WEPFC = WINE_ENUM_PRINTER_FONT_CALLBACK).
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
WORD WINAPI WineEnumDFontCallback(LPLOGFONT16 lpLogFont,
|
||||
LPTEXTMETRIC16 lpTextMetrics,
|
||||
WORD wFontType, LONG lpClientData)
|
||||
{
|
||||
dprintf_win16drv(stddeb, "In WineEnumDFontCallback plf=%p\n", lpLogFont);
|
||||
return (*(((WEPFC *)lpClientData)->proc))( lpLogFont, lpTextMetrics,
|
||||
wFontType, ((WEPFC *)lpClientData)->lp );
|
||||
}
|
||||
|
||||
|
|
|
@ -41,9 +41,9 @@ WIN16DRV_LineTo( DC *dc, INT32 x, INT32 y )
|
|||
points[1].y = dc->w.DCOrgY + YLPTODP( dc, y );
|
||||
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
|
||||
OS_POLYLINE, 2, points,
|
||||
physDev->segptrPenInfo,
|
||||
physDev->PenInfo,
|
||||
NULL,
|
||||
win16drv_SegPtr_DrawMode, NULL);
|
||||
win16drv_SegPtr_DrawMode, dc->w.hClipRgn);
|
||||
|
||||
dc->w.CursPosX = x;
|
||||
dc->w.CursPosY = y;
|
||||
|
@ -60,6 +60,7 @@ WIN16DRV_Rectangle(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom)
|
|||
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
|
||||
BOOL32 bRet = 0;
|
||||
POINT16 points[2];
|
||||
|
||||
dprintf_win16drv(stddeb, "In WIN16DRV_Rectangle, x %d y %d DCOrgX %d y %d\n",
|
||||
left, top, dc->w.DCOrgX, dc->w.DCOrgY);
|
||||
dprintf_win16drv(stddeb, "In WIN16DRV_Rectangle, VPortOrgX %d y %d\n",
|
||||
|
@ -70,10 +71,10 @@ WIN16DRV_Rectangle(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom)
|
|||
points[1].x = XLPTODP(dc, right);
|
||||
points[1].y = YLPTODP(dc, bottom);
|
||||
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
|
||||
OS_RECTANGLE, 2, points,
|
||||
physDev->segptrPenInfo,
|
||||
physDev->segptrBrushInfo,
|
||||
win16drv_SegPtr_DrawMode, NULL);
|
||||
OS_RECTANGLE, 2, points,
|
||||
physDev->PenInfo,
|
||||
physDev->BrushInfo,
|
||||
win16drv_SegPtr_DrawMode, dc->w.hClipRgn);
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
@ -90,17 +91,90 @@ WIN16DRV_Polygon(DC *dc, LPPOINT32 pt, INT32 count )
|
|||
BOOL32 bRet = 0;
|
||||
LPPOINT16 points;
|
||||
int i;
|
||||
|
||||
if(count < 2) return TRUE;
|
||||
if(pt[0].x != pt[count-1].x || pt[0].y != pt[count-1].y)
|
||||
count++; /* Ensure polygon is closed */
|
||||
|
||||
points = HEAP_xalloc( GetProcessHeap(), 0, count * sizeof(POINT16) );
|
||||
for (i = 0; i<count ; i++)
|
||||
for (i = 0; i < count - 1; i++)
|
||||
{
|
||||
points[i].x = ((pt[i].x - dc->wndOrgX) * dc->vportExtX/ dc->wndExtX) + dc->vportOrgX;
|
||||
points[i].y = ((pt[i].y - dc->wndOrgY) * dc->vportExtY/ dc->wndExtY) + dc->vportOrgY;
|
||||
points[i].x = XLPTODP( dc, pt[i].x );
|
||||
points[i].y = YLPTODP( dc, pt[i].y );
|
||||
}
|
||||
points[count-1].x = points[0].x;
|
||||
points[count-1].y = points[0].y;
|
||||
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
|
||||
OS_WINDPOLYGON, 2, points,
|
||||
physDev->segptrPenInfo,
|
||||
physDev->segptrBrushInfo,
|
||||
win16drv_SegPtr_DrawMode, NULL);
|
||||
OS_WINDPOLYGON, count, points,
|
||||
physDev->PenInfo,
|
||||
physDev->BrushInfo,
|
||||
win16drv_SegPtr_DrawMode, dc->w.hClipRgn);
|
||||
HeapFree( GetProcessHeap(), 0, points );
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* WIN16DRV_Polyline
|
||||
*/
|
||||
BOOL32
|
||||
WIN16DRV_Polyline(DC *dc, LPPOINT32 pt, INT32 count )
|
||||
{
|
||||
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
|
||||
BOOL32 bRet = 0;
|
||||
LPPOINT16 points;
|
||||
int i;
|
||||
|
||||
if(count < 2) return TRUE;
|
||||
|
||||
points = HEAP_xalloc( GetProcessHeap(), 0, count * sizeof(POINT16) );
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
points[i].x = XLPTODP( dc, pt[i].x );
|
||||
points[i].y = YLPTODP( dc, pt[i].y );
|
||||
}
|
||||
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
|
||||
OS_POLYLINE, count, points,
|
||||
physDev->PenInfo,
|
||||
NULL,
|
||||
win16drv_SegPtr_DrawMode, dc->w.hClipRgn);
|
||||
HeapFree( GetProcessHeap(), 0, points );
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* WIN16DRV_Ellipse
|
||||
*/
|
||||
BOOL32
|
||||
WIN16DRV_Ellipse(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom)
|
||||
{
|
||||
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
|
||||
BOOL32 bRet = 0;
|
||||
POINT16 points[2];
|
||||
dprintf_win16drv(stddeb, "In WIN16DRV_Ellipse, x %d y %d DCOrgX %d y %d\n",
|
||||
left, top, dc->w.DCOrgX, dc->w.DCOrgY);
|
||||
dprintf_win16drv(stddeb, "In WIN16DRV_Ellipse, VPortOrgX %d y %d\n",
|
||||
dc->vportOrgX, dc->vportOrgY);
|
||||
points[0].x = XLPTODP(dc, left);
|
||||
points[0].y = YLPTODP(dc, top);
|
||||
|
||||
points[1].x = XLPTODP(dc, right);
|
||||
points[1].y = YLPTODP(dc, bottom);
|
||||
|
||||
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
|
||||
OS_ELLIPSE, 2, points,
|
||||
physDev->PenInfo,
|
||||
physDev->BrushInfo,
|
||||
win16drv_SegPtr_DrawMode, dc->w.hClipRgn);
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* Windows Device Context initialisation functions
|
||||
*
|
||||
* Copyright 1996 John Harvey
|
||||
* 1998 Huw Davies
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -12,7 +13,6 @@
|
|||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include "windows.h"
|
||||
#include "module.h"
|
||||
#include "win16drv.h"
|
||||
#include "gdi.h"
|
||||
#include "bitmap.h"
|
||||
|
@ -20,6 +20,7 @@
|
|||
#include "color.h"
|
||||
#include "font.h"
|
||||
#include "callback.h"
|
||||
#include "options.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -54,8 +55,8 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
|
|||
WIN16DRV_CreateDC, /* pCreateDC */
|
||||
NULL, /* pDeleteDC */
|
||||
NULL, /* pDeleteObject */
|
||||
NULL, /* pEllipse */
|
||||
NULL, /* pEnumDeviceFonts */
|
||||
WIN16DRV_Ellipse, /* pEllipse */
|
||||
WIN16DRV_EnumDeviceFonts, /* pEnumDeviceFonts */
|
||||
WIN16DRV_Escape, /* pEscape */
|
||||
NULL, /* pExcludeClipRect */
|
||||
NULL, /* pExcludeVisRect */
|
||||
|
@ -77,9 +78,9 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
|
|||
NULL, /* pPie */
|
||||
NULL, /* pPolyPolygon */
|
||||
WIN16DRV_Polygon, /* pPolygon */
|
||||
NULL, /* pPolyline */
|
||||
WIN16DRV_Polyline, /* pPolyline */
|
||||
NULL, /* pRealizePalette */
|
||||
WIN16DRV_Rectangle, /* pRectangle */
|
||||
WIN16DRV_Rectangle, /* pRectangle */
|
||||
NULL, /* pRestoreDC */
|
||||
NULL, /* pRoundRect */
|
||||
NULL, /* pSaveDC */
|
||||
|
@ -159,74 +160,15 @@ void InitDrawMode(LPDRAWMODE lpDrawMode)
|
|||
lpDrawMode->LTextColor = 0x00000000;
|
||||
}
|
||||
|
||||
/*
|
||||
* EnumCallback (GDI.158)
|
||||
*
|
||||
* This is the callback function used when EnumDFonts is called.
|
||||
* (The printer drivers uses it to pass info on available fonts).
|
||||
*
|
||||
* lpvClientData is the pointer passed to EnumDFonts, which points to a WEPFC
|
||||
* structure (WEPFC = WINE_ENUM_PRINTER_FONT_CALLBACK). This structure
|
||||
* contains infomation on how to store the data passed .
|
||||
*
|
||||
* There are two modes:
|
||||
* 1) Just count the number of fonts available.
|
||||
* 2) Store all font data passed.
|
||||
*/
|
||||
WORD WINAPI WineEnumDFontCallback(LPLOGFONT16 lpLogFont,
|
||||
LPTEXTMETRIC16 lpTextMetrics,
|
||||
WORD wFontType, LONG lpvClientData)
|
||||
{
|
||||
int wRet = 0;
|
||||
WEPFC *pWEPFC = (WEPFC *)lpvClientData;
|
||||
|
||||
/* Make sure we have the right structure */
|
||||
if (pWEPFC != NULL )
|
||||
{
|
||||
dprintf_win16drv(stddeb, "mode is 0x%x\n",pWEPFC->nMode);
|
||||
|
||||
switch (pWEPFC->nMode)
|
||||
{
|
||||
/* Count how many fonts */
|
||||
case 1:
|
||||
pWEPFC->nCount++;
|
||||
break;
|
||||
|
||||
/* Store the fonts in the printer driver structure */
|
||||
case 2:
|
||||
{
|
||||
PRINTER_FONTS_INFO *pPFI;
|
||||
|
||||
dprintf_win16drv(stddeb, "WineEnumDFontCallback: Found %s %x\n",
|
||||
lpLogFont->lfFaceName, wFontType);
|
||||
|
||||
pPFI = &pWEPFC->pLPD->paPrinterFonts[pWEPFC->nCount];
|
||||
memcpy(&(pPFI->lf), lpLogFont, sizeof(LOGFONT16));
|
||||
memcpy(&(pPFI->tm), lpTextMetrics, sizeof(TEXTMETRIC16));
|
||||
pWEPFC->nCount++;
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
wRet = 1;
|
||||
}
|
||||
dprintf_win16drv(stddeb, "WineEnumDFontCallback: returnd %d\n", wRet);
|
||||
return wRet;
|
||||
}
|
||||
|
||||
BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
|
||||
const DEVMODE16* initData )
|
||||
{
|
||||
LOADED_PRINTER_DRIVER *pLPD;
|
||||
WORD wRet;
|
||||
DeviceCaps *printerDevCaps;
|
||||
FARPROC16 pfnCallback;
|
||||
int nPDEVICEsize;
|
||||
PDEVICE_HEADER *pPDH;
|
||||
WIN16DRV_PDEVICE *physDev;
|
||||
int numFonts;
|
||||
/* Realizing fonts */
|
||||
int nSize;
|
||||
char printerEnabled[20];
|
||||
PROFILE_GetWineIniString( "wine", "printer", "off",
|
||||
printerEnabled, sizeof(printerEnabled) );
|
||||
|
@ -290,93 +232,14 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
|
|||
/* Now get the printer driver to initialise this data */
|
||||
wRet = PRTDRV_Enable((LPVOID)physDev->segptrPDEVICE, INITPDEVICE, device, driver, output, NULL);
|
||||
|
||||
/* Now enumerate the fonts supported by the printer driver*/
|
||||
/* GDI.158 is EnumCallback, which is called by the 16bit printer driver */
|
||||
/* passing information on the available fonts */
|
||||
if (pLPD->paPrinterFonts == NULL)
|
||||
{
|
||||
pfnCallback = MODULE_GetEntryPoint( GetModuleHandle16("GDI"), 158 );
|
||||
|
||||
if (pfnCallback != NULL)
|
||||
{
|
||||
WEPFC wepfc;
|
||||
|
||||
wepfc.nMode = 1;
|
||||
wepfc.nCount = 0;
|
||||
wepfc.pLPD = pLPD;
|
||||
|
||||
/* First count the number of fonts */
|
||||
|
||||
PRTDRV_EnumDFonts(physDev->segptrPDEVICE, NULL, pfnCallback,
|
||||
(void *)&wepfc);
|
||||
|
||||
/* Allocate a buffer to store all of the fonts */
|
||||
pLPD->nPrinterFonts = wepfc.nCount;
|
||||
dprintf_win16drv(stddeb, "Got %d fonts\n",wepfc.nCount);
|
||||
|
||||
if (wepfc.nCount > 0)
|
||||
{
|
||||
|
||||
pLPD->paPrinterFonts = malloc(sizeof(PRINTER_FONTS_INFO) * wepfc.nCount);
|
||||
|
||||
/* Now get all of the fonts */
|
||||
wepfc.nMode = 2;
|
||||
wepfc.nCount = 0;
|
||||
PRTDRV_EnumDFonts(physDev->segptrPDEVICE, NULL, pfnCallback,
|
||||
(void *)&wepfc);
|
||||
numFonts = wepfc.nCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If the number of fonts returned are zero we can not continue */
|
||||
fprintf( stderr, "No fonts? Aborting CreateDC...\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Select the first font into the DC */
|
||||
/* Set up the logfont */
|
||||
memcpy(&physDev->lf,
|
||||
&pLPD->paPrinterFonts[0].lf,
|
||||
sizeof(LOGFONT16));
|
||||
|
||||
/* Set up the textmetrics */
|
||||
memcpy(&physDev->tm,
|
||||
&pLPD->paPrinterFonts[0].tm,
|
||||
sizeof(TEXTMETRIC16));
|
||||
|
||||
physDev->FontInfo = NULL;
|
||||
physDev->BrushInfo = NULL;
|
||||
physDev->PenInfo = NULL;
|
||||
win16drv_SegPtr_TextXForm = WIN16_GlobalLock16(GlobalAlloc16(GHND, sizeof(TEXTXFORM16)));
|
||||
win16drv_TextXFormP = PTR_SEG_TO_LIN(win16drv_SegPtr_TextXForm);
|
||||
|
||||
InitTextXForm(win16drv_TextXFormP);
|
||||
#ifdef SUPPORT_REALIZED_FONTS
|
||||
/* TTD should calculate this */
|
||||
|
||||
/* First get the size of the realized font */
|
||||
nSize = PRTDRV_RealizeObject(physDev->segptrPDEVICE, DRVOBJ_FONT,
|
||||
&pLPD->paPrinterFonts[0], NULL,
|
||||
0);
|
||||
|
||||
physDev->segptrFontInfo = WIN16_GlobalLock16(GlobalAlloc16(GHND, nSize));
|
||||
/* Realize the font */
|
||||
PRTDRV_RealizeObject(physDev->segptrPDEVICE, DRVOBJ_FONT,
|
||||
&pLPD->paPrinterFonts[0],
|
||||
(LPVOID)physDev->segptrFontInfo,
|
||||
win16drv_SegPtr_TextXForm);
|
||||
/* Quick look at structure */
|
||||
if (physDev->segptrFontInfo)
|
||||
{
|
||||
FONTINFO16 *p = (FONTINFO16 *)PTR_SEG_TO_LIN(physDev->segptrFontInfo);
|
||||
|
||||
dprintf_win16drv(stddeb, "T:%d VR:%d HR:%d, F:%d L:%d\n",
|
||||
p->dfType,
|
||||
p->dfVertRes, p->dfHorizRes,
|
||||
p->dfFirstCHAR, p->dfLastCHAR
|
||||
);
|
||||
}
|
||||
|
||||
#endif
|
||||
/* TTD Lots more to do here */
|
||||
win16drv_SegPtr_DrawMode = WIN16_GlobalLock16(GlobalAlloc16(GHND, sizeof(DRAWMODE)));
|
||||
win16drv_DrawModeP = PTR_SEG_TO_LIN(win16drv_SegPtr_DrawMode);
|
||||
|
@ -393,8 +256,8 @@ BOOL32 WIN16DRV_PatBlt( struct tagDC *dc, INT32 left, INT32 top,
|
|||
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
|
||||
BOOL32 bRet = 0;
|
||||
|
||||
bRet = PRTDRV_StretchBlt( physDev->segptrPDEVICE, left, top, width, height, NULL, 0, 0, width, height,
|
||||
PATCOPY, physDev->segptrBrushInfo, win16drv_SegPtr_DrawMode, NULL);
|
||||
bRet = PRTDRV_StretchBlt( physDev->segptrPDEVICE, left, top, width, height, (SEGPTR)NULL, 0, 0, width, height,
|
||||
PATCOPY, physDev->BrushInfo, win16drv_SegPtr_DrawMode, NULL);
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
@ -417,6 +280,10 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput,
|
|||
fprintf(stderr,"Escape: ENABLEPAIRKERNING ignored.\n");
|
||||
nRet = 1;
|
||||
break;
|
||||
case GETPAIRKERNTABLE:
|
||||
fprintf(stderr,"Escape: GETPAIRKERNTABLE ignored.\n");
|
||||
nRet = 0;
|
||||
break;
|
||||
case SETABORTPROC:
|
||||
printf("Escape: SetAbortProc ignored should be stored in dc somewhere\n");
|
||||
/* Make calling application believe this worked */
|
||||
|
@ -439,7 +306,7 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput,
|
|||
|
||||
textData->nSize = cbInput;
|
||||
textData->lpindata = lpInData;
|
||||
textData->lpFont = physDev->segptrFontInfo;
|
||||
textData->lpFont = SEGPTR_GET( physDev->FontInfo );
|
||||
textData->lpXForm = win16drv_SegPtr_TextXForm;
|
||||
textData->lpDrawMode = win16drv_SegPtr_DrawMode;
|
||||
nRet = PRTDRV_Control(physDev->segptrPDEVICE, nEscape,
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "pen.h"
|
||||
#include "color.h"
|
||||
#include "win16drv.h"
|
||||
#include "heap.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -20,21 +21,30 @@ HPEN32 WIN16DRV_PEN_SelectObject( DC * dc, HPEN32 hpen, PENOBJ * pen )
|
|||
int nSize;
|
||||
LOGPEN16 lPen16;
|
||||
dc->w.hPen = hpen;
|
||||
printf("In WIN16DRV_PEN_SelectObject\n");
|
||||
dprintf_win16drv(stddeb, "In WIN16DRV_PEN_SelectObject\n");
|
||||
lPen16.lopnStyle = pen->logpen.lopnStyle;
|
||||
lPen16.lopnWidth.x = pen->logpen.lopnWidth.x;
|
||||
lPen16.lopnWidth.y = pen->logpen.lopnWidth.y;
|
||||
lPen16.lopnColor = pen->logpen.lopnColor;
|
||||
nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, DRVOBJ_PEN,
|
||||
&lPen16, NULL,
|
||||
0);
|
||||
/* may need to realloc segptrFOntInfo*/
|
||||
physDev->segptrPenInfo = WIN16_GlobalLock16(GlobalAlloc16(GHND, nSize));
|
||||
|
||||
if ( physDev->PenInfo )
|
||||
{
|
||||
dprintf_win16drv(stddeb, "UnRealizing PenInfo\n");
|
||||
nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, -DRVOBJ_PEN,
|
||||
physDev->PenInfo,
|
||||
physDev->PenInfo, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, DRVOBJ_PEN,
|
||||
&lPen16, 0, 0);
|
||||
physDev->PenInfo = SEGPTR_ALLOC( nSize );
|
||||
}
|
||||
|
||||
nSize = PRTDRV_RealizeObject(physDev->segptrPDEVICE, DRVOBJ_PEN,
|
||||
&lPen16,
|
||||
(LPVOID)physDev->segptrPenInfo,
|
||||
physDev->PenInfo,
|
||||
0);
|
||||
|
||||
|
||||
return prevHandle;
|
||||
}
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
#include "callback.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
#include "bitmap.h"
|
||||
#include "pen.h"
|
||||
|
||||
#define MAX_PRINTER_DRIVERS 16
|
||||
static LOADED_PRINTER_DRIVER *gapLoadedPrinterDrivers[MAX_PRINTER_DRIVERS];
|
||||
|
@ -244,11 +246,11 @@ WORD PRTDRV_Enable(LPVOID lpDevInfo, WORD wStyle, LPCSTR lpDestDevType,
|
|||
lP5 = (LONG)lpData;
|
||||
|
||||
wRet = Callbacks->CallDrvEnableProc(pLPD->fn[FUNC_ENABLE],
|
||||
(wStyle==INITPDEVICE)?lP1:SEGPTR_GET(lP1),
|
||||
wP2,
|
||||
SEGPTR_GET(lP3),
|
||||
SEGPTR_GET(lP4),
|
||||
lP5);
|
||||
(wStyle==INITPDEVICE)?(SEGPTR)lP1:SEGPTR_GET(lP1),
|
||||
wP2,
|
||||
SEGPTR_GET(lP3),
|
||||
SEGPTR_GET(lP4),
|
||||
lP5);
|
||||
SEGPTR_FREE(lP3);
|
||||
SEGPTR_FREE(lP4);
|
||||
|
||||
|
@ -272,7 +274,8 @@ WORD PRTDRV_EnumDFonts(LPPDEVICE lpDestDev, LPSTR lpFaceName,
|
|||
WORD wRet = 0;
|
||||
LOADED_PRINTER_DRIVER *pLPD = NULL;
|
||||
|
||||
dprintf_win16drv(stddeb, "PRTDRV_EnumDFonts:\n");
|
||||
dprintf_win16drv(stddeb, "PRTDRV_EnumDFonts: %08lx %s %p %p\n",
|
||||
lpDestDev, lpFaceName, lpCallbackFunc, lpClientData);
|
||||
|
||||
if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
|
||||
{
|
||||
|
@ -285,12 +288,15 @@ WORD PRTDRV_EnumDFonts(LPPDEVICE lpDestDev, LPSTR lpFaceName,
|
|||
}
|
||||
|
||||
lP1 = (SEGPTR)lpDestDev;
|
||||
lP2 = SEGPTR_STRDUP(lpFaceName);
|
||||
if(lpFaceName)
|
||||
lP2 = SEGPTR_STRDUP(lpFaceName);
|
||||
else
|
||||
lP2 = NULL;
|
||||
lP4 = (LONG)lpClientData;
|
||||
wRet = Callbacks->CallDrvEnumDFontsProc( pLPD->fn[FUNC_ENUMDFONTS],
|
||||
lP1, SEGPTR_GET(lP2),
|
||||
lpCallbackFunc, lP4);
|
||||
SEGPTR_FREE(lP2);
|
||||
lP1, SEGPTR_GET(lP2), lpCallbackFunc, lP4);
|
||||
if(lpFaceName)
|
||||
SEGPTR_FREE(lP2);
|
||||
} else
|
||||
fprintf(stderr,"Failed to find device\n");
|
||||
|
||||
|
@ -306,7 +312,7 @@ BOOL16 PRTDRV_EnumObj(LPPDEVICE lpDestDev, WORD iStyle,
|
|||
WORD wRet = 0;
|
||||
LOADED_PRINTER_DRIVER *pLPD = NULL;
|
||||
|
||||
dprintf_win16drv(stddeb, "PRTDRV_EnumDFonts:\n");
|
||||
dprintf_win16drv(stddeb, "PRTDRV_EnumObj:\n");
|
||||
|
||||
if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
|
||||
{
|
||||
|
@ -314,9 +320,9 @@ BOOL16 PRTDRV_EnumObj(LPPDEVICE lpDestDev, WORD iStyle,
|
|||
FARPROC16 lP3;
|
||||
WORD wP2;
|
||||
|
||||
if (pLPD->fn[FUNC_ENUMDFONTS] == NULL)
|
||||
if (pLPD->fn[FUNC_ENUMOBJ] == NULL)
|
||||
{
|
||||
dprintf_win16drv(stddeb, "PRTDRV_EnumDFonts: Not supported by driver\n");
|
||||
dprintf_win16drv(stddeb, "PRTDRV_EnumObj: Not supported by driver\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -337,7 +343,7 @@ BOOL16 PRTDRV_EnumObj(LPPDEVICE lpDestDev, WORD iStyle,
|
|||
else
|
||||
fprintf(stderr,"Failed to find device\n");
|
||||
|
||||
dprintf_win16drv(stddeb, "PRTDRV_EnumDFonts: return %x\n", wRet);
|
||||
dprintf_win16drv(stddeb, "PRTDRV_EnumObj: return %x\n", wRet);
|
||||
return wRet;
|
||||
}
|
||||
|
||||
|
@ -347,16 +353,16 @@ BOOL16 PRTDRV_EnumObj(LPPDEVICE lpDestDev, WORD iStyle,
|
|||
WORD PRTDRV_Output(LPPDEVICE lpDestDev,
|
||||
WORD wStyle,
|
||||
WORD wCount,
|
||||
POINT16 **points,
|
||||
SEGPTR lpPPen,
|
||||
SEGPTR lpPBrush,
|
||||
POINT16 *points,
|
||||
LPLOGPEN16 lpPen,
|
||||
LPLOGBRUSH16 lpBrush,
|
||||
SEGPTR lpDrawMode,
|
||||
RECT16 *lpClipRect)
|
||||
HRGN32 hClipRgn)
|
||||
{
|
||||
WORD wRet = 0;
|
||||
LOADED_PRINTER_DRIVER *pLPD = NULL;
|
||||
|
||||
dprintf_win16drv(stddeb, "PRTDRV_OUTPUT\n");
|
||||
dprintf_win16drv(stddeb, "PRTDRV_OUTPUT %d\n", wStyle );
|
||||
|
||||
if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
|
||||
{
|
||||
|
@ -377,24 +383,58 @@ WORD PRTDRV_Output(LPPDEVICE lpDestDev,
|
|||
nSize = sizeof(POINT16) * wCount;
|
||||
lP4 = (LPPOINT16 )SEGPTR_ALLOC(nSize);
|
||||
memcpy(lP4,points,nSize);
|
||||
lP5 = lpPPen;
|
||||
lP6 = lpPBrush;
|
||||
lP5 = SEGPTR_GET( lpPen );
|
||||
lP6 = SEGPTR_GET( lpBrush );
|
||||
lP7 = lpDrawMode;
|
||||
|
||||
if (lpClipRect != NULL)
|
||||
if (hClipRgn)
|
||||
{
|
||||
lP8 = SEGPTR_NEW(RECT16);
|
||||
memcpy(lP8,lpClipRect,sizeof(RECT16));
|
||||
DWORD size;
|
||||
RGNDATA *clip;
|
||||
|
||||
}
|
||||
else
|
||||
lP8 = 0L;
|
||||
wRet = Callbacks->CallDrvOutputProc(pLPD->fn[FUNC_OUTPUT],
|
||||
size = GetRegionData( hClipRgn, 0, NULL );
|
||||
clip = HeapAlloc( SystemHeap, 0, size );
|
||||
if(!clip)
|
||||
{
|
||||
fprintf(stderr, "Can't alloc clip array in PRTDRV_Output\n");
|
||||
return FALSE;
|
||||
}
|
||||
GetRegionData( hClipRgn, size, clip );
|
||||
if( clip->rdh.nCount == 0 )
|
||||
{
|
||||
wRet = Callbacks->CallDrvOutputProc(pLPD->fn[FUNC_OUTPUT],
|
||||
lP1, wP2, wP3, SEGPTR_GET(lP4),
|
||||
lP5, lP6, lP7, (SEGPTR) NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
RECT32 *pRect;
|
||||
lP8 = SEGPTR_NEW(RECT16);
|
||||
|
||||
for(pRect = (RECT32 *)clip->Buffer;
|
||||
pRect < (RECT32 *)clip->Buffer + clip->rdh.nCount; pRect++)
|
||||
{
|
||||
CONV_RECT32TO16( pRect, lP8 );
|
||||
|
||||
dprintf_win16drv(stddeb, "rect = %d,%d - %d,%d\n",
|
||||
lP8->left, lP8->top, lP8->right, lP8->bottom );
|
||||
wRet = Callbacks->CallDrvOutputProc(pLPD->fn[FUNC_OUTPUT],
|
||||
lP1, wP2, wP3, SEGPTR_GET(lP4),
|
||||
lP5, lP6, lP7, SEGPTR_GET(lP8));
|
||||
}
|
||||
SEGPTR_FREE(lP8);
|
||||
}
|
||||
HeapFree( SystemHeap, 0, clip );
|
||||
}
|
||||
else
|
||||
{
|
||||
wRet = Callbacks->CallDrvOutputProc(pLPD->fn[FUNC_OUTPUT],
|
||||
lP1, wP2, wP3, SEGPTR_GET(lP4),
|
||||
lP5, lP6, lP7, (SEGPTR) NULL);
|
||||
}
|
||||
SEGPTR_FREE(lP4);
|
||||
SEGPTR_FREE(lP8);
|
||||
}
|
||||
dprintf_win16drv(stddeb, "PRTDRV_Output return %d\n", wRet);
|
||||
return wRet;
|
||||
}
|
||||
|
||||
|
@ -408,25 +448,28 @@ DWORD PRTDRV_RealizeObject(LPPDEVICE lpDestDev, WORD wStyle,
|
|||
WORD dwRet = 0;
|
||||
LOADED_PRINTER_DRIVER *pLPD = NULL;
|
||||
|
||||
dprintf_win16drv(stddeb, "PRTDRV_RealizeObject:\n");
|
||||
dprintf_win16drv(stddeb,
|
||||
"PRTDRV_RealizeObject: %08lx %04x %p %p %08lx\n",
|
||||
lpDestDev, wStyle, lpInObj, lpOutObj, lpTextXForm);
|
||||
|
||||
if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
|
||||
{
|
||||
LONG lP1, lP4, lP5;
|
||||
LPBYTE lP3;
|
||||
WORD wP2;
|
||||
LONG lP1, lP3, lP4, lP5;
|
||||
WORD wP2;
|
||||
LPBYTE lpBuf = NULL;
|
||||
unsigned int nSize;
|
||||
|
||||
if (pLPD->fn[FUNC_REALIZEOBJECT] == NULL)
|
||||
{
|
||||
dprintf_win16drv(stddeb, "PRTDRV_RealizeObject: Not supported by driver\n");
|
||||
dprintf_win16drv(stddeb,
|
||||
"PRTDRV_RealizeObject: Not supported by driver\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
lP1 = lpDestDev;
|
||||
wP2 = wStyle;
|
||||
|
||||
switch (wStyle)
|
||||
switch ((INT16)wStyle)
|
||||
{
|
||||
case DRVOBJ_BRUSH:
|
||||
nSize = sizeof (LOGBRUSH16);
|
||||
|
@ -437,23 +480,40 @@ DWORD PRTDRV_RealizeObject(LPPDEVICE lpDestDev, WORD wStyle,
|
|||
case DRVOBJ_PEN:
|
||||
nSize = sizeof(LOGPEN16);
|
||||
break;
|
||||
|
||||
case -DRVOBJ_BRUSH:
|
||||
case -DRVOBJ_FONT:
|
||||
case -DRVOBJ_PEN:
|
||||
nSize = -1;
|
||||
break;
|
||||
|
||||
case DRVOBJ_PBITMAP:
|
||||
default:
|
||||
fprintf(stderr, "PRTDRV_RealizeObject: Object type %d not supported\n", wStyle);
|
||||
fprintf(stderr,
|
||||
"PRTDRV_RealizeObject: Object type %d not supported\n", wStyle);
|
||||
nSize = 0;
|
||||
|
||||
}
|
||||
lP3 = SEGPTR_ALLOC(nSize);
|
||||
memcpy(lP3,lpInObj,nSize);
|
||||
|
||||
lP4 = (LONG)lpOutObj;
|
||||
|
||||
if(nSize != -1)
|
||||
{
|
||||
lpBuf = SEGPTR_ALLOC(nSize);
|
||||
memcpy(lpBuf, lpInObj, nSize);
|
||||
lP3 = SEGPTR_GET(lpBuf);
|
||||
}
|
||||
else
|
||||
lP3 = SEGPTR_GET( lpInObj );
|
||||
|
||||
lP4 = SEGPTR_GET( lpOutObj );
|
||||
|
||||
lP5 = lpTextXForm;
|
||||
|
||||
dprintf_win16drv(stddeb,
|
||||
"Calling Realize %08lx %04x %08lx %08lx %08lx\n",
|
||||
lP1, wP2, lP3, lP4, lP5);
|
||||
dwRet = Callbacks->CallDrvRealizeProc(pLPD->fn[FUNC_REALIZEOBJECT],
|
||||
lP1, wP2, SEGPTR_GET(lP3),
|
||||
lP4, lP5);
|
||||
SEGPTR_FREE(lP3);
|
||||
lP1, wP2, lP3, lP4, lP5);
|
||||
if(lpBuf)
|
||||
SEGPTR_FREE(lpBuf);
|
||||
|
||||
}
|
||||
dprintf_win16drv(stddeb, "PRTDRV_RealizeObject: return %x\n", dwRet);
|
||||
|
@ -470,7 +530,7 @@ DWORD PRTDRV_StretchBlt(LPPDEVICE lpDestDev,
|
|||
WORD wSrcX, WORD wSrcY,
|
||||
WORD wSrcXext, WORD wSrcYext,
|
||||
DWORD Rop3,
|
||||
SEGPTR lpPBrush,
|
||||
LPLOGBRUSH16 lpBrush,
|
||||
SEGPTR lpDrawMode,
|
||||
RECT16 *lpClipRect)
|
||||
{
|
||||
|
@ -501,7 +561,7 @@ DWORD PRTDRV_StretchBlt(LPPDEVICE lpDestDev,
|
|||
wP9 = wSrcXext;
|
||||
wP10 = wSrcYext;
|
||||
lP11 = Rop3;
|
||||
lP12 = lpPBrush;
|
||||
lP12 = SEGPTR_GET( lpBrush );
|
||||
lP13 = lpDrawMode;
|
||||
if (lpClipRect != NULL)
|
||||
{
|
||||
|
@ -524,7 +584,7 @@ DWORD PRTDRV_StretchBlt(LPPDEVICE lpDestDev,
|
|||
|
||||
DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
|
||||
RECT16 *lpClipRect, LPCSTR lpString, WORD wCount,
|
||||
SEGPTR lpFontInfo, SEGPTR lpDrawMode,
|
||||
LPFONTINFO16 lpFontInfo, SEGPTR lpDrawMode,
|
||||
SEGPTR lpTextXForm, SHORT *lpCharWidths,
|
||||
RECT16 * lpOpaqueRect, WORD wOptions)
|
||||
{
|
||||
|
@ -560,20 +620,20 @@ DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
|
|||
lP4 = 0L;
|
||||
|
||||
if (lpString != NULL) {
|
||||
/* TTD WARNING THIS STRING ISNT NULL TERMINATED */
|
||||
nSize = strlen(lpString);
|
||||
if (nSize>abs(wCount))
|
||||
nSize = abs(wCount);
|
||||
lP5 = SEGPTR_ALLOC(nSize);
|
||||
lP5 = SEGPTR_ALLOC(nSize+1);
|
||||
dprintf_win16drv(stddeb, "Adding lpString (nSize is %d)\n",nSize);
|
||||
memcpy(lP5,lpString,nSize);
|
||||
*((char *)lP5 + nSize) = '\0';
|
||||
} else
|
||||
lP5 = 0L;
|
||||
|
||||
iP6 = wCount;
|
||||
|
||||
/* This should be realized by the driver, so in 16bit data area */
|
||||
lP7 = lpFontInfo;
|
||||
lP7 = SEGPTR_GET( lpFontInfo );
|
||||
lP8 = lpDrawMode;
|
||||
lP9 = lpTextXForm;
|
||||
|
||||
|
@ -603,3 +663,131 @@ DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
|
|||
dprintf_win16drv(stddeb, "PRTDRV_ExtTextOut: return %lx\n", dwRet);
|
||||
return dwRet;
|
||||
}
|
||||
|
||||
int WINAPI dmEnumDFonts(LPPDEVICE lpDestDev, LPSTR lpFaceName, FARPROC16 lpCallbackFunc, LPVOID lpClientData)
|
||||
{
|
||||
/* Windows 3.1 just returns 1 */
|
||||
return 1;
|
||||
}
|
||||
|
||||
int WINAPI dmRealizeObject(LPPDEVICE lpDestDev, INT16 wStyle, LPSTR lpInObj, LPSTR lpOutObj, SEGPTR lpTextXForm)
|
||||
{
|
||||
fprintf(stderr, "dmRealizeObject(lpDestDev: %08x, wStyle: %04x, lpInObj: %08x, lpOutObj: %08x, lpTextXForm: %08x): stub: ", (UINT32)lpDestDev, wStyle, (UINT32)lpInObj, (UINT32)lpOutObj, (UINT32)lpTextXForm);
|
||||
if (wStyle < 0) { /* Free extra memory of given object's structure */
|
||||
switch ( -wStyle ) {
|
||||
case DRVOBJ_PEN: {
|
||||
LPLOGPEN16 DeletePen = (LPLOGPEN16)lpInObj;
|
||||
|
||||
fprintf(stderr, "DRVOBJ_PEN_delete\n");
|
||||
break;
|
||||
}
|
||||
case DRVOBJ_BRUSH: {
|
||||
fprintf(stderr, "DRVOBJ_BRUSH_delete\n");
|
||||
break;
|
||||
}
|
||||
case DRVOBJ_FONT: {
|
||||
LPTEXTXFORM16 TextXForm
|
||||
= (LPTEXTXFORM16)lpTextXForm;
|
||||
fprintf(stderr, "DRVOBJ_FONT_delete\n");
|
||||
break;
|
||||
}
|
||||
case DRVOBJ_PBITMAP: fprintf(stderr, "DRVOBJ_PBITMAP_delete\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
else { /* Realize given object */
|
||||
|
||||
switch (wStyle) {
|
||||
case DRVOBJ_PEN: {
|
||||
LPLOGPEN16 InPen = (LPLOGPEN16)lpInObj;
|
||||
|
||||
fprintf(stderr, "DRVOBJ_PEN\n");
|
||||
if (lpOutObj) {
|
||||
if (InPen->lopnStyle == PS_NULL) {
|
||||
*(DWORD *)lpOutObj = 0;
|
||||
*(WORD *)(lpOutObj+4) = InPen->lopnStyle;
|
||||
}
|
||||
else
|
||||
if ((InPen->lopnWidth.x > 1) || (InPen->lopnStyle > PS_NULL) ) {
|
||||
*(DWORD *)lpOutObj = InPen->lopnColor;
|
||||
*(WORD *)(lpOutObj+4) = 0;
|
||||
}
|
||||
else {
|
||||
*(DWORD *)lpOutObj = InPen->lopnColor & 0xffff0000;
|
||||
*(WORD *)(lpOutObj+4) = InPen->lopnStyle;
|
||||
}
|
||||
}
|
||||
return sizeof(LOGPEN16);
|
||||
}
|
||||
case DRVOBJ_BRUSH: {
|
||||
LPLOGBRUSH16 InBrush = (LPLOGBRUSH16)lpInObj;
|
||||
LPLOGBRUSH16 OutBrush = (LPLOGBRUSH16)lpOutObj;
|
||||
LPPOINT16 Point = (LPPOINT16)lpTextXForm;
|
||||
|
||||
fprintf(stderr, "DRVOBJ_BRUSH\n");
|
||||
if (!lpOutObj) return sizeof(LOGBRUSH16);
|
||||
else {
|
||||
OutBrush->lbStyle = InBrush->lbStyle;
|
||||
OutBrush->lbColor = InBrush->lbColor;
|
||||
OutBrush->lbHatch = InBrush->lbHatch;
|
||||
if (InBrush->lbStyle == BS_SOLID)
|
||||
return 0x8002; /* FIXME: diff mono-color */
|
||||
else return 0x8000;
|
||||
}
|
||||
}
|
||||
case DRVOBJ_FONT: {
|
||||
LPTEXTXFORM16 TextXForm
|
||||
= (LPTEXTXFORM16)lpTextXForm;
|
||||
fprintf(stderr, "DRVOBJ_FONT\n");
|
||||
return 0;/* DISPLAY.DRV doesn't realize fonts */
|
||||
}
|
||||
case DRVOBJ_PBITMAP: fprintf(stderr, "DRVOBJ_PBITMAP\n");
|
||||
return 0; /* create memory bitmap */
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
WORD PRTDRV_GetCharWidth(LPPDEVICE lpDestDev, LPINT32 lpBuffer,
|
||||
WORD wFirstChar, WORD wLastChar, LPFONTINFO16 lpFontInfo,
|
||||
SEGPTR lpDrawMode, SEGPTR lpTextXForm )
|
||||
{
|
||||
|
||||
WORD wRet = 0;
|
||||
LOADED_PRINTER_DRIVER *pLPD = NULL;
|
||||
|
||||
dprintf_win16drv(stddeb, "PRTDRV_GetCharWidth:\n");
|
||||
|
||||
if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
|
||||
{
|
||||
LONG lP1, lP5, lP6, lP7;
|
||||
LPWORD lP2;
|
||||
WORD wP3, wP4, i;
|
||||
|
||||
if (pLPD->fn[FUNC_GETCHARWIDTH] == NULL)
|
||||
{
|
||||
dprintf_win16drv(stddeb,
|
||||
"PRTDRV_GetCharWidth: Not supported by driver\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
lP1 = lpDestDev;
|
||||
lP2 = SEGPTR_ALLOC( (wLastChar - wFirstChar + 1) * sizeof(WORD) );
|
||||
wP3 = wFirstChar;
|
||||
wP4 = wLastChar;
|
||||
lP5 = SEGPTR_GET( lpFontInfo );
|
||||
lP6 = lpDrawMode;
|
||||
lP7 = lpTextXForm;
|
||||
|
||||
wRet = Callbacks->CallDrvGetCharWidthProc(pLPD->fn[FUNC_GETCHARWIDTH],
|
||||
lP1, SEGPTR_GET(lP2), wP3,
|
||||
wP4, lP5, lP6, lP7 );
|
||||
|
||||
for(i = 0; i <= wLastChar - wFirstChar; i++)
|
||||
lpBuffer[i] = (INT32) lP2[i];
|
||||
|
||||
SEGPTR_FREE(lP2);
|
||||
}
|
||||
return wRet;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* win16 driver text functions
|
||||
*
|
||||
* Copyright 1996 John Harvey
|
||||
* 1998 Huw Davies
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -10,7 +11,6 @@
|
|||
#include "dc.h"
|
||||
#include "gdi.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_WIN16DRV */
|
||||
#include "debug.h"
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -27,32 +27,19 @@ BOOL32 WIN16DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
|||
RECT16 *lpOpaqueRect = NULL;
|
||||
WORD wOptions = 0;
|
||||
WORD wCount = count;
|
||||
|
||||
static BOOL32 bInit = FALSE;
|
||||
|
||||
|
||||
INT16 width;
|
||||
|
||||
if (count == 0)
|
||||
return FALSE;
|
||||
|
||||
dprintf_win16drv(stddeb, "WIN16DRV_ExtTextOut: %04x %d %d %x %p %*s %p\n", dc->hSelf, x, y,
|
||||
flags, lprect, count > 0 ? count : 8, str, lpDx);
|
||||
dprintf_win16drv(stddeb, "WIN16DRV_ExtTextOut: %04x %d %d %x %p %*s %p\n",
|
||||
dc->hSelf, x, y, flags, lprect, count > 0 ? count : 8, str, lpDx);
|
||||
|
||||
|
||||
if (bInit == FALSE)
|
||||
{
|
||||
DWORD dwRet;
|
||||
|
||||
dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, 0, 0,
|
||||
NULL, " ",
|
||||
-1, physDev->segptrFontInfo, win16drv_SegPtr_DrawMode,
|
||||
win16drv_SegPtr_TextXForm, NULL, NULL, 0);
|
||||
bInit = TRUE;
|
||||
}
|
||||
|
||||
if (dc != NULL)
|
||||
{
|
||||
DWORD dwRet;
|
||||
|
||||
clipRect.left = 0;
|
||||
clipRect.top = 0;
|
||||
|
||||
|
@ -68,39 +55,65 @@ BOOL32 WIN16DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
|||
|
||||
}
|
||||
|
||||
#ifdef NOTDEF
|
||||
{
|
||||
RECT16 rcPageSize;
|
||||
FONTINFO16 *p = (FONTINFO16 *)PTR_SEG_TO_LIN(physDev->segptrFontInfo);
|
||||
rcPageSize.left = 0;
|
||||
rcPageSize.right = 0x3c0;
|
||||
|
||||
rcPageSize.top = 0;
|
||||
rcPageSize.bottom = 0x630;
|
||||
|
||||
dprintf_win16drv(stddeb, "textalign = %d\n", dc->w.textAlign);
|
||||
|
||||
if (dc->w.textAlign & TA_UPDATECP)
|
||||
{
|
||||
x = dc->w.CursPosX;
|
||||
y = dc->w.CursPosY;
|
||||
}
|
||||
|
||||
x = XLPTODP( dc, x );
|
||||
y = YLPTODP( dc, y );
|
||||
|
||||
if(y < rcPageSize.top || y + p->dfPixHeight > rcPageSize.bottom)
|
||||
{
|
||||
printf("Failed 1 y %d top %d y +height %d bottom %d\n",
|
||||
y, rcPageSize.top , y + p->dfPixHeight , rcPageSize.bottom);
|
||||
}
|
||||
|
||||
dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, 0, 0,
|
||||
NULL, str, -count, physDev->FontInfo,
|
||||
win16drv_SegPtr_DrawMode, win16drv_SegPtr_TextXForm,
|
||||
NULL, NULL, 0);
|
||||
|
||||
if(x >= rcPageSize.right ||
|
||||
x + wCount * p->dfPixWidth < rcPageSize.left)
|
||||
{
|
||||
printf("Faile 2\n");
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
width = LOWORD(dwRet);
|
||||
|
||||
dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, XLPTODP(dc,x), YLPTODP(dc,y),
|
||||
&clipRect, str,
|
||||
wCount, physDev->segptrFontInfo, win16drv_SegPtr_DrawMode,
|
||||
win16drv_SegPtr_TextXForm, NULL, lpOpaqueRect, wOptions);
|
||||
switch( dc->w.textAlign & (TA_LEFT | TA_RIGHT | TA_CENTER) )
|
||||
{
|
||||
case TA_LEFT:
|
||||
if (dc->w.textAlign & TA_UPDATECP)
|
||||
dc->w.CursPosX = XDPTOLP( dc, x + width );
|
||||
break;
|
||||
case TA_RIGHT:
|
||||
x -= width;
|
||||
if (dc->w.textAlign & TA_UPDATECP)
|
||||
dc->w.CursPosX = XDPTOLP( dc, x );
|
||||
break;
|
||||
case TA_CENTER:
|
||||
x -= width / 2;
|
||||
break;
|
||||
}
|
||||
|
||||
switch( dc->w.textAlign & (TA_TOP | TA_BOTTOM | TA_BASELINE) )
|
||||
{
|
||||
case TA_TOP:
|
||||
break;
|
||||
case TA_BOTTOM:
|
||||
y -= physDev->FontInfo->dfPixHeight;
|
||||
break;
|
||||
case TA_BASELINE:
|
||||
y -= physDev->FontInfo->dfAscent;
|
||||
break;
|
||||
}
|
||||
|
||||
dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE,
|
||||
x, y, &clipRect, str, wCount,
|
||||
physDev->FontInfo, win16drv_SegPtr_DrawMode,
|
||||
win16drv_SegPtr_TextXForm, NULL, lpOpaqueRect, wOptions);
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
* Started by Robert Pouliot <krynos@clic.net>
|
||||
*/
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/XShm.h>
|
||||
#include "ts_xlib.h"
|
||||
#include "ts_xshm.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#ifndef __EMX__
|
||||
|
@ -48,10 +48,10 @@ static void __initWinG(void)
|
|||
{
|
||||
if( __WinGOK < 0 )
|
||||
{
|
||||
Status s = XShmQueryExtension(display);
|
||||
Status s = TSXShmQueryExtension(display);
|
||||
if( s )
|
||||
{
|
||||
int i = XShmPixmapFormat(display);
|
||||
int i = TSXShmPixmapFormat(display);
|
||||
if( i == ZPixmap && screenDepth == 8 )
|
||||
{
|
||||
__WinGOK = True;
|
||||
|
@ -157,7 +157,7 @@ HBITMAP16 WINAPI WinGCreateBitmap16(HDC16 winDC, BITMAPINFO *header,
|
|||
sel = SELECTOR_AllocBlock( p->si.shmaddr, bytes,
|
||||
SEGMENT_DATA, FALSE, FALSE);
|
||||
if (sel) p->bits = PTR_SEG_OFF_TO_SEGPTR(sel,0);
|
||||
else XFreePixmap( display, bmpObjPtr->pixmap );
|
||||
else TSXFreePixmap( display, bmpObjPtr->pixmap );
|
||||
}
|
||||
if( !sel )
|
||||
{
|
||||
|
@ -278,8 +278,8 @@ BOOL16 WINAPI WinGBitBlt16(HDC16 destDC, INT16 xDest, INT16 yDest,
|
|||
widDest = widDest * dcDst->vportExtX / dcDst->wndExtX;
|
||||
heiDest = heiDest * dcDst->vportExtY / dcDst->wndExtY;
|
||||
|
||||
XSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||
XCopyArea( display, dcSrc->u.x.drawable,
|
||||
TSXSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||
TSXCopyArea( display, dcSrc->u.x.drawable,
|
||||
dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
xSrc, ySrc, widDest, heiDest, xDest, yDest );
|
||||
return TRUE;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include "ts_xlib.h"
|
||||
#include <X11/Intrinsic.h>
|
||||
#include "bitmap.h"
|
||||
#include "callback.h"
|
||||
|
@ -596,14 +596,14 @@ static void BITBLT_GetRow( XImage *image, int *pdata, INT32 row,
|
|||
{
|
||||
if (COLOR_PixelToPalette && (depthDst != 1))
|
||||
if (swap) for (i = 0; i < width; i++)
|
||||
*pdata-- = COLOR_PixelToPalette[XGetPixel( image, i, row )];
|
||||
*pdata-- = COLOR_PixelToPalette[TSXGetPixel( image, i, row )];
|
||||
else for (i = 0; i < width; i++)
|
||||
*pdata++ = COLOR_PixelToPalette[XGetPixel( image, i, row )];
|
||||
*pdata++ = COLOR_PixelToPalette[TSXGetPixel( image, i, row )];
|
||||
else
|
||||
if (swap) for (i = 0; i < width; i++)
|
||||
*pdata-- = XGetPixel( image, i, row );
|
||||
*pdata-- = TSXGetPixel( image, i, row );
|
||||
else for (i = 0; i < width; i++)
|
||||
*pdata++ = XGetPixel( image, i, row );
|
||||
*pdata++ = TSXGetPixel( image, i, row );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -615,16 +615,16 @@ static void BITBLT_GetRow( XImage *image, int *pdata, INT32 row,
|
|||
bg = COLOR_PixelToPalette[bg];
|
||||
}
|
||||
if (swap) for (i = 0; i < width; i++)
|
||||
*pdata-- = XGetPixel( image, i, row ) ? bg : fg;
|
||||
*pdata-- = TSXGetPixel( image, i, row ) ? bg : fg;
|
||||
else for (i = 0; i < width; i++)
|
||||
*pdata++ = XGetPixel( image, i, row ) ? bg : fg;
|
||||
*pdata++ = TSXGetPixel( image, i, row ) ? bg : fg;
|
||||
}
|
||||
else /* color -> monochrome */
|
||||
{
|
||||
if (swap) for (i = 0; i < width; i++)
|
||||
*pdata-- = (XGetPixel( image, i, row ) == bg) ? 1 : 0;
|
||||
*pdata-- = (TSXGetPixel( image, i, row ) == bg) ? 1 : 0;
|
||||
else for (i = 0; i < width; i++)
|
||||
*pdata++ = (XGetPixel( image, i, row ) == bg) ? 1 : 0;
|
||||
*pdata++ = (TSXGetPixel( image, i, row ) == bg) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -720,7 +720,7 @@ static void BITBLT_StretchImage( XImage *srcImage, XImage *dstImage,
|
|||
pixel = rowDst + visRectDst->right - 1;
|
||||
y = ydst - visRectDst->top;
|
||||
for (x = visRectDst->right-visRectDst->left-1; x >= 0; x--)
|
||||
XPutPixel( dstImage, x, y, *pixel-- );
|
||||
TSXPutPixel( dstImage, x, y, *pixel-- );
|
||||
if (mode != STRETCH_DELETESCANS)
|
||||
memset( rowDst, (mode == STRETCH_ANDSCANS) ? 0xff : 0x00,
|
||||
widthDst*sizeof(int) );
|
||||
|
@ -794,7 +794,7 @@ static void BITBLT_StretchImage( XImage *srcImage, XImage *dstImage,
|
|||
pixel = rowDst + visRectDst->right - 1;
|
||||
y = (ydst >> 16) - visRectDst->top;
|
||||
for (x = visRectDst->right-visRectDst->left-1; x >= 0; x--)
|
||||
XPutPixel( dstImage, x, y, *pixel-- );
|
||||
TSXPutPixel( dstImage, x, y, *pixel-- );
|
||||
if (mode != STRETCH_DELETESCANS)
|
||||
memset( rowDst, (mode == STRETCH_ANDSCANS) ? 0xff : 0x00,
|
||||
widthDst*sizeof(int) );
|
||||
|
@ -831,7 +831,7 @@ static void BITBLT_GetSrcAreaStretch( DC *dcSrc, DC *dcDst,
|
|||
OffsetRect32( &rectDst, -xDst, -yDst );
|
||||
|
||||
/* FIXME: avoid BadMatch errors */
|
||||
imageSrc = XGetImage( display, dcSrc->u.x.drawable,
|
||||
imageSrc = TSXGetImage( display, dcSrc->u.x.drawable,
|
||||
visRectSrc->left, visRectSrc->top,
|
||||
visRectSrc->right - visRectSrc->left,
|
||||
visRectSrc->bottom - visRectSrc->top,
|
||||
|
@ -843,10 +843,10 @@ static void BITBLT_GetSrcAreaStretch( DC *dcSrc, DC *dcDst,
|
|||
dcDst->w.textPixel, dcDst->w.bitsPerPixel != 1 ?
|
||||
dcDst->w.backgroundPixel : dcSrc->w.backgroundPixel,
|
||||
dcDst->w.stretchBltMode );
|
||||
XPutImage( display, pixmap, gc, imageDst, 0, 0, 0, 0,
|
||||
TSXPutImage( display, pixmap, gc, imageDst, 0, 0, 0, 0,
|
||||
rectDst.right - rectDst.left, rectDst.bottom - rectDst.top );
|
||||
XDestroyImage( imageSrc );
|
||||
XDestroyImage( imageDst );
|
||||
TSXDestroyImage( imageSrc );
|
||||
TSXDestroyImage( imageDst );
|
||||
}
|
||||
|
||||
|
||||
|
@ -869,31 +869,31 @@ static void BITBLT_GetSrcArea( DC *dcSrc, DC *dcDst, Pixmap pixmap, GC gc,
|
|||
if (!COLOR_PixelToPalette ||
|
||||
(dcDst->w.bitsPerPixel == 1)) /* monochrome -> monochrome */
|
||||
{
|
||||
XCopyArea( display, dcSrc->u.x.drawable, pixmap, gc,
|
||||
TSXCopyArea( display, dcSrc->u.x.drawable, pixmap, gc,
|
||||
visRectSrc->left, visRectSrc->top, width, height, 0, 0);
|
||||
}
|
||||
else /* color -> color */
|
||||
{
|
||||
if (dcSrc->w.flags & DC_MEMORY)
|
||||
imageSrc = XGetImage( display, dcSrc->u.x.drawable,
|
||||
imageSrc = TSXGetImage( display, dcSrc->u.x.drawable,
|
||||
visRectSrc->left, visRectSrc->top,
|
||||
width, height, AllPlanes, ZPixmap );
|
||||
else
|
||||
{
|
||||
/* Make sure we don't get a BadMatch error */
|
||||
XCopyArea( display, dcSrc->u.x.drawable, pixmap, gc,
|
||||
TSXCopyArea( display, dcSrc->u.x.drawable, pixmap, gc,
|
||||
visRectSrc->left, visRectSrc->top,
|
||||
width, height, 0, 0);
|
||||
imageSrc = XGetImage( display, pixmap, 0, 0, width, height,
|
||||
imageSrc = TSXGetImage( display, pixmap, 0, 0, width, height,
|
||||
AllPlanes, ZPixmap );
|
||||
}
|
||||
for (y = 0; y < height; y++)
|
||||
for (x = 0; x < width; x++)
|
||||
XPutPixel(imageSrc, x, y,
|
||||
COLOR_PixelToPalette[XGetPixel(imageSrc, x, y)]);
|
||||
XPutImage( display, pixmap, gc, imageSrc,
|
||||
TSXPutPixel(imageSrc, x, y,
|
||||
COLOR_PixelToPalette[TSXGetPixel(imageSrc, x, y)]);
|
||||
TSXPutImage( display, pixmap, gc, imageSrc,
|
||||
0, 0, 0, 0, width, height );
|
||||
XDestroyImage( imageSrc );
|
||||
TSXDestroyImage( imageSrc );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -902,35 +902,35 @@ static void BITBLT_GetSrcArea( DC *dcSrc, DC *dcDst, Pixmap pixmap, GC gc,
|
|||
{
|
||||
if (COLOR_PixelToPalette)
|
||||
{
|
||||
XSetBackground( display, gc,
|
||||
TSXSetBackground( display, gc,
|
||||
COLOR_PixelToPalette[dcDst->w.textPixel] );
|
||||
XSetForeground( display, gc,
|
||||
TSXSetForeground( display, gc,
|
||||
COLOR_PixelToPalette[dcDst->w.backgroundPixel]);
|
||||
}
|
||||
else
|
||||
{
|
||||
XSetBackground( display, gc, dcDst->w.textPixel );
|
||||
XSetForeground( display, gc, dcDst->w.backgroundPixel );
|
||||
TSXSetBackground( display, gc, dcDst->w.textPixel );
|
||||
TSXSetForeground( display, gc, dcDst->w.backgroundPixel );
|
||||
}
|
||||
XCopyPlane( display, dcSrc->u.x.drawable, pixmap, gc,
|
||||
TSXCopyPlane( display, dcSrc->u.x.drawable, pixmap, gc,
|
||||
visRectSrc->left, visRectSrc->top,
|
||||
width, height, 0, 0, 1 );
|
||||
}
|
||||
else /* color -> monochrome */
|
||||
{
|
||||
/* FIXME: avoid BadMatch error */
|
||||
imageSrc = XGetImage( display, dcSrc->u.x.drawable,
|
||||
imageSrc = TSXGetImage( display, dcSrc->u.x.drawable,
|
||||
visRectSrc->left, visRectSrc->top,
|
||||
width, height, AllPlanes, ZPixmap );
|
||||
XCREATEIMAGE( imageDst, width, height, dcDst->w.bitsPerPixel );
|
||||
for (y = 0; y < height; y++)
|
||||
for (x = 0; x < width; x++)
|
||||
XPutPixel(imageDst, x, y, (XGetPixel(imageSrc,x,y) ==
|
||||
TSXPutPixel(imageDst, x, y, (TSXGetPixel(imageSrc,x,y) ==
|
||||
dcSrc->w.backgroundPixel) );
|
||||
XPutImage( display, pixmap, gc, imageDst,
|
||||
TSXPutImage( display, pixmap, gc, imageDst,
|
||||
0, 0, 0, 0, width, height );
|
||||
XDestroyImage( imageSrc );
|
||||
XDestroyImage( imageDst );
|
||||
TSXDestroyImage( imageSrc );
|
||||
TSXDestroyImage( imageDst );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -950,7 +950,7 @@ static void BITBLT_GetDstArea(DC *dc, Pixmap pixmap, GC gc, RECT32 *visRectDst)
|
|||
if (!COLOR_PixelToPalette || (dc->w.bitsPerPixel == 1) ||
|
||||
(COLOR_GetSystemPaletteFlags() & COLOR_VIRTUAL) )
|
||||
{
|
||||
XCopyArea( display, dc->u.x.drawable, pixmap, gc,
|
||||
TSXCopyArea( display, dc->u.x.drawable, pixmap, gc,
|
||||
visRectDst->left, visRectDst->top, width, height, 0, 0 );
|
||||
}
|
||||
else
|
||||
|
@ -959,23 +959,23 @@ static void BITBLT_GetDstArea(DC *dc, Pixmap pixmap, GC gc, RECT32 *visRectDst)
|
|||
XImage *image;
|
||||
|
||||
if (dc->w.flags & DC_MEMORY)
|
||||
image = XGetImage( display, dc->u.x.drawable,
|
||||
image = TSXGetImage( display, dc->u.x.drawable,
|
||||
visRectDst->left, visRectDst->top,
|
||||
width, height, AllPlanes, ZPixmap );
|
||||
else
|
||||
{
|
||||
/* Make sure we don't get a BadMatch error */
|
||||
XCopyArea( display, dc->u.x.drawable, pixmap, gc,
|
||||
TSXCopyArea( display, dc->u.x.drawable, pixmap, gc,
|
||||
visRectDst->left, visRectDst->top, width, height, 0, 0);
|
||||
image = XGetImage( display, pixmap, 0, 0, width, height,
|
||||
image = TSXGetImage( display, pixmap, 0, 0, width, height,
|
||||
AllPlanes, ZPixmap );
|
||||
}
|
||||
for (y = 0; y < height; y++)
|
||||
for (x = 0; x < width; x++)
|
||||
XPutPixel( image, x, y,
|
||||
COLOR_PixelToPalette[XGetPixel( image, x, y )]);
|
||||
XPutImage( display, pixmap, gc, image, 0, 0, 0, 0, width, height );
|
||||
XDestroyImage( image );
|
||||
TSXPutPixel( image, x, y,
|
||||
COLOR_PixelToPalette[TSXGetPixel( image, x, y )]);
|
||||
TSXPutImage( display, pixmap, gc, image, 0, 0, 0, 0, width, height );
|
||||
TSXDestroyImage( image );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -996,23 +996,23 @@ static void BITBLT_PutDstArea(DC *dc, Pixmap pixmap, GC gc, RECT32 *visRectDst)
|
|||
if (!COLOR_PaletteToPixel || (dc->w.bitsPerPixel == 1) ||
|
||||
(COLOR_GetSystemPaletteFlags() & COLOR_VIRTUAL) )
|
||||
{
|
||||
XCopyArea( display, pixmap, dc->u.x.drawable, gc, 0, 0,
|
||||
TSXCopyArea( display, pixmap, dc->u.x.drawable, gc, 0, 0,
|
||||
width, height, visRectDst->left, visRectDst->top );
|
||||
}
|
||||
else
|
||||
{
|
||||
register INT32 x, y;
|
||||
XImage *image = XGetImage( display, pixmap, 0, 0, width, height,
|
||||
XImage *image = TSXGetImage( display, pixmap, 0, 0, width, height,
|
||||
AllPlanes, ZPixmap );
|
||||
for (y = 0; y < height; y++)
|
||||
for (x = 0; x < width; x++)
|
||||
{
|
||||
XPutPixel( image, x, y,
|
||||
COLOR_PaletteToPixel[XGetPixel( image, x, y )]);
|
||||
TSXPutPixel( image, x, y,
|
||||
COLOR_PaletteToPixel[TSXGetPixel( image, x, y )]);
|
||||
}
|
||||
XPutImage( display, dc->u.x.drawable, gc, image, 0, 0,
|
||||
TSXPutImage( display, dc->u.x.drawable, gc, image, 0, 0,
|
||||
visRectDst->left, visRectDst->top, width, height );
|
||||
XDestroyImage( image );
|
||||
TSXDestroyImage( image );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1171,14 +1171,14 @@ BOOL32 BITBLT_InternalStretchBlt( DC *dcDst, INT32 xDst, INT32 yDst,
|
|||
{
|
||||
case BLACKNESS: /* 0x00 */
|
||||
if ((dcDst->w.bitsPerPixel == 1) || !COLOR_PaletteToPixel)
|
||||
XSetFunction( display, dcDst->u.x.gc, GXclear );
|
||||
TSXSetFunction( display, dcDst->u.x.gc, GXclear );
|
||||
else
|
||||
{
|
||||
XSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||
XSetForeground( display, dcDst->u.x.gc, COLOR_PaletteToPixel[0] );
|
||||
XSetFillStyle( display, dcDst->u.x.gc, FillSolid );
|
||||
TSXSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||
TSXSetForeground( display, dcDst->u.x.gc, COLOR_PaletteToPixel[0] );
|
||||
TSXSetFillStyle( display, dcDst->u.x.gc, FillSolid );
|
||||
}
|
||||
XFillRectangle( display, dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
TSXFillRectangle( display, dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
visRectDst.left, visRectDst.top, width, height );
|
||||
return TRUE;
|
||||
|
||||
|
@ -1186,10 +1186,10 @@ BOOL32 BITBLT_InternalStretchBlt( DC *dcDst, INT32 xDst, INT32 yDst,
|
|||
if ((dcDst->w.bitsPerPixel == 1) || !COLOR_PaletteToPixel ||
|
||||
!Options.perfectGraphics)
|
||||
{
|
||||
XSetFunction( display, dcDst->u.x.gc, GXinvert );
|
||||
TSXSetFunction( display, dcDst->u.x.gc, GXinvert );
|
||||
|
||||
if( COLOR_GetSystemPaletteFlags() & (COLOR_PRIVATE | COLOR_VIRTUAL) )
|
||||
XSetFunction( display, dcDst->u.x.gc, GXinvert);
|
||||
TSXSetFunction( display, dcDst->u.x.gc, GXinvert);
|
||||
else
|
||||
{
|
||||
/* Xor is much better when we do not have full colormap. */
|
||||
|
@ -1197,11 +1197,11 @@ BOOL32 BITBLT_InternalStretchBlt( DC *dcDst, INT32 xDst, INT32 yDst,
|
|||
/* and white. */
|
||||
Pixel xor_pix = (WhitePixelOfScreen(screen) ^
|
||||
BlackPixelOfScreen(screen));
|
||||
XSetFunction( display, dcDst->u.x.gc, GXxor );
|
||||
XSetForeground( display, dcDst->u.x.gc, xor_pix);
|
||||
XSetFillStyle( display, dcDst->u.x.gc, FillSolid );
|
||||
TSXSetFunction( display, dcDst->u.x.gc, GXxor );
|
||||
TSXSetForeground( display, dcDst->u.x.gc, xor_pix);
|
||||
TSXSetFillStyle( display, dcDst->u.x.gc, FillSolid );
|
||||
}
|
||||
XFillRectangle( display, dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
TSXFillRectangle( display, dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
visRectDst.left, visRectDst.top, width, height );
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1211,8 +1211,8 @@ BOOL32 BITBLT_InternalStretchBlt( DC *dcDst, INT32 xDst, INT32 yDst,
|
|||
if (Options.perfectGraphics) break;
|
||||
if (DC_SetupGCForBrush( dcDst ))
|
||||
{
|
||||
XSetFunction( display, dcDst->u.x.gc, GXxor );
|
||||
XFillRectangle( display, dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
TSXSetFunction( display, dcDst->u.x.gc, GXxor );
|
||||
TSXFillRectangle( display, dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
visRectDst.left, visRectDst.top, width, height );
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -1221,8 +1221,8 @@ BOOL32 BITBLT_InternalStretchBlt( DC *dcDst, INT32 xDst, INT32 yDst,
|
|||
if (Options.perfectGraphics) break;
|
||||
if (DC_SetupGCForBrush( dcDst ))
|
||||
{
|
||||
XSetFunction( display, dcDst->u.x.gc, GXequiv );
|
||||
XFillRectangle( display, dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
TSXSetFunction( display, dcDst->u.x.gc, GXequiv );
|
||||
TSXFillRectangle( display, dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
visRectDst.left, visRectDst.top, width, height );
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -1230,58 +1230,58 @@ BOOL32 BITBLT_InternalStretchBlt( DC *dcDst, INT32 xDst, INT32 yDst,
|
|||
case SRCCOPY: /* 0xcc */
|
||||
if (dcSrc->w.bitsPerPixel == dcDst->w.bitsPerPixel)
|
||||
{
|
||||
XSetGraphicsExposures( display, dcDst->u.x.gc, True );
|
||||
XSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||
XCopyArea( display, dcSrc->u.x.drawable,
|
||||
TSXSetGraphicsExposures( display, dcDst->u.x.gc, True );
|
||||
TSXSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||
TSXCopyArea( display, dcSrc->u.x.drawable,
|
||||
dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
visRectSrc.left, visRectSrc.top,
|
||||
width, height, visRectDst.left, visRectDst.top );
|
||||
XSetGraphicsExposures( display, dcDst->u.x.gc, False );
|
||||
TSXSetGraphicsExposures( display, dcDst->u.x.gc, False );
|
||||
return TRUE;
|
||||
}
|
||||
if (dcSrc->w.bitsPerPixel == 1)
|
||||
{
|
||||
XSetBackground( display, dcDst->u.x.gc, dcDst->w.textPixel );
|
||||
XSetForeground( display, dcDst->u.x.gc, dcDst->w.backgroundPixel );
|
||||
XSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||
XSetGraphicsExposures( display, dcDst->u.x.gc, True );
|
||||
XCopyPlane( display, dcSrc->u.x.drawable,
|
||||
TSXSetBackground( display, dcDst->u.x.gc, dcDst->w.textPixel );
|
||||
TSXSetForeground( display, dcDst->u.x.gc, dcDst->w.backgroundPixel );
|
||||
TSXSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||
TSXSetGraphicsExposures( display, dcDst->u.x.gc, True );
|
||||
TSXCopyPlane( display, dcSrc->u.x.drawable,
|
||||
dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
visRectSrc.left, visRectSrc.top,
|
||||
width, height, visRectDst.left, visRectDst.top, 1 );
|
||||
XSetGraphicsExposures( display, dcDst->u.x.gc, False );
|
||||
TSXSetGraphicsExposures( display, dcDst->u.x.gc, False );
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case PATCOPY: /* 0xf0 */
|
||||
if (!DC_SetupGCForBrush( dcDst )) return TRUE;
|
||||
XSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||
XFillRectangle( display, dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
TSXSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||
TSXFillRectangle( display, dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
visRectDst.left, visRectDst.top, width, height );
|
||||
return TRUE;
|
||||
|
||||
case WHITENESS: /* 0xff */
|
||||
if ((dcDst->w.bitsPerPixel == 1) || !COLOR_PaletteToPixel)
|
||||
XSetFunction( display, dcDst->u.x.gc, GXset );
|
||||
TSXSetFunction( display, dcDst->u.x.gc, GXset );
|
||||
else
|
||||
{
|
||||
XSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||
XSetForeground( display, dcDst->u.x.gc,
|
||||
TSXSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||
TSXSetForeground( display, dcDst->u.x.gc,
|
||||
COLOR_PaletteToPixel[COLOR_GetSystemPaletteSize() - 1]);
|
||||
XSetFillStyle( display, dcDst->u.x.gc, FillSolid );
|
||||
TSXSetFillStyle( display, dcDst->u.x.gc, FillSolid );
|
||||
}
|
||||
XFillRectangle( display, dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
TSXFillRectangle( display, dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||
visRectDst.left, visRectDst.top, width, height );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
tmpGC = XCreateGC( display, dcDst->u.x.drawable, 0, NULL );
|
||||
pixmaps[DST] = XCreatePixmap( display, rootWindow, width, height,
|
||||
tmpGC = TSXCreateGC( display, dcDst->u.x.drawable, 0, NULL );
|
||||
pixmaps[DST] = TSXCreatePixmap( display, rootWindow, width, height,
|
||||
dcDst->w.bitsPerPixel );
|
||||
if (useSrc)
|
||||
{
|
||||
pixmaps[SRC] = XCreatePixmap( display, rootWindow, width, height,
|
||||
pixmaps[SRC] = TSXCreatePixmap( display, rootWindow, width, height,
|
||||
dcDst->w.bitsPerPixel );
|
||||
if (fStretch)
|
||||
BITBLT_GetSrcAreaStretch( dcSrc, dcDst, pixmaps[SRC], tmpGC,
|
||||
|
@ -1300,13 +1300,13 @@ BOOL32 BITBLT_InternalStretchBlt( DC *dcDst, INT32 xDst, INT32 yDst,
|
|||
for (opcode = BITBLT_Opcodes[(rop >> 16) & 0xff]; *opcode; opcode++)
|
||||
{
|
||||
if (OP_DST(*opcode) == DST) destUsed = TRUE;
|
||||
XSetFunction( display, tmpGC, OP_ROP(*opcode) );
|
||||
TSXSetFunction( display, tmpGC, OP_ROP(*opcode) );
|
||||
switch(OP_SRCDST(*opcode))
|
||||
{
|
||||
case OP_ARGS(DST,TMP):
|
||||
case OP_ARGS(SRC,TMP):
|
||||
if (!pixmaps[TMP])
|
||||
pixmaps[TMP] = XCreatePixmap( display, rootWindow,
|
||||
pixmaps[TMP] = TSXCreatePixmap( display, rootWindow,
|
||||
width, height,
|
||||
dcDst->w.bitsPerPixel );
|
||||
/* fall through */
|
||||
|
@ -1314,32 +1314,32 @@ BOOL32 BITBLT_InternalStretchBlt( DC *dcDst, INT32 xDst, INT32 yDst,
|
|||
case OP_ARGS(SRC,DST):
|
||||
case OP_ARGS(TMP,SRC):
|
||||
case OP_ARGS(TMP,DST):
|
||||
XCopyArea( display, pixmaps[OP_SRC(*opcode)],
|
||||
TSXCopyArea( display, pixmaps[OP_SRC(*opcode)],
|
||||
pixmaps[OP_DST(*opcode)], tmpGC,
|
||||
0, 0, width, height, 0, 0 );
|
||||
break;
|
||||
|
||||
case OP_ARGS(PAT,TMP):
|
||||
if (!pixmaps[TMP] && !fNullBrush)
|
||||
pixmaps[TMP] = XCreatePixmap( display, rootWindow,
|
||||
pixmaps[TMP] = TSXCreatePixmap( display, rootWindow,
|
||||
width, height,
|
||||
dcDst->w.bitsPerPixel );
|
||||
/* fall through */
|
||||
case OP_ARGS(PAT,DST):
|
||||
case OP_ARGS(PAT,SRC):
|
||||
if (!fNullBrush)
|
||||
XFillRectangle( display, pixmaps[OP_DST(*opcode)],
|
||||
TSXFillRectangle( display, pixmaps[OP_DST(*opcode)],
|
||||
tmpGC, 0, 0, width, height );
|
||||
break;
|
||||
}
|
||||
}
|
||||
XSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||
TSXSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||
BITBLT_PutDstArea( dcDst, pixmaps[destUsed ? DST : SRC],
|
||||
dcDst->u.x.gc, &visRectDst );
|
||||
XFreePixmap( display, pixmaps[DST] );
|
||||
if (pixmaps[SRC]) XFreePixmap( display, pixmaps[SRC] );
|
||||
if (pixmaps[TMP]) XFreePixmap( display, pixmaps[TMP] );
|
||||
XFreeGC( display, tmpGC );
|
||||
TSXFreePixmap( display, pixmaps[DST] );
|
||||
if (pixmaps[SRC]) TSXFreePixmap( display, pixmaps[SRC] );
|
||||
if (pixmaps[TMP]) TSXFreePixmap( display, pixmaps[TMP] );
|
||||
TSXFreeGC( display, tmpGC );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include "ts_xlib.h"
|
||||
#include "ts_xutil.h"
|
||||
#include "gdi.h"
|
||||
#include "callback.h"
|
||||
#include "dc.h"
|
||||
|
@ -27,20 +27,20 @@ BOOL32 X11DRV_BITMAP_Init(void)
|
|||
|
||||
/* Create the necessary GCs */
|
||||
|
||||
if ((tmpPixmap = XCreatePixmap( display, rootWindow, 1, 1, 1 )))
|
||||
if ((tmpPixmap = TSXCreatePixmap( display, rootWindow, 1, 1, 1 )))
|
||||
{
|
||||
BITMAP_monoGC = XCreateGC( display, tmpPixmap, 0, NULL );
|
||||
XSetGraphicsExposures( display, BITMAP_monoGC, False );
|
||||
XFreePixmap( display, tmpPixmap );
|
||||
BITMAP_monoGC = TSXCreateGC( display, tmpPixmap, 0, NULL );
|
||||
TSXSetGraphicsExposures( display, BITMAP_monoGC, False );
|
||||
TSXFreePixmap( display, tmpPixmap );
|
||||
}
|
||||
|
||||
if (screenDepth != 1)
|
||||
{
|
||||
if ((tmpPixmap = XCreatePixmap(display, rootWindow, 1,1,screenDepth)))
|
||||
if ((tmpPixmap = TSXCreatePixmap(display, rootWindow, 1,1,screenDepth)))
|
||||
{
|
||||
BITMAP_colorGC = XCreateGC( display, tmpPixmap, 0, NULL );
|
||||
XSetGraphicsExposures( display, BITMAP_colorGC, False );
|
||||
XFreePixmap( display, tmpPixmap );
|
||||
BITMAP_colorGC = TSXCreateGC( display, tmpPixmap, 0, NULL );
|
||||
TSXSetGraphicsExposures( display, BITMAP_colorGC, False );
|
||||
TSXFreePixmap( display, tmpPixmap );
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -74,8 +74,8 @@ HBITMAP32 X11DRV_BITMAP_SelectObject( DC * dc, HBITMAP32 hbitmap,
|
|||
|
||||
if (dc->w.bitsPerPixel != bmp->bitmap.bmBitsPixel)
|
||||
{
|
||||
XFreeGC( display, dc->u.x.gc );
|
||||
dc->u.x.gc = XCreateGC( display, dc->u.x.drawable, 0, NULL );
|
||||
TSXFreeGC( display, dc->u.x.gc );
|
||||
dc->u.x.gc = TSXCreateGC( display, dc->u.x.drawable, 0, NULL );
|
||||
dc->w.bitsPerPixel = bmp->bitmap.bmBitsPixel;
|
||||
DC_InitDC( dc );
|
||||
}
|
||||
|
|
|
@ -122,15 +122,15 @@ static Pixmap BRUSH_DitherColor( DC *dc, COLORREF color )
|
|||
int dr = ((r + d) / MATRIX_SIZE_2) / 256;
|
||||
int dg = ((g + d) / MATRIX_SIZE_2) / 256;
|
||||
int db = ((b + d) / MATRIX_SIZE_2) / 256;
|
||||
XPutPixel( ditherImage, x, y, PIXEL_VALUE(dr,dg,db) );
|
||||
TSXPutPixel( ditherImage, x, y, PIXEL_VALUE(dr,dg,db) );
|
||||
}
|
||||
}
|
||||
prevColor = color;
|
||||
}
|
||||
|
||||
pixmap = XCreatePixmap( display, rootWindow,
|
||||
pixmap = TSXCreatePixmap( display, rootWindow,
|
||||
MATRIX_SIZE, MATRIX_SIZE, screenDepth );
|
||||
XPutImage( display, pixmap, BITMAP_colorGC, ditherImage, 0, 0,
|
||||
TSXPutImage( display, pixmap, BITMAP_colorGC, ditherImage, 0, 0,
|
||||
0, 0, MATRIX_SIZE, MATRIX_SIZE );
|
||||
return pixmap;
|
||||
}
|
||||
|
@ -168,16 +168,16 @@ static BOOL32 BRUSH_SelectPatternBrush( DC * dc, HBITMAP32 hbitmap )
|
|||
if ((dc->w.bitsPerPixel == 1) && (bmp->bitmap.bmBitsPixel != 1))
|
||||
{
|
||||
/* Special case: a color pattern on a monochrome DC */
|
||||
dc->u.x.brush.pixmap = XCreatePixmap( display, rootWindow, 8, 8, 1 );
|
||||
dc->u.x.brush.pixmap = TSXCreatePixmap( display, rootWindow, 8, 8, 1 );
|
||||
/* FIXME: should probably convert to monochrome instead */
|
||||
XCopyPlane( display, bmp->pixmap, dc->u.x.brush.pixmap,
|
||||
TSXCopyPlane( display, bmp->pixmap, dc->u.x.brush.pixmap,
|
||||
BITMAP_monoGC, 0, 0, 8, 8, 0, 0, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
dc->u.x.brush.pixmap = XCreatePixmap( display, rootWindow,
|
||||
dc->u.x.brush.pixmap = TSXCreatePixmap( display, rootWindow,
|
||||
8, 8, bmp->bitmap.bmBitsPixel );
|
||||
XCopyArea( display, bmp->pixmap, dc->u.x.brush.pixmap,
|
||||
TSXCopyArea( display, bmp->pixmap, dc->u.x.brush.pixmap,
|
||||
BITMAP_GC(bmp), 0, 0, 8, 8, 0, 0 );
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ HBRUSH32 X11DRV_BRUSH_SelectObject( DC * dc, HBRUSH32 hbrush, BRUSHOBJ * brush )
|
|||
|
||||
if (dc->u.x.brush.pixmap)
|
||||
{
|
||||
XFreePixmap( display, dc->u.x.brush.pixmap );
|
||||
TSXFreePixmap( display, dc->u.x.brush.pixmap );
|
||||
dc->u.x.brush.pixmap = 0;
|
||||
}
|
||||
dc->u.x.brush.style = brush->logbrush.lbStyle;
|
||||
|
@ -253,7 +253,7 @@ HBRUSH32 X11DRV_BRUSH_SelectObject( DC * dc, HBRUSH32 hbrush, BRUSHOBJ * brush )
|
|||
case BS_HATCHED:
|
||||
dprintf_gdi( stddeb, "BS_HATCHED\n" );
|
||||
dc->u.x.brush.pixel = COLOR_ToPhysical( dc, brush->logbrush.lbColor );
|
||||
dc->u.x.brush.pixmap = XCreateBitmapFromData( display, rootWindow,
|
||||
dc->u.x.brush.pixmap = TSXCreateBitmapFromData( display, rootWindow,
|
||||
HatchBrushes[brush->logbrush.lbHatch], 8, 8 );
|
||||
dc->u.x.brush.fillStyle = FillStippled;
|
||||
break;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
/***********************************************************************
|
||||
* X11DRV_SetDeviceClipping
|
||||
* Copy RECT32s to a temporary buffer of XRectangles and call
|
||||
* XSetClipRectangles().
|
||||
* TSXSetClipRectangles().
|
||||
*
|
||||
* Could write using GetRegionData but this would be slower.
|
||||
*/
|
||||
|
@ -54,7 +54,7 @@ void X11DRV_SetDeviceClipping( DC * dc )
|
|||
else
|
||||
pXrect = NULL;
|
||||
|
||||
XSetClipRectangles( display, dc->u.x.gc, dc->w.DCOrgX, dc->w.DCOrgY,
|
||||
TSXSetClipRectangles( display, dc->u.x.gc, dc->w.DCOrgX, dc->w.DCOrgY,
|
||||
pXrect, obj->rgn->numRects, YXBanded );
|
||||
|
||||
if(pXrect)
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
#include <float.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include "ts_xlib.h"
|
||||
#include "ts_xutil.h"
|
||||
#include <X11/Intrinsic.h>
|
||||
#ifndef PI
|
||||
#define PI M_PI
|
||||
|
@ -56,7 +56,7 @@ BOOL32
|
|||
X11DRV_LineTo( DC *dc, INT32 x, INT32 y )
|
||||
{
|
||||
if (DC_SetupGCForPen( dc ))
|
||||
XDrawLine(display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawLine(display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + XLPTODP( dc, dc->w.CursPosX ),
|
||||
dc->w.DCOrgY + YLPTODP( dc, dc->w.CursPosY ),
|
||||
dc->w.DCOrgX + XLPTODP( dc, x ),
|
||||
|
@ -109,8 +109,8 @@ X11DRV_DrawArc( DC *dc, INT32 left, INT32 top, INT32 right,
|
|||
|
||||
if ((lines > 0) && DC_SetupGCForBrush( dc ))
|
||||
{
|
||||
XSetArcMode( display, dc->u.x.gc, (lines==1) ? ArcChord : ArcPieSlice);
|
||||
XFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXSetArcMode( display, dc->u.x.gc, (lines==1) ? ArcChord : ArcPieSlice);
|
||||
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
||||
right-left-1, bottom-top-1, istart_angle, idiff_angle );
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ X11DRV_DrawArc( DC *dc, INT32 left, INT32 top, INT32 right,
|
|||
/* Draw arc and lines */
|
||||
|
||||
if (!DC_SetupGCForPen( dc )) return TRUE;
|
||||
XDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
||||
right-left-1, bottom-top-1, istart_angle, idiff_angle );
|
||||
if (!lines) return TRUE;
|
||||
|
@ -133,7 +133,7 @@ X11DRV_DrawArc( DC *dc, INT32 left, INT32 top, INT32 right,
|
|||
points[1].x = dc->w.DCOrgX + xcenter;
|
||||
points[1].y = dc->w.DCOrgY + ycenter;
|
||||
}
|
||||
XDrawLines( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawLines( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
points, lines+1, CoordModeOrigin );
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -200,11 +200,11 @@ X11DRV_Ellipse( DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom )
|
|||
}
|
||||
|
||||
if (DC_SetupGCForBrush( dc ))
|
||||
XFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
||||
right-left-1, bottom-top-1, 0, 360*64 );
|
||||
if (DC_SetupGCForPen( dc ))
|
||||
XDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
||||
right-left-1, bottom-top-1, 0, 360*64 );
|
||||
return TRUE;
|
||||
|
@ -229,7 +229,7 @@ X11DRV_Rectangle(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom)
|
|||
if ((left == right) || (top == bottom))
|
||||
{
|
||||
if (DC_SetupGCForPen( dc ))
|
||||
XDrawLine(display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawLine(display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left,
|
||||
dc->w.DCOrgY + top,
|
||||
dc->w.DCOrgX + right,
|
||||
|
@ -252,13 +252,13 @@ X11DRV_Rectangle(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom)
|
|||
if ((right > left + width) && (bottom > top + width))
|
||||
{
|
||||
if (DC_SetupGCForBrush( dc ))
|
||||
XFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left + (width + 1) / 2,
|
||||
dc->w.DCOrgY + top + (width + 1) / 2,
|
||||
right-left-width-1, bottom-top-width-1);
|
||||
}
|
||||
if (DC_SetupGCForPen( dc ))
|
||||
XDrawRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
||||
right-left-1, bottom-top-1 );
|
||||
return TRUE;
|
||||
|
@ -292,34 +292,34 @@ X11DRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
|
|||
{
|
||||
if (ell_width && ell_height)
|
||||
{
|
||||
XFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
||||
ell_width, ell_height, 90 * 64, 90 * 64 );
|
||||
XFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left, dc->w.DCOrgY + bottom - ell_height,
|
||||
ell_width, ell_height, 180 * 64, 90 * 64 );
|
||||
XFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + right - ell_width,
|
||||
dc->w.DCOrgY + bottom - ell_height,
|
||||
ell_width, ell_height, 270 * 64, 90 * 64 );
|
||||
XFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + right - ell_width, dc->w.DCOrgY + top,
|
||||
ell_width, ell_height, 0, 90 * 64 );
|
||||
}
|
||||
if (ell_width < right - left)
|
||||
{
|
||||
XFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left + ell_width / 2,
|
||||
dc->w.DCOrgY + top,
|
||||
right - left - ell_width, ell_height / 2 );
|
||||
XFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left + ell_width / 2,
|
||||
dc->w.DCOrgY + bottom - (ell_height+1) / 2,
|
||||
right - left - ell_width, (ell_height+1) / 2 );
|
||||
}
|
||||
if (ell_height < bottom - top)
|
||||
{
|
||||
XFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left,
|
||||
dc->w.DCOrgY + top + ell_height / 2,
|
||||
right - left, bottom - top - ell_height );
|
||||
|
@ -329,28 +329,28 @@ X11DRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
|
|||
{
|
||||
if (ell_width && ell_height)
|
||||
{
|
||||
XDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
||||
ell_width, ell_height, 90 * 64, 90 * 64 );
|
||||
XDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left, dc->w.DCOrgY + bottom - ell_height,
|
||||
ell_width, ell_height, 180 * 64, 90 * 64 );
|
||||
XDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + right - ell_width,
|
||||
dc->w.DCOrgY + bottom - ell_height,
|
||||
ell_width, ell_height, 270 * 64, 90 * 64 );
|
||||
XDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + right - ell_width, dc->w.DCOrgY + top,
|
||||
ell_width, ell_height, 0, 90 * 64 );
|
||||
}
|
||||
if (ell_width < right - left)
|
||||
{
|
||||
XDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left + ell_width / 2,
|
||||
dc->w.DCOrgY + top,
|
||||
dc->w.DCOrgX + right - ell_width / 2,
|
||||
dc->w.DCOrgY + top );
|
||||
XDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left + ell_width / 2,
|
||||
dc->w.DCOrgY + bottom,
|
||||
dc->w.DCOrgX + right - ell_width / 2,
|
||||
|
@ -358,12 +358,12 @@ X11DRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
|
|||
}
|
||||
if (ell_height < bottom - top)
|
||||
{
|
||||
XDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + right,
|
||||
dc->w.DCOrgY + top + ell_height / 2,
|
||||
dc->w.DCOrgX + right,
|
||||
dc->w.DCOrgY + bottom - ell_height / 2 );
|
||||
XDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left,
|
||||
dc->w.DCOrgY + top + ell_height / 2,
|
||||
dc->w.DCOrgX + left,
|
||||
|
@ -386,9 +386,9 @@ X11DRV_SetPixel( DC *dc, INT32 x, INT32 y, COLORREF color )
|
|||
y = dc->w.DCOrgY + YLPTODP( dc, y );
|
||||
pixel = COLOR_ToPhysical( dc, color );
|
||||
|
||||
XSetForeground( display, dc->u.x.gc, pixel );
|
||||
XSetFunction( display, dc->u.x.gc, GXcopy );
|
||||
XDrawPoint( display, dc->u.x.drawable, dc->u.x.gc, x, y );
|
||||
TSXSetForeground( display, dc->u.x.gc, pixel );
|
||||
TSXSetFunction( display, dc->u.x.gc, GXcopy );
|
||||
TSXDrawPoint( display, dc->u.x.drawable, dc->u.x.gc, x, y );
|
||||
|
||||
/* inefficient but simple... */
|
||||
|
||||
|
@ -410,21 +410,21 @@ X11DRV_GetPixel( DC *dc, INT32 x, INT32 y )
|
|||
y = dc->w.DCOrgY + YLPTODP( dc, y );
|
||||
if (dc->w.flags & DC_MEMORY)
|
||||
{
|
||||
image = XGetImage( display, dc->u.x.drawable, x, y, 1, 1,
|
||||
image = TSXGetImage( display, dc->u.x.drawable, x, y, 1, 1,
|
||||
AllPlanes, ZPixmap );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If we are reading from the screen, use a temporary copy */
|
||||
/* to avoid a BadMatch error */
|
||||
if (!pixmap) pixmap = XCreatePixmap( display, rootWindow,
|
||||
if (!pixmap) pixmap = TSXCreatePixmap( display, rootWindow,
|
||||
1, 1, dc->w.bitsPerPixel );
|
||||
XCopyArea( display, dc->u.x.drawable, pixmap, BITMAP_colorGC,
|
||||
TSXCopyArea( display, dc->u.x.drawable, pixmap, BITMAP_colorGC,
|
||||
x, y, 1, 1, 0, 0 );
|
||||
image = XGetImage( display, pixmap, 0, 0, 1, 1, AllPlanes, ZPixmap );
|
||||
image = TSXGetImage( display, pixmap, 0, 0, 1, 1, AllPlanes, ZPixmap );
|
||||
}
|
||||
pixel = XGetPixel( image, 0, 0 );
|
||||
XDestroyImage( image );
|
||||
pixel = TSXGetPixel( image, 0, 0 );
|
||||
TSXDestroyImage( image );
|
||||
|
||||
return COLOR_ToLogical(pixel);
|
||||
}
|
||||
|
@ -461,7 +461,7 @@ X11DRV_PaintRgn( DC *dc, HRGN32 hrgn )
|
|||
|
||||
GetRgnBox32( dc->w.hGCClipRgn, &box );
|
||||
if (DC_SetupGCForBrush( dc ))
|
||||
XFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + box.left, dc->w.DCOrgY + box.top,
|
||||
box.right-box.left, box.bottom-box.top );
|
||||
|
||||
|
@ -481,7 +481,7 @@ X11DRV_Polyline( DC *dc, const LPPOINT32 pt, INT32 count )
|
|||
|
||||
if (DC_SetupGCForPen( dc ))
|
||||
for (i = 0; i < count-1; i ++)
|
||||
XDrawLine (display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawLine (display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + XLPTODP(dc, pt [i].x),
|
||||
dc->w.DCOrgY + YLPTODP(dc, pt [i].y),
|
||||
dc->w.DCOrgX + XLPTODP(dc, pt [i+1].x),
|
||||
|
@ -508,11 +508,11 @@ X11DRV_Polygon( DC *dc, LPPOINT32 pt, INT32 count )
|
|||
points[count] = points[0];
|
||||
|
||||
if (DC_SetupGCForBrush( dc ))
|
||||
XFillPolygon( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXFillPolygon( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
points, count+1, Complex, CoordModeOrigin);
|
||||
|
||||
if (DC_SetupGCForPen ( dc ))
|
||||
XDrawLines( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawLines( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
points, count+1, CoordModeOrigin );
|
||||
|
||||
free( points );
|
||||
|
@ -555,7 +555,7 @@ X11DRV_PolyPolygon( DC *dc, LPPOINT32 pt, LPINT32 counts, UINT32 polygons)
|
|||
pt++;
|
||||
}
|
||||
points[j] = points[0];
|
||||
XDrawLines( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawLines( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
points, j + 1, CoordModeOrigin );
|
||||
}
|
||||
free( points );
|
||||
|
@ -579,8 +579,8 @@ static void X11DRV_InternalFloodFill(XImage *image, DC *dc,
|
|||
int left, right;
|
||||
|
||||
#define TO_FLOOD(x,y) ((fillType == FLOODFILLBORDER) ? \
|
||||
(XGetPixel(image,x,y) != pixel) : \
|
||||
(XGetPixel(image,x,y) == pixel))
|
||||
(TSXGetPixel(image,x,y) != pixel) : \
|
||||
(TSXGetPixel(image,x,y) == pixel))
|
||||
|
||||
if (!TO_FLOOD(x,y)) return;
|
||||
|
||||
|
@ -589,15 +589,15 @@ static void X11DRV_InternalFloodFill(XImage *image, DC *dc,
|
|||
left = right = x;
|
||||
while ((left > 0) && TO_FLOOD( left-1, y )) left--;
|
||||
while ((right < image->width) && TO_FLOOD( right, y )) right++;
|
||||
XFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
xOrg + left, yOrg + y, right-left, 1 );
|
||||
|
||||
/* Set the pixels of this line so we don't fill it again */
|
||||
|
||||
for (x = left; x < right; x++)
|
||||
{
|
||||
if (fillType == FLOODFILLBORDER) XPutPixel( image, x, y, pixel );
|
||||
else XPutPixel( image, x, y, ~pixel );
|
||||
if (fillType == FLOODFILLBORDER) TSXPutPixel( image, x, y, pixel );
|
||||
else TSXPutPixel( image, x, y, ~pixel );
|
||||
}
|
||||
|
||||
/* Fill the line above */
|
||||
|
@ -656,7 +656,7 @@ static BOOL32 X11DRV_DoFloodFill( const struct FloodFill_params *params )
|
|||
|
||||
if (GetRgnBox32( dc->w.hGCClipRgn, &rect ) == ERROR) return FALSE;
|
||||
|
||||
if (!(image = XGetImage( display, dc->u.x.drawable,
|
||||
if (!(image = TSXGetImage( display, dc->u.x.drawable,
|
||||
dc->w.DCOrgX + rect.left,
|
||||
dc->w.DCOrgY + rect.top,
|
||||
rect.right - rect.left,
|
||||
|
@ -666,7 +666,7 @@ static BOOL32 X11DRV_DoFloodFill( const struct FloodFill_params *params )
|
|||
if (DC_SetupGCForBrush( dc ))
|
||||
{
|
||||
/* ROP mode is always GXcopy for flood-fill */
|
||||
XSetFunction( display, dc->u.x.gc, GXcopy );
|
||||
TSXSetFunction( display, dc->u.x.gc, GXcopy );
|
||||
X11DRV_InternalFloodFill(image, dc,
|
||||
XLPTODP(dc,params->x) - rect.left,
|
||||
YLPTODP(dc,params->y) - rect.top,
|
||||
|
@ -676,7 +676,7 @@ static BOOL32 X11DRV_DoFloodFill( const struct FloodFill_params *params )
|
|||
params->fillType );
|
||||
}
|
||||
|
||||
XDestroyImage( image );
|
||||
TSXDestroyImage( image );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "tsx11defs.h"
|
||||
#include "x11drv.h"
|
||||
#include "color.h"
|
||||
#include "bitmap.h"
|
||||
|
@ -108,6 +109,8 @@ static DeviceCaps X11DRV_DevCaps = {
|
|||
*/
|
||||
BOOL32 X11DRV_Init(void)
|
||||
{
|
||||
if (!TSX11_Init()) return FALSE;
|
||||
|
||||
/* FIXME: colormap management should be merged with the X11DRV */
|
||||
|
||||
if( !COLOR_Init() ) return FALSE;
|
||||
|
@ -173,7 +176,7 @@ static BOOL32 X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
|
|||
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr( dc->w.hBitmap,
|
||||
BITMAP_MAGIC );
|
||||
physDev->drawable = bmp->pixmap;
|
||||
physDev->gc = XCreateGC( display, physDev->drawable, 0, NULL );
|
||||
physDev->gc = TSXCreateGC( display, physDev->drawable, 0, NULL );
|
||||
dc->w.bitsPerPixel = bmp->bitmap.bmBitsPixel;
|
||||
dc->w.hVisRgn = CreateRectRgn32( 0, 0, bmp->bitmap.bmWidth,
|
||||
bmp->bitmap.bmHeight );
|
||||
|
@ -182,19 +185,19 @@ static BOOL32 X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
|
|||
else
|
||||
{
|
||||
physDev->drawable = rootWindow;
|
||||
physDev->gc = XCreateGC( display, physDev->drawable, 0, NULL );
|
||||
physDev->gc = TSXCreateGC( display, physDev->drawable, 0, NULL );
|
||||
dc->w.bitsPerPixel = screenDepth;
|
||||
dc->w.hVisRgn = CreateRectRgn32( 0, 0, screenWidth, screenHeight);
|
||||
}
|
||||
|
||||
if (!dc->w.hVisRgn)
|
||||
{
|
||||
XFreeGC( display, physDev->gc );
|
||||
TSXFreeGC( display, physDev->gc );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
XSetGraphicsExposures( display, physDev->gc, False );
|
||||
XSetSubwindowMode( display, physDev->gc, IncludeInferiors );
|
||||
TSXSetGraphicsExposures( display, physDev->gc, False );
|
||||
TSXSetSubwindowMode( display, physDev->gc, IncludeInferiors );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -206,7 +209,7 @@ static BOOL32 X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
|
|||
static BOOL32 X11DRV_DeleteDC( DC *dc )
|
||||
{
|
||||
X11DRV_PDEVICE *physDev = (X11DRV_PDEVICE *)dc->physDev;
|
||||
XFreeGC( display, physDev->gc );
|
||||
TSXFreeGC( display, physDev->gc );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include "ts_xlib.h"
|
||||
#include <X11/Xatom.h>
|
||||
#include "windows.h"
|
||||
#include "dc.h"
|
||||
|
@ -94,8 +94,8 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
|||
|
||||
if (flags & ETO_OPAQUE)
|
||||
{
|
||||
XSetForeground( display, dc->u.x.gc, dc->w.backgroundPixel );
|
||||
XFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXSetForeground( display, dc->u.x.gc, dc->w.backgroundPixel );
|
||||
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + rect.left, dc->w.DCOrgY + rect.top,
|
||||
rect.right-rect.left, rect.bottom-rect.top );
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
|||
}
|
||||
else
|
||||
{
|
||||
XTextExtents( font, str, count, &dir, &ascent, &descent, &info );
|
||||
TSXTextExtents( font, str, count, &dir, &ascent, &descent, &info );
|
||||
info.width += count*dc->w.charExtra + dc->w.breakExtra*dc->w.breakCount;
|
||||
}
|
||||
|
||||
|
@ -166,8 +166,8 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
|||
(y-font->ascent < rect.top) ||
|
||||
(y+font->descent >= rect.bottom))
|
||||
{
|
||||
XSetForeground( display, dc->u.x.gc, dc->w.backgroundPixel );
|
||||
XFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXSetForeground( display, dc->u.x.gc, dc->w.backgroundPixel );
|
||||
TSXFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + x,
|
||||
dc->w.DCOrgY + y - font->ascent,
|
||||
info.width,
|
||||
|
@ -178,10 +178,10 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
|||
|
||||
/* Draw the text (count > 0 verified) */
|
||||
|
||||
XSetForeground( display, dc->u.x.gc, dc->w.textPixel );
|
||||
TSXSetForeground( display, dc->u.x.gc, dc->w.textPixel );
|
||||
if (!dc->w.charExtra && !dc->w.breakExtra && !lpDx)
|
||||
{
|
||||
XDrawString( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawString( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + x, dc->w.DCOrgY + y, str, count );
|
||||
}
|
||||
else /* Now the fun begins... */
|
||||
|
@ -214,7 +214,7 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
|||
do
|
||||
{
|
||||
delta += (lpDx[i] * dc->vportExtX + extra) / dc->wndExtX
|
||||
- XTextWidth( font, str + i, 1);
|
||||
- TSXTextWidth( font, str + i, 1);
|
||||
pitem->nchars++;
|
||||
} while ((++i < count) && !delta);
|
||||
pitem++;
|
||||
|
@ -240,7 +240,7 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
|||
}
|
||||
}
|
||||
|
||||
XDrawText( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawText( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + x, dc->w.DCOrgY + y, items, pitem - items );
|
||||
HeapFree( GetProcessHeap(), 0, items );
|
||||
}
|
||||
|
@ -251,27 +251,27 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
|||
{
|
||||
long linePos, lineWidth;
|
||||
|
||||
if (!XGetFontProperty( font, XA_UNDERLINE_POSITION, &linePos ))
|
||||
if (!TSXGetFontProperty( font, XA_UNDERLINE_POSITION, &linePos ))
|
||||
linePos = font->descent-1;
|
||||
if (!XGetFontProperty( font, XA_UNDERLINE_THICKNESS, &lineWidth ))
|
||||
if (!TSXGetFontProperty( font, XA_UNDERLINE_THICKNESS, &lineWidth ))
|
||||
lineWidth = 0;
|
||||
else if (lineWidth == 1) lineWidth = 0;
|
||||
XSetLineAttributes( display, dc->u.x.gc, lineWidth,
|
||||
TSXSetLineAttributes( display, dc->u.x.gc, lineWidth,
|
||||
LineSolid, CapRound, JoinBevel );
|
||||
XDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + x, dc->w.DCOrgY + y + linePos,
|
||||
dc->w.DCOrgX + x + info.width, dc->w.DCOrgY + y + linePos );
|
||||
}
|
||||
if (lfStrikeOut)
|
||||
{
|
||||
long lineAscent, lineDescent;
|
||||
if (!XGetFontProperty( font, XA_STRIKEOUT_ASCENT, &lineAscent ))
|
||||
if (!TSXGetFontProperty( font, XA_STRIKEOUT_ASCENT, &lineAscent ))
|
||||
lineAscent = font->ascent / 2;
|
||||
if (!XGetFontProperty( font, XA_STRIKEOUT_DESCENT, &lineDescent ))
|
||||
if (!TSXGetFontProperty( font, XA_STRIKEOUT_DESCENT, &lineDescent ))
|
||||
lineDescent = -lineAscent * 2 / 3;
|
||||
XSetLineAttributes( display, dc->u.x.gc, lineAscent + lineDescent,
|
||||
TSXSetLineAttributes( display, dc->u.x.gc, lineAscent + lineDescent,
|
||||
LineSolid, CapRound, JoinBevel );
|
||||
XDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
TSXDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + x, dc->w.DCOrgY + y - lineAscent,
|
||||
dc->w.DCOrgX + x + info.width, dc->w.DCOrgY + y - lineAscent );
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include "ts_xlib.h"
|
||||
#include <X11/Xatom.h>
|
||||
#include "heap.h"
|
||||
#include "options.h"
|
||||
|
@ -543,7 +543,7 @@ static BOOL32 XFONT_GetLeading( LPIFONTINFO16 pFI, XFontStruct* x_fs, INT32* pIL
|
|||
BOOL32 bHaveCapHeight = (pFI->dfCharSet == ANSI_CHARSET && 'X' >= min && 'X' <= max );
|
||||
|
||||
if( pEL ) *pEL = 0;
|
||||
if( XGetFontProperty(x_fs, XA_CAP_HEIGHT, &height) == False )
|
||||
if( TSXGetFontProperty(x_fs, XA_CAP_HEIGHT, &height) == False )
|
||||
{
|
||||
if( x_fs->per_char )
|
||||
if( bHaveCapHeight )
|
||||
|
@ -1322,7 +1322,7 @@ BOOL32 X11DRV_FONT_Init( DeviceCaps* pDevCaps )
|
|||
|
||||
res = XFONT_GetPointResolution( pDevCaps );
|
||||
|
||||
x_pattern = XListFonts(display, "*", MAX_FONT_FAMILIES * 16, &x_count );
|
||||
x_pattern = TSXListFonts(display, "*", MAX_FONT_FAMILIES * 16, &x_count );
|
||||
|
||||
dprintf_font(stddeb,"Font Mapper: initializing %i fonts [LPY=%i, XDR=%i, DR=%i]\n",
|
||||
x_count, pDevCaps->logPixelsY, DefResolution, res);
|
||||
|
@ -1433,12 +1433,12 @@ BOOL32 X11DRV_FONT_Init( DeviceCaps* pDevCaps )
|
|||
}
|
||||
else lpstr = typeface;
|
||||
|
||||
if( (x_fs = XLoadQueryFont(display, lpstr)) )
|
||||
if( (x_fs = TSXLoadQueryFont(display, lpstr)) )
|
||||
{
|
||||
fi->df.dfHorizRes = fi->df.dfVertRes = res;
|
||||
|
||||
XFONT_SetFontMetric( fi, fr, x_fs );
|
||||
XFreeFont( display, x_fs );
|
||||
TSXFreeFont( display, x_fs );
|
||||
|
||||
#ifdef DEBUG_FONT_INIT
|
||||
dprintf_font(stddeb,"\t[% 2ipt] '%s'\n", fi->df.dfPoints, typeface );
|
||||
|
@ -1464,15 +1464,15 @@ BOOL32 X11DRV_FONT_Init( DeviceCaps* pDevCaps )
|
|||
}
|
||||
|
||||
if( fi ) HeapFree(SystemHeap, 0, fi);
|
||||
XFreeFontNames(x_pattern);
|
||||
TSXFreeFontNames(x_pattern);
|
||||
|
||||
/* check if we're dealing with X11 R6 server */
|
||||
|
||||
lstrcpy32A(buffer, "-*-*-*-*-normal-*-[12 0 0 12]-*-72-*-*-*-iso8859-1");
|
||||
if( (x_fs = XLoadQueryFont(display, buffer)) )
|
||||
if( (x_fs = TSXLoadQueryFont(display, buffer)) )
|
||||
{
|
||||
XTextCaps |= TC_SF_X_YINDEP;
|
||||
XFreeFont(display, x_fs);
|
||||
TSXFreeFont(display, x_fs);
|
||||
}
|
||||
|
||||
XFONT_WindowsNames( buffer );
|
||||
|
@ -1622,8 +1622,6 @@ static UINT32 XFONT_Match( fontMatch* pfm )
|
|||
}
|
||||
else if( !(pfi->fi_flags & FI_NORMAL) ) penalty++;
|
||||
|
||||
if( pfi->lfd_resolution != DefResolution ) penalty++;
|
||||
|
||||
if( plf->lfWeight != FW_DONTCARE )
|
||||
{
|
||||
penalty += abs(plf->lfWeight - pfi->df.dfWeight) / 40;
|
||||
|
@ -1639,6 +1637,9 @@ static UINT32 XFONT_Match( fontMatch* pfm )
|
|||
if( plf->lfUnderline ) pfm->flags |= FO_SYNTH_UNDERLINE;
|
||||
if( plf->lfStrikeOut ) pfm->flags |= FO_SYNTH_STRIKEOUT;
|
||||
|
||||
if( penalty && pfi->lfd_resolution != DefResolution )
|
||||
penalty++;
|
||||
|
||||
dprintf_font(stddeb,"-> %i\n", penalty );
|
||||
|
||||
return penalty;
|
||||
|
@ -1875,7 +1876,7 @@ static fontObject* XFONT_GetCacheEntry()
|
|||
else fontMRU = (INT16)fontCache[j].lru;
|
||||
|
||||
/* FIXME: lpXForm, lpPixmap */
|
||||
XFreeFont( display, fontCache[j].fs );
|
||||
TSXFreeFont( display, fontCache[j].fs );
|
||||
|
||||
memset( fontCache + j, 0, sizeof(fontObject) );
|
||||
return (fontCache + j);
|
||||
|
@ -1957,7 +1958,7 @@ static X_PHYSFONT XFONT_RealizeFont( LPLOGFONT16 plf )
|
|||
do
|
||||
{
|
||||
LFD_ComposeLFD( pfo, fm.height, lpLFD, uRelaxLevel++ );
|
||||
if( (pfo->fs = XLoadQueryFont( display, lpLFD )) ) break;
|
||||
if( (pfo->fs = TSXLoadQueryFont( display, lpLFD )) ) break;
|
||||
} while( uRelaxLevel );
|
||||
|
||||
if( XFONT_GetLeading( &pfo->fi->df, pfo->fs, &i, NULL ) )
|
||||
|
@ -2118,6 +2119,9 @@ BOOL32 X11DRV_EnumDeviceFonts( DC* dc, LPLOGFONT16 plf,
|
|||
}
|
||||
|
||||
|
||||
static char* test_string = "Abc Def Ghi Jkl Mno Pqr Stu Vwx Yz";
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* X11DRV_GetTextExtentPoint
|
||||
*/
|
||||
|
@ -2130,10 +2134,11 @@ BOOL32 X11DRV_GetTextExtentPoint( DC *dc, LPCSTR str, INT32 count,
|
|||
int dir, ascent, descent;
|
||||
XCharStruct info;
|
||||
|
||||
XTextExtents( pfs, str, count, &dir, &ascent, &descent, &info );
|
||||
TSXTextExtents( pfs, str, count, &dir, &ascent, &descent, &info );
|
||||
size->cx = abs((info.width + dc->w.breakRem + count * dc->w.charExtra)
|
||||
* dc->wndExtX / dc->vportExtX);
|
||||
size->cy = abs((pfs->ascent + pfs->descent) * dc->wndExtY / dc->vportExtY);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
@ -2149,6 +2154,7 @@ BOOL32 X11DRV_GetTextMetrics(DC *dc, TEXTMETRIC32A *metrics)
|
|||
{
|
||||
fontObject* pfo = __PFONT(dc->u.x.font);
|
||||
XFONT_GetTextMetric( pfo, metrics );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
@ -2187,6 +2193,7 @@ BOOL32 X11DRV_GetCharWidth( DC *dc, UINT32 firstChar, UINT32 lastChar,
|
|||
*buffer++ = MAX(cs->width, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
|
|
@ -361,6 +361,8 @@ BOOL32 BUILTIN_ParseDLLOptions( const char *str )
|
|||
{
|
||||
if (!lstrncmpi32A( str, dll->descr->name, (int)(p - str) ))
|
||||
{
|
||||
if (dll->descr->name[(int)(p-str)]) /* only partial match */
|
||||
continue;
|
||||
if (str[-1] == '-')
|
||||
{
|
||||
if (dll->flags & DLL_FLAG_ALWAYS_USED) return FALSE;
|
||||
|
|
|
@ -5,7 +5,7 @@ type win16
|
|||
2 pascal CoInitialize(long) CoInitialize
|
||||
3 pascal CoUninitialize() CoUnitialize
|
||||
4 pascal CoGetMalloc(long ptr) CoGetMalloc
|
||||
5 stub COREGISTERCLASSOBJECT
|
||||
5 pascal CoRegisterClassObject(ptr ptr long long ptr) CoRegisterClassObject
|
||||
6 stub COREVOKECLASSOBJECT
|
||||
7 stub COGETCLASSOBJECT
|
||||
8 stub COMARSHALINTERFACE
|
||||
|
@ -13,11 +13,11 @@ type win16
|
|||
10 stub COLOADLIBRARY
|
||||
11 stub COFREELIBRARY
|
||||
12 stub COFREEALLLIBRARIES
|
||||
13 stub COCREATEINSTANCE
|
||||
13 pascal CoCreateInstance(ptr ptr long ptr ptr) CoCreateInstance
|
||||
14 stub STRINGFROMIID
|
||||
15 pascal CoDisconnectObject(ptr long) CoDisconnectObject
|
||||
16 stub CORELEASEMARSHALDATA
|
||||
17 stub COFREEUNUSEDLIBRARIES
|
||||
17 pascal16 COFREEUNUSEDLIBRARIES() CoFreeUnusedLibraries
|
||||
18 pascal16 IsEqualGUID(ptr ptr) IsEqualGUID
|
||||
19 pascal StringFromCLSID(ptr ptr) StringFromCLSID
|
||||
20 pascal CLSIDFromString(str ptr) CLSIDFromString
|
||||
|
@ -27,11 +27,11 @@ type win16
|
|||
24 stub ISVALIDIID
|
||||
25 stub RESULTFROMSCODE
|
||||
26 stub GETSCODE
|
||||
27 stub COREGISTERMESSAGEFILTER
|
||||
27 pascal CoRegisterMessageFilter(ptr ptr) CoRegisterMessageFilter16
|
||||
28 stub COISHANDLERCONNECTED
|
||||
#29 WEP
|
||||
30 stub COFILETIMETODOSDATETIME
|
||||
31 stub CODOSDATETIMETOFILETIME
|
||||
30 pascal CoFileTimeToDosDateTime(ptr ptr ptr) FileTimeToDosDateTime
|
||||
31 pascal CoDosDateTimeToFileTime(word word ptr) DosDateTimeToFileTime
|
||||
32 stub COMARSHALHRESULT
|
||||
33 stub COUNMARSHALHRESULT
|
||||
34 stub COGETCURRENTPROCESS
|
||||
|
@ -61,7 +61,7 @@ type win16
|
|||
58 stub _IID_IDFRESERVED2
|
||||
59 stub _IID_IDFRESERVED3
|
||||
60 stub _IID_IMESSAGEFILTER
|
||||
61 stub CLSIDFROMPROGID
|
||||
61 pascal CLSIDFromProgID(str ptr) CLSIDFromProgID
|
||||
62 stub PROGIDFROMCLSID
|
||||
63 stub COLOCKOBJECTEXTERNAL
|
||||
64 stub _CLSID_STDMARSHAL
|
||||
|
@ -81,7 +81,7 @@ type win16
|
|||
79 stub CLSIDFROMOLE1CLASS
|
||||
80 stub COOPENCLASSKEY
|
||||
81 stub GUIDFROMSTRING
|
||||
82 stub COFILETIMENOW
|
||||
82 pascal CoFileTimeNow(ptr) CoFileTimeNow
|
||||
83 stub REMALLOCOID
|
||||
84 stub REMFREEOID
|
||||
85 stub REMCREATEREMOTEHANDLER
|
||||
|
@ -93,7 +93,7 @@ type win16
|
|||
91 stub LRPCREVOKEMONITOR
|
||||
92 stub LRPCGETTHREADWINDOW
|
||||
93 stub TIMERCALLBACKPROC
|
||||
94 stub LOOKUPETASK
|
||||
94 pascal LookupETask(ptr ptr) LookupETask
|
||||
95 stub SETETASK
|
||||
96 stub LRPCFREEMONITORDATA
|
||||
97 stub REMLOOKUPSHUNK
|
||||
|
@ -143,3 +143,7 @@ type win16
|
|||
160 stub CORUNMODALLOOP
|
||||
161 stub COHANDLEINCOMINGCALL
|
||||
162 stub COSETACKSTATE
|
||||
|
||||
201 pascal CALLOBJECTINWOW(ptr ptr) CallObjectInWOW
|
||||
204 stub COMPOBJ_204
|
||||
207 stub COMPOBJ_207
|
||||
|
|
|
@ -166,11 +166,11 @@ file gdi.exe
|
|||
196 pascal16 SetMetaFileBitsBetter(word) SetMetaFileBitsBetter
|
||||
201 stub DMBITBLT
|
||||
202 stub DMCOLORINFO
|
||||
206 stub DMENUMDFONTS
|
||||
206 pascal16 dmEnumDFonts(ptr str ptr ptr) dmEnumDFonts
|
||||
207 stub DMENUMOBJ
|
||||
208 stub DMOUTPUT
|
||||
209 stub DMPIXEL
|
||||
210 stub DMREALIZEOBJECT
|
||||
210 pascal16 dmRealizeObject(ptr word ptr ptr segptr) dmRealizeObject
|
||||
211 stub DMSTRBLT
|
||||
212 stub DMSCANLR
|
||||
213 stub BRUTE
|
||||
|
@ -332,21 +332,21 @@ file gdi.exe
|
|||
505 stub SetEnhMetafileBits
|
||||
506 stub SetMetaRgn
|
||||
508 stub ExtSelectClipRgn
|
||||
511 stub AbortPath
|
||||
512 stub BeginPath
|
||||
513 stub CloseFigure
|
||||
514 stub EndPath
|
||||
511 pascal16 AbortPath(word) AbortPath16
|
||||
512 pascal16 BeginPath(word) BeginPath16
|
||||
513 pascal16 CloseFigure(word) CloseFigure16
|
||||
514 pascal16 EndPath(word) EndPath16
|
||||
515 stub FillPath
|
||||
516 stub FlattenPath
|
||||
517 stub GetPath
|
||||
517 pascal16 GetPath(word ptr ptr word) GetPath16
|
||||
518 stub PathToRegion
|
||||
519 stub SelectClipPath
|
||||
520 stub StrokeAndFillPath
|
||||
521 stub StrokePath
|
||||
522 stub WidenPath
|
||||
523 stub ExtCreatePen
|
||||
524 stub GetArcDirection
|
||||
525 stub SetArcDirection
|
||||
524 pascal16 GetArcDirection(word) GetArcDirection16
|
||||
525 pascal16 SetArcDirection(word word) SetArcDirection16
|
||||
526 stub GetMiterLimit
|
||||
527 stub SetMiterLimit
|
||||
528 stub GDIParametersInfo
|
||||
|
|
|
@ -74,17 +74,18 @@ file krnl386.exe
|
|||
74 pascal16 OpenFile(str ptr word) OpenFile16
|
||||
75 stub OpenPathName
|
||||
76 stub DeletePathName
|
||||
77 stub KERNEL_77 #RESERVED1
|
||||
78 stub KERNEL_78 #RESERVED2
|
||||
#79 RESERVED3
|
||||
#80 RESERVED4
|
||||
# Reserved*: old Win 2.x functions now moved to USER (Win 3.0+)
|
||||
77 pascal Reserved1(segptr) AnsiNext16
|
||||
78 pascal Reserved2(segptr segptr) AnsiPrev16
|
||||
79 pascal Reserved3(segstr) AnsiUpper16
|
||||
80 pascal Reserved4(segstr) AnsiLower16
|
||||
81 pascal16 _lclose(word) _lclose16
|
||||
82 pascal16 _lread(word segptr word) WIN16_lread
|
||||
83 pascal16 _lcreat(str word) _lcreat16
|
||||
84 pascal _llseek(word long word) _llseek16
|
||||
85 pascal16 _lopen(str word) _lopen16
|
||||
86 pascal16 _lwrite(word ptr word) _lwrite16
|
||||
87 pascal16 RESERVED5(str str) lstrcmp16
|
||||
87 pascal16 Reserved5(str str) lstrcmp16
|
||||
88 pascal lstrcpy(segptr str) lstrcpy16
|
||||
89 pascal lstrcat(segstr str) lstrcat16
|
||||
90 pascal16 lstrlen(str) lstrlen16
|
||||
|
@ -120,7 +121,7 @@ file krnl386.exe
|
|||
120 stub UndefDynLink
|
||||
121 pascal16 LocalShrink(word word) LocalShrink16
|
||||
122 pascal16 IsTaskLocked() IsTaskLocked
|
||||
123 stub KbdRst
|
||||
123 return KbdRst 0 0
|
||||
124 return EnableKernel 0 0
|
||||
125 return DisableKernel 0 0
|
||||
126 stub MemoryFreed
|
||||
|
@ -157,7 +158,7 @@ file krnl386.exe
|
|||
156 return LimitEMSPages 4 0
|
||||
157 return GetCurPID 4 0
|
||||
158 return IsWinOldApTask 2 0
|
||||
159 stub GlobalHandleNoRIP
|
||||
159 pascal GlobalHandleNoRIP(word) GlobalHandleNoRIP
|
||||
160 stub EMSCopy
|
||||
161 pascal16 LocalCountFree() LocalCountFree
|
||||
162 pascal16 LocalHeapSize() LocalHeapSize
|
||||
|
@ -237,10 +238,10 @@ file krnl386.exe
|
|||
262 stub KERNEL_262
|
||||
263 stub KERNEL_263
|
||||
310 pascal16 LocalHandleDelta(word) LocalHandleDelta
|
||||
311 stub GetSetKernelDosProc
|
||||
311 pascal GetSetKernelDOSProc(ptr) GetSetKernelDOSProc
|
||||
314 stub DebugDefineSegment
|
||||
315 pascal16 WriteOutProfiles() WriteOutProfiles
|
||||
316 stub GetFreeMemInfo
|
||||
316 pascal GetFreeMemInfo() GetFreeMemInfo
|
||||
318 stub FatalExitHook
|
||||
319 stub FlushCachedFileHandle
|
||||
320 pascal16 IsTask(word) IsTask
|
||||
|
@ -251,16 +252,16 @@ file krnl386.exe
|
|||
326 return IsRomFile 2 0
|
||||
327 stub KERNEL_327
|
||||
328 stub _DebugOutput
|
||||
#329 K329
|
||||
329 pascal16 K329(str word) DebugFillBuffer
|
||||
#332 stub THHOOK
|
||||
334 pascal16 IsBadReadPtr(segptr word) IsBadReadPtr16
|
||||
335 pascal16 IsBadWritePtr(segptr word) IsBadWritePtr16
|
||||
336 pascal16 IsBadCodePtr(segptr) IsBadCodePtr16
|
||||
337 pascal16 IsBadStringPtr(segptr word) IsBadStringPtr16
|
||||
338 stub HasGPHandler
|
||||
339 stub DiagQuery
|
||||
340 stub DiagOutput
|
||||
341 stub ToolHelpHook
|
||||
339 pascal16 DiagQuery() DiagQuery
|
||||
340 pascal16 DiagOutput() DiagOutput
|
||||
341 pascal ToolHelpHook(ptr) ToolHelpHook
|
||||
342 stub __GP
|
||||
343 stub RegisterWinOldApHook
|
||||
344 stub GetWinOldApHooks
|
||||
|
|
|
@ -31,11 +31,11 @@ type win16
|
|||
28 stub DISPGETPARAM
|
||||
29 stub DISPGETIDSOFNAMES
|
||||
30 stub DISPINVOKE
|
||||
31 stub CREATEDISPTYPEINFO
|
||||
31 pascal CreateDispTypeInfo(ptr long ptr) CreateDispTypeInfo
|
||||
32 stub CREATESTDDISPATCH
|
||||
33 stub _IID_IDISPATCH
|
||||
34 stub _IID_IENUMVARIANT
|
||||
35 stub REGISTERACTIVEOBJECT
|
||||
35 pascal RegisterActiveObject(ptr ptr long ptr) RegisterActiveObject
|
||||
36 stub REVOKEACTIVEOBJECT
|
||||
37 stub GETACTIVEOBJECT
|
||||
38 stub SAFEARRAYALLOCDESCRIPTOR
|
||||
|
|
|
@ -34,10 +34,9 @@ BOOL32 RELAY_Init(void)
|
|||
/* Allocate the code selector for CallTo16 routines */
|
||||
|
||||
extern void CALLTO16_Start(), CALLTO16_End();
|
||||
extern void CALLTO16_Ret_word(), CALLTO16_Ret_long(), CALLTO16_Ret_regs();
|
||||
extern void CALLTO16_Ret_word(), CALLTO16_Ret_long();
|
||||
extern DWORD CALLTO16_RetAddr_word;
|
||||
extern DWORD CALLTO16_RetAddr_long;
|
||||
extern DWORD CALLTO16_RetAddr_regs;
|
||||
|
||||
codesel = GLOBAL_CreateBlock( GMEM_FIXED, (void *)CALLTO16_Start,
|
||||
(int)CALLTO16_End - (int)CALLTO16_Start,
|
||||
|
@ -50,8 +49,6 @@ BOOL32 RELAY_Init(void)
|
|||
codesel );
|
||||
CALLTO16_RetAddr_long=MAKELONG( (int)CALLTO16_Ret_long-(int)CALLTO16_Start,
|
||||
codesel );
|
||||
CALLTO16_RetAddr_regs=MAKELONG( (int)CALLTO16_Ret_regs-(int)CALLTO16_Start,
|
||||
codesel );
|
||||
|
||||
/* Create built-in modules */
|
||||
if (!BUILTIN_Init()) return FALSE;
|
||||
|
@ -238,12 +235,15 @@ void RELAY_Unimplemented16(void)
|
|||
*/
|
||||
void RELAY_DebugCallTo16( int* stack, int nb_args )
|
||||
{
|
||||
THDB *thdb;
|
||||
|
||||
if (!debugging_relay) return;
|
||||
thdb = THREAD_Current();
|
||||
|
||||
if (nb_args == -1) /* Register function */
|
||||
{
|
||||
CONTEXT *context = (CONTEXT *)stack[0];
|
||||
WORD *stack16 = (WORD *)CURRENT_STACK16;
|
||||
WORD *stack16 = (WORD *)THREAD_STACK16(thdb);
|
||||
printf( "CallTo16(func=%04lx:%04x,ds=%04lx",
|
||||
CS_reg(context), IP_reg(context), DS_reg(context) );
|
||||
nb_args = stack[1] / sizeof(WORD);
|
||||
|
@ -258,7 +258,7 @@ void RELAY_DebugCallTo16( int* stack, int nb_args )
|
|||
{
|
||||
printf( "CallTo16(func=%04x:%04x,ds=%04x",
|
||||
HIWORD(stack[0]), LOWORD(stack[0]),
|
||||
SELECTOROF(IF1632_Saved16_ss_sp) );
|
||||
SELECTOROF(thdb->cur_stack) );
|
||||
stack++;
|
||||
while (nb_args--) printf( ",0x%04x", *stack++ );
|
||||
printf( ")\n" );
|
||||
|
@ -277,7 +277,6 @@ void WINAPI Catch( CONTEXT *context )
|
|||
VA_LIST16 valist;
|
||||
SEGPTR buf;
|
||||
LPCATCHBUF lpbuf;
|
||||
STACK16FRAME *pFrame = CURRENT_STACK16;
|
||||
|
||||
VA_START16( valist );
|
||||
buf = VA_ARG16( valist, SEGPTR );
|
||||
|
@ -302,13 +301,13 @@ void WINAPI Catch( CONTEXT *context )
|
|||
|
||||
lpbuf[0] = IP_reg(context);
|
||||
lpbuf[1] = CS_reg(context);
|
||||
lpbuf[2] = LOWORD(pFrame->frame32);
|
||||
lpbuf[2] = SP_reg(context);
|
||||
lpbuf[3] = BP_reg(context);
|
||||
lpbuf[4] = SI_reg(context);
|
||||
lpbuf[5] = DI_reg(context);
|
||||
lpbuf[6] = DS_reg(context);
|
||||
lpbuf[7] = OFFSETOF(IF1632_Saved16_ss_sp);
|
||||
lpbuf[8] = HIWORD(pFrame->frame32);
|
||||
lpbuf[7] = 0;
|
||||
lpbuf[8] = SS_reg(context);
|
||||
AX_reg(context) = 0; /* Return 0 */
|
||||
}
|
||||
|
||||
|
@ -325,6 +324,8 @@ void WINAPI Throw( CONTEXT *context )
|
|||
SEGPTR buf;
|
||||
LPCATCHBUF lpbuf;
|
||||
STACK16FRAME *pFrame;
|
||||
STACK32FRAME *frame32;
|
||||
THDB *thdb = THREAD_Current();
|
||||
|
||||
VA_START16( valist );
|
||||
AX_reg(context) = VA_ARG16( valist, WORD ); /* retval */
|
||||
|
@ -332,10 +333,17 @@ void WINAPI Throw( CONTEXT *context )
|
|||
lpbuf = (LPCATCHBUF)PTR_SEG_TO_LIN( buf );
|
||||
VA_END16( valist );
|
||||
|
||||
IF1632_Saved16_ss_sp = MAKELONG( lpbuf[7] - sizeof(WORD),
|
||||
HIWORD(IF1632_Saved16_ss_sp) );
|
||||
pFrame = CURRENT_STACK16;
|
||||
pFrame->frame32 = MAKELONG( lpbuf[2], lpbuf[8] );
|
||||
/* Find the frame32 corresponding to the frame16 we are jumping to */
|
||||
frame32 = THREAD_STACK16( thdb )->frame32;
|
||||
while (frame32 && frame32->frame16)
|
||||
{
|
||||
if (OFFSETOF(frame32->frame16) > lpbuf[2]) break;
|
||||
frame32 = ((STACK16FRAME *)PTR_SEG_TO_LIN(frame32->frame16))->frame32;
|
||||
}
|
||||
|
||||
thdb->cur_stack = PTR_SEG_OFF_TO_SEGPTR( lpbuf[8], lpbuf[2]-sizeof(WORD) );
|
||||
pFrame = THREAD_STACK16( thdb );
|
||||
pFrame->frame32 = frame32;
|
||||
IP_reg(context) = lpbuf[0];
|
||||
CS_reg(context) = lpbuf[1];
|
||||
BP_reg(context) = lpbuf[3];
|
||||
|
@ -373,7 +381,7 @@ static DWORD RELAY_CallProc32W(int Ex)
|
|||
nrofargs = VA_ARG16( valist, DWORD );
|
||||
argconvmask = VA_ARG16( valist, DWORD );
|
||||
proc32 = VA_ARG16( valist, FARPROC32 );
|
||||
fprintf(stderr,"CallProc32W(%ld,%ld,%p, Ex%d args[",nrofargs,argconvmask,proc32,Ex);
|
||||
dprintf_relay(stddeb,"CallProc32W(%ld,%ld,%p, Ex%d args[",nrofargs,argconvmask,proc32,Ex);
|
||||
args = (DWORD*)HEAP_xalloc( GetProcessHeap(), 0,
|
||||
sizeof(DWORD)*nrofargs );
|
||||
for (i=0;i<nrofargs;i++) {
|
||||
|
@ -381,15 +389,15 @@ static DWORD RELAY_CallProc32W(int Ex)
|
|||
{
|
||||
SEGPTR ptr = VA_ARG16( valist, SEGPTR );
|
||||
args[nrofargs-i-1] = (DWORD)PTR_SEG_TO_LIN(ptr);
|
||||
fprintf(stderr,"%08lx(%p),",ptr,PTR_SEG_TO_LIN(ptr));
|
||||
dprintf_relay(stddeb,"%08lx(%p),",ptr,PTR_SEG_TO_LIN(ptr));
|
||||
}
|
||||
else
|
||||
{
|
||||
args[nrofargs-i-1] = VA_ARG16( valist, DWORD );
|
||||
fprintf(stderr,"%ld,",args[nrofargs-i-1]);
|
||||
dprintf_relay(stddeb,"%ld,",args[nrofargs-i-1]);
|
||||
}
|
||||
}
|
||||
fprintf(stderr,"]) - ");
|
||||
dprintf_relay(stddeb,"]) - ");
|
||||
VA_END16( valist );
|
||||
|
||||
switch (nrofargs) {
|
||||
|
@ -424,9 +432,10 @@ static DWORD RELAY_CallProc32W(int Ex)
|
|||
break;
|
||||
}
|
||||
/* POP nrofargs DWORD arguments and 3 DWORD parameters */
|
||||
if (!Ex) STACK16_POP( (3 + nrofargs) * sizeof(DWORD) );
|
||||
if (!Ex) STACK16_POP( THREAD_Current(),
|
||||
(3 + nrofargs) * sizeof(DWORD) );
|
||||
|
||||
fprintf(stderr,"returns %08lx\n",ret);
|
||||
dprintf_relay(stddeb,"returns %08lx\n",ret);
|
||||
HeapFree( GetProcessHeap(), 0, args );
|
||||
return ret;
|
||||
}
|
||||
|
|
150
if1632/thunk.c
150
if1632/thunk.c
|
@ -29,35 +29,73 @@
|
|||
extern LONG CALLBACK CallTo16_sreg_(const CONTEXT *context, INT32 offset);
|
||||
extern LONG CALLBACK CallTo16_lreg_(const CONTEXT *context, INT32 offset);
|
||||
extern WORD CALLBACK CallTo16_word_ (FARPROC16);
|
||||
extern LONG CALLBACK CallTo16_long_ (FARPROC16);
|
||||
extern WORD CALLBACK CallTo16_word_w (FARPROC16,WORD);
|
||||
extern LONG CALLBACK CallTo16_long_l (FARPROC16,LONG);
|
||||
extern WORD CALLBACK CallTo16_word_ww (FARPROC16,WORD,WORD);
|
||||
extern WORD CALLBACK CallTo16_word_wl (FARPROC16,WORD,LONG);
|
||||
extern WORD CALLBACK CallTo16_word_ll (FARPROC16,LONG,LONG);
|
||||
extern LONG CALLBACK CallTo16_long_ll (FARPROC16,LONG,LONG);
|
||||
extern WORD CALLBACK CallTo16_word_www (FARPROC16,WORD,WORD,WORD);
|
||||
extern WORD CALLBACK CallTo16_word_wwl (FARPROC16,WORD,WORD,LONG);
|
||||
extern WORD CALLBACK CallTo16_word_wlw (FARPROC16,WORD,LONG,WORD);
|
||||
extern LONG CALLBACK CallTo16_long_wwl (FARPROC16,WORD,WORD,LONG);
|
||||
extern LONG CALLBACK CallTo16_long_lll (FARPROC16,LONG,LONG,LONG);
|
||||
extern WORD CALLBACK CallTo16_word_llwl (FARPROC16,LONG,LONG,WORD,LONG);
|
||||
extern WORD CALLBACK CallTo16_word_lwll (FARPROC16,LONG,WORD,LONG,LONG);
|
||||
extern WORD CALLBACK CallTo16_word_lwww (FARPROC16,LONG,WORD,WORD,WORD);
|
||||
extern WORD CALLBACK CallTo16_word_wwll (FARPROC16,WORD,WORD,LONG,LONG);
|
||||
extern WORD CALLBACK CallTo16_word_llll (FARPROC16,LONG,LONG,LONG,LONG);
|
||||
extern LONG CALLBACK CallTo16_long_llll (FARPROC16,LONG,LONG,LONG,LONG);
|
||||
extern WORD CALLBACK CallTo16_word_wllwl(FARPROC16,WORD,LONG,LONG,WORD,LONG);
|
||||
extern LONG CALLBACK CallTo16_long_lwwll(FARPROC16,LONG,WORD,WORD,LONG,LONG);
|
||||
extern WORD CALLBACK CallTo16_word_wwlll(FARPROC16,WORD,WORD,LONG,LONG,LONG);
|
||||
extern WORD CALLBACK CallTo16_word_wwwww(FARPROC16,WORD,WORD,WORD,WORD,WORD);
|
||||
extern WORD CALLBACK CallTo16_word_lwlll(FARPROC16,LONG,WORD,LONG,LONG,LONG);
|
||||
extern WORD CALLBACK CallTo16_word_llll (FARPROC16,LONG,LONG,LONG,LONG);
|
||||
extern LONG CALLBACK CallTo16_long_lwlll(FARPROC16,LONG,WORD,LONG,LONG,LONG);
|
||||
extern LONG CALLBACK CallTo16_long_lllll(FARPROC16,LONG,LONG,LONG,LONG,LONG);
|
||||
extern LONG CALLBACK CallTo16_long_llllll(FARPROC16,LONG,LONG,LONG,LONG,LONG,
|
||||
LONG);
|
||||
extern LONG CALLBACK CallTo16_long_lllllll(FARPROC16,LONG,LONG,LONG,LONG,LONG,
|
||||
LONG,LONG);
|
||||
extern WORD CALLBACK CallTo16_word_llwwlll(FARPROC16,LONG,LONG,WORD,WORD,LONG,
|
||||
LONG,LONG);
|
||||
extern LONG CALLBACK CallTo16_word_lwwlllll(FARPROC16,LONG,WORD,WORD,LONG,LONG,
|
||||
LONG,LONG,WORD);
|
||||
LONG,LONG,LONG);
|
||||
extern LONG CALLBACK CallTo16_long_llllllll(FARPROC16,LONG,LONG,LONG,LONG,LONG,
|
||||
LONG,LONG,LONG);
|
||||
extern LONG CALLBACK CallTo16_long_lllllllll(FARPROC16,LONG,LONG,LONG,LONG,
|
||||
LONG,LONG,LONG,LONG,LONG);
|
||||
extern LONG CALLBACK CallTo16_long_llllllllll(FARPROC16,LONG,LONG,LONG,LONG,
|
||||
LONG,LONG,LONG,LONG,LONG,LONG);
|
||||
extern LONG CALLBACK CallTo16_long_lllllllllll(FARPROC16,LONG,LONG,LONG,LONG,
|
||||
LONG,LONG,LONG,LONG,LONG,LONG,
|
||||
LONG);
|
||||
extern LONG CALLBACK CallTo16_long_llllllllllll(FARPROC16,LONG,LONG,LONG,LONG,
|
||||
LONG,LONG,LONG,LONG,LONG,LONG,
|
||||
LONG,LONG);
|
||||
extern LONG CALLBACK CallTo16_long_lwwllwlllllw(FARPROC16,LONG,WORD,WORD,LONG,
|
||||
LONG,WORD,LONG,LONG,LONG,LONG,
|
||||
LONG,WORD);
|
||||
extern LONG CALLBACK CallTo16_long_lllllllllllll(FARPROC16,LONG,LONG,LONG,LONG,
|
||||
LONG,LONG,LONG,LONG,LONG,LONG,
|
||||
LONG,LONG,LONG);
|
||||
extern LONG CALLBACK CallTo16_long_llllllllllllll(FARPROC16,LONG,LONG,LONG,
|
||||
LONG,LONG,LONG,LONG,LONG,
|
||||
LONG,LONG,LONG,LONG,LONG,
|
||||
LONG);
|
||||
extern LONG CALLBACK CallTo16_word_lwwwwlwwwwllll(FARPROC16,LONG,WORD,WORD,
|
||||
WORD,WORD,LONG,WORD,WORD,
|
||||
WORD,WORD,LONG,LONG,LONG,
|
||||
LONG);
|
||||
extern LONG CALLBACK CallTo16_long_lllllllllllllll(FARPROC16,LONG,LONG,LONG,
|
||||
LONG,LONG,LONG,LONG,LONG,
|
||||
LONG,LONG,LONG,LONG,LONG,
|
||||
LONG,LONG);
|
||||
extern LONG CALLBACK CallTo16_long_llllllllllllllll(FARPROC16,LONG,LONG,LONG,
|
||||
LONG,LONG,LONG,LONG,LONG,
|
||||
LONG,LONG,LONG,LONG,LONG,
|
||||
LONG,LONG,LONG);
|
||||
/* ### stop build ### */
|
||||
|
||||
|
||||
|
@ -89,6 +127,8 @@ static LRESULT WINAPI THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd,
|
|||
UINT16 msg, WPARAM16 wParam,
|
||||
LPARAM lParam );
|
||||
static void WINAPI THUNK_CallTaskReschedule(void);
|
||||
static BOOL32 WINAPI THUNK_WOWCallback16Ex( FARPROC16,DWORD,DWORD,
|
||||
LPVOID,LPDWORD );
|
||||
|
||||
/* TASK_Reschedule() 16-bit entry point */
|
||||
static FARPROC16 TASK_RescheduleProc;
|
||||
|
@ -112,6 +152,7 @@ static const CALLBACKS_TABLE CALLBACK_EmulatorTable =
|
|||
(void *)CallTo16_word_www, /* CallLoadAppSegProc */
|
||||
(void *)CallTo16_word_, /* CallSystemTimerProc */
|
||||
(void *)CallTo16_long_l, /* CallWOWCallbackProc */
|
||||
THUNK_WOWCallback16Ex, /* CallWOWCallback16Ex */
|
||||
(void *)CallTo16_long_l, /* CallASPIPostProc */
|
||||
(void *)CallTo16_word_lwll, /* CallDrvControlProc */
|
||||
(void *)CallTo16_word_lwlll, /* CallDrvEnableProc */
|
||||
|
@ -120,7 +161,8 @@ static const CALLBACKS_TABLE CALLBACK_EmulatorTable =
|
|||
(void *)CallTo16_word_lwwlllll, /* CallDrvOutputProc */
|
||||
(void *)CallTo16_long_lwlll, /* CallDrvRealizeProc */
|
||||
(void *)CallTo16_word_lwwwwlwwwwllll, /* CallDrvStretchBltProc */
|
||||
(void *)CallTo16_long_lwwllwlllllw /* CallDrvExtTextOutProc */
|
||||
(void *)CallTo16_long_lwwllwlllllw, /* CallDrvExtTextOutProc */
|
||||
(void *)CallTo16_word_llwwlll /* CallDrvGetCharWidth */
|
||||
};
|
||||
|
||||
|
||||
|
@ -203,15 +245,16 @@ static LRESULT WINAPI THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd,
|
|||
WORD *args;
|
||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||
DWORD offset = 0;
|
||||
THDB *thdb = THREAD_Current();
|
||||
|
||||
/* Window procedures want ax = hInstance, ds = es = ss */
|
||||
|
||||
DS_reg(&context) = SELECTOROF(IF1632_Saved16_ss_sp);
|
||||
DS_reg(&context) = SELECTOROF(thdb->cur_stack);
|
||||
ES_reg(&context) = DS_reg(&context);
|
||||
EAX_reg(&context) = wndPtr ? wndPtr->hInstance : DS_reg(&context);
|
||||
CS_reg(&context) = SELECTOROF(proc);
|
||||
EIP_reg(&context) = OFFSETOF(proc);
|
||||
EBP_reg(&context) = OFFSETOF(IF1632_Saved16_ss_sp)
|
||||
EBP_reg(&context) = OFFSETOF(thdb->cur_stack)
|
||||
+ (WORD)&((STACK16FRAME*)0)->bp;
|
||||
|
||||
if (lParam)
|
||||
|
@ -235,12 +278,12 @@ static LRESULT WINAPI THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd,
|
|||
if (offset)
|
||||
{
|
||||
void *s = PTR_SEG_TO_LIN(lParam);
|
||||
lParam = STACK16_PUSH( offset );
|
||||
lParam = STACK16_PUSH( thdb, offset );
|
||||
memcpy( PTR_SEG_TO_LIN(lParam), s, offset );
|
||||
}
|
||||
}
|
||||
|
||||
args = (WORD *)CURRENT_STACK16 - 5;
|
||||
args = (WORD *)THREAD_STACK16(thdb) - 5;
|
||||
args[0] = LOWORD(lParam);
|
||||
args[1] = HIWORD(lParam);
|
||||
args[2] = wParam;
|
||||
|
@ -248,7 +291,7 @@ static LRESULT WINAPI THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd,
|
|||
args[4] = hwnd;
|
||||
|
||||
ret = CallTo16_sreg_( &context, 5 * sizeof(WORD) );
|
||||
if (offset) STACK16_POP(offset);
|
||||
if (offset) STACK16_POP( thdb, offset );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -573,3 +616,94 @@ FARPROC16 WINAPI THUNK_SetResourceHandler( HMODULE16 hModule, SEGPTR typeId, FAR
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* THUNK_WOWCallback16Ex (WOW32.3)(KERNEL32.55)
|
||||
*/
|
||||
static BOOL32 WINAPI THUNK_WOWCallback16Ex(
|
||||
FARPROC16 proc,DWORD dwFlags,DWORD cbArgs,LPVOID xargs,LPDWORD pdwret
|
||||
) {
|
||||
LPDWORD args = (LPDWORD)xargs;
|
||||
DWORD ret,i;
|
||||
|
||||
dprintf_relay(stddeb,"WOWCallback16Ex(%p,0x%08lx,%ld,%p,%p)\n",
|
||||
proc,dwFlags,cbArgs,xargs,pdwret
|
||||
);
|
||||
if (dwFlags == WCB16_CDECL) {
|
||||
/* swap the arguments */
|
||||
args = HeapAlloc(GetProcessHeap(),0,cbArgs*sizeof(DWORD));
|
||||
for (i=0;i<cbArgs;i++)
|
||||
args[i] = ((DWORD*)xargs)[cbArgs-i-1];
|
||||
}
|
||||
switch (cbArgs) {
|
||||
case 0: ret = CallTo16_long_(proc);break;
|
||||
case 1: ret = CallTo16_long_l(proc,args[0]);break;
|
||||
case 2: ret = CallTo16_long_ll(proc,args[0],args[1]);break;
|
||||
case 3: ret = CallTo16_long_lll(proc,args[0],args[1],args[2]);break;
|
||||
case 4: ret = CallTo16_long_llll(proc,args[0],args[1],args[2],args[3]);
|
||||
break;
|
||||
case 5: ret = CallTo16_long_lllll(proc,args[0],args[1],args[2],args[3],
|
||||
args[4]
|
||||
);
|
||||
break;
|
||||
case 6: ret = CallTo16_long_llllll(proc,args[0],args[1],args[2],args[3],
|
||||
args[4],args[5]
|
||||
);
|
||||
break;
|
||||
case 7: ret = CallTo16_long_lllllll(proc,args[0],args[1],args[2],args[3],
|
||||
args[4],args[5],args[6]
|
||||
);
|
||||
break;
|
||||
case 8: ret = CallTo16_long_llllllll(proc,args[0],args[1],args[2],args[3],
|
||||
args[4],args[5],args[6],args[7]
|
||||
);
|
||||
break;
|
||||
case 9: ret = CallTo16_long_lllllllll(proc,args[0],args[1],args[2],args[3],
|
||||
args[4],args[5],args[6],args[7],args[8]
|
||||
);
|
||||
break;
|
||||
case 10:ret = CallTo16_long_llllllllll(proc,args[0],args[1],args[2],args[3],
|
||||
args[4],args[5],args[6],args[7],args[8],args[9]
|
||||
);
|
||||
break;
|
||||
case 11:ret = CallTo16_long_lllllllllll(proc,args[0],args[1],args[2],
|
||||
args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10]
|
||||
);
|
||||
break;
|
||||
case 12:ret = CallTo16_long_llllllllllll(proc,args[0],args[1],args[2],
|
||||
args[3],args[4],args[5],args[6],args[7],args[8],args[9],
|
||||
args[10],args[11]
|
||||
);
|
||||
break;
|
||||
case 13:ret = CallTo16_long_lllllllllllll(proc,args[0],args[1],args[2],
|
||||
args[3],args[4],args[5],args[6],args[7],args[8],args[9],
|
||||
args[10],args[11],args[12]
|
||||
);
|
||||
break;
|
||||
case 14:ret = CallTo16_long_llllllllllllll(proc,args[0],args[1],args[2],
|
||||
args[3],args[4],args[5],args[6],args[7],args[8],args[9],
|
||||
args[10],args[11],args[12],args[13]
|
||||
);
|
||||
break;
|
||||
case 15:ret = CallTo16_long_lllllllllllllll(proc,args[0],args[1],args[2],
|
||||
args[3],args[4],args[5],args[6],args[7],args[8],args[9],
|
||||
args[10],args[11],args[12],args[13],args[14]
|
||||
);
|
||||
break;
|
||||
case 16:ret = CallTo16_long_llllllllllllllll(proc,args[0],args[1],args[2],
|
||||
args[3],args[4],args[5],args[6],args[7],args[8],args[9],
|
||||
args[10],args[11],args[12],args[13],args[14],args[15]
|
||||
);
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"CALLBACK_CallWOWCallback16Ex(), %ld arguments not supported.!n",cbArgs);
|
||||
if (dwFlags == WCB16_CDECL)
|
||||
HeapFree(GetProcessHeap(),0,args);
|
||||
return FALSE;
|
||||
}
|
||||
if (dwFlags == WCB16_CDECL)
|
||||
HeapFree(GetProcessHeap(),0,args);
|
||||
if (pdwret)
|
||||
*pdwret = ret;
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -306,15 +306,25 @@ file user.exe
|
|||
#306 BEAR306
|
||||
308 pascal DefDlgProc(word word word long) DefDlgProc16
|
||||
309 pascal16 GetClipCursor(ptr) GetClipCursor16
|
||||
#310 ContScroll
|
||||
#312 SendMessage2
|
||||
#313 PostMessage2
|
||||
314 pascal16 SignalProc(word word word word word) USER_SignalProc
|
||||
#315 XCStoDS
|
||||
#316 CompUpdateRect
|
||||
#317 CompUpdateRgn
|
||||
#318 GetWC2
|
||||
319 pascal16 ScrollWindowEx(word s_word s_word ptr ptr word ptr word) ScrollWindowEx16
|
||||
320 stub SysErrorBox
|
||||
321 stub SetEventHook
|
||||
321 pascal SetEventHook(segptr) SetEventHook
|
||||
322 stub WinOldAppHackOMatic
|
||||
323 stub GetMessage2
|
||||
324 pascal16 FillWindow(word word word word) FillWindow
|
||||
325 pascal16 PaintRect(word word word word ptr) PaintRect
|
||||
326 pascal16 GetControlBrush(word word word) GetControlBrush
|
||||
#327 KillTimer2
|
||||
#328 SetTimer2
|
||||
#330 SetGetKbdState
|
||||
331 pascal16 EnableHardwareInput(word) EnableHardwareInput
|
||||
332 pascal16 UserYield() UserYield
|
||||
333 pascal16 IsUserIdle() IsUserIdle
|
||||
|
@ -322,8 +332,11 @@ file user.exe
|
|||
335 pascal16 GetInputState() GetInputState16
|
||||
336 pascal16 LoadCursorIconHandler(word word word) LoadCursorIconHandler
|
||||
337 pascal GetMouseEventProc() GetMouseEventProc
|
||||
#340 WinFarFrame
|
||||
#341 _FFFE_FARFRAME
|
||||
343 stub GetFilePortName
|
||||
#354 TabTheTextOutForWimps
|
||||
#355 BroadcastMessage
|
||||
356 pascal16 LoadDIBCursorHandler(word word word) LoadDIBCursorHandler
|
||||
357 pascal16 LoadDIBIconHandler(word word word) LoadDIBIconHandler
|
||||
358 pascal16 IsMenu(word) IsMenu16
|
||||
|
|
|
@ -43,7 +43,7 @@ type win16
|
|||
40 stub RMEMCPY
|
||||
41 stub INITRESLOADER
|
||||
42 stub FREESELECTOROFFSET
|
||||
43 stub STACKLINEARTOSEGMENTED
|
||||
43 pascal StackLinearToSegmented(word word) StackLinearToSegmented
|
||||
44 stub GETMODULEFILENAME32S
|
||||
45 stub FAPILOG16
|
||||
46 stub ALLOCCALLBACK
|
||||
|
@ -56,3 +56,4 @@ type win16
|
|||
53 stub FINDGLOBALHANDLE
|
||||
|
||||
#54-289 exist, but function names blanked out
|
||||
143 equate win32s16_143 0x100
|
||||
|
|
|
@ -3,5 +3,6 @@ type win16
|
|||
|
||||
1 pascal16 GetASPISupportInfo() GetASPISupportInfo16
|
||||
2 pascal16 SendASPICommand(segptr) SendASPICommand16
|
||||
#3 stub GETASPIDLLVERSION
|
||||
#3 stub INSERTINASPICHAIN
|
||||
3 stub INSERTINASPICHAIN
|
||||
4 pascal GETASPIDLLVERSION() GetASPIDLLVersion
|
||||
5 stub ___EXPORTEDSTUB
|
||||
|
|
|
@ -3,4 +3,4 @@ type win16
|
|||
|
||||
1 stub WINDEBUG
|
||||
2 stub WEP
|
||||
3 pascal WinNotify() WinNotify
|
||||
3 register WinNotify() WinNotify
|
||||
|
|
|
@ -48,7 +48,7 @@ type win16
|
|||
129 register INT_Int1dHandler(word) BUILTIN_DefaultIntHandler
|
||||
130 register INT_Int1eHandler(word) BUILTIN_DefaultIntHandler
|
||||
131 register INT_Int1fHandler(word) BUILTIN_DefaultIntHandler
|
||||
132 register INT_Int20Handler(word) BUILTIN_DefaultIntHandler
|
||||
132 register INT_Int20Handler(word) INT_Int20Handler
|
||||
133 register INT_Int21Handler(word) DOS3Call
|
||||
134 register INT_Int22Handler(word) BUILTIN_DefaultIntHandler
|
||||
135 register INT_Int23Handler(word) BUILTIN_DefaultIntHandler
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#ifdef PRELIMINARY_WING16_SUPPORT
|
||||
/* FIXME: this doesn't belong here */
|
||||
#include <X11/extensions/XShm.h>
|
||||
#include "ts_xshm.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -38,12 +38,13 @@ extern GC BITMAP_monoGC, BITMAP_colorGC;
|
|||
(((bmp)->bitmap.bmBitsPixel == 1) ? BITMAP_monoGC : BITMAP_colorGC)
|
||||
|
||||
#define BITMAP_WIDTH_BYTES(width,bpp) \
|
||||
(((bpp) == 24) ? (width) * 4 : ((width) * (bpp) + 15) / 16 * 2)
|
||||
(((bpp) == 24) ? (width) * 4 : ( ((bpp) == 15) ? (width) * 2 : \
|
||||
((width) * (bpp) + 15) / 16 * 2 ))
|
||||
|
||||
#define XCREATEIMAGE(image,width,height,bpp) \
|
||||
{ \
|
||||
int width_bytes = DIB_GetXImageWidthBytes( (width), (bpp) ); \
|
||||
(image) = XCreateImage(display, DefaultVisualOfScreen(screen), \
|
||||
(image) = TSXCreateImage(display, DefaultVisualOfScreen(screen), \
|
||||
(bpp), ZPixmap, 0, xmalloc( (height)*width_bytes ),\
|
||||
(width), (height), 32, width_bytes ); \
|
||||
}
|
||||
|
|
|
@ -38,6 +38,8 @@ typedef struct
|
|||
WORD (CALLBACK *CallLoadAppSegProc)( FARPROC16, HANDLE16, HFILE16, WORD );
|
||||
VOID (CALLBACK *CallSystemTimerProc)( FARPROC16 );
|
||||
DWORD (CALLBACK *CallWOWCallbackProc)( FARPROC16, DWORD );
|
||||
BOOL32 (CALLBACK *CallWOWCallback16Ex)( FARPROC16, DWORD, DWORD, LPVOID,
|
||||
LPDWORD );
|
||||
LRESULT (CALLBACK *CallASPIPostProc)( FARPROC16, SEGPTR );
|
||||
/* Following are the graphics driver callbacks */
|
||||
WORD (CALLBACK *CallDrvControlProc)( FARPROC16, SEGPTR, WORD,
|
||||
|
@ -60,6 +62,8 @@ typedef struct
|
|||
SEGPTR, SEGPTR, INT16, SEGPTR,
|
||||
SEGPTR, SEGPTR, SEGPTR, SEGPTR,
|
||||
WORD );
|
||||
WORD (CALLBACK *CallDrvGetCharWidthProc)( FARPROC16, SEGPTR, SEGPTR, WORD,
|
||||
WORD, SEGPTR, SEGPTR, SEGPTR );
|
||||
} CALLBACKS_TABLE;
|
||||
|
||||
extern const CALLBACKS_TABLE *Callbacks;
|
||||
|
|
|
@ -29,6 +29,14 @@ extern "C" {
|
|||
#define OFN_NOREADONLYRETURN 0x00008000
|
||||
#define OFN_NOTESTFILECREATE 0x00010000
|
||||
|
||||
/* OFN_? 0x00020000 */
|
||||
|
||||
#define OFN_NOLONGNAMES 0x00040000
|
||||
#define OFN_EXPLORER 0x00080000
|
||||
#define OFN_NODEREFERENCELINKS 0x00100000
|
||||
#define OFN_LONGNAMES 0x00200000
|
||||
|
||||
/* WINE internal flags */
|
||||
#define OFN_UNICODE 0x40000000 /*to differ between 32W/A hook*/
|
||||
#define OFN_WINE32 0x80000000 /* comdlg32 */
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ struct tagGUID
|
|||
BYTE Data4[8];
|
||||
};
|
||||
|
||||
typedef struct tagGUID GUID,*LPGUID;
|
||||
typedef struct tagGUID GUID,*LPGUID,*REFGUID;
|
||||
typedef struct tagGUID CLSID,*LPCLSID,*REFCLSID;
|
||||
typedef struct tagGUID IID,*REFIID,*LPIID;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef __WINE_CURSORICON_H
|
||||
#define __WINE_CURSORICON_H
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include "ts_xlib.h"
|
||||
#include "windows.h"
|
||||
|
||||
#pragma pack(1)
|
||||
|
|
|
@ -0,0 +1,418 @@
|
|||
#ifndef _WINE_D3D_H
|
||||
#define _WINE_D3D_H
|
||||
|
||||
typedef LPVOID LPDIRECT3DMATERIAL,LPDIRECT3DVIEWPORT;
|
||||
typedef LPVOID LPDIRECT3DMATERIAL2,LPDIRECT3DVIEWPORT2;
|
||||
typedef LPVOID LPDIRECT3DDEVICE2;
|
||||
|
||||
DEFINE_GUID(IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
|
||||
DEFINE_GUID(IID_IDirect3D2, 0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
|
||||
|
||||
DEFINE_GUID(IID_IDirect3DRampDevice, 0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
|
||||
DEFINE_GUID(IID_IDirect3DRGBDevice, 0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
|
||||
DEFINE_GUID(IID_IDirect3DHALDevice, 0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
|
||||
DEFINE_GUID(IID_IDirect3DMMXDevice, 0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
|
||||
|
||||
DEFINE_GUID(IID_IDirect3DDevice, 0x64108800,0x957d,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29 );
|
||||
DEFINE_GUID(IID_IDirect3DDevice2, 0x93281501,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
|
||||
DEFINE_GUID(IID_IDirect3DTexture, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
|
||||
DEFINE_GUID(IID_IDirect3DTexture2, 0x93281502,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
|
||||
DEFINE_GUID(IID_IDirect3DLight, 0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
|
||||
DEFINE_GUID(IID_IDirect3DMaterial, 0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
|
||||
DEFINE_GUID(IID_IDirect3DMaterial2, 0x93281503,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
|
||||
DEFINE_GUID(IID_IDirect3DExecuteBuffer, 0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
|
||||
DEFINE_GUID(IID_IDirect3DViewport, 0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
|
||||
DEFINE_GUID(IID_IDirect3DViewport2, 0x93281500,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
|
||||
|
||||
typedef struct IDirect3D IDirect3D ,*LPDIRECT3D ;
|
||||
typedef struct IDirect3D2 IDirect3D2,*LPDIRECT3D2;
|
||||
typedef struct IDirect3DLight IDirect3DLight,*LPDIRECT3DLIGHT;
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
DWORD dwCaps;
|
||||
} D3DTRANSFORMCAPS,*LPD3DTRANSFORMCAPS;
|
||||
|
||||
#define D3DTRANSFORMCAPS_CLIP 0x00000001
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
DWORD dwCaps;
|
||||
DWORD dwLightingModel;
|
||||
DWORD dwNumLights;
|
||||
} D3DLIGHTINGCAPS, *LPD3DLIGHTINGCAPS;
|
||||
|
||||
#define D3DLIGHTINGMODEL_RGB 0x00000001
|
||||
#define D3DLIGHTINGMODEL_MONO 0x00000002
|
||||
|
||||
#define D3DLIGHTCAPS_POINT 0x00000001
|
||||
#define D3DLIGHTCAPS_SPOT 0x00000002
|
||||
#define D3DLIGHTCAPS_DIRECTIONAL 0x00000004
|
||||
#define D3DLIGHTCAPS_PARALLELPOINT 0x00000008
|
||||
|
||||
|
||||
#define D3DCOLOR_MONO 1
|
||||
#define D3DCOLOR_RGB 2
|
||||
|
||||
typedef DWORD D3DCOLORMODEL;
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
DWORD dwMiscCaps; /* Capability flags */
|
||||
DWORD dwRasterCaps;
|
||||
DWORD dwZCmpCaps;
|
||||
DWORD dwSrcBlendCaps;
|
||||
DWORD dwDestBlendCaps;
|
||||
DWORD dwAlphaCmpCaps;
|
||||
DWORD dwShadeCaps;
|
||||
DWORD dwTextureCaps;
|
||||
DWORD dwTextureFilterCaps;
|
||||
DWORD dwTextureBlendCaps;
|
||||
DWORD dwTextureAddressCaps;
|
||||
DWORD dwStippleWidth; /* maximum width and height of */
|
||||
DWORD dwStippleHeight; /* of supported stipple (up to 32x32) */
|
||||
} D3DPRIMCAPS, *LPD3DPRIMCAPS;
|
||||
|
||||
/* D3DPRIMCAPS.dwMiscCaps */
|
||||
#define D3DPMISCCAPS_MASKPLANES 0x00000001
|
||||
#define D3DPMISCCAPS_MASKZ 0x00000002
|
||||
#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004
|
||||
#define D3DPMISCCAPS_CONFORMANT 0x00000008
|
||||
#define D3DPMISCCAPS_CULLNONE 0x00000010
|
||||
#define D3DPMISCCAPS_CULLCW 0x00000020
|
||||
#define D3DPMISCCAPS_CULLCCW 0x00000040
|
||||
|
||||
/* D3DPRIMCAPS.dwRasterCaps */
|
||||
#define D3DPRASTERCAPS_DITHER 0x00000001
|
||||
#define D3DPRASTERCAPS_ROP2 0x00000002
|
||||
#define D3DPRASTERCAPS_XOR 0x00000004
|
||||
#define D3DPRASTERCAPS_PAT 0x00000008
|
||||
#define D3DPRASTERCAPS_ZTEST 0x00000010
|
||||
#define D3DPRASTERCAPS_SUBPIXEL 0x00000020
|
||||
#define D3DPRASTERCAPS_SUBPIXELX 0x00000040
|
||||
#define D3DPRASTERCAPS_FOGVERTEX 0x00000080
|
||||
#define D3DPRASTERCAPS_FOGTABLE 0x00000100
|
||||
#define D3DPRASTERCAPS_STIPPLE 0x00000200
|
||||
#define D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400
|
||||
#define D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800
|
||||
#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000
|
||||
#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000
|
||||
#define D3DPRASTERCAPS_ZBIAS 0x00004000
|
||||
#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000
|
||||
#define D3DPRASTERCAPS_FOGRANGE 0x00010000
|
||||
#define D3DPRASTERCAPS_ANISOTROPY 0x00020000
|
||||
|
||||
/* D3DPRIMCAPS.dwZCmpCaps and dwAlphaCmpCaps */
|
||||
#define D3DPCMPCAPS_NEVER 0x00000001
|
||||
#define D3DPCMPCAPS_LESS 0x00000002
|
||||
#define D3DPCMPCAPS_EQUAL 0x00000004
|
||||
#define D3DPCMPCAPS_LESSEQUAL 0x00000008
|
||||
#define D3DPCMPCAPS_GREATER 0x00000010
|
||||
#define D3DPCMPCAPS_NOTEQUAL 0x00000020
|
||||
#define D3DPCMPCAPS_GREATEREQUAL 0x00000040
|
||||
#define D3DPCMPCAPS_ALWAYS 0x00000080
|
||||
|
||||
/* D3DPRIMCAPS.dwSourceBlendCaps, dwDestBlendCaps */
|
||||
#define D3DPBLENDCAPS_ZERO 0x00000001
|
||||
#define D3DPBLENDCAPS_ONE 0x00000002
|
||||
#define D3DPBLENDCAPS_SRCCOLOR 0x00000004
|
||||
#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008
|
||||
#define D3DPBLENDCAPS_SRCALPHA 0x00000010
|
||||
#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020
|
||||
#define D3DPBLENDCAPS_DESTALPHA 0x00000040
|
||||
#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080
|
||||
#define D3DPBLENDCAPS_DESTCOLOR 0x00000100
|
||||
#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200
|
||||
#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400
|
||||
#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800
|
||||
#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000
|
||||
|
||||
/* D3DPRIMCAPS.dwShadeCaps */
|
||||
#define D3DPSHADECAPS_COLORFLATMONO 0x00000001
|
||||
#define D3DPSHADECAPS_COLORFLATRGB 0x00000002
|
||||
#define D3DPSHADECAPS_COLORGOURAUDMONO 0x00000004
|
||||
#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008
|
||||
#define D3DPSHADECAPS_COLORPHONGMONO 0x00000010
|
||||
#define D3DPSHADECAPS_COLORPHONGRGB 0x00000020
|
||||
|
||||
#define D3DPSHADECAPS_SPECULARFLATMONO 0x00000040
|
||||
#define D3DPSHADECAPS_SPECULARFLATRGB 0x00000080
|
||||
#define D3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100
|
||||
#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200
|
||||
#define D3DPSHADECAPS_SPECULARPHONGMONO 0x00000400
|
||||
#define D3DPSHADECAPS_SPECULARPHONGRGB 0x00000800
|
||||
|
||||
#define D3DPSHADECAPS_ALPHAFLATBLEND 0x00001000
|
||||
#define D3DPSHADECAPS_ALPHAFLATSTIPPLED 0x00002000
|
||||
#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000
|
||||
#define D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000
|
||||
#define D3DPSHADECAPS_ALPHAPHONGBLEND 0x00010000
|
||||
#define D3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x00020000
|
||||
|
||||
#define D3DPSHADECAPS_FOGFLAT 0x00040000
|
||||
#define D3DPSHADECAPS_FOGGOURAUD 0x00080000
|
||||
#define D3DPSHADECAPS_FOGPHONG 0x00100000
|
||||
|
||||
/* D3DPRIMCAPS.dwTextureCaps */
|
||||
#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001
|
||||
#define D3DPTEXTURECAPS_POW2 0x00000002
|
||||
#define D3DPTEXTURECAPS_ALPHA 0x00000004
|
||||
#define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008
|
||||
#define D3DPTEXTURECAPS_BORDER 0x00000010
|
||||
#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020
|
||||
|
||||
/* D3DPRIMCAPS.dwTextureFilterCaps */
|
||||
#define D3DPTFILTERCAPS_NEAREST 0x00000001
|
||||
#define D3DPTFILTERCAPS_LINEAR 0x00000002
|
||||
#define D3DPTFILTERCAPS_MIPNEAREST 0x00000004
|
||||
#define D3DPTFILTERCAPS_MIPLINEAR 0x00000008
|
||||
#define D3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010
|
||||
#define D3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020
|
||||
|
||||
/* D3DPRIMCAPS.dwTextureBlendCaps */
|
||||
#define D3DPTBLENDCAPS_DECAL 0x00000001
|
||||
#define D3DPTBLENDCAPS_MODULATE 0x00000002
|
||||
#define D3DPTBLENDCAPS_DECALALPHA 0x00000004
|
||||
#define D3DPTBLENDCAPS_MODULATEALPHA 0x00000008
|
||||
#define D3DPTBLENDCAPS_DECALMASK 0x00000010
|
||||
#define D3DPTBLENDCAPS_MODULATEMASK 0x00000020
|
||||
#define D3DPTBLENDCAPS_COPY 0x00000040
|
||||
#define D3DPTBLENDCAPS_ADD 0x00000080
|
||||
|
||||
/* D3DPRIMCAPS.dwTextureAddressCaps */
|
||||
#define D3DPTADDRESSCAPS_WRAP 0x00000001
|
||||
#define D3DPTADDRESSCAPS_MIRROR 0x00000002
|
||||
#define D3DPTADDRESSCAPS_CLAMP 0x00000004
|
||||
#define D3DPTADDRESSCAPS_BORDER 0x00000008
|
||||
#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010
|
||||
|
||||
|
||||
/* D3DDEVICEDESC.dwFlags */
|
||||
#define D3DDD_COLORMODEL 0x00000001
|
||||
#define D3DDD_DEVCAPS 0x00000002
|
||||
#define D3DDD_TRANSFORMCAPS 0x00000004
|
||||
#define D3DDD_LIGHTINGCAPS 0x00000008
|
||||
#define D3DDD_BCLIPPING 0x00000010
|
||||
#define D3DDD_LINECAPS 0x00000020
|
||||
#define D3DDD_TRICAPS 0x00000040
|
||||
#define D3DDD_DEVICERENDERBITDEPTH 0x00000080
|
||||
#define D3DDD_DEVICEZBUFFERBITDEPTH 0x00000100
|
||||
#define D3DDD_MAXBUFFERSIZE 0x00000200
|
||||
#define D3DDD_MAXVERTEXCOUNT 0x00000400
|
||||
|
||||
/* D3DDEVICEDESC.dwDevCaps */
|
||||
#define D3DDEVCAPS_SORTINCREASINGZ 0x00000002
|
||||
#define D3DDEVCAPS_SORTDECREASINGZ 0X00000004
|
||||
#define D3DDEVCAPS_SORTEXACT 0x00000008
|
||||
#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010
|
||||
#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020
|
||||
#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040
|
||||
#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080
|
||||
#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100
|
||||
#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200
|
||||
#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400
|
||||
#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800
|
||||
#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000
|
||||
|
||||
typedef struct _D3DDeviceDesc {
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
D3DCOLORMODEL dcmColorModel;
|
||||
DWORD dwDevCaps;
|
||||
D3DTRANSFORMCAPS dtcTransformCaps;
|
||||
BOOL32 bClipping;
|
||||
D3DLIGHTINGCAPS dlcLightingCaps;
|
||||
D3DPRIMCAPS dpcLineCaps;
|
||||
D3DPRIMCAPS dpcTriCaps;
|
||||
DWORD dwDeviceRenderBitDepth;
|
||||
DWORD dwDeviceZBufferBitDepth;
|
||||
DWORD dwMaxBufferSize;
|
||||
DWORD dwMaxVertexCount;
|
||||
/* *** New fields for DX5 *** */
|
||||
DWORD dwMinTextureWidth,dwMinTextureHeight;
|
||||
DWORD dwMaxTextureWidth,dwMaxTextureHeight;
|
||||
DWORD dwMinStippleWidth,dwMaxStippleWidth;
|
||||
DWORD dwMinStippleHeight,dwMaxStippleHeight;
|
||||
} D3DDEVICEDESC,*LPD3DDEVICEDESC;
|
||||
|
||||
typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK)(LPGUID lpGuid,LPSTR lpDeviceDescription,LPSTR lpDeviceName,LPD3DDEVICEDESC,LPD3DDEVICEDESC,LPVOID);
|
||||
|
||||
/* dwflags for FindDevice */
|
||||
#define D3DFDS_COLORMODEL 0x00000001
|
||||
#define D3DFDS_GUID 0x00000002
|
||||
#define D3DFDS_HARDWARE 0x00000004
|
||||
#define D3DFDS_TRIANGLES 0x00000008
|
||||
#define D3DFDS_LINES 0x00000010
|
||||
#define D3DFDS_MISCCAPS 0x00000020
|
||||
#define D3DFDS_RASTERCAPS 0x00000040
|
||||
#define D3DFDS_ZCMPCAPS 0x00000080
|
||||
#define D3DFDS_ALPHACMPCAPS 0x00000100
|
||||
#define D3DFDS_DSTBLENDCAPS 0x00000400
|
||||
#define D3DFDS_SHADECAPS 0x00000800
|
||||
#define D3DFDS_TEXTURECAPS 0x00001000
|
||||
#define D3DFDS_TEXTUREFILTERCAPS 0x00002000
|
||||
#define D3DFDS_TEXTUREBLENDCAPS 0x00004000
|
||||
#define D3DFDS_TEXTUREADDRESSCAPS 0x00008000
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
BOOL32 bHardware;
|
||||
D3DCOLORMODEL dcmColorModel;
|
||||
GUID guid;
|
||||
DWORD dwCaps;
|
||||
D3DPRIMCAPS dpcPrimCaps;
|
||||
} D3DFINDDEVICESEARCH,*LPD3DFINDDEVICESEARCH;
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
GUID guid;
|
||||
D3DDEVICEDESC ddHwDesc;
|
||||
D3DDEVICEDESC ddSwDesc;
|
||||
} D3DFINDDEVICERESULT,*LPD3DFINDDEVICERESULT;
|
||||
|
||||
#define D3DVALP(val, prec) ((float)(val))
|
||||
#define D3DVAL(val) ((float)(val))
|
||||
typedef float D3DVALUE,*LPD3DVALUE;
|
||||
#define D3DDivide(a, b) (float)((double) (a) / (double) (b))
|
||||
#define D3DMultiply(a, b) ((a) * (b))
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
D3DVALUE x;
|
||||
D3DVALUE dvX;
|
||||
} x;
|
||||
union {
|
||||
D3DVALUE y;
|
||||
D3DVALUE dvY;
|
||||
} y;
|
||||
union {
|
||||
D3DVALUE z;
|
||||
D3DVALUE dvZ;
|
||||
} z;
|
||||
/* the c++ variant has operator overloads etc. too */
|
||||
} D3DVECTOR,*LPD3DVECTOR;
|
||||
|
||||
|
||||
typedef enum {
|
||||
D3DLIGHT_POINT = 1,
|
||||
D3DLIGHT_SPOT = 2,
|
||||
D3DLIGHT_DIRECTIONAL = 3,
|
||||
D3DLIGHT_PARALLELPOINT = 4,
|
||||
D3DLIGHT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
|
||||
} D3DLIGHTTYPE;
|
||||
|
||||
typedef struct _D3DCOLORVALUE {
|
||||
union {
|
||||
D3DVALUE r;
|
||||
D3DVALUE dvR;
|
||||
} r;
|
||||
union {
|
||||
D3DVALUE g;
|
||||
D3DVALUE dvG;
|
||||
} g;
|
||||
union {
|
||||
D3DVALUE b;
|
||||
D3DVALUE dvB;
|
||||
} b;
|
||||
union {
|
||||
D3DVALUE a;
|
||||
D3DVALUE dvA;
|
||||
} a;
|
||||
} D3DCOLORVALUE,*LPD3DCOLORVALUE;
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
D3DLIGHTTYPE dltType;
|
||||
D3DCOLORVALUE dcvColor;
|
||||
D3DVECTOR dvPosition; /* Position in world space */
|
||||
D3DVECTOR dvDirection; /* Direction in world space */
|
||||
D3DVALUE dvRange; /* Cutoff range */
|
||||
D3DVALUE dvFalloff; /* Falloff */
|
||||
D3DVALUE dvAttenuation0; /* Constant attenuation */
|
||||
D3DVALUE dvAttenuation1; /* Linear attenuation */
|
||||
D3DVALUE dvAttenuation2; /* Quadratic attenuation */
|
||||
D3DVALUE dvTheta; /* Inner angle of spotlight cone */
|
||||
D3DVALUE dvPhi; /* Outer angle of spotlight cone */
|
||||
} D3DLIGHT,*LPD3DLIGHT;
|
||||
|
||||
/* flags bits */
|
||||
#define D3DLIGHT_ACTIVE 0x00000001
|
||||
#define D3DLIGHT_NO_SPECULAR 0x00000002
|
||||
|
||||
|
||||
#define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
|
||||
#define STDMETHOD_(ret,xfn) ret (CALLBACK *fn##xfn)
|
||||
#define PURE
|
||||
#define FAR
|
||||
#define THIS_ THIS ,
|
||||
|
||||
#define THIS LPDIRECT3D this
|
||||
typedef struct IDirect3D_VTable {
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3D methods ***/
|
||||
STDMETHOD(Initialize) (THIS_ REFIID) PURE;
|
||||
STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK, LPVOID) PURE;
|
||||
STDMETHOD(CreateLight) (THIS_ LPDIRECT3DLIGHT*, IUnknown*) PURE;
|
||||
STDMETHOD(CreateMaterial) (THIS_ LPDIRECT3DMATERIAL*, IUnknown*) PURE;
|
||||
STDMETHOD(CreateViewport) (THIS_ LPDIRECT3DVIEWPORT*, IUnknown*) PURE;
|
||||
STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT) PURE;
|
||||
} *LPDIRECT3D_VTABLE,IDirect3D_VTable;
|
||||
|
||||
struct IDirect3D {
|
||||
LPDIRECT3D_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
LPDIRECTDRAW ddraw;
|
||||
};
|
||||
#undef THIS
|
||||
|
||||
#define THIS LPDIRECT3D2 this
|
||||
typedef struct IDirect3D2_VTable {
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3D2 methods ***/
|
||||
STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK, LPVOID) PURE;
|
||||
STDMETHOD(CreateLight) (THIS_ LPDIRECT3DLIGHT*, IUnknown*) PURE;
|
||||
STDMETHOD(CreateMaterial) (THIS_ LPDIRECT3DMATERIAL2*, IUnknown*) PURE;
|
||||
STDMETHOD(CreateViewport) (THIS_ LPDIRECT3DVIEWPORT2*, IUnknown*) PURE;
|
||||
STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT) PURE;
|
||||
STDMETHOD(CreateDevice)(THIS_ REFCLSID, LPDIRECTDRAWSURFACE, LPDIRECT3DDEVICE2 *) PURE;
|
||||
} *LPDIRECT3D2_VTABLE,IDirect3D2_VTable;
|
||||
|
||||
struct IDirect3D2 {
|
||||
LPDIRECT3D2_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
LPDIRECTDRAW ddraw;
|
||||
};
|
||||
#undef THIS
|
||||
|
||||
#define THIS LPDIRECT3DLIGHT this
|
||||
typedef struct IDirect3DLight_VTable {
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3DLight methods ***/
|
||||
STDMETHOD(Initialize) (THIS_ LPDIRECT3D) PURE;
|
||||
STDMETHOD(SetLight) (THIS_ LPD3DLIGHT) PURE;
|
||||
STDMETHOD(GetLight) (THIS_ LPD3DLIGHT) PURE;
|
||||
} IDirect3DLight_VTable,*LPDIRECT3DLIGHT_VTABLE;
|
||||
|
||||
struct IDirect3DLight {
|
||||
LPDIRECT3DLIGHT_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
};
|
||||
|
||||
#undef THIS
|
||||
|
||||
#undef THIS_
|
||||
#undef STDMETHOD
|
||||
#undef STDMETHOD_
|
||||
#undef PURE
|
||||
#undef FAR
|
||||
#endif
|
407
include/ddraw.h
407
include/ddraw.h
|
@ -1,7 +1,11 @@
|
|||
#ifndef __WINE_DDRAW_H
|
||||
#define __WINE_DDRAW_H
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include "ts_xlib.h"
|
||||
|
||||
#ifndef DIRECTDRAW_VERSION
|
||||
#define DIRECTDRAW_VERSION 0x0500
|
||||
#endif /* DIRECTDRAW_VERSION */
|
||||
|
||||
|
||||
DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
|
||||
|
@ -10,8 +14,10 @@ DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF
|
|||
DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
|
||||
DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
|
||||
DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
|
||||
DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
|
||||
DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
|
||||
DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
|
||||
DEFINE_GUID( IID_IDirectDrawColorControl,0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
|
||||
|
||||
typedef struct IDirectDraw IDirectDraw,*LPDIRECTDRAW;
|
||||
typedef struct IDirectDraw2 IDirectDraw2,*LPDIRECTDRAW2;
|
||||
|
@ -19,6 +25,8 @@ typedef struct IDirectDrawClipper IDirectDrawClipper,*LPDIRECTDRAWCLIPPER;
|
|||
typedef struct IDirectDrawPalette IDirectDrawPalette,*LPDIRECTDRAWPALETTE;
|
||||
typedef struct IDirectDrawSurface IDirectDrawSurface,*LPDIRECTDRAWSURFACE;
|
||||
typedef struct IDirectDrawSurface2 IDirectDrawSurface2,*LPDIRECTDRAWSURFACE2;
|
||||
typedef struct IDirectDrawSurface3 IDirectDrawSurface3,*LPDIRECTDRAWSURFACE3;
|
||||
typedef struct IDirectDrawColorControl IDirectDrawColorControl,*LPDIRECTDRAWCOLORCONTROL;
|
||||
|
||||
#define DDENUMRET_CANCEL 0
|
||||
#define DDENUMRET_OK 1
|
||||
|
@ -124,10 +132,17 @@ typedef struct IDirectDrawSurface2 IDirectDrawSurface2,*LPDIRECTDRAWSURFACE2;
|
|||
#define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
|
||||
#define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
|
||||
#define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
|
||||
#define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 )
|
||||
#define DDERR_NOTLOADED MAKE_DDHRESULT( 601 )
|
||||
#define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 )
|
||||
#define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
|
||||
#define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 )
|
||||
#define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
|
||||
#define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
|
||||
#define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
|
||||
#define DDERR_MOREDATA MAKE_DDHRESULT( 690 )
|
||||
#define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 )
|
||||
#define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 )
|
||||
#define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
|
||||
|
||||
/* dwFlags for Blt* */
|
||||
|
@ -165,14 +180,17 @@ typedef struct IDirectDrawSurface2 IDirectDrawSurface2,*LPDIRECTDRAWSURFACE2;
|
|||
#define DDBLTFAST_WAIT 0x00000010
|
||||
|
||||
/* dwFlags for Flip */
|
||||
#define DDFLIP_WAIT 0x00000001
|
||||
#define DDFLIP_WAIT 0x00000001
|
||||
#define DDFLIP_EVEN 0x00000002 /* only valid for overlay */
|
||||
#define DDFLIP_ODD 0x00000004 /* only valid for overlay */
|
||||
|
||||
/* dwFlags for GetBltStatus */
|
||||
#define DDGBS_CANBLT 0x00000001
|
||||
#define DDGBS_ISBLTDONE 0x00000002
|
||||
|
||||
/* 3d capable (no meaning?) */
|
||||
#define DDSCAPS_3D 0x00000001
|
||||
/* DDSCAPS.dwCaps */
|
||||
/* reserved1, was 3d capable */
|
||||
#define DDSCAPS_RESERVED1 0x00000001
|
||||
/* surface contains alpha information */
|
||||
#define DDSCAPS_ALPHA 0x00000002
|
||||
/* this surface is a backbuffer */
|
||||
|
@ -217,8 +235,19 @@ typedef struct IDirectDrawSurface2 IDirectDrawSurface2,*LPDIRECTDRAWSURFACE2;
|
|||
#define DDSCAPS_MODEX 0x00200000
|
||||
/* one mipmap surface (1 level) */
|
||||
#define DDSCAPS_MIPMAP 0x00400000
|
||||
#define DDSCAPS_RESERVED2 0x00800000
|
||||
/* memory allocation delayed until Load() */
|
||||
#define DDSCAPS_ALLOCONLOAD 0x04000000
|
||||
/* Indicates that the surface will recieve data from a video port */
|
||||
#define DDSCAPS_VIDEOPORT 0x08000000
|
||||
/* surface is in local videomemory */
|
||||
#define DDSCAPS_LOCALVIDMEM 0x10000000
|
||||
/* surface is in nonlocal videomemory */
|
||||
#define DDSCAPS_NONLOCALVIDMEM 0x20000000
|
||||
/* surface is a standard VGA mode surface (NOT ModeX) */
|
||||
#define DDSCAPS_STANDARDVGAMODE 0x40000000
|
||||
/* optimized? surface */
|
||||
#define DDSCAPS_OPTIMIZED 0x80000000
|
||||
|
||||
typedef struct _DDSCAPS {
|
||||
DWORD dwCaps; /* capabilities of surface wanted */
|
||||
|
@ -226,7 +255,7 @@ typedef struct _DDSCAPS {
|
|||
|
||||
#define DD_ROP_SPACE (256/32) /* space required to store ROP array */
|
||||
|
||||
typedef struct _DDCAPS
|
||||
typedef struct _DDCAPS_DX3
|
||||
{
|
||||
DWORD dwSize; /* size of the DDDRIVERCAPS structure */
|
||||
DWORD dwCaps; /* driver specific capabilities */
|
||||
|
@ -279,11 +308,77 @@ typedef struct _DDCAPS
|
|||
DWORD dwReserved4;
|
||||
DWORD dwReserved5;
|
||||
DWORD dwReserved6;
|
||||
} DDCAPS_DX3,*LPDDCAPS_DX3;
|
||||
|
||||
typedef struct _DDCAPS
|
||||
{
|
||||
/* 0*/ DWORD dwSize; /* size of the DDDRIVERCAPS structure */
|
||||
/* 4*/ DWORD dwCaps; /* driver specific capabilities */
|
||||
/* 8*/ DWORD dwCaps2; /* more driver specific capabilites */
|
||||
/* c*/ DWORD dwCKeyCaps; /* color key capabilities of the surface */
|
||||
/* 10*/ DWORD dwFXCaps; /* driver specific stretching and effects capabilites */
|
||||
/* 14*/ DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */
|
||||
/* 18*/ DWORD dwPalCaps; /* palette capabilities */
|
||||
/* 1c*/ DWORD dwSVCaps; /* stereo vision capabilities */
|
||||
/* 20*/ DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */
|
||||
/* 24*/ DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */
|
||||
/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */
|
||||
/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */
|
||||
/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */
|
||||
/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
|
||||
/* 38*/ DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */
|
||||
/* 3c*/ DWORD dwVidMemTotal; /* total amount of video memory */
|
||||
/* 40*/ DWORD dwVidMemFree; /* amount of free video memory */
|
||||
/* 44*/ DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */
|
||||
/* 48*/ DWORD dwCurrVisibleOverlays; /* current number of visible overlays */
|
||||
/* 4c*/ DWORD dwNumFourCCCodes; /* number of four cc codes */
|
||||
/* 50*/ DWORD dwAlignBoundarySrc; /* source rectangle alignment */
|
||||
/* 54*/ DWORD dwAlignSizeSrc; /* source rectangle byte size */
|
||||
/* 58*/ DWORD dwAlignBoundaryDest; /* dest rectangle alignment */
|
||||
/* 5c*/ DWORD dwAlignSizeDest; /* dest rectangle byte size */
|
||||
/* 60*/ DWORD dwAlignStrideAlign; /* stride alignment */
|
||||
/* 64*/ DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */
|
||||
/* 84*/ DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */
|
||||
/* 88*/ DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
|
||||
/* 8c*/ DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
|
||||
/* 90*/ DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
|
||||
/* 94*/ DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
|
||||
/* 98*/ DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
|
||||
/* 9c*/ DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
|
||||
/* a0*/ DWORD dwReserved1;
|
||||
/* a4*/ DWORD dwReserved2;
|
||||
/* a8*/ DWORD dwReserved3;
|
||||
/* ac*/ DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */
|
||||
/* b0*/ DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */
|
||||
/* b4*/ DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */
|
||||
/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
|
||||
/* d8*/ DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */
|
||||
/* dc*/ DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */
|
||||
/* e0*/ DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */
|
||||
/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
|
||||
/*104*/ DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */
|
||||
/*108*/ DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */
|
||||
/*10c*/ DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */
|
||||
/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
|
||||
#if DIRECTDRAW_VERSION >= 0x0500
|
||||
/*130*/ DWORD dwMaxVideoPorts; /* maximum number of usable video ports */
|
||||
/*134*/ DWORD dwCurrVideoPorts;/* current number of video ports used */
|
||||
/*138*/ DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */
|
||||
/*13c*/ DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */
|
||||
/*140*/ DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */
|
||||
/*144*/ DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */
|
||||
/*148*/ DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */
|
||||
/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE];/* ROPS supported for non-local->local blts */
|
||||
#else /* DIRECTDRAW_VERSION >= 0x0500 */
|
||||
/*130*/ DWORD dwReserved4;
|
||||
/*134*/ DWORD dwReserved5;
|
||||
/*138*/ DWORD dwReserved6;
|
||||
#endif /* DIRECTDRAW_VERSION >= 0x0500 */
|
||||
} DDCAPS,*LPDDCAPS;
|
||||
|
||||
/* hw has 3d accel */
|
||||
|
||||
/* DDCAPS.dwCaps */
|
||||
#define DDCAPS_3D 0x00000001
|
||||
/* supports only boundary aligned rectangles */
|
||||
#define DDCAPS_ALIGNBOUNDARYDEST 0x00000002
|
||||
#define DDCAPS_ALIGNSIZEDEST 0x00000004
|
||||
#define DDCAPS_ALIGNBOUNDARYSRC 0x00000008
|
||||
|
@ -316,11 +411,22 @@ typedef struct _DDCAPS
|
|||
#define DDCAPS_CANCLIPSTRETCHED 0x40000000
|
||||
#define DDCAPS_CANBLTSYSMEM 0x80000000
|
||||
|
||||
/* dwCaps2 */
|
||||
/* driver is certified */
|
||||
/* DDCAPS.dwCaps2 */
|
||||
#define DDCAPS2_CERTIFIED 0x00000001
|
||||
/* no 2d operations in 3d mode */
|
||||
#define DDCAPS2_NO2DDURING3DSCENE 0x00000002
|
||||
#define DDCAPS2_VIDEOPORT 0x00000004
|
||||
#define DDCAPS2_AUTOFLIPOVERLAY 0x00000008
|
||||
#define DDCAPS2_CANBOBINTERLEAVED 0x00000010
|
||||
#define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020
|
||||
#define DDCAPS2_COLORCONTROLOVERLAY 0x00000040
|
||||
#define DDCAPS2_COLORCONTROLPRIMARY 0x00000080
|
||||
#define DDCAPS2_CANDROPZ16BIT 0x00000100
|
||||
#define DDCAPS2_NONLOCALVIDMEM 0x00000200
|
||||
#define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400
|
||||
#define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800
|
||||
#define DDCAPS2_WIDESURFACES 0x00001000
|
||||
#define DDCAPS2_CANFLIPODDEVEN 0x00002000
|
||||
#define DDCAPS2_CANBOBHARDWARE 0x00004000
|
||||
|
||||
typedef struct _DDCOLORKEY
|
||||
{
|
||||
|
@ -354,32 +460,34 @@ typedef struct _DDCOLORKEY
|
|||
#define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000
|
||||
|
||||
typedef struct _DDPIXELFORMAT {
|
||||
DWORD dwSize; /* size of structure */
|
||||
DWORD dwFlags; /* pixel format flags */
|
||||
DWORD dwFourCC; /* (FOURCC code) */
|
||||
DWORD dwSize; /* 0: size of structure */
|
||||
DWORD dwFlags; /* 4: pixel format flags */
|
||||
DWORD dwFourCC; /* 8: (FOURCC code) */
|
||||
union {
|
||||
DWORD dwRGBBitCount; /* how many bits per pixel (BD_4,8,16,24,32)*/
|
||||
DWORD dwYUVBitCount; /* how many bits per pixel (BD_4,8,16,24,32)*/
|
||||
DWORD dwZBufferBitDepth; /* how many bits for z buffers (BD_8,16,24,32)*/
|
||||
DWORD dwAlphaBitDepth; /* how many bits for alpha channels (BD_1,2,4,8)*/
|
||||
DWORD dwRGBBitCount; /* C: how many bits per pixel */
|
||||
DWORD dwYUVBitCount; /* C: how many bits per pixel */
|
||||
DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */
|
||||
DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/
|
||||
} x;
|
||||
union {
|
||||
DWORD dwRBitMask; /* mask for red bit*/
|
||||
DWORD dwYBitMask; /* mask for Y bits*/
|
||||
DWORD dwRBitMask; /* 10: mask for red bit*/
|
||||
DWORD dwYBitMask; /* 10: mask for Y bits*/
|
||||
} y;
|
||||
union {
|
||||
DWORD dwGBitMask; /* mask for green bits*/
|
||||
DWORD dwUBitMask; /* mask for U bits*/
|
||||
DWORD dwGBitMask; /* 14: mask for green bits*/
|
||||
DWORD dwUBitMask; /* 14: mask for U bits*/
|
||||
} z;
|
||||
union {
|
||||
DWORD dwBBitMask; /* mask for blue bits*/
|
||||
DWORD dwVBitMask; /* mask for V bits*/
|
||||
DWORD dwBBitMask; /* 18: mask for blue bits*/
|
||||
DWORD dwVBitMask; /* 18: mask for V bits*/
|
||||
} xx;
|
||||
union {
|
||||
DWORD dwRGBAlphaBitMask; /* mask for alpha channel */
|
||||
DWORD dwYUVAlphaBitMask; /* mask for alpha channel */
|
||||
|
||||
DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */
|
||||
DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */
|
||||
DWORD dwRGBZBitMask; /* 1C: mask for Z channel */
|
||||
DWORD dwYUVZBitMask; /* 1C: mask for Z channel */
|
||||
} xy;
|
||||
/* 20: next structure */
|
||||
} DDPIXELFORMAT,*LPDDPIXELFORMAT;
|
||||
|
||||
/* DDCAPS.dwFXCaps */
|
||||
|
@ -468,6 +576,7 @@ typedef struct _DDPIXELFORMAT {
|
|||
#define DDPF_ZBUFFER 0x00000400
|
||||
#define DDPF_PALETTEINDEXED1 0x00000800
|
||||
#define DDPF_PALETTEINDEXED2 0x00001000
|
||||
#define DDPF_ZPIXELS 0x00002000
|
||||
|
||||
/* SetCooperativeLevel dwFlags */
|
||||
#define DDSCL_FULLSCREEN 0x00000001
|
||||
|
@ -476,40 +585,12 @@ typedef struct _DDPIXELFORMAT {
|
|||
#define DDSCL_NORMAL 0x00000008
|
||||
#define DDSCL_EXCLUSIVE 0x00000010
|
||||
#define DDSCL_ALLOWMODEX 0x00000040
|
||||
#define DDSCL_SETFOCUSWINDOW 0x00000080
|
||||
#define DDSCL_SETDEVICEWINDOW 0x00000100
|
||||
#define DDSCL_CREATEDEVICEWINDOW 0x00000200
|
||||
|
||||
typedef struct _DDSURFACEDESC
|
||||
{
|
||||
DWORD dwSize; /* size of the DDSURFACEDESC structure*/
|
||||
DWORD dwFlags;/* determines what fields are valid*/
|
||||
DWORD dwHeight;/* height of surface to be created*/
|
||||
DWORD dwWidth;/* width of input surface*/
|
||||
LONG lPitch; /* distance to start of next line (return value only)*/
|
||||
DWORD dwBackBufferCount; /* number of back buffers requested*/
|
||||
union {
|
||||
DWORD dwMipMapCount; /* number of mip-map levels requested*/
|
||||
DWORD dwZBufferBitDepth;/* depth of Z buffer requested*/
|
||||
DWORD dwRefreshRate; /* refresh rate (used when display mode is described)*/
|
||||
} x;
|
||||
DWORD dwAlphaBitDepth; /* depth of alpha buffer requested*/
|
||||
DWORD dwReserved; /* reserved*/
|
||||
LPVOID lpSurface; /* pointer to the associated surface memory*/
|
||||
DDCOLORKEY ddckCKDestOverlay;/* color key for destination overlay use*/
|
||||
DDCOLORKEY ddckCKDestBlt;/* color key for destination blt use*/
|
||||
DDCOLORKEY ddckCKSrcOverlay;/* color key for source overlay use*/
|
||||
DDCOLORKEY ddckCKSrcBlt;/* color key for source blt use*/
|
||||
DDPIXELFORMAT ddpfPixelFormat;/* pixel format description of the surface*/
|
||||
DDSCAPS ddsCaps;/* direct draw surface capabilities*/
|
||||
} DDSURFACEDESC,*LPDDSURFACEDESC;
|
||||
|
||||
typedef BOOL32 (CALLBACK * LPDDENUMCALLBACK32A)(GUID *, LPSTR, LPSTR, LPVOID);
|
||||
typedef BOOL32 (CALLBACK * LPDDENUMCALLBACK32W)(GUID *, LPWSTR, LPWSTR, LPVOID);
|
||||
DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACK)
|
||||
|
||||
typedef HRESULT (CALLBACK * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
|
||||
typedef HRESULT (CALLBACK * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
|
||||
|
||||
/* dwFlags field... which are valid */
|
||||
|
||||
/* DDSURFACEDESC.dwFlags */
|
||||
#define DDSD_CAPS 0x00000001
|
||||
#define DDSD_HEIGHT 0x00000002
|
||||
#define DDSD_WIDTH 0x00000004
|
||||
|
@ -517,6 +598,7 @@ typedef HRESULT (CALLBACK * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDS
|
|||
#define DDSD_BACKBUFFERCOUNT 0x00000020
|
||||
#define DDSD_ZBUFFERBITDEPTH 0x00000040
|
||||
#define DDSD_ALPHABITDEPTH 0x00000080
|
||||
#define DDSD_LPSURFACE 0x00000800
|
||||
#define DDSD_PIXELFORMAT 0x00001000
|
||||
#define DDSD_CKDESTOVERLAY 0x00002000
|
||||
#define DDSD_CKDESTBLT 0x00004000
|
||||
|
@ -524,7 +606,85 @@ typedef HRESULT (CALLBACK * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDS
|
|||
#define DDSD_CKSRCBLT 0x00010000
|
||||
#define DDSD_MIPMAPCOUNT 0x00020000
|
||||
#define DDSD_REFRESHRATE 0x00040000
|
||||
#define DDSD_ALL 0x0007f9ee
|
||||
#define DDSD_LINEARSIZE 0x00080000
|
||||
#define DDSD_ALL 0x000ff9ee
|
||||
|
||||
/* SetDisplayMode flags */
|
||||
#define DDSDM_STANDARDVGAMODE 0x00000001
|
||||
|
||||
/* EnumDisplayModes flags */
|
||||
#define DDEDM_REFRESHRATES 0x00000001
|
||||
#define DDEDM_STANDARDVGAMODES 0x00000002
|
||||
|
||||
|
||||
typedef struct _DDSURFACEDESC
|
||||
{
|
||||
DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
|
||||
DWORD dwFlags; /* 4: determines what fields are valid*/
|
||||
DWORD dwHeight; /* 8: height of surface to be created*/
|
||||
DWORD dwWidth; /* C: width of input surface*/
|
||||
LONG lPitch; /*10: distance to start of next line (return value only)*/
|
||||
DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
|
||||
union {
|
||||
DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
|
||||
DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
|
||||
DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
|
||||
} x;
|
||||
DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
|
||||
DWORD dwReserved; /* 20:reserved*/
|
||||
union {
|
||||
LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
|
||||
DWORD dwLinearSize; /* 24:Formless late-allocated optimized surface size*/
|
||||
} y;
|
||||
DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/
|
||||
DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
|
||||
DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
|
||||
DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
|
||||
DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
|
||||
DDSCAPS ddsCaps; /* 68: direct draw surface caps */
|
||||
} DDSURFACEDESC,*LPDDSURFACEDESC;
|
||||
|
||||
/* DDCOLORCONTROL.dwFlags */
|
||||
#define DDCOLOR_BRIGHTNESS 0x00000001
|
||||
#define DDCOLOR_CONTRAST 0x00000002
|
||||
#define DDCOLOR_HUE 0x00000004
|
||||
#define DDCOLOR_SATURATION 0x00000008
|
||||
#define DDCOLOR_SHARPNESS 0x00000010
|
||||
#define DDCOLOR_GAMMA 0x00000020
|
||||
#define DDCOLOR_COLORENABLE 0x00000040
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
LONG lBrightness;
|
||||
LONG lContrast;
|
||||
LONG lHue;
|
||||
LONG lSaturation;
|
||||
LONG lSharpness;
|
||||
LONG lGamma;
|
||||
LONG lColorEnable;
|
||||
DWORD dwReserved1;
|
||||
} DDCOLORCONTROL,*LPDDCOLORCONTROL;
|
||||
|
||||
typedef BOOL32 (CALLBACK * LPDDENUMCALLBACK32A)(GUID *, LPSTR, LPSTR, LPVOID);
|
||||
typedef BOOL32 (CALLBACK * LPDDENUMCALLBACK32W)(GUID *, LPWSTR, LPWSTR, LPVOID);
|
||||
DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACK);
|
||||
|
||||
typedef HRESULT (CALLBACK * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
|
||||
typedef HRESULT (CALLBACK * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
|
||||
|
||||
typedef HANDLE32 HMONITOR;
|
||||
typedef BOOL32 (CALLBACK * LPDDENUMCALLBACKEX32A)(GUID *, LPSTR, LPSTR, LPVOID, HMONITOR);
|
||||
typedef BOOL32 (CALLBACK * LPDDENUMCALLBACKEX32W)(GUID *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
|
||||
DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACKEX);
|
||||
|
||||
HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEX32A lpCallback, LPVOID lpContext, DWORD dwFlags);
|
||||
HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEX32W lpCallback, LPVOID lpContext, DWORD dwFlags);
|
||||
|
||||
/* flags for DirectDrawEnumerateEx */
|
||||
#define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001
|
||||
#define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002
|
||||
#define DDENUM_NONDISPLAYDEVICES 0x00000004
|
||||
|
||||
typedef struct _DDBLTFX
|
||||
{
|
||||
|
@ -568,6 +728,7 @@ typedef struct _DDBLTFX
|
|||
{
|
||||
DWORD dwFillColor; /* color in RGB or Palettized */
|
||||
DWORD dwFillDepth; /* depth value for z-buffer */
|
||||
DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
|
||||
LPDIRECTDRAWSURFACE lpDDSPattern; /* Surface to use as pattern */
|
||||
} b;
|
||||
DDCOLORKEY ddckDestColorkey; /* DestColorkey override */
|
||||
|
@ -631,7 +792,6 @@ typedef struct _DDBLTBATCH
|
|||
#define STDMETHOD_(ret,xfn) ret (CALLBACK *fn##xfn)
|
||||
#define PURE
|
||||
#define FAR
|
||||
#define ULONG DWORD
|
||||
#define THIS_ THIS ,
|
||||
|
||||
#define THIS LPDIRECTDRAWPALETTE this
|
||||
|
@ -704,7 +864,7 @@ FAR * ) PURE;
|
|||
STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
|
||||
STDMETHOD(RestoreDisplayMode)(THIS) PURE;
|
||||
STDMETHOD(SetCooperativeLevel)(THIS_ HWND32, DWORD) PURE;
|
||||
STDMETHOD(SetDisplayMode)(THIS_ DWORD width, DWORD height,DWORD depth) PURE;
|
||||
STDMETHOD(SetDisplayMode)(THIS_ DWORD , DWORD ,DWORD ) PURE;
|
||||
STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE32 ) PURE;
|
||||
} *LPDIRECTDRAW_VTABLE,IDirectDraw_VTable;
|
||||
|
||||
|
@ -724,28 +884,16 @@ struct IDirectDraw {
|
|||
DWORD ref;
|
||||
struct _directdrawdata d;
|
||||
};
|
||||
#undef THIS
|
||||
|
||||
/* flags for Lock() */
|
||||
/* The default. Set to indicate that Lock should return a valid memory pointer
|
||||
* to the top of the specified rectangle. If no rectangle is specified then a
|
||||
* pointer to the top of the surface is returned.
|
||||
*/
|
||||
#define DDLOCK_SURFACEMEMORYPTR 0x00000000L
|
||||
/* Set to indicate that Lock should wait until it can obtain a valid memory
|
||||
* pointer before returning. If this bit is set, Lock will never return
|
||||
* DDERR_WASSTILLDRAWING.
|
||||
*/
|
||||
#define DDLOCK_WAIT 0x00000001L
|
||||
/* Set if an event handle is being passed to Lock. Lock will trigger the event
|
||||
* when it can return the surface memory pointer requested.
|
||||
*/
|
||||
#define DDLOCK_EVENT 0x00000002L
|
||||
/* Indicates that the surface being locked will only be read from. */
|
||||
#define DDLOCK_READONLY 0x00000010L
|
||||
/* Indicates that the surface being locked will only be written to */
|
||||
#define DDLOCK_WRITEONLY 0x00000020L
|
||||
#define DDLOCK_SURFACEMEMORYPTR 0x00000000
|
||||
#define DDLOCK_WAIT 0x00000001
|
||||
#define DDLOCK_EVENT 0x00000002
|
||||
#define DDLOCK_READONLY 0x00000010
|
||||
#define DDLOCK_WRITEONLY 0x00000020
|
||||
#define DDLOCK_NOSYSLOCK 0x00000800
|
||||
|
||||
#undef THIS
|
||||
|
||||
#define THIS LPDIRECTDRAW2 this
|
||||
typedef struct IDirectDraw2_VTable
|
||||
|
@ -775,7 +923,7 @@ FAR * ) PURE;
|
|||
STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
|
||||
STDMETHOD(RestoreDisplayMode)(THIS) PURE;
|
||||
STDMETHOD(SetCooperativeLevel)(THIS_ HWND32, DWORD) PURE;
|
||||
STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
|
||||
STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD, DWORD, DWORD, DWORD) PURE;
|
||||
STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE32 ) PURE;
|
||||
/*** Added in the v2 interface ***/
|
||||
STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
|
||||
|
@ -790,6 +938,14 @@ struct IDirectDraw2 {
|
|||
#undef THIS
|
||||
|
||||
#define THIS LPDIRECTDRAWSURFACE this
|
||||
struct _directdrawsurface {
|
||||
LPVOID surface;
|
||||
LPDIRECTDRAWPALETTE palette;
|
||||
DWORD fb_height,lpitch,width,height;
|
||||
LPDIRECTDRAW ddraw;
|
||||
LPDIRECTDRAWSURFACE backbuffer;
|
||||
};
|
||||
|
||||
typedef struct IDirectDrawSurface_VTable {
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
|
||||
|
@ -831,13 +987,9 @@ typedef struct IDirectDrawSurface_VTable {
|
|||
} *LPDIRECTDRAWSURFACE_VTABLE,IDirectDrawSurface_VTable;
|
||||
|
||||
struct IDirectDrawSurface {
|
||||
LPDIRECTDRAWSURFACE_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
LPVOID surface;
|
||||
LPDIRECTDRAWPALETTE palette;
|
||||
DWORD fb_height,lpitch,width,height;
|
||||
LPDIRECTDRAW ddraw;
|
||||
LPDIRECTDRAWSURFACE backbuffer;
|
||||
LPDIRECTDRAWSURFACE_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
struct _directdrawsurface s;
|
||||
};
|
||||
#undef THIS
|
||||
#define THIS LPDIRECTDRAWSURFACE2 this
|
||||
|
@ -888,12 +1040,79 @@ typedef struct IDirectDrawSurface2_VTable {
|
|||
|
||||
struct IDirectDrawSurface2 {
|
||||
LPDIRECTDRAWSURFACE2_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
LPVOID surface;
|
||||
LPDIRECTDRAWPALETTE palette;
|
||||
DWORD fb_height,lpitch,width,height;
|
||||
LPDIRECTDRAW ddraw;
|
||||
LPDIRECTDRAWSURFACE backbuffer;
|
||||
DWORD ref;
|
||||
struct _directdrawsurface s;
|
||||
};
|
||||
#undef THIS
|
||||
#define THIS LPDIRECTDRAWSURFACE3 this
|
||||
|
||||
typedef struct IDirectDrawSurface3_VTable {
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
/*** IDirectDrawSurface methods ***/
|
||||
STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE;
|
||||
STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT32) PURE;
|
||||
STDMETHOD(Blt)(THIS_ LPRECT32,LPDIRECTDRAWSURFACE3, LPRECT32,DWORD, LPDDBLTFX) PURE;
|
||||
STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
|
||||
STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT32,DWORD) PURE;
|
||||
STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE;
|
||||
STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE; STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
|
||||
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE;
|
||||
STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE;
|
||||
STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
|
||||
STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
|
||||
STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
|
||||
STDMETHOD(GetDC)(THIS_ HDC32 FAR *) PURE;
|
||||
STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
|
||||
STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
|
||||
STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
|
||||
STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
|
||||
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
|
||||
STDMETHOD(IsLost)(THIS) PURE;
|
||||
STDMETHOD(Lock)(THIS_ LPRECT32,LPDDSURFACEDESC,DWORD,HANDLE32) PURE;
|
||||
STDMETHOD(ReleaseDC)(THIS_ HDC32) PURE;
|
||||
STDMETHOD(Restore)(THIS) PURE;
|
||||
STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
|
||||
STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
|
||||
STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
|
||||
STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
|
||||
STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
|
||||
STDMETHOD(UpdateOverlay)(THIS_ LPRECT32, LPDIRECTDRAWSURFACE3,LPRECT32,DWORD, LPDDOVERLAYFX) PURE;
|
||||
STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE;
|
||||
/*** Added in the v2 interface ***/
|
||||
STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
|
||||
STDMETHOD(PageLock)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
|
||||
/*** Added in the V3 interface ***/
|
||||
STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD) PURE;
|
||||
} *LPDIRECTDRAWSURFACE3_VTABLE,IDirectDrawSurface3_VTable;
|
||||
|
||||
struct IDirectDrawSurface3 {
|
||||
LPDIRECTDRAWSURFACE3_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
struct _directdrawsurface s;
|
||||
};
|
||||
#undef THIS
|
||||
|
||||
#define THIS LPDIRECTDRAWCOLORCONTROL this
|
||||
typedef struct IDirectDrawColorControl_VTable {
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
/*** IDirectDrawColorControl methods ***/
|
||||
STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
|
||||
STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
|
||||
} IDirectDrawColorControl_VTable,*LPDIRECTDRAWCOLORCONTROL_VTABLE;
|
||||
|
||||
struct IDirectDrawColorControl {
|
||||
LPDIRECTDRAWCOLORCONTROL_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
};
|
||||
#undef THIS
|
||||
|
||||
|
|
331
include/debug.h
331
include/debug.h
|
@ -23,10 +23,12 @@
|
|||
#undef DEBUG_CURSOR
|
||||
#undef DEBUG_DC
|
||||
#undef DEBUG_DDE
|
||||
#undef DEBUG_DDRAW
|
||||
#undef DEBUG_DIALOG
|
||||
#undef DEBUG_DLL
|
||||
#undef DEBUG_DOSFS
|
||||
#undef DEBUG_DRIVER
|
||||
#undef DEBUG_DSOUND
|
||||
#undef DEBUG_EDIT
|
||||
#undef DEBUG_EVENT
|
||||
#undef DEBUG_EXEC
|
||||
|
@ -90,6 +92,7 @@
|
|||
#undef DEBUG_WIN16DRV
|
||||
#undef DEBUG_WIN32
|
||||
#undef DEBUG_WINSOCK
|
||||
#undef DEBUG_X11
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ALL_EXT
|
||||
|
@ -110,10 +113,12 @@
|
|||
#define DEBUG_CURSOR
|
||||
#define DEBUG_DC
|
||||
#define DEBUG_DDE
|
||||
#define DEBUG_DDRAW
|
||||
#define DEBUG_DIALOG
|
||||
#define DEBUG_DLL
|
||||
#define DEBUG_DOSFS
|
||||
#define DEBUG_DRIVER
|
||||
#define DEBUG_DSOUND
|
||||
#define DEBUG_EDIT
|
||||
#define DEBUG_EVENT
|
||||
#define DEBUG_EXEC
|
||||
|
@ -177,6 +182,7 @@
|
|||
#define DEBUG_WIN16DRV
|
||||
#define DEBUG_WIN32
|
||||
#define DEBUG_WINSOCK
|
||||
#define DEBUG_X11
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
|
@ -267,6 +273,11 @@ short debug_msg_enabled[]={
|
|||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_DDRAW
|
||||
1,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_DIALOG
|
||||
1,
|
||||
#else
|
||||
|
@ -287,6 +298,11 @@ short debug_msg_enabled[]={
|
|||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_DSOUND
|
||||
1,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_EDIT
|
||||
1,
|
||||
#else
|
||||
|
@ -601,6 +617,11 @@ short debug_msg_enabled[]={
|
|||
1,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_X11
|
||||
1,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
0
|
||||
};
|
||||
|
@ -831,8 +852,21 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dialog if(!debug_msg_enabled[17]) ; else fprintf
|
||||
#define debugging_dialog debug_msg_enabled[17]
|
||||
#define dprintf_ddraw if(!debug_msg_enabled[17]) ; else fprintf
|
||||
#define debugging_ddraw debug_msg_enabled[17]
|
||||
#else
|
||||
#ifdef DEBUG_DDRAW
|
||||
#define dprintf_ddraw fprintf
|
||||
#define debugging_ddraw 1
|
||||
#else
|
||||
#define dprintf_ddraw while(0) fprintf
|
||||
#define debugging_ddraw 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dialog if(!debug_msg_enabled[18]) ; else fprintf
|
||||
#define debugging_dialog debug_msg_enabled[18]
|
||||
#else
|
||||
#ifdef DEBUG_DIALOG
|
||||
#define dprintf_dialog fprintf
|
||||
|
@ -844,8 +878,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dll if(!debug_msg_enabled[18]) ; else fprintf
|
||||
#define debugging_dll debug_msg_enabled[18]
|
||||
#define dprintf_dll if(!debug_msg_enabled[19]) ; else fprintf
|
||||
#define debugging_dll debug_msg_enabled[19]
|
||||
#else
|
||||
#ifdef DEBUG_DLL
|
||||
#define dprintf_dll fprintf
|
||||
|
@ -857,8 +891,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dosfs if(!debug_msg_enabled[19]) ; else fprintf
|
||||
#define debugging_dosfs debug_msg_enabled[19]
|
||||
#define dprintf_dosfs if(!debug_msg_enabled[20]) ; else fprintf
|
||||
#define debugging_dosfs debug_msg_enabled[20]
|
||||
#else
|
||||
#ifdef DEBUG_DOSFS
|
||||
#define dprintf_dosfs fprintf
|
||||
|
@ -870,8 +904,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_driver if(!debug_msg_enabled[20]) ; else fprintf
|
||||
#define debugging_driver debug_msg_enabled[20]
|
||||
#define dprintf_driver if(!debug_msg_enabled[21]) ; else fprintf
|
||||
#define debugging_driver debug_msg_enabled[21]
|
||||
#else
|
||||
#ifdef DEBUG_DRIVER
|
||||
#define dprintf_driver fprintf
|
||||
|
@ -883,8 +917,21 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_edit if(!debug_msg_enabled[21]) ; else fprintf
|
||||
#define debugging_edit debug_msg_enabled[21]
|
||||
#define dprintf_dsound if(!debug_msg_enabled[22]) ; else fprintf
|
||||
#define debugging_dsound debug_msg_enabled[22]
|
||||
#else
|
||||
#ifdef DEBUG_DSOUND
|
||||
#define dprintf_dsound fprintf
|
||||
#define debugging_dsound 1
|
||||
#else
|
||||
#define dprintf_dsound while(0) fprintf
|
||||
#define debugging_dsound 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_edit if(!debug_msg_enabled[23]) ; else fprintf
|
||||
#define debugging_edit debug_msg_enabled[23]
|
||||
#else
|
||||
#ifdef DEBUG_EDIT
|
||||
#define dprintf_edit fprintf
|
||||
|
@ -896,8 +943,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_event if(!debug_msg_enabled[22]) ; else fprintf
|
||||
#define debugging_event debug_msg_enabled[22]
|
||||
#define dprintf_event if(!debug_msg_enabled[24]) ; else fprintf
|
||||
#define debugging_event debug_msg_enabled[24]
|
||||
#else
|
||||
#ifdef DEBUG_EVENT
|
||||
#define dprintf_event fprintf
|
||||
|
@ -909,8 +956,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_exec if(!debug_msg_enabled[23]) ; else fprintf
|
||||
#define debugging_exec debug_msg_enabled[23]
|
||||
#define dprintf_exec if(!debug_msg_enabled[25]) ; else fprintf
|
||||
#define debugging_exec debug_msg_enabled[25]
|
||||
#else
|
||||
#ifdef DEBUG_EXEC
|
||||
#define dprintf_exec fprintf
|
||||
|
@ -922,8 +969,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_file if(!debug_msg_enabled[24]) ; else fprintf
|
||||
#define debugging_file debug_msg_enabled[24]
|
||||
#define dprintf_file if(!debug_msg_enabled[26]) ; else fprintf
|
||||
#define debugging_file debug_msg_enabled[26]
|
||||
#else
|
||||
#ifdef DEBUG_FILE
|
||||
#define dprintf_file fprintf
|
||||
|
@ -935,8 +982,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_fixup if(!debug_msg_enabled[25]) ; else fprintf
|
||||
#define debugging_fixup debug_msg_enabled[25]
|
||||
#define dprintf_fixup if(!debug_msg_enabled[27]) ; else fprintf
|
||||
#define debugging_fixup debug_msg_enabled[27]
|
||||
#else
|
||||
#ifdef DEBUG_FIXUP
|
||||
#define dprintf_fixup fprintf
|
||||
|
@ -948,8 +995,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_font if(!debug_msg_enabled[26]) ; else fprintf
|
||||
#define debugging_font debug_msg_enabled[26]
|
||||
#define dprintf_font if(!debug_msg_enabled[28]) ; else fprintf
|
||||
#define debugging_font debug_msg_enabled[28]
|
||||
#else
|
||||
#ifdef DEBUG_FONT
|
||||
#define dprintf_font fprintf
|
||||
|
@ -961,8 +1008,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_gdi if(!debug_msg_enabled[27]) ; else fprintf
|
||||
#define debugging_gdi debug_msg_enabled[27]
|
||||
#define dprintf_gdi if(!debug_msg_enabled[29]) ; else fprintf
|
||||
#define debugging_gdi debug_msg_enabled[29]
|
||||
#else
|
||||
#ifdef DEBUG_GDI
|
||||
#define dprintf_gdi fprintf
|
||||
|
@ -974,8 +1021,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_global if(!debug_msg_enabled[28]) ; else fprintf
|
||||
#define debugging_global debug_msg_enabled[28]
|
||||
#define dprintf_global if(!debug_msg_enabled[30]) ; else fprintf
|
||||
#define debugging_global debug_msg_enabled[30]
|
||||
#else
|
||||
#ifdef DEBUG_GLOBAL
|
||||
#define dprintf_global fprintf
|
||||
|
@ -987,8 +1034,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_graphics if(!debug_msg_enabled[29]) ; else fprintf
|
||||
#define debugging_graphics debug_msg_enabled[29]
|
||||
#define dprintf_graphics if(!debug_msg_enabled[31]) ; else fprintf
|
||||
#define debugging_graphics debug_msg_enabled[31]
|
||||
#else
|
||||
#ifdef DEBUG_GRAPHICS
|
||||
#define dprintf_graphics fprintf
|
||||
|
@ -1000,8 +1047,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_heap if(!debug_msg_enabled[30]) ; else fprintf
|
||||
#define debugging_heap debug_msg_enabled[30]
|
||||
#define dprintf_heap if(!debug_msg_enabled[32]) ; else fprintf
|
||||
#define debugging_heap debug_msg_enabled[32]
|
||||
#else
|
||||
#ifdef DEBUG_HEAP
|
||||
#define dprintf_heap fprintf
|
||||
|
@ -1013,8 +1060,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_hook if(!debug_msg_enabled[31]) ; else fprintf
|
||||
#define debugging_hook debug_msg_enabled[31]
|
||||
#define dprintf_hook if(!debug_msg_enabled[33]) ; else fprintf
|
||||
#define debugging_hook debug_msg_enabled[33]
|
||||
#else
|
||||
#ifdef DEBUG_HOOK
|
||||
#define dprintf_hook fprintf
|
||||
|
@ -1026,8 +1073,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_icon if(!debug_msg_enabled[32]) ; else fprintf
|
||||
#define debugging_icon debug_msg_enabled[32]
|
||||
#define dprintf_icon if(!debug_msg_enabled[34]) ; else fprintf
|
||||
#define debugging_icon debug_msg_enabled[34]
|
||||
#else
|
||||
#ifdef DEBUG_ICON
|
||||
#define dprintf_icon fprintf
|
||||
|
@ -1039,8 +1086,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_int if(!debug_msg_enabled[33]) ; else fprintf
|
||||
#define debugging_int debug_msg_enabled[33]
|
||||
#define dprintf_int if(!debug_msg_enabled[35]) ; else fprintf
|
||||
#define debugging_int debug_msg_enabled[35]
|
||||
#else
|
||||
#ifdef DEBUG_INT
|
||||
#define dprintf_int fprintf
|
||||
|
@ -1052,8 +1099,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_key if(!debug_msg_enabled[34]) ; else fprintf
|
||||
#define debugging_key debug_msg_enabled[34]
|
||||
#define dprintf_key if(!debug_msg_enabled[36]) ; else fprintf
|
||||
#define debugging_key debug_msg_enabled[36]
|
||||
#else
|
||||
#ifdef DEBUG_KEY
|
||||
#define dprintf_key fprintf
|
||||
|
@ -1065,8 +1112,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_keyboard if(!debug_msg_enabled[35]) ; else fprintf
|
||||
#define debugging_keyboard debug_msg_enabled[35]
|
||||
#define dprintf_keyboard if(!debug_msg_enabled[37]) ; else fprintf
|
||||
#define debugging_keyboard debug_msg_enabled[37]
|
||||
#else
|
||||
#ifdef DEBUG_KEYBOARD
|
||||
#define dprintf_keyboard fprintf
|
||||
|
@ -1078,8 +1125,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_ldt if(!debug_msg_enabled[36]) ; else fprintf
|
||||
#define debugging_ldt debug_msg_enabled[36]
|
||||
#define dprintf_ldt if(!debug_msg_enabled[38]) ; else fprintf
|
||||
#define debugging_ldt debug_msg_enabled[38]
|
||||
#else
|
||||
#ifdef DEBUG_LDT
|
||||
#define dprintf_ldt fprintf
|
||||
|
@ -1091,8 +1138,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_listbox if(!debug_msg_enabled[37]) ; else fprintf
|
||||
#define debugging_listbox debug_msg_enabled[37]
|
||||
#define dprintf_listbox if(!debug_msg_enabled[39]) ; else fprintf
|
||||
#define debugging_listbox debug_msg_enabled[39]
|
||||
#else
|
||||
#ifdef DEBUG_LISTBOX
|
||||
#define dprintf_listbox fprintf
|
||||
|
@ -1104,8 +1151,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_local if(!debug_msg_enabled[38]) ; else fprintf
|
||||
#define debugging_local debug_msg_enabled[38]
|
||||
#define dprintf_local if(!debug_msg_enabled[40]) ; else fprintf
|
||||
#define debugging_local debug_msg_enabled[40]
|
||||
#else
|
||||
#ifdef DEBUG_LOCAL
|
||||
#define dprintf_local fprintf
|
||||
|
@ -1117,8 +1164,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mci if(!debug_msg_enabled[39]) ; else fprintf
|
||||
#define debugging_mci debug_msg_enabled[39]
|
||||
#define dprintf_mci if(!debug_msg_enabled[41]) ; else fprintf
|
||||
#define debugging_mci debug_msg_enabled[41]
|
||||
#else
|
||||
#ifdef DEBUG_MCI
|
||||
#define dprintf_mci fprintf
|
||||
|
@ -1130,8 +1177,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mcianim if(!debug_msg_enabled[40]) ; else fprintf
|
||||
#define debugging_mcianim debug_msg_enabled[40]
|
||||
#define dprintf_mcianim if(!debug_msg_enabled[42]) ; else fprintf
|
||||
#define debugging_mcianim debug_msg_enabled[42]
|
||||
#else
|
||||
#ifdef DEBUG_MCIANIM
|
||||
#define dprintf_mcianim fprintf
|
||||
|
@ -1143,8 +1190,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mciwave if(!debug_msg_enabled[41]) ; else fprintf
|
||||
#define debugging_mciwave debug_msg_enabled[41]
|
||||
#define dprintf_mciwave if(!debug_msg_enabled[43]) ; else fprintf
|
||||
#define debugging_mciwave debug_msg_enabled[43]
|
||||
#else
|
||||
#ifdef DEBUG_MCIWAVE
|
||||
#define dprintf_mciwave fprintf
|
||||
|
@ -1156,8 +1203,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mdi if(!debug_msg_enabled[42]) ; else fprintf
|
||||
#define debugging_mdi debug_msg_enabled[42]
|
||||
#define dprintf_mdi if(!debug_msg_enabled[44]) ; else fprintf
|
||||
#define debugging_mdi debug_msg_enabled[44]
|
||||
#else
|
||||
#ifdef DEBUG_MDI
|
||||
#define dprintf_mdi fprintf
|
||||
|
@ -1169,8 +1216,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_menu if(!debug_msg_enabled[43]) ; else fprintf
|
||||
#define debugging_menu debug_msg_enabled[43]
|
||||
#define dprintf_menu if(!debug_msg_enabled[45]) ; else fprintf
|
||||
#define debugging_menu debug_msg_enabled[45]
|
||||
#else
|
||||
#ifdef DEBUG_MENU
|
||||
#define dprintf_menu fprintf
|
||||
|
@ -1182,8 +1229,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_message if(!debug_msg_enabled[44]) ; else fprintf
|
||||
#define debugging_message debug_msg_enabled[44]
|
||||
#define dprintf_message if(!debug_msg_enabled[46]) ; else fprintf
|
||||
#define debugging_message debug_msg_enabled[46]
|
||||
#else
|
||||
#ifdef DEBUG_MESSAGE
|
||||
#define dprintf_message fprintf
|
||||
|
@ -1195,8 +1242,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_metafile if(!debug_msg_enabled[45]) ; else fprintf
|
||||
#define debugging_metafile debug_msg_enabled[45]
|
||||
#define dprintf_metafile if(!debug_msg_enabled[47]) ; else fprintf
|
||||
#define debugging_metafile debug_msg_enabled[47]
|
||||
#else
|
||||
#ifdef DEBUG_METAFILE
|
||||
#define dprintf_metafile fprintf
|
||||
|
@ -1208,8 +1255,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_midi if(!debug_msg_enabled[46]) ; else fprintf
|
||||
#define debugging_midi debug_msg_enabled[46]
|
||||
#define dprintf_midi if(!debug_msg_enabled[48]) ; else fprintf
|
||||
#define debugging_midi debug_msg_enabled[48]
|
||||
#else
|
||||
#ifdef DEBUG_MIDI
|
||||
#define dprintf_midi fprintf
|
||||
|
@ -1221,8 +1268,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mmaux if(!debug_msg_enabled[47]) ; else fprintf
|
||||
#define debugging_mmaux debug_msg_enabled[47]
|
||||
#define dprintf_mmaux if(!debug_msg_enabled[49]) ; else fprintf
|
||||
#define debugging_mmaux debug_msg_enabled[49]
|
||||
#else
|
||||
#ifdef DEBUG_MMAUX
|
||||
#define dprintf_mmaux fprintf
|
||||
|
@ -1234,8 +1281,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mmio if(!debug_msg_enabled[48]) ; else fprintf
|
||||
#define debugging_mmio debug_msg_enabled[48]
|
||||
#define dprintf_mmio if(!debug_msg_enabled[50]) ; else fprintf
|
||||
#define debugging_mmio debug_msg_enabled[50]
|
||||
#else
|
||||
#ifdef DEBUG_MMIO
|
||||
#define dprintf_mmio fprintf
|
||||
|
@ -1247,8 +1294,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mmsys if(!debug_msg_enabled[49]) ; else fprintf
|
||||
#define debugging_mmsys debug_msg_enabled[49]
|
||||
#define dprintf_mmsys if(!debug_msg_enabled[51]) ; else fprintf
|
||||
#define debugging_mmsys debug_msg_enabled[51]
|
||||
#else
|
||||
#ifdef DEBUG_MMSYS
|
||||
#define dprintf_mmsys fprintf
|
||||
|
@ -1260,8 +1307,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mmtime if(!debug_msg_enabled[50]) ; else fprintf
|
||||
#define debugging_mmtime debug_msg_enabled[50]
|
||||
#define dprintf_mmtime if(!debug_msg_enabled[52]) ; else fprintf
|
||||
#define debugging_mmtime debug_msg_enabled[52]
|
||||
#else
|
||||
#ifdef DEBUG_MMTIME
|
||||
#define dprintf_mmtime fprintf
|
||||
|
@ -1273,8 +1320,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_module if(!debug_msg_enabled[51]) ; else fprintf
|
||||
#define debugging_module debug_msg_enabled[51]
|
||||
#define dprintf_module if(!debug_msg_enabled[53]) ; else fprintf
|
||||
#define debugging_module debug_msg_enabled[53]
|
||||
#else
|
||||
#ifdef DEBUG_MODULE
|
||||
#define dprintf_module fprintf
|
||||
|
@ -1286,8 +1333,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_msg if(!debug_msg_enabled[52]) ; else fprintf
|
||||
#define debugging_msg debug_msg_enabled[52]
|
||||
#define dprintf_msg if(!debug_msg_enabled[54]) ; else fprintf
|
||||
#define debugging_msg debug_msg_enabled[54]
|
||||
#else
|
||||
#ifdef DEBUG_MSG
|
||||
#define dprintf_msg fprintf
|
||||
|
@ -1299,8 +1346,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_nonclient if(!debug_msg_enabled[53]) ; else fprintf
|
||||
#define debugging_nonclient debug_msg_enabled[53]
|
||||
#define dprintf_nonclient if(!debug_msg_enabled[55]) ; else fprintf
|
||||
#define debugging_nonclient debug_msg_enabled[55]
|
||||
#else
|
||||
#ifdef DEBUG_NONCLIENT
|
||||
#define dprintf_nonclient fprintf
|
||||
|
@ -1312,8 +1359,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_ole if(!debug_msg_enabled[54]) ; else fprintf
|
||||
#define debugging_ole debug_msg_enabled[54]
|
||||
#define dprintf_ole if(!debug_msg_enabled[56]) ; else fprintf
|
||||
#define debugging_ole debug_msg_enabled[56]
|
||||
#else
|
||||
#ifdef DEBUG_OLE
|
||||
#define dprintf_ole fprintf
|
||||
|
@ -1325,8 +1372,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_palette if(!debug_msg_enabled[55]) ; else fprintf
|
||||
#define debugging_palette debug_msg_enabled[55]
|
||||
#define dprintf_palette if(!debug_msg_enabled[57]) ; else fprintf
|
||||
#define debugging_palette debug_msg_enabled[57]
|
||||
#else
|
||||
#ifdef DEBUG_PALETTE
|
||||
#define dprintf_palette fprintf
|
||||
|
@ -1338,8 +1385,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_profile if(!debug_msg_enabled[56]) ; else fprintf
|
||||
#define debugging_profile debug_msg_enabled[56]
|
||||
#define dprintf_profile if(!debug_msg_enabled[58]) ; else fprintf
|
||||
#define debugging_profile debug_msg_enabled[58]
|
||||
#else
|
||||
#ifdef DEBUG_PROFILE
|
||||
#define dprintf_profile fprintf
|
||||
|
@ -1351,8 +1398,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_progress if(!debug_msg_enabled[57]) ; else fprintf
|
||||
#define debugging_progress debug_msg_enabled[57]
|
||||
#define dprintf_progress if(!debug_msg_enabled[59]) ; else fprintf
|
||||
#define debugging_progress debug_msg_enabled[59]
|
||||
#else
|
||||
#ifdef DEBUG_PROGRESS
|
||||
#define dprintf_progress fprintf
|
||||
|
@ -1364,8 +1411,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_prop if(!debug_msg_enabled[58]) ; else fprintf
|
||||
#define debugging_prop debug_msg_enabled[58]
|
||||
#define dprintf_prop if(!debug_msg_enabled[60]) ; else fprintf
|
||||
#define debugging_prop debug_msg_enabled[60]
|
||||
#else
|
||||
#ifdef DEBUG_PROP
|
||||
#define dprintf_prop fprintf
|
||||
|
@ -1377,8 +1424,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_reg if(!debug_msg_enabled[59]) ; else fprintf
|
||||
#define debugging_reg debug_msg_enabled[59]
|
||||
#define dprintf_reg if(!debug_msg_enabled[61]) ; else fprintf
|
||||
#define debugging_reg debug_msg_enabled[61]
|
||||
#else
|
||||
#ifdef DEBUG_REG
|
||||
#define dprintf_reg fprintf
|
||||
|
@ -1390,8 +1437,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_region if(!debug_msg_enabled[60]) ; else fprintf
|
||||
#define debugging_region debug_msg_enabled[60]
|
||||
#define dprintf_region if(!debug_msg_enabled[62]) ; else fprintf
|
||||
#define debugging_region debug_msg_enabled[62]
|
||||
#else
|
||||
#ifdef DEBUG_REGION
|
||||
#define dprintf_region fprintf
|
||||
|
@ -1403,8 +1450,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_relay if(!debug_msg_enabled[61]) ; else fprintf
|
||||
#define debugging_relay debug_msg_enabled[61]
|
||||
#define dprintf_relay if(!debug_msg_enabled[63]) ; else fprintf
|
||||
#define debugging_relay debug_msg_enabled[63]
|
||||
#else
|
||||
#ifdef DEBUG_RELAY
|
||||
#define dprintf_relay fprintf
|
||||
|
@ -1416,8 +1463,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_resource if(!debug_msg_enabled[62]) ; else fprintf
|
||||
#define debugging_resource debug_msg_enabled[62]
|
||||
#define dprintf_resource if(!debug_msg_enabled[64]) ; else fprintf
|
||||
#define debugging_resource debug_msg_enabled[64]
|
||||
#else
|
||||
#ifdef DEBUG_RESOURCE
|
||||
#define dprintf_resource fprintf
|
||||
|
@ -1429,8 +1476,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_scroll if(!debug_msg_enabled[63]) ; else fprintf
|
||||
#define debugging_scroll debug_msg_enabled[63]
|
||||
#define dprintf_scroll if(!debug_msg_enabled[65]) ; else fprintf
|
||||
#define debugging_scroll debug_msg_enabled[65]
|
||||
#else
|
||||
#ifdef DEBUG_SCROLL
|
||||
#define dprintf_scroll fprintf
|
||||
|
@ -1442,8 +1489,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_selector if(!debug_msg_enabled[64]) ; else fprintf
|
||||
#define debugging_selector debug_msg_enabled[64]
|
||||
#define dprintf_selector if(!debug_msg_enabled[66]) ; else fprintf
|
||||
#define debugging_selector debug_msg_enabled[66]
|
||||
#else
|
||||
#ifdef DEBUG_SELECTOR
|
||||
#define dprintf_selector fprintf
|
||||
|
@ -1455,8 +1502,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_sem if(!debug_msg_enabled[65]) ; else fprintf
|
||||
#define debugging_sem debug_msg_enabled[65]
|
||||
#define dprintf_sem if(!debug_msg_enabled[67]) ; else fprintf
|
||||
#define debugging_sem debug_msg_enabled[67]
|
||||
#else
|
||||
#ifdef DEBUG_SEM
|
||||
#define dprintf_sem fprintf
|
||||
|
@ -1468,8 +1515,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_sendmsg if(!debug_msg_enabled[66]) ; else fprintf
|
||||
#define debugging_sendmsg debug_msg_enabled[66]
|
||||
#define dprintf_sendmsg if(!debug_msg_enabled[68]) ; else fprintf
|
||||
#define debugging_sendmsg debug_msg_enabled[68]
|
||||
#else
|
||||
#ifdef DEBUG_SENDMSG
|
||||
#define dprintf_sendmsg fprintf
|
||||
|
@ -1481,8 +1528,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_shm if(!debug_msg_enabled[67]) ; else fprintf
|
||||
#define debugging_shm debug_msg_enabled[67]
|
||||
#define dprintf_shm if(!debug_msg_enabled[69]) ; else fprintf
|
||||
#define debugging_shm debug_msg_enabled[69]
|
||||
#else
|
||||
#ifdef DEBUG_SHM
|
||||
#define dprintf_shm fprintf
|
||||
|
@ -1494,8 +1541,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_stress if(!debug_msg_enabled[68]) ; else fprintf
|
||||
#define debugging_stress debug_msg_enabled[68]
|
||||
#define dprintf_stress if(!debug_msg_enabled[70]) ; else fprintf
|
||||
#define debugging_stress debug_msg_enabled[70]
|
||||
#else
|
||||
#ifdef DEBUG_STRESS
|
||||
#define dprintf_stress fprintf
|
||||
|
@ -1507,8 +1554,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_string if(!debug_msg_enabled[69]) ; else fprintf
|
||||
#define debugging_string debug_msg_enabled[69]
|
||||
#define dprintf_string if(!debug_msg_enabled[71]) ; else fprintf
|
||||
#define debugging_string debug_msg_enabled[71]
|
||||
#else
|
||||
#ifdef DEBUG_STRING
|
||||
#define dprintf_string fprintf
|
||||
|
@ -1520,8 +1567,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_task if(!debug_msg_enabled[70]) ; else fprintf
|
||||
#define debugging_task debug_msg_enabled[70]
|
||||
#define dprintf_task if(!debug_msg_enabled[72]) ; else fprintf
|
||||
#define debugging_task debug_msg_enabled[72]
|
||||
#else
|
||||
#ifdef DEBUG_TASK
|
||||
#define dprintf_task fprintf
|
||||
|
@ -1533,8 +1580,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_text if(!debug_msg_enabled[71]) ; else fprintf
|
||||
#define debugging_text debug_msg_enabled[71]
|
||||
#define dprintf_text if(!debug_msg_enabled[73]) ; else fprintf
|
||||
#define debugging_text debug_msg_enabled[73]
|
||||
#else
|
||||
#ifdef DEBUG_TEXT
|
||||
#define dprintf_text fprintf
|
||||
|
@ -1546,8 +1593,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_thunk if(!debug_msg_enabled[72]) ; else fprintf
|
||||
#define debugging_thunk debug_msg_enabled[72]
|
||||
#define dprintf_thunk if(!debug_msg_enabled[74]) ; else fprintf
|
||||
#define debugging_thunk debug_msg_enabled[74]
|
||||
#else
|
||||
#ifdef DEBUG_THUNK
|
||||
#define dprintf_thunk fprintf
|
||||
|
@ -1559,8 +1606,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_timer if(!debug_msg_enabled[73]) ; else fprintf
|
||||
#define debugging_timer debug_msg_enabled[73]
|
||||
#define dprintf_timer if(!debug_msg_enabled[75]) ; else fprintf
|
||||
#define debugging_timer debug_msg_enabled[75]
|
||||
#else
|
||||
#ifdef DEBUG_TIMER
|
||||
#define dprintf_timer fprintf
|
||||
|
@ -1572,8 +1619,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_toolhelp if(!debug_msg_enabled[74]) ; else fprintf
|
||||
#define debugging_toolhelp debug_msg_enabled[74]
|
||||
#define dprintf_toolhelp if(!debug_msg_enabled[76]) ; else fprintf
|
||||
#define debugging_toolhelp debug_msg_enabled[76]
|
||||
#else
|
||||
#ifdef DEBUG_TOOLHELP
|
||||
#define dprintf_toolhelp fprintf
|
||||
|
@ -1585,8 +1632,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_tweak if(!debug_msg_enabled[75]) ; else fprintf
|
||||
#define debugging_tweak debug_msg_enabled[75]
|
||||
#define dprintf_tweak if(!debug_msg_enabled[77]) ; else fprintf
|
||||
#define debugging_tweak debug_msg_enabled[77]
|
||||
#else
|
||||
#ifdef DEBUG_TWEAK
|
||||
#define dprintf_tweak fprintf
|
||||
|
@ -1598,8 +1645,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_updown if(!debug_msg_enabled[76]) ; else fprintf
|
||||
#define debugging_updown debug_msg_enabled[76]
|
||||
#define dprintf_updown if(!debug_msg_enabled[78]) ; else fprintf
|
||||
#define debugging_updown debug_msg_enabled[78]
|
||||
#else
|
||||
#ifdef DEBUG_UPDOWN
|
||||
#define dprintf_updown fprintf
|
||||
|
@ -1611,8 +1658,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_ver if(!debug_msg_enabled[77]) ; else fprintf
|
||||
#define debugging_ver debug_msg_enabled[77]
|
||||
#define dprintf_ver if(!debug_msg_enabled[79]) ; else fprintf
|
||||
#define debugging_ver debug_msg_enabled[79]
|
||||
#else
|
||||
#ifdef DEBUG_VER
|
||||
#define dprintf_ver fprintf
|
||||
|
@ -1624,8 +1671,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_virtual if(!debug_msg_enabled[78]) ; else fprintf
|
||||
#define debugging_virtual debug_msg_enabled[78]
|
||||
#define dprintf_virtual if(!debug_msg_enabled[80]) ; else fprintf
|
||||
#define debugging_virtual debug_msg_enabled[80]
|
||||
#else
|
||||
#ifdef DEBUG_VIRTUAL
|
||||
#define dprintf_virtual fprintf
|
||||
|
@ -1637,8 +1684,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_vxd if(!debug_msg_enabled[79]) ; else fprintf
|
||||
#define debugging_vxd debug_msg_enabled[79]
|
||||
#define dprintf_vxd if(!debug_msg_enabled[81]) ; else fprintf
|
||||
#define debugging_vxd debug_msg_enabled[81]
|
||||
#else
|
||||
#ifdef DEBUG_VXD
|
||||
#define dprintf_vxd fprintf
|
||||
|
@ -1650,8 +1697,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_win if(!debug_msg_enabled[80]) ; else fprintf
|
||||
#define debugging_win debug_msg_enabled[80]
|
||||
#define dprintf_win if(!debug_msg_enabled[82]) ; else fprintf
|
||||
#define debugging_win debug_msg_enabled[82]
|
||||
#else
|
||||
#ifdef DEBUG_WIN
|
||||
#define dprintf_win fprintf
|
||||
|
@ -1663,8 +1710,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_win16drv if(!debug_msg_enabled[81]) ; else fprintf
|
||||
#define debugging_win16drv debug_msg_enabled[81]
|
||||
#define dprintf_win16drv if(!debug_msg_enabled[83]) ; else fprintf
|
||||
#define debugging_win16drv debug_msg_enabled[83]
|
||||
#else
|
||||
#ifdef DEBUG_WIN16DRV
|
||||
#define dprintf_win16drv fprintf
|
||||
|
@ -1676,8 +1723,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_win32 if(!debug_msg_enabled[82]) ; else fprintf
|
||||
#define debugging_win32 debug_msg_enabled[82]
|
||||
#define dprintf_win32 if(!debug_msg_enabled[84]) ; else fprintf
|
||||
#define debugging_win32 debug_msg_enabled[84]
|
||||
#else
|
||||
#ifdef DEBUG_WIN32
|
||||
#define dprintf_win32 fprintf
|
||||
|
@ -1689,8 +1736,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_winsock if(!debug_msg_enabled[83]) ; else fprintf
|
||||
#define debugging_winsock debug_msg_enabled[83]
|
||||
#define dprintf_winsock if(!debug_msg_enabled[85]) ; else fprintf
|
||||
#define debugging_winsock debug_msg_enabled[85]
|
||||
#else
|
||||
#ifdef DEBUG_WINSOCK
|
||||
#define dprintf_winsock fprintf
|
||||
|
@ -1701,6 +1748,19 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_x11 if(!debug_msg_enabled[86]) ; else fprintf
|
||||
#define debugging_x11 debug_msg_enabled[86]
|
||||
#else
|
||||
#ifdef DEBUG_X11
|
||||
#define dprintf_x11 fprintf
|
||||
#define debugging_x11 1
|
||||
#else
|
||||
#define dprintf_x11 while(0) fprintf
|
||||
#define debugging_x11 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#ifdef DEBUG_DEFINE_VARIABLES
|
||||
|
@ -1722,10 +1782,12 @@ static char *debug_msg_name[] = {
|
|||
"cursor",
|
||||
"dc",
|
||||
"dde",
|
||||
"ddraw",
|
||||
"dialog",
|
||||
"dll",
|
||||
"dosfs",
|
||||
"driver",
|
||||
"dsound",
|
||||
"edit",
|
||||
"event",
|
||||
"exec",
|
||||
|
@ -1789,6 +1851,7 @@ static char *debug_msg_name[] = {
|
|||
"win16drv",
|
||||
"win32",
|
||||
"winsock",
|
||||
"x11",
|
||||
""
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,432 @@
|
|||
#ifndef _WINE_DINPUT_H
|
||||
#define _WINE_DINPUT_H
|
||||
|
||||
#define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
|
||||
#define STDMETHOD_(ret,xfn) ret (CALLBACK *fn##xfn)
|
||||
#define PURE
|
||||
#define FAR
|
||||
#define THIS_ THIS,
|
||||
|
||||
#define DIRECTINPUT_VERSION 0x0500
|
||||
|
||||
/* Classes */
|
||||
DEFINE_GUID(CLSID_DirectInput, 0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(CLSID_DirectInputDevice, 0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
|
||||
/* Interfaces */
|
||||
DEFINE_GUID(IID_IDirectInputA, 0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(IID_IDirectInputW, 0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(IID_IDirectInput2A, 0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(IID_IDirectInput2W, 0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(IID_IDirectInputDeviceA, 0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(IID_IDirectInputDeviceW, 0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(IID_IDirectInputDevice2A, 0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(IID_IDirectInputDevice2W, 0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(IID_IDirectInputEffect, 0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
|
||||
|
||||
/* Predefined object types */
|
||||
DEFINE_GUID(GUID_XAxis, 0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(GUID_YAxis, 0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(GUID_ZAxis, 0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(GUID_RxAxis,0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(GUID_RyAxis,0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(GUID_RzAxis,0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(GUID_Slider,0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(GUID_Button,0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(GUID_Key, 0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(GUID_POV, 0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(GUID_Unknown,0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
|
||||
/* Predefined product GUIDs */
|
||||
DEFINE_GUID(GUID_SysMouse, 0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(GUID_SysKeyboard, 0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(GUID_Joystick, 0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
|
||||
/* predefined forcefeedback effects */
|
||||
DEFINE_GUID(GUID_ConstantForce, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
|
||||
DEFINE_GUID(GUID_RampForce, 0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
|
||||
DEFINE_GUID(GUID_Square, 0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
|
||||
DEFINE_GUID(GUID_Sine, 0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
|
||||
DEFINE_GUID(GUID_Triangle, 0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
|
||||
DEFINE_GUID(GUID_SawtoothUp, 0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
|
||||
DEFINE_GUID(GUID_SawtoothDown, 0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
|
||||
DEFINE_GUID(GUID_Spring, 0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
|
||||
DEFINE_GUID(GUID_Damper, 0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
|
||||
DEFINE_GUID(GUID_Inertia, 0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
|
||||
DEFINE_GUID(GUID_Friction, 0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
|
||||
DEFINE_GUID(GUID_CustomForce, 0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
|
||||
|
||||
typedef struct IDirectInput32A IDirectInput32A,*LPDIRECTINPUT32A;
|
||||
typedef struct IDirectInputDevice32A IDirectInputDevice32A,*LPDIRECTINPUTDEVICE32A;
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
GUID guidType;
|
||||
DWORD dwOfs;
|
||||
DWORD dwType;
|
||||
DWORD dwFlags;
|
||||
CHAR tszName[MAX_PATH];
|
||||
#if(DIRECTINPUT_VERSION >= 0x0500)
|
||||
DWORD dwFFMaxForce;
|
||||
DWORD dwFFForceResolution;
|
||||
WORD wCollectionNumber;
|
||||
WORD wDesignatorIndex;
|
||||
WORD wUsagePage;
|
||||
WORD wUsage;
|
||||
DWORD dwDimension;
|
||||
WORD wExponent;
|
||||
WORD wReserved;
|
||||
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
|
||||
} DIDEVICEOBJECTINSTANCE32A, *LPDIDEVICEOBJECTINSTANCE32A,*LPCDIDEVICEOBJECTINSTANCE32A;
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
GUID guidType;
|
||||
DWORD dwOfs;
|
||||
DWORD dwType;
|
||||
DWORD dwFlags;
|
||||
WCHAR tszName[MAX_PATH];
|
||||
#if(DIRECTINPUT_VERSION >= 0x0500)
|
||||
DWORD dwFFMaxForce;
|
||||
DWORD dwFFForceResolution;
|
||||
WORD wCollectionNumber;
|
||||
WORD wDesignatorIndex;
|
||||
WORD wUsagePage;
|
||||
WORD wUsage;
|
||||
DWORD dwDimension;
|
||||
WORD wExponent;
|
||||
WORD wReserved;
|
||||
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
|
||||
} DIDEVICEOBJECTINSTANCE32W, *LPDIDEVICEOBJECTINSTANCE32W,*LPCDIDEVICEOBJECTINSTANCE32W;
|
||||
DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE);
|
||||
DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE);
|
||||
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
GUID guidInstance;
|
||||
GUID guidProduct;
|
||||
DWORD dwDevType;
|
||||
CHAR tszInstanceName[MAX_PATH];
|
||||
CHAR tszProductName[MAX_PATH];
|
||||
#if(DIRECTINPUT_VERSION >= 0x0500)
|
||||
GUID guidFFDriver;
|
||||
WORD wUsagePage;
|
||||
WORD wUsage;
|
||||
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
|
||||
} DIDEVICEINSTANCE32A, *LPDIDEVICEINSTANCE32A, *LPCDIDEVICEINSTANCE32A;
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
GUID guidInstance;
|
||||
GUID guidProduct;
|
||||
DWORD dwDevType;
|
||||
WCHAR tszInstanceName[MAX_PATH];
|
||||
WCHAR tszProductName[MAX_PATH];
|
||||
#if(DIRECTINPUT_VERSION >= 0x0500)
|
||||
GUID guidFFDriver;
|
||||
WORD wUsagePage;
|
||||
WORD wUsage;
|
||||
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
|
||||
} DIDEVICEINSTANCE32W, *LPDIDEVICEINSTANCE32W, *LPCDIDEVICEINSTANCE32W;
|
||||
DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE);
|
||||
DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE);
|
||||
DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE);
|
||||
|
||||
typedef BOOL32 (CALLBACK * LPDIENUMDEVICESCALLBACK32A)(LPCDIDEVICEINSTANCE32A,LPVOID);
|
||||
typedef BOOL32 (CALLBACK * LPDIENUMDEVICESCALLBACK32W)(LPCDIDEVICEINSTANCE32W,LPVOID);
|
||||
DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESCALLBACK);
|
||||
|
||||
typedef BOOL32 (CALLBACK * LPDIENUMDEVICEOBJECTSCALLBACK32A)(LPCDIDEVICEOBJECTINSTANCE32A, LPVOID);
|
||||
typedef BOOL32 (CALLBACK * LPDIENUMDEVICEOBJECTSCALLBACK32W)(LPCDIDEVICEOBJECTINSTANCE32W,LPVOID);
|
||||
DECL_WINELIB_TYPE_AW(LPDIENUMDEVICEOBJECTSCALLBACK);
|
||||
|
||||
#define DIK_ESCAPE 0x01
|
||||
#define DIK_1 0x02
|
||||
#define DIK_2 0x03
|
||||
#define DIK_3 0x04
|
||||
#define DIK_4 0x05
|
||||
#define DIK_5 0x06
|
||||
#define DIK_6 0x07
|
||||
#define DIK_7 0x08
|
||||
#define DIK_8 0x09
|
||||
#define DIK_9 0x0A
|
||||
#define DIK_0 0x0B
|
||||
#define DIK_MINUS 0x0C /* - on main keyboard */
|
||||
#define DIK_EQUALS 0x0D
|
||||
#define DIK_BACK 0x0E /* backspace */
|
||||
#define DIK_TAB 0x0F
|
||||
#define DIK_Q 0x10
|
||||
#define DIK_W 0x11
|
||||
#define DIK_E 0x12
|
||||
#define DIK_R 0x13
|
||||
#define DIK_T 0x14
|
||||
#define DIK_Y 0x15
|
||||
#define DIK_U 0x16
|
||||
#define DIK_I 0x17
|
||||
#define DIK_O 0x18
|
||||
#define DIK_P 0x19
|
||||
#define DIK_LBRACKET 0x1A
|
||||
#define DIK_RBRACKET 0x1B
|
||||
#define DIK_RETURN 0x1C /* Enter on main keyboard */
|
||||
#define DIK_LCONTROL 0x1D
|
||||
#define DIK_A 0x1E
|
||||
#define DIK_S 0x1F
|
||||
#define DIK_D 0x20
|
||||
#define DIK_F 0x21
|
||||
#define DIK_G 0x22
|
||||
#define DIK_H 0x23
|
||||
#define DIK_J 0x24
|
||||
#define DIK_K 0x25
|
||||
#define DIK_L 0x26
|
||||
#define DIK_SEMICOLON 0x27
|
||||
#define DIK_APOSTROPHE 0x28
|
||||
#define DIK_GRAVE 0x29 /* accent grave */
|
||||
#define DIK_LSHIFT 0x2A
|
||||
#define DIK_BACKSLASH 0x2B
|
||||
#define DIK_Z 0x2C
|
||||
#define DIK_X 0x2D
|
||||
#define DIK_C 0x2E
|
||||
#define DIK_V 0x2F
|
||||
#define DIK_B 0x30
|
||||
#define DIK_N 0x31
|
||||
#define DIK_M 0x32
|
||||
#define DIK_COMMA 0x33
|
||||
#define DIK_PERIOD 0x34 /* . on main keyboard */
|
||||
#define DIK_SLASH 0x35 /* / on main keyboard */
|
||||
#define DIK_RSHIFT 0x36
|
||||
#define DIK_MULTIPLY 0x37 /* * on numeric keypad */
|
||||
#define DIK_LMENU 0x38 /* left Alt */
|
||||
#define DIK_SPACE 0x39
|
||||
#define DIK_CAPITAL 0x3A
|
||||
#define DIK_F1 0x3B
|
||||
#define DIK_F2 0x3C
|
||||
#define DIK_F3 0x3D
|
||||
#define DIK_F4 0x3E
|
||||
#define DIK_F5 0x3F
|
||||
#define DIK_F6 0x40
|
||||
#define DIK_F7 0x41
|
||||
#define DIK_F8 0x42
|
||||
#define DIK_F9 0x43
|
||||
#define DIK_F10 0x44
|
||||
#define DIK_NUMLOCK 0x45
|
||||
#define DIK_SCROLL 0x46 /* Scroll Lock */
|
||||
#define DIK_NUMPAD7 0x47
|
||||
#define DIK_NUMPAD8 0x48
|
||||
#define DIK_NUMPAD9 0x49
|
||||
#define DIK_SUBTRACT 0x4A /* - on numeric keypad */
|
||||
#define DIK_NUMPAD4 0x4B
|
||||
#define DIK_NUMPAD5 0x4C
|
||||
#define DIK_NUMPAD6 0x4D
|
||||
#define DIK_ADD 0x4E /* + on numeric keypad */
|
||||
#define DIK_NUMPAD1 0x4F
|
||||
#define DIK_NUMPAD2 0x50
|
||||
#define DIK_NUMPAD3 0x51
|
||||
#define DIK_NUMPAD0 0x52
|
||||
#define DIK_DECIMAL 0x53 /* . on numeric keypad */
|
||||
#define DIK_F11 0x57
|
||||
#define DIK_F12 0x58
|
||||
#define DIK_F13 0x64 /* (NEC PC98) */
|
||||
#define DIK_F14 0x65 /* (NEC PC98) */
|
||||
#define DIK_F15 0x66 /* (NEC PC98) */
|
||||
#define DIK_KANA 0x70 /* (Japanese keyboard) */
|
||||
#define DIK_CONVERT 0x79 /* (Japanese keyboard) */
|
||||
#define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */
|
||||
#define DIK_YEN 0x7D /* (Japanese keyboard) */
|
||||
#define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */
|
||||
#define DIK_CIRCUMFLEX 0x90 /* (Japanese keyboard) */
|
||||
#define DIK_AT 0x91 /* (NEC PC98) */
|
||||
#define DIK_COLON 0x92 /* (NEC PC98) */
|
||||
#define DIK_UNDERLINE 0x93 /* (NEC PC98) */
|
||||
#define DIK_KANJI 0x94 /* (Japanese keyboard) */
|
||||
#define DIK_STOP 0x95 /* (NEC PC98) */
|
||||
#define DIK_AX 0x96 /* (Japan AX) */
|
||||
#define DIK_UNLABELED 0x97 /* (J3100) */
|
||||
#define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */
|
||||
#define DIK_RCONTROL 0x9D
|
||||
#define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */
|
||||
#define DIK_DIVIDE 0xB5 /* / on numeric keypad */
|
||||
#define DIK_SYSRQ 0xB7
|
||||
#define DIK_RMENU 0xB8 /* right Alt */
|
||||
#define DIK_PAUSE 0xC5 /* Pause */
|
||||
#define DIK_HOME 0xC7 /* Home on arrow keypad */
|
||||
#define DIK_UP 0xC8 /* UpArrow on arrow keypad */
|
||||
#define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */
|
||||
#define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */
|
||||
#define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */
|
||||
#define DIK_END 0xCF /* End on arrow keypad */
|
||||
#define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */
|
||||
#define DIK_NEXT 0xD1 /* PgDn on arrow keypad */
|
||||
#define DIK_INSERT 0xD2 /* Insert on arrow keypad */
|
||||
#define DIK_DELETE 0xD3 /* Delete on arrow keypad */
|
||||
#define DIK_LWIN 0xDB /* Left Windows key */
|
||||
#define DIK_RWIN 0xDC /* Right Windows key */
|
||||
#define DIK_APPS 0xDD /* AppMenu key */
|
||||
#define DIK_POWER 0xDE
|
||||
#define DIK_SLEEP 0xDF
|
||||
#define DIK_BACKSPACE DIK_BACK /* backspace */
|
||||
#define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */
|
||||
#define DIK_LALT DIK_LMENU /* left Alt */
|
||||
#define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */
|
||||
#define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */
|
||||
#define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */
|
||||
#define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */
|
||||
#define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */
|
||||
#define DIK_RALT DIK_RMENU /* right Alt */
|
||||
#define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */
|
||||
#define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */
|
||||
#define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */
|
||||
#define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */
|
||||
#define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */
|
||||
#define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */
|
||||
|
||||
#define DIDFT_ALL 0x00000000
|
||||
#define DIDFT_RELAXIS 0x00000001
|
||||
#define DIDFT_ABSAXIS 0x00000002
|
||||
#define DIDFT_AXIS 0x00000003
|
||||
#define DIDFT_PSHBUTTON 0x00000004
|
||||
#define DIDFT_TGLBUTTON 0x00000008
|
||||
#define DIDFT_BUTTON 0x0000000C
|
||||
#define DIDFT_POV 0x00000010
|
||||
#define DIDFT_COLLECTION 0x00000040
|
||||
#define DIDFT_NODATA 0x00000080
|
||||
#define DIDFT_ANYINSTANCE 0x00FFFF00
|
||||
#define DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE
|
||||
#define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
|
||||
#define DIDFT_GETTYPE(n) LOBYTE(n)
|
||||
#define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
|
||||
#define DIDFT_FFACTUATOR 0x01000000
|
||||
#define DIDFT_FFEFFECTTRIGGER 0x02000000
|
||||
#define DIDFT_OUTPUT 0x10000000
|
||||
#define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
|
||||
#define DIDFT_NOCOLLECTION 0x00FFFF00
|
||||
#define DIDF_ABSAXIS 0x00000001
|
||||
#define DIDF_RELAXIS 0x00000002
|
||||
|
||||
typedef struct {
|
||||
DWORD dwOfs;
|
||||
DWORD dwData;
|
||||
DWORD dwTimeStamp;
|
||||
DWORD dwSequence;
|
||||
} DIDEVICEOBJECTDATA,*LPDIDEVICEOBJECTDATA,*LPCDIDEVICEOBJECTDATA;
|
||||
|
||||
typedef struct _DIOBJECTDATAFORMAT {
|
||||
const GUID *pguid;
|
||||
DWORD dwOfs;
|
||||
DWORD dwType;
|
||||
DWORD dwFlags;
|
||||
} DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
DWORD dwObjSize;
|
||||
DWORD dwFlags;
|
||||
DWORD dwDataSize;
|
||||
DWORD dwNumObjs;
|
||||
LPDIOBJECTDATAFORMAT rgodf;
|
||||
} DIDATAFORMAT, *LPDIDATAFORMAT,*LPCDIDATAFORMAT;
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
DWORD dwHeaderSize;
|
||||
DWORD dwObj;
|
||||
DWORD dwHow;
|
||||
} DIPROPHEADER,*LPDIPROPHEADER,*LPCDIPROPHEADER;
|
||||
|
||||
#define DIPH_DEVICE 0
|
||||
#define DIPH_BYOFFSET 1
|
||||
#define DIPH_BYID 2
|
||||
#define DIPH_BYUSAGE 3
|
||||
|
||||
typedef struct DIDEVCAPS {
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
DWORD dwDevType;
|
||||
DWORD dwAxes;
|
||||
DWORD dwButtons;
|
||||
DWORD dwPOVs;
|
||||
#if(DIRECTINPUT_VERSION >= 0x0500)
|
||||
DWORD dwFFSamplePeriod;
|
||||
DWORD dwFFMinTimeResolution;
|
||||
DWORD dwFirmwareRevision;
|
||||
DWORD dwHardwareRevision;
|
||||
DWORD dwFFDriverVersion;
|
||||
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
|
||||
} DIDEVCAPS,*LPDIDEVCAPS;
|
||||
|
||||
#define DIDC_ATTACHED 0x00000001
|
||||
#define DIDC_POLLEDDEVICE 0x00000002
|
||||
#define DIDC_EMULATED 0x00000004
|
||||
#define DIDC_POLLEDDATAFORMAT 0x00000008
|
||||
#define DIDC_FORCEFEEDBACK 0x00000100
|
||||
#define DIDC_FFATTACK 0x00000200
|
||||
#define DIDC_FFFADE 0x00000400
|
||||
#define DIDC_SATURATION 0x00000800
|
||||
#define DIDC_POSNEGCOEFFICIENTS 0x00001000
|
||||
#define DIDC_POSNEGSATURATION 0x00002000
|
||||
#define DIDC_DEADBAND 0x00004000
|
||||
|
||||
/* SetCooperativeLevel dwFlags */
|
||||
#define DISCL_EXCLUSIVE 0x00000001
|
||||
#define DISCL_NONEXCLUSIVE 0x00000002
|
||||
#define DISCL_FOREGROUND 0x00000004
|
||||
#define DISCL_BACKGROUND 0x00000008
|
||||
|
||||
#define THIS LPDIRECTINPUTDEVICE32A this
|
||||
typedef struct IDirectInputDeviceA_VTable {
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
|
||||
/*** IDirectInputDeviceA methods ***/
|
||||
STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
|
||||
STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACK32A,LPVOID,DWORD) PURE;
|
||||
STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
|
||||
STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
|
||||
STDMETHOD(Acquire)(THIS) PURE;
|
||||
STDMETHOD(Unacquire)(THIS) PURE;
|
||||
STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
|
||||
STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
|
||||
STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
|
||||
STDMETHOD(SetEventNotification)(THIS_ HANDLE32) PURE;
|
||||
STDMETHOD(SetCooperativeLevel)(THIS_ HWND32,DWORD) PURE;
|
||||
STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCE32A,DWORD,DWORD) PURE;
|
||||
STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCE32A) PURE;
|
||||
STDMETHOD(RunControlPanel)(THIS_ HWND32,DWORD) PURE;
|
||||
STDMETHOD(Initialize)(THIS_ HINSTANCE32,DWORD,REFGUID) PURE;
|
||||
} IDirectInputDeviceA_VTable,*LPDIRECTINPUTDEVICEA_VTABLE;
|
||||
|
||||
struct IDirectInputDevice32A {
|
||||
LPDIRECTINPUTDEVICEA_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
GUID guid;
|
||||
};
|
||||
#undef THIS
|
||||
|
||||
#define THIS LPDIRECTINPUT32A this
|
||||
typedef struct IDirectInputA_VTable {
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
|
||||
/*** IDirectInputA methods ***/
|
||||
STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICE32A*,LPUNKNOWN) PURE;
|
||||
STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACK32A,LPVOID,DWORD) PURE;
|
||||
STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
|
||||
STDMETHOD(RunControlPanel)(THIS_ HWND32,DWORD) PURE;
|
||||
STDMETHOD(Initialize)(THIS_ HINSTANCE32,DWORD) PURE;
|
||||
} IDirectInputA_VTable,*LPDIRECTINPUTA_VTABLE;
|
||||
|
||||
struct IDirectInput32A {
|
||||
LPDIRECTINPUTA_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
};
|
||||
#undef THIS
|
||||
#undef THIS_
|
||||
#undef STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
|
||||
#undef STDMETHOD_(ret,xfn) ret (CALLBACK *fn##xfn)
|
||||
#undef PURE
|
||||
#undef FAR
|
||||
#endif
|
|
@ -44,5 +44,6 @@ extern int DRIVE_Chdir( int drive, const char *path );
|
|||
extern int DRIVE_Disable( int drive );
|
||||
extern int DRIVE_Enable( int drive );
|
||||
extern int DRIVE_SetLogicalMapping ( int existing_drive, int new_drive );
|
||||
extern int DRIVE_OpenDevice( int drive, int flags );
|
||||
|
||||
#endif /* __WINE_DRIVE_H */
|
||||
|
|
|
@ -3,20 +3,27 @@
|
|||
|
||||
#include "mmsystem.h"
|
||||
|
||||
/* Direct Sound Component GUID {47D4D946-62E8-11cf-93BC-444553540000} */
|
||||
DEFINE_GUID(CLSID_DirectSound,0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
|
||||
DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
|
||||
|
||||
DEFINE_GUID(IID_IDirectSound, 0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
|
||||
DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
|
||||
DEFINE_GUID(IID_IDirectSoundNotify, 0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
|
||||
DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
|
||||
DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
|
||||
DEFINE_GUID(IID_IDirectSoundCapture, 0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
|
||||
DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
|
||||
DEFINE_GUID(IID_IKsPropertySet, 0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93);
|
||||
|
||||
|
||||
/* DirectSound 279afa83-4981-11ce-a521-0020af0be560 */
|
||||
DEFINE_GUID(IID_IDirectSound,0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
|
||||
/* DirectSoundBuffer 279afa85-4981-11ce-a521-0020af0be560 */
|
||||
DEFINE_GUID(IID_IDirectSoundBuffer,0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
|
||||
|
||||
typedef struct IDirectSound IDirectSound,*LPDIRECTSOUND;
|
||||
typedef struct IDirectSoundNotify IDirectSoundNotify,*LPDIRECTSOUNDNOTIFY;
|
||||
typedef struct IDirectSoundBuffer IDirectSoundBuffer,*LPDIRECTSOUNDBUFFER,**LPLPDIRECTSOUNDBUFFER;
|
||||
|
||||
#define _FACDS 0x878
|
||||
#define MAKE_DSHRESULT(code) MAKE_HRESULT(1,_FACDS,code)
|
||||
|
||||
#define DS_OK 0
|
||||
#define DSERR_ALLOCATED MAKE_DSHRESULT(10)
|
||||
#define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30)
|
||||
#define DSERR_INVALIDPARAM E_INVALIDARG
|
||||
|
@ -122,7 +129,13 @@ typedef struct _DSBUFFERDESC
|
|||
LPWAVEFORMATEX lpwfxFormat;
|
||||
} DSBUFFERDESC,*LPDSBUFFERDESC;
|
||||
|
||||
typedef struct _DSBPOSITIONNOTIFY
|
||||
{
|
||||
DWORD dwOffset;
|
||||
HANDLE32 hEventNotify;
|
||||
} DSBPOSITIONNOTIFY,*LPDSBPOSITIONNOTIFY;
|
||||
|
||||
typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
|
||||
|
||||
#define DSSPEAKER_HEADPHONE 1
|
||||
#define DSSPEAKER_MONO 2
|
||||
|
@ -131,7 +144,6 @@ typedef struct _DSBUFFERDESC
|
|||
#define DSSPEAKER_SURROUND 5
|
||||
|
||||
|
||||
|
||||
typedef LPVOID* LPLPVOID;
|
||||
|
||||
typedef BOOL32 (CALLBACK *LPDSENUMCALLBACK32W)(LPGUID,LPWSTR,LPWSTR,LPVOID);
|
||||
|
@ -143,11 +155,9 @@ extern HRESULT WINAPI DirectSoundCreate(LPGUID lpGUID,LPDIRECTSOUND * ppDS,IUnkn
|
|||
#define STDMETHOD_(ret,xfn) ret (CALLBACK *fn##xfn)
|
||||
#define PURE
|
||||
#define FAR
|
||||
#define ULONG DWORD
|
||||
#define THIS_ THIS,
|
||||
|
||||
#define THIS LPDIRECTSOUND this
|
||||
#define THIS_ LPDIRECTSOUND this,
|
||||
|
||||
typedef struct tagLPDIRECTSOUND_VTABLE
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
|
@ -171,12 +181,11 @@ struct IDirectSound {
|
|||
DWORD ref;
|
||||
int nrofbuffers;
|
||||
LPDIRECTSOUNDBUFFER *buffers;
|
||||
WAVEFORMATEX wfx; /* current main waveformat */
|
||||
};
|
||||
|
||||
#undef THIS
|
||||
#undef THIS_
|
||||
|
||||
#define THIS LPDIRECTSOUNDBUFFER this
|
||||
#define THIS_ LPDIRECTSOUNDBUFFER this,
|
||||
typedef struct tagLPDIRECTSOUNDBUFFER_VTABLE
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
|
@ -210,8 +219,36 @@ struct IDirectSoundBuffer {
|
|||
WAVEFORMATEX wfx;
|
||||
DWORD ref;
|
||||
LPBYTE buffer;
|
||||
DWORD playing,playpos,writepos,buflen;
|
||||
DWORD playflags,playing,playpos,writepos,buflen;
|
||||
LONG volume,pan;
|
||||
LPDIRECTSOUND dsound;
|
||||
DSBUFFERDESC dsbd;
|
||||
LPDSBPOSITIONNOTIFY notifies;
|
||||
int nrofnotifies;
|
||||
};
|
||||
#undef THIS
|
||||
|
||||
#define THIS LPDIRECTSOUNDNOTIFY this
|
||||
typedef struct IDirectSoundNotify_VTable {
|
||||
/* IUnknown methods */
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
/* IDirectSoundNotify methods */
|
||||
STDMETHOD(SetNotificationPositions) (THIS_ DWORD, LPCDSBPOSITIONNOTIFY) PURE;
|
||||
} *LPDIRECTSOUNDNOTIFY_VTABLE,IDirectSoundNotify_VTable;
|
||||
|
||||
struct IDirectSoundNotify {
|
||||
LPDIRECTSOUNDNOTIFY_VTABLE lpvtbl;
|
||||
DWORD ref;
|
||||
LPDIRECTSOUNDBUFFER dsb;
|
||||
};
|
||||
#undef THIS
|
||||
|
||||
#undef STDMETHOD
|
||||
#undef STDMETHOD_
|
||||
#undef PURE
|
||||
#undef FAR
|
||||
#undef THIS_
|
||||
#endif
|
||||
|
|
|
@ -26,4 +26,16 @@ extern BOOL32 FONT_Init( UINT16* pTextCaps );
|
|||
extern INT16 FONT_GetObject16( FONTOBJ * font, INT16 count, LPSTR buffer );
|
||||
extern INT32 FONT_GetObject32A( FONTOBJ * font, INT32 count, LPSTR buffer );
|
||||
|
||||
extern void FONT_LogFont32ATo16( const LOGFONT32A* font32, LPLOGFONT16 font16 );
|
||||
extern void FONT_LogFont32WTo16( const LOGFONT32W* font32, LPLOGFONT16 font16 );
|
||||
extern void FONT_LogFont16To32A( const LPLOGFONT16 font16, LPLOGFONT32A font32 );
|
||||
extern void FONT_LogFont16To32W( const LPLOGFONT16 font16, LPLOGFONT32W font32 );
|
||||
extern void FONT_TextMetric32Ato16(const LPTEXTMETRIC32A ptm32, LPTEXTMETRIC16 ptm16 );
|
||||
extern void FONT_TextMetric32Wto16(const LPTEXTMETRIC32W ptm32, LPTEXTMETRIC16 ptm16 );
|
||||
extern void FONT_TextMetric16to32A(const LPTEXTMETRIC16 ptm16, LPTEXTMETRIC32A ptm32 );
|
||||
extern void FONT_TextMetric16to32W(const LPTEXTMETRIC16 ptm16, LPTEXTMETRIC32W ptm32 );
|
||||
extern void FONT_TextMetric32Ato32W(const LPTEXTMETRIC32A ptm32A, LPTEXTMETRIC32W ptm32W );
|
||||
|
||||
|
||||
|
||||
#endif /* __WINE_FONT_H */
|
||||
|
|
|
@ -131,6 +131,11 @@ typedef struct
|
|||
INT32 DCOrgY;
|
||||
INT32 CursPosX; /* Current position */
|
||||
INT32 CursPosY;
|
||||
INT32 ArcDirection;
|
||||
BOOL32 UseWorldXform; /* Should we use the world transform? */
|
||||
/* (i.e. is it not equal to the */
|
||||
/* identity transformation?) */
|
||||
XFORM WorldXform; /* World transform */
|
||||
} WIN_DC_INFO;
|
||||
|
||||
typedef X11DRV_PDEVICE X_DC_INFO; /* Temporary */
|
||||
|
@ -286,6 +291,16 @@ typedef struct tagDC_FUNCS
|
|||
#define YLPTODP(dc,y) \
|
||||
(((y)-(dc)->wndOrgY) * (dc)->vportExtY / (dc)->wndExtY+(dc)->vportOrgY)
|
||||
|
||||
/* Device <-> logical size conversion */
|
||||
|
||||
#define XDSTOLS(dc,x) \
|
||||
((x) * (dc)->wndExtX / (dc)->vportExtX)
|
||||
#define YDSTOLS(dc,y) \
|
||||
((y) * (dc)->wndExtY / (dc)->vportExtY)
|
||||
#define XLSTODS(dc,x) \
|
||||
((x) * (dc)->vportExtX / (dc)->wndExtX)
|
||||
#define YLSTODS(dc,y) \
|
||||
((y) * (dc)->vportExtY / (dc)->wndExtY)
|
||||
|
||||
/* GDI local heap */
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ extern FARPROC16 MODULE_GetEntryPoint( HMODULE32 hModule, WORD ordinal );
|
|||
extern BOOL16 MODULE_SetEntryPoint( HMODULE32 hModule, WORD ordinal,
|
||||
WORD offset );
|
||||
extern FARPROC16 MODULE_GetWndProcEntry16( const char *name );
|
||||
extern FARPROC16 WIN32_GetProcAddress16( HMODULE32 hmodule, LPSTR name );
|
||||
extern FARPROC16 WINAPI WIN32_GetProcAddress16( HMODULE32 hmodule, LPSTR name );
|
||||
|
||||
/* builtin.c */
|
||||
extern BOOL32 BUILTIN_Init(void);
|
||||
|
@ -147,4 +147,7 @@ extern BOOL32 NE_LoadDLLs( NE_MODULE *pModule );
|
|||
extern void NE_FixupPrologs( NE_MODULE *pModule );
|
||||
extern void NE_InitializeDLLs( HMODULE16 hModule );
|
||||
|
||||
/* relay32/builtin.c */
|
||||
extern HMODULE32 BUILTIN32_LoadModule( LPCSTR name, BOOL32 force );
|
||||
|
||||
#endif /* __WINE_MODULE_H */
|
||||
|
|
|
@ -7,10 +7,15 @@
|
|||
|
||||
#include "windows.h"
|
||||
|
||||
typedef CHAR OLE_CHAR,OLECHAR;
|
||||
typedef LPCSTR OLE_LPCSTR;
|
||||
typedef LPSTR LPOLESTR;
|
||||
typedef LPCSTR LPCOLESTR;
|
||||
|
||||
typedef unsigned short VARTYPE;
|
||||
typedef LONG DISPID;
|
||||
|
||||
|
||||
/* object types */
|
||||
#define OT_LINK 1
|
||||
#define OT_EMBEDDED 2
|
||||
|
@ -260,4 +265,39 @@ OLESTATUS WINAPI OleRevokeServerDoc(LHSERVERDOC);
|
|||
OLESTATUS WINAPI OleRevokeClientDoc(LHCLIENTDOC);
|
||||
OLESTATUS WINAPI OleRevokeServer(LHSERVER);
|
||||
|
||||
typedef enum tagCALLCONV {
|
||||
CC_CDECL = 1,
|
||||
CC_MSCPASCAL = CC_CDECL + 1,
|
||||
CC_PASCAL = CC_MSCPASCAL,
|
||||
CC_MACPASCAL = CC_PASCAL + 1,
|
||||
CC_STDCALL = CC_MACPASCAL + 1,
|
||||
CC_RESERVED = CC_STDCALL + 1,
|
||||
CC_SYSCALL = CC_RESERVED + 1,
|
||||
CC_MPWCDECL = CC_SYSCALL + 1,
|
||||
CC_MPWPASCAL = CC_MPWCDECL + 1,
|
||||
CC_MAX = CC_MPWPASCAL + 1
|
||||
} CALLCONV;
|
||||
|
||||
typedef struct tagPARAMDATA {
|
||||
OLECHAR * szName; /* parameter name */
|
||||
VARTYPE vt; /* parameter type */
|
||||
} PARAMDATA, * LPPARAMDATA;
|
||||
|
||||
typedef struct tagMETHODDATA {
|
||||
OLECHAR * szName; /* method name */
|
||||
PARAMDATA * ppdata; /* pointer to an array of PARAMDATAs */
|
||||
DISPID dispid; /* method ID */
|
||||
UINT16 iMeth; /* method index */
|
||||
CALLCONV cc; /* calling convention */
|
||||
UINT16 cArgs; /* count of arguments */
|
||||
WORD wFlags; /* same wFlags as on IDispatch::Invoke() */
|
||||
VARTYPE vtReturn;
|
||||
} METHODDATA, * LPMETHODDATA;
|
||||
|
||||
typedef struct tagINTERFACEDATA {
|
||||
METHODDATA * pmethdata; /* pointer to an array of METHODDATAs */
|
||||
UINT16 cMembers; /* count of members */
|
||||
} INTERFACEDATA, * LPINTERFACEDATA;
|
||||
|
||||
|
||||
#endif /* __WINE_OLE_H */
|
||||
|
|
|
@ -25,7 +25,9 @@ typedef enum
|
|||
LANG_Ko, /* Korean */
|
||||
LANG_Hu, /* Hungarian */
|
||||
LANG_Pl, /* Polish */
|
||||
LANG_Po /* Portuguese */
|
||||
LANG_Po, /* Portuguese */
|
||||
LANG_Sw, /* Swedish */
|
||||
LANG_Ca /* Catalan */
|
||||
} WINE_LANGUAGE;
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Graphics paths (BeginPath, EndPath etc.)
|
||||
*
|
||||
* Copyright 1997 Martin Boehme
|
||||
* Copyright 1997, 1998 Martin Boehme
|
||||
*/
|
||||
|
||||
#ifndef __WINE_PATH_H
|
||||
|
@ -39,7 +39,12 @@ extern void PATH_InitGdiPath(GdiPath *pPath);
|
|||
extern void PATH_DestroyGdiPath(GdiPath *pPath);
|
||||
extern BOOL32 PATH_AssignGdiPath(GdiPath *pPathDest,
|
||||
const GdiPath *pPathSrc);
|
||||
|
||||
extern BOOL32 PATH_MoveTo(HDC32 hdc);
|
||||
extern BOOL32 PATH_LineTo(HDC32 hdc, INT32 x, INT32 y);
|
||||
extern BOOL32 PATH_Ellipse(HDC32 hdc, INT32 x1, INT32 y1,
|
||||
INT32 x2, INT32 y2);
|
||||
extern BOOL32 PATH_Arc(HDC32 hdc, INT32 x1, INT32 y1, INT32 x2, INT32 y2,
|
||||
INT32 xStart, INT32 yStart, INT32 xEnd, INT32 yEnd);
|
||||
|
||||
#endif /* __WINE_PATH_H */
|
||||
|
|
|
@ -20,8 +20,12 @@ struct pe_modref {
|
|||
#define PE_MODREF_PROCESS_ATTACHED 0x00000001
|
||||
#define PE_MODREF_NO_DLL_CALLS 0x00000002
|
||||
#define PE_MODREF_RELOCS_DONE 0x00000004
|
||||
#define PE_MODREF_TLS_ALLOCED 0x00000008
|
||||
int tlsindex;
|
||||
};
|
||||
|
||||
struct _PDB32;
|
||||
|
||||
typedef struct pe_modref PE_MODREF;
|
||||
|
||||
extern int PE_unloadImage(HMODULE32 hModule);
|
||||
|
@ -35,11 +39,13 @@ extern BOOL32 PE_EnumResourceLanguages32A(HMODULE32,LPCSTR,LPCSTR,ENUMRESLANGPRO
|
|||
extern BOOL32 PE_EnumResourceLanguages32W(HMODULE32,LPCWSTR,LPCWSTR,ENUMRESLANGPROC32W,LONG);
|
||||
extern HRSRC32 PE_FindResourceEx32W(HINSTANCE32,LPCWSTR,LPCWSTR,WORD);
|
||||
extern DWORD PE_SizeofResource32(HINSTANCE32,HRSRC32);
|
||||
extern HMODULE32 PE_LoadLibraryEx32A(LPCSTR,HFILE32,DWORD);
|
||||
extern HMODULE32 PE_LoadLibraryEx32A(LPCSTR,struct _PDB32*,HFILE32,DWORD);
|
||||
extern HGLOBAL32 PE_LoadResource32(HINSTANCE32,HRSRC32);
|
||||
|
||||
struct _PDB32; /* forward definition */
|
||||
struct _THDB; /* forward definition */
|
||||
extern void PE_InitializeDLLs(struct _PDB32*,DWORD,LPVOID);
|
||||
extern void PE_InitTls(struct _THDB*);
|
||||
|
||||
extern LPIMAGE_RESOURCE_DIRECTORY GetResDirEntryW(LPIMAGE_RESOURCE_DIRECTORY,LPCWSTR,DWORD,BOOL32);
|
||||
|
||||
|
|
|
@ -98,6 +98,11 @@ typedef struct _PDB32
|
|||
LCID locale; /* c4 Locale to be queried by GetThreadLocale (NT) */
|
||||
} PDB32;
|
||||
|
||||
/* PDB <-> Process id conversion macros */
|
||||
#define PROCESS_OBFUSCATOR ((DWORD)0xdeadbeef)
|
||||
#define PROCESS_ID_TO_PDB(id) ((PDB32 *)((id) ^ PROCESS_OBFUSCATOR))
|
||||
#define PDB_TO_PROCESS_ID(pdb) ((DWORD)(pdb) ^ PROCESS_OBFUSCATOR)
|
||||
|
||||
/* scheduler/process.c */
|
||||
extern PDB32 *PROCESS_Current(void);
|
||||
extern PDB32 *PROCESS_IdToPDB( DWORD id );
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <string.h>
|
||||
#include "windows.h"
|
||||
#include "ldt.h"
|
||||
#include "thread.h"
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
|
@ -46,11 +47,9 @@ typedef struct
|
|||
|
||||
#pragma pack(4)
|
||||
|
||||
/* Saved 16-bit stack for current process (Win16 only) */
|
||||
extern DWORD IF1632_Saved16_ss_sp;
|
||||
|
||||
#define CURRENT_STACK16 ((STACK16FRAME *)PTR_SEG_TO_LIN(IF1632_Saved16_ss_sp))
|
||||
#define CURRENT_DS (CURRENT_STACK16->ds)
|
||||
#define THREAD_STACK16(thdb) ((STACK16FRAME*)PTR_SEG_TO_LIN((thdb)->cur_stack))
|
||||
#define CURRENT_STACK16 (THREAD_STACK16(THREAD_Current()))
|
||||
#define CURRENT_DS (CURRENT_STACK16->ds)
|
||||
|
||||
/* varargs lists on the 16-bit stack */
|
||||
|
||||
|
@ -64,15 +63,19 @@ typedef void *VA_LIST16;
|
|||
*((type *)(void *)((char *)(list) - __VA_ROUNDED16(type))))
|
||||
#define VA_END16(list) ((void)0)
|
||||
|
||||
/* Push bytes on the 16-bit stack; return a segptr to the first pushed byte */
|
||||
#define STACK16_PUSH(size) \
|
||||
(memmove((char*)CURRENT_STACK16-(size),CURRENT_STACK16,sizeof(STACK16FRAME)),\
|
||||
IF1632_Saved16_ss_sp -= (size), \
|
||||
(SEGPTR)(IF1632_Saved16_ss_sp + sizeof(STACK16FRAME)))
|
||||
/* Push bytes on the 16-bit stack of a thread;
|
||||
* return a segptr to the first pushed byte
|
||||
*/
|
||||
#define STACK16_PUSH(thdb,size) \
|
||||
(memmove((char*)THREAD_STACK16(thdb)-(size),THREAD_STACK16(thdb), \
|
||||
sizeof(STACK16FRAME)), \
|
||||
(thdb)->cur_stack -= (size), \
|
||||
(SEGPTR)((thdb)->cur_stack + sizeof(STACK16FRAME)))
|
||||
|
||||
/* Pop bytes from the 16-bit stack */
|
||||
#define STACK16_POP(size) \
|
||||
(memmove((char*)CURRENT_STACK16+(size),CURRENT_STACK16,sizeof(STACK16FRAME)),\
|
||||
IF1632_Saved16_ss_sp += (size))
|
||||
/* Pop bytes from the 16-bit stack of a thread */
|
||||
#define STACK16_POP(thdb,size) \
|
||||
(memmove((char*)THREAD_STACK16(thdb)+(size),THREAD_STACK16(thdb), \
|
||||
sizeof(STACK16FRAME)), \
|
||||
(thdb)->cur_stack += (size))
|
||||
|
||||
#endif /* __WINE_STACKFRAME_H */
|
||||
|
|
|
@ -93,10 +93,12 @@
|
|||
#undef DEBUG_CURSOR
|
||||
#undef DEBUG_DC
|
||||
#undef DEBUG_DDE
|
||||
#undef DEBUG_DDRAW
|
||||
#undef DEBUG_DIALOG
|
||||
#undef DEBUG_DLL
|
||||
#undef DEBUG_DOSFS
|
||||
#undef DEBUG_DRIVER
|
||||
#undef DEBUG_DSOUND
|
||||
#undef DEBUG_EDIT
|
||||
#undef DEBUG_EVENT
|
||||
#undef DEBUG_EXEC
|
||||
|
@ -160,6 +162,7 @@
|
|||
#undef DEBUG_WIN16DRV
|
||||
#undef DEBUG_WIN32
|
||||
#undef DEBUG_WINSOCK
|
||||
#undef DEBUG_X11
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ALL
|
||||
|
@ -180,10 +183,12 @@
|
|||
#define DEBUG_CURSOR
|
||||
#define DEBUG_DC
|
||||
#define DEBUG_DDE
|
||||
#define DEBUG_DDRAW
|
||||
#define DEBUG_DIALOG
|
||||
#define DEBUG_DLL
|
||||
#define DEBUG_DOSFS
|
||||
#define DEBUG_DRIVER
|
||||
#define DEBUG_DSOUND
|
||||
#define DEBUG_EDIT
|
||||
#define DEBUG_EVENT
|
||||
#define DEBUG_EXEC
|
||||
|
@ -247,4 +252,5 @@
|
|||
#define DEBUG_WIN16DRV
|
||||
#define DEBUG_WIN32
|
||||
#define DEBUG_WINSOCK
|
||||
#define DEBUG_X11
|
||||
#endif
|
||||
|
|
|
@ -50,7 +50,7 @@ typedef struct _THDB
|
|||
struct _PDB32 *process; /* 08 Process owning this thread */
|
||||
K32OBJ *event; /* 0c Thread event */
|
||||
TEB teb; /* 10 Thread exception block */
|
||||
struct _PDB32 *process2; /* 40 Same as offset 08 (?) */
|
||||
DWORD cur_stack; /* 40 Current stack (was: process2) */
|
||||
DWORD flags; /* 44 Flags */
|
||||
DWORD exit_code; /* 48 Termination status */
|
||||
WORD teb_sel; /* 4c Selector to TEB */
|
||||
|
|
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* Thread safe wrappers around Xlib calls.
|
||||
* Always include this file instead of <X11/Xlib.h>.
|
||||
* This file was generated automatically by tools/make_X11wrappers
|
||||
*
|
||||
* Copyright 1998 Kristian Nielsen
|
||||
*/
|
||||
|
||||
#ifndef __WINE_TSXLIB_H
|
||||
#define __WINE_TSXLIB_H
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
extern XFontStruct * TSXLoadQueryFont(Display*, const char*);
|
||||
extern XModifierKeymap * TSXGetModifierMapping(Display*);
|
||||
extern XImage * TSXCreateImage(Display*, Visual*, unsigned int, int, int, char*, unsigned int, unsigned int, int, int);
|
||||
extern XImage * TSXGetImage(Display*, Drawable, int, int, unsigned int, unsigned int, unsigned long, int);
|
||||
extern Display * TSXOpenDisplay(const char*);
|
||||
extern void TSXrmInitialize(void);
|
||||
extern char * TSXGetAtomName(Display*, Atom);
|
||||
extern char * TSXKeysymToString(KeySym);
|
||||
extern Atom TSXInternAtom(Display*, const char*, int);
|
||||
extern Colormap TSXCreateColormap(Display*, Window, Visual*, int);
|
||||
extern Cursor TSXCreatePixmapCursor(Display*, Pixmap, Pixmap, XColor*, XColor*, unsigned int, unsigned int);
|
||||
extern Cursor TSXCreateFontCursor(Display*, unsigned int);
|
||||
extern GC TSXCreateGC(Display*, Drawable, unsigned long, XGCValues*);
|
||||
extern Pixmap TSXCreatePixmap(Display*, Drawable, unsigned int, unsigned int, unsigned int);
|
||||
extern Pixmap TSXCreateBitmapFromData(Display*, Drawable, const char*, unsigned int, unsigned int);
|
||||
extern Window TSXGetSelectionOwner(Display*, Atom);
|
||||
extern Window TSXCreateWindow(Display*, Window, int, int, unsigned int, unsigned int, unsigned int, int, unsigned int, Visual*, unsigned long, XSetWindowAttributes*);
|
||||
extern char ** TSXListFonts(Display*, const char*, int, int*);
|
||||
extern KeySym TSXKeycodeToKeysym(Display*, unsigned int, int);
|
||||
extern KeySym TSXLookupKeysym(XKeyEvent*, int);
|
||||
extern KeySym * TSXGetKeyboardMapping(Display*, unsigned int, int, int*);
|
||||
extern char * TSXResourceManagerString(Display*);
|
||||
extern int TSXInitThreads(void);
|
||||
extern int * TSXListDepths(Display*, int, int*);
|
||||
extern int TSXReconfigureWMWindow(Display*, Window, int, unsigned int, XWindowChanges*);
|
||||
extern int TSXSetWMProtocols(Display*, Window, Atom*, int);
|
||||
extern int TSXSetTransientForHint(Display*, Window, Window);
|
||||
extern int TSXActivateScreenSaver(Display*);
|
||||
extern int TSXAllocColor(Display*, Colormap, XColor*);
|
||||
extern int TSXAllocColorCells(Display*, Colormap, int, unsigned long*, unsigned int, unsigned long*, unsigned int);
|
||||
extern int TSXBell(Display*, int);
|
||||
extern int TSXChangeGC(Display*, GC, unsigned long, XGCValues*);
|
||||
extern int TSXChangeKeyboardControl(Display*, unsigned long, XKeyboardControl*);
|
||||
extern int TSXChangeProperty(Display*, Window, Atom, Atom, int, int, const unsigned char*, int);
|
||||
extern int TSXChangeWindowAttributes(Display*, Window, unsigned long, XSetWindowAttributes*);
|
||||
extern int TSXCheckTypedWindowEvent(Display*, Window, int, XEvent*);
|
||||
extern int TSXCheckWindowEvent(Display*, Window, long, XEvent*);
|
||||
extern int TSXConvertSelection(Display*, Atom, Atom, Atom, Window, Time);
|
||||
extern int TSXCopyArea(Display*, Drawable, Drawable, GC, int, int, unsigned int, unsigned int, int, int);
|
||||
extern int TSXCopyPlane(Display*, Drawable, Drawable, GC, int, int, unsigned int, unsigned int, int, int, unsigned long);
|
||||
extern int TSXDefineCursor(Display*, Window, Cursor);
|
||||
extern int TSXDestroyWindow(Display*, Window);
|
||||
extern int TSXDisplayKeycodes(Display*, int*, int*);
|
||||
extern int TSXDrawArc(Display*, Drawable, GC, int, int, unsigned int, unsigned int, int, int);
|
||||
extern int TSXDrawLine(Display*, Drawable, GC, int, int, int, int);
|
||||
extern int TSXDrawLines(Display*, Drawable, GC, XPoint*, int, int);
|
||||
extern int TSXDrawPoint(Display*, Drawable, GC, int, int);
|
||||
extern int TSXDrawRectangle(Display*, Drawable, GC, int, int, unsigned int, unsigned int);
|
||||
extern int TSXDrawSegments(Display*, Drawable, GC, XSegment*, int);
|
||||
extern int TSXDrawString(Display*, Drawable, GC, int, int, const char*, int);
|
||||
extern int TSXDrawText(Display*, Drawable, GC, int, int, XTextItem*, int);
|
||||
extern int TSXFillArc(Display*, Drawable, GC, int, int, unsigned int, unsigned int, int, int);
|
||||
extern int TSXFillPolygon(Display*, Drawable, GC, XPoint*, int, int, int);
|
||||
extern int TSXFillRectangle(Display*, Drawable, GC, int, int, unsigned int, unsigned int);
|
||||
extern int TSXFlush(Display*);
|
||||
extern int TSXFree(void*);
|
||||
extern int TSXFreeColors(Display*, Colormap, unsigned long*, int, unsigned long);
|
||||
extern int TSXFreeCursor(Display*, Cursor);
|
||||
extern int TSXFreeFont(Display*, XFontStruct*);
|
||||
extern int TSXFreeFontNames(char**);
|
||||
extern int TSXFreeGC(Display*, GC);
|
||||
extern int TSXFreeModifiermap(XModifierKeymap*);
|
||||
extern int TSXFreePixmap(Display*, Pixmap);
|
||||
extern int TSXGetFontProperty(XFontStruct*, Atom, unsigned long*);
|
||||
extern int TSXGetGeometry(Display*, Drawable, Window*, int*, int*, unsigned int*, unsigned int*, unsigned int*, unsigned int*);
|
||||
extern int TSXGetInputFocus(Display*, Window*, int*);
|
||||
extern int TSXGetKeyboardControl(Display*, XKeyboardState*);
|
||||
extern int TSXGetScreenSaver(Display*, int*, int*, int*, int*);
|
||||
extern int TSXGetWindowProperty(Display*, Window, Atom, long, long, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
|
||||
extern int TSXGetWindowAttributes(Display*, Window, XWindowAttributes*);
|
||||
extern int TSXGrabPointer(Display*, Window, int, unsigned int, int, int, Window, Cursor, Time);
|
||||
extern int TSXGrabServer(Display*);
|
||||
extern int TSXInstallColormap(Display*, Colormap);
|
||||
extern KeyCode TSXKeysymToKeycode(Display*, KeySym);
|
||||
extern int TSXMapWindow(Display*, Window);
|
||||
extern int TSXNextEvent(Display*, XEvent*);
|
||||
extern int TSXParseGeometry(const char*, int*, int*, unsigned int*, unsigned int*);
|
||||
extern int TSXPending(Display*);
|
||||
extern int TSXPutBackEvent(Display*, XEvent*);
|
||||
extern int TSXPutImage(Display*, Drawable, GC, XImage*, int, int, int, int, unsigned int, unsigned int);
|
||||
extern int TSXQueryColor(Display*, Colormap, XColor*);
|
||||
extern int TSXQueryPointer(Display*, Window, Window*, Window*, int*, int*, int*, int*, unsigned int*);
|
||||
extern int TSXQueryTree(Display*, Window, Window*, Window*, Window**, unsigned int*);
|
||||
extern int TSXResetScreenSaver(Display*);
|
||||
extern int TSXRestackWindows(Display*, Window*, int);
|
||||
extern int TSXSendEvent(Display*, Window, int, long, XEvent*);
|
||||
extern int TSXSetArcMode(Display*, GC, int);
|
||||
extern int TSXSetBackground(Display*, GC, unsigned long);
|
||||
extern int TSXSetClipMask(Display*, GC, Pixmap);
|
||||
extern int TSXSetClipOrigin(Display*, GC, int, int);
|
||||
extern int TSXSetClipRectangles(Display*, GC, int, int, XRectangle*, int, int);
|
||||
extern int TSXSetDashes(Display*, GC, int, const char*, int);
|
||||
extern int TSXSetFillStyle(Display*, GC, int);
|
||||
extern int TSXSetForeground(Display*, GC, unsigned long);
|
||||
extern int TSXSetFunction(Display*, GC, int);
|
||||
extern int TSXSetGraphicsExposures(Display*, GC, int);
|
||||
extern int TSXSetIconName(Display*, Window, const char*);
|
||||
extern int TSXSetInputFocus(Display*, Window, int, Time);
|
||||
extern int TSXSetLineAttributes(Display*, GC, unsigned int, int, int, int);
|
||||
extern int TSXSetScreenSaver(Display*, int, int, int, int);
|
||||
extern int TSXSetSelectionOwner(Display*, Atom, Window, Time);
|
||||
extern int TSXSetSubwindowMode(Display*, GC, int);
|
||||
extern int TSXStoreColor(Display*, Colormap, XColor*);
|
||||
extern int TSXStoreName(Display*, Window, const char*);
|
||||
extern int TSXSync(Display*, int);
|
||||
extern int TSXTextExtents(XFontStruct*, const char*, int, int*, int*, int*, XCharStruct*);
|
||||
extern int TSXTextWidth(XFontStruct*, const char*, int);
|
||||
extern int TSXUngrabPointer(Display*, Time);
|
||||
extern int TSXUngrabServer(Display*);
|
||||
extern int TSXUninstallColormap(Display*, Colormap);
|
||||
extern int TSXUnmapWindow(Display*, Window);
|
||||
extern int TSXWarpPointer(Display*, Window, Window, int, int, unsigned int, unsigned int, int, int);
|
||||
extern int (*TSXSynchronize(Display *, Bool))(Display *);
|
||||
extern void TS_XInitImageFuncPtrs(XImage *);
|
||||
|
||||
#endif /* __WINE_TSXLIB_H */
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Thread safe wrappers around xpm calls.
|
||||
* Always include this file instead of <X11/xpm.h>.
|
||||
* This file was generated automatically by tools/make_X11wrappers
|
||||
*
|
||||
* Copyright 1998 Kristian Nielsen
|
||||
*/
|
||||
|
||||
#ifndef __WINE_TSXPM_H
|
||||
#define __WINE_TSXPM_H
|
||||
|
||||
#include <X11/xpm.h>
|
||||
|
||||
extern int TSXpmCreatePixmapFromData(Display *, Drawable, char **, Pixmap *, Pixmap *, XpmAttributes *);
|
||||
extern int TSXpmAttributesSize(void);
|
||||
|
||||
#endif /* __WINE_TSXPM_H */
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Thread safe wrappers around Xresource calls.
|
||||
* Always include this file instead of <X11/Xresource.h>.
|
||||
* This file was generated automatically by tools/make_X11wrappers
|
||||
*
|
||||
* Copyright 1998 Kristian Nielsen
|
||||
*/
|
||||
|
||||
#ifndef __WINE_TSXRESOURCE_H
|
||||
#define __WINE_TSXRESOURCE_H
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xresource.h>
|
||||
|
||||
extern XrmQuark TSXrmUniqueQuark(void);
|
||||
extern int TSXrmGetResource(XrmDatabase, const char*, const char*, char**, XrmValue*);
|
||||
extern XrmDatabase TSXrmGetFileDatabase(const char*);
|
||||
extern XrmDatabase TSXrmGetStringDatabase(const char*);
|
||||
extern void TSXrmMergeDatabases(XrmDatabase, XrmDatabase*);
|
||||
extern void TSXrmParseCommand(XrmDatabase*, XrmOptionDescList, int, const char*, int*, char**);
|
||||
|
||||
#endif /* __WINE_TSXRESOURCE_H */
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Thread safe wrappers around XShm calls.
|
||||
* Always include this file instead of <X11/XShm.h>.
|
||||
* This file was generated automatically by tools/make_X11wrappers
|
||||
*
|
||||
* Copyright 1998 Kristian Nielsen
|
||||
*/
|
||||
|
||||
#ifndef __WINE_TSXSHM_H
|
||||
#define __WINE_TSXSHM_H
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/XShm.h>
|
||||
|
||||
extern Bool TSXShmQueryExtension(Display *);
|
||||
extern int TSXShmPixmapFormat(Display *);
|
||||
extern Status TSXShmDetach(Display *, XShmSegmentInfo *);
|
||||
extern Status TSXShmAttach(Display *, XShmSegmentInfo *);
|
||||
|
||||
#endif /* __WINE_TSXSHM_H */
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Thread safe wrappers around Xutil calls.
|
||||
* Always include this file instead of <X11/Xutil.h>.
|
||||
* This file was generated automatically by tools/make_X11wrappers
|
||||
*
|
||||
* Copyright 1998 Kristian Nielsen
|
||||
*/
|
||||
|
||||
#ifndef __WINE_TSXUTIL_H
|
||||
#define __WINE_TSXUTIL_H
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xresource.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
extern XClassHint * TSXAllocClassHint(void);
|
||||
extern XSizeHints * TSXAllocSizeHints(void);
|
||||
extern XWMHints * TSXAllocWMHints(void);
|
||||
extern int TSXClipBox(Region, XRectangle*);
|
||||
extern Region TSXCreateRegion(void);
|
||||
extern int TSXDeleteContext(Display*, XID, XContext);
|
||||
extern int TSXDestroyRegion(Region);
|
||||
extern int TSXEmptyRegion(Region);
|
||||
extern int TSXEqualRegion(Region, Region);
|
||||
extern int TSXFindContext(Display*, XID, XContext, XPointer*);
|
||||
extern int TSXGetWMSizeHints(Display*, Window, XSizeHints*, long*, Atom);
|
||||
extern int TSXIntersectRegion(Region, Region, Region);
|
||||
extern int TSXLookupString(XKeyEvent*, char*, int, KeySym*, XComposeStatus*);
|
||||
extern int TSXOffsetRegion(Region, int, int);
|
||||
extern int TSXPointInRegion(Region, int, int);
|
||||
extern Region TSXPolygonRegion(XPoint*, int, int);
|
||||
extern int TSXRectInRegion(Region, int, int, unsigned int, unsigned int);
|
||||
extern int TSXSaveContext(Display*, XID, XContext, const char*);
|
||||
extern void TSXSetWMProperties(Display*, Window, XTextProperty*, XTextProperty*, char**, int, XSizeHints*, XWMHints*, XClassHint*);
|
||||
extern void TSXSetWMSizeHints(Display*, Window, XSizeHints*, Atom);
|
||||
extern int TSXSetRegion(Display*, GC, Region);
|
||||
extern int TSXShrinkRegion(Region, int, int);
|
||||
extern int TSXStringListToTextProperty(char**, int, XTextProperty*);
|
||||
extern int TSXSubtractRegion(Region, Region, Region);
|
||||
extern int TSXUnionRectWithRegion(XRectangle*, Region, Region);
|
||||
extern int TSXUnionRegion(Region, Region, Region);
|
||||
extern int TSXXorRegion(Region, Region, Region);
|
||||
extern int TSXDestroyImage(struct _XImage *);
|
||||
extern unsigned long TSXGetPixel(struct _XImage *, int, int);
|
||||
extern int TSXPutPixel(struct _XImage *, int, int, unsigned long);
|
||||
extern struct _XImage * TSXSubImage(struct _XImage *, int, int, unsigned int, unsigned int);
|
||||
extern int TSXAddPixel(struct _XImage *, long);
|
||||
extern XContext TSXUniqueContext(void);
|
||||
|
||||
#endif /* __WINE_TSXUTIL_H */
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Thread safe wrappers around X11 calls
|
||||
*
|
||||
* Copyright 1998 Kristian Nielsen
|
||||
*/
|
||||
|
||||
#ifndef __WINE_TSX11DEFS_H
|
||||
#define __WINE_TSX11DEFS_H
|
||||
|
||||
#include "winbase.h"
|
||||
|
||||
extern CRITICAL_SECTION *TSX11_SectionPtr;
|
||||
|
||||
extern int TSX11_Init(void);
|
||||
|
||||
#define X11_LOCK() \
|
||||
(TSX11_SectionPtr ? EnterCriticalSection(TSX11_SectionPtr) : 0)
|
||||
|
||||
#define X11_UNLOCK() \
|
||||
(TSX11_SectionPtr ? LeaveCriticalSection(TSX11_SectionPtr) : 0)
|
||||
|
||||
#endif /* __WINE_TSX11DEFS_H */
|
|
@ -1 +1 @@
|
|||
#define WINE_RELEASE_INFO "Wine release 980118"
|
||||
#define WINE_RELEASE_INFO "Wine release 980201"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef __WINE_WIN_H
|
||||
#define __WINE_WIN_H
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include "ts_xlib.h"
|
||||
|
||||
#include "ldt.h"
|
||||
#include "class.h"
|
||||
|
|
|
@ -95,12 +95,6 @@ enum {
|
|||
TOTAL_PRINTER_DRIVER_FUNCTIONS /* insert functions before here */
|
||||
};
|
||||
|
||||
typedef struct PRINTER_FONTS_INFO
|
||||
{
|
||||
LOGFONT16 lf; /* LogFont infomation */
|
||||
TEXTMETRIC16 tm; /* Text metrics infomation */
|
||||
} PRINTER_FONTS_INFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LPSTR szDriver; /* Driver name eg EPSON */
|
||||
|
@ -108,8 +102,6 @@ typedef struct
|
|||
WORD ds_reg; /* DS of driver */
|
||||
FARPROC16 fn[TOTAL_PRINTER_DRIVER_FUNCTIONS]; /* Printer functions */
|
||||
int nUsageCount; /* Usage count, unload == 0 */
|
||||
int nPrinterFonts; /* Number of printer fonts */
|
||||
PRINTER_FONTS_INFO *paPrinterFonts; /* array of printer fonts */
|
||||
int nIndex; /* Index in global driver array */
|
||||
} LOADED_PRINTER_DRIVER;
|
||||
|
||||
|
@ -143,10 +135,8 @@ typedef struct DRAWMODE
|
|||
|
||||
typedef struct WINE_ENUM_PRINTER_FONT_CALLBACK
|
||||
{
|
||||
DWORD magic; /* magic number */
|
||||
int nMode; /* Mode 0=count, 1=store */
|
||||
int nCount; /* Callback count */
|
||||
LOADED_PRINTER_DRIVER *pLPD; /* Printer driver info */
|
||||
int (*proc)(LPENUMLOGFONT16, LPNEWTEXTMETRIC16, UINT16, LPARAM);
|
||||
LPARAM lp;
|
||||
} WEPFC;
|
||||
|
||||
#define DRVOBJ_PEN 1
|
||||
|
@ -160,9 +150,9 @@ typedef struct
|
|||
SEGPTR segptrPDEVICE; /* PDEVICE used by 16 bit printer drivers */
|
||||
LOGFONT16 lf; /* Current font details */
|
||||
TEXTMETRIC16 tm; /* Current font metrics */
|
||||
SEGPTR segptrFontInfo; /* Current font realized by printer driver */
|
||||
SEGPTR segptrBrushInfo; /* Current brush realized by printer driver */
|
||||
SEGPTR segptrPenInfo; /* Current pen realized by printer driver */
|
||||
LPFONTINFO16 FontInfo; /* Current font realized by printer driver */
|
||||
LPLOGBRUSH16 BrushInfo; /* Current brush realized by printer driver */
|
||||
LPLOGPEN16 PenInfo; /* Current pen realized by printer driver */
|
||||
} WIN16DRV_PDEVICE;
|
||||
|
||||
/*
|
||||
|
@ -183,10 +173,33 @@ extern DWORD PRTDRV_RealizeObject(LPPDEVICE lpDestDev, WORD wStyle,
|
|||
extern BOOL16 PRTDRV_EnumObj(LPPDEVICE lpDestDev, WORD iStyle, FARPROC16 lpfn, LPVOID lpb);
|
||||
extern DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
|
||||
RECT16 *lpClipRect, LPCSTR lpString, WORD wCount,
|
||||
SEGPTR lpFontInfo,SEGPTR lpDrawMode,
|
||||
LPFONTINFO16 lpFontInfo, SEGPTR lpDrawMode,
|
||||
SEGPTR lpTextXForm, SHORT *lpCharWidths,
|
||||
RECT16 * lpOpaqueRect, WORD wOptions);
|
||||
|
||||
extern WORD PRTDRV_Output(LPPDEVICE lpDestDev,
|
||||
WORD wStyle,
|
||||
WORD wCount,
|
||||
POINT16 *points,
|
||||
LPLOGPEN16 lpPen,
|
||||
LPLOGBRUSH16 lpBrush,
|
||||
SEGPTR lpDrawMode,
|
||||
HRGN32 hClipRgn);
|
||||
|
||||
DWORD PRTDRV_StretchBlt(LPPDEVICE lpDestDev,
|
||||
WORD wDestX, WORD wDestY,
|
||||
WORD wDestXext, WORD wDestYext,
|
||||
LPPDEVICE lpSrcDev,
|
||||
WORD wSrcX, WORD wSrcY,
|
||||
WORD wSrcXext, WORD wSrcYext,
|
||||
DWORD Rop3,
|
||||
LPLOGBRUSH16 lpBrush,
|
||||
SEGPTR lpDrawMode,
|
||||
RECT16 *lpClipRect);
|
||||
|
||||
extern WORD PRTDRV_GetCharWidth(LPPDEVICE lpDestDev, LPINT32 lpBuffer,
|
||||
WORD wFirstChar, WORD wLastChar, LPFONTINFO16 lpFontInfo,
|
||||
SEGPTR lpDrawMode, SEGPTR lpTextXForm );
|
||||
|
||||
/* Wine driver functions */
|
||||
|
||||
|
@ -203,11 +216,14 @@ extern BOOL32 WIN16DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
|
|||
extern BOOL32 WIN16DRV_LineTo( DC *dc, INT32 x, INT32 y );
|
||||
extern BOOL32 WIN16DRV_MoveToEx(DC *dc,INT32 x,INT32 y,LPPOINT32 pt);
|
||||
extern BOOL32 WIN16DRV_Polygon(DC *dc, LPPOINT32 pt, INT32 count );
|
||||
extern BOOL32 WIN16DRV_Polyline(DC *dc, LPPOINT32 pt, INT32 count );
|
||||
extern BOOL32 WIN16DRV_Rectangle(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom);
|
||||
extern HGDIOBJ32 WIN16DRV_SelectObject( DC *dc, HGDIOBJ32 handle );
|
||||
extern BOOL32 WIN16DRV_PatBlt( struct tagDC *dc, INT32 left, INT32 top,
|
||||
INT32 width, INT32 height, DWORD rop );
|
||||
|
||||
extern BOOL32 WIN16DRV_Ellipse(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom);
|
||||
extern BOOL32 WIN16DRV_EnumDeviceFonts( DC* dc, LPLOGFONT16 plf,
|
||||
DEVICEFONTENUMPROC proc, LPARAM lp );
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -54,5 +54,64 @@ typedef struct tagCONSOLE_SCREEN_BUFFER_INFO
|
|||
COORD dwMaximumWindowSize;
|
||||
} CONSOLE_SCREEN_BUFFER_INFO,*LPCONSOLE_SCREEN_BUFFER_INFO;
|
||||
|
||||
typedef struct tagCHAR_INFO
|
||||
{
|
||||
union
|
||||
{
|
||||
WCHAR UnicodeChar;
|
||||
CHAR AsciiChar;
|
||||
} Char;
|
||||
WORD Attributes;
|
||||
} CHAR_INFO,*LPCHAR_INFO;
|
||||
|
||||
typedef struct tagKEY_EVENT_RECORD
|
||||
{
|
||||
BOOL32 bKeyDown;
|
||||
WORD wRepeatCount;
|
||||
WORD wVirtualKeyCode;
|
||||
WORD wVirtualScanCode;
|
||||
union
|
||||
{
|
||||
WCHAR UniCodeChar;
|
||||
CHAR AsciiChar;
|
||||
} uChar;
|
||||
DWORD dwControlKeyState;
|
||||
} KEY_EVENT_RECORD,*LPKEY_EVENT_RECORD;
|
||||
|
||||
typedef struct tagMOUSE_EVENT_RECORD
|
||||
{
|
||||
COORD dwMousePosition;
|
||||
DWORD dwButtonState;
|
||||
DWORD dwControlKeyState;
|
||||
DWORD dwEventFlags;
|
||||
} MOUSE_EVENT_RECORD,*LPMOUSE_EVENT_RECORD;
|
||||
|
||||
typedef struct tagWINDOW_BUFFER_SIZE_RECORD
|
||||
{
|
||||
COORD dwSize;
|
||||
} WINDOW_BUFFER_SIZE_RECORD,*LPWINDOW_BUFFER_SIZE_RECORD;
|
||||
|
||||
typedef struct tagMENU_EVENT_RECORD
|
||||
{
|
||||
UINT32 dwCommandId; /* perhaps UINT16 ??? */
|
||||
} MENU_EVENT_RECORD,*LPMENU_EVENT_RECORD;
|
||||
|
||||
typedef struct tagFOCUS_EVENT_RECORD
|
||||
{
|
||||
BOOL32 bSetFocus; /* perhaps BOOL16 ??? */
|
||||
} FOCUS_EVENT_RECORD,*LPFOCUS_EVENT_RECORD;
|
||||
|
||||
typedef struct tagINPUT_RECORD
|
||||
{
|
||||
WORD EventType;
|
||||
union
|
||||
{
|
||||
KEY_EVENT_RECORD KeyEvent;
|
||||
MOUSE_EVENT_RECORD MouseEvent;
|
||||
WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
|
||||
MENU_EVENT_RECORD MenuEvent;
|
||||
FOCUS_EVENT_RECORD FocusEvent;
|
||||
} Event;
|
||||
} INPUT_RECORD,*LPINPUT_RECORD;
|
||||
|
||||
#endif /* __WINE_WINCON_H */
|
||||
|
|
|
@ -305,6 +305,12 @@ DECL_WINELIB_TYPE(MINMAXINFO);
|
|||
#define RDW_FRAME 0x0400
|
||||
#define RDW_NOFRAME 0x0800
|
||||
|
||||
/* debug flags */
|
||||
#define DBGFILL_ALLOC 0xfd
|
||||
#define DBGFILL_FREE 0xfb
|
||||
#define DBGFILL_BUFFER 0xf9
|
||||
#define DBGFILL_STACK 0xf7
|
||||
|
||||
/* WM_WINDOWPOSCHANGING/CHANGED struct */
|
||||
typedef struct
|
||||
{
|
||||
|
@ -1168,16 +1174,16 @@ typedef struct
|
|||
CHAR dfUnderline;
|
||||
CHAR dfStrikeOut;
|
||||
INT16 dfWeight;
|
||||
CHAR dfCHARSet;
|
||||
CHAR dfCharSet;
|
||||
INT16 dfPixWidth;
|
||||
INT16 dfPixHeight;
|
||||
CHAR dfPitchAndFamily;
|
||||
INT16 dfAvgWidth;
|
||||
INT16 dfMaxWidth;
|
||||
CHAR dfFirstCHAR;
|
||||
CHAR dfLastCHAR;
|
||||
CHAR dfDefaultCHAR;
|
||||
CHAR dfBreakCHAR;
|
||||
CHAR dfFirstChar;
|
||||
CHAR dfLastChar;
|
||||
CHAR dfDefaultChar;
|
||||
CHAR dfBreakChar;
|
||||
INT16 dfWidthBytes;
|
||||
LONG dfDevice;
|
||||
LONG dfFace;
|
||||
|
@ -1659,6 +1665,10 @@ DECL_WINELIB_TYPE(LPLOGPEN);
|
|||
#define GM_ADVANCED 2
|
||||
#define GM_LAST 2
|
||||
|
||||
/* Arc direction modes */
|
||||
#define AD_COUNTERCLOCKWISE 1
|
||||
#define AD_CLOCKWISE 2
|
||||
|
||||
/* Map modes */
|
||||
#define MM_TEXT 1
|
||||
#define MM_LOMETRIC 2
|
||||
|
@ -5466,6 +5476,31 @@ typedef struct
|
|||
DECL_WINELIB_TYPE_AW(MSGBOXPARAMS);
|
||||
DECL_WINELIB_TYPE_AW(LPMSGBOXPARAMS);
|
||||
|
||||
/* for WOWHandle{16,32} */
|
||||
typedef enum _WOW_HANDLE_TYPE { /* WOW */
|
||||
WOW_TYPE_HWND,
|
||||
WOW_TYPE_HMENU,
|
||||
WOW_TYPE_HDWP,
|
||||
WOW_TYPE_HDROP,
|
||||
WOW_TYPE_HDC,
|
||||
WOW_TYPE_HFONT,
|
||||
WOW_TYPE_HMETAFILE,
|
||||
WOW_TYPE_HRGN,
|
||||
WOW_TYPE_HBITMAP,
|
||||
WOW_TYPE_HBRUSH,
|
||||
WOW_TYPE_HPALETTE,
|
||||
WOW_TYPE_HPEN,
|
||||
WOW_TYPE_HACCEL,
|
||||
WOW_TYPE_HTASK,
|
||||
WOW_TYPE_FULLHWND
|
||||
} WOW_HANDLE_TYPE;
|
||||
|
||||
/* WOWCallback16Ex defines */
|
||||
#define WCB16_MAX_CBARGS 16
|
||||
/* ... dwFlags */
|
||||
#define WCB16_PASCAL 0x0
|
||||
#define WCB16_CDECL 0x1
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
/* Declarations for functions that exist only in Win16 */
|
||||
|
@ -5545,6 +5580,7 @@ DWORD WINAPI GetWinFlags(void);
|
|||
DWORD WINAPI GlobalDOSAlloc(DWORD);
|
||||
WORD WINAPI GlobalDOSFree(WORD);
|
||||
void WINAPI GlobalFreeAll(HGLOBAL16);
|
||||
DWORD WINAPI GlobalHandleNoRIP(WORD);
|
||||
HGLOBAL16 WINAPI GlobalLRUNewest(HGLOBAL16);
|
||||
HGLOBAL16 WINAPI GlobalLRUOldest(HGLOBAL16);
|
||||
VOID WINAPI GlobalNotify(FARPROC16);
|
||||
|
@ -5657,6 +5693,7 @@ HANDLE32 WINAPI CreateMutex32W(LPSECURITY_ATTRIBUTES,BOOL32,LPCWSTR);
|
|||
HANDLE32 WINAPI CreateSemaphore32A(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCSTR);
|
||||
HANDLE32 WINAPI CreateSemaphore32W(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCWSTR);
|
||||
#define CreateSemaphore WINELIB_NAME_AW(CreateSemaphore)
|
||||
HANDLE32 WINAPI CreateThread(LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
|
||||
BOOL32 WINAPI DestroyAcceleratorTable(HACCEL32);
|
||||
BOOL32 WINAPI DisableThreadLibraryCalls(HMODULE32);
|
||||
BOOL32 WINAPI DosDateTimeToFileTime(WORD,WORD,LPFILETIME);
|
||||
|
@ -5738,6 +5775,7 @@ DWORD WINAPI GetFileType(HFILE32);
|
|||
DWORD WINAPI GetFullPathName32A(LPCSTR,DWORD,LPSTR,LPSTR*);
|
||||
DWORD WINAPI GetFullPathName32W(LPCWSTR,DWORD,LPWSTR,LPWSTR*);
|
||||
#define GetFullPathName WINELIB_NAME_AW(GetFullPathName)
|
||||
INT32 WINAPI GetGraphicsMode(HDC32);
|
||||
DWORD WINAPI GetLargestConsoleWindowSize(HANDLE32);
|
||||
VOID WINAPI GetLocalTime(LPSYSTEMTIME);
|
||||
DWORD WINAPI GetLogicalDrives(void);
|
||||
|
@ -5776,6 +5814,7 @@ BOOL32 WINAPI GetUserName32A(LPSTR,LPDWORD);
|
|||
BOOL32 WINAPI GetUserName32W(LPWSTR,LPDWORD);
|
||||
#define GetUserName WINELIB_NAME_AW(GetUserName)
|
||||
DWORD WINAPI GetWindowThreadProcessId(HWND32,LPDWORD);
|
||||
BOOL32 WINAPI GetWorldTransform(HDC32,LPXFORM);
|
||||
VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS);
|
||||
LPVOID WINAPI HeapAlloc(HANDLE32,DWORD,DWORD);
|
||||
DWORD WINAPI HeapCompact(HANDLE32,DWORD);
|
||||
|
@ -5877,6 +5916,7 @@ VOID WINAPI SetFileApisToOEM(void);
|
|||
DWORD WINAPI SetFilePointer(HFILE32,LONG,LPLONG,DWORD);
|
||||
BOOL32 WINAPI SetFileTime(HFILE32,const FILETIME*,const FILETIME*,
|
||||
const FILETIME*);
|
||||
INT32 WINAPI SetGraphicsMode(HDC32,INT32);
|
||||
VOID WINAPI SetLastErrorEx(DWORD,DWORD);
|
||||
BOOL32 WINAPI SetMenuItemInfo32A(HMENU32,UINT32,BOOL32,const MENUITEMINFO32A*);
|
||||
BOOL32 WINAPI SetMenuItemInfo32W(HMENU32,UINT32,BOOL32,const MENUITEMINFO32W*);
|
||||
|
@ -5887,6 +5927,7 @@ BOOL32 WINAPI SetSystemPowerState(BOOL32,BOOL32);
|
|||
BOOL32 WINAPI SetSystemTime(const SYSTEMTIME*);
|
||||
BOOL32 WINAPI SetThreadPriority(HANDLE32,INT32);
|
||||
BOOL32 WINAPI SetTimeZoneInformation(const LPTIME_ZONE_INFORMATION);
|
||||
BOOL32 WINAPI SetWorldTransform(HDC32,const XFORM*);
|
||||
VOID WINAPI Sleep(DWORD);
|
||||
BOOL32 WINAPI SystemTimeToFileTime(const SYSTEMTIME*,LPFILETIME);
|
||||
BOOL32 WINAPI TrackPopupMenuEx(HMENU32,UINT32,INT32,INT32,HWND32,
|
||||
|
@ -5910,12 +5951,16 @@ DWORD WINAPI WaitForMultipleObjects(DWORD,const HANDLE32*,BOOL32,DWORD);
|
|||
DWORD WINAPI WaitForMultipleObjectsEx(DWORD,const HANDLE32*,BOOL32,DWORD,BOOL32);
|
||||
DWORD WINAPI WaitForSingleObject(HANDLE32,DWORD);
|
||||
DWORD WINAPI WaitForSingleObjectEx(HANDLE32,DWORD,BOOL32);
|
||||
SEGPTR WINAPI WOWGlobalAllocLock16(DWORD,DWORD,HGLOBAL16*);
|
||||
DWORD WINAPI WOWCallback16(FARPROC16,DWORD);
|
||||
BOOL32 WINAPI WOWCallback16Ex(FARPROC16,DWORD,DWORD,LPVOID,LPDWORD);
|
||||
HANDLE32 WINAPI WOWHandle32(WORD,WOW_HANDLE_TYPE);
|
||||
WORD WINAPI WOWHandle16(HANDLE32,WOW_HANDLE_TYPE);
|
||||
BOOL32 WINAPI WriteConsole32A(HANDLE32,LPCVOID,DWORD,LPDWORD,LPVOID);
|
||||
BOOL32 WINAPI WriteConsole32W(HANDLE32,LPCVOID,DWORD,LPDWORD,LPVOID);
|
||||
#define WriteConsole WINELIB_NAME_AW(WriteConsole)
|
||||
BOOL32 WINAPI WriteFile(HFILE32,LPVOID,DWORD,LPDWORD,LPOVERLAPPED);
|
||||
|
||||
|
||||
/* Declarations for functions that are the same in Win16 and Win32 */
|
||||
|
||||
VOID WINAPI CloseSound(VOID);
|
||||
|
@ -6634,6 +6679,9 @@ HWND32 WINAPI GetActiveWindow32(void);
|
|||
DWORD WINAPI GetAppCompatFlags16(HTASK16);
|
||||
DWORD WINAPI GetAppCompatFlags32(HTASK32);
|
||||
#define GetAppCompatFlags WINELIB_NAME(GetAppCompatFlags)
|
||||
INT16 WINAPI GetArcDirection16(HDC16);
|
||||
INT32 WINAPI GetArcDirection32(HDC32);
|
||||
#define GetArcDirection WINELIB_NAME(GetArcDirection)
|
||||
WORD WINAPI GetAsyncKeyState16(INT16);
|
||||
WORD WINAPI GetAsyncKeyState32(INT32);
|
||||
#define GetAsyncKeyState WINELIB_NAME(GetAsyncKeyState)
|
||||
|
@ -7314,6 +7362,10 @@ HICON16 WINAPI LoadIcon16(HINSTANCE16,SEGPTR);
|
|||
HICON32 WINAPI LoadIcon32A(HINSTANCE32,LPCSTR);
|
||||
HICON32 WINAPI LoadIcon32W(HINSTANCE32,LPCWSTR);
|
||||
#define LoadIcon WINELIB_NAME_AW(LoadIcon)
|
||||
HANDLE16 WINAPI LoadImage16(HINSTANCE16,LPCSTR,UINT16,INT16,INT16,UINT16);
|
||||
HANDLE32 WINAPI LoadImage32A(HINSTANCE32,LPCSTR,UINT32,INT32,INT32,UINT32);
|
||||
HANDLE32 WINAPI LoadImage32W(HINSTANCE32,LPCWSTR,UINT32,INT32,INT32,UINT32);
|
||||
#define LoadImage WINELIB_NAME_AW(LoadImage)
|
||||
HINSTANCE16 WINAPI LoadLibrary16(LPCSTR);
|
||||
HMODULE32 WINAPI LoadLibrary32A(LPCSTR);
|
||||
HMODULE32 WINAPI LoadLibrary32W(LPCWSTR);
|
||||
|
@ -7697,6 +7749,9 @@ LRESULT WINAPI SendMessageTimeout32W(HWND32,UINT32,WPARAM32,LPARAM,UINT32,
|
|||
HWND16 WINAPI SetActiveWindow16(HWND16);
|
||||
HWND32 WINAPI SetActiveWindow32(HWND32);
|
||||
#define SetActiveWindow WINELIB_NAME(SetActiveWindow)
|
||||
INT16 WINAPI SetArcDirection16(HDC16,INT16);
|
||||
INT32 WINAPI SetArcDirection32(HDC32,INT32);
|
||||
#define SetArcDirection WINELIB_NAME(SetArcDirection)
|
||||
LONG WINAPI SetBitmapBits16(HBITMAP16,LONG,LPCVOID);
|
||||
LONG WINAPI SetBitmapBits32(HBITMAP32,LONG,LPCVOID);
|
||||
#define SetBitmapBits WINELIB_NAME(SetBitmapBits)
|
||||
|
|
|
@ -25,10 +25,13 @@
|
|||
#define HEAP_WINE_CODESEG 0x02000000 /* Not a Win32 flag */
|
||||
|
||||
/* Processor feature flags. */
|
||||
#define PF_FLOATING_POINT_PRECISION_ERRATA 0
|
||||
#define PF_FLOATING_POINT_EMULATED 1
|
||||
#define PF_COMPARE_EXCHANGE_DOUBLE 2
|
||||
#define PF_MMX_INSTRUCTIONS_AVAILABLE 3
|
||||
#define PF_FLOATING_POINT_PRECISION_ERRATA 0
|
||||
#define PF_FLOATING_POINT_EMULATED 1
|
||||
#define PF_COMPARE_EXCHANGE_DOUBLE 2
|
||||
#define PF_MMX_INSTRUCTIONS_AVAILABLE 3
|
||||
#define PF_PPC_MOVEMEM_64BIT_OK 4
|
||||
#define PF_ALPHA_BYTE_INSTRUCTIONS 5
|
||||
|
||||
|
||||
/* The Win32 register context */
|
||||
|
||||
|
|
|
@ -475,8 +475,8 @@ typedef struct timeval TIMEVAL, *PTIMEVAL, *LPTIMEVAL;
|
|||
|
||||
/* ws_... struct conversion flags */
|
||||
|
||||
#define WS_DUP_LINEAR 0x0000
|
||||
#define WS_DUP_NATIVE 0x0001 /* native structure format (not ws_..) */
|
||||
#define WS_DUP_LINEAR 0x0001
|
||||
#define WS_DUP_NATIVE 0x0000 /* not used anymore */
|
||||
#define WS_DUP_OFFSET 0x0002 /* internal pointers are offsets */
|
||||
#define WS_DUP_SEGPTR 0x0004 /* internal pointers are SEGPTRs */
|
||||
/* by default, internal pointers are linear */
|
||||
|
@ -537,7 +537,7 @@ typedef struct __ws /* socket */
|
|||
ws_select_op* psop;
|
||||
} ws_socket;
|
||||
|
||||
#define WS_MAX_SOCKETS_PER_THREAD 16
|
||||
#define WS_MAX_SOCKETS_PER_PROCESS 16
|
||||
#define WS_MAX_UDP_DATAGRAM 1024
|
||||
|
||||
#define WSI_BLOCKINGCALL 0x00000001 /* per-thread info flags */
|
||||
|
@ -556,7 +556,7 @@ typedef struct _WSINFO
|
|||
char* buffer; /* allocated from SEGPTR heap */
|
||||
char* dbuffer; /* buffer for dummies (32 bytes) */
|
||||
|
||||
ws_socket sock[WS_MAX_SOCKETS_PER_THREAD];
|
||||
ws_socket sock[WS_MAX_SOCKETS_PER_PROCESS];
|
||||
DWORD blocking_hook;
|
||||
HTASK16 tid; /* owning task id - process might be better */
|
||||
} WSINFO, *LPWSINFO;
|
||||
|
@ -579,7 +579,7 @@ int WINSOCK_cancel_async_op(ws_async_op* p_aop);
|
|||
|
||||
void WINSOCK_cancel_task_aops(HTASK16, void (*__memfree)(void*) );
|
||||
|
||||
BOOL32 WINSOCK_HandleIO(int* fd_max, int num_pending, fd_set io_set[3] );
|
||||
BOOL32 WINSOCK_HandleIO(int* fd_max, int num_pending, fd_set pending_set[3], fd_set master_set[3] );
|
||||
void WINSOCK_Shutdown(void);
|
||||
UINT16 wsaErrno(void);
|
||||
UINT16 wsaHerrno(void);
|
||||
|
|
|
@ -0,0 +1,120 @@
|
|||
/* Definitions for windows network service
|
||||
*
|
||||
* Copyright 1997 Andreas Mohr
|
||||
*/
|
||||
#ifndef __WINE_WNET_H
|
||||
#define __WINE_WNET_H
|
||||
|
||||
#define WN_SUCCESS 0x0000
|
||||
#define WN_NOT_SUPPORTED 0x0001
|
||||
#define WN_NET_ERROR 0x0002
|
||||
#define WN_MORE_DATA 0x0003
|
||||
#define WN_BAD_POINTER 0x0004
|
||||
#define WN_BAD_VALUE 0x0005
|
||||
#define WN_BAD_PASSWORD 0x0006
|
||||
#define WN_ACCESS_DENIED 0x0007
|
||||
#define WN_FUNCTION_BUSY 0x0008
|
||||
#define WN_WINDOWS_ERROR 0x0009
|
||||
#define WN_BAD_USER 0x000A
|
||||
#define WN_OUT_OF_MEMORY 0x000B
|
||||
#define WN_CANCEL 0x000C
|
||||
#define WN_CONTINUE 0x000D
|
||||
#define WN_NOT_CONNECTED 0x0030
|
||||
#define WN_OPEN_FILES 0x0031
|
||||
#define WN_BAD_NETNAME 0x0032
|
||||
#define WN_BAD_LOCALNAME 0x0033
|
||||
#define WN_ALREADY_CONNECTED 0x0034
|
||||
#define WN_DEVICE_ERROR 0x0035
|
||||
#define WN_CONNECTION_CLOSED 0x0036
|
||||
#define WN_NO_NETWORK ERROR_NO_NETWORK
|
||||
|
||||
#define WNNC_SPEC_VERSION 0x01
|
||||
#define WNNC_NET_TYPE 0x02
|
||||
#define WNNC_DRIVER_VERSION 0x03
|
||||
#define WNNC_USER 0x04
|
||||
/*#define WNNC_5 0x05*/
|
||||
#define WNNC_CONNECTION 0x06
|
||||
#define WNNC_PRINTING 0x07
|
||||
#define WNNC_DIALOG 0x08
|
||||
#define WNNC_ADMIN 0x09
|
||||
#define WNNC_ERROR 0x0a
|
||||
#define WNNC_PRINTMGREXT 0x0b
|
||||
|
||||
#define WNNC_NET_NONE 0x0
|
||||
#define WNNC_NET_MSNet 0x1
|
||||
#define WNNC_NET_LanMan 0x2
|
||||
#define WNNC_NET_NetWare 0x3
|
||||
#define WNNC_NET_Vines 0x4
|
||||
#define WNNC_NET_10NET 0x5
|
||||
#define WNNC_NET_Locus 0x6
|
||||
#define WNNC_NET_SUN_PC_NFS 0x7
|
||||
#define WNNC_NET_LANstep 0x8
|
||||
#define WNNC_NET_9TILES 0x9
|
||||
#define WNNC_NET_LANtastic 0xa
|
||||
#define WNNC_NET_AS400 0xb
|
||||
#define WNNC_NET_FTP_NFS 0xc
|
||||
#define WNNC_NET_PATHWORKS 0xd
|
||||
#define WNNC_NET_LifeNet 0xe
|
||||
#define WNNC_NET_POWERLan 0xf
|
||||
#define WNNC_NET_MultiNet 0x8000
|
||||
|
||||
#define WNNC_SUBNET_NONE 0x00
|
||||
#define WNNC_SUBNET_MSNet 0x01
|
||||
#define WNNC_SUBNET_LanMan 0x02
|
||||
#define WNNC_SUBNET_WinWorkgroups 0x04
|
||||
#define WNNC_SUBNET_NetWare 0x08
|
||||
#define WNNC_SUBNET_Vines 0x10
|
||||
#define WNNC_SUBNET_Other 0x80
|
||||
|
||||
#define WNNC_CON_AddConnection 0x0001
|
||||
#define WNNC_CON_CancelConnection 0x0002
|
||||
#define WNNC_CON_GetConnections 0x0004
|
||||
#define WNNC_CON_AutoConnect 0x0008
|
||||
#define WNNC_CON_BrowseDialog 0x0010
|
||||
#define WNNC_CON_RestoreConnection 0x0020
|
||||
|
||||
#define WNNC_PRT_OpenJob 0x0002
|
||||
#define WNNC_PRT_CloseJob 0x0004
|
||||
#define WNNC_PRT_HoldJob 0x0010
|
||||
#define WNNC_PRT_ReleaseJob 0x0020
|
||||
#define WNNC_PRT_CancelJob 0x0040
|
||||
#define WNNC_PRT_SetJobCopies 0x0080
|
||||
#define WNNC_PRT_WatchQueue 0x0100
|
||||
#define WNNC_PRT_UnwatchQueue 0x0200
|
||||
#define WNNC_PRT_LockQueueData 0x0400
|
||||
#define WNNC_PRT_UnlockQueueData 0x0800
|
||||
#define WNNC_PRT_ChangeMsg 0x1000
|
||||
#define WNNC_PRT_AbortJob 0x2000
|
||||
#define WNNC_PRT_NoArbitraryLock 0x4000
|
||||
#define WNNC_PRT_WriteJob 0x8000
|
||||
|
||||
#define WNNC_DLG_DeviceMode 0x0001
|
||||
#define WNNC_DLG_BrowseDialog 0x0002
|
||||
#define WNNC_DLG_ConnectDialog 0x0004
|
||||
#define WNNC_DLG_DisconnectDialog 0x0008
|
||||
#define WNNC_DLG_ViewQueueDialog 0x0010
|
||||
#define WNNC_DLG_PropertyDialog 0x0020
|
||||
#define WNNC_DLG_ConnectionDialog 0x0040
|
||||
#define WNNC_DLG_PrinterConnectDialog 0x0080
|
||||
#define WNNC_DLG_SharesDialog 0x0100
|
||||
#define WNNC_DLG_ShareAsDialog 0x0200
|
||||
|
||||
#define WNNC_ADM_GetDirectoryType 0x0001
|
||||
#define WNNC_ADM_DirectoryNotify 0x0002
|
||||
#define WNNC_ADM_LongNames 0x0004
|
||||
#define WNNC_ADM_SetDefaultDrive 0x0008
|
||||
|
||||
#define WNNC_ERR_GetError 0x0001
|
||||
#define WNNC_ERR_GetErrorText 0x0002
|
||||
|
||||
#define WIN30X 0x0
|
||||
#define WIN31X 0x1
|
||||
#define WIN311X 0x2
|
||||
#define WIN95X 0x3
|
||||
#define WINNTX 0x4
|
||||
#define WINOTHERX 0x5
|
||||
#define WIN32X 0x6
|
||||
|
||||
typedef LPVOID LPNETRESOURCE16;
|
||||
|
||||
#endif /* __WINE_WNET_H */
|
|
@ -5,8 +5,9 @@
|
|||
#ifndef __WINE_X11DRV_H
|
||||
#define __WINE_X11DRV_H
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include "ts_xlib.h"
|
||||
#include "ts_xutil.h"
|
||||
#include "tsx11defs.h"
|
||||
|
||||
#include "windows.h"
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ static BOOL32 DDE_DoOneMessage (int proc_idx, int size, struct msgbuf *msgbuf)
|
|||
dprintf_msg(stddeb,"DDE_DoOneMessage: "
|
||||
"Trying to get acknowledgment from msg queue=%d\n",
|
||||
proc->msg);
|
||||
Yield(); /* force task switch, and */
|
||||
Yield16(); /* force task switch, and */
|
||||
/* acknowledgment sending */
|
||||
if (get_ack()) {
|
||||
return TRUE;
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
/* Sample winestub.c file for compiling programs with libwine.so. */
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "windows.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
/* Stub needed for linking with Winelib */
|
||||
/* FIXME: this should not be necessary */
|
||||
HMODULE32 BUILTIN_LoadModule( LPCSTR name, BOOL32 force ) { return 0; }
|
||||
|
||||
HMODULE32 BUILTIN_LoadModule( LPCSTR name, BOOL32 force ) {
|
||||
fprintf(stderr,"BUILTIN_LoadModule(%s,%d) called in a library!\n",name,force);
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern int PASCAL WinMain(HINSTANCE32,HINSTANCE32,LPSTR,int);
|
||||
extern int MAIN_WinelibInit(void);
|
||||
|
|
|
@ -4,7 +4,7 @@ SRCDIR = @srcdir@
|
|||
VPATH = @srcdir@
|
||||
MODULE = none
|
||||
RCFLAGS = -w16 -h
|
||||
PROGRAMS = expand hello hello2 hello3 hello4 new rolex
|
||||
PROGRAMS = expand hello hello2 hello3 hello4 hello5 new rolex
|
||||
ALL_LIBS = $(WINELIB) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
|
||||
|
||||
C_SRCS = \
|
||||
|
@ -13,6 +13,7 @@ C_SRCS = \
|
|||
hello2.c \
|
||||
hello3.c \
|
||||
hello4.c \
|
||||
hello5.c \
|
||||
new.c \
|
||||
rolex.c
|
||||
|
||||
|
@ -42,6 +43,9 @@ hello3: hello3res.o hello3.o
|
|||
hello4: hello4.o
|
||||
$(CC) -o hello4 hello4.o $(LDOPTIONS) $(ALL_LIBS)
|
||||
|
||||
hello5: hello5.o
|
||||
$(CC) -o hello5 hello5.o $(LDOPTIONS) $(ALL_LIBS)
|
||||
|
||||
new: new.o
|
||||
$(CC) -o new new.o $(LDOPTIONS) $(ALL_LIBS)
|
||||
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* This example demonstrates dynamical loading of (internal) Win32 DLLS.
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int PASCAL WinMain (HANDLE inst, HANDLE prev, LPSTR cmdline, int show)
|
||||
{
|
||||
SYSTEM_INFO si;
|
||||
void (CALLBACK *fnGetSystemInfo)(LPSYSTEM_INFO si);
|
||||
HMODULE32 kernel32;
|
||||
|
||||
kernel32 = LoadLibrary("KERNEL32");
|
||||
if (kernel32<32) {
|
||||
fprintf(stderr,"FATAL: could not load KERNEL32!\n");
|
||||
return 0;
|
||||
}
|
||||
fnGetSystemInfo = (void (CALLBACK*)(LPSYSTEM_INFO))GetProcAddress(kernel32,"GetSystemInfo");
|
||||
if (!fnGetSystemInfo) {
|
||||
fprintf(stderr,"FATAL: could not find GetSystemInfo!\n");
|
||||
return 0;
|
||||
}
|
||||
fnGetSystemInfo(&si);
|
||||
fprintf(stderr,"QuerySystemInfo returns:\n");
|
||||
fprintf(stderr," wProcessorArchitecture: %d\n",si.u.x.wProcessorArchitecture);
|
||||
fprintf(stderr," dwPageSize: %ld\n",si.dwPageSize);
|
||||
fprintf(stderr," lpMinimumApplicationAddress: %p\n",si.lpMinimumApplicationAddress);
|
||||
fprintf(stderr," lpMaximumApplicationAddress: %p\n",si.lpMaximumApplicationAddress);
|
||||
fprintf(stderr," dwActiveProcessorMask: %ld\n",si.dwActiveProcessorMask);
|
||||
fprintf(stderr," dwNumberOfProcessors: %ld\n",si.dwNumberOfProcessors);
|
||||
fprintf(stderr," dwProcessorType: %ld\n",si.dwProcessorType);
|
||||
fprintf(stderr," dwAllocationGranularity: %ld\n",si.dwAllocationGranularity);
|
||||
fprintf(stderr," wProcessorLevel: %d\n",si.wProcessorLevel);
|
||||
fprintf(stderr," wProcessorRevision: %d\n",si.wProcessorRevision);
|
||||
return 0;
|
||||
}
|
|
@ -1418,7 +1418,7 @@ HMODULE32 WINAPI LoadLibraryEx32W16( LPCSTR libname, HANDLE16 hf,
|
|||
DWORD flags )
|
||||
{
|
||||
fprintf(stderr,"LoadLibraryEx32W(%s,%d,%08lx)\n",libname,hf,flags);
|
||||
return LoadLibraryEx32A(libname,hf,flags);
|
||||
return LoadLibraryEx32A(libname, hf,flags);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -1428,13 +1428,13 @@ HMODULE32 WINAPI LoadLibraryEx32A(LPCSTR libname,HFILE32 hfile,DWORD flags)
|
|||
{
|
||||
HMODULE32 hmod;
|
||||
|
||||
hmod = PE_LoadLibraryEx32A(libname,hfile,flags);
|
||||
hmod = PE_LoadLibraryEx32A(libname,PROCESS_Current(),hfile,flags);
|
||||
if (hmod <= 32) {
|
||||
char buffer[256];
|
||||
|
||||
strcpy( buffer, libname );
|
||||
strcat( buffer, ".dll" );
|
||||
hmod = PE_LoadLibraryEx32A(buffer,hfile,flags);
|
||||
hmod = PE_LoadLibraryEx32A(buffer,PROCESS_Current(),hfile,flags);
|
||||
}
|
||||
/* initialize all DLLs, which haven't been initialized yet. */
|
||||
PE_InitializeDLLs( PROCESS_Current(), DLL_PROCESS_ATTACH, NULL);
|
||||
|
|
|
@ -69,15 +69,16 @@ BOOL32 NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
|
|||
STACK16FRAME *stack16Top;
|
||||
DWORD oldstack;
|
||||
WORD oldselector, newselector;
|
||||
THDB *thdb = THREAD_Current();
|
||||
HFILE32 hf = FILE_DupUnixHandle( fd );
|
||||
|
||||
selfloadheader = (SELFLOADHEADER *)
|
||||
PTR_SEG_OFF_TO_LIN(pSegTable->selector,0);
|
||||
oldstack = IF1632_Saved16_ss_sp;
|
||||
oldstack = thdb->cur_stack;
|
||||
oldselector = pSeg->selector;
|
||||
IF1632_Saved16_ss_sp = PTR_SEG_OFF_TO_SEGPTR(pModule->self_loading_sel,
|
||||
thdb->cur_stack = PTR_SEG_OFF_TO_SEGPTR(pModule->self_loading_sel,
|
||||
0xff00 - sizeof(*stack16Top));
|
||||
stack16Top = CURRENT_STACK16;
|
||||
stack16Top = (STACK16FRAME *)PTR_SEG_TO_LIN(thdb->cur_stack);
|
||||
stack16Top->frame32 = 0;
|
||||
stack16Top->ds = stack16Top->es = pModule->self_loading_sel;
|
||||
stack16Top->entry_point = 0;
|
||||
|
@ -107,7 +108,7 @@ BOOL32 NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
|
|||
}
|
||||
}
|
||||
|
||||
IF1632_Saved16_ss_sp = oldstack;
|
||||
thdb->cur_stack = oldstack;
|
||||
}
|
||||
else if (!(pSeg->flags & NE_SEGFLAGS_ITERATED))
|
||||
read(fd, mem, size);
|
||||
|
@ -368,6 +369,7 @@ BOOL32 NE_LoadAllSegments( NE_MODULE *pModule )
|
|||
SEGTABLEENTRY * pSegTable = (SEGTABLEENTRY *) NE_SEG_TABLE(pModule);
|
||||
SELFLOADHEADER *selfloadheader;
|
||||
STACK16FRAME *stack16Top;
|
||||
THDB *thdb = THREAD_Current();
|
||||
HMODULE16 hselfload = GetModuleHandle16("WPROCS");
|
||||
DWORD oldstack;
|
||||
WORD saved_dgroup = pSegTable[pModule->dgroup - 1].selector;
|
||||
|
@ -382,10 +384,10 @@ BOOL32 NE_LoadAllSegments( NE_MODULE *pModule )
|
|||
selfloadheader->MyAlloc = MODULE_GetEntryPoint(hselfload,28);
|
||||
selfloadheader->SetOwner = MODULE_GetEntryPoint(GetModuleHandle16("KERNEL"),403);
|
||||
pModule->self_loading_sel = GlobalHandleToSel(GLOBAL_Alloc(GMEM_ZEROINIT, 0xFF00, pModule->self, FALSE, FALSE, FALSE));
|
||||
oldstack = IF1632_Saved16_ss_sp;
|
||||
IF1632_Saved16_ss_sp = PTR_SEG_OFF_TO_SEGPTR(pModule->self_loading_sel,
|
||||
oldstack = thdb->cur_stack;
|
||||
thdb->cur_stack = PTR_SEG_OFF_TO_SEGPTR(pModule->self_loading_sel,
|
||||
0xff00 - sizeof(*stack16Top) );
|
||||
stack16Top = CURRENT_STACK16;
|
||||
stack16Top = (STACK16FRAME *)PTR_SEG_TO_LIN(thdb->cur_stack);
|
||||
stack16Top->frame32 = 0;
|
||||
stack16Top->ebp = 0;
|
||||
stack16Top->ds = stack16Top->es = pModule->self_loading_sel;
|
||||
|
@ -401,7 +403,7 @@ BOOL32 NE_LoadAllSegments( NE_MODULE *pModule )
|
|||
_lclose32(hf);
|
||||
/* some BootApp procs overwrite the selector of dgroup */
|
||||
pSegTable[pModule->dgroup - 1].selector = saved_dgroup;
|
||||
IF1632_Saved16_ss_sp = oldstack;
|
||||
thdb->cur_stack = oldstack;
|
||||
for (i = 2; i <= pModule->seg_count; i++)
|
||||
if (!NE_LoadSegment( pModule, i )) return FALSE;
|
||||
}
|
||||
|
@ -622,7 +624,7 @@ static BOOL32 NE_InitDLL( TDB* pTask, HMODULE16 hModule )
|
|||
|
||||
CS_reg(&context) = pSegTable[pModule->cs-1].selector;
|
||||
EIP_reg(&context) = pModule->ip;
|
||||
EBP_reg(&context) = OFFSETOF(IF1632_Saved16_ss_sp)
|
||||
EBP_reg(&context) = OFFSETOF(THREAD_Current()->cur_stack)
|
||||
+ (WORD)&((STACK16FRAME*)0)->bp;
|
||||
EDI_reg(&context) = DS_reg(&context) ? DS_reg(&context) : hModule;
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "neexe.h"
|
||||
#include "peexe.h"
|
||||
#include "process.h"
|
||||
#include "thread.h"
|
||||
#include "pe_image.h"
|
||||
#include "module.h"
|
||||
#include "global.h"
|
||||
|
@ -166,8 +167,7 @@ FARPROC32 PE_FindExportedFunction( HMODULE32 hModule, LPCSTR funcName)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
fixup_imports (PDB32 *process,PE_MODREF *pem,HMODULE32 hModule)
|
||||
DWORD fixup_imports (PDB32 *process,PE_MODREF *pem,HMODULE32 hModule)
|
||||
{
|
||||
IMAGE_IMPORT_DESCRIPTOR *pe_imp;
|
||||
int fixup_failed = 0;
|
||||
|
@ -205,7 +205,7 @@ fixup_imports (PDB32 *process,PE_MODREF *pem,HMODULE32 hModule)
|
|||
char *name = (char *) RVA(pe_imp->Name);
|
||||
|
||||
/* don't use MODULE_Load, Win32 creates new task differently */
|
||||
res = PE_LoadLibraryEx32A( name, 0, 0 );
|
||||
res = PE_LoadLibraryEx32A( name, process, 0, 0 );
|
||||
if (res <= (HMODULE32) 32) {
|
||||
char *p, buffer[1024];
|
||||
|
||||
|
@ -214,11 +214,11 @@ fixup_imports (PDB32 *process,PE_MODREF *pem,HMODULE32 hModule)
|
|||
if (!(p = strrchr (buffer, '\\')))
|
||||
p = buffer;
|
||||
strcpy (p + 1, name);
|
||||
res = PE_LoadLibraryEx32A( buffer, 0, 0 );
|
||||
res = PE_LoadLibraryEx32A( buffer, process, 0, 0 );
|
||||
}
|
||||
if (res <= (HMODULE32) 32) {
|
||||
fprintf (stderr, "Module %s not found\n", name);
|
||||
exit (0);
|
||||
return res;
|
||||
}
|
||||
res = MODULE_HANDLEtoHMODULE32(res);
|
||||
xpem = pem->next;
|
||||
|
@ -328,7 +328,8 @@ fixup_imports (PDB32 *process,PE_MODREF *pem,HMODULE32 hModule)
|
|||
}
|
||||
pe_imp++;
|
||||
}
|
||||
if (fixup_failed) exit(1);
|
||||
if (fixup_failed) return 22;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int calc_vma_size( HMODULE32 hModule )
|
||||
|
@ -628,10 +629,6 @@ static HMODULE32 PE_MapImage( HMODULE32 hModule, PDB32 *process,
|
|||
[IMAGE_DIRECTORY_ENTRY_GLOBALPTR].Size)
|
||||
dprintf_win32(stdnimp,"Global Pointer (MIPS) ignored\n");
|
||||
|
||||
if(nt_header->OptionalHeader.DataDirectory
|
||||
[IMAGE_DIRECTORY_ENTRY_TLS].Size)
|
||||
fprintf(stdnimp,"Thread local storage ignored\n");
|
||||
|
||||
if(nt_header->OptionalHeader.DataDirectory
|
||||
[IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG].Size)
|
||||
dprintf_win32(stdnimp,"Load Configuration directory ignored\n");
|
||||
|
@ -652,7 +649,28 @@ static HMODULE32 PE_MapImage( HMODULE32 hModule, PDB32 *process,
|
|||
|
||||
if(pem->pe_reloc) do_relocations(pem);
|
||||
if(pem->pe_export) dump_exports(pem->module);
|
||||
if(pem->pe_import) fixup_imports(process,pem,hModule);
|
||||
if(pem->pe_import) {
|
||||
if (fixup_imports(process,pem,hModule)) {
|
||||
PE_MODREF **xpem;
|
||||
|
||||
/* remove entry from modref chain */
|
||||
xpem = &(process->modref_list);
|
||||
while (*xpem) {
|
||||
if (*xpem==pem) {
|
||||
*xpem = pem->next;
|
||||
break;
|
||||
}
|
||||
xpem = &((*xpem)->next);
|
||||
}
|
||||
/* FIXME: there are several more dangling references
|
||||
* left. Including dlls loaded by this dll before the
|
||||
* failed one. Unrolling is rather difficult with the
|
||||
* current structure and we can leave it them lying
|
||||
* around with no problems, so we don't care
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (pem->pe_export)
|
||||
modname = (char*)RVA(pem->pe_export->Name);
|
||||
|
@ -678,9 +696,11 @@ HINSTANCE16 MODULE_CreateInstance(HMODULE16 hModule,LOADPARAMS *params);
|
|||
* FIXME: handle the flags.
|
||||
* internal module handling should be made better here (and in builtin.c)
|
||||
*/
|
||||
HMODULE32 PE_LoadLibraryEx32A (LPCSTR name, HFILE32 hFile, DWORD flags) {
|
||||
HMODULE32 PE_LoadLibraryEx32A (LPCSTR name, PDB32 *process,
|
||||
HFILE32 hFile, DWORD flags)
|
||||
{
|
||||
OFSTRUCT ofs;
|
||||
HMODULE32 hModule;
|
||||
HMODULE32 hModule,ret;
|
||||
NE_MODULE *pModule;
|
||||
PE_MODREF *pem;
|
||||
|
||||
|
@ -690,14 +710,13 @@ HMODULE32 PE_LoadLibraryEx32A (LPCSTR name, HFILE32 hFile, DWORD flags) {
|
|||
if (!HIWORD(hModule)) /* internal (or bad) */
|
||||
return hModule;
|
||||
/* check if this module is already mapped */
|
||||
pem = PROCESS_Current()->modref_list;
|
||||
pem = process->modref_list;
|
||||
while (pem) {
|
||||
if (pem->module == hModule) return hModule;
|
||||
pem = pem->next;
|
||||
}
|
||||
pModule = MODULE_GetPtr(hModule);
|
||||
if (pModule->flags & NE_FFLAGS_BUILTIN) {
|
||||
PDB32 *process = PROCESS_Current();
|
||||
IMAGE_DOS_HEADER *dh;
|
||||
IMAGE_NT_HEADERS *nh;
|
||||
IMAGE_SECTION_HEADER *sh;
|
||||
|
@ -720,13 +739,13 @@ HMODULE32 PE_LoadLibraryEx32A (LPCSTR name, HFILE32 hFile, DWORD flags) {
|
|||
} else {
|
||||
|
||||
/* try to load builtin, enabled modules first */
|
||||
if ((hModule = BUILTIN_LoadModule( name, FALSE )))
|
||||
if ((hModule = BUILTIN32_LoadModule( name, FALSE )))
|
||||
return MODULE_HANDLEtoHMODULE32( hModule );
|
||||
|
||||
/* try to open the specified file */
|
||||
if (HFILE_ERROR32==(hFile=OpenFile32(name,&ofs,OF_READ))) {
|
||||
/* Now try the built-in even if disabled */
|
||||
if ((hModule = BUILTIN_LoadModule( name, TRUE ))) {
|
||||
if ((hModule = BUILTIN32_LoadModule( name, TRUE ))) {
|
||||
fprintf( stderr, "Warning: could not load Windows DLL '%s', using built-in module.\n", name );
|
||||
return MODULE_HANDLEtoHMODULE32( hModule );
|
||||
}
|
||||
|
@ -743,9 +762,13 @@ HMODULE32 PE_LoadLibraryEx32A (LPCSTR name, HFILE32 hFile, DWORD flags) {
|
|||
if (pModule->module32 < 32) return 21;
|
||||
}
|
||||
/* recurse */
|
||||
pModule->module32 = PE_MapImage( pModule->module32, PROCESS_Current(),
|
||||
&ofs,flags);
|
||||
return pModule->module32;
|
||||
ret = PE_MapImage( pModule->module32, process, &ofs,flags);
|
||||
if (!ret) {
|
||||
/* should free this module and the already referenced ones */
|
||||
return 0;
|
||||
}
|
||||
pModule->module32 = ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -756,10 +779,11 @@ HMODULE32 PE_LoadLibraryEx32A (LPCSTR name, HFILE32 hFile, DWORD flags) {
|
|||
HINSTANCE16 PE_LoadModule( HFILE32 hFile, OFSTRUCT *ofs, LOADPARAMS* params )
|
||||
{
|
||||
HMODULE16 hModule16;
|
||||
HMODULE32 hModule32;
|
||||
HMODULE32 hModule32, ret;
|
||||
HINSTANCE16 hInstance;
|
||||
NE_MODULE *pModule;
|
||||
|
||||
THDB *thdb = THREAD_Current();
|
||||
|
||||
if ((hModule16 = MODULE_CreateDummyModule( ofs )) < 32) return hModule16;
|
||||
pModule = (NE_MODULE *)GlobalLock16( hModule16 );
|
||||
pModule->flags = NE_FFLAGS_WIN32;
|
||||
|
@ -771,12 +795,21 @@ HINSTANCE16 PE_LoadModule( HFILE32 hFile, OFSTRUCT *ofs, LOADPARAMS* params )
|
|||
hInstance = MODULE_CreateInstance( hModule16, params );
|
||||
if (!(PE_HEADER(hModule32)->FileHeader.Characteristics & IMAGE_FILE_DLL))
|
||||
{
|
||||
TASK_CreateTask( hModule16, hInstance, 0,
|
||||
params->hEnvironment,
|
||||
(LPSTR)PTR_SEG_TO_LIN( params->cmdLine ),
|
||||
*((WORD*)PTR_SEG_TO_LIN(params->showCmd) + 1) );
|
||||
HTASK16 hTask = TASK_CreateTask( hModule16, hInstance, 0,
|
||||
params->hEnvironment,
|
||||
(LPSTR)PTR_SEG_TO_LIN( params->cmdLine ),
|
||||
*((WORD*)PTR_SEG_TO_LIN(params->showCmd) + 1) );
|
||||
TDB *pTask = (TDB *)GlobalLock16( hTask );
|
||||
thdb = pTask->thdb;
|
||||
}
|
||||
pModule->module32 = PE_MapImage( hModule32, PROCESS_Current(), ofs, 0 );
|
||||
if (!(ret = PE_MapImage( hModule32, thdb->process, ofs, 0 )))
|
||||
{
|
||||
/* FIXME: should destroy the task created ... */
|
||||
return 0;
|
||||
}
|
||||
pModule->module32 = ret;
|
||||
/* yuck. but there is no other good place to do that... */
|
||||
PE_InitTls( thdb );
|
||||
return hInstance;
|
||||
}
|
||||
|
||||
|
@ -840,14 +873,15 @@ void PE_InitializeDLLs(PDB32 *process,DWORD type,LPVOID lpReserved) {
|
|||
}
|
||||
}
|
||||
|
||||
void PE_InitTls(PDB32 *pdb)
|
||||
void PE_InitTls(THDB *thdb)
|
||||
{
|
||||
/* FIXME: tls callbacks ??? */
|
||||
PE_MODREF *pem;
|
||||
IMAGE_NT_HEADERS *peh;
|
||||
DWORD size,datasize,index;
|
||||
DWORD size,datasize;
|
||||
LPVOID mem;
|
||||
LPIMAGE_TLS_DIRECTORY pdir;
|
||||
PDB32 *pdb = thdb->process;
|
||||
|
||||
pem = pdb->modref_list;
|
||||
while (pem) {
|
||||
|
@ -858,13 +892,18 @@ void PE_InitTls(PDB32 *pdb)
|
|||
}
|
||||
pdir = (LPVOID)(pem->module + peh->OptionalHeader.
|
||||
DataDirectory[IMAGE_FILE_THREAD_LOCAL_STORAGE].VirtualAddress);
|
||||
index = TlsAlloc();
|
||||
|
||||
if (!(pem->flags & PE_MODREF_TLS_ALLOCED)) {
|
||||
pem->tlsindex = TlsAlloc();
|
||||
*(pdir->AddressOfIndex)=pem->tlsindex;
|
||||
}
|
||||
pem->flags |= PE_MODREF_TLS_ALLOCED;
|
||||
datasize= pdir->EndAddressOfRawData-pdir->StartAddressOfRawData;
|
||||
size = datasize + pdir->SizeOfZeroFill;
|
||||
mem=VirtualAlloc(0,size,MEM_RESERVE|MEM_COMMIT,PAGE_READWRITE);
|
||||
memcpy(mem,(LPVOID) pdir->StartAddressOfRawData, datasize);
|
||||
TlsSetValue(index,mem);
|
||||
*(pdir->AddressOfIndex)=index;
|
||||
/* don't use TlsSetValue, we are in the wrong thread */
|
||||
thdb->tls_array[pem->tlsindex] = mem;
|
||||
pem=pem->next;
|
||||
}
|
||||
}
|
||||
|
|
103
loader/task.c
103
loader/task.c
|
@ -38,10 +38,6 @@
|
|||
|
||||
extern INT32 WINSOCK_DeleteTaskWSI( TDB* pTask, struct _WSINFO* );
|
||||
extern BOOL32 MODULE_FreeModule( HMODULE16 hModule, TDB* ptaskContext );
|
||||
extern void PE_InitTls( PDB32 *pdb32 );
|
||||
|
||||
/* Saved 16-bit stack for current process (Win16 only) */
|
||||
DWORD IF1632_Saved16_ss_sp = 0;
|
||||
|
||||
/* Pointer to function to switch to a larger stack */
|
||||
int (*IF1632_CallLargeStack)( int (*func)(), void *arg ) = NULL;
|
||||
|
@ -337,19 +333,19 @@ static void TASK_CallToStart(void)
|
|||
NE_MODULE *pModule = MODULE_GetPtr( pTask->hModule );
|
||||
SEGTABLEENTRY *pSegTable = NE_SEG_TABLE( pModule );
|
||||
|
||||
IF1632_Saved16_ss_sp = pTask->ss_sp;
|
||||
/* Terminate the stack frame */
|
||||
CURRENT_STACK16->frame32 = NULL;
|
||||
SET_CUR_THREAD( pTask->thdb );
|
||||
/* Terminate the stack frame */
|
||||
THREAD_STACK16(pTask->thdb)->frame32 = NULL;
|
||||
if (pModule->flags & NE_FFLAGS_WIN32)
|
||||
{
|
||||
/* FIXME: all this is an ugly hack */
|
||||
|
||||
extern void InitTask( CONTEXT *context );
|
||||
|
||||
FARPROC32 entry = (FARPROC32)RVA_PTR( PROCESS_Current()->exe_modref->module, OptionalHeader.AddressOfEntryPoint );
|
||||
|
||||
InitTask( NULL );
|
||||
pTask->userhandler = (USERSIGNALPROC)&USER_SignalProc;
|
||||
if (pModule->heap_size)
|
||||
LocalInit( pTask->hInstance, 0, pModule->heap_size );
|
||||
|
||||
InitApp( pTask->hModule );
|
||||
PE_InitializeDLLs( PROCESS_Current(), DLL_PROCESS_ATTACH, (LPVOID)-1 );
|
||||
dprintf_relay( stddeb, "CallTo32(entryproc=%p)\n", entry );
|
||||
|
@ -383,8 +379,8 @@ static void TASK_CallToStart(void)
|
|||
|
||||
dprintf_task( stddeb, "Starting main program: cs:ip=%04lx:%04x ds=%04lx ss:sp=%04x:%04x\n",
|
||||
CS_reg(&context), IP_reg(&context), DS_reg(&context),
|
||||
SELECTOROF(IF1632_Saved16_ss_sp),
|
||||
OFFSETOF(IF1632_Saved16_ss_sp) );
|
||||
SELECTOROF(pTask->thdb->cur_stack),
|
||||
OFFSETOF(pTask->thdb->cur_stack) );
|
||||
|
||||
Callbacks->CallRegisterShortProc( &context, 0 );
|
||||
/* This should never return */
|
||||
|
@ -528,19 +524,31 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
|
|||
pTask->thdb = THREAD_Create( pdb32,
|
||||
PE_HEADER(pModule->module32)->OptionalHeader.SizeOfStackReserve,
|
||||
NULL, NULL );
|
||||
/* FIXME: should not be done here */
|
||||
PE_InitTls( pdb32 );
|
||||
}
|
||||
else
|
||||
pTask->thdb = THREAD_Create( pdb32, 0, NULL, NULL );
|
||||
|
||||
/* FIXME: check for pTask->thdb == NULL. */
|
||||
SET_CUR_THREAD( pTask->thdb );
|
||||
|
||||
/* Create the 16-bit stack frame */
|
||||
|
||||
if (!(sp = pModule->sp))
|
||||
sp = pSegTable[pModule->ss-1].minsize + pModule->stack_size;
|
||||
sp &= ~1;
|
||||
pTask->thdb->cur_stack = PTR_SEG_OFF_TO_SEGPTR( hInstance, sp );
|
||||
pTask->thdb->cur_stack -= sizeof(STACK16FRAME) + sizeof(STACK32FRAME *);
|
||||
frame16 = (STACK16FRAME *)PTR_SEG_TO_LIN( pTask->thdb->cur_stack );
|
||||
frame16->ebp = sp + (int)&((STACK16FRAME *)0)->bp;
|
||||
frame16->bp = LOWORD(frame16->ebp);
|
||||
frame16->ds = frame16->es = pTask->hInstance;
|
||||
frame16->entry_point = 0;
|
||||
frame16->entry_cs = 0;
|
||||
/* The remaining fields will be initialized in TASK_Reschedule */
|
||||
|
||||
/* Create the 32-bit stack frame */
|
||||
|
||||
stack32Top = (char*)pTask->thdb->teb.stack_top;
|
||||
frame32 = (STACK32FRAME *)stack32Top - 1;
|
||||
frame16->frame32 = frame32 = (STACK32FRAME *)stack32Top - 1;
|
||||
frame32->frame16 = pTask->thdb->cur_stack + sizeof(STACK16FRAME);
|
||||
frame32->edi = 0;
|
||||
frame32->esi = 0;
|
||||
frame32->edx = 0;
|
||||
|
@ -549,29 +557,10 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
|
|||
frame32->retaddr = (DWORD)TASK_CallToStart;
|
||||
/* The remaining fields will be initialized in TASK_Reschedule */
|
||||
|
||||
/* Create the 16-bit stack frame */
|
||||
if (!THREAD_Current()->cur_stack)
|
||||
THREAD_Current()->cur_stack = pTask->thdb->cur_stack;
|
||||
|
||||
if (!(sp = pModule->sp))
|
||||
sp = pSegTable[pModule->ss-1].minsize + pModule->stack_size;
|
||||
sp &= ~1;
|
||||
pTask->ss_sp = PTR_SEG_OFF_TO_SEGPTR( hInstance, sp );
|
||||
pTask->ss_sp -= sizeof(STACK16FRAME);
|
||||
frame16 = (STACK16FRAME *)PTR_SEG_TO_LIN( pTask->ss_sp );
|
||||
frame16->frame32 = frame32;
|
||||
frame16->ebp = sp + (int)&((STACK16FRAME *)0)->bp;
|
||||
frame16->bp = LOWORD(frame16->ebp);
|
||||
frame16->ds = frame16->es = pTask->hInstance;
|
||||
frame16->entry_point = 0;
|
||||
frame16->entry_cs = 0;
|
||||
/* The remaining fields will be initialized in TASK_Reschedule */
|
||||
|
||||
/* If there's no 16-bit stack yet, use a part of the new task stack */
|
||||
/* This is only needed to have a stack to switch from on the first */
|
||||
/* call to DirectedYield(). */
|
||||
|
||||
if (!IF1632_Saved16_ss_sp) IF1632_Saved16_ss_sp = pTask->ss_sp;
|
||||
|
||||
/* Add the task to the linked list */
|
||||
/* Add the task to the linked list */
|
||||
|
||||
TASK_LinkTask( hTask );
|
||||
|
||||
|
@ -593,6 +582,8 @@ static void TASK_DeleteTask( HTASK16 hTask )
|
|||
if (!(pTask = (TDB *)GlobalLock16( hTask ))) return;
|
||||
hPDB = pTask->hPDB;
|
||||
|
||||
pTask->magic = 0xdead; /* invalidate signature */
|
||||
|
||||
/* Delete the Win32 part of the task */
|
||||
|
||||
K32OBJ_DecCount( &pTask->thdb->process->header );
|
||||
|
@ -756,10 +747,6 @@ void TASK_Reschedule(void)
|
|||
dprintf_task( stddeb, "Switching to task %04x (%.8s)\n",
|
||||
hTask, pNewTask->module_name );
|
||||
|
||||
/* Save the stack of the previous task (if any) */
|
||||
|
||||
if (pOldTask) pOldTask->ss_sp = IF1632_Saved16_ss_sp;
|
||||
|
||||
/* Make the task the last in the linked list (round-robin scheduling) */
|
||||
|
||||
pNewTask->priority++;
|
||||
|
@ -769,7 +756,7 @@ void TASK_Reschedule(void)
|
|||
|
||||
/* Finish initializing the new task stack if necessary */
|
||||
|
||||
newframe16 = (STACK16FRAME *)PTR_SEG_TO_LIN( pNewTask->ss_sp );
|
||||
newframe16 = THREAD_STACK16( pNewTask->thdb );
|
||||
if (!newframe16->entry_cs)
|
||||
{
|
||||
STACK16FRAME *oldframe16 = CURRENT_STACK16;
|
||||
|
@ -788,7 +775,7 @@ void TASK_Reschedule(void)
|
|||
|
||||
hCurrentTask = hTask;
|
||||
SET_CUR_THREAD( pNewTask->thdb );
|
||||
IF1632_Saved16_ss_sp = pNewTask->ss_sp;
|
||||
pNewTask->ss_sp = pNewTask->thdb->cur_stack;
|
||||
}
|
||||
|
||||
|
||||
|
@ -875,7 +862,7 @@ void WINAPI InitTask( CONTEXT *context )
|
|||
pinstance = (INSTANCEDATA *)PTR_SEG_OFF_TO_LIN(CURRENT_DS, 0);
|
||||
pinstance->stackbottom = stackhi; /* yup, that's right. Confused me too. */
|
||||
pinstance->stacktop = stacklow;
|
||||
pinstance->stackmin = OFFSETOF(IF1632_Saved16_ss_sp);
|
||||
pinstance->stackmin = OFFSETOF( pTask->thdb->cur_stack );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1133,13 +1120,12 @@ void WINAPI SwitchStackTo( WORD seg, WORD ptr, WORD top )
|
|||
if (!(pTask = (TDB *)GlobalLock16( hCurrentTask ))) return;
|
||||
if (!(pData = (INSTANCEDATA *)GlobalLock16( seg ))) return;
|
||||
dprintf_task( stddeb, "SwitchStackTo: old=%04x:%04x new=%04x:%04x\n",
|
||||
SELECTOROF(IF1632_Saved16_ss_sp),
|
||||
OFFSETOF(IF1632_Saved16_ss_sp), seg, ptr );
|
||||
SELECTOROF( pTask->thdb->cur_stack ),
|
||||
OFFSETOF( pTask->thdb->cur_stack ), seg, ptr );
|
||||
|
||||
/* Save the old stack */
|
||||
|
||||
oldFrame = CURRENT_STACK16;
|
||||
pData->old_ss_sp = IF1632_Saved16_ss_sp;
|
||||
pData->old_ss_sp = pTask->thdb->cur_stack;
|
||||
pData->stacktop = top;
|
||||
pData->stackmin = ptr;
|
||||
pData->stackbottom = ptr;
|
||||
|
@ -1149,9 +1135,10 @@ void WINAPI SwitchStackTo( WORD seg, WORD ptr, WORD top )
|
|||
/* Note: we need to take the 3 arguments into account; otherwise,
|
||||
* the stack will underflow upon return from this function.
|
||||
*/
|
||||
IF1632_Saved16_ss_sp = PTR_SEG_OFF_TO_SEGPTR( seg,
|
||||
oldFrame = (STACK16FRAME *)PTR_SEG_TO_LIN( pTask->thdb->cur_stack );
|
||||
pTask->thdb->cur_stack = PTR_SEG_OFF_TO_SEGPTR( seg,
|
||||
ptr - sizeof(STACK16FRAME) - 3 * sizeof(WORD) );
|
||||
newFrame = CURRENT_STACK16;
|
||||
newFrame = (STACK16FRAME *)PTR_SEG_TO_LIN( pTask->thdb->cur_stack );
|
||||
|
||||
/* Copy the stack frame and the local variables to the new stack */
|
||||
|
||||
|
@ -1174,7 +1161,7 @@ void WINAPI SwitchStackBack(void)
|
|||
INSTANCEDATA *pData;
|
||||
|
||||
if (!(pTask = (TDB *)GlobalLock16( hCurrentTask ))) return;
|
||||
if (!(pData = (INSTANCEDATA *)GlobalLock16(SELECTOROF(IF1632_Saved16_ss_sp))))
|
||||
if (!(pData = (INSTANCEDATA *)GlobalLock16(SELECTOROF(pTask->thdb->cur_stack))))
|
||||
return;
|
||||
if (!pData->old_ss_sp)
|
||||
{
|
||||
|
@ -1184,16 +1171,16 @@ void WINAPI SwitchStackBack(void)
|
|||
dprintf_task( stddeb, "SwitchStackBack: restoring stack %04x:%04x\n",
|
||||
SELECTOROF(pData->old_ss_sp), OFFSETOF(pData->old_ss_sp) );
|
||||
|
||||
oldFrame = CURRENT_STACK16;
|
||||
oldFrame = (STACK16FRAME *)PTR_SEG_TO_LIN( pTask->thdb->cur_stack );
|
||||
|
||||
/* Switch back to the old stack */
|
||||
|
||||
IF1632_Saved16_ss_sp = pData->old_ss_sp;
|
||||
pTask->thdb->cur_stack = pData->old_ss_sp;
|
||||
pData->old_ss_sp = 0;
|
||||
|
||||
/* Build a stack frame for the return */
|
||||
|
||||
newFrame = CURRENT_STACK16;
|
||||
newFrame = (STACK16FRAME *)PTR_SEG_TO_LIN( pTask->thdb->cur_stack );
|
||||
newFrame->frame32 = oldFrame->frame32;
|
||||
if (debugging_relay)
|
||||
{
|
||||
|
@ -1469,8 +1456,8 @@ BOOL16 WINAPI TaskNext( TASKENTRY *lpte )
|
|||
lpte->hTaskParent = pTask->hParent;
|
||||
lpte->hInst = pTask->hInstance;
|
||||
lpte->hModule = pTask->hModule;
|
||||
lpte->wSS = SELECTOROF( pTask->ss_sp );
|
||||
lpte->wSP = OFFSETOF( pTask->ss_sp );
|
||||
lpte->wSS = SELECTOROF( pTask->thdb->cur_stack );
|
||||
lpte->wSP = OFFSETOF( pTask->thdb->cur_stack );
|
||||
lpte->wStackTop = pInstData->stacktop;
|
||||
lpte->wStackMinimum = pInstData->stackmin;
|
||||
lpte->wStackBottom = pInstData->stackbottom;
|
||||
|
|
|
@ -482,6 +482,18 @@ DWORD WINAPI GlobalHandle16( WORD sel )
|
|||
return MAKELONG( GET_ARENA_PTR(sel)->handle, GlobalHandleToSel(sel) );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GlobalHandleNoRIP (KERNEL.159)
|
||||
*/
|
||||
DWORD WINAPI GlobalHandleNoRIP( WORD sel )
|
||||
{
|
||||
int i;
|
||||
for (i = globalArenaSize-1 ; i>=0 ; i--) {
|
||||
if (pGlobalArena[i].size!=0 && pGlobalArena[i].handle == sel)
|
||||
return MAKELONG( GET_ARENA_PTR(sel)->handle, GlobalHandleToSel(sel) );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GlobalFlags16 (KERNEL.22)
|
||||
|
@ -832,6 +844,16 @@ BOOL16 WINAPI MemManInfo( MEMMANINFO *info )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetFreeMemInfo (KERNEL.316)
|
||||
*/
|
||||
DWORD WINAPI GetFreeMemInfo(void)
|
||||
{
|
||||
MEMMANINFO info;
|
||||
MemManInfo( &info );
|
||||
return MAKELONG( info.dwTotalLinearSpace, info.dwMaxPagesAvailable );
|
||||
}
|
||||
|
||||
/*
|
||||
* Win32 Global heap functions (GlobalXXX).
|
||||
* These functions included in Win32 for compatibility with 16 bit Windows
|
||||
|
@ -970,7 +992,10 @@ BOOL32 WINAPI GlobalUnlock32(HGLOBAL32 hmem)
|
|||
*/
|
||||
HGLOBAL32 WINAPI GlobalHandle32(LPCVOID pmem)
|
||||
{
|
||||
HGLOBAL32 handle = POINTER_TO_HANDLE(pmem);
|
||||
HGLOBAL32 handle;
|
||||
|
||||
if (!HEAP_IsInsideHeap( GetProcessHeap(), 0, pmem )) goto error;
|
||||
handle = POINTER_TO_HANDLE(pmem);
|
||||
if (HEAP_IsInsideHeap( GetProcessHeap(), 0, (LPCVOID)handle ))
|
||||
{
|
||||
if (HANDLE_TO_INTERN(handle)->Magic == MAGIC_GLOBAL_USED)
|
||||
|
@ -980,6 +1005,7 @@ HGLOBAL32 WINAPI GlobalHandle32(LPCVOID pmem)
|
|||
if (HeapValidate( GetProcessHeap(), 0, pmem ))
|
||||
return (HGLOBAL32)pmem; /* valid fixed block */
|
||||
|
||||
error:
|
||||
SetLastError( ERROR_INVALID_HANDLE );
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -633,7 +633,6 @@ void WINAPI SUnMapLS_IP_EBP_40(CONTEXT *context) { x_SUnMapLS_IP_EBP_x(context,4
|
|||
LPVOID WINAPI WOWGetVDMPointer(DWORD vp,DWORD nrofbytes,BOOL32 protected)
|
||||
{
|
||||
/* FIXME: add size check too */
|
||||
fprintf(stdnimp,"WOWGetVDMPointer(%08lx,%ld,%d)\n",vp,nrofbytes,protected);
|
||||
if (protected)
|
||||
return PTR_SEG_TO_LIN(vp);
|
||||
else
|
||||
|
@ -655,7 +654,6 @@ LPVOID WINAPI GetVDMPointer32W(DWORD vp,DWORD mode)
|
|||
LPVOID WINAPI WOWGetVDMPointerFix(DWORD vp,DWORD nrofbytes,BOOL32 protected)
|
||||
{
|
||||
/* FIXME: fix heapsegment */
|
||||
fprintf(stdnimp,"WOWGetVDMPointerFix(%08lx,%ld,%d)\n",vp,nrofbytes,protected);
|
||||
return WOWGetVDMPointer(vp,nrofbytes,protected);
|
||||
}
|
||||
|
||||
|
@ -664,7 +662,6 @@ LPVOID WINAPI WOWGetVDMPointerFix(DWORD vp,DWORD nrofbytes,BOOL32 protected)
|
|||
*/
|
||||
void WINAPI WOWGetVDMPointerUnfix(DWORD vp)
|
||||
{
|
||||
fprintf(stdnimp,"WOWGetVDMPointerUnfix(%08lx), STUB\n",vp);
|
||||
/* FIXME: unfix heapsegment */
|
||||
}
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ LPSTR WINAPI lstrcat32A( LPSTR dst, LPCSTR src )
|
|||
{
|
||||
dprintf_string(stddeb,"strcat: Append %s to %s\n",
|
||||
debugstr_a (src), debugstr_a (dst));
|
||||
/* Windows does not check for NULL pointers here, so we don't either */
|
||||
strcat( dst, src );
|
||||
return dst;
|
||||
}
|
||||
|
@ -93,6 +94,7 @@ LPWSTR WINAPI lstrcat32W( LPWSTR dst, LPCWSTR src )
|
|||
register LPWSTR p = dst;
|
||||
dprintf_string(stddeb,"strcat: Append L%s to L%s\n",
|
||||
debugstr_w (src), debugstr_w (dst));
|
||||
/* Windows does not check for NULL pointers here, so we don't either */
|
||||
while (*p) p++;
|
||||
while ((*p++ = *src++));
|
||||
return dst;
|
||||
|
@ -255,7 +257,7 @@ SEGPTR WINAPI lstrcpy16( SEGPTR dst, LPCSTR src )
|
|||
LPSTR WINAPI lstrcpy32A( LPSTR dst, LPCSTR src )
|
||||
{
|
||||
dprintf_string(stddeb,"strcpy %s\n", debugstr_a (src));
|
||||
if (!src || !dst) return NULL;
|
||||
/* Windows does not check for NULL pointers here, so we don't either */
|
||||
strcpy( dst, src );
|
||||
return dst;
|
||||
}
|
||||
|
@ -268,6 +270,7 @@ LPWSTR WINAPI lstrcpy32W( LPWSTR dst, LPCWSTR src )
|
|||
{
|
||||
register LPWSTR p = dst;
|
||||
dprintf_string(stddeb,"strcpy L%s\n", debugstr_w (src));
|
||||
/* Windows does not check for NULL pointers here, so we don't either */
|
||||
while ((*p++ = *src++));
|
||||
return dst;
|
||||
}
|
||||
|
@ -291,6 +294,7 @@ LPSTR WINAPI lstrcpyn32A( LPSTR dst, LPCSTR src, INT32 n )
|
|||
LPSTR p = dst;
|
||||
dprintf_string(stddeb,"strcpyn %s for %d chars\n",
|
||||
debugstr_an (src,n), n);
|
||||
/* Windows does not check for NULL pointers here, so we don't either */
|
||||
while ((n-- > 1) && *src) *p++ = *src++;
|
||||
if (n >= 0) *p = 0;
|
||||
return dst;
|
||||
|
@ -305,6 +309,7 @@ LPWSTR WINAPI lstrcpyn32W( LPWSTR dst, LPCWSTR src, INT32 n )
|
|||
LPWSTR p = dst;
|
||||
dprintf_string(stddeb,"strcpyn L%s for %d chars\n",
|
||||
debugstr_wn (src,n), n);
|
||||
/* Windows does not check for NULL pointers here, so we don't either */
|
||||
while ((n-- > 1) && *src) *p++ = *src++;
|
||||
if (n >= 0) *p = 0;
|
||||
return dst;
|
||||
|
|
|
@ -281,9 +281,11 @@ static int VIRTUAL_GetUnixProt( BYTE vprot )
|
|||
*/
|
||||
static void VIRTUAL_GetWin32Prot( BYTE vprot, DWORD *protect, DWORD *state )
|
||||
{
|
||||
*protect = VIRTUAL_Win32Flags[vprot & 0x0f];
|
||||
if (vprot & VPROT_GUARD) *protect |= PAGE_GUARD;
|
||||
if (vprot & VPROT_NOCACHE) *protect |= PAGE_NOCACHE;
|
||||
if (protect) {
|
||||
*protect = VIRTUAL_Win32Flags[vprot & 0x0f];
|
||||
if (vprot & VPROT_GUARD) *protect |= PAGE_GUARD;
|
||||
if (vprot & VPROT_NOCACHE) *protect |= PAGE_NOCACHE;
|
||||
}
|
||||
|
||||
if (state) *state = (vprot & VPROT_COMMITTED) ? MEM_COMMIT : MEM_RESERVE;
|
||||
}
|
||||
|
|
19
misc/aspi.c
19
misc/aspi.c
|
@ -384,8 +384,7 @@ error_exit:
|
|||
* GetASPISupportInfo16 (WINASPI.1)
|
||||
*/
|
||||
|
||||
WORD
|
||||
GetASPISupportInfo16()
|
||||
WORD WINAPI GetASPISupportInfo16()
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_aspi(stddeb, "GETASPISupportInfo\n");
|
||||
|
@ -403,8 +402,7 @@ GetASPISupportInfo16()
|
|||
* SendASPICommand16 (WINASPI.2)
|
||||
*/
|
||||
|
||||
WORD
|
||||
SendASPICommand16(SEGPTR segptr_srb)
|
||||
WORD WINAPI SendASPICommand16(SEGPTR segptr_srb)
|
||||
{
|
||||
#ifdef linux
|
||||
LPSRB16 lpSRB = PTR_SEG_TO_LIN(segptr_srb);
|
||||
|
@ -430,3 +428,16 @@ SendASPICommand16(SEGPTR segptr_srb)
|
|||
return SS_INVALID_SRB;
|
||||
#endif
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetASPIDLLVersion (WINASPI.4)
|
||||
*/
|
||||
|
||||
DWORD WINAPI GetASPIDLLVersion()
|
||||
{
|
||||
#ifdef linux
|
||||
return (DWORD)2;
|
||||
#else
|
||||
return (DWORD)0;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include "windows.h"
|
||||
#include "callback.h"
|
||||
#include "task.h"
|
||||
|
||||
|
@ -133,6 +134,92 @@ static DWORD WINAPI CALLBACK_CallWOWCallbackProc( FARPROC16 proc, DWORD dw )
|
|||
return proc( dw );
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* CALLBACK_CallWOWCallback16Ex
|
||||
*
|
||||
* WCB16_MAX_CBARGS (16) is the maximum number of args.
|
||||
*
|
||||
* Can call functions using CDECL or PASCAL calling conventions. The CDECL
|
||||
* ones are reversed (not 100% sure about that).
|
||||
*/
|
||||
static BOOL32 WINAPI CALLBACK_CallWOWCallback16Ex(
|
||||
FARPROC16 proc, DWORD dwFlags, DWORD cbArgs, LPVOID xargs,LPDWORD pdwret
|
||||
) {
|
||||
LPDWORD args = (LPDWORD)xargs;
|
||||
DWORD ret,i;
|
||||
|
||||
if (dwFlags == WCB16_CDECL) {
|
||||
/* swap the arguments */
|
||||
args = HeapAlloc(GetProcessHeap(),0,cbArgs*sizeof(DWORD));
|
||||
for (i=0;i<cbArgs;i++)
|
||||
args[i] = ((DWORD*)xargs)[cbArgs-i-1];
|
||||
}
|
||||
switch (cbArgs) {
|
||||
case 0: ret = proc();break;
|
||||
case 1: ret = proc(args[0]);break;
|
||||
case 2: ret = proc(args[0],args[1]);break;
|
||||
case 3: ret = proc(args[0],args[1],args[2]);break;
|
||||
case 4: ret = proc(args[0],args[1],args[2],args[3]);break;
|
||||
case 5: ret = proc(args[0],args[1],args[2],args[3],args[4]);break;
|
||||
case 6: ret = proc(args[0],args[1],args[2],args[3],args[4],args[5]);
|
||||
break;
|
||||
case 7: ret = proc(args[0],args[1],args[2],args[3],args[4],args[5],
|
||||
args[6]
|
||||
);
|
||||
break;
|
||||
case 8: ret = proc(args[0],args[1],args[2],args[3],args[4],args[5],
|
||||
args[6],args[7]
|
||||
);
|
||||
break;
|
||||
case 9: ret = proc(args[0],args[1],args[2],args[3],args[4],args[5],
|
||||
args[6],args[7],args[8]
|
||||
);
|
||||
break;
|
||||
case 10:ret = proc(args[0],args[1],args[2],args[3],args[4],args[5],
|
||||
args[6],args[7],args[8],args[9]
|
||||
);
|
||||
break;
|
||||
case 11:ret = proc(args[0],args[1],args[2],args[3],args[4],args[5],
|
||||
args[6],args[7],args[8],args[9],args[10]
|
||||
);
|
||||
break;
|
||||
case 12:ret = proc(args[0],args[1],args[2],args[3],args[4],args[5],
|
||||
args[6],args[7],args[8],args[9],args[10],args[11]
|
||||
);
|
||||
break;
|
||||
case 13:ret = proc(args[0],args[1],args[2],args[3],args[4],args[5],
|
||||
args[6],args[7],args[8],args[9],args[10],args[11],
|
||||
args[12]
|
||||
);
|
||||
break;
|
||||
case 14:ret = proc(args[0],args[1],args[2],args[3],args[4],args[5],
|
||||
args[6],args[7],args[8],args[9],args[10],args[11],
|
||||
args[12],args[13]
|
||||
);
|
||||
break;
|
||||
case 15:ret = proc(args[0],args[1],args[2],args[3],args[4],args[5],
|
||||
args[6],args[7],args[8],args[9],args[10],args[11],
|
||||
args[12],args[13],args[14]
|
||||
);
|
||||
break;
|
||||
case 16:ret = proc(args[0],args[1],args[2],args[3],args[4],args[5],
|
||||
args[6],args[7],args[8],args[9],args[10],args[11],
|
||||
args[12],args[13],args[14],args[15]
|
||||
);
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"CALLBACK_CallWOWCallback16Ex(), %ld arguments not supported.!n",cbArgs);
|
||||
if (dwFlags == WCB16_CDECL)
|
||||
HeapFree(GetProcessHeap(),0,args);
|
||||
return FALSE;
|
||||
}
|
||||
if (dwFlags == WCB16_CDECL)
|
||||
HeapFree(GetProcessHeap(),0,args);
|
||||
if (pdwret)
|
||||
*pdwret = ret;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* CALLBACK_WinelibTable
|
||||
*
|
||||
|
@ -154,6 +241,7 @@ static const CALLBACKS_TABLE CALLBACK_WinelibTable =
|
|||
CALLBACK_CallLoadAppSegProc, /* CallLoadAppSegProc */
|
||||
CALLBACK_CallSystemTimerProc, /* CallSystemTimerProc */
|
||||
CALLBACK_CallWOWCallbackProc, /* CallWOWCallbackProc */
|
||||
CALLBACK_CallWOWCallback16Ex, /* CallWOWCallback16Ex */
|
||||
CALLBACK_CallASPIPostProc, /* CallASPIPostProc */
|
||||
/* The graphics driver callbacks are never used in Winelib */
|
||||
NULL, /* CallDrvControlProc */
|
||||
|
@ -163,7 +251,10 @@ static const CALLBACKS_TABLE CALLBACK_WinelibTable =
|
|||
NULL, /* CallDrvOutputProc */
|
||||
NULL, /* CallDrvRealizeProc */
|
||||
NULL, /* CallDrvStretchBltProc */
|
||||
NULL /* CallDrvExtTextOutProc */
|
||||
NULL, /* CallDrvExtTextOutProc */
|
||||
NULL /* CallDrvGetCharWidth */
|
||||
};
|
||||
|
||||
const CALLBACKS_TABLE *Callbacks = &CALLBACK_WinelibTable;
|
||||
|
||||
|
||||
|
|
|
@ -3224,3 +3224,11 @@ BOOL32 WINAPI xxx##32W( LPOPENFILENAME32W ofn ) \
|
|||
|
||||
GET_XXX_FILENAME(GetOpenFileName)
|
||||
GET_XXX_FILENAME(GetSaveFileName)
|
||||
|
||||
/***********************************************************************
|
||||
* ChooseFontA (COMDLG32.3)
|
||||
*/
|
||||
DWORD WINAPI ChooseFont32A(CHOOSEFONT pChoosefont)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
131
misc/cpu.c
131
misc/cpu.c
|
@ -11,6 +11,8 @@
|
|||
#include "windows.h"
|
||||
#include "winnt.h"
|
||||
|
||||
static BYTE PF[64] = {0,};
|
||||
|
||||
/***********************************************************************
|
||||
* GetSystemInfo [KERNELL32.404]
|
||||
*/
|
||||
|
@ -23,6 +25,7 @@ VOID WINAPI GetSystemInfo(LPSYSTEM_INFO si)
|
|||
memcpy(si,&cachedsi,sizeof(*si));
|
||||
return;
|
||||
}
|
||||
memset(PF,0,sizeof(PF));
|
||||
|
||||
/* choose sensible defaults ...
|
||||
* FIXME: perhaps overrideable with precompiler flags?
|
||||
|
@ -43,43 +46,87 @@ VOID WINAPI GetSystemInfo(LPSYSTEM_INFO si)
|
|||
cache = 1; /* even if there is no more info, we now have a cacheentry */
|
||||
memcpy(si,&cachedsi,sizeof(*si));
|
||||
|
||||
/* hmm, reasonable processor feature defaults? */
|
||||
|
||||
#ifdef linux
|
||||
{
|
||||
char line[200],info[200],value[200],junk[200];
|
||||
char line[200];
|
||||
FILE *f = fopen ("/proc/cpuinfo", "r");
|
||||
|
||||
if (!f)
|
||||
return;
|
||||
while (fgets(line,200,f)!=NULL) {
|
||||
if (sscanf(line,"%s%[ \t:]%s",info,junk,value)!=3)
|
||||
char *s,*value;
|
||||
|
||||
/* NOTE: the ':' is the only character we can rely on */
|
||||
if (!(value = strchr(line,':')))
|
||||
continue;
|
||||
if (!lstrncmpi32A(line, "cpu",3)) {
|
||||
if ( isdigit (value[0]) && value[1] == '8' &&
|
||||
value[2] == '6' && value[3] == 0
|
||||
) {
|
||||
/* terminate the valuename */
|
||||
*value++ = '\0';
|
||||
/* skip any leading spaces */
|
||||
while (*value==' ') value++;
|
||||
if ((s=strchr(value,'\n')))
|
||||
*s='\0';
|
||||
|
||||
/* 2.1 method */
|
||||
if (!lstrncmpi32A(line, "cpu family",strlen("cpu family"))) {
|
||||
if (isdigit (value[0])) {
|
||||
switch (value[0] - '0') {
|
||||
case 3:
|
||||
cachedsi.dwProcessorType = PROCESSOR_INTEL_386;
|
||||
case 3: cachedsi.dwProcessorType = PROCESSOR_INTEL_386;
|
||||
cachedsi.wProcessorLevel= 3;
|
||||
break;
|
||||
case 4:
|
||||
cachedsi.dwProcessorType = PROCESSOR_INTEL_486;
|
||||
case 4: cachedsi.dwProcessorType = PROCESSOR_INTEL_486;
|
||||
cachedsi.wProcessorLevel= 4;
|
||||
break;
|
||||
case 5:
|
||||
cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM;
|
||||
case 5: cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM;
|
||||
cachedsi.wProcessorLevel= 5;
|
||||
break;
|
||||
case 6: /* FIXME does the PPro have a special type? */
|
||||
cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM;
|
||||
case 6: cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM;
|
||||
cachedsi.wProcessorLevel= 5;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!lstrncmpi32A(info,"processor",9)) {
|
||||
/* old 2.0 method */
|
||||
if (!lstrncmpi32A(line, "cpu",strlen("cpu"))) {
|
||||
if ( isdigit (value[0]) && value[1] == '8' &&
|
||||
value[2] == '6' && value[3] == 0
|
||||
) {
|
||||
switch (value[0] - '0') {
|
||||
case 3: cachedsi.dwProcessorType = PROCESSOR_INTEL_386;
|
||||
cachedsi.wProcessorLevel= 3;
|
||||
break;
|
||||
case 4: cachedsi.dwProcessorType = PROCESSOR_INTEL_486;
|
||||
cachedsi.wProcessorLevel= 4;
|
||||
break;
|
||||
case 5: cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM;
|
||||
cachedsi.wProcessorLevel= 5;
|
||||
break;
|
||||
case 6: cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM;
|
||||
cachedsi.wProcessorLevel= 5;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!lstrncmpi32A(line,"fdiv_bug",strlen("fdiv_bug"))) {
|
||||
if (!lstrncmpi32A(value,"yes",3))
|
||||
PF[PF_FLOATING_POINT_PRECISION_ERRATA] = TRUE;
|
||||
|
||||
continue;
|
||||
}
|
||||
if (!lstrncmpi32A(line,"fpu",strlen("fpu"))) {
|
||||
if (!lstrncmpi32A(value,"no",2))
|
||||
PF[PF_FLOATING_POINT_EMULATED] = TRUE;
|
||||
|
||||
continue;
|
||||
}
|
||||
if (!lstrncmpi32A(line,"processor",strlen("processor"))) {
|
||||
/* processor number counts up...*/
|
||||
int x;
|
||||
|
||||
|
@ -87,12 +134,19 @@ VOID WINAPI GetSystemInfo(LPSYSTEM_INFO si)
|
|||
if (x+1>cachedsi.dwNumberOfProcessors)
|
||||
cachedsi.dwNumberOfProcessors=x+1;
|
||||
}
|
||||
if (!lstrncmpi32A(info,"stepping",8)) {
|
||||
if (!lstrncmpi32A(line,"stepping",strlen("stepping"))) {
|
||||
int x;
|
||||
|
||||
if (sscanf(value,"%d",&x))
|
||||
cachedsi.wProcessorRevision = x;
|
||||
}
|
||||
if (!lstrncmpi32A(line,"flags",strlen("flags"))) {
|
||||
if (strstr(value,"cx8"))
|
||||
PF[PF_COMPARE_EXCHANGE_DOUBLE] = TRUE;
|
||||
if (strstr(value,"mmx"))
|
||||
PF[PF_MMX_INSTRUCTIONS_AVAILABLE] = TRUE;
|
||||
|
||||
}
|
||||
}
|
||||
fclose (f);
|
||||
}
|
||||
|
@ -104,49 +158,16 @@ VOID WINAPI GetSystemInfo(LPSYSTEM_INFO si)
|
|||
#endif /* linux */
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* CPU_TestProcessorFeature
|
||||
*/
|
||||
static BOOL32 CPU_TestProcessorFeature(const char* query_info, const char* query_value)
|
||||
{
|
||||
BOOL32 flag=FALSE;
|
||||
#ifdef linux
|
||||
char line[200],info[200],value[200],junk[200];
|
||||
FILE *f = fopen ("/proc/cpuinfo", "r");
|
||||
|
||||
if (!f)
|
||||
return 0;
|
||||
while (fgets(line,200,f)!=NULL) {
|
||||
if (sscanf(line,"%s%[ \t:]%s",info,junk,value)!=3)
|
||||
continue;
|
||||
if (strcmp(info,query_info)==0)
|
||||
flag = strstr(value,query_value)!=NULL;
|
||||
}
|
||||
fclose (f);
|
||||
#else /* linux */
|
||||
/* FIXME: how do we do this on other systems? */
|
||||
#endif /* linux */
|
||||
return flag;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* IsProcessorFeaturePresent [KERNELL32.880]
|
||||
*/
|
||||
BOOL32 WINAPI IsProcessorFeaturePresent (DWORD feature)
|
||||
{
|
||||
SYSTEM_INFO si;
|
||||
GetSystemInfo (&si);
|
||||
switch (feature)
|
||||
{
|
||||
case PF_FLOATING_POINT_PRECISION_ERRATA:
|
||||
return si.wProcessorLevel == 5;
|
||||
case PF_FLOATING_POINT_EMULATED:
|
||||
return CPU_TestProcessorFeature("fpu","no"); break;
|
||||
case PF_COMPARE_EXCHANGE_DOUBLE:
|
||||
return si.wProcessorLevel >= 5;
|
||||
case PF_MMX_INSTRUCTIONS_AVAILABLE:
|
||||
return CPU_TestProcessorFeature("flags","mmx"); break;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
GetSystemInfo (&si); /* to ensure the information is loaded and cached */
|
||||
|
||||
if (feature < 64)
|
||||
return PF[feature];
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
|
84
misc/main.c
84
misc/main.c
|
@ -13,9 +13,9 @@
|
|||
#ifdef MALLOC_DEBUGGING
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xresource.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include "ts_xlib.h"
|
||||
#include "ts_xresource.h"
|
||||
#include "ts_xutil.h"
|
||||
#include <X11/Xlocale.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#include "winsock.h"
|
||||
|
@ -52,6 +52,8 @@ const WINE_LANGUAGE_DEF Languages[] =
|
|||
{"Hu",0x0436}, /* LANG_Hu */
|
||||
{"Pl",0x0415}, /* LANG_Pl */
|
||||
{"Po",0x0416}, /* LANG_Po */
|
||||
{"Sw",0x0417}, /* LANG_Sw */
|
||||
{"Ca", 0}, /* LANG_Ca */ /* FIXME languageid */
|
||||
{NULL,0}
|
||||
};
|
||||
|
||||
|
@ -129,7 +131,7 @@ static XrmOptionDescRec optionsTable[] =
|
|||
" -failreadonly Read only files may not be opened in write mode\n" \
|
||||
" -fixedmap Use a \"standard\" color map\n" \
|
||||
" -iconic Start as an icon\n" \
|
||||
" -language xx Set the language (one of En,Es,De,No,Fr,Fi,Da,Cz,Eo,It,Ko,\n Hu,Pl,Po)\n" \
|
||||
" -language xx Set the language (one of En,Es,De,No,Fr,Fi,Da,Cz,Eo,It,Ko,\n Hu,Pl,Po,Sw,Ca)\n" \
|
||||
" -managed Allow the window manager to manage created windows\n" \
|
||||
" -mode mode Start Wine in a particular mode (standard or enhanced)\n" \
|
||||
" -name name Set the application name\n" \
|
||||
|
@ -191,7 +193,7 @@ static int MAIN_GetResource( XrmDatabase db, char *name, XrmValue *value )
|
|||
strcat( buff_instance, name );
|
||||
strcpy( buff_class, WINE_CLASS );
|
||||
strcat( buff_class, name );
|
||||
retval = XrmGetResource( db, buff_instance, buff_class, &dummy, value );
|
||||
retval = TSXrmGetResource( db, buff_instance, buff_class, &dummy, value );
|
||||
free( buff_instance );
|
||||
free( buff_class );
|
||||
return retval;
|
||||
|
@ -300,7 +302,7 @@ static void MAIN_ParseOptions( int *argc, char *argv[] )
|
|||
{
|
||||
char *display_name = NULL;
|
||||
XrmValue value;
|
||||
XrmDatabase db = XrmGetFileDatabase(WINE_APP_DEFAULTS);
|
||||
XrmDatabase db = TSXrmGetFileDatabase(WINE_APP_DEFAULTS);
|
||||
int i;
|
||||
char *xrm_string;
|
||||
|
||||
|
@ -323,7 +325,7 @@ static void MAIN_ParseOptions( int *argc, char *argv[] )
|
|||
if (display_name == NULL &&
|
||||
MAIN_GetResource( db, ".display", &value )) display_name = value.addr;
|
||||
|
||||
if (!(display = XOpenDisplay( display_name )))
|
||||
if (!(display = TSXOpenDisplay( display_name )))
|
||||
{
|
||||
fprintf( stderr, "%s: Can't open display: %s\n",
|
||||
argv[0], display_name ? display_name : "(none specified)" );
|
||||
|
@ -331,14 +333,14 @@ static void MAIN_ParseOptions( int *argc, char *argv[] )
|
|||
}
|
||||
|
||||
/* Merge file and screen databases */
|
||||
if ((xrm_string = XResourceManagerString( display )) != NULL)
|
||||
if ((xrm_string = TSXResourceManagerString( display )) != NULL)
|
||||
{
|
||||
XrmDatabase display_db = XrmGetStringDatabase( xrm_string );
|
||||
XrmMergeDatabases( display_db, &db );
|
||||
XrmDatabase display_db = TSXrmGetStringDatabase( xrm_string );
|
||||
TSXrmMergeDatabases( display_db, &db );
|
||||
}
|
||||
|
||||
/* Parse command line */
|
||||
XrmParseCommand( &db, optionsTable, NB_OPTIONS,
|
||||
TSXrmParseCommand( &db, optionsTable, NB_OPTIONS,
|
||||
Options.programName, argc, argv );
|
||||
|
||||
/* Get all options */
|
||||
|
@ -430,7 +432,7 @@ static void MAIN_CreateDesktop( int argc, char *argv[] )
|
|||
XTextProperty window_name;
|
||||
Atom XA_WM_DELETE_WINDOW;
|
||||
|
||||
flags = XParseGeometry( Options.desktopGeometry, &x, &y, &width, &height );
|
||||
flags = TSXParseGeometry( Options.desktopGeometry, &x, &y, &width, &height );
|
||||
screenWidth = width;
|
||||
screenHeight = height;
|
||||
|
||||
|
@ -439,18 +441,18 @@ static void MAIN_CreateDesktop( int argc, char *argv[] )
|
|||
win_attr.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask |
|
||||
PointerMotionMask | ButtonPressMask |
|
||||
ButtonReleaseMask | EnterWindowMask;
|
||||
win_attr.cursor = XCreateFontCursor( display, XC_top_left_arrow );
|
||||
win_attr.cursor = TSXCreateFontCursor( display, XC_top_left_arrow );
|
||||
|
||||
rootWindow = XCreateWindow( display, DefaultRootWindow(display),
|
||||
rootWindow = TSXCreateWindow( display, DefaultRootWindow(display),
|
||||
x, y, width, height, 0,
|
||||
CopyFromParent, InputOutput, CopyFromParent,
|
||||
CWEventMask | CWCursor, &win_attr );
|
||||
|
||||
/* Set window manager properties */
|
||||
|
||||
size_hints = XAllocSizeHints();
|
||||
wm_hints = XAllocWMHints();
|
||||
class_hints = XAllocClassHint();
|
||||
size_hints = TSXAllocSizeHints();
|
||||
wm_hints = TSXAllocWMHints();
|
||||
class_hints = TSXAllocClassHint();
|
||||
if (!size_hints || !wm_hints || !class_hints)
|
||||
{
|
||||
fprintf( stderr, "Not enough memory for window manager hints.\n" );
|
||||
|
@ -469,18 +471,18 @@ static void MAIN_CreateDesktop( int argc, char *argv[] )
|
|||
class_hints->res_name = argv[0];
|
||||
class_hints->res_class = "Wine";
|
||||
|
||||
XStringListToTextProperty( &name, 1, &window_name );
|
||||
XSetWMProperties( display, rootWindow, &window_name, &window_name,
|
||||
TSXStringListToTextProperty( &name, 1, &window_name );
|
||||
TSXSetWMProperties( display, rootWindow, &window_name, &window_name,
|
||||
argv, argc, size_hints, wm_hints, class_hints );
|
||||
XA_WM_DELETE_WINDOW = XInternAtom( display, "WM_DELETE_WINDOW", False );
|
||||
XSetWMProtocols( display, rootWindow, &XA_WM_DELETE_WINDOW, 1 );
|
||||
XFree( size_hints );
|
||||
XFree( wm_hints );
|
||||
XFree( class_hints );
|
||||
XA_WM_DELETE_WINDOW = TSXInternAtom( display, "WM_DELETE_WINDOW", False );
|
||||
TSXSetWMProtocols( display, rootWindow, &XA_WM_DELETE_WINDOW, 1 );
|
||||
TSXFree( size_hints );
|
||||
TSXFree( wm_hints );
|
||||
TSXFree( class_hints );
|
||||
|
||||
/* Map window */
|
||||
|
||||
XMapWindow( display, rootWindow );
|
||||
TSXMapWindow( display, rootWindow );
|
||||
}
|
||||
|
||||
|
||||
|
@ -491,7 +493,7 @@ XKeyboardState keyboard_state;
|
|||
*/
|
||||
static void MAIN_SaveSetup(void)
|
||||
{
|
||||
XGetKeyboardControl(display, &keyboard_state);
|
||||
TSXGetKeyboardControl(display, &keyboard_state);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -507,7 +509,7 @@ static void MAIN_RestoreSetup(void)
|
|||
keyboard_value.bell_duration = keyboard_state.bell_duration;
|
||||
keyboard_value.auto_repeat_mode = keyboard_state.global_auto_repeat;
|
||||
|
||||
XChangeKeyboardControl(display, KBKeyClickPercent | KBBellPercent |
|
||||
TSXChangeKeyboardControl(display, KBKeyClickPercent | KBBellPercent |
|
||||
KBBellPitch | KBBellDuration | KBAutoRepeatMode, &keyboard_value);
|
||||
}
|
||||
|
||||
|
@ -554,7 +556,7 @@ BOOL32 MAIN_WineInit( int *argc, char *argv[] )
|
|||
gettimeofday( &tv, NULL);
|
||||
MSG_WineStartTicks = (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
|
||||
|
||||
XrmInitialize();
|
||||
TSXrmInitialize();
|
||||
|
||||
putenv("XKB_DISABLE="); /* Disable XKB extension if present. */
|
||||
|
||||
|
@ -572,10 +574,10 @@ BOOL32 MAIN_WineInit( int *argc, char *argv[] )
|
|||
screenHeight = HeightOfScreen( screen );
|
||||
if (screenDepth) /* -depth option specified */
|
||||
{
|
||||
depth_list = XListDepths(display,DefaultScreen(display),&depth_count);
|
||||
depth_list = TSXListDepths(display,DefaultScreen(display),&depth_count);
|
||||
for (i = 0; i < depth_count; i++)
|
||||
if (depth_list[i] == screenDepth) break;
|
||||
XFree( depth_list );
|
||||
TSXFree( depth_list );
|
||||
if (i >= depth_count)
|
||||
{
|
||||
fprintf( stderr, "%s: Depth %d not supported on this screen.\n",
|
||||
|
@ -584,7 +586,7 @@ BOOL32 MAIN_WineInit( int *argc, char *argv[] )
|
|||
}
|
||||
}
|
||||
else screenDepth = DefaultDepthOfScreen( screen );
|
||||
if (Options.synchronous) XSynchronize( display, True );
|
||||
if (Options.synchronous) TSXSynchronize( display, True );
|
||||
if (Options.desktopGeometry) MAIN_CreateDesktop( *argc, argv );
|
||||
else rootWindow = DefaultRootWindow( display );
|
||||
|
||||
|
@ -608,7 +610,7 @@ void WINAPI MessageBeep16( UINT16 i )
|
|||
*/
|
||||
BOOL32 WINAPI MessageBeep32( UINT32 i )
|
||||
{
|
||||
XBell( display, 0 );
|
||||
TSXBell( display, 0 );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -619,7 +621,7 @@ BOOL32 WINAPI MessageBeep32( UINT32 i )
|
|||
BOOL32 WINAPI Beep( DWORD dwFreq, DWORD dwDur )
|
||||
{
|
||||
/* dwFreq and dwDur are ignored by Win95 */
|
||||
XBell(display, 0);
|
||||
TSXBell(display, 0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -643,7 +645,7 @@ BOOL32 WINAPI SystemParametersInfo32A( UINT32 uAction, UINT32 uParam,
|
|||
|
||||
switch (uAction) {
|
||||
case SPI_GETBEEP:
|
||||
XGetKeyboardControl(display, &keyboard_state);
|
||||
TSXGetKeyboardControl(display, &keyboard_state);
|
||||
if (keyboard_state.bell_percent == 0)
|
||||
*(BOOL32 *) lpvParam = FALSE;
|
||||
else
|
||||
|
@ -690,7 +692,7 @@ BOOL32 WINAPI SystemParametersInfo32A( UINT32 uAction, UINT32 uParam,
|
|||
|
||||
case SPI_GETSCREENSAVETIMEOUT:
|
||||
/* FIXME GetProfileInt( "windows", "ScreenSaveTimeout", 300 ); */
|
||||
XGetScreenSaver(display, &timeout, &temp,&temp,&temp);
|
||||
TSXGetScreenSaver(display, &timeout, &temp,&temp,&temp);
|
||||
*(INT32 *) lpvParam = timeout * 1000;
|
||||
break;
|
||||
|
||||
|
@ -779,7 +781,7 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
|
|||
switch (uAction)
|
||||
{
|
||||
case SPI_GETBEEP:
|
||||
XGetKeyboardControl(display, &keyboard_state);
|
||||
TSXGetKeyboardControl(display, &keyboard_state);
|
||||
if (keyboard_state.bell_percent == 0)
|
||||
*(BOOL16 *) lpvParam = FALSE;
|
||||
else
|
||||
|
@ -833,7 +835,7 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
|
|||
|
||||
case SPI_GETSCREENSAVETIMEOUT:
|
||||
/* FIXME GetProfileInt( "windows", "ScreenSaveTimeout", 300 ); */
|
||||
XGetScreenSaver(display, &timeout, &temp,&temp,&temp);
|
||||
TSXGetScreenSaver(display, &timeout, &temp,&temp,&temp);
|
||||
*(INT16 *) lpvParam = timeout * 1000;
|
||||
break;
|
||||
|
||||
|
@ -858,19 +860,19 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
|
|||
keyboard_value.bell_percent = -1;
|
||||
else
|
||||
keyboard_value.bell_percent = 0;
|
||||
XChangeKeyboardControl(display, KBBellPercent,
|
||||
TSXChangeKeyboardControl(display, KBBellPercent,
|
||||
&keyboard_value);
|
||||
break;
|
||||
|
||||
case SPI_SETSCREENSAVEACTIVE:
|
||||
if (uParam == TRUE)
|
||||
XActivateScreenSaver(display);
|
||||
TSXActivateScreenSaver(display);
|
||||
else
|
||||
XResetScreenSaver(display);
|
||||
TSXResetScreenSaver(display);
|
||||
break;
|
||||
|
||||
case SPI_SETSCREENSAVETIMEOUT:
|
||||
XSetScreenSaver(display, uParam, 60, DefaultBlanking,
|
||||
TSXSetScreenSaver(display, uParam, 60, DefaultBlanking,
|
||||
DefaultExposures);
|
||||
break;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue