forked from Mirrors/wine-wine
Release 960516
Thu May 16 13:35:31 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*.c] Renamed RECT, POINT and SIZE structures to RECT16, POINT16 and SIZE16. Implemented Win32 version of most functions that take these types as parameters. * [configure] Patched autoconf to attempt to correctly detect -lnsl and -lsocket. Please check this out. * [controls/button.c] Added support for Win32 BM_* messages. * [controls/menu.c] Avoid sending extra WM_MENUSELECT messages. This avoids crashes with Excel. * [memory.heap.c] [include/heap.h] Added support for SEGPTRs in Win32 heaps. Added a few macros to make using SEGPTRs easier. They are a bit slower than MAKE_SEGPTR, but they work with Win32. * [memory/atom.c] Implemented Win32 atom functions. * [memory/local.c] Fixed LocalReAlloc() changes to avoid copying the whole block twice. * [win32/memory.c] Use /dev/zero instead of MAP_ANON for VirtualAlloc(). * [windows/class.c] Properly implemented the Win32 class functions. * [windows/winproc.c] (New file) New file handling the message translation between Win16 and Win32. Mon May 13 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [windows/mdi.c] [windows/menu.c] Improved WM_MDICREATE and WM_MDICASCADE handling. * [windows/event.c] [objects/bitblt.c] Handle GraphicsExpose event for BitBlt from screen to screen. * [windows/event.c] [windows/win.c] [windows/nonclient.c] Bunch of fixes for problems with -managed. * [windows/win.c] [windows/winpos.c] Changed conditions for WM_SIZE, WM_MOVE, and WM_GETMINMAXINFO in CreateWindow. * [windows/win.c] [windows/queue.c] [misc/user.c] Do not send WM_PARENTNOTIFY when in AppExit and call WH_SHELL on window creation/destruction. * [objects/palette.c] Crude RealizePalette(). At least something is visible in LviewPro. Sun May 12 02:05:00 1996 Thomas Sandford <t.d.g.sandford@prds-grn.demon.co.uk> * [if1632/gdi32.spec] Added Rectangle (use win16 version). * [if1632/kernel32.spec] Added GetWindowsDirectoryA (use win16 GetWindowsDirectory). * [if1632/user32.spec] Added GetSubMenu, MoveWindow, SetScrollPos, SetScrollRange (use win16 versions). Added SetWindowsHookExA (empty stub for now). * [include/handle32.h] Changed #include <malloc.h> to #include <stdlib.h> to prevent hate message from FreeBSD compiler. * [win32/newfns.c] Added new function SetWindowsHookEx32A (empty stub for now). * [win32/user32.c] Removed redundant debugging printf statement. Sun May 12 01:24:57 1996 Huw D. M. Davies <h.davies1@physics.oxford.ac.uk> * [memory/local.c] Avoid creating adjacent free blocks. Free the block in LocalReAlloc() before allocating a new one. Fixed LocalReAlloc() for discarded blocks. Fri May 10 23:05:12 1996 Jukka Iivonen <iivonen@cc.helsinki.fi> * [resources/sysres_Fi.rc] ChooseFont and ChooseColor dialogs updated. Fri May 10 17:19:33 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c,if1632/kernel.spec] GetCurrentDirectory(),SetCurrentDirectory() implemented. * [if1632/advapi32.spec] [if1632/kernel.spec] [if1632/shell.spec] [include/windows.h] [include/winreg.h] [loader/main.c] [misc/main.c] [misc/shell.c] [misc/registry.c] Registry fixes: - loads win95 registry databases, - save only updated keys on default, - now adhers to the new function naming standard, - minor cleanups. Tue May 7 22:36:13 1996 Albrecht Kleine <kleine@ak.sax.de> * [combo.c] Added WM_COMMAND-handling for interaction between EDIT and COMBOLBOX and synchronized mine with Greg Kreider's works. * [commdlg.c] Bugfix in ChooseFont: font size handling.oldstable wine-960516
parent
1285c2f9e9
commit
e2bfa4c722
18
ANNOUNCE
18
ANNOUNCE
|
@ -1,14 +1,14 @@
|
||||||
This is release 960506 of Wine the MS Windows emulator. This is still a
|
This is release 960516 of Wine the MS Windows emulator. This is still a
|
||||||
developer's only release. There are many bugs and many unimplemented API
|
developer's only release. There are many bugs and many unimplemented API
|
||||||
features. Most applications still do not work.
|
features. Most applications still do not work.
|
||||||
|
|
||||||
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
|
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
|
||||||
forget to include a ChangeLog entry.
|
forget to include a ChangeLog entry.
|
||||||
|
|
||||||
WHAT'S NEW with Wine-960506: (see ChangeLog for details)
|
WHAT'S NEW with Wine-960516: (see ChangeLog for details)
|
||||||
- Moveable and discardable blocks in local heap.
|
- Tons of Win32 support.
|
||||||
- Comboboxes improvements.
|
- Several local heap fixes.
|
||||||
- Winhelp clone using Winelib.
|
- Window management improvements.
|
||||||
- Lots of bug fixes.
|
- Lots of bug fixes.
|
||||||
|
|
||||||
See the README file in the distribution for installation instructions.
|
See the README file in the distribution for installation instructions.
|
||||||
|
@ -17,10 +17,10 @@ Because of lags created by using mirror, this message may reach you before
|
||||||
the release is available at the ftp sites. The sources will be available
|
the release is available at the ftp sites. The sources will be available
|
||||||
from the following locations:
|
from the following locations:
|
||||||
|
|
||||||
sunsite.unc.edu:/pub/Linux/ALPHA/wine/development/Wine-960506.tar.gz
|
sunsite.unc.edu:/pub/Linux/ALPHA/wine/development/Wine-960516.tar.gz
|
||||||
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-960506.tar.gz
|
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-960516.tar.gz
|
||||||
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-960506.tar.gz
|
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-960516.tar.gz
|
||||||
aris.com:/pub/linux/ALPHA/Wine/development/Wine-960506.tar.gz
|
aris.com:/pub/linux/ALPHA/Wine/development/Wine-960516.tar.gz
|
||||||
|
|
||||||
It should also be available from any site that mirrors tsx-11 or sunsite.
|
It should also be available from any site that mirrors tsx-11 or sunsite.
|
||||||
|
|
||||||
|
|
119
ChangeLog
119
ChangeLog
|
@ -1,3 +1,122 @@
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
Thu May 16 13:35:31 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
|
||||||
|
|
||||||
|
* [*/*.c]
|
||||||
|
Renamed RECT, POINT and SIZE structures to RECT16, POINT16 and
|
||||||
|
SIZE16. Implemented Win32 version of most functions that take
|
||||||
|
these types as parameters.
|
||||||
|
|
||||||
|
* [configure]
|
||||||
|
Patched autoconf to attempt to correctly detect -lnsl and
|
||||||
|
-lsocket. Please check this out.
|
||||||
|
|
||||||
|
* [controls/button.c]
|
||||||
|
Added support for Win32 BM_* messages.
|
||||||
|
|
||||||
|
* [controls/menu.c]
|
||||||
|
Avoid sending extra WM_MENUSELECT messages. This avoids crashes
|
||||||
|
with Excel.
|
||||||
|
|
||||||
|
* [memory.heap.c] [include/heap.h]
|
||||||
|
Added support for SEGPTRs in Win32 heaps. Added a few macros to
|
||||||
|
make using SEGPTRs easier. They are a bit slower than MAKE_SEGPTR,
|
||||||
|
but they work with Win32.
|
||||||
|
|
||||||
|
* [memory/atom.c]
|
||||||
|
Implemented Win32 atom functions.
|
||||||
|
|
||||||
|
* [memory/local.c]
|
||||||
|
Fixed LocalReAlloc() changes to avoid copying the whole block twice.
|
||||||
|
|
||||||
|
* [win32/memory.c]
|
||||||
|
Use /dev/zero instead of MAP_ANON for VirtualAlloc().
|
||||||
|
|
||||||
|
* [windows/class.c]
|
||||||
|
Properly implemented the Win32 class functions.
|
||||||
|
|
||||||
|
* [windows/winproc.c] (New file)
|
||||||
|
New file handling the message translation between Win16 and Win32.
|
||||||
|
|
||||||
|
Mon May 13 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
|
||||||
|
|
||||||
|
* [windows/mdi.c] [windows/menu.c]
|
||||||
|
Improved WM_MDICREATE and WM_MDICASCADE handling.
|
||||||
|
|
||||||
|
* [windows/event.c] [objects/bitblt.c]
|
||||||
|
Handle GraphicsExpose event for BitBlt from screen to screen.
|
||||||
|
|
||||||
|
* [windows/event.c] [windows/win.c] [windows/nonclient.c]
|
||||||
|
Bunch of fixes for problems with -managed.
|
||||||
|
|
||||||
|
* [windows/win.c] [windows/winpos.c]
|
||||||
|
Changed conditions for WM_SIZE, WM_MOVE, and WM_GETMINMAXINFO
|
||||||
|
in CreateWindow.
|
||||||
|
|
||||||
|
* [windows/win.c] [windows/queue.c] [misc/user.c]
|
||||||
|
Do not send WM_PARENTNOTIFY when in AppExit and call WH_SHELL
|
||||||
|
on window creation/destruction.
|
||||||
|
|
||||||
|
* [objects/palette.c]
|
||||||
|
Crude RealizePalette(). At least something is visible in LviewPro.
|
||||||
|
|
||||||
|
Sun May 12 02:05:00 1996 Thomas Sandford <t.d.g.sandford@prds-grn.demon.co.uk>
|
||||||
|
|
||||||
|
* [if1632/gdi32.spec]
|
||||||
|
Added Rectangle (use win16 version).
|
||||||
|
|
||||||
|
* [if1632/kernel32.spec]
|
||||||
|
Added GetWindowsDirectoryA (use win16 GetWindowsDirectory).
|
||||||
|
|
||||||
|
* [if1632/user32.spec]
|
||||||
|
Added GetSubMenu, MoveWindow, SetScrollPos, SetScrollRange (use win16
|
||||||
|
versions).
|
||||||
|
Added SetWindowsHookExA (empty stub for now).
|
||||||
|
|
||||||
|
* [include/handle32.h]
|
||||||
|
Changed #include <malloc.h> to #include <stdlib.h> to prevent
|
||||||
|
hate message from FreeBSD compiler.
|
||||||
|
|
||||||
|
* [win32/newfns.c]
|
||||||
|
Added new function SetWindowsHookEx32A (empty stub for now).
|
||||||
|
|
||||||
|
* [win32/user32.c]
|
||||||
|
Removed redundant debugging printf statement.
|
||||||
|
|
||||||
|
Sun May 12 01:24:57 1996 Huw D. M. Davies <h.davies1@physics.oxford.ac.uk>
|
||||||
|
|
||||||
|
* [memory/local.c]
|
||||||
|
Avoid creating adjacent free blocks.
|
||||||
|
Free the block in LocalReAlloc() before allocating a new one.
|
||||||
|
Fixed LocalReAlloc() for discarded blocks.
|
||||||
|
|
||||||
|
Fri May 10 23:05:12 1996 Jukka Iivonen <iivonen@cc.helsinki.fi>
|
||||||
|
|
||||||
|
* [resources/sysres_Fi.rc]
|
||||||
|
ChooseFont and ChooseColor dialogs updated.
|
||||||
|
|
||||||
|
Fri May 10 17:19:33 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
|
||||||
|
|
||||||
|
* [files/drive.c,if1632/kernel.spec]
|
||||||
|
GetCurrentDirectory(),SetCurrentDirectory() implemented.
|
||||||
|
|
||||||
|
* [if1632/advapi32.spec] [if1632/kernel.spec] [if1632/shell.spec]
|
||||||
|
[include/windows.h] [include/winreg.h] [loader/main.c]
|
||||||
|
[misc/main.c] [misc/shell.c] [misc/registry.c]
|
||||||
|
Registry fixes:
|
||||||
|
- loads win95 registry databases,
|
||||||
|
- save only updated keys on default,
|
||||||
|
- now adhers to the new function naming standard,
|
||||||
|
- minor cleanups.
|
||||||
|
|
||||||
|
Tue May 7 22:36:13 1996 Albrecht Kleine <kleine@ak.sax.de>
|
||||||
|
|
||||||
|
* [combo.c]
|
||||||
|
Added WM_COMMAND-handling for interaction between EDIT and COMBOLBOX
|
||||||
|
and synchronized mine with Greg Kreider's works.
|
||||||
|
|
||||||
|
* [commdlg.c]
|
||||||
|
Bugfix in ChooseFont: font size handling.
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
Mon May 6 12:56:26 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
|
Mon May 6 12:56:26 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
|
||||||
|
|
||||||
|
|
5
README
5
README
|
@ -25,6 +25,11 @@ To build Wine, first do a "./configure" and then a "make depend; make".
|
||||||
The executable "wine" will be built. "wine" will load and run 16-bit
|
The executable "wine" will be built. "wine" will load and run 16-bit
|
||||||
Windows executables.
|
Windows executables.
|
||||||
|
|
||||||
|
To build Winelib, do a "./configure --with-library", and then a "make
|
||||||
|
depend; make". The library "winelib.a" will be built, allowing to
|
||||||
|
compile Windows source code under Unix. If you have an ELF compiler,
|
||||||
|
you can use "./configure --with-dll" instead to build a shared library.
|
||||||
|
|
||||||
To upgrade to a new release by using a patch file, first cd to the
|
To upgrade to a new release by using a patch file, first cd to the
|
||||||
top-level directory of the release (the one containing this README
|
top-level directory of the release (the one containing this README
|
||||||
file). Then do a "make clean", and patch the release with:
|
file). Then do a "make clean", and patch the release with:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# From configure.in configure.in 1.00
|
# From configure.in configure.in 1.00
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated automatically using autoconf version 2.9
|
# Generated automatically using autoconf version 2.10-patched
|
||||||
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This configure script is free software; the Free Software Foundation
|
# This configure script is free software; the Free Software Foundation
|
||||||
|
@ -341,7 +341,7 @@ EOF
|
||||||
verbose=yes ;;
|
verbose=yes ;;
|
||||||
|
|
||||||
-version | --version | --versio | --versi | --vers)
|
-version | --version | --versio | --versi | --vers)
|
||||||
echo "configure generated by autoconf version 2.9"
|
echo "configure generated by autoconf version 2.10-patched"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
|
||||||
-with-* | --with-*)
|
-with-* | --with-*)
|
||||||
|
@ -1080,7 +1080,7 @@ else
|
||||||
# libraries we check for below, so use a different variable.
|
# libraries we check for below, so use a different variable.
|
||||||
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
|
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
|
||||||
echo $ac_n "checking for -lICE""... $ac_c" 1>&6
|
echo $ac_n "checking for -lICE""... $ac_c" 1>&6
|
||||||
ac_lib_var=`echo ICE_IceConnectionNumber | tr '.-/+' '___p'`
|
ac_lib_var=`echo ICE'_'IceConnectionNumber | tr './+\055' '__p_'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1090,6 +1090,8 @@ cat > conftest.$ac_ext <<EOF
|
||||||
#line 1091 "configure"
|
#line 1091 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
char IceConnectionNumber();
|
char IceConnectionNumber();
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1097,7 +1099,7 @@ int t() {
|
||||||
IceConnectionNumber()
|
IceConnectionNumber()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
if { (eval echo configure:1103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
@ -1126,16 +1128,18 @@ fi
|
||||||
# libraries were built with DECnet support. And karl@cs.umb.edu says
|
# libraries were built with DECnet support. And karl@cs.umb.edu says
|
||||||
# the Alpha needs dnet_stub (dnet does not exist).
|
# the Alpha needs dnet_stub (dnet does not exist).
|
||||||
echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
|
echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
|
||||||
ac_lib_var=`echo dnet_dnet_ntoa | tr '.-/+' '___p'`
|
ac_lib_var=`echo dnet'_'dnet_ntoa | tr './+\055' '__p_'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ldnet $LIBS"
|
LIBS="-ldnet $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1137 "configure"
|
#line 1139 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
char dnet_ntoa();
|
char dnet_ntoa();
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1143,7 +1147,7 @@ int t() {
|
||||||
dnet_ntoa()
|
dnet_ntoa()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
if { (eval echo configure:1151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
@ -1163,16 +1167,18 @@ fi
|
||||||
|
|
||||||
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
|
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
|
||||||
echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
|
echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
|
||||||
ac_lib_var=`echo dnet_stub_dnet_ntoa | tr '.-/+' '___p'`
|
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | tr './+\055' '__p_'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ldnet_stub $LIBS"
|
LIBS="-ldnet_stub $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1174 "configure"
|
#line 1178 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
char dnet_ntoa();
|
char dnet_ntoa();
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1180,7 +1186,7 @@ int t() {
|
||||||
dnet_ntoa()
|
dnet_ntoa()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
if { (eval echo configure:1190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
@ -1205,16 +1211,18 @@ fi
|
||||||
# Not sure which flavor of 386 UNIX this is, but it seems harmless to
|
# Not sure which flavor of 386 UNIX this is, but it seems harmless to
|
||||||
# check for it.
|
# check for it.
|
||||||
echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
|
echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
|
||||||
ac_lib_var=`echo nsl_t_accept | tr '.-/+' '___p'`
|
ac_lib_var=`echo nsl'_'t_accept | tr './+\055' '__p_'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lnsl $LIBS"
|
LIBS="-lnsl $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1216 "configure"
|
#line 1222 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
char t_accept();
|
char t_accept();
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1222,7 +1230,7 @@ int t() {
|
||||||
t_accept()
|
t_accept()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
if { (eval echo configure:1234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
@ -1245,17 +1253,20 @@ fi
|
||||||
# socket/setsockopt and other routines are undefined under SCO ODT 2.0.
|
# socket/setsockopt and other routines are undefined under SCO ODT 2.0.
|
||||||
# But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
|
# But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
|
||||||
if test "`(uname) 2>/dev/null`" != IRIX; then
|
if test "`(uname) 2>/dev/null`" != IRIX; then
|
||||||
echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
|
if test $ac_cv_lib_nsl_t_accept = no; then
|
||||||
ac_lib_var=`echo socket_socket | tr '.-/+' '___p'`
|
echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
|
||||||
|
ac_lib_var=`echo socket'_'socket | tr './+\055' '__p_'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lsocket $LIBS"
|
LIBS="-lsocket $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1257 "configure"
|
#line 1266 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
char socket();
|
char socket();
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1263,7 +1274,7 @@ int t() {
|
||||||
socket()
|
socket()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
if { (eval echo configure:1278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
@ -1281,6 +1292,47 @@ else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
# If we found -lnsl, use it to check for -lsocket. -- AJ
|
||||||
|
echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
|
||||||
|
ac_lib_var=`echo socket'_'socket | tr './+\055' '__p_'`
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
else
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
LIBS="-lsocket -lnsl $LIBS"
|
||||||
|
cat > conftest.$ac_ext <<EOF
|
||||||
|
#line 1306 "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
|
char socket();
|
||||||
|
|
||||||
|
int main() { return 0; }
|
||||||
|
int t() {
|
||||||
|
socket()
|
||||||
|
; return 0; }
|
||||||
|
EOF
|
||||||
|
if { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||||
|
rm -rf conftest*
|
||||||
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
|
else
|
||||||
|
rm -rf conftest*
|
||||||
|
eval "ac_cv_lib_$ac_lib_var=no"
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
|
||||||
|
fi
|
||||||
|
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||||
|
echo "$ac_t""yes" 1>&6
|
||||||
|
X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
|
||||||
|
else
|
||||||
|
echo "$ac_t""no" 1>&6
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1353,16 +1405,18 @@ then
|
||||||
*) ac_lib=l ;;
|
*) ac_lib=l ;;
|
||||||
esac
|
esac
|
||||||
echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&6
|
echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&6
|
||||||
ac_lib_var=`echo $ac_lib_yywrap | tr '.-/+' '___p'`
|
ac_lib_var=`echo $ac_lib'_'yywrap | tr './+\055' '__p_'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-l$ac_lib $LIBS"
|
LIBS="-l$ac_lib $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1364 "configure"
|
#line 1416 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
char yywrap();
|
char yywrap();
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1370,7 +1424,7 @@ int t() {
|
||||||
yywrap()
|
yywrap()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
if { (eval echo configure:1428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
@ -1478,16 +1532,18 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
|
||||||
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
||||||
|
|
||||||
echo $ac_n "checking for -li386""... $ac_c" 1>&6
|
echo $ac_n "checking for -li386""... $ac_c" 1>&6
|
||||||
ac_lib_var=`echo i386_i386_set_ldt | tr '.-/+' '___p'`
|
ac_lib_var=`echo i386'_'i386_set_ldt | tr './+\055' '__p_'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-li386 $LIBS"
|
LIBS="-li386 $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1489 "configure"
|
#line 1543 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
char i386_set_ldt();
|
char i386_set_ldt();
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1495,7 +1551,7 @@ int t() {
|
||||||
i386_set_ldt()
|
i386_set_ldt()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
if { (eval echo configure:1555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
@ -1527,11 +1583,11 @@ else
|
||||||
ac_cv_c_cross=yes
|
ac_cv_c_cross=yes
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1531 "configure"
|
#line 1587 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
main(){return(0);}
|
main(){return(0);}
|
||||||
EOF
|
EOF
|
||||||
{ (eval echo configure:1535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
{ (eval echo configure:1591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||||
ac_cv_c_cross=no
|
ac_cv_c_cross=no
|
||||||
else
|
else
|
||||||
|
@ -1552,7 +1608,7 @@ else
|
||||||
ac_cv_c_gcc_strength_bug="yes"
|
ac_cv_c_gcc_strength_bug="yes"
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1556 "configure"
|
#line 1612 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
|
@ -1563,7 +1619,7 @@ int main(void) {
|
||||||
exit( Array[1] != -2 );
|
exit( Array[1] != -2 );
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
{ (eval echo configure:1567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
{ (eval echo configure:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||||
ac_cv_c_gcc_strength_bug="no"
|
ac_cv_c_gcc_strength_bug="no"
|
||||||
else
|
else
|
||||||
|
@ -1588,12 +1644,14 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1592 "configure"
|
#line 1648 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
char $ac_func();
|
char $ac_func();
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1610,7 +1668,7 @@ $ac_func();
|
||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
if { (eval echo configure:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
|
@ -1640,12 +1698,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1644 "configure"
|
#line 1702 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <$ac_hdr>
|
#include <$ac_hdr>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:1649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:1707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out`
|
ac_err=`grep -v '^ *+' conftest.out`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
|
@ -1674,7 +1732,7 @@ if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1678 "configure"
|
#line 1736 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -1729,7 +1787,7 @@ if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1733 "configure"
|
#line 1791 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1779,7 +1837,7 @@ ccp = (char const *const *) p;
|
||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:1841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_c_const=yes
|
ac_cv_c_const=yes
|
||||||
else
|
else
|
||||||
|
@ -1803,7 +1861,7 @@ if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1807 "configure"
|
#line 1865 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -1811,7 +1869,7 @@ else
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:1815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:1873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out`
|
ac_err=`grep -v '^ *+' conftest.out`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
|
@ -1826,7 +1884,7 @@ rm -f conftest*
|
||||||
if test $ac_cv_header_stdc = yes; then
|
if test $ac_cv_header_stdc = yes; then
|
||||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1830 "configure"
|
#line 1888 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
EOF
|
EOF
|
||||||
|
@ -1844,7 +1902,7 @@ fi
|
||||||
if test $ac_cv_header_stdc = yes; then
|
if test $ac_cv_header_stdc = yes; then
|
||||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1848 "configure"
|
#line 1906 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
EOF
|
EOF
|
||||||
|
@ -1865,7 +1923,7 @@ if test "$cross_compiling" = yes; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1869 "configure"
|
#line 1927 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||||
|
@ -1876,7 +1934,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
||||||
exit (0); }
|
exit (0); }
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
{ (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
{ (eval echo configure:1938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
|
@ -1900,7 +1958,7 @@ if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1904 "configure"
|
#line 1962 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#if STDC_HEADERS
|
#if STDC_HEADERS
|
||||||
|
@ -2019,7 +2077,7 @@ do
|
||||||
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
||||||
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
||||||
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
||||||
echo "$CONFIG_STATUS generated by autoconf version 2.9"
|
echo "$CONFIG_STATUS generated by autoconf version 2.10-patched"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
-help | --help | --hel | --he | --h)
|
-help | --help | --hel | --he | --h)
|
||||||
echo "\$ac_cs_usage"; exit 0 ;;
|
echo "\$ac_cs_usage"; exit 0 ;;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "syscolor.h"
|
#include "syscolor.h"
|
||||||
#include "graphics.h"
|
#include "graphics.h"
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
#include "stackframe.h"
|
#include "heap.h"
|
||||||
|
|
||||||
extern void DEFWND_SetText( WND *wndPtr, LPSTR text ); /* windows/defwnd.c */
|
extern void DEFWND_SetText( WND *wndPtr, LPSTR text ); /* windows/defwnd.c */
|
||||||
|
|
||||||
|
@ -80,8 +80,7 @@ static WORD checkBoxWidth = 0, checkBoxHeight = 0;
|
||||||
|
|
||||||
LRESULT ButtonWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
LRESULT ButtonWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
POINT pt;
|
|
||||||
LONG lResult = 0;
|
LONG lResult = 0;
|
||||||
WND *wndPtr = WIN_FindWndPtr(hWnd);
|
WND *wndPtr = WIN_FindWndPtr(hWnd);
|
||||||
LONG style = wndPtr->dwStyle & 0x0000000F;
|
LONG style = wndPtr->dwStyle & 0x0000000F;
|
||||||
|
@ -132,15 +131,15 @@ LRESULT ButtonWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
if (btnPaintFunc[style])
|
if (btnPaintFunc[style])
|
||||||
{
|
{
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT16 ps;
|
||||||
HDC hdc = BeginPaint( hWnd, &ps );
|
HDC hdc = BeginPaint16( hWnd, &ps );
|
||||||
(btnPaintFunc[style])( wndPtr, hdc, ODA_DRAWENTIRE );
|
(btnPaintFunc[style])( wndPtr, hdc, ODA_DRAWENTIRE );
|
||||||
ReleaseDC( hWnd, hdc );
|
EndPaint16( hWnd, &ps );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_LBUTTONDOWN:
|
case WM_LBUTTONDOWN:
|
||||||
SendMessage( hWnd, BM_SETSTATE, TRUE, 0 );
|
SendMessage( hWnd, BM_SETSTATE16, TRUE, 0 );
|
||||||
SetFocus( hWnd );
|
SetFocus( hWnd );
|
||||||
SetCapture( hWnd );
|
SetCapture( hWnd );
|
||||||
break;
|
break;
|
||||||
|
@ -148,23 +147,21 @@ LRESULT ButtonWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
case WM_LBUTTONUP:
|
case WM_LBUTTONUP:
|
||||||
ReleaseCapture();
|
ReleaseCapture();
|
||||||
if (!(infoPtr->state & BUTTON_HIGHLIGHTED)) break;
|
if (!(infoPtr->state & BUTTON_HIGHLIGHTED)) break;
|
||||||
SendMessage( hWnd, BM_SETSTATE, FALSE, 0 );
|
SendMessage( hWnd, BM_SETSTATE16, FALSE, 0 );
|
||||||
GetClientRect( hWnd, &rect );
|
GetClientRect16( hWnd, &rect );
|
||||||
pt.x = LOWORD(lParam);
|
if (PtInRect16( &rect, MAKEPOINT16(lParam) ))
|
||||||
pt.y = HIWORD(lParam);
|
|
||||||
if (PtInRect( &rect, pt ))
|
|
||||||
{
|
{
|
||||||
switch(style)
|
switch(style)
|
||||||
{
|
{
|
||||||
case BS_AUTOCHECKBOX:
|
case BS_AUTOCHECKBOX:
|
||||||
SendMessage( hWnd, BM_SETCHECK,
|
SendMessage( hWnd, BM_SETCHECK16,
|
||||||
!(infoPtr->state & BUTTON_CHECKED), 0 );
|
!(infoPtr->state & BUTTON_CHECKED), 0 );
|
||||||
break;
|
break;
|
||||||
case BS_AUTORADIOBUTTON:
|
case BS_AUTORADIOBUTTON:
|
||||||
SendMessage( hWnd, BM_SETCHECK, TRUE, 0 );
|
SendMessage( hWnd, BM_SETCHECK16, TRUE, 0 );
|
||||||
break;
|
break;
|
||||||
case BS_AUTO3STATE:
|
case BS_AUTO3STATE:
|
||||||
SendMessage( hWnd, BM_SETCHECK,
|
SendMessage( hWnd, BM_SETCHECK16,
|
||||||
(infoPtr->state & BUTTON_3STATE) ? 0 :
|
(infoPtr->state & BUTTON_3STATE) ? 0 :
|
||||||
((infoPtr->state & 3) + 1), 0 );
|
((infoPtr->state & 3) + 1), 0 );
|
||||||
break;
|
break;
|
||||||
|
@ -182,12 +179,9 @@ LRESULT ButtonWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
if (GetCapture() == hWnd)
|
if (GetCapture() == hWnd)
|
||||||
{
|
{
|
||||||
GetClientRect( hWnd, &rect );
|
GetClientRect16( hWnd, &rect );
|
||||||
pt.x = LOWORD(lParam);
|
SendMessage(hWnd, BM_SETSTATE16,
|
||||||
pt.y = HIWORD(lParam);
|
PtInRect16( &rect,MAKEPOINT16(lParam) ), 0 );
|
||||||
if (PtInRect( &rect, pt) )
|
|
||||||
SendMessage( hWnd, BM_SETSTATE, TRUE, 0 );
|
|
||||||
else SendMessage( hWnd, BM_SETSTATE, FALSE, 0 );
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -221,10 +215,11 @@ LRESULT ButtonWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_SYSCOLORCHANGE:
|
case WM_SYSCOLORCHANGE:
|
||||||
InvalidateRect(hWnd, NULL, FALSE);
|
InvalidateRect32( hWnd, NULL, FALSE );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BM_SETSTYLE:
|
case BM_SETSTYLE16:
|
||||||
|
case BM_SETSTYLE32:
|
||||||
if ((wParam & 0x0f) >= MAX_BTN_TYPE) break;
|
if ((wParam & 0x0f) >= MAX_BTN_TYPE) break;
|
||||||
wndPtr->dwStyle = (wndPtr->dwStyle & 0xfffffff0)
|
wndPtr->dwStyle = (wndPtr->dwStyle & 0xfffffff0)
|
||||||
| (wParam & 0x0000000f);
|
| (wParam & 0x0000000f);
|
||||||
|
@ -232,11 +227,13 @@ LRESULT ButtonWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
PAINT_BUTTON( wndPtr, style, ODA_DRAWENTIRE );
|
PAINT_BUTTON( wndPtr, style, ODA_DRAWENTIRE );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BM_GETCHECK:
|
case BM_GETCHECK16:
|
||||||
|
case BM_GETCHECK32:
|
||||||
lResult = infoPtr->state & 3;
|
lResult = infoPtr->state & 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BM_SETCHECK:
|
case BM_SETCHECK16:
|
||||||
|
case BM_SETCHECK32:
|
||||||
if (wParam > maxCheckState[style])
|
if (wParam > maxCheckState[style])
|
||||||
wParam = maxCheckState[style];
|
wParam = maxCheckState[style];
|
||||||
if ((infoPtr->state & 3) != wParam)
|
if ((infoPtr->state & 3) != wParam)
|
||||||
|
@ -248,11 +245,13 @@ LRESULT ButtonWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
BUTTON_CheckAutoRadioButton( wndPtr );
|
BUTTON_CheckAutoRadioButton( wndPtr );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BM_GETSTATE:
|
case BM_GETSTATE16:
|
||||||
|
case BM_GETSTATE32:
|
||||||
lResult = infoPtr->state;
|
lResult = infoPtr->state;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BM_SETSTATE:
|
case BM_SETSTATE16:
|
||||||
|
case BM_SETSTATE32:
|
||||||
if (wParam)
|
if (wParam)
|
||||||
{
|
{
|
||||||
if (infoPtr->state & BUTTON_HIGHLIGHTED) break;
|
if (infoPtr->state & BUTTON_HIGHLIGHTED) break;
|
||||||
|
@ -281,20 +280,20 @@ LRESULT ButtonWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
static void PB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
static void PB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
HPEN hOldPen;
|
HPEN16 hOldPen;
|
||||||
HBRUSH hOldBrush;
|
HBRUSH hOldBrush;
|
||||||
char *text;
|
char *text;
|
||||||
DWORD dwTextSize;
|
DWORD dwTextSize;
|
||||||
TEXTMETRIC tm;
|
TEXTMETRIC tm;
|
||||||
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
||||||
|
|
||||||
GetClientRect(wndPtr->hwndSelf, &rc);
|
GetClientRect16(wndPtr->hwndSelf, &rc);
|
||||||
|
|
||||||
/* Send WM_CTLCOLOR to allow changing the font (the colors are fixed) */
|
/* Send WM_CTLCOLOR to allow changing the font (the colors are fixed) */
|
||||||
if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont );
|
if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont );
|
||||||
BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
|
BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
|
||||||
hOldPen = (HPEN)SelectObject(hDC, sysColorObjects.hpenWindowFrame);
|
hOldPen = (HPEN16)SelectObject(hDC, sysColorObjects.hpenWindowFrame);
|
||||||
hOldBrush = (HBRUSH)SelectObject(hDC, sysColorObjects.hbrushBtnFace);
|
hOldBrush = (HBRUSH)SelectObject(hDC, sysColorObjects.hbrushBtnFace);
|
||||||
SetBkMode(hDC, TRANSPARENT);
|
SetBkMode(hDC, TRANSPARENT);
|
||||||
Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
|
Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
|
||||||
|
@ -305,12 +304,12 @@ static void PB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
SetPixel( hDC, rc.right-1, rc.top, GetSysColor(COLOR_WINDOW) );
|
SetPixel( hDC, rc.right-1, rc.top, GetSysColor(COLOR_WINDOW) );
|
||||||
SetPixel( hDC, rc.right-1, rc.bottom-1, GetSysColor(COLOR_WINDOW) );
|
SetPixel( hDC, rc.right-1, rc.bottom-1, GetSysColor(COLOR_WINDOW) );
|
||||||
}
|
}
|
||||||
InflateRect( &rc, -1, -1 );
|
InflateRect16( &rc, -1, -1 );
|
||||||
|
|
||||||
if ((wndPtr->dwStyle & 0x000f) == BS_DEFPUSHBUTTON)
|
if ((wndPtr->dwStyle & 0x000f) == BS_DEFPUSHBUTTON)
|
||||||
{
|
{
|
||||||
Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
|
Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
|
||||||
InflateRect( &rc, -1, -1 );
|
InflateRect16( &rc, -1, -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (infoPtr->state & BUTTON_HIGHLIGHTED)
|
if (infoPtr->state & BUTTON_HIGHLIGHTED)
|
||||||
|
@ -330,8 +329,8 @@ static void PB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
{
|
{
|
||||||
SetTextColor( hDC, (wndPtr->dwStyle & WS_DISABLED) ?
|
SetTextColor( hDC, (wndPtr->dwStyle & WS_DISABLED) ?
|
||||||
GetSysColor(COLOR_GRAYTEXT) : GetSysColor(COLOR_BTNTEXT));
|
GetSysColor(COLOR_GRAYTEXT) : GetSysColor(COLOR_BTNTEXT));
|
||||||
DrawText(hDC, text, -1, &rc,
|
DrawText16( hDC, text, -1, &rc,
|
||||||
DT_SINGLELINE | DT_CENTER | DT_VCENTER);
|
DT_SINGLELINE | DT_CENTER | DT_VCENTER );
|
||||||
/* do we have the focus? */
|
/* do we have the focus? */
|
||||||
if (infoPtr->state & BUTTON_HASFOCUS)
|
if (infoPtr->state & BUTTON_HASFOCUS)
|
||||||
{
|
{
|
||||||
|
@ -342,8 +341,8 @@ static void PB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
ydelta = ((rc.bottom - rc.top) - tm.tmHeight - 1) / 2;
|
ydelta = ((rc.bottom - rc.top) - tm.tmHeight - 1) / 2;
|
||||||
if (xdelta < 0) xdelta = 0;
|
if (xdelta < 0) xdelta = 0;
|
||||||
if (ydelta < 0) ydelta = 0;
|
if (ydelta < 0) ydelta = 0;
|
||||||
InflateRect( &rc, -xdelta, -ydelta );
|
InflateRect16( &rc, -xdelta, -ydelta );
|
||||||
DrawFocusRect( hDC, &rc );
|
DrawFocusRect16( hDC, &rc );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,19 +357,19 @@ static void PB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
|
|
||||||
static void CB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
static void CB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
int textlen, delta, x, y;
|
int textlen, delta, x, y;
|
||||||
char *text;
|
char *text;
|
||||||
TEXTMETRIC tm;
|
TEXTMETRIC tm;
|
||||||
SIZE size;
|
SIZE16 size;
|
||||||
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
||||||
|
|
||||||
GetClientRect(wndPtr->hwndSelf, &rc);
|
GetClientRect16(wndPtr->hwndSelf, &rc);
|
||||||
|
|
||||||
if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont );
|
if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont );
|
||||||
hBrush = BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
|
hBrush = BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
|
||||||
if (action == ODA_DRAWENTIRE) FillRect(hDC, &rc, hBrush);
|
if (action == ODA_DRAWENTIRE) FillRect16( hDC, &rc, hBrush );
|
||||||
|
|
||||||
GetTextMetrics(hDC, &tm);
|
GetTextMetrics(hDC, &tm);
|
||||||
delta = (rc.bottom - rc.top - tm.tmHeight) >> 1;
|
delta = (rc.bottom - rc.top - tm.tmHeight) >> 1;
|
||||||
|
@ -393,13 +392,13 @@ static void CB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
{
|
{
|
||||||
if (wndPtr->dwStyle & WS_DISABLED)
|
if (wndPtr->dwStyle & WS_DISABLED)
|
||||||
SetTextColor( hDC, GetSysColor(COLOR_GRAYTEXT) );
|
SetTextColor( hDC, GetSysColor(COLOR_GRAYTEXT) );
|
||||||
DrawText(hDC, text, textlen, &rc, DT_SINGLELINE | DT_VCENTER);
|
DrawText16( hDC, text, textlen, &rc, DT_SINGLELINE | DT_VCENTER );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((action == ODA_FOCUS) ||
|
if ((action == ODA_FOCUS) ||
|
||||||
((action == ODA_DRAWENTIRE) && (infoPtr->state & BUTTON_HASFOCUS)))
|
((action == ODA_DRAWENTIRE) && (infoPtr->state & BUTTON_HASFOCUS)))
|
||||||
{
|
{
|
||||||
GetTextExtentPoint(hDC, text, textlen, &size);
|
GetTextExtentPoint16( hDC, text, textlen, &size );
|
||||||
if (delta > 1)
|
if (delta > 1)
|
||||||
{
|
{
|
||||||
rc.top += delta - 1;
|
rc.top += delta - 1;
|
||||||
|
@ -407,7 +406,7 @@ static void CB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
}
|
}
|
||||||
rc.left--;
|
rc.left--;
|
||||||
rc.right = MIN( rc.left + size.cx + 2, rc.right );
|
rc.right = MIN( rc.left + size.cx + 2, rc.right );
|
||||||
DrawFocusRect(hDC, &rc);
|
DrawFocusRect16( hDC, &rc );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -425,7 +424,7 @@ static void BUTTON_CheckAutoRadioButton( WND *wndPtr )
|
||||||
for(sibling = GetNextDlgGroupItem(parent,wndPtr->hwndSelf,FALSE);
|
for(sibling = GetNextDlgGroupItem(parent,wndPtr->hwndSelf,FALSE);
|
||||||
sibling != wndPtr->hwndSelf;
|
sibling != wndPtr->hwndSelf;
|
||||||
sibling = GetNextDlgGroupItem(parent,sibling,FALSE))
|
sibling = GetNextDlgGroupItem(parent,sibling,FALSE))
|
||||||
SendMessage(sibling,BM_SETCHECK,BUTTON_UNCHECKED,0);
|
SendMessage( sibling, BM_SETCHECK16, BUTTON_UNCHECKED, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -435,9 +434,9 @@ static void BUTTON_CheckAutoRadioButton( WND *wndPtr )
|
||||||
|
|
||||||
static void GB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
static void GB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
char *text;
|
char *text;
|
||||||
SIZE size;
|
SIZE16 size;
|
||||||
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
||||||
|
|
||||||
if (action != ODA_DRAWENTIRE) return;
|
if (action != ODA_DRAWENTIRE) return;
|
||||||
|
@ -446,7 +445,7 @@ static void GB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
|
BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
|
||||||
SelectObject( hDC, sysColorObjects.hpenWindowFrame );
|
SelectObject( hDC, sysColorObjects.hpenWindowFrame );
|
||||||
|
|
||||||
GetClientRect( wndPtr->hwndSelf, &rc);
|
GetClientRect16( wndPtr->hwndSelf, &rc);
|
||||||
|
|
||||||
MoveTo( hDC, rc.left, rc.top+2 );
|
MoveTo( hDC, rc.left, rc.top+2 );
|
||||||
LineTo( hDC, rc.right-1, rc.top+2 );
|
LineTo( hDC, rc.right-1, rc.top+2 );
|
||||||
|
@ -455,13 +454,13 @@ static void GB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
LineTo( hDC, rc.left, rc.top+2 );
|
LineTo( hDC, rc.left, rc.top+2 );
|
||||||
|
|
||||||
if (!(text = (char*) USER_HEAP_LIN_ADDR( wndPtr->hText ))) return;
|
if (!(text = (char*) USER_HEAP_LIN_ADDR( wndPtr->hText ))) return;
|
||||||
GetTextExtentPoint(hDC, text, strlen(text), &size);
|
GetTextExtentPoint16( hDC, text, strlen(text), &size );
|
||||||
rc.left += 10;
|
rc.left += 10;
|
||||||
rc.right = rc.left + size.cx + 1;
|
rc.right = rc.left + size.cx + 1;
|
||||||
rc.bottom = size.cy;
|
rc.bottom = size.cy;
|
||||||
if (wndPtr->dwStyle & WS_DISABLED)
|
if (wndPtr->dwStyle & WS_DISABLED)
|
||||||
SetTextColor( hDC, GetSysColor(COLOR_GRAYTEXT) );
|
SetTextColor( hDC, GetSysColor(COLOR_GRAYTEXT) );
|
||||||
DrawText(hDC, text, -1, &rc, DT_SINGLELINE );
|
DrawText16( hDC, text, -1, &rc, DT_SINGLELINE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -471,21 +470,21 @@ static void GB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
|
|
||||||
static void UB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
static void UB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
||||||
|
|
||||||
if (action == ODA_SELECT) return;
|
if (action == ODA_SELECT) return;
|
||||||
|
|
||||||
GetClientRect( wndPtr->hwndSelf, &rc);
|
GetClientRect16( wndPtr->hwndSelf, &rc);
|
||||||
|
|
||||||
if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont );
|
if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont );
|
||||||
hBrush = BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
|
hBrush = BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
|
||||||
FillRect(hDC, &rc, hBrush);
|
FillRect16( hDC, &rc, hBrush );
|
||||||
|
|
||||||
if ((action == ODA_FOCUS) ||
|
if ((action == ODA_FOCUS) ||
|
||||||
((action == ODA_DRAWENTIRE) && (infoPtr->state & BUTTON_HASFOCUS)))
|
((action == ODA_DRAWENTIRE) && (infoPtr->state & BUTTON_HASFOCUS)))
|
||||||
DrawFocusRect(hDC, &rc);
|
DrawFocusRect16( hDC, &rc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -495,20 +494,22 @@ static void UB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
|
|
||||||
static void OB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
static void OB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
||||||
{
|
{
|
||||||
DRAWITEMSTRUCT dis;
|
DRAWITEMSTRUCT16 *dis;
|
||||||
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
||||||
|
|
||||||
dis.CtlType = ODT_BUTTON;
|
if (!(dis = SEGPTR_NEW(DRAWITEMSTRUCT16))) return;
|
||||||
dis.CtlID = wndPtr->wIDmenu;
|
dis->CtlType = ODT_BUTTON;
|
||||||
dis.itemID = 0;
|
dis->CtlID = wndPtr->wIDmenu;
|
||||||
dis.itemAction = action;
|
dis->itemID = 0;
|
||||||
dis.itemState = (infoPtr->state & BUTTON_HASFOCUS) ? ODS_FOCUS : 0 |
|
dis->itemAction = action;
|
||||||
|
dis->itemState = (infoPtr->state & BUTTON_HASFOCUS) ? ODS_FOCUS : 0 |
|
||||||
(infoPtr->state & BUTTON_HIGHLIGHTED) ? ODS_SELECTED : 0 |
|
(infoPtr->state & BUTTON_HIGHLIGHTED) ? ODS_SELECTED : 0 |
|
||||||
(wndPtr->dwStyle & WS_DISABLED) ? ODS_DISABLED : 0;
|
(wndPtr->dwStyle & WS_DISABLED) ? ODS_DISABLED : 0;
|
||||||
dis.hwndItem = wndPtr->hwndSelf;
|
dis->hwndItem = wndPtr->hwndSelf;
|
||||||
dis.hDC = hDC;
|
dis->hDC = hDC;
|
||||||
GetClientRect( wndPtr->hwndSelf, &dis.rcItem );
|
GetClientRect16( wndPtr->hwndSelf, &dis->rcItem );
|
||||||
dis.itemData = 0;
|
dis->itemData = 0;
|
||||||
SendMessage( GetParent(wndPtr->hwndSelf), WM_DRAWITEM, 1,
|
SendMessage( GetParent(wndPtr->hwndSelf), WM_DRAWITEM, 1,
|
||||||
(LPARAM)MAKE_SEGPTR(&dis) );
|
(LPARAM)SEGPTR_GET(dis) );
|
||||||
|
SEGPTR_FREE(dis);
|
||||||
}
|
}
|
||||||
|
|
311
controls/combo.c
311
controls/combo.c
|
@ -3,6 +3,7 @@
|
||||||
*
|
*
|
||||||
* Copyright 1993 Martin Ayotte
|
* Copyright 1993 Martin Ayotte
|
||||||
* Copyright 1995 Bernd Schmidt
|
* Copyright 1995 Bernd Schmidt
|
||||||
|
* Copyright 1996 Albrecht Kleine [some fixes]
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
#include "user.h"
|
#include "user.h"
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
#include "graphics.h"
|
#include "graphics.h"
|
||||||
|
#include "heap.h"
|
||||||
#include "listbox.h"
|
#include "listbox.h"
|
||||||
#include "dos_fs.h"
|
#include "dos_fs.h"
|
||||||
#include "drive.h"
|
#include "drive.h"
|
||||||
|
@ -33,18 +35,8 @@
|
||||||
* I hope no programs rely on the implementation of combos.
|
* I hope no programs rely on the implementation of combos.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
#define ID_EDIT 1
|
||||||
* May 2nd: I added 3 "work arounds" (#1,#2,#3) to make combos
|
#define ID_CLB 2
|
||||||
* with EDIT work. (We need that for ChooseFont dialog.)
|
|
||||||
* Perhaps we have to rewrite something more.
|
|
||||||
* I have prepared some more stuff, but it doesn't
|
|
||||||
* contain here, because it's not ready ;-)
|
|
||||||
*
|
|
||||||
* If you're writing on combo.c, please mail to me.
|
|
||||||
*
|
|
||||||
* Albrecht Kleine <kleine@ak.sax.de>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define CBLMM_EDGE 4 /* distance inside box which is same as moving mouse
|
#define CBLMM_EDGE 4 /* distance inside box which is same as moving mouse
|
||||||
outside box, to trigger scrolling of CBL */
|
outside box, to trigger scrolling of CBL */
|
||||||
|
|
||||||
|
@ -97,9 +89,7 @@ void ComboUpdateWindow(HWND hwnd, LPHEADLIST lphl, LPHEADCOMBO lphc, BOOL repain
|
||||||
|
|
||||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||||
SetScrollRange(lphc->hWndLBox,SB_VERT,0,ListMaxFirstVisible(lphl),TRUE);
|
SetScrollRange(lphc->hWndLBox,SB_VERT,0,ListMaxFirstVisible(lphl),TRUE);
|
||||||
if (repaint && lphl->bRedrawFlag) {
|
if (repaint && lphl->bRedrawFlag) InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -107,11 +97,11 @@ void ComboUpdateWindow(HWND hwnd, LPHEADLIST lphl, LPHEADCOMBO lphc, BOOL repain
|
||||||
*/
|
*/
|
||||||
static LRESULT CBNCCreate(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
static LRESULT CBNCCreate(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
CREATESTRUCT *createStruct;
|
CREATESTRUCT16 *createStruct;
|
||||||
|
|
||||||
if (!hComboBit) COMBO_Init();
|
if (!hComboBit) COMBO_Init();
|
||||||
|
|
||||||
createStruct = (CREATESTRUCT *)PTR_SEG_TO_LIN(lParam);
|
createStruct = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam);
|
||||||
createStruct->style |= WS_BORDER;
|
createStruct->style |= WS_BORDER;
|
||||||
SetWindowLong(hwnd, GWL_STYLE, createStruct->style);
|
SetWindowLong(hwnd, GWL_STYLE, createStruct->style);
|
||||||
|
|
||||||
|
@ -129,10 +119,11 @@ static LRESULT CBCreate(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
LPHEADCOMBO lphc;
|
LPHEADCOMBO lphc;
|
||||||
LONG style = 0;
|
LONG style = 0;
|
||||||
LONG cstyle = GetWindowLong(hwnd,GWL_STYLE);
|
LONG cstyle = GetWindowLong(hwnd,GWL_STYLE);
|
||||||
RECT rect,lboxrect;
|
RECT16 rect,lboxrect;
|
||||||
WND* wndPtr = WIN_FindWndPtr(hwnd);
|
WND* wndPtr = WIN_FindWndPtr(hwnd);
|
||||||
char className[] = "COMBOLBOX"; /* Hack so that class names are > 0x10000 */
|
char className[] = "COMBOLBOX"; /* Hack so that class names are > 0x10000 */
|
||||||
char editName[] = "EDIT";
|
char editName[] = "EDIT";
|
||||||
|
HWND hwndp=0;
|
||||||
|
|
||||||
/* translate combo into listbox styles */
|
/* translate combo into listbox styles */
|
||||||
cstyle |= WS_BORDER;
|
cstyle |= WS_BORDER;
|
||||||
|
@ -147,80 +138,61 @@ static LRESULT CBCreate(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
lphl = ComboGetListHeader(hwnd);
|
lphl = ComboGetListHeader(hwnd);
|
||||||
lphc = ComboGetStorageHeader(hwnd);
|
lphc = ComboGetStorageHeader(hwnd);
|
||||||
|
|
||||||
GetClientRect(hwnd,&rect);
|
GetClientRect16(hwnd,&rect);
|
||||||
GetWindowRect(hwnd,&lboxrect);
|
lphc->LBoxTop = lphl->StdItemHeight;
|
||||||
|
|
||||||
/* FIXME: combos with edit controls are broken. */
|
switch(cstyle & 3)
|
||||||
switch(cstyle & 3) {
|
{
|
||||||
case CBS_SIMPLE: /* edit control, list always visible */
|
case CBS_SIMPLE: /* edit control, list always visible */
|
||||||
dprintf_combo(stddeb,"CBS_SIMPLE\n");
|
lboxrect=rect;
|
||||||
SetRectEmpty(&lphc->RectButton);
|
lboxrect.left +=8;
|
||||||
lboxrect=rect; /* work around #1 */
|
dprintf_combo(stddeb,"CBS_SIMPLE\n");
|
||||||
lphc->LBoxTop = lphl->StdItemHeight;
|
style= WS_BORDER | WS_CHILD | WS_VISIBLE | WS_VSCROLL;
|
||||||
lphc->hWndEdit = CreateWindow16(MAKE_SEGPTR(editName), (SEGPTR)0,
|
SetRectEmpty16(&lphc->RectButton);
|
||||||
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE | SS_LEFT | WS_BORDER,
|
hwndp=hwnd;
|
||||||
0, 0, rect.right, lphl->StdItemHeight,
|
break;
|
||||||
hwnd, (HMENU)1, WIN_GetWindowInstance(hwnd), 0L);
|
|
||||||
break;
|
case CBS_DROPDOWNLIST: /* static control, dropdown listbox */
|
||||||
case CBS_DROPDOWN: /* edit control, dropdown listbox */
|
case CBS_DROPDOWN: /* edit control, dropdown listbox */
|
||||||
dprintf_combo(stddeb,"CBS_DROPDOWN\n");
|
GetWindowRect16(hwnd,&lboxrect);
|
||||||
lphc->RectButton = rect;
|
style = WS_POPUP | WS_BORDER | WS_VSCROLL;
|
||||||
lphc->RectButton.left = lphc->RectButton.right - 6 - CBitWidth;
|
/* FIXME: WinSight says these should be CHILD windows with the TOPMOST flag
|
||||||
lphc->RectButton.bottom = lphc->RectButton.top + lphl->StdItemHeight;
|
* set. Wine doesn't support TOPMOST, and simply setting the WS_CHILD
|
||||||
lphc->LBoxTop = lphl->StdItemHeight;
|
* flag doesn't work. */
|
||||||
SetWindowPos(hwnd, 0, 0, 0, rect.right - rect.left + 2*SYSMETRICS_CXBORDER,
|
lphc->RectButton = rect;
|
||||||
|
lphc->RectButton.left = lphc->RectButton.right - 6 - CBitWidth;
|
||||||
|
lphc->RectButton.bottom = lphc->RectButton.top + lphl->StdItemHeight;
|
||||||
|
SetWindowPos(hwnd, 0, 0, 0, rect.right - rect.left + 2*SYSMETRICS_CXBORDER,
|
||||||
lphl->StdItemHeight + 2*SYSMETRICS_CYBORDER,
|
lphl->StdItemHeight + 2*SYSMETRICS_CYBORDER,
|
||||||
SWP_NOMOVE | SWP_NOZORDER);
|
SWP_NOMOVE | SWP_NOZORDER);
|
||||||
lphc->hWndEdit = CreateWindow16(MAKE_SEGPTR(editName), (SEGPTR)0,
|
rect.right=lphc->RectButton.left - 8;
|
||||||
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE | SS_LEFT,
|
dprintf_combo(stddeb,(cstyle & 3)==CBS_DROPDOWN ? "CBS_DROPDOWN\n": "CBS_DROPDOWNLIST\n");
|
||||||
0, 0, lphc->RectButton.left, lphl->StdItemHeight,
|
break;
|
||||||
hwnd, (HMENU)1, WIN_GetWindowInstance(hwnd), 0L);
|
|
||||||
break;
|
default: fprintf(stderr,"COMBOBOX error: bad class style!\n");
|
||||||
case CBS_DROPDOWNLIST: /* static control, dropdown listbox */
|
return 0;
|
||||||
dprintf_combo(stddeb,"CBS_DROPDOWNLIST\n");
|
|
||||||
lphc->RectButton = rect;
|
|
||||||
lphc->RectButton.left = lphc->RectButton.right - 6 - CBitWidth;
|
|
||||||
lphc->RectButton.bottom = lphc->RectButton.top + lphl->StdItemHeight;
|
|
||||||
lphc->LBoxTop = lphl->StdItemHeight;
|
|
||||||
|
|
||||||
SetWindowPos(hwnd, 0, 0, 0, rect.right,
|
|
||||||
lphl->StdItemHeight + 2*SYSMETRICS_CYBORDER,
|
|
||||||
SWP_NOMOVE | SWP_NOZORDER);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
lboxrect.top += lphc->LBoxTop;
|
|
||||||
/* FIXME: WinSight says these should be CHILD windows with the TOPMOST flag
|
if ((cstyle & 3) != CBS_DROPDOWNLIST)
|
||||||
* set. Wine doesn't support TOPMOST, and simply setting the WS_CHILD
|
lphc->hWndEdit = CreateWindow16(MAKE_SEGPTR(editName), (SEGPTR)0,
|
||||||
* flag doesn't work. */
|
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE | ES_LEFT | WS_BORDER,
|
||||||
if ((cstyle & 3)==CBS_SIMPLE) /* work around #2 */
|
0, 0, rect.right, lphl->StdItemHeight,
|
||||||
{
|
hwnd, (HMENU)ID_EDIT, WIN_GetWindowInstance(hwnd), 0L);
|
||||||
lphc->hWndLBox = CreateWindow16(MAKE_SEGPTR(className), (SEGPTR)0,
|
|
||||||
WS_BORDER | WS_CHILD | WS_VISIBLE |
|
lboxrect.top+=lphc->LBoxTop;
|
||||||
((cstyle & WS_HSCROLL)? WS_HSCROLL : 0) |
|
lphc->hWndLBox = CreateWindow16(MAKE_SEGPTR(className), (SEGPTR)0, style |
|
||||||
((cstyle & WS_VSCROLL)? WS_VSCROLL : 0),
|
|
||||||
lboxrect.left +8 , lboxrect.top,
|
|
||||||
lboxrect.right - lboxrect.left - 8,
|
|
||||||
lboxrect.bottom - lboxrect.top,
|
|
||||||
hwnd,0, WIN_GetWindowInstance(hwnd),
|
|
||||||
(SEGPTR)hwnd );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
lphc->hWndLBox = CreateWindow16(MAKE_SEGPTR(className), (SEGPTR)0,
|
|
||||||
WS_POPUP | WS_BORDER |
|
|
||||||
((cstyle & WS_HSCROLL)? WS_HSCROLL : 0) |
|
((cstyle & WS_HSCROLL)? WS_HSCROLL : 0) |
|
||||||
((cstyle & WS_VSCROLL)? WS_VSCROLL : 0),
|
((cstyle & WS_VSCROLL)? WS_VSCROLL : 0),
|
||||||
lboxrect.left, lboxrect.top,
|
lboxrect.left, lboxrect.top,
|
||||||
lboxrect.right - lboxrect.left,
|
lboxrect.right - lboxrect.left,
|
||||||
lboxrect.bottom - lboxrect.top,
|
lboxrect.bottom - lboxrect.top,
|
||||||
0, 0, WIN_GetWindowInstance(hwnd),
|
hwndp,(HMENU)ID_CLB, WIN_GetWindowInstance(hwnd),
|
||||||
(SEGPTR)hwnd );
|
(SEGPTR)hwnd );
|
||||||
ShowWindow(lphc->hWndLBox, SW_HIDE);
|
|
||||||
}
|
|
||||||
wndPtr->dwStyle &= ~(WS_VSCROLL | WS_HSCROLL);
|
wndPtr->dwStyle &= ~(WS_VSCROLL | WS_HSCROLL);
|
||||||
|
|
||||||
dprintf_combo( stddeb, "Combo Creation hwnd=%04x LBox=%04x\n",
|
dprintf_combo( stddeb, "Combo Creation hwnd=%04x LBox=%04x Edit=%04x\n",
|
||||||
hwnd, lphc->hWndLBox);
|
hwnd, lphc->hWndLBox, lphc->hWndEdit);
|
||||||
dprintf_combo( stddeb, " lbox %d,%d-%d,%d button %d,%d-%d,%d\n",
|
dprintf_combo( stddeb, " lbox %d,%d-%d,%d button %d,%d-%d,%d\n",
|
||||||
lboxrect.left, lboxrect.top, lboxrect.right, lboxrect.bottom,
|
lboxrect.left, lboxrect.top, lboxrect.right, lboxrect.bottom,
|
||||||
lphc->RectButton.left, lphc->RectButton.top,
|
lphc->RectButton.left, lphc->RectButton.top,
|
||||||
|
@ -254,14 +226,15 @@ static LRESULT CBPaint(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
LPHEADLIST lphl = ComboGetListHeader(hwnd);
|
LPHEADLIST lphl = ComboGetListHeader(hwnd);
|
||||||
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
|
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
|
||||||
LPLISTSTRUCT lpls;
|
LPLISTSTRUCT lpls;
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT16 ps;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
HFONT hOldFont;
|
HFONT hOldFont;
|
||||||
HDC hdc;
|
HDC16 hdc;
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
|
|
||||||
hdc = BeginPaint(hwnd, &ps);
|
hdc = BeginPaint16(hwnd, &ps);
|
||||||
if (hComboBit != 0 && !IsRectEmpty(&lphc->RectButton)) { /* work around #3 */
|
if (hComboBit != 0 && !IsRectEmpty16(&lphc->RectButton))
|
||||||
|
{
|
||||||
GRAPH_DrawReliefRect(hdc, &lphc->RectButton, 2, 2, FALSE);
|
GRAPH_DrawReliefRect(hdc, &lphc->RectButton, 2, 2, FALSE);
|
||||||
GRAPH_DrawBitmap(hdc, hComboBit,
|
GRAPH_DrawBitmap(hdc, hComboBit,
|
||||||
lphc->RectButton.left + 2,lphc->RectButton.top + 2,
|
lphc->RectButton.left + 2,lphc->RectButton.top + 2,
|
||||||
|
@ -271,7 +244,7 @@ static LRESULT CBPaint(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|| (lphc->dwStyle & 3) != CBS_DROPDOWNLIST)
|
|| (lphc->dwStyle & 3) != CBS_DROPDOWNLIST)
|
||||||
{
|
{
|
||||||
/* we don't want to draw an entry when there is an edit control */
|
/* we don't want to draw an entry when there is an edit control */
|
||||||
EndPaint(hwnd, &ps);
|
EndPaint16(hwnd, &ps);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,21 +258,21 @@ static LRESULT CBPaint(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
#endif
|
#endif
|
||||||
if (hBrush == 0) hBrush = GetStockObject(WHITE_BRUSH);
|
if (hBrush == 0) hBrush = GetStockObject(WHITE_BRUSH);
|
||||||
|
|
||||||
GetClientRect(hwnd, &rect);
|
GetClientRect16(hwnd, &rect);
|
||||||
|
|
||||||
CBCheckSize(hwnd);
|
CBCheckSize(hwnd);
|
||||||
rect.right -= (lphc->RectButton.right - lphc->RectButton.left);
|
rect.right -= (lphc->RectButton.right - lphc->RectButton.left);
|
||||||
|
|
||||||
lpls = ListBoxGetItem(lphl,lphl->ItemFocused);
|
lpls = ListBoxGetItem(lphl,lphl->ItemFocused);
|
||||||
if (lpls != NULL) {
|
if (lpls != NULL) {
|
||||||
FillRect(hdc, &rect, hBrush);
|
FillRect16(hdc, &rect, hBrush);
|
||||||
ListBoxDrawItem (hwnd, lphl, hdc, lpls, &rect, ODA_DRAWENTIRE, 0);
|
ListBoxDrawItem (hwnd, lphl, hdc, lpls, &rect, ODA_DRAWENTIRE, 0);
|
||||||
if (GetFocus() == hwnd)
|
if (GetFocus() == hwnd)
|
||||||
ListBoxDrawItem (hwnd,lphl, hdc, lpls, &rect, ODA_FOCUS, ODS_FOCUS);
|
ListBoxDrawItem (hwnd,lphl, hdc, lpls, &rect, ODA_FOCUS, ODS_FOCUS);
|
||||||
}
|
}
|
||||||
else FillRect(hdc, &rect, hBrush);
|
else FillRect16(hdc, &rect, hBrush);
|
||||||
SelectObject(hdc,hOldFont);
|
SelectObject(hdc,hOldFont);
|
||||||
EndPaint(hwnd, &ps);
|
EndPaint16(hwnd, &ps);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,12 +323,13 @@ static LRESULT CBKeyDown(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
newFocused = lphl->ItemsCount - 1;
|
newFocused = lphl->ItemsCount - 1;
|
||||||
|
|
||||||
ListBoxSetCurSel(lphl, newFocused);
|
ListBoxSetCurSel(lphl, newFocused);
|
||||||
|
SendMessage(hwnd, WM_COMMAND,ID_CLB,MAKELONG(0,CBN_SELCHANGE));
|
||||||
ListBoxSendNotification(lphl, CBN_SELCHANGE);
|
ListBoxSendNotification(lphl, CBN_SELCHANGE);
|
||||||
|
|
||||||
lphl->ItemFocused = newFocused;
|
lphl->ItemFocused = newFocused;
|
||||||
ListBoxScrollToFocus(lphl);
|
ListBoxScrollToFocus(lphl);
|
||||||
/* SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);*/
|
/* SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);*/
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -375,12 +349,13 @@ static LRESULT CBChar(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
newFocused = lphl->ItemsCount - 1;
|
newFocused = lphl->ItemsCount - 1;
|
||||||
|
|
||||||
ListBoxSetCurSel(lphl, newFocused);
|
ListBoxSetCurSel(lphl, newFocused);
|
||||||
|
SendMessage(hwnd, WM_COMMAND,ID_CLB,MAKELONG(0,CBN_SELCHANGE));
|
||||||
ListBoxSendNotification(lphl, CBN_SELCHANGE);
|
ListBoxSendNotification(lphl, CBN_SELCHANGE);
|
||||||
lphl->ItemFocused = newFocused;
|
lphl->ItemFocused = newFocused;
|
||||||
ListBoxScrollToFocus(lphl);
|
ListBoxScrollToFocus(lphl);
|
||||||
|
|
||||||
/* SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);*/
|
/* SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);*/
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -522,7 +497,7 @@ static LRESULT CBSetCurSel(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
dprintf_combo(stddeb,"CBSetCurSel: hwnd %04x wp %x lp %lx wRet %d\n",
|
dprintf_combo(stddeb,"CBSetCurSel: hwnd %04x wp %x lp %lx wRet %d\n",
|
||||||
hwnd,wParam,lParam,wRet);
|
hwnd,wParam,lParam,wRet);
|
||||||
/* SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);*/
|
/* SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);*/
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
|
|
||||||
return wRet;
|
return wRet;
|
||||||
}
|
}
|
||||||
|
@ -573,12 +548,14 @@ static LRESULT CBSetRedraw(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
static LRESULT CBSetFont(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
static LRESULT CBSetFont(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
LPHEADLIST lphl = ComboGetListHeader(hwnd);
|
LPHEADLIST lphl = ComboGetListHeader(hwnd);
|
||||||
|
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
|
||||||
|
|
||||||
if (wParam == 0)
|
if (wParam == 0)
|
||||||
lphl->hFont = GetStockObject(SYSTEM_FONT);
|
lphl->hFont = GetStockObject(SYSTEM_FONT);
|
||||||
else
|
else
|
||||||
lphl->hFont = (HFONT)wParam;
|
lphl->hFont = (HFONT)wParam;
|
||||||
|
if (lphc->hWndEdit)
|
||||||
|
SendMessage(lphc->hWndEdit,WM_SETFONT,lphl->hFont,0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -627,14 +604,14 @@ static LRESULT CBSetItemData(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
static LRESULT CBShowDropDown(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
static LRESULT CBShowDropDown(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
|
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
|
||||||
RECT rect;
|
RECT32 rect;
|
||||||
|
|
||||||
if ((lphc->dwStyle & 3) == CBS_SIMPLE) return LB_ERR;
|
if ((lphc->dwStyle & 3) == CBS_SIMPLE) return LB_ERR;
|
||||||
|
|
||||||
wParam = !!wParam;
|
wParam = !!wParam;
|
||||||
if (wParam != lphc->DropDownVisible) {
|
if (wParam != lphc->DropDownVisible) {
|
||||||
lphc->DropDownVisible = wParam;
|
lphc->DropDownVisible = wParam;
|
||||||
GetWindowRect(hwnd,&rect);
|
GetWindowRect32(hwnd,&rect);
|
||||||
SetWindowPos(lphc->hWndLBox, 0, rect.left, rect.top+lphc->LBoxTop, 0, 0,
|
SetWindowPos(lphc->hWndLBox, 0, rect.left, rect.top+lphc->LBoxTop, 0, 0,
|
||||||
SWP_NOSIZE | (wParam ? SWP_SHOWWINDOW : SWP_HIDEWINDOW));
|
SWP_NOSIZE | (wParam ? SWP_SHOWWINDOW : SWP_HIDEWINDOW));
|
||||||
if (!wParam) SetFocus(hwnd);
|
if (!wParam) SetFocus(hwnd);
|
||||||
|
@ -651,27 +628,27 @@ static BOOL CBCheckSize(HWND hwnd)
|
||||||
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
|
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
|
||||||
LPHEADLIST lphl = ComboGetListHeader(hwnd);
|
LPHEADLIST lphl = ComboGetListHeader(hwnd);
|
||||||
LONG cstyle = GetWindowLong(hwnd,GWL_STYLE);
|
LONG cstyle = GetWindowLong(hwnd,GWL_STYLE);
|
||||||
RECT cRect,wRect;
|
RECT16 cRect,wRect;
|
||||||
|
|
||||||
/* TODO - The size of combo's and their listboxes is still broken */
|
/* TODO - The size of combo's and their listboxes is still broken */
|
||||||
|
|
||||||
if (lphc->hWndLBox == 0) return FALSE;
|
if (lphc->hWndLBox == 0) return FALSE;
|
||||||
|
|
||||||
GetClientRect(hwnd,&cRect);
|
GetClientRect16(hwnd,&cRect);
|
||||||
GetWindowRect(hwnd,&wRect);
|
GetWindowRect16(hwnd,&wRect);
|
||||||
|
|
||||||
dprintf_vxd(stddeb,"CBCheckSize: cRect %d,%d-%d,%d wRect %d,%d-%d,%d\n",
|
dprintf_combo(stddeb,"CBCheckSize: cRect %d,%d-%d,%d wRect %d,%d-%d,%d\n",
|
||||||
cRect.left,cRect.top,cRect.right,cRect.bottom,
|
cRect.left,cRect.top,cRect.right,cRect.bottom,
|
||||||
wRect.left,wRect.top,wRect.right,wRect.bottom);
|
wRect.left,wRect.top,wRect.right,wRect.bottom);
|
||||||
|
if ((cstyle & 3) == CBS_SIMPLE ) return TRUE ;
|
||||||
if ((cRect.bottom - cRect.top) >
|
if ((cRect.bottom - cRect.top) >
|
||||||
(lphl->StdItemHeight + 2*SYSMETRICS_CYBORDER)) {
|
(lphl->StdItemHeight + 2*SYSMETRICS_CYBORDER)) {
|
||||||
SetWindowPos(hwnd, 0, 0, 0,
|
SetWindowPos(hwnd, 0, 0, 0,
|
||||||
cRect.right-cRect.left,
|
cRect.right-cRect.left,
|
||||||
lphl->StdItemHeight+2*SYSMETRICS_CYBORDER,
|
lphl->StdItemHeight+2*SYSMETRICS_CYBORDER,
|
||||||
SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE );
|
SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE );
|
||||||
GetClientRect(hwnd,&cRect);
|
GetClientRect16(hwnd,&cRect);
|
||||||
GetWindowRect(hwnd,&wRect);
|
GetWindowRect16(hwnd,&wRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (cstyle & 3) {
|
switch (cstyle & 3) {
|
||||||
|
@ -691,10 +668,65 @@ static BOOL CBCheckSize(HWND hwnd)
|
||||||
}
|
}
|
||||||
|
|
||||||
CBLCheckSize(hwnd);
|
CBLCheckSize(hwnd);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CBCommand
|
||||||
|
*/
|
||||||
|
static LRESULT CBCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
|
||||||
|
LPHEADLIST lphl = ComboGetListHeader(hwnd);
|
||||||
|
char buffer[256];
|
||||||
|
WORD newFocused;
|
||||||
|
WORD id;
|
||||||
|
if (lphc->hWndEdit) /* interdependence only used for CBS_SIMPLE and CBS_DROPDOWN styles */
|
||||||
|
{
|
||||||
|
switch (wParam)
|
||||||
|
{
|
||||||
|
case ID_CLB: /* update EDIT window */
|
||||||
|
if (HIWORD(lParam)==CBN_SELCHANGE)
|
||||||
|
if (lphl->HasStrings)
|
||||||
|
{
|
||||||
|
ListBoxGetText(lphl,lphl->ItemFocused, buffer);
|
||||||
|
dprintf_combo(stddeb,"CBCommand: update Edit: %s\n",buffer);
|
||||||
|
SendMessage( lphc->hWndEdit, WM_SETTEXT, 0, (LPARAM)MAKE_SEGPTR(buffer));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ID_EDIT: /* update LISTBOX window */
|
||||||
|
id=GetWindowWord(hwnd,GWW_ID);
|
||||||
|
switch (HIWORD(lParam))
|
||||||
|
{
|
||||||
|
case EN_UPDATE:GetWindowText(lphc->hWndEdit,buffer,255);
|
||||||
|
if (*buffer)
|
||||||
|
{
|
||||||
|
newFocused=ListBoxFindString(lphl, -1, MAKE_SEGPTR(buffer));
|
||||||
|
dprintf_combo(stddeb,"CBCommand: new selection #%d is= %s\n",
|
||||||
|
newFocused,buffer);
|
||||||
|
if (newFocused != (WORD)LB_ERR)
|
||||||
|
{ /* if found something */
|
||||||
|
ListBoxSetCurSel(lphl, newFocused);
|
||||||
|
ListBoxSendNotification(lphl, CBN_SELCHANGE);
|
||||||
|
InvalidateRect32(hwnd, NULL, TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SendMessage(GetParent(hwnd),WM_COMMAND,id,
|
||||||
|
MAKELONG(hwnd, CBN_EDITUPDATE));
|
||||||
|
break;
|
||||||
|
case EN_CHANGE:SendMessage(GetParent(hwnd),WM_COMMAND,id,
|
||||||
|
MAKELONG(hwnd, CBN_EDITCHANGE));
|
||||||
|
break;
|
||||||
|
case EN_ERRSPACE:SendMessage(GetParent(hwnd),WM_COMMAND,id,
|
||||||
|
MAKELONG(hwnd, CBN_ERRSPACE));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* ComboWndProc
|
* ComboWndProc
|
||||||
|
@ -715,6 +747,7 @@ LRESULT ComboBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
case WM_SETFOCUS: return CBSetFocus(hwnd, wParam, lParam);
|
case WM_SETFOCUS: return CBSetFocus(hwnd, wParam, lParam);
|
||||||
case WM_KILLFOCUS: return CBKillFocus(hwnd, wParam, lParam);
|
case WM_KILLFOCUS: return CBKillFocus(hwnd, wParam, lParam);
|
||||||
case WM_SIZE: return CBCheckSize(hwnd);
|
case WM_SIZE: return CBCheckSize(hwnd);
|
||||||
|
case WM_COMMAND: return CBCommand(hwnd, wParam, lParam);
|
||||||
case CB_RESETCONTENT: return CBResetContent(hwnd, wParam, lParam);
|
case CB_RESETCONTENT: return CBResetContent(hwnd, wParam, lParam);
|
||||||
case CB_DIR: return CBDir(hwnd, wParam, lParam);
|
case CB_DIR: return CBDir(hwnd, wParam, lParam);
|
||||||
case CB_ADDSTRING: return CBAddString(hwnd, wParam, lParam);
|
case CB_ADDSTRING: return CBAddString(hwnd, wParam, lParam);
|
||||||
|
@ -758,7 +791,7 @@ LPHEADLIST CLBoxGetListHeader(HWND hwnd)
|
||||||
*/
|
*/
|
||||||
static LRESULT CBLCreate( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
static LRESULT CBLCreate( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
{
|
{
|
||||||
CREATESTRUCT *createStruct = (CREATESTRUCT *)PTR_SEG_TO_LIN(lParam);
|
CREATESTRUCT16 *createStruct = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam);
|
||||||
#ifdef WINELIB32
|
#ifdef WINELIB32
|
||||||
SetWindowLong(hwnd,0,(LONG)createStruct->lpCreateParams);
|
SetWindowLong(hwnd,0,(LONG)createStruct->lpCreateParams);
|
||||||
#else
|
#else
|
||||||
|
@ -815,11 +848,11 @@ static LRESULT CBLKeyDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
|
|
||||||
ListBoxSetCurSel(lphl, newFocused);
|
ListBoxSetCurSel(lphl, newFocused);
|
||||||
ListBoxSendNotification(lphl, CBN_SELCHANGE);
|
ListBoxSendNotification(lphl, CBN_SELCHANGE);
|
||||||
|
SendMessage(GetParent(hwnd), WM_COMMAND,ID_CLB,MAKELONG(0,CBN_SELCHANGE));
|
||||||
lphl->ItemFocused = newFocused;
|
lphl->ItemFocused = newFocused;
|
||||||
ListBoxScrollToFocus(lphl);
|
ListBoxScrollToFocus(lphl);
|
||||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -838,20 +871,20 @@ static LRESULT CBLPaint( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
{
|
{
|
||||||
LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
|
LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
|
||||||
LPLISTSTRUCT lpls;
|
LPLISTSTRUCT lpls;
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT16 ps;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
HFONT hOldFont;
|
HFONT hOldFont;
|
||||||
WND * wndPtr = WIN_FindWndPtr(hwnd);
|
WND * wndPtr = WIN_FindWndPtr(hwnd);
|
||||||
HWND combohwnd = CLBoxGetCombo(hwnd);
|
HWND combohwnd = CLBoxGetCombo(hwnd);
|
||||||
HDC hdc;
|
HDC16 hdc;
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
int i, top, height;
|
int i, top, height;
|
||||||
|
|
||||||
top = 0;
|
top = 0;
|
||||||
hdc = BeginPaint( hwnd, &ps );
|
hdc = BeginPaint16( hwnd, &ps );
|
||||||
|
|
||||||
if (!IsWindowVisible(hwnd) || !lphl->bRedrawFlag) {
|
if (!IsWindowVisible(hwnd) || !lphl->bRedrawFlag) {
|
||||||
EndPaint(hwnd, &ps);
|
EndPaint16(hwnd, &ps);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -859,8 +892,8 @@ static LRESULT CBLPaint( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
/* listboxes should be white */
|
/* listboxes should be white */
|
||||||
hBrush = GetStockObject(WHITE_BRUSH);
|
hBrush = GetStockObject(WHITE_BRUSH);
|
||||||
|
|
||||||
GetClientRect(hwnd, &rect);
|
GetClientRect16(hwnd, &rect);
|
||||||
FillRect(hdc, &rect, hBrush);
|
FillRect16(hdc, &rect, hBrush);
|
||||||
CBLCheckSize(hwnd);
|
CBLCheckSize(hwnd);
|
||||||
|
|
||||||
lpls = lphl->lpFirst;
|
lpls = lphl->lpFirst;
|
||||||
|
@ -903,7 +936,7 @@ static LRESULT CBLPaint( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
SetScrollRange(hwnd, SB_VERT, 0, ListMaxFirstVisible(lphl), TRUE);
|
SetScrollRange(hwnd, SB_VERT, 0, ListMaxFirstVisible(lphl), TRUE);
|
||||||
|
|
||||||
SelectObject(hdc,hOldFont);
|
SelectObject(hdc,hOldFont);
|
||||||
EndPaint( hwnd, &ps );
|
EndPaint16( hwnd, &ps );
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -934,7 +967,7 @@ static LRESULT CBLLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
{
|
{
|
||||||
LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
|
LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
|
||||||
int y;
|
int y;
|
||||||
RECT rectsel;
|
RECT16 rectsel;
|
||||||
|
|
||||||
SetFocus(hwnd);
|
SetFocus(hwnd);
|
||||||
SetCapture(hwnd);
|
SetCapture(hwnd);
|
||||||
|
@ -948,7 +981,7 @@ static LRESULT CBLLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
ListBoxSetCurSel(lphl, y);
|
ListBoxSetCurSel(lphl, y);
|
||||||
ListBoxGetItemRect(lphl, y, &rectsel);
|
ListBoxGetItemRect(lphl, y, &rectsel);
|
||||||
|
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -968,6 +1001,7 @@ static LRESULT CBLLButtonUp( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
else if (lphl->PrevFocused != lphl->ItemFocused)
|
else if (lphl->PrevFocused != lphl->ItemFocused)
|
||||||
{
|
{
|
||||||
SendMessage(CLBoxGetCombo(hwnd),CB_SETCURSEL,lphl->ItemFocused,0);
|
SendMessage(CLBoxGetCombo(hwnd),CB_SETCURSEL,lphl->ItemFocused,0);
|
||||||
|
SendMessage(GetParent(hwnd), WM_COMMAND,ID_CLB,MAKELONG(0,CBN_SELCHANGE));
|
||||||
ListBoxSendNotification(lphl, CBN_SELCHANGE);
|
ListBoxSendNotification(lphl, CBN_SELCHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -984,12 +1018,12 @@ static LRESULT CBLMouseMove( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
|
LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
|
||||||
short y;
|
short y;
|
||||||
WORD wRet;
|
WORD wRet;
|
||||||
RECT rect, rectsel;
|
RECT16 rect, rectsel;
|
||||||
|
|
||||||
y = SHIWORD(lParam);
|
y = SHIWORD(lParam);
|
||||||
wRet = ListBoxFindMouse(lphl, LOWORD(lParam), HIWORD(lParam));
|
wRet = ListBoxFindMouse(lphl, LOWORD(lParam), HIWORD(lParam));
|
||||||
ListBoxGetItemRect(lphl, wRet, &rectsel);
|
ListBoxGetItemRect(lphl, wRet, &rectsel);
|
||||||
GetClientRect(hwnd, &rect);
|
GetClientRect16(hwnd, &rect);
|
||||||
|
|
||||||
dprintf_combo(stddeb,"CBLMouseMove: hwnd %04x wp %x lp %lx y %d if %d wret %d %d,%d-%d,%d\n",
|
dprintf_combo(stddeb,"CBLMouseMove: hwnd %04x wp %x lp %lx y %d if %d wret %d %d,%d-%d,%d\n",
|
||||||
hwnd,wParam,lParam,y,lphl->ItemFocused,wRet,rectsel.left,rectsel.top,rectsel.right,rectsel.bottom);
|
hwnd,wParam,lParam,y,lphl->ItemFocused,wRet,rectsel.left,rectsel.top,rectsel.right,rectsel.bottom);
|
||||||
|
@ -1000,7 +1034,7 @@ hwnd,wParam,lParam,y,lphl->ItemFocused,wRet,rectsel.left,rectsel.top,rectsel.rig
|
||||||
lphl->FirstVisible--;
|
lphl->FirstVisible--;
|
||||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||||
ListBoxSetCurSel(lphl, wRet);
|
ListBoxSetCurSel(lphl, wRet);
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1009,14 +1043,14 @@ hwnd,wParam,lParam,y,lphl->ItemFocused,wRet,rectsel.left,rectsel.top,rectsel.rig
|
||||||
lphl->FirstVisible++;
|
lphl->FirstVisible++;
|
||||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||||
ListBoxSetCurSel(lphl, wRet);
|
ListBoxSetCurSel(lphl, wRet);
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((short) wRet == lphl->ItemFocused) return 0;
|
if ((short) wRet == lphl->ItemFocused) return 0;
|
||||||
ListBoxSetCurSel(lphl, wRet);
|
ListBoxSetCurSel(lphl, wRet);
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1065,7 +1099,7 @@ static LRESULT CBLVScroll( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
||||||
|
|
||||||
if (y != lphl->FirstVisible) {
|
if (y != lphl->FirstVisible) {
|
||||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1081,26 +1115,26 @@ static BOOL CBLCheckSize(HWND hwnd)
|
||||||
LPHEADLIST lphl = ComboGetListHeader(hwnd);
|
LPHEADLIST lphl = ComboGetListHeader(hwnd);
|
||||||
LPLISTSTRUCT lpls;
|
LPLISTSTRUCT lpls;
|
||||||
HWND hWndLBox;
|
HWND hWndLBox;
|
||||||
RECT cRect,wRect,lRect,lwRect;
|
RECT16 cRect,wRect,lRect,lwRect;
|
||||||
int totheight;
|
int totheight;
|
||||||
char className[80];
|
char className[80];
|
||||||
|
|
||||||
GetClassName(hwnd,className,80);
|
GetClassName32A(hwnd,className,80);
|
||||||
fflush(stddeb);
|
fflush(stddeb);
|
||||||
if (strncmp(className,"COMBOBOX",8)) return FALSE;
|
if (strncmp(className,"COMBOBOX",8)) return FALSE;
|
||||||
if ((hWndLBox = lphc->hWndLBox) == 0) return FALSE;
|
if ((hWndLBox = lphc->hWndLBox) == 0) return FALSE;
|
||||||
dprintf_vxd(stddeb,"CBLCheckSize headers hw %04x lb %04x name %s\n",
|
dprintf_combo(stddeb,"CBLCheckSize headers hw %04x lb %04x name %s\n",
|
||||||
hwnd,hWndLBox,className);
|
hwnd,hWndLBox,className);
|
||||||
|
|
||||||
GetClientRect(hwnd,&cRect);
|
GetClientRect16(hwnd,&cRect);
|
||||||
GetWindowRect(hwnd,&wRect);
|
GetWindowRect16(hwnd,&wRect);
|
||||||
GetClientRect(hWndLBox,&lRect);
|
GetClientRect16(hWndLBox,&lRect);
|
||||||
GetWindowRect(hWndLBox,&lwRect);
|
GetWindowRect16(hWndLBox,&lwRect);
|
||||||
|
|
||||||
dprintf_vxd(stddeb,"CBLCheckSize: init cRect %d,%d-%d,%d wRect %d,%d-%d,%d\n",
|
dprintf_combo(stddeb,"CBLCheckSize: init cRect %d,%d-%d,%d wRect %d,%d-%d,%d\n",
|
||||||
cRect.left,cRect.top,cRect.right,cRect.bottom,
|
cRect.left,cRect.top,cRect.right,cRect.bottom,
|
||||||
wRect.left,wRect.top,wRect.right,wRect.bottom);
|
wRect.left,wRect.top,wRect.right,wRect.bottom);
|
||||||
dprintf_vxd(stddeb," lRect %d,%d-%d,%d lwRect %d,%d-%d,%d\n",
|
dprintf_combo(stddeb," lRect %d,%d-%d,%d lwRect %d,%d-%d,%d\n",
|
||||||
lRect.left,lRect.top,lRect.right,lRect.bottom,
|
lRect.left,lRect.top,lRect.right,lRect.bottom,
|
||||||
lwRect.left,lwRect.top,lwRect.right,lwRect.bottom);
|
lwRect.left,lwRect.top,lwRect.right,lwRect.bottom);
|
||||||
fflush(stddeb);
|
fflush(stddeb);
|
||||||
|
@ -1111,13 +1145,12 @@ static BOOL CBLCheckSize(HWND hwnd)
|
||||||
|
|
||||||
/* TODO: This isn't really what windows does */
|
/* TODO: This isn't really what windows does */
|
||||||
if (lRect.bottom-lRect.top < 3*lphl->StdItemHeight) {
|
if (lRect.bottom-lRect.top < 3*lphl->StdItemHeight) {
|
||||||
dprintf_vxd(stddeb," Changing; totHeight %d StdItemHght %d\n",
|
dprintf_combo(stddeb," Changing; totHeight %d StdItemHght %d\n",
|
||||||
totheight,lphl->StdItemHeight);
|
totheight,lphl->StdItemHeight);
|
||||||
SetWindowPos(hWndLBox, 0, lRect.left, lRect.top,
|
SetWindowPos(hWndLBox, 0, lRect.left, lRect.top,
|
||||||
lwRect.right-lwRect.left, totheight+2*SYSMETRICS_CYBORDER,
|
lwRect.right-lwRect.left, totheight+2*SYSMETRICS_CYBORDER,
|
||||||
SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE );
|
SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE );
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1174,13 +1207,17 @@ INT DlgDirListComboBox( HWND hDlg, SEGPTR path, INT idCBox,
|
||||||
}
|
}
|
||||||
if (idStatic)
|
if (idStatic)
|
||||||
{
|
{
|
||||||
char temp[256];
|
|
||||||
int drive = DRIVE_GetCurrentDrive();
|
int drive = DRIVE_GetCurrentDrive();
|
||||||
|
const char *cwd = DRIVE_GetDosCwd(drive);
|
||||||
|
char *temp = SEGPTR_ALLOC( strlen(cwd) + 4 );
|
||||||
|
if (!temp) return FALSE;
|
||||||
strcpy( temp, "A:\\" );
|
strcpy( temp, "A:\\" );
|
||||||
temp[0] += drive;
|
temp[0] += drive;
|
||||||
lstrcpyn( temp+3, DRIVE_GetDosCwd(drive), 253 );
|
strcpy( temp + 3, cwd );
|
||||||
|
AnsiLower( temp );
|
||||||
SendDlgItemMessage( hDlg, idStatic, WM_SETTEXT,
|
SendDlgItemMessage( hDlg, idStatic, WM_SETTEXT,
|
||||||
0, (LPARAM)MAKE_SEGPTR(temp) );
|
0, (LPARAM)SEGPTR_GET(temp) );
|
||||||
|
SEGPTR_FREE(temp);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,8 +78,8 @@ static HBITMAP DESKTOP_LoadBitmap( HDC hdc, const char *filename )
|
||||||
*/
|
*/
|
||||||
static LONG DESKTOP_DoEraseBkgnd( HWND hwnd, HDC hdc, DESKTOPINFO *infoPtr )
|
static LONG DESKTOP_DoEraseBkgnd( HWND hwnd, HDC hdc, DESKTOPINFO *infoPtr )
|
||||||
{
|
{
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
GetClientRect( hwnd, &rect );
|
GetClientRect16( hwnd, &rect );
|
||||||
|
|
||||||
/* Paint desktop pattern (only if wall paper does not cover everything) */
|
/* Paint desktop pattern (only if wall paper does not cover everything) */
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ static LONG DESKTOP_DoEraseBkgnd( HWND hwnd, HDC hdc, DESKTOPINFO *infoPtr )
|
||||||
/* Set colors in case pattern is a monochrome bitmap */
|
/* Set colors in case pattern is a monochrome bitmap */
|
||||||
SetBkColor( hdc, RGB(0,0,0) );
|
SetBkColor( hdc, RGB(0,0,0) );
|
||||||
SetTextColor( hdc, GetSysColor(COLOR_BACKGROUND) );
|
SetTextColor( hdc, GetSysColor(COLOR_BACKGROUND) );
|
||||||
FillRect( hdc, &rect, infoPtr->hbrushPattern );
|
FillRect16( hdc, &rect, infoPtr->hbrushPattern );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Paint wall paper */
|
/* Paint wall paper */
|
||||||
|
|
|
@ -125,7 +125,7 @@ static void EDIT_DelLeft(WND *wndPtr);
|
||||||
static void EDIT_DelRight(WND *wndPtr);
|
static void EDIT_DelRight(WND *wndPtr);
|
||||||
static UINT EDIT_GetAveCharWidth(WND *wndPtr);
|
static UINT EDIT_GetAveCharWidth(WND *wndPtr);
|
||||||
static UINT EDIT_GetLineHeight(WND *wndPtr);
|
static UINT EDIT_GetLineHeight(WND *wndPtr);
|
||||||
static void EDIT_GetLineRect(WND *wndPtr, UINT line, UINT scol, UINT ecol, LPRECT rc);
|
static void EDIT_GetLineRect(WND *wndPtr, UINT line, UINT scol, UINT ecol, LPRECT16 rc);
|
||||||
static char * EDIT_GetPointer(WND *wndPtr);
|
static char * EDIT_GetPointer(WND *wndPtr);
|
||||||
static LRESULT EDIT_GetRect(WND *wndPtr, WPARAM wParam, LPARAM lParam);
|
static LRESULT EDIT_GetRect(WND *wndPtr, WPARAM wParam, LPARAM lParam);
|
||||||
static BOOL EDIT_GetRedraw(WND *wndPtr);
|
static BOOL EDIT_GetRedraw(WND *wndPtr);
|
||||||
|
@ -725,7 +725,7 @@ static UINT EDIT_GetLineHeight(WND *wndPtr)
|
||||||
* column to an ending column.
|
* column to an ending column.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static void EDIT_GetLineRect(WND *wndPtr, UINT line, UINT scol, UINT ecol, LPRECT rc)
|
static void EDIT_GetLineRect(WND *wndPtr, UINT line, UINT scol, UINT ecol, LPRECT16 rc)
|
||||||
{
|
{
|
||||||
rc->top = EDIT_WndYFromLine(wndPtr, line);
|
rc->top = EDIT_WndYFromLine(wndPtr, line);
|
||||||
rc->bottom = rc->top + EDIT_GetLineHeight(wndPtr);
|
rc->bottom = rc->top + EDIT_GetLineHeight(wndPtr);
|
||||||
|
@ -764,7 +764,7 @@ static char *EDIT_GetPointer(WND *wndPtr)
|
||||||
*/
|
*/
|
||||||
static LRESULT EDIT_GetRect(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
static LRESULT EDIT_GetRect(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
GetClientRect(wndPtr->hwndSelf, (LPRECT)lParam);
|
GetClientRect16( wndPtr->hwndSelf, (LPRECT16)lParam );
|
||||||
return 0L;
|
return 0L;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -802,7 +802,7 @@ static UINT EDIT_GetTextWidth(WND *wndPtr)
|
||||||
*/
|
*/
|
||||||
static UINT EDIT_GetVisibleLineCount(WND *wndPtr)
|
static UINT EDIT_GetVisibleLineCount(WND *wndPtr)
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
|
|
||||||
EDIT_GetRect(wndPtr, 0, (LPARAM)&rc);
|
EDIT_GetRect(wndPtr, 0, (LPARAM)&rc);
|
||||||
return MAX(1, MAX(rc.bottom - rc.top, 0) / EDIT_GetLineHeight(wndPtr));
|
return MAX(1, MAX(rc.bottom - rc.top, 0) / EDIT_GetLineHeight(wndPtr));
|
||||||
|
@ -816,7 +816,7 @@ static UINT EDIT_GetVisibleLineCount(WND *wndPtr)
|
||||||
*/
|
*/
|
||||||
static UINT EDIT_GetWndWidth(WND *wndPtr)
|
static UINT EDIT_GetWndWidth(WND *wndPtr)
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
|
|
||||||
EDIT_GetRect(wndPtr, 0, (LPARAM)&rc);
|
EDIT_GetRect(wndPtr, 0, (LPARAM)&rc);
|
||||||
return rc.right - rc.left;
|
return rc.right - rc.left;
|
||||||
|
@ -855,9 +855,9 @@ static void EDIT_InvalidateText(WND *wndPtr, UINT start, UINT end)
|
||||||
UINT el;
|
UINT el;
|
||||||
UINT sc;
|
UINT sc;
|
||||||
UINT ec;
|
UINT ec;
|
||||||
RECT rcWnd;
|
RECT16 rcWnd;
|
||||||
RECT rcLine;
|
RECT16 rcLine;
|
||||||
RECT rcUpdate;
|
RECT16 rcUpdate;
|
||||||
UINT l;
|
UINT l;
|
||||||
|
|
||||||
if (end == start )
|
if (end == start )
|
||||||
|
@ -885,26 +885,26 @@ static void EDIT_InvalidateText(WND *wndPtr, UINT start, UINT end)
|
||||||
EDIT_GetRect(wndPtr, 0, (LPARAM)&rcWnd);
|
EDIT_GetRect(wndPtr, 0, (LPARAM)&rcWnd);
|
||||||
if (sl == el) {
|
if (sl == el) {
|
||||||
EDIT_GetLineRect(wndPtr, sl, sc, ec, &rcLine);
|
EDIT_GetLineRect(wndPtr, sl, sc, ec, &rcLine);
|
||||||
if (IntersectRect(&rcUpdate, &rcWnd, &rcLine))
|
if (IntersectRect16(&rcUpdate, &rcWnd, &rcLine))
|
||||||
InvalidateRect(wndPtr->hwndSelf, &rcUpdate, FALSE);
|
InvalidateRect16( wndPtr->hwndSelf, &rcUpdate, FALSE );
|
||||||
} else {
|
} else {
|
||||||
EDIT_GetLineRect(wndPtr, sl, sc,
|
EDIT_GetLineRect(wndPtr, sl, sc,
|
||||||
(UINT)EDIT_EM_LineLength(wndPtr,
|
(UINT)EDIT_EM_LineLength(wndPtr,
|
||||||
(UINT)EDIT_EM_LineIndex(wndPtr, sl, 0L), 0L),
|
(UINT)EDIT_EM_LineIndex(wndPtr, sl, 0L), 0L),
|
||||||
&rcLine);
|
&rcLine);
|
||||||
if (IntersectRect(&rcUpdate, &rcWnd, &rcLine))
|
if (IntersectRect16(&rcUpdate, &rcWnd, &rcLine))
|
||||||
InvalidateRect(wndPtr->hwndSelf, &rcUpdate, FALSE);
|
InvalidateRect16( wndPtr->hwndSelf, &rcUpdate, FALSE );
|
||||||
for (l = sl + 1 ; l < el ; l++) {
|
for (l = sl + 1 ; l < el ; l++) {
|
||||||
EDIT_GetLineRect(wndPtr, l, 0,
|
EDIT_GetLineRect(wndPtr, l, 0,
|
||||||
(UINT)EDIT_EM_LineLength(wndPtr,
|
(UINT)EDIT_EM_LineLength(wndPtr,
|
||||||
(UINT)EDIT_EM_LineIndex(wndPtr, l, 0L), 0L),
|
(UINT)EDIT_EM_LineIndex(wndPtr, l, 0L), 0L),
|
||||||
&rcLine);
|
&rcLine);
|
||||||
if (IntersectRect(&rcUpdate, &rcWnd, &rcLine))
|
if (IntersectRect16(&rcUpdate, &rcWnd, &rcLine))
|
||||||
InvalidateRect(wndPtr->hwndSelf, &rcUpdate, FALSE);
|
InvalidateRect16(wndPtr->hwndSelf, &rcUpdate, FALSE);
|
||||||
}
|
}
|
||||||
EDIT_GetLineRect(wndPtr, el, 0, ec, &rcLine);
|
EDIT_GetLineRect(wndPtr, el, 0, ec, &rcLine);
|
||||||
if (IntersectRect(&rcUpdate, &rcWnd, &rcLine))
|
if (IntersectRect16(&rcUpdate, &rcWnd, &rcLine))
|
||||||
InvalidateRect(wndPtr->hwndSelf, &rcUpdate, FALSE);
|
InvalidateRect16( wndPtr->hwndSelf, &rcUpdate, FALSE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1348,7 +1348,7 @@ static LRESULT EDIT_ReplaceSel(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
EDIT_NOTIFY_PARENT(wndPtr, EN_UPDATE);
|
EDIT_NOTIFY_PARENT(wndPtr, EN_UPDATE);
|
||||||
EDIT_WM_SetRedraw(wndPtr, redraw, 0L);
|
EDIT_WM_SetRedraw(wndPtr, redraw, 0L);
|
||||||
if (redraw) {
|
if (redraw) {
|
||||||
InvalidateRect(wndPtr->hwndSelf, NULL, TRUE);
|
InvalidateRect32( wndPtr->hwndSelf, NULL, TRUE );
|
||||||
EDIT_NOTIFY_PARENT(wndPtr, EN_CHANGE);
|
EDIT_NOTIFY_PARENT(wndPtr, EN_CHANGE);
|
||||||
}
|
}
|
||||||
return 0L;
|
return 0L;
|
||||||
|
@ -1805,7 +1805,7 @@ static LRESULT EDIT_EM_LineScroll(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
UINT tw = EDIT_GetTextWidth(wndPtr);
|
UINT tw = EDIT_GetTextWidth(wndPtr);
|
||||||
INT dx;
|
INT dx;
|
||||||
INT dy;
|
INT dy;
|
||||||
POINT pos;
|
POINT16 pos;
|
||||||
HRGN hRgn;
|
HRGN hRgn;
|
||||||
|
|
||||||
if (nfv >= lc)
|
if (nfv >= lc)
|
||||||
|
@ -1823,7 +1823,7 @@ static LRESULT EDIT_EM_LineScroll(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
GetUpdateRgn(wndPtr->hwndSelf, hRgn, FALSE);
|
GetUpdateRgn(wndPtr->hwndSelf, hRgn, FALSE);
|
||||||
ValidateRgn(wndPtr->hwndSelf, 0);
|
ValidateRgn(wndPtr->hwndSelf, 0);
|
||||||
OffsetRgn(hRgn, dx, dy);
|
OffsetRgn(hRgn, dx, dy);
|
||||||
InvalidateRgn(wndPtr->hwndSelf, hRgn, TRUE);
|
InvalidateRgn( wndPtr->hwndSelf, hRgn, TRUE );
|
||||||
DeleteObject(hRgn);
|
DeleteObject(hRgn);
|
||||||
ScrollWindow(wndPtr->hwndSelf, dx, dy, NULL, NULL);
|
ScrollWindow(wndPtr->hwndSelf, dx, dy, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
@ -1836,7 +1836,7 @@ static LRESULT EDIT_EM_LineScroll(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
SetScrollPos(wndPtr->hwndSelf, SB_HORZ,
|
SetScrollPos(wndPtr->hwndSelf, SB_HORZ,
|
||||||
EDIT_WM_HScroll(wndPtr, EM_GETTHUMB, 0L), TRUE);
|
EDIT_WM_HScroll(wndPtr, EM_GETTHUMB, 0L), TRUE);
|
||||||
if (wndPtr->hwndSelf == GetFocus()) {
|
if (wndPtr->hwndSelf == GetFocus()) {
|
||||||
GetCaretPos(&pos);
|
GetCaretPos16(&pos);
|
||||||
SetCaretPos(pos.x + dx, pos.y + dy);
|
SetCaretPos(pos.x + dx, pos.y + dy);
|
||||||
ShowCaret(wndPtr->hwndSelf);
|
ShowCaret(wndPtr->hwndSelf);
|
||||||
}
|
}
|
||||||
|
@ -1894,7 +1894,7 @@ static LRESULT EDIT_EM_SetHandle(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
EDIT_EM_SetModify(wndPtr, FALSE, 0L);
|
EDIT_EM_SetModify(wndPtr, FALSE, 0L);
|
||||||
EDIT_BuildLineDefs(wndPtr);
|
EDIT_BuildLineDefs(wndPtr);
|
||||||
if (EDIT_GetRedraw(wndPtr))
|
if (EDIT_GetRedraw(wndPtr))
|
||||||
InvalidateRect(wndPtr->hwndSelf, NULL, TRUE);
|
InvalidateRect32( wndPtr->hwndSelf, NULL, TRUE );
|
||||||
EDIT_ScrollIntoView(wndPtr);
|
EDIT_ScrollIntoView(wndPtr);
|
||||||
}
|
}
|
||||||
return 0L;
|
return 0L;
|
||||||
|
@ -2130,7 +2130,7 @@ static LRESULT EDIT_WM_Clear(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
EDIT_NOTIFY_PARENT(wndPtr, EN_UPDATE);
|
EDIT_NOTIFY_PARENT(wndPtr, EN_UPDATE);
|
||||||
EDIT_WM_SetRedraw(wndPtr, redraw, 0L);
|
EDIT_WM_SetRedraw(wndPtr, redraw, 0L);
|
||||||
if (redraw) {
|
if (redraw) {
|
||||||
InvalidateRect(wndPtr->hwndSelf, NULL, TRUE);
|
InvalidateRect32( wndPtr->hwndSelf, NULL, TRUE );
|
||||||
EDIT_NOTIFY_PARENT(wndPtr, EN_CHANGE);
|
EDIT_NOTIFY_PARENT(wndPtr, EN_CHANGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2179,7 +2179,7 @@ static LRESULT EDIT_WM_Copy(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
*/
|
*/
|
||||||
static LRESULT EDIT_WM_Create(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
static LRESULT EDIT_WM_Create(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
CREATESTRUCT *cs = (CREATESTRUCT *)PTR_SEG_TO_LIN(lParam);
|
CREATESTRUCT16 *cs = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam);
|
||||||
EDITSTATE *es;
|
EDITSTATE *es;
|
||||||
char *text;
|
char *text;
|
||||||
|
|
||||||
|
@ -2207,7 +2207,8 @@ static LRESULT EDIT_WM_Create(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
es->PasswordChar = (cs->style & ES_PASSWORD) ? '*' : '\0';
|
es->PasswordChar = (cs->style & ES_PASSWORD) ? '*' : '\0';
|
||||||
}
|
}
|
||||||
if (!LOCAL_HeapSize(wndPtr->hInstance)) {
|
if (!LOCAL_HeapSize(wndPtr->hInstance)) {
|
||||||
if (!LocalInit(wndPtr->hInstance, 0, GlobalSize(wndPtr->hInstance))) {
|
if (!LocalInit(wndPtr->hInstance, 0,
|
||||||
|
GlobalSize16(wndPtr->hInstance))) {
|
||||||
fprintf(stderr, "edit: WM_CREATE: could not initialize local heap\n");
|
fprintf(stderr, "edit: WM_CREATE: could not initialize local heap\n");
|
||||||
return -1L;
|
return -1L;
|
||||||
}
|
}
|
||||||
|
@ -2282,22 +2283,22 @@ static LRESULT EDIT_WM_Enable(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
static LRESULT EDIT_WM_EraseBkGnd(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
static LRESULT EDIT_WM_EraseBkGnd(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
|
|
||||||
hBrush = (HBRUSH)EDIT_SEND_CTLCOLOR(wndPtr, wParam);
|
hBrush = (HBRUSH)EDIT_SEND_CTLCOLOR(wndPtr, wParam);
|
||||||
if (!hBrush)
|
if (!hBrush)
|
||||||
hBrush = (HBRUSH)GetStockObject(WHITE_BRUSH);
|
hBrush = (HBRUSH)GetStockObject(WHITE_BRUSH);
|
||||||
|
|
||||||
GetClientRect(wndPtr->hwndSelf, &rc);
|
GetClientRect16(wndPtr->hwndSelf, &rc);
|
||||||
IntersectClipRect((HDC)wParam, rc.left, rc.top, rc.right, rc.bottom);
|
IntersectClipRect((HDC)wParam, rc.left, rc.top, rc.right, rc.bottom);
|
||||||
GetClipBox((HDC)wParam, &rc);
|
GetClipBox16((HDC)wParam, &rc);
|
||||||
/*
|
/*
|
||||||
* FIXME: specs say that we should UnrealizeObject() the brush,
|
* FIXME: specs say that we should UnrealizeObject() the brush,
|
||||||
* but the specs of UnrealizeObject() say that we shouldn't
|
* but the specs of UnrealizeObject() say that we shouldn't
|
||||||
* unrealize a stock object. The default brush that
|
* unrealize a stock object. The default brush that
|
||||||
* DefWndProc() returns is ... a stock object.
|
* DefWndProc() returns is ... a stock object.
|
||||||
*/
|
*/
|
||||||
FillRect((HDC)wParam, &rc, hBrush);
|
FillRect16((HDC)wParam, &rc, hBrush);
|
||||||
return -1L;
|
return -1L;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2642,23 +2643,23 @@ static LRESULT EDIT_WM_MouseMove(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
*/
|
*/
|
||||||
static LRESULT EDIT_WM_Paint(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
static LRESULT EDIT_WM_Paint(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT16 ps;
|
||||||
UINT i;
|
UINT i;
|
||||||
UINT fv = (UINT)EDIT_EM_GetFirstVisibleLine(wndPtr, 0, 0L);
|
UINT fv = (UINT)EDIT_EM_GetFirstVisibleLine(wndPtr, 0, 0L);
|
||||||
UINT vlc = EDIT_GetVisibleLineCount(wndPtr);
|
UINT vlc = EDIT_GetVisibleLineCount(wndPtr);
|
||||||
UINT lc = (UINT)EDIT_EM_GetLineCount(wndPtr, 0, 0L);
|
UINT lc = (UINT)EDIT_EM_GetLineCount(wndPtr, 0, 0L);
|
||||||
HDC hdc;
|
HDC16 hdc;
|
||||||
HFONT hFont;
|
HFONT hFont;
|
||||||
HFONT oldFont = 0;
|
HFONT oldFont = 0;
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
RECT rcLine;
|
RECT16 rcLine;
|
||||||
RECT rcRgn;
|
RECT16 rcRgn;
|
||||||
BOOL rev = IsWindowEnabled(wndPtr->hwndSelf) &&
|
BOOL rev = IsWindowEnabled(wndPtr->hwndSelf) &&
|
||||||
((GetFocus() == wndPtr->hwndSelf) ||
|
((GetFocus() == wndPtr->hwndSelf) ||
|
||||||
(wndPtr->dwStyle & ES_NOHIDESEL));
|
(wndPtr->dwStyle & ES_NOHIDESEL));
|
||||||
|
|
||||||
hdc = BeginPaint(wndPtr->hwndSelf, &ps);
|
hdc = BeginPaint16(wndPtr->hwndSelf, &ps);
|
||||||
GetClientRect(wndPtr->hwndSelf, &rc);
|
GetClientRect16(wndPtr->hwndSelf, &rc);
|
||||||
IntersectClipRect(hdc, rc.left, rc.top, rc.right, rc.bottom);
|
IntersectClipRect(hdc, rc.left, rc.top, rc.right, rc.bottom);
|
||||||
hFont = EDIT_WM_GetFont(wndPtr, 0, 0L);
|
hFont = EDIT_WM_GetFont(wndPtr, 0, 0L);
|
||||||
if (hFont)
|
if (hFont)
|
||||||
|
@ -2666,15 +2667,15 @@ static LRESULT EDIT_WM_Paint(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
EDIT_SEND_CTLCOLOR(wndPtr, hdc);
|
EDIT_SEND_CTLCOLOR(wndPtr, hdc);
|
||||||
if (!IsWindowEnabled(wndPtr->hwndSelf))
|
if (!IsWindowEnabled(wndPtr->hwndSelf))
|
||||||
SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
|
SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
|
||||||
GetClipBox(hdc, &rcRgn);
|
GetClipBox16(hdc, &rcRgn);
|
||||||
for (i = fv ; i <= MIN(fv + vlc, fv + lc - 1) ; i++ ) {
|
for (i = fv ; i <= MIN(fv + vlc, fv + lc - 1) ; i++ ) {
|
||||||
EDIT_GetLineRect(wndPtr, i, 0, -1, &rcLine);
|
EDIT_GetLineRect(wndPtr, i, 0, -1, &rcLine);
|
||||||
if (IntersectRect(&rc, &rcRgn, &rcLine))
|
if (IntersectRect16(&rc, &rcRgn, &rcLine))
|
||||||
EDIT_PaintLine(wndPtr, hdc, i, rev);
|
EDIT_PaintLine(wndPtr, hdc, i, rev);
|
||||||
}
|
}
|
||||||
if (hFont)
|
if (hFont)
|
||||||
SelectObject(hdc, oldFont);
|
SelectObject(hdc, oldFont);
|
||||||
EndPaint(wndPtr->hwndSelf, &ps);
|
EndPaint16(wndPtr->hwndSelf, &ps);
|
||||||
return 0L;
|
return 0L;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2760,7 +2761,7 @@ static LRESULT EDIT_WM_SetFont(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
ReleaseDC(wndPtr->hwndSelf, hdc);
|
ReleaseDC(wndPtr->hwndSelf, hdc);
|
||||||
EDIT_BuildLineDefs(wndPtr);
|
EDIT_BuildLineDefs(wndPtr);
|
||||||
if ((BOOL)lParam && EDIT_GetRedraw(wndPtr))
|
if ((BOOL)lParam && EDIT_GetRedraw(wndPtr))
|
||||||
InvalidateRect(wndPtr->hwndSelf, NULL, TRUE);
|
InvalidateRect32( wndPtr->hwndSelf, NULL, TRUE );
|
||||||
if (wndPtr->hwndSelf == GetFocus()) {
|
if (wndPtr->hwndSelf == GetFocus()) {
|
||||||
DestroyCaret();
|
DestroyCaret();
|
||||||
CreateCaret(wndPtr->hwndSelf, 0, 2, EDIT_GetLineHeight(wndPtr));
|
CreateCaret(wndPtr->hwndSelf, 0, 2, EDIT_GetLineHeight(wndPtr));
|
||||||
|
@ -2815,7 +2816,7 @@ static LRESULT EDIT_WM_Size(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||||
(wParam == SIZE_RESTORED))) {
|
(wParam == SIZE_RESTORED))) {
|
||||||
if (IsMultiLine(wndPtr) && IsWordWrap(wndPtr))
|
if (IsMultiLine(wndPtr) && IsWordWrap(wndPtr))
|
||||||
EDIT_BuildLineDefs(wndPtr);
|
EDIT_BuildLineDefs(wndPtr);
|
||||||
InvalidateRect(wndPtr->hwndSelf, NULL, TRUE);
|
InvalidateRect32( wndPtr->hwndSelf, NULL, TRUE );
|
||||||
}
|
}
|
||||||
return 0L;
|
return 0L;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "dos_fs.h"
|
#include "dos_fs.h"
|
||||||
#include "drive.h"
|
#include "drive.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "stackframe.h"
|
#include "heap.h"
|
||||||
#include "stddebug.h"
|
#include "stddebug.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
@ -117,7 +117,7 @@ void CreateListBoxStruct(HWND hwnd, WORD CtlType, LONG styles, HWND parent)
|
||||||
if (lphl->OwnerDrawn) {
|
if (lphl->OwnerDrawn) {
|
||||||
LISTSTRUCT dummyls;
|
LISTSTRUCT dummyls;
|
||||||
|
|
||||||
lphl->hDrawItemStruct = USER_HEAP_ALLOC(sizeof(DRAWITEMSTRUCT));
|
lphl->hDrawItemStruct = USER_HEAP_ALLOC(sizeof(DRAWITEMSTRUCT16));
|
||||||
lphl->needMeasure = TRUE;
|
lphl->needMeasure = TRUE;
|
||||||
dummyls.mis.CtlType = lphl->DrawCtlType;
|
dummyls.mis.CtlType = lphl->DrawCtlType;
|
||||||
dummyls.mis.CtlID = lphl->CtlID;
|
dummyls.mis.CtlID = lphl->CtlID;
|
||||||
|
@ -187,9 +187,7 @@ void ListBoxUpdateWindow(HWND hwnd, LPHEADLIST lphl, BOOL repaint)
|
||||||
SetScrollRange(hwnd, SB_HORZ, 1, lphl->ItemsVisible /
|
SetScrollRange(hwnd, SB_HORZ, 1, lphl->ItemsVisible /
|
||||||
lphl->ItemsPerColumn + 1, TRUE);
|
lphl->ItemsPerColumn + 1, TRUE);
|
||||||
|
|
||||||
if (repaint && lphl->bRedrawFlag) {
|
if (repaint && lphl->bRedrawFlag) InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns: 0 if nothing needs to be changed */
|
/* Returns: 0 if nothing needs to be changed */
|
||||||
|
@ -237,10 +235,10 @@ LPLISTSTRUCT ListBoxGetItem(LPHEADLIST lphl, UINT uIndex)
|
||||||
|
|
||||||
|
|
||||||
void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC hdc, LPLISTSTRUCT lpls,
|
void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC hdc, LPLISTSTRUCT lpls,
|
||||||
RECT *rect, WORD itemAction, WORD itemState)
|
RECT16 *rect, WORD itemAction, WORD itemState)
|
||||||
{
|
{
|
||||||
if (lphl->OwnerDrawn) {
|
if (lphl->OwnerDrawn) {
|
||||||
DRAWITEMSTRUCT *dis = USER_HEAP_LIN_ADDR(lphl->hDrawItemStruct);
|
DRAWITEMSTRUCT16 *dis = USER_HEAP_LIN_ADDR(lphl->hDrawItemStruct);
|
||||||
|
|
||||||
dis->CtlID = lpls->mis.CtlID;
|
dis->CtlID = lpls->mis.CtlID;
|
||||||
dis->CtlType = lpls->mis.CtlType;
|
dis->CtlType = lpls->mis.CtlType;
|
||||||
|
@ -262,7 +260,7 @@ void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC hdc, LPLISTSTRUCT lpls,
|
||||||
|
|
||||||
if (itemState != 0) {
|
if (itemState != 0) {
|
||||||
dwOldTextColor = SetTextColor(hdc, 0x00FFFFFFL);
|
dwOldTextColor = SetTextColor(hdc, 0x00FFFFFFL);
|
||||||
FillRect(hdc, rect, GetStockObject(BLACK_BRUSH));
|
FillRect16(hdc, rect, GetStockObject(BLACK_BRUSH));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lphl->dwStyle & LBS_USETABSTOPS) {
|
if (lphl->dwStyle & LBS_USETABSTOPS) {
|
||||||
|
@ -270,8 +268,8 @@ void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC hdc, LPLISTSTRUCT lpls,
|
||||||
(char *)lpls->itemText, strlen((char *)lpls->itemText),
|
(char *)lpls->itemText, strlen((char *)lpls->itemText),
|
||||||
lphl->iNumStops, lphl->TabStops, 0);
|
lphl->iNumStops, lphl->TabStops, 0);
|
||||||
} else {
|
} else {
|
||||||
TextOut(hdc, rect->left + 5, rect->top + 2,
|
TextOut16(hdc, rect->left + 5, rect->top + 2,
|
||||||
(char *)lpls->itemText, strlen((char *)lpls->itemText));
|
(char *)lpls->itemText, strlen((char *)lpls->itemText));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemState != 0) {
|
if (itemState != 0) {
|
||||||
|
@ -279,7 +277,7 @@ void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC hdc, LPLISTSTRUCT lpls,
|
||||||
}
|
}
|
||||||
|
|
||||||
SetBkMode(hdc, OldBkMode);
|
SetBkMode(hdc, OldBkMode);
|
||||||
} else DrawFocusRect(hdc, rect);
|
} else DrawFocusRect16(hdc, rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -290,7 +288,7 @@ int ListBoxFindMouse(LPHEADLIST lphl, int X, int Y)
|
||||||
{
|
{
|
||||||
LPLISTSTRUCT lpls = lphl->lpFirst;
|
LPLISTSTRUCT lpls = lphl->lpFirst;
|
||||||
int i, j;
|
int i, j;
|
||||||
POINT point;
|
POINT16 point;
|
||||||
|
|
||||||
point.x = X; point.y = Y;
|
point.x = X; point.y = Y;
|
||||||
if (lphl->ItemsCount == 0) return LB_ERR;
|
if (lphl->ItemsCount == 0) return LB_ERR;
|
||||||
|
@ -301,7 +299,7 @@ int ListBoxFindMouse(LPHEADLIST lphl, int X, int Y)
|
||||||
}
|
}
|
||||||
for(j = 0; j < lphl->ItemsVisible; i++, j++) {
|
for(j = 0; j < lphl->ItemsVisible; i++, j++) {
|
||||||
if (lpls == NULL) return LB_ERR;
|
if (lpls == NULL) return LB_ERR;
|
||||||
if (PtInRect(&lpls->itemRect,point)) {
|
if (PtInRect16(&lpls->itemRect,point)) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
lpls = lpls->lpNext;
|
lpls = lpls->lpNext;
|
||||||
|
@ -349,7 +347,7 @@ LPLISTSTRUCT ListBoxCreateItem(LPHEADLIST lphl, int id)
|
||||||
lplsnew->mis.itemHeight = lphl->StdItemHeight;
|
lplsnew->mis.itemHeight = lphl->StdItemHeight;
|
||||||
lplsnew->mis.itemWidth = 0; /* ignored */
|
lplsnew->mis.itemWidth = 0; /* ignored */
|
||||||
lplsnew->mis.itemData = 0;
|
lplsnew->mis.itemData = 0;
|
||||||
SetRect(&lplsnew->itemRect, 0, 0, 0, 0);
|
SetRectEmpty16( &lplsnew->itemRect );
|
||||||
|
|
||||||
return lplsnew;
|
return lplsnew;
|
||||||
}
|
}
|
||||||
|
@ -598,7 +596,8 @@ int ListBoxSetCurSel(LPHEADLIST lphl, WORD wIndex)
|
||||||
lpls->itemState = 0;
|
lpls->itemState = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wIndex != (UINT)-1) {
|
if ((wIndex != (UINT)-1) && (wIndex < lphl->ItemsCount))
|
||||||
|
{
|
||||||
lphl->ItemFocused = wIndex;
|
lphl->ItemFocused = wIndex;
|
||||||
lpls = ListBoxGetItem(lphl, wIndex);
|
lpls = ListBoxGetItem(lphl, wIndex);
|
||||||
if (lpls == 0) return LB_ERR;
|
if (lpls == 0) return LB_ERR;
|
||||||
|
@ -714,7 +713,7 @@ LONG ListBoxDirectory(LPHEADLIST lphl, UINT attrib, LPCSTR filespec)
|
||||||
|
|
||||||
/* ------------------------- dimensions ------------------------- */
|
/* ------------------------- dimensions ------------------------- */
|
||||||
|
|
||||||
int ListBoxGetItemRect(LPHEADLIST lphl, WORD wIndex, LPRECT lprect)
|
int ListBoxGetItemRect(LPHEADLIST lphl, WORD wIndex, LPRECT16 lprect)
|
||||||
{
|
{
|
||||||
LPLISTSTRUCT lpls = ListBoxGetItem(lphl,wIndex);
|
LPLISTSTRUCT lpls = ListBoxGetItem(lphl,wIndex);
|
||||||
|
|
||||||
|
@ -773,14 +772,14 @@ static LONG LBCreate(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
{
|
{
|
||||||
LPHEADLIST lphl;
|
LPHEADLIST lphl;
|
||||||
LONG dwStyle = GetWindowLong(hwnd,GWL_STYLE);
|
LONG dwStyle = GetWindowLong(hwnd,GWL_STYLE);
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
|
|
||||||
CreateListBoxStruct(hwnd, ODT_LISTBOX, dwStyle, GetParent(hwnd));
|
CreateListBoxStruct(hwnd, ODT_LISTBOX, dwStyle, GetParent(hwnd));
|
||||||
lphl = ListBoxGetStorageHeader(hwnd);
|
lphl = ListBoxGetStorageHeader(hwnd);
|
||||||
dprintf_listbox(stddeb,"ListBox created: lphl = %p dwStyle = %04x:%04x\n",
|
dprintf_listbox(stddeb,"ListBox created: lphl = %p dwStyle = %04x:%04x\n",
|
||||||
lphl, HIWORD(dwStyle), LOWORD(dwStyle));
|
lphl, HIWORD(dwStyle), LOWORD(dwStyle));
|
||||||
|
|
||||||
GetClientRect(hwnd,&rect);
|
GetClientRect16(hwnd,&rect);
|
||||||
lphl->ColumnsWidth = rect.right - rect.left;
|
lphl->ColumnsWidth = rect.right - rect.left;
|
||||||
|
|
||||||
if (dwStyle & WS_VSCROLL)
|
if (dwStyle & WS_VSCROLL)
|
||||||
|
@ -850,7 +849,7 @@ static LONG LBVScroll(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
|
|
||||||
if (y != lphl->FirstVisible) {
|
if (y != lphl->FirstVisible) {
|
||||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -906,7 +905,7 @@ static LONG LBHScroll(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
if (y != lphl->FirstVisible) {
|
if (y != lphl->FirstVisible) {
|
||||||
SetScrollPos(hwnd, SB_HORZ, lphl->FirstVisible /
|
SetScrollPos(hwnd, SB_HORZ, lphl->FirstVisible /
|
||||||
lphl->ItemsPerColumn + 1, TRUE);
|
lphl->ItemsPerColumn + 1, TRUE);
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -920,9 +919,7 @@ static LONG LBLButtonDown(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
||||||
WORD wRet;
|
WORD wRet;
|
||||||
int y,n;
|
int y,n;
|
||||||
RECT rectsel;
|
RECT16 rectsel;
|
||||||
POINT tmpPOINT;
|
|
||||||
tmpPOINT.x = LOWORD(lParam); tmpPOINT.y = HIWORD(lParam);
|
|
||||||
|
|
||||||
SetFocus(hwnd);
|
SetFocus(hwnd);
|
||||||
SetCapture(hwnd);
|
SetCapture(hwnd);
|
||||||
|
@ -957,7 +954,7 @@ static LONG LBLButtonDown(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
lpls->itemState = ODS_FOCUS | ODS_SELECTED;
|
lpls->itemState = ODS_FOCUS | ODS_SELECTED;
|
||||||
|
|
||||||
if( n > 1 && n != LB_ERR )
|
if( n > 1 && n != LB_ERR )
|
||||||
InvalidateRect(hwnd,NULL,TRUE);
|
InvalidateRect32( hwnd,NULL,TRUE );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -978,17 +975,17 @@ static LONG LBLButtonDown(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
if( lphl->dwStyle & LBS_MULTIPLESEL || y!=lphl->PrevFocused )
|
if( lphl->dwStyle & LBS_MULTIPLESEL || y!=lphl->PrevFocused )
|
||||||
{
|
{
|
||||||
ListBoxGetItemRect(lphl, y, &rectsel);
|
ListBoxGetItemRect(lphl, y, &rectsel);
|
||||||
InvalidateRect(hwnd, &rectsel, TRUE);
|
InvalidateRect16( hwnd, &rectsel, TRUE );
|
||||||
}
|
}
|
||||||
if( lphl->PrevFocused!=-1 && y!=lphl->PrevFocused )
|
if( lphl->PrevFocused!=-1 && y!=lphl->PrevFocused )
|
||||||
{
|
{
|
||||||
ListBoxGetItemRect(lphl, lphl->PrevFocused, &rectsel);
|
ListBoxGetItemRect(lphl, lphl->PrevFocused, &rectsel);
|
||||||
InvalidateRect(hwnd, &rectsel, TRUE);
|
InvalidateRect16( hwnd, &rectsel, TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WINELIB
|
#ifndef WINELIB
|
||||||
if (GetWindowLong(lphl->hSelf,GWL_EXSTYLE) & WS_EX_DRAGDETECT)
|
if (GetWindowLong(lphl->hSelf,GWL_EXSTYLE) & WS_EX_DRAGDETECT)
|
||||||
if( DragDetect(lphl->hSelf,tmpPOINT) )
|
if( DragDetect(lphl->hSelf,MAKEPOINT16(lParam)) )
|
||||||
SendMessage(lphl->hParent, WM_BEGINDRAG,0,0L);
|
SendMessage(lphl->hParent, WM_BEGINDRAG,0,0L);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1036,7 +1033,7 @@ static LONG LBMouseMove(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
||||||
int y,redraw_prev = 0;
|
int y,redraw_prev = 0;
|
||||||
int iRet;
|
int iRet;
|
||||||
RECT rect, rectsel; /* XXX Broken */
|
RECT16 rect, rectsel; /* XXX Broken */
|
||||||
|
|
||||||
dprintf_listbox(stddeb,"LBMouseMove %d %d\n",SLOWORD(lParam),SHIWORD(lParam));
|
dprintf_listbox(stddeb,"LBMouseMove %d %d\n",SLOWORD(lParam),SHIWORD(lParam));
|
||||||
if ((wParam & MK_LBUTTON) != 0) {
|
if ((wParam & MK_LBUTTON) != 0) {
|
||||||
|
@ -1045,16 +1042,16 @@ static LONG LBMouseMove(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
if (lphl->FirstVisible > 0) {
|
if (lphl->FirstVisible > 0) {
|
||||||
lphl->FirstVisible--;
|
lphl->FirstVisible--;
|
||||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GetClientRect(hwnd, &rect);
|
GetClientRect16(hwnd, &rect);
|
||||||
if (y >= (rect.bottom-LBMM_EDGE)) {
|
if (y >= (rect.bottom-LBMM_EDGE)) {
|
||||||
if (lphl->FirstVisible < ListMaxFirstVisible(lphl)) {
|
if (lphl->FirstVisible < ListMaxFirstVisible(lphl)) {
|
||||||
lphl->FirstVisible++;
|
lphl->FirstVisible++;
|
||||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1084,10 +1081,10 @@ static LONG LBMouseMove(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
if( lphl->PrevFocused!=-1 && redraw_prev )
|
if( lphl->PrevFocused!=-1 && redraw_prev )
|
||||||
{
|
{
|
||||||
ListBoxGetItemRect(lphl, lphl->PrevFocused, &rectsel);
|
ListBoxGetItemRect(lphl, lphl->PrevFocused, &rectsel);
|
||||||
InvalidateRect(hwnd, &rectsel, TRUE);
|
InvalidateRect16( hwnd, &rectsel, TRUE );
|
||||||
}
|
}
|
||||||
ListBoxGetItemRect(lphl, iRet, &rectsel);
|
ListBoxGetItemRect(lphl, iRet, &rectsel);
|
||||||
InvalidateRect(hwnd, &rectsel, TRUE);
|
InvalidateRect16( hwnd, &rectsel, TRUE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1104,7 +1101,7 @@ static LONG LBKeyDown(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
{
|
{
|
||||||
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
||||||
WORD newFocused = 0xFFFF;
|
WORD newFocused = 0xFFFF;
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
|
|
||||||
ListBoxGetItemRect(lphl,lphl->ItemFocused,&rect);
|
ListBoxGetItemRect(lphl,lphl->ItemFocused,&rect);
|
||||||
switch(wParam)
|
switch(wParam)
|
||||||
|
@ -1197,14 +1194,14 @@ static LONG LBKeyDown(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
|
|
||||||
if( ListBoxScrollToFocus(lphl) || (lphl->dwStyle &
|
if( ListBoxScrollToFocus(lphl) || (lphl->dwStyle &
|
||||||
(LBS_MULTIPLESEL | LBS_EXTENDEDSEL)) )
|
(LBS_MULTIPLESEL | LBS_EXTENDEDSEL)) )
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
InvalidateRect(hwnd, &rect, TRUE);
|
InvalidateRect16( hwnd, &rect, TRUE );
|
||||||
if( newFocused < 0x8000 )
|
if( newFocused < 0x8000 )
|
||||||
{
|
{
|
||||||
ListBoxGetItemRect(lphl, newFocused, &rect);
|
ListBoxGetItemRect(lphl, newFocused, &rect);
|
||||||
InvalidateRect(hwnd, &rect, TRUE);
|
InvalidateRect16( hwnd, &rect, TRUE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1246,7 +1243,7 @@ static LONG LBChar(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
ListBoxScrollToFocus(lphl);
|
ListBoxScrollToFocus(lphl);
|
||||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||||
|
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1301,24 +1298,24 @@ static LONG LBPaint(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
{
|
{
|
||||||
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
||||||
LPLISTSTRUCT lpls;
|
LPLISTSTRUCT lpls;
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT16 ps;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
HFONT hOldFont;
|
HFONT hOldFont;
|
||||||
HDC hdc = BeginPaint( hwnd, &ps );
|
HDC16 hdc = BeginPaint16( hwnd, &ps );
|
||||||
DC *dc = (DC *)GDI_GetObjPtr(hdc, DC_MAGIC);
|
DC *dc = (DC *)GDI_GetObjPtr(hdc, DC_MAGIC);
|
||||||
RECT rect, paintRect, scratchRect;
|
RECT16 rect, paintRect, scratchRect;
|
||||||
int i, top, height, maxwidth, ipc;
|
int i, top, height, maxwidth, ipc;
|
||||||
|
|
||||||
top = 0;
|
top = 0;
|
||||||
|
|
||||||
if (!IsWindowVisible(hwnd) || !lphl->bRedrawFlag) {
|
if (!IsWindowVisible(hwnd) || !lphl->bRedrawFlag) {
|
||||||
EndPaint(hwnd, &ps);
|
EndPaint16(hwnd, &ps);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetRgnBox(dc->w.hGCClipRgn,&paintRect);
|
GetRgnBox16(dc->w.hGCClipRgn,&paintRect);
|
||||||
GetClientRect(hwnd, &rect);
|
GetClientRect16(hwnd, &rect);
|
||||||
IntersectRect(&paintRect,&rect,&paintRect);
|
IntersectRect16(&paintRect,&rect,&paintRect);
|
||||||
|
|
||||||
hOldFont = SelectObject(hdc, lphl->hFont);
|
hOldFont = SelectObject(hdc, lphl->hFont);
|
||||||
|
|
||||||
|
@ -1332,7 +1329,7 @@ static LONG LBPaint(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
|
|
||||||
if (hBrush == 0) hBrush = GetStockObject(WHITE_BRUSH);
|
if (hBrush == 0) hBrush = GetStockObject(WHITE_BRUSH);
|
||||||
|
|
||||||
FillRect(hdc, &rect, hBrush);
|
FillRect16(hdc, &rect, hBrush);
|
||||||
|
|
||||||
maxwidth = rect.right;
|
maxwidth = rect.right;
|
||||||
if (lphl->dwStyle & LBS_MULTICOLUMN) {
|
if (lphl->dwStyle & LBS_MULTICOLUMN) {
|
||||||
|
@ -1367,7 +1364,7 @@ static LONG LBPaint(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
lpls->itemRect.left = rect.left;
|
lpls->itemRect.left = rect.left;
|
||||||
lpls->itemRect.right = rect.right;
|
lpls->itemRect.right = rect.right;
|
||||||
|
|
||||||
if( IntersectRect(&scratchRect,&paintRect,&lpls->itemRect) )
|
if( IntersectRect16(&scratchRect,&paintRect,&lpls->itemRect) )
|
||||||
{
|
{
|
||||||
dprintf_listbox(stddeb,"LBPaint: drawing item: %d %d %d %d %d\n",
|
dprintf_listbox(stddeb,"LBPaint: drawing item: %d %d %d %d %d\n",
|
||||||
rect.left,top,rect.right,top+height,lpls->itemState);
|
rect.left,top,rect.right,top+height,lpls->itemState);
|
||||||
|
@ -1394,7 +1391,7 @@ static LONG LBPaint(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
}
|
}
|
||||||
ListBoxUpdateWindow(hwnd,lphl,FALSE);
|
ListBoxUpdateWindow(hwnd,lphl,FALSE);
|
||||||
SelectObject(hdc,hOldFont);
|
SelectObject(hdc,hOldFont);
|
||||||
EndPaint( hwnd, &ps );
|
EndPaint16( hwnd, &ps );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1454,7 +1451,7 @@ static LONG LBKillFocus(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
dprintf_listbox(stddeb,"LBKillFocus: no focused item!\n");
|
dprintf_listbox(stddeb,"LBKillFocus: no focused item!\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
|
|
||||||
ListBoxSendNotification(lphl, LBN_KILLFOCUS);
|
ListBoxSendNotification(lphl, LBN_KILLFOCUS);
|
||||||
|
|
||||||
|
@ -1735,7 +1732,7 @@ static LONG LBSelectString(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
ListBoxSetCurSel(lphl,iRet);
|
ListBoxSetCurSel(lphl,iRet);
|
||||||
|
|
||||||
lphl->ItemFocused = iRet;
|
lphl->ItemFocused = iRet;
|
||||||
InvalidateRect(hwnd,0,TRUE);
|
InvalidateRect32( hwnd, 0, TRUE );
|
||||||
}
|
}
|
||||||
return iRet;
|
return iRet;
|
||||||
}
|
}
|
||||||
|
@ -1793,7 +1790,7 @@ static LONG LBSetCaretIndex(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
|
|
||||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||||
if(i)
|
if(i)
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1805,7 +1802,7 @@ static LONG LBSetColumnWidth(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
{
|
{
|
||||||
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
||||||
lphl->ColumnsWidth = wParam;
|
lphl->ColumnsWidth = wParam;
|
||||||
InvalidateRect(hwnd,NULL,TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1875,7 +1872,7 @@ static LONG LBSetCurSel(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
wRet = ListBoxSetCurSel(lphl, wParam);
|
wRet = ListBoxSetCurSel(lphl, wParam);
|
||||||
|
|
||||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
|
|
||||||
return wRet;
|
return wRet;
|
||||||
}
|
}
|
||||||
|
@ -1886,26 +1883,25 @@ static LONG LBSetCurSel(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
static LONG LBSetSel(HWND hwnd, WORD wParam, LONG lParam)
|
static LONG LBSetSel(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
{
|
{
|
||||||
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
int iRet;
|
int iRet;
|
||||||
|
|
||||||
dprintf_listbox(stddeb,"ListBox LB_SETSEL wParam=%x lParam=%lX !\n", wParam, lParam);
|
dprintf_listbox(stddeb,"ListBox LB_SETSEL wParam=%x lParam=%lX !\n", wParam, lParam);
|
||||||
|
|
||||||
iRet = ListBoxSetSel(lphl, LOWORD(lParam), wParam);
|
iRet = ListBoxSetSel(lphl, LOWORD(lParam), wParam);
|
||||||
|
|
||||||
if( iRet > 1 )
|
if( iRet > 1 ) InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
|
||||||
else if( iRet != LB_ERR )
|
else if( iRet != LB_ERR )
|
||||||
{
|
{
|
||||||
if( lphl->dwStyle & LBS_EXTENDEDSEL &&
|
if( lphl->dwStyle & LBS_EXTENDEDSEL &&
|
||||||
lphl->ItemFocused != LOWORD(lParam) )
|
lphl->ItemFocused != LOWORD(lParam) )
|
||||||
{
|
{
|
||||||
ListBoxGetItemRect(lphl, lphl->ItemFocused , &rect);
|
ListBoxGetItemRect(lphl, lphl->ItemFocused , &rect);
|
||||||
InvalidateRect(hwnd,&rect,TRUE);
|
InvalidateRect16( hwnd, &rect, TRUE );
|
||||||
lphl->ItemFocused = LOWORD(lParam);
|
lphl->ItemFocused = LOWORD(lParam);
|
||||||
}
|
}
|
||||||
ListBoxGetItemRect(lphl,LOWORD(lParam),&rect);
|
ListBoxGetItemRect(lphl,LOWORD(lParam),&rect);
|
||||||
InvalidateRect(hwnd,&rect,TRUE);
|
InvalidateRect16( hwnd, &rect, TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
return (iRet == (WORD)LB_ERR)? LB_ERR: 0;
|
return (iRet == (WORD)LB_ERR)? LB_ERR: 0;
|
||||||
|
@ -1923,7 +1919,7 @@ static LONG LBSetTopIndex(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
lphl->FirstVisible = wParam;
|
lphl->FirstVisible = wParam;
|
||||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||||
|
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1938,7 +1934,7 @@ static LONG LBSetItemHeight(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
|
|
||||||
dprintf_listbox(stddeb,"ListBox LB_SETITEMHEIGHT wParam=%x lParam=%lX !\n", wParam, lParam);
|
dprintf_listbox(stddeb,"ListBox LB_SETITEMHEIGHT wParam=%x lParam=%lX !\n", wParam, lParam);
|
||||||
wRet = ListBoxSetItemHeight(lphl, wParam, lParam);
|
wRet = ListBoxSetItemHeight(lphl, wParam, lParam);
|
||||||
InvalidateRect(hwnd,NULL,TRUE);
|
InvalidateRect32( hwnd, NULL, TRUE );
|
||||||
return wRet;
|
return wRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2045,13 +2041,14 @@ LRESULT ListBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
*/
|
*/
|
||||||
BOOL DlgDirSelect( HWND hDlg, LPSTR lpStr, INT id )
|
BOOL DlgDirSelect( HWND hDlg, LPSTR lpStr, INT id )
|
||||||
{
|
{
|
||||||
char buffer[20];
|
char *buffer;
|
||||||
INT i;
|
INT i;
|
||||||
|
|
||||||
dprintf_listbox( stddeb, "DlgDirSelect: %04x '%s' %d\n", hDlg, lpStr, id );
|
dprintf_listbox( stddeb, "DlgDirSelect: %04x '%s' %d\n", hDlg, lpStr, id );
|
||||||
if ((i = SendDlgItemMessage( hDlg, id, LB_GETCURSEL, 0, 0 )) == LB_ERR)
|
if ((i = SendDlgItemMessage( hDlg, id, LB_GETCURSEL, 0, 0 )) == LB_ERR)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
SendDlgItemMessage( hDlg, id, LB_GETTEXT, i, (LPARAM)MAKE_SEGPTR(buffer) );
|
if (!(buffer = SEGPTR_ALLOC( 20 * sizeof(char) ))) return FALSE;
|
||||||
|
SendDlgItemMessage( hDlg, id, LB_GETTEXT, i, (LPARAM)SEGPTR_GET(buffer) );
|
||||||
if (buffer[0] == '[') /* drive or directory */
|
if (buffer[0] == '[') /* drive or directory */
|
||||||
{
|
{
|
||||||
if (buffer[1] == '-') /* drive */
|
if (buffer[1] == '-') /* drive */
|
||||||
|
@ -2060,15 +2057,18 @@ BOOL DlgDirSelect( HWND hDlg, LPSTR lpStr, INT id )
|
||||||
lpStr[1] = ':';
|
lpStr[1] = ':';
|
||||||
lpStr[2] = '\0';
|
lpStr[2] = '\0';
|
||||||
dprintf_listbox( stddeb, "Returning drive '%s'\n", lpStr );
|
dprintf_listbox( stddeb, "Returning drive '%s'\n", lpStr );
|
||||||
|
SEGPTR_FREE(buffer);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
strcpy( lpStr, buffer + 1 );
|
strcpy( lpStr, buffer + 1 );
|
||||||
lpStr[strlen(lpStr)-1] = '\\';
|
lpStr[strlen(lpStr)-1] = '\\';
|
||||||
dprintf_listbox( stddeb, "Returning directory '%s'\n", lpStr );
|
dprintf_listbox( stddeb, "Returning directory '%s'\n", lpStr );
|
||||||
|
SEGPTR_FREE(buffer);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
strcpy( lpStr, buffer );
|
strcpy( lpStr, buffer );
|
||||||
dprintf_listbox( stddeb, "Returning file '%s'\n", lpStr );
|
dprintf_listbox( stddeb, "Returning file '%s'\n", lpStr );
|
||||||
|
SEGPTR_FREE(buffer);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2101,7 +2101,6 @@ INT DlgDirList( HWND hDlg, SEGPTR spec, INT idLBox, INT idStatic, UINT attrib )
|
||||||
if (idLBox && ((hwnd = GetDlgItem( hDlg, idLBox )) != 0))
|
if (idLBox && ((hwnd = GetDlgItem( hDlg, idLBox )) != 0))
|
||||||
{
|
{
|
||||||
char mask[20];
|
char mask[20];
|
||||||
char temp[] = "*.*";
|
|
||||||
|
|
||||||
if (!filespec[0]) strcpy( mask, "*.*" );
|
if (!filespec[0]) strcpy( mask, "*.*" );
|
||||||
else
|
else
|
||||||
|
@ -2131,10 +2130,18 @@ INT DlgDirList( HWND hDlg, SEGPTR spec, INT idLBox, INT idStatic, UINT attrib )
|
||||||
SENDMSG( LB_RESETCONTENT, 0, 0 );
|
SENDMSG( LB_RESETCONTENT, 0, 0 );
|
||||||
if ((attrib & DDL_DIRECTORY) && !(attrib & DDL_EXCLUSIVE))
|
if ((attrib & DDL_DIRECTORY) && !(attrib & DDL_EXCLUSIVE))
|
||||||
{
|
{
|
||||||
|
char *temp;
|
||||||
if (SENDMSG( LB_DIR, attrib & ~(DDL_DIRECTORY | DDL_DRIVES),
|
if (SENDMSG( LB_DIR, attrib & ~(DDL_DIRECTORY | DDL_DRIVES),
|
||||||
(LPARAM)spec ) == LB_ERR) return FALSE;
|
(LPARAM)spec ) == LB_ERR) return FALSE;
|
||||||
|
if (!(temp = SEGPTR_ALLOC( 4*sizeof(char) ))) return FALSE;
|
||||||
|
strcpy( temp, "*.*" );
|
||||||
if (SENDMSG( LB_DIR, (attrib & (DDL_DIRECTORY | DDL_DRIVES)) | DDL_EXCLUSIVE,
|
if (SENDMSG( LB_DIR, (attrib & (DDL_DIRECTORY | DDL_DRIVES)) | DDL_EXCLUSIVE,
|
||||||
(LPARAM)MAKE_SEGPTR(temp) ) == LB_ERR) return FALSE;
|
(LPARAM)SEGPTR_GET(temp) ) == LB_ERR)
|
||||||
|
{
|
||||||
|
SEGPTR_FREE(temp);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
SEGPTR_FREE(temp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2144,12 +2151,15 @@ INT DlgDirList( HWND hDlg, SEGPTR spec, INT idLBox, INT idStatic, UINT attrib )
|
||||||
|
|
||||||
if (idStatic && ((hwnd = GetDlgItem( hDlg, idStatic )) != 0))
|
if (idStatic && ((hwnd = GetDlgItem( hDlg, idStatic )) != 0))
|
||||||
{
|
{
|
||||||
char temp[256];
|
const char *cwd = DRIVE_GetDosCwd(drive);
|
||||||
|
char *temp = SEGPTR_ALLOC( strlen(cwd) + 4 );
|
||||||
|
if (!temp) return FALSE;
|
||||||
strcpy( temp, "A:\\" );
|
strcpy( temp, "A:\\" );
|
||||||
temp[0] += drive;
|
temp[0] += drive;
|
||||||
lstrcpyn( temp+3, DRIVE_GetDosCwd(drive), 253 );
|
strcpy( temp + 3, cwd );
|
||||||
AnsiLower( temp );
|
AnsiLower( temp );
|
||||||
SENDMSG( WM_SETTEXT, 0, (LPARAM)MAKE_SEGPTR(temp) );
|
SENDMSG( WM_SETTEXT, 0, (LPARAM)SEGPTR_GET(temp) );
|
||||||
|
SEGPTR_FREE(temp);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
#undef SENDMSG
|
#undef SENDMSG
|
||||||
|
|
268
controls/menu.c
268
controls/menu.c
|
@ -20,6 +20,7 @@
|
||||||
#include "sysmetrics.h"
|
#include "sysmetrics.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
#include "heap.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "module.h"
|
#include "module.h"
|
||||||
#include "neexe.h"
|
#include "neexe.h"
|
||||||
|
@ -27,7 +28,6 @@
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "graphics.h"
|
#include "graphics.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "stackframe.h"
|
|
||||||
#include "stddebug.h"
|
#include "stddebug.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
|
@ -62,7 +62,8 @@ static BOOL fEndMenuCalled = FALSE;
|
||||||
((DWORD)MAKELONG( (WORD)(item)->hText, (item)->xTab ))
|
((DWORD)MAKELONG( (WORD)(item)->hText, (item)->xTab ))
|
||||||
|
|
||||||
extern void NC_DrawSysButton(HWND hwnd, HDC hdc, BOOL down); /* nonclient.c */
|
extern void NC_DrawSysButton(HWND hwnd, HDC hdc, BOOL down); /* nonclient.c */
|
||||||
static HMENU MENU_CopySysMenu(void);
|
|
||||||
|
HMENU MENU_CopySysMenu(void);
|
||||||
|
|
||||||
static HBITMAP hStdCheck = 0;
|
static HBITMAP hStdCheck = 0;
|
||||||
static HBITMAP hStdMnArrow = 0;
|
static HBITMAP hStdMnArrow = 0;
|
||||||
|
@ -136,7 +137,7 @@ static BOOL MENU_HasSysMenu( POPUPMENU *menu )
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* MENU_CopySysMenu
|
* MENU_CopySysMenu
|
||||||
*/
|
*/
|
||||||
static HMENU MENU_CopySysMenu(void)
|
HMENU MENU_CopySysMenu(void)
|
||||||
{
|
{
|
||||||
HMENU hMenu;
|
HMENU hMenu;
|
||||||
HGLOBAL handle;
|
HGLOBAL handle;
|
||||||
|
@ -163,7 +164,7 @@ static HMENU MENU_CopySysMenu(void)
|
||||||
* Check whether the point (in screen coords) is in the system menu
|
* Check whether the point (in screen coords) is in the system menu
|
||||||
* of the window owning the given menu.
|
* of the window owning the given menu.
|
||||||
*/
|
*/
|
||||||
static BOOL MENU_IsInSysMenu( POPUPMENU *menu, POINT pt )
|
static BOOL MENU_IsInSysMenu( POPUPMENU *menu, POINT16 pt )
|
||||||
{
|
{
|
||||||
WND *wndPtr;
|
WND *wndPtr;
|
||||||
|
|
||||||
|
@ -303,21 +304,23 @@ static void MENU_CalcItemSize( HDC hdc, LPMENUITEM lpitem, HWND hwndOwner,
|
||||||
DWORD dwSize;
|
DWORD dwSize;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
SetRect( &lpitem->rect, orgX, orgY, orgX, orgY );
|
SetRect16( &lpitem->rect, orgX, orgY, orgX, orgY );
|
||||||
|
|
||||||
if (lpitem->item_flags & MF_OWNERDRAW)
|
if (lpitem->item_flags & MF_OWNERDRAW)
|
||||||
{
|
{
|
||||||
MEASUREITEMSTRUCT mis;
|
MEASUREITEMSTRUCT *mis;
|
||||||
mis.CtlType = ODT_MENU;
|
if (!(mis = SEGPTR_NEW(MEASUREITEMSTRUCT))) return;
|
||||||
mis.itemID = lpitem->item_id;
|
mis->CtlType = ODT_MENU;
|
||||||
mis.itemData = GET_OWNERDRAW_DATA(lpitem);
|
mis->itemID = lpitem->item_id;
|
||||||
mis.itemHeight = 16;
|
mis->itemData = GET_OWNERDRAW_DATA(lpitem);
|
||||||
mis.itemWidth = 30;
|
mis->itemHeight = 16;
|
||||||
SendMessage( hwndOwner, WM_MEASUREITEM, 0, (LPARAM)MAKE_SEGPTR(&mis) );
|
mis->itemWidth = 30;
|
||||||
lpitem->rect.bottom += mis.itemHeight;
|
SendMessage( hwndOwner, WM_MEASUREITEM, 0, (LPARAM)SEGPTR_GET(mis) );
|
||||||
lpitem->rect.right += mis.itemWidth;
|
lpitem->rect.bottom += mis->itemHeight;
|
||||||
|
lpitem->rect.right += mis->itemWidth;
|
||||||
dprintf_menu( stddeb, "DrawMenuItem: MeasureItem %04x %dx%d!\n",
|
dprintf_menu( stddeb, "DrawMenuItem: MeasureItem %04x %dx%d!\n",
|
||||||
lpitem->item_id, mis.itemWidth, mis.itemHeight );
|
lpitem->item_id, mis->itemWidth, mis->itemHeight );
|
||||||
|
SEGPTR_FREE(mis);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -434,7 +437,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop, HWND hwndOwner )
|
||||||
*
|
*
|
||||||
* Calculate the size of the menu bar.
|
* Calculate the size of the menu bar.
|
||||||
*/
|
*/
|
||||||
static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect, LPPOPUPMENU lppop,
|
static void MENU_MenuBarCalcSize( HDC hdc, LPRECT16 lprect, LPPOPUPMENU lppop,
|
||||||
HWND hwndOwner )
|
HWND hwndOwner )
|
||||||
{
|
{
|
||||||
LPMENUITEM lpitem, items;
|
LPMENUITEM lpitem, items;
|
||||||
|
@ -506,25 +509,27 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect, LPPOPUPMENU lppop,
|
||||||
static void MENU_DrawMenuItem( HWND hwnd, HDC hdc, LPMENUITEM lpitem,
|
static void MENU_DrawMenuItem( HWND hwnd, HDC hdc, LPMENUITEM lpitem,
|
||||||
UINT height, BOOL menuBar )
|
UINT height, BOOL menuBar )
|
||||||
{
|
{
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
|
|
||||||
if (lpitem->item_flags & MF_OWNERDRAW)
|
if (lpitem->item_flags & MF_OWNERDRAW)
|
||||||
{
|
{
|
||||||
DRAWITEMSTRUCT dis;
|
DRAWITEMSTRUCT16 *dis;
|
||||||
|
|
||||||
|
if (!(dis = SEGPTR_NEW(DRAWITEMSTRUCT16))) return;
|
||||||
dprintf_menu( stddeb, "DrawMenuItem: Ownerdraw!\n" );
|
dprintf_menu( stddeb, "DrawMenuItem: Ownerdraw!\n" );
|
||||||
dis.CtlType = ODT_MENU;
|
dis->CtlType = ODT_MENU;
|
||||||
dis.itemID = lpitem->item_id;
|
dis->itemID = lpitem->item_id;
|
||||||
dis.itemData = GET_OWNERDRAW_DATA(lpitem);
|
dis->itemData = GET_OWNERDRAW_DATA(lpitem);
|
||||||
dis.itemState = 0;
|
dis->itemState = 0;
|
||||||
if (lpitem->item_flags & MF_CHECKED) dis.itemState |= ODS_CHECKED;
|
if (lpitem->item_flags & MF_CHECKED) dis->itemState |= ODS_CHECKED;
|
||||||
if (lpitem->item_flags & MF_GRAYED) dis.itemState |= ODS_GRAYED;
|
if (lpitem->item_flags & MF_GRAYED) dis->itemState |= ODS_GRAYED;
|
||||||
if (lpitem->item_flags & MF_HILITE) dis.itemState |= ODS_SELECTED;
|
if (lpitem->item_flags & MF_HILITE) dis->itemState |= ODS_SELECTED;
|
||||||
dis.itemAction = ODA_DRAWENTIRE | ODA_SELECT | ODA_FOCUS;
|
dis->itemAction = ODA_DRAWENTIRE | ODA_SELECT | ODA_FOCUS;
|
||||||
dis.hwndItem = hwnd;
|
dis->hwndItem = hwnd;
|
||||||
dis.hDC = hdc;
|
dis->hDC = hdc;
|
||||||
dis.rcItem = lpitem->rect;
|
dis->rcItem = lpitem->rect;
|
||||||
SendMessage( hwnd, WM_DRAWITEM, 0, (LPARAM)MAKE_SEGPTR(&dis) );
|
SendMessage( hwnd, WM_DRAWITEM, 0, (LPARAM)SEGPTR_GET(dis) );
|
||||||
|
SEGPTR_FREE(dis);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -534,8 +539,8 @@ static void MENU_DrawMenuItem( HWND hwnd, HDC hdc, LPMENUITEM lpitem,
|
||||||
/* Draw the background */
|
/* Draw the background */
|
||||||
|
|
||||||
if (lpitem->item_flags & MF_HILITE)
|
if (lpitem->item_flags & MF_HILITE)
|
||||||
FillRect( hdc, &rect, sysColorObjects.hbrushHighlight );
|
FillRect16( hdc, &rect, sysColorObjects.hbrushHighlight );
|
||||||
else FillRect( hdc, &rect, sysColorObjects.hbrushMenu );
|
else FillRect16( hdc, &rect, sysColorObjects.hbrushMenu );
|
||||||
SetBkMode( hdc, TRANSPARENT );
|
SetBkMode( hdc, TRANSPARENT );
|
||||||
|
|
||||||
/* Draw the separator bar (if any) */
|
/* Draw the separator bar (if any) */
|
||||||
|
@ -631,18 +636,18 @@ static void MENU_DrawMenuItem( HWND hwnd, HDC hdc, LPMENUITEM lpitem,
|
||||||
if ((text[i] == '\t') || (text[i] == '\b')) break;
|
if ((text[i] == '\t') || (text[i] == '\b')) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawText( hdc, text, i, &rect, DT_LEFT | DT_VCENTER | DT_SINGLELINE );
|
DrawText16( hdc, text, i, &rect, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
|
||||||
|
|
||||||
if (text[i]) /* There's a tab or flush-right char */
|
if (text[i]) /* There's a tab or flush-right char */
|
||||||
{
|
{
|
||||||
if (text[i] == '\t')
|
if (text[i] == '\t')
|
||||||
{
|
{
|
||||||
rect.left = lpitem->xTab;
|
rect.left = lpitem->xTab;
|
||||||
DrawText( hdc, text + i + 1, -1, &rect,
|
DrawText16( hdc, text + i + 1, -1, &rect,
|
||||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE );
|
DT_LEFT | DT_VCENTER | DT_SINGLELINE );
|
||||||
}
|
}
|
||||||
else DrawText( hdc, text + i + 1, -1, &rect,
|
else DrawText16( hdc, text + i + 1, -1, &rect,
|
||||||
DT_RIGHT | DT_VCENTER | DT_SINGLELINE );
|
DT_RIGHT | DT_VCENTER | DT_SINGLELINE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -657,11 +662,11 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
|
||||||
{
|
{
|
||||||
POPUPMENU *menu;
|
POPUPMENU *menu;
|
||||||
MENUITEM *item;
|
MENUITEM *item;
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
GetClientRect( hwnd, &rect );
|
GetClientRect16( hwnd, &rect );
|
||||||
FillRect( hdc, &rect, sysColorObjects.hbrushMenu );
|
FillRect16( hdc, &rect, sysColorObjects.hbrushMenu );
|
||||||
menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( hmenu );
|
menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( hmenu );
|
||||||
if (!menu || !menu->nItems) return;
|
if (!menu || !menu->nItems) return;
|
||||||
item = (MENUITEM *) USER_HEAP_LIN_ADDR( menu->hItems );
|
item = (MENUITEM *) USER_HEAP_LIN_ADDR( menu->hItems );
|
||||||
|
@ -675,7 +680,7 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
|
||||||
*
|
*
|
||||||
* Paint a menu bar. Returns the height of the menu bar.
|
* Paint a menu bar. Returns the height of the menu bar.
|
||||||
*/
|
*/
|
||||||
UINT MENU_DrawMenuBar(HDC hDC, LPRECT lprect, HWND hwnd, BOOL suppress_draw)
|
UINT MENU_DrawMenuBar(HDC hDC, LPRECT16 lprect, HWND hwnd, BOOL suppress_draw)
|
||||||
{
|
{
|
||||||
LPPOPUPMENU lppop;
|
LPPOPUPMENU lppop;
|
||||||
LPMENUITEM lpitem;
|
LPMENUITEM lpitem;
|
||||||
|
@ -690,7 +695,7 @@ UINT MENU_DrawMenuBar(HDC hDC, LPRECT lprect, HWND hwnd, BOOL suppress_draw)
|
||||||
lprect->bottom = lprect->top + lppop->Height;
|
lprect->bottom = lprect->top + lppop->Height;
|
||||||
if (suppress_draw) return lppop->Height;
|
if (suppress_draw) return lppop->Height;
|
||||||
|
|
||||||
FillRect(hDC, lprect, sysColorObjects.hbrushMenu );
|
FillRect16(hDC, lprect, sysColorObjects.hbrushMenu );
|
||||||
SelectObject( hDC, sysColorObjects.hpenWindowFrame );
|
SelectObject( hDC, sysColorObjects.hpenWindowFrame );
|
||||||
MoveTo( hDC, lprect->left, lprect->bottom );
|
MoveTo( hDC, lprect->left, lprect->bottom );
|
||||||
LineTo( hDC, lprect->right, lprect->bottom );
|
LineTo( hDC, lprect->right, lprect->bottom );
|
||||||
|
@ -797,7 +802,8 @@ static BOOL MENU_ShowPopup(HWND hwndOwner, HMENU hmenu, UINT id, int x, int y)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* MENU_SelectItem
|
* MENU_SelectItem
|
||||||
*/
|
*/
|
||||||
static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex )
|
static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex,
|
||||||
|
BOOL sendMenuSelect )
|
||||||
{
|
{
|
||||||
MENUITEM *items;
|
MENUITEM *items;
|
||||||
LPPOPUPMENU lppop;
|
LPPOPUPMENU lppop;
|
||||||
|
@ -834,16 +840,17 @@ static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex )
|
||||||
if (lppop->FocusedItem == SYSMENU_SELECTED)
|
if (lppop->FocusedItem == SYSMENU_SELECTED)
|
||||||
{
|
{
|
||||||
NC_DrawSysButton( lppop->hWnd, hdc, TRUE );
|
NC_DrawSysButton( lppop->hWnd, hdc, TRUE );
|
||||||
|
if (sendMenuSelect)
|
||||||
#ifdef WINELIB32
|
#ifdef WINELIB32
|
||||||
/* FIX: LostInfo */
|
/* FIX: LostInfo */
|
||||||
SendMessage( hwndOwner, WM_MENUSELECT,
|
SendMessage( hwndOwner, WM_MENUSELECT,
|
||||||
MAKEWPARAM( WIN_FindWndPtr(lppop->hWnd)->hSysMenu,
|
MAKEWPARAM( WIN_FindWndPtr(lppop->hWnd)->hSysMenu,
|
||||||
lppop->wFlags | MF_MOUSESELECT ),
|
lppop->wFlags | MF_MOUSESELECT ),
|
||||||
(LPARAM)hmenu );
|
(LPARAM)hmenu );
|
||||||
#else
|
#else
|
||||||
SendMessage( hwndOwner, WM_MENUSELECT,
|
SendMessage( hwndOwner, WM_MENUSELECT,
|
||||||
WIN_FindWndPtr(lppop->hWnd)->hSysMenu,
|
WIN_FindWndPtr(lppop->hWnd)->hSysMenu,
|
||||||
MAKELONG( lppop->wFlags | MF_MOUSESELECT, hmenu ) );
|
MAKELONG(lppop->wFlags | MF_MOUSESELECT, hmenu));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -851,27 +858,30 @@ static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex )
|
||||||
items[lppop->FocusedItem].item_flags |= MF_HILITE;
|
items[lppop->FocusedItem].item_flags |= MF_HILITE;
|
||||||
MENU_DrawMenuItem( lppop->hWnd, hdc, &items[lppop->FocusedItem], lppop->Height,
|
MENU_DrawMenuItem( lppop->hWnd, hdc, &items[lppop->FocusedItem], lppop->Height,
|
||||||
!(lppop->wFlags & MF_POPUP) );
|
!(lppop->wFlags & MF_POPUP) );
|
||||||
|
if (sendMenuSelect)
|
||||||
#ifdef WINELIB32
|
#ifdef WINELIB32
|
||||||
SendMessage( hwndOwner, WM_MENUSELECT,
|
SendMessage( hwndOwner, WM_MENUSELECT,
|
||||||
MAKEWPARAM( items[lppop->FocusedItem].item_id,
|
MAKEWPARAM( items[lppop->FocusedItem].item_id,
|
||||||
items[lppop->FocusedItem].item_flags |
|
items[lppop->FocusedItem].item_flags|
|
||||||
MF_MOUSESELECT ),
|
MF_MOUSESELECT ),
|
||||||
(LPARAM) hmenu );
|
(LPARAM) hmenu );
|
||||||
#else
|
#else
|
||||||
SendMessage( hwndOwner, WM_MENUSELECT,
|
SendMessage( hwndOwner, WM_MENUSELECT,
|
||||||
items[lppop->FocusedItem].item_id,
|
items[lppop->FocusedItem].item_id,
|
||||||
MAKELONG( items[lppop->FocusedItem].item_flags | MF_MOUSESELECT, hmenu));
|
MAKELONG( items[lppop->FocusedItem].item_flags | MF_MOUSESELECT, hmenu));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef WINELIB32
|
#ifdef WINELIB32
|
||||||
/* FIX: Lost Info */
|
/* FIX: Lost Info */
|
||||||
else SendMessage( hwndOwner, WM_MENUSELECT,
|
else if (sendMenuSelect)
|
||||||
MAKEWPARAM( (DWORD)hmenu, lppop->wFlags | MF_MOUSESELECT),
|
SendMessage( hwndOwner, WM_MENUSELECT,
|
||||||
hmenu );
|
MAKEWPARAM( (DWORD)hmenu, lppop->wFlags | MF_MOUSESELECT),
|
||||||
|
hmenu );
|
||||||
#else
|
#else
|
||||||
else SendMessage( hwndOwner, WM_MENUSELECT, hmenu,
|
else if (sendMenuSelect)
|
||||||
MAKELONG( lppop->wFlags | MF_MOUSESELECT, hmenu ) );
|
SendMessage( hwndOwner, WM_MENUSELECT, hmenu,
|
||||||
|
MAKELONG( lppop->wFlags | MF_MOUSESELECT, hmenu ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ReleaseDC( lppop->hWnd, hdc );
|
ReleaseDC( lppop->hWnd, hdc );
|
||||||
|
@ -897,13 +907,13 @@ static void MENU_SelectNextItem( HWND hwndOwner, HMENU hmenu )
|
||||||
{
|
{
|
||||||
if (!(items[i].item_flags & MF_SEPARATOR))
|
if (!(items[i].item_flags & MF_SEPARATOR))
|
||||||
{
|
{
|
||||||
MENU_SelectItem( hwndOwner, hmenu, i );
|
MENU_SelectItem( hwndOwner, hmenu, i, TRUE );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (MENU_HasSysMenu( menu ))
|
if (MENU_HasSysMenu( menu ))
|
||||||
{
|
{
|
||||||
MENU_SelectItem( hwndOwner, hmenu, SYSMENU_SELECTED );
|
MENU_SelectItem( hwndOwner, hmenu, SYSMENU_SELECTED, TRUE );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -911,12 +921,12 @@ static void MENU_SelectNextItem( HWND hwndOwner, HMENU hmenu )
|
||||||
{
|
{
|
||||||
if (!(items[i].item_flags & MF_SEPARATOR))
|
if (!(items[i].item_flags & MF_SEPARATOR))
|
||||||
{
|
{
|
||||||
MENU_SelectItem( hwndOwner, hmenu, i );
|
MENU_SelectItem( hwndOwner, hmenu, i, TRUE );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (MENU_HasSysMenu( menu ))
|
if (MENU_HasSysMenu( menu ))
|
||||||
MENU_SelectItem( hwndOwner, hmenu, SYSMENU_SELECTED );
|
MENU_SelectItem( hwndOwner, hmenu, SYSMENU_SELECTED, TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -939,13 +949,13 @@ static void MENU_SelectPrevItem( HWND hwndOwner, HMENU hmenu )
|
||||||
{
|
{
|
||||||
if (!(items[i].item_flags & MF_SEPARATOR))
|
if (!(items[i].item_flags & MF_SEPARATOR))
|
||||||
{
|
{
|
||||||
MENU_SelectItem( hwndOwner, hmenu, i );
|
MENU_SelectItem( hwndOwner, hmenu, i, TRUE );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (MENU_HasSysMenu( menu ))
|
if (MENU_HasSysMenu( menu ))
|
||||||
{
|
{
|
||||||
MENU_SelectItem( hwndOwner, hmenu, SYSMENU_SELECTED );
|
MENU_SelectItem( hwndOwner, hmenu, SYSMENU_SELECTED, TRUE );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -953,12 +963,12 @@ static void MENU_SelectPrevItem( HWND hwndOwner, HMENU hmenu )
|
||||||
{
|
{
|
||||||
if (!(items[i].item_flags & MF_SEPARATOR))
|
if (!(items[i].item_flags & MF_SEPARATOR))
|
||||||
{
|
{
|
||||||
MENU_SelectItem( hwndOwner, hmenu, i );
|
MENU_SelectItem( hwndOwner, hmenu, i, TRUE );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (MENU_HasSysMenu( menu ))
|
if (MENU_HasSysMenu( menu ))
|
||||||
MENU_SelectItem( hwndOwner, hmenu, SYSMENU_SELECTED );
|
MENU_SelectItem( hwndOwner, hmenu, SYSMENU_SELECTED, TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1000,7 +1010,7 @@ static BOOL MENU_SetItemData( MENUITEM *item, UINT flags, UINT id, SEGPTR data)
|
||||||
|
|
||||||
item->item_flags = flags & ~(MF_HILITE | MF_MOUSESELECT);
|
item->item_flags = flags & ~(MF_HILITE | MF_MOUSESELECT);
|
||||||
item->item_id = id;
|
item->item_id = id;
|
||||||
SetRectEmpty( &item->rect );
|
SetRectEmpty16( &item->rect );
|
||||||
if (hPrevText) USER_HEAP_FREE( hPrevText );
|
if (hPrevText) USER_HEAP_FREE( hPrevText );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1144,7 +1154,8 @@ static HMENU MENU_GetSubPopup( HMENU hmenu )
|
||||||
*
|
*
|
||||||
* Hide the sub-popup menus of this menu.
|
* Hide the sub-popup menus of this menu.
|
||||||
*/
|
*/
|
||||||
static void MENU_HideSubPopups( HWND hwndOwner, HMENU hmenu )
|
static void MENU_HideSubPopups( HWND hwndOwner, HMENU hmenu,
|
||||||
|
BOOL sendMenuSelect )
|
||||||
{
|
{
|
||||||
MENUITEM *item;
|
MENUITEM *item;
|
||||||
POPUPMENU *menu, *submenu;
|
POPUPMENU *menu, *submenu;
|
||||||
|
@ -1165,18 +1176,18 @@ static void MENU_HideSubPopups( HWND hwndOwner, HMENU hmenu )
|
||||||
hsubmenu = (HMENU)item->item_id;
|
hsubmenu = (HMENU)item->item_id;
|
||||||
}
|
}
|
||||||
submenu = (POPUPMENU *) USER_HEAP_LIN_ADDR( hsubmenu );
|
submenu = (POPUPMENU *) USER_HEAP_LIN_ADDR( hsubmenu );
|
||||||
MENU_HideSubPopups( hwndOwner, hsubmenu );
|
MENU_HideSubPopups( hwndOwner, hsubmenu, FALSE );
|
||||||
|
MENU_SelectItem( hwndOwner, hsubmenu, NO_SELECTED_ITEM, sendMenuSelect );
|
||||||
if (submenu->hWnd == pTopPWnd->hwndSelf )
|
if (submenu->hWnd == pTopPWnd->hwndSelf )
|
||||||
{
|
{
|
||||||
ShowWindow( submenu->hWnd, SW_HIDE );
|
ShowWindow( submenu->hWnd, SW_HIDE );
|
||||||
uSubPWndLevel = 0;
|
uSubPWndLevel = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DestroyWindow( submenu->hWnd );
|
DestroyWindow( submenu->hWnd );
|
||||||
submenu->hWnd = 0;
|
submenu->hWnd = 0;
|
||||||
}
|
}
|
||||||
MENU_SelectItem( hwndOwner, hsubmenu, NO_SELECTED_ITEM );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1228,12 +1239,12 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu, BOOL selectFirst )
|
||||||
*
|
*
|
||||||
* Find the menu containing a given point (in screen coords).
|
* Find the menu containing a given point (in screen coords).
|
||||||
*/
|
*/
|
||||||
static HMENU MENU_FindMenuByCoords( HMENU hmenu, POINT pt )
|
static HMENU MENU_FindMenuByCoords( HMENU hmenu, POINT16 pt )
|
||||||
{
|
{
|
||||||
POPUPMENU *menu;
|
POPUPMENU *menu;
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
|
|
||||||
if (!(hwnd = WindowFromPoint( pt ))) return 0;
|
if (!(hwnd = WindowFromPoint16( pt ))) return 0;
|
||||||
while (hmenu)
|
while (hmenu)
|
||||||
{
|
{
|
||||||
menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( hmenu );
|
menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( hmenu );
|
||||||
|
@ -1300,7 +1311,7 @@ static BOOL MENU_ExecFocusedItem( HWND hwndOwner, HMENU hmenu,
|
||||||
* Return TRUE if we can go on with menu tracking.
|
* Return TRUE if we can go on with menu tracking.
|
||||||
*/
|
*/
|
||||||
static BOOL MENU_ButtonDown( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
static BOOL MENU_ButtonDown( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
||||||
POINT pt )
|
POINT16 pt )
|
||||||
{
|
{
|
||||||
POPUPMENU *menu;
|
POPUPMENU *menu;
|
||||||
MENUITEM *item;
|
MENUITEM *item;
|
||||||
|
@ -1324,7 +1335,7 @@ static BOOL MENU_ButtonDown( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
||||||
{
|
{
|
||||||
if (menu->wFlags & MF_POPUP)
|
if (menu->wFlags & MF_POPUP)
|
||||||
{
|
{
|
||||||
MENU_HideSubPopups( hwndOwner, hmenu );
|
MENU_HideSubPopups( hwndOwner, hmenu, TRUE );
|
||||||
*hmenuCurrent = hmenu;
|
*hmenuCurrent = hmenu;
|
||||||
}
|
}
|
||||||
else return FALSE;
|
else return FALSE;
|
||||||
|
@ -1334,8 +1345,8 @@ static BOOL MENU_ButtonDown( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MENU_HideSubPopups( hwndOwner, hmenu );
|
MENU_HideSubPopups( hwndOwner, hmenu, FALSE );
|
||||||
MENU_SelectItem( hwndOwner, hmenu, id );
|
MENU_SelectItem( hwndOwner, hmenu, id, TRUE );
|
||||||
*hmenuCurrent = MENU_ShowSubPopup( hwndOwner, hmenu, FALSE );
|
*hmenuCurrent = MENU_ShowSubPopup( hwndOwner, hmenu, FALSE );
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1350,7 +1361,7 @@ static BOOL MENU_ButtonDown( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
||||||
* Return TRUE if we can go on with menu tracking.
|
* Return TRUE if we can go on with menu tracking.
|
||||||
*/
|
*/
|
||||||
static BOOL MENU_ButtonUp( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
static BOOL MENU_ButtonUp( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
||||||
POINT pt )
|
POINT16 pt )
|
||||||
{
|
{
|
||||||
POPUPMENU *menu;
|
POPUPMENU *menu;
|
||||||
MENUITEM *item;
|
MENUITEM *item;
|
||||||
|
@ -1378,7 +1389,7 @@ static BOOL MENU_ButtonUp( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
||||||
hsubmenu = (HMENU)item->item_id;
|
hsubmenu = (HMENU)item->item_id;
|
||||||
}
|
}
|
||||||
/* Select first item of sub-popup */
|
/* Select first item of sub-popup */
|
||||||
MENU_SelectItem( hwndOwner, hsubmenu, NO_SELECTED_ITEM );
|
MENU_SelectItem( hwndOwner, hsubmenu, NO_SELECTED_ITEM, FALSE );
|
||||||
MENU_SelectNextItem( hwndOwner, hsubmenu );
|
MENU_SelectNextItem( hwndOwner, hsubmenu );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1392,7 +1403,7 @@ static BOOL MENU_ButtonUp( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
||||||
* Return TRUE if we can go on with menu tracking.
|
* Return TRUE if we can go on with menu tracking.
|
||||||
*/
|
*/
|
||||||
static BOOL MENU_MouseMove( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
static BOOL MENU_MouseMove( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
||||||
POINT pt )
|
POINT16 pt )
|
||||||
{
|
{
|
||||||
MENUITEM *item;
|
MENUITEM *item;
|
||||||
POPUPMENU *menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( hmenu );
|
POPUPMENU *menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( hmenu );
|
||||||
|
@ -1410,12 +1421,12 @@ static BOOL MENU_MouseMove( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
||||||
}
|
}
|
||||||
if (id == NO_SELECTED_ITEM)
|
if (id == NO_SELECTED_ITEM)
|
||||||
{
|
{
|
||||||
MENU_SelectItem( hwndOwner, *hmenuCurrent, NO_SELECTED_ITEM );
|
MENU_SelectItem( hwndOwner, *hmenuCurrent, NO_SELECTED_ITEM, TRUE );
|
||||||
}
|
}
|
||||||
else if (menu->FocusedItem != id)
|
else if (menu->FocusedItem != id)
|
||||||
{
|
{
|
||||||
MENU_HideSubPopups( hwndOwner, hmenu );
|
MENU_HideSubPopups( hwndOwner, hmenu, FALSE );
|
||||||
MENU_SelectItem( hwndOwner, hmenu, id );
|
MENU_SelectItem( hwndOwner, hmenu, id, TRUE );
|
||||||
*hmenuCurrent = MENU_ShowSubPopup( hwndOwner, hmenu, FALSE );
|
*hmenuCurrent = MENU_ShowSubPopup( hwndOwner, hmenu, FALSE );
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1440,7 +1451,7 @@ static void MENU_KeyLeft( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent )
|
||||||
hmenutmp = MENU_GetSubPopup( hmenuprev );
|
hmenutmp = MENU_GetSubPopup( hmenuprev );
|
||||||
if (hmenutmp != *hmenuCurrent) hmenuprev = hmenutmp;
|
if (hmenutmp != *hmenuCurrent) hmenuprev = hmenutmp;
|
||||||
}
|
}
|
||||||
MENU_HideSubPopups( hwndOwner, hmenuprev );
|
MENU_HideSubPopups( hwndOwner, hmenuprev, TRUE );
|
||||||
|
|
||||||
if ((hmenuprev == hmenu) && !(menu->wFlags & MF_POPUP))
|
if ((hmenuprev == hmenu) && !(menu->wFlags & MF_POPUP))
|
||||||
{
|
{
|
||||||
|
@ -1483,7 +1494,7 @@ static void MENU_KeyRight( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent )
|
||||||
/* If on menu-bar, go to next item */
|
/* If on menu-bar, go to next item */
|
||||||
if (!(menu->wFlags & MF_POPUP))
|
if (!(menu->wFlags & MF_POPUP))
|
||||||
{
|
{
|
||||||
MENU_HideSubPopups( hwndOwner, hmenu );
|
MENU_HideSubPopups( hwndOwner, hmenu, FALSE );
|
||||||
MENU_SelectNextItem( hwndOwner, hmenu );
|
MENU_SelectNextItem( hwndOwner, hmenu );
|
||||||
if (*hmenuCurrent != hmenu)
|
if (*hmenuCurrent != hmenu)
|
||||||
{
|
{
|
||||||
|
@ -1500,7 +1511,7 @@ static void MENU_KeyRight( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent )
|
||||||
hmenutmp = MENU_GetSubPopup( hmenuprev );
|
hmenutmp = MENU_GetSubPopup( hmenuprev );
|
||||||
if (hmenutmp != *hmenuCurrent) hmenuprev = hmenutmp;
|
if (hmenutmp != *hmenuCurrent) hmenuprev = hmenutmp;
|
||||||
}
|
}
|
||||||
MENU_HideSubPopups( hwndOwner, hmenuprev );
|
MENU_HideSubPopups( hwndOwner, hmenuprev, TRUE );
|
||||||
*hmenuCurrent = hmenuprev;
|
*hmenuCurrent = hmenuprev;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1514,7 +1525,7 @@ static void MENU_KeyRight( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent )
|
||||||
* before beginning tracking. This is to help menu-bar tracking.
|
* before beginning tracking. This is to help menu-bar tracking.
|
||||||
*/
|
*/
|
||||||
static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, int x, int y,
|
static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, int x, int y,
|
||||||
HWND hwnd, LPRECT lprect )
|
HWND hwnd, const RECT16 *lprect )
|
||||||
{
|
{
|
||||||
MSG *msg;
|
MSG *msg;
|
||||||
HLOCAL16 hMsg;
|
HLOCAL16 hMsg;
|
||||||
|
@ -1527,7 +1538,7 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, int x, int y,
|
||||||
if (!(menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( hmenu ))) return FALSE;
|
if (!(menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( hmenu ))) return FALSE;
|
||||||
if (x && y)
|
if (x && y)
|
||||||
{
|
{
|
||||||
POINT pt = { x, y };
|
POINT16 pt = { x, y };
|
||||||
MENU_ButtonDown( hwnd, hmenu, &hmenuCurrent, pt );
|
MENU_ButtonDown( hwnd, hmenu, &hmenuCurrent, pt );
|
||||||
}
|
}
|
||||||
SetCapture( hwnd );
|
SetCapture( hwnd );
|
||||||
|
@ -1564,7 +1575,7 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, int x, int y,
|
||||||
case WM_LBUTTONUP:
|
case WM_LBUTTONUP:
|
||||||
case WM_NCLBUTTONUP:
|
case WM_NCLBUTTONUP:
|
||||||
/* If outside all menus but inside lprect, ignore it */
|
/* If outside all menus but inside lprect, ignore it */
|
||||||
if (!hsubmenu && lprect && PtInRect( lprect, msg->pt )) break;
|
if (!hsubmenu && lprect && PtInRect16(lprect, msg->pt)) break;
|
||||||
fClosed = !MENU_ButtonUp( hwnd, hsubmenu,
|
fClosed = !MENU_ButtonUp( hwnd, hsubmenu,
|
||||||
&hmenuCurrent, msg->pt );
|
&hmenuCurrent, msg->pt );
|
||||||
fRemove = TRUE; /* Remove event even if outside menu */
|
fRemove = TRUE; /* Remove event even if outside menu */
|
||||||
|
@ -1590,12 +1601,12 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, int x, int y,
|
||||||
switch(msg->wParam)
|
switch(msg->wParam)
|
||||||
{
|
{
|
||||||
case VK_HOME:
|
case VK_HOME:
|
||||||
MENU_SelectItem( hwnd, hmenuCurrent, NO_SELECTED_ITEM );
|
MENU_SelectItem( hwnd, hmenuCurrent, NO_SELECTED_ITEM, FALSE );
|
||||||
MENU_SelectNextItem( hwnd, hmenuCurrent );
|
MENU_SelectNextItem( hwnd, hmenuCurrent );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VK_END:
|
case VK_END:
|
||||||
MENU_SelectItem( hwnd, hmenuCurrent, NO_SELECTED_ITEM );
|
MENU_SelectItem( hwnd, hmenuCurrent, NO_SELECTED_ITEM, FALSE );
|
||||||
MENU_SelectPrevItem( hwnd, hmenuCurrent );
|
MENU_SelectPrevItem( hwnd, hmenuCurrent );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1654,7 +1665,7 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, int x, int y,
|
||||||
else if (pos == (UINT)-1) MessageBeep(0);
|
else if (pos == (UINT)-1) MessageBeep(0);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MENU_SelectItem( hwnd, hmenuCurrent, pos );
|
MENU_SelectItem( hwnd, hmenuCurrent, pos, TRUE );
|
||||||
fClosed = !MENU_ExecFocusedItem( hwnd, hmenuCurrent,
|
fClosed = !MENU_ExecFocusedItem( hwnd, hmenuCurrent,
|
||||||
&hmenuCurrent );
|
&hmenuCurrent );
|
||||||
|
|
||||||
|
@ -1675,13 +1686,13 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, int x, int y,
|
||||||
}
|
}
|
||||||
USER_HEAP_FREE( hMsg );
|
USER_HEAP_FREE( hMsg );
|
||||||
ReleaseCapture();
|
ReleaseCapture();
|
||||||
MENU_HideSubPopups( hwnd, hmenu );
|
MENU_HideSubPopups( hwnd, hmenu, FALSE );
|
||||||
if (menu->wFlags & MF_POPUP)
|
if (menu->wFlags & MF_POPUP)
|
||||||
{
|
{
|
||||||
ShowWindow( menu->hWnd, SW_HIDE );
|
ShowWindow( menu->hWnd, SW_HIDE );
|
||||||
uSubPWndLevel = 0;
|
uSubPWndLevel = 0;
|
||||||
}
|
}
|
||||||
MENU_SelectItem( hwnd, hmenu, NO_SELECTED_ITEM );
|
MENU_SelectItem( hwnd, hmenu, NO_SELECTED_ITEM, FALSE );
|
||||||
SendMessage( hwnd, WM_MENUSELECT, 0, MAKELONG( 0xffff, 0 ) );
|
SendMessage( hwnd, WM_MENUSELECT, 0, MAKELONG( 0xffff, 0 ) );
|
||||||
fEndMenuCalled = FALSE;
|
fEndMenuCalled = FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1693,7 +1704,7 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, int x, int y,
|
||||||
*
|
*
|
||||||
* Menu-bar tracking upon a mouse event. Called from NC_HandleSysCommand().
|
* Menu-bar tracking upon a mouse event. Called from NC_HandleSysCommand().
|
||||||
*/
|
*/
|
||||||
void MENU_TrackMouseMenuBar( HWND hwnd, POINT pt )
|
void MENU_TrackMouseMenuBar( HWND hwnd, POINT16 pt )
|
||||||
{
|
{
|
||||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||||
HideCaret(0);
|
HideCaret(0);
|
||||||
|
@ -1758,7 +1769,7 @@ void MENU_TrackKbdMenuBar( WND* wndPtr, UINT wParam, INT vkey)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MENU_SelectItem( wndPtr->hwndSelf, hTrackMenu, uItem );
|
MENU_SelectItem( wndPtr->hwndSelf, hTrackMenu, uItem, TRUE );
|
||||||
if( uItem == NO_SELECTED_ITEM )
|
if( uItem == NO_SELECTED_ITEM )
|
||||||
MENU_SelectNextItem( wndPtr->hwndSelf, hTrackMenu );
|
MENU_SelectNextItem( wndPtr->hwndSelf, hTrackMenu );
|
||||||
else
|
else
|
||||||
|
@ -1773,22 +1784,33 @@ void MENU_TrackKbdMenuBar( WND* wndPtr, UINT wParam, INT vkey)
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* TrackPopupMenu (USER.416)
|
* TrackPopupMenu16 (USER.416)
|
||||||
*/
|
*/
|
||||||
BOOL TrackPopupMenu( HMENU hMenu, UINT wFlags, short x, short y,
|
BOOL16 TrackPopupMenu16( HMENU16 hMenu, UINT16 wFlags, INT16 x, INT16 y,
|
||||||
short nReserved, HWND hWnd, LPRECT lpRect )
|
INT16 nReserved, HWND16 hWnd, const RECT16 *lpRect )
|
||||||
{
|
{
|
||||||
BOOL ret;
|
BOOL ret = FALSE;
|
||||||
|
|
||||||
HideCaret(0);
|
HideCaret(0);
|
||||||
if (!MENU_ShowPopup( hWnd, hMenu, 0, x, y ))
|
if (MENU_ShowPopup( hWnd, hMenu, 0, x, y ))
|
||||||
ret = FALSE;
|
|
||||||
else
|
|
||||||
ret = MENU_TrackMenu( hMenu, wFlags, 0, 0, hWnd, lpRect );
|
ret = MENU_TrackMenu( hMenu, wFlags, 0, 0, hWnd, lpRect );
|
||||||
ShowCaret(0);
|
ShowCaret(0);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* TrackPopupMenu32 (USER32.548)
|
||||||
|
*/
|
||||||
|
BOOL32 TrackPopupMenu32( HMENU32 hMenu, UINT32 wFlags, INT32 x, INT32 y,
|
||||||
|
INT32 nReserved, HWND32 hWnd, const RECT32 *lpRect )
|
||||||
|
{
|
||||||
|
RECT16 r;
|
||||||
|
CONV_RECT32TO16( lpRect, &r );
|
||||||
|
return TrackPopupMenu16( hMenu, wFlags, x, y, nReserved, hWnd, &r );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* PopupMenuWndProc
|
* PopupMenuWndProc
|
||||||
*/
|
*/
|
||||||
|
@ -1798,12 +1820,12 @@ LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
|
||||||
{
|
{
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
{
|
{
|
||||||
CREATESTRUCT *createStruct = (CREATESTRUCT*)PTR_SEG_TO_LIN(lParam);
|
CREATESTRUCT16 *cs = (CREATESTRUCT16*)PTR_SEG_TO_LIN(lParam);
|
||||||
#ifdef WINELIB32
|
#ifdef WINELIB32
|
||||||
HMENU hmenu = (HMENU) (createStruct->lpCreateParams);
|
HMENU hmenu = (HMENU) (cs->lpCreateParams);
|
||||||
SetWindowLong( hwnd, 0, hmenu );
|
SetWindowLong( hwnd, 0, hmenu );
|
||||||
#else
|
#else
|
||||||
HMENU hmenu = (HMENU) ((int)createStruct->lpCreateParams & 0xffff);
|
HMENU hmenu = (HMENU) ((int)cs->lpCreateParams & 0xffff);
|
||||||
SetWindowWord( hwnd, 0, hmenu );
|
SetWindowWord( hwnd, 0, hmenu );
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1814,8 +1836,8 @@ LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
|
||||||
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
{
|
{
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT16 ps;
|
||||||
BeginPaint( hwnd, &ps );
|
BeginPaint16( hwnd, &ps );
|
||||||
MENU_DrawPopupMenu( hwnd, ps.hdc,
|
MENU_DrawPopupMenu( hwnd, ps.hdc,
|
||||||
#ifdef WINELIB32
|
#ifdef WINELIB32
|
||||||
(HMENU)GetWindowLong( hwnd, 0 )
|
(HMENU)GetWindowLong( hwnd, 0 )
|
||||||
|
@ -1823,7 +1845,7 @@ LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
|
||||||
(HMENU)GetWindowWord( hwnd, 0 )
|
(HMENU)GetWindowWord( hwnd, 0 )
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
EndPaint( hwnd, &ps );
|
EndPaint16( hwnd, &ps );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1861,7 +1883,7 @@ LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
|
||||||
UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth, int orgX, int orgY )
|
UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth, int orgX, int orgY )
|
||||||
{
|
{
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
RECT rectBar;
|
RECT16 rectBar;
|
||||||
WND *wndPtr;
|
WND *wndPtr;
|
||||||
LPPOPUPMENU lppop;
|
LPPOPUPMENU lppop;
|
||||||
|
|
||||||
|
@ -1869,7 +1891,7 @@ UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth, int orgX, int orgY )
|
||||||
if (!(lppop = (LPPOPUPMENU)USER_HEAP_LIN_ADDR((HMENU)wndPtr->wIDmenu)))
|
if (!(lppop = (LPPOPUPMENU)USER_HEAP_LIN_ADDR((HMENU)wndPtr->wIDmenu)))
|
||||||
return 0;
|
return 0;
|
||||||
hdc = GetDC( hwnd );
|
hdc = GetDC( hwnd );
|
||||||
SetRect( &rectBar, orgX, orgY, orgX+menubarWidth, orgY+SYSMETRICS_CYMENU );
|
SetRect16(&rectBar, orgX, orgY, orgX+menubarWidth, orgY+SYSMETRICS_CYMENU);
|
||||||
MENU_MenuBarCalcSize( hdc, &rectBar, lppop, hwnd );
|
MENU_MenuBarCalcSize( hdc, &rectBar, lppop, hwnd );
|
||||||
ReleaseDC( hwnd, hdc );
|
ReleaseDC( hwnd, hdc );
|
||||||
return lppop->Height;
|
return lppop->Height;
|
||||||
|
@ -1984,8 +2006,8 @@ BOOL HiliteMenuItem(HWND hWnd, HMENU hMenu, UINT wItemID, UINT wHilite)
|
||||||
if (!(lpitem = MENU_FindItem( &hMenu, &wItemID, wHilite ))) return FALSE;
|
if (!(lpitem = MENU_FindItem( &hMenu, &wItemID, wHilite ))) return FALSE;
|
||||||
if (!(menu = (LPPOPUPMENU) USER_HEAP_LIN_ADDR(hMenu))) return FALSE;
|
if (!(menu = (LPPOPUPMENU) USER_HEAP_LIN_ADDR(hMenu))) return FALSE;
|
||||||
if (menu->FocusedItem == wItemID) return TRUE;
|
if (menu->FocusedItem == wItemID) return TRUE;
|
||||||
MENU_HideSubPopups( hWnd, hMenu );
|
MENU_HideSubPopups( hWnd, hMenu, FALSE );
|
||||||
MENU_SelectItem( hWnd, hMenu, wItemID );
|
MENU_SelectItem( hWnd, hMenu, wItemID, TRUE );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ static SCROLLINFO *SCROLL_GetScrollInfo( HWND hwnd, int nBar )
|
||||||
* the thumb relative to the left or to the top.
|
* the thumb relative to the left or to the top.
|
||||||
* Return TRUE if the scrollbar is vertical, FALSE if horizontal.
|
* Return TRUE if the scrollbar is vertical, FALSE if horizontal.
|
||||||
*/
|
*/
|
||||||
static BOOL SCROLL_GetScrollBarRect( HWND hwnd, int nBar, RECT *lprect,
|
static BOOL SCROLL_GetScrollBarRect( HWND hwnd, int nBar, RECT16 *lprect,
|
||||||
WORD *arrowSize, WORD *thumbPos )
|
WORD *arrowSize, WORD *thumbPos )
|
||||||
{
|
{
|
||||||
int pixels;
|
int pixels;
|
||||||
|
@ -172,7 +172,7 @@ static BOOL SCROLL_GetScrollBarRect( HWND hwnd, int nBar, RECT *lprect,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SB_CTL:
|
case SB_CTL:
|
||||||
GetClientRect( hwnd, lprect );
|
GetClientRect16( hwnd, lprect );
|
||||||
vertical = ((wndPtr->dwStyle & SBS_VERT) != 0);
|
vertical = ((wndPtr->dwStyle & SBS_VERT) != 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ static BOOL SCROLL_GetScrollBarRect( HWND hwnd, int nBar, RECT *lprect,
|
||||||
* Compute the current scroll position based on the thumb position in pixels
|
* Compute the current scroll position based on the thumb position in pixels
|
||||||
* from the top of the scroll-bar.
|
* from the top of the scroll-bar.
|
||||||
*/
|
*/
|
||||||
static UINT SCROLL_GetThumbVal( SCROLLINFO *infoPtr, RECT *rect,
|
static UINT SCROLL_GetThumbVal( SCROLLINFO *infoPtr, RECT16 *rect,
|
||||||
BOOL vertical, WORD pos )
|
BOOL vertical, WORD pos )
|
||||||
{
|
{
|
||||||
int pixels = vertical ? rect->bottom-rect->top : rect->right-rect->left;
|
int pixels = vertical ? rect->bottom-rect->top : rect->right-rect->left;
|
||||||
|
@ -237,14 +237,14 @@ static UINT SCROLL_GetThumbVal( SCROLLINFO *infoPtr, RECT *rect,
|
||||||
*
|
*
|
||||||
* Scroll-bar hit testing (don't confuse this with WM_NCHITTEST!).
|
* Scroll-bar hit testing (don't confuse this with WM_NCHITTEST!).
|
||||||
*/
|
*/
|
||||||
static enum SCROLL_HITTEST SCROLL_HitTest( HWND hwnd, int nBar, POINT pt )
|
static enum SCROLL_HITTEST SCROLL_HitTest( HWND hwnd, int nBar, POINT16 pt )
|
||||||
{
|
{
|
||||||
WORD arrowSize, thumbPos;
|
WORD arrowSize, thumbPos;
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
|
|
||||||
BOOL vertical = SCROLL_GetScrollBarRect( hwnd, nBar, &rect,
|
BOOL vertical = SCROLL_GetScrollBarRect( hwnd, nBar, &rect,
|
||||||
&arrowSize, &thumbPos );
|
&arrowSize, &thumbPos );
|
||||||
if (!PtInRect( &rect, pt )) return SCROLL_NOWHERE;
|
if (!PtInRect16( &rect, pt )) return SCROLL_NOWHERE;
|
||||||
|
|
||||||
if (vertical)
|
if (vertical)
|
||||||
{
|
{
|
||||||
|
@ -274,7 +274,7 @@ static enum SCROLL_HITTEST SCROLL_HitTest( HWND hwnd, int nBar, POINT pt )
|
||||||
*
|
*
|
||||||
* Draw the scroll bar arrows.
|
* Draw the scroll bar arrows.
|
||||||
*/
|
*/
|
||||||
static void SCROLL_DrawArrows( HDC hdc, SCROLLINFO *infoPtr, RECT *rect,
|
static void SCROLL_DrawArrows( HDC hdc, SCROLLINFO *infoPtr, RECT16 *rect,
|
||||||
WORD arrowSize, BOOL vertical,
|
WORD arrowSize, BOOL vertical,
|
||||||
BOOL top_pressed, BOOL bottom_pressed )
|
BOOL top_pressed, BOOL bottom_pressed )
|
||||||
{
|
{
|
||||||
|
@ -315,10 +315,10 @@ static void SCROLL_DrawArrows( HDC hdc, SCROLLINFO *infoPtr, RECT *rect,
|
||||||
*
|
*
|
||||||
* Draw the moving thumb rectangle.
|
* Draw the moving thumb rectangle.
|
||||||
*/
|
*/
|
||||||
static void SCROLL_DrawMovingThumb( HDC hdc, RECT *rect, BOOL vertical,
|
static void SCROLL_DrawMovingThumb( HDC hdc, RECT16 *rect, BOOL vertical,
|
||||||
WORD arrowSize, WORD thumbPos )
|
WORD arrowSize, WORD thumbPos )
|
||||||
{
|
{
|
||||||
RECT r = *rect;
|
RECT16 r = *rect;
|
||||||
if (vertical)
|
if (vertical)
|
||||||
{
|
{
|
||||||
r.top += thumbPos;
|
r.top += thumbPos;
|
||||||
|
@ -335,8 +335,8 @@ static void SCROLL_DrawMovingThumb( HDC hdc, RECT *rect, BOOL vertical,
|
||||||
r.left = rect->right - arrowSize - SYSMETRICS_CXVSCROLL - 1;
|
r.left = rect->right - arrowSize - SYSMETRICS_CXVSCROLL - 1;
|
||||||
r.right = r.left + SYSMETRICS_CXVSCROLL + 1;
|
r.right = r.left + SYSMETRICS_CXVSCROLL + 1;
|
||||||
}
|
}
|
||||||
InflateRect( &r, -1, -1 );
|
InflateRect16( &r, -1, -1 );
|
||||||
DrawFocusRect( hdc, &r );
|
DrawFocusRect16( hdc, &r );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -345,12 +345,12 @@ static void SCROLL_DrawMovingThumb( HDC hdc, RECT *rect, BOOL vertical,
|
||||||
*
|
*
|
||||||
* Draw the scroll bar interior (everything except the arrows).
|
* Draw the scroll bar interior (everything except the arrows).
|
||||||
*/
|
*/
|
||||||
static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, int nBar, RECT *rect,
|
static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, int nBar, RECT16 *rect,
|
||||||
WORD arrowSize, WORD thumbPos, WORD flags,
|
WORD arrowSize, WORD thumbPos, WORD flags,
|
||||||
BOOL vertical, BOOL top_selected,
|
BOOL vertical, BOOL top_selected,
|
||||||
BOOL bottom_selected )
|
BOOL bottom_selected )
|
||||||
{
|
{
|
||||||
RECT r;
|
RECT16 r;
|
||||||
|
|
||||||
/* Select the correct brush and pen */
|
/* Select the correct brush and pen */
|
||||||
|
|
||||||
|
@ -438,7 +438,7 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, int nBar, RECT *rect,
|
||||||
|
|
||||||
SelectObject( hdc, sysColorObjects.hbrushBtnFace );
|
SelectObject( hdc, sysColorObjects.hbrushBtnFace );
|
||||||
Rectangle( hdc, r.left, r.top, r.right, r.bottom );
|
Rectangle( hdc, r.left, r.top, r.right, r.bottom );
|
||||||
InflateRect( &r, -1, -1 );
|
InflateRect16( &r, -1, -1 );
|
||||||
GRAPH_DrawReliefRect( hdc, &r, 1, 2, FALSE );
|
GRAPH_DrawReliefRect( hdc, &r, 1, 2, FALSE );
|
||||||
if ((hwndTracking == hwnd) && (nBarTracking == nBar))
|
if ((hwndTracking == hwnd) && (nBarTracking == nBar))
|
||||||
SCROLL_DrawMovingThumb( hdc, rect, vertical, arrowSize, uTrackingPos);
|
SCROLL_DrawMovingThumb( hdc, rect, vertical, arrowSize, uTrackingPos);
|
||||||
|
@ -453,7 +453,7 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, int nBar, RECT *rect,
|
||||||
void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, int nBar )
|
void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, int nBar )
|
||||||
{
|
{
|
||||||
WORD arrowSize, thumbPos;
|
WORD arrowSize, thumbPos;
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
BOOL vertical;
|
BOOL vertical;
|
||||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||||
SCROLLINFO *infoPtr = SCROLL_GetPtrScrollInfo( wndPtr, nBar );
|
SCROLLINFO *infoPtr = SCROLL_GetPtrScrollInfo( wndPtr, nBar );
|
||||||
|
@ -483,7 +483,7 @@ void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, int nBar )
|
||||||
static void SCROLL_RefreshScrollBar( HWND hwnd, int nBar )
|
static void SCROLL_RefreshScrollBar( HWND hwnd, int nBar )
|
||||||
{
|
{
|
||||||
WORD arrowSize, thumbPos;
|
WORD arrowSize, thumbPos;
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
BOOL vertical;
|
BOOL vertical;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||||
|
@ -543,10 +543,10 @@ static void SCROLL_HandleKbdEvent( HWND hwnd, WORD wParam )
|
||||||
* 'pt' is the location of the mouse event in client (for SB_CTL) or
|
* 'pt' is the location of the mouse event in client (for SB_CTL) or
|
||||||
* windows coordinates.
|
* windows coordinates.
|
||||||
*/
|
*/
|
||||||
void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
|
void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT16 pt )
|
||||||
{
|
{
|
||||||
/* Previous mouse position for timer events */
|
/* Previous mouse position for timer events */
|
||||||
static POINT prevPt;
|
static POINT16 prevPt;
|
||||||
/* Hit test code of the last button-down event */
|
/* Hit test code of the last button-down event */
|
||||||
static enum SCROLL_HITTEST trackHitTest;
|
static enum SCROLL_HITTEST trackHitTest;
|
||||||
/* Thumb position when tracking started. */
|
/* Thumb position when tracking started. */
|
||||||
|
@ -560,7 +560,7 @@ void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
|
||||||
HWND hwndOwner, hwndCtl;
|
HWND hwndOwner, hwndCtl;
|
||||||
BOOL vertical;
|
BOOL vertical;
|
||||||
WORD arrowSize, thumbPos;
|
WORD arrowSize, thumbPos;
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
|
|
||||||
SCROLLINFO *infoPtr = SCROLL_GetScrollInfo( hwnd, nBar );
|
SCROLLINFO *infoPtr = SCROLL_GetScrollInfo( hwnd, nBar );
|
||||||
|
@ -675,7 +675,7 @@ void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
|
||||||
{
|
{
|
||||||
UINT pos, val;
|
UINT pos, val;
|
||||||
|
|
||||||
if (!PtInRect( &rect, pt )) pos = lastClickPos;
|
if (!PtInRect16( &rect, pt )) pos = lastClickPos;
|
||||||
else pos = vertical ? (pt.y - rect.top) : (pt.x - rect.left);
|
else pos = vertical ? (pt.y - rect.top) : (pt.x - rect.left);
|
||||||
if (pos != lastMousePos)
|
if (pos != lastMousePos)
|
||||||
{
|
{
|
||||||
|
@ -779,15 +779,11 @@ void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
|
||||||
*/
|
*/
|
||||||
LONG ScrollBarWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
LONG ScrollBarWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||||
{
|
{
|
||||||
POINT Pt;
|
|
||||||
Pt.x = LOWORD(lParam); Pt.y = HIWORD(lParam);
|
|
||||||
/* ^ Can't use MAKEPOINT macro in WINELIB32 */
|
|
||||||
|
|
||||||
switch(message)
|
switch(message)
|
||||||
{
|
{
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
{
|
{
|
||||||
CREATESTRUCT *lpCreat = (CREATESTRUCT *)PTR_SEG_TO_LIN(lParam);
|
CREATESTRUCT16 *lpCreat = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam);
|
||||||
if (lpCreat->style & SBS_SIZEBOX)
|
if (lpCreat->style & SBS_SIZEBOX)
|
||||||
{
|
{
|
||||||
fprintf( stdnimp, "Unimplemented style SBS_SIZEBOX.\n" );
|
fprintf( stdnimp, "Unimplemented style SBS_SIZEBOX.\n" );
|
||||||
|
@ -825,7 +821,7 @@ LONG ScrollBarWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||||
case WM_LBUTTONUP:
|
case WM_LBUTTONUP:
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
case WM_SYSTIMER:
|
case WM_SYSTIMER:
|
||||||
SCROLL_HandleScrollEvent( hwnd, SB_CTL, message, Pt );
|
SCROLL_HandleScrollEvent( hwnd, SB_CTL, message, MAKEPOINT16(lParam) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
|
@ -840,10 +836,10 @@ LONG ScrollBarWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||||
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
{
|
{
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT16 ps;
|
||||||
HDC hdc = BeginPaint( hwnd, &ps );
|
HDC16 hdc = BeginPaint16( hwnd, &ps );
|
||||||
SCROLL_DrawScrollBar( hwnd, hdc, SB_CTL );
|
SCROLL_DrawScrollBar( hwnd, hdc, SB_CTL );
|
||||||
EndPaint( hwnd, &ps );
|
EndPaint16( hwnd, &ps );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -79,19 +79,18 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
switch (uMsg) {
|
switch (uMsg) {
|
||||||
case WM_ENABLE:
|
case WM_ENABLE:
|
||||||
InvalidateRect(hWnd, NULL, FALSE);
|
InvalidateRect32( hWnd, NULL, FALSE );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_NCCREATE:
|
case WM_NCCREATE:
|
||||||
if (style == SS_ICON)
|
if (style == SS_ICON)
|
||||||
{
|
{
|
||||||
CREATESTRUCT * createStruct = (CREATESTRUCT *)PTR_SEG_TO_LIN(lParam);
|
CREATESTRUCT16 *cs = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam);
|
||||||
if (createStruct->lpszName)
|
if (cs->lpszName)
|
||||||
{
|
{
|
||||||
HICON hicon = LoadIcon( createStruct->hInstance,
|
HICON hicon = LoadIcon( cs->hInstance, cs->lpszName );
|
||||||
createStruct->lpszName );
|
|
||||||
if (!hicon) /* Try OEM icon (FIXME: is this right?) */
|
if (!hicon) /* Try OEM icon (FIXME: is this right?) */
|
||||||
hicon = LoadIcon( 0, createStruct->lpszName );
|
hicon = LoadIcon( 0, cs->lpszName );
|
||||||
STATIC_SetIcon( wndPtr, hicon );
|
STATIC_SetIcon( wndPtr, hicon );
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -120,11 +119,11 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
{
|
{
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT16 ps;
|
||||||
BeginPaint( hWnd, &ps );
|
BeginPaint16( hWnd, &ps );
|
||||||
if (staticPaintFunc[style])
|
if (staticPaintFunc[style])
|
||||||
(staticPaintFunc[style])( wndPtr, ps.hdc );
|
(staticPaintFunc[style])( wndPtr, ps.hdc );
|
||||||
EndPaint( hWnd, &ps );
|
EndPaint16( hWnd, &ps );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -132,7 +131,7 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
color_windowframe = GetSysColor(COLOR_WINDOWFRAME);
|
color_windowframe = GetSysColor(COLOR_WINDOWFRAME);
|
||||||
color_background = GetSysColor(COLOR_BACKGROUND);
|
color_background = GetSysColor(COLOR_BACKGROUND);
|
||||||
color_window = GetSysColor(COLOR_WINDOW);
|
color_window = GetSysColor(COLOR_WINDOW);
|
||||||
InvalidateRect(hWnd, NULL, TRUE);
|
InvalidateRect32( hWnd, NULL, TRUE );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_SETTEXT:
|
case WM_SETTEXT:
|
||||||
|
@ -142,7 +141,7 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
(SEGPTR)lParam ));
|
(SEGPTR)lParam ));
|
||||||
else
|
else
|
||||||
DEFWND_SetText( wndPtr, (LPSTR)PTR_SEG_TO_LIN(lParam) );
|
DEFWND_SetText( wndPtr, (LPSTR)PTR_SEG_TO_LIN(lParam) );
|
||||||
InvalidateRect( hWnd, NULL, FALSE );
|
InvalidateRect32( hWnd, NULL, FALSE );
|
||||||
UpdateWindow( hWnd );
|
UpdateWindow( hWnd );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -151,7 +150,7 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
infoPtr->hFont = (HFONT)wParam;
|
infoPtr->hFont = (HFONT)wParam;
|
||||||
if (LOWORD(lParam))
|
if (LOWORD(lParam))
|
||||||
{
|
{
|
||||||
InvalidateRect( hWnd, NULL, FALSE );
|
InvalidateRect32( hWnd, NULL, FALSE );
|
||||||
UpdateWindow( hWnd );
|
UpdateWindow( hWnd );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -170,7 +169,7 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
case STM_SETICON:
|
case STM_SETICON:
|
||||||
lResult = STATIC_SetIcon( wndPtr, (HICON)wParam );
|
lResult = STATIC_SetIcon( wndPtr, (HICON)wParam );
|
||||||
InvalidateRect( hWnd, NULL, FALSE );
|
InvalidateRect32( hWnd, NULL, FALSE );
|
||||||
UpdateWindow( hWnd );
|
UpdateWindow( hWnd );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -185,7 +184,7 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc )
|
static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc )
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
char *text;
|
char *text;
|
||||||
WORD wFormat;
|
WORD wFormat;
|
||||||
|
@ -193,7 +192,7 @@ static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc )
|
||||||
LONG style = wndPtr->dwStyle;
|
LONG style = wndPtr->dwStyle;
|
||||||
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
|
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
|
||||||
|
|
||||||
GetClientRect( wndPtr->hwndSelf, &rc);
|
GetClientRect16( wndPtr->hwndSelf, &rc);
|
||||||
text = USER_HEAP_LIN_ADDR( wndPtr->hText );
|
text = USER_HEAP_LIN_ADDR( wndPtr->hText );
|
||||||
|
|
||||||
switch (style & 0x0000000F)
|
switch (style & 0x0000000F)
|
||||||
|
@ -234,42 +233,42 @@ static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc )
|
||||||
MAKELONG(wndPtr->hwndSelf, CTLCOLOR_STATIC));
|
MAKELONG(wndPtr->hwndSelf, CTLCOLOR_STATIC));
|
||||||
#endif
|
#endif
|
||||||
if (!hBrush) hBrush = GetStockObject(WHITE_BRUSH);
|
if (!hBrush) hBrush = GetStockObject(WHITE_BRUSH);
|
||||||
FillRect(hdc, &rc, hBrush);
|
FillRect16(hdc, &rc, hBrush);
|
||||||
if (text) DrawText( hdc, text, -1, &rc, wFormat );
|
if (text) DrawText16( hdc, text, -1, &rc, wFormat );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc )
|
static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc )
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
|
|
||||||
GetClientRect( wndPtr->hwndSelf, &rc);
|
GetClientRect16( wndPtr->hwndSelf, &rc);
|
||||||
|
|
||||||
switch (wndPtr->dwStyle & 0x0f)
|
switch (wndPtr->dwStyle & 0x0f)
|
||||||
{
|
{
|
||||||
case SS_BLACKRECT:
|
case SS_BLACKRECT:
|
||||||
hBrush = CreateSolidBrush(color_windowframe);
|
hBrush = CreateSolidBrush(color_windowframe);
|
||||||
FillRect( hdc, &rc, hBrush );
|
FillRect16( hdc, &rc, hBrush );
|
||||||
break;
|
break;
|
||||||
case SS_GRAYRECT:
|
case SS_GRAYRECT:
|
||||||
hBrush = CreateSolidBrush(color_background);
|
hBrush = CreateSolidBrush(color_background);
|
||||||
FillRect( hdc, &rc, hBrush );
|
FillRect16( hdc, &rc, hBrush );
|
||||||
break;
|
break;
|
||||||
case SS_WHITERECT:
|
case SS_WHITERECT:
|
||||||
hBrush = CreateSolidBrush(color_window);
|
hBrush = CreateSolidBrush(color_window);
|
||||||
FillRect( hdc, &rc, hBrush );
|
FillRect16( hdc, &rc, hBrush );
|
||||||
break;
|
break;
|
||||||
case SS_BLACKFRAME:
|
case SS_BLACKFRAME:
|
||||||
hBrush = CreateSolidBrush(color_windowframe);
|
hBrush = CreateSolidBrush(color_windowframe);
|
||||||
FrameRect( hdc, &rc, hBrush );
|
FrameRect16( hdc, &rc, hBrush );
|
||||||
break;
|
break;
|
||||||
case SS_GRAYFRAME:
|
case SS_GRAYFRAME:
|
||||||
hBrush = CreateSolidBrush(color_background);
|
hBrush = CreateSolidBrush(color_background);
|
||||||
FrameRect( hdc, &rc, hBrush );
|
FrameRect16( hdc, &rc, hBrush );
|
||||||
break;
|
break;
|
||||||
case SS_WHITEFRAME:
|
case SS_WHITEFRAME:
|
||||||
hBrush = CreateSolidBrush(color_window);
|
hBrush = CreateSolidBrush(color_window);
|
||||||
FrameRect( hdc, &rc, hBrush );
|
FrameRect16( hdc, &rc, hBrush );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
|
@ -280,11 +279,11 @@ static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc )
|
||||||
|
|
||||||
static void STATIC_PaintIconfn( WND *wndPtr, HDC hdc )
|
static void STATIC_PaintIconfn( WND *wndPtr, HDC hdc )
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
HBRUSH hbrush;
|
HBRUSH hbrush;
|
||||||
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
|
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
|
||||||
|
|
||||||
GetClientRect( wndPtr->hwndSelf, &rc);
|
GetClientRect16( wndPtr->hwndSelf, &rc);
|
||||||
#ifdef WINELIB32
|
#ifdef WINELIB32
|
||||||
hbrush = SendMessage( GetParent(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
|
hbrush = SendMessage( GetParent(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
|
||||||
hdc, wndPtr->hwndSelf );
|
hdc, wndPtr->hwndSelf );
|
||||||
|
@ -292,6 +291,6 @@ static void STATIC_PaintIconfn( WND *wndPtr, HDC hdc )
|
||||||
hbrush = SendMessage( GetParent(wndPtr->hwndSelf), WM_CTLCOLOR, hdc,
|
hbrush = SendMessage( GetParent(wndPtr->hwndSelf), WM_CTLCOLOR, hdc,
|
||||||
MAKELONG(wndPtr->hwndSelf, CTLCOLOR_STATIC));
|
MAKELONG(wndPtr->hwndSelf, CTLCOLOR_STATIC));
|
||||||
#endif
|
#endif
|
||||||
FillRect( hdc, &rc, hbrush );
|
FillRect16( hdc, &rc, hbrush );
|
||||||
if (infoPtr->hIcon) DrawIcon( hdc, rc.left, rc.top, infoPtr->hIcon );
|
if (infoPtr->hIcon) DrawIcon( hdc, rc.left, rc.top, infoPtr->hIcon );
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,38 +13,38 @@
|
||||||
#include "gdi.h"
|
#include "gdi.h"
|
||||||
#include "user.h"
|
#include "user.h"
|
||||||
#include "module.h"
|
#include "module.h"
|
||||||
#include "stackframe.h"
|
#include "heap.h"
|
||||||
|
|
||||||
static WNDCLASS16 WIDGETS_BuiltinClasses[] =
|
static WNDCLASS16 WIDGETS_BuiltinClasses[] =
|
||||||
{
|
{
|
||||||
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC,
|
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC,
|
||||||
(WNDPROC)"ButtonWndProc", 0, sizeof(BUTTONINFO),
|
(WNDPROC16)"ButtonWndProc", 0, sizeof(BUTTONINFO),
|
||||||
0, 0, 0, 0, 0, (SEGPTR)"BUTTON" },
|
0, 0, 0, 0, 0, (SEGPTR)"BUTTON" },
|
||||||
{ CS_GLOBALCLASS | CS_PARENTDC,
|
{ CS_GLOBALCLASS | CS_PARENTDC,
|
||||||
(WNDPROC)"StaticWndProc", 0, sizeof(STATICINFO),
|
(WNDPROC16)"StaticWndProc", 0, sizeof(STATICINFO),
|
||||||
0, 0, 0, 0, 0, (SEGPTR)"STATIC" },
|
0, 0, 0, 0, 0, (SEGPTR)"STATIC" },
|
||||||
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC,
|
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC,
|
||||||
(WNDPROC)"ScrollBarWndProc", 0, sizeof(SCROLLINFO),
|
(WNDPROC16)"ScrollBarWndProc", 0, sizeof(SCROLLINFO),
|
||||||
0, 0, 0, 0, 0, (SEGPTR)"SCROLLBAR" },
|
0, 0, 0, 0, 0, (SEGPTR)"SCROLLBAR" },
|
||||||
{ CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS,
|
{ CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS,
|
||||||
(WNDPROC)"ListBoxWndProc", 0, 8,
|
(WNDPROC16)"ListBoxWndProc", 0, 8,
|
||||||
0, 0, 0, 0, 0, (SEGPTR)"LISTBOX" },
|
0, 0, 0, 0, 0, (SEGPTR)"LISTBOX" },
|
||||||
{ CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS,
|
{ CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS,
|
||||||
(WNDPROC)"ComboBoxWndProc", 0, 8,
|
(WNDPROC16)"ComboBoxWndProc", 0, 8,
|
||||||
0, 0, 0, 0, 0, (SEGPTR)"COMBOBOX" },
|
0, 0, 0, 0, 0, (SEGPTR)"COMBOBOX" },
|
||||||
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS,
|
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS,
|
||||||
(WNDPROC)"ComboLBoxWndProc", 0, 8,
|
(WNDPROC16)"ComboLBoxWndProc", 0, 8,
|
||||||
0, 0, 0, 0, 0, (SEGPTR)"COMBOLBOX" },
|
0, 0, 0, 0, 0, (SEGPTR)"COMBOLBOX" },
|
||||||
{ CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS,
|
{ CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS,
|
||||||
(WNDPROC)"EditWndProc", 0, sizeof(DWORD),
|
(WNDPROC16)"EditWndProc", 0, sizeof(DWORD),
|
||||||
0, 0, 0, 0, 0, (SEGPTR)"EDIT" },
|
0, 0, 0, 0, 0, (SEGPTR)"EDIT" },
|
||||||
{ CS_GLOBALCLASS | CS_SAVEBITS, (WNDPROC)"PopupMenuWndProc", 0, 8,
|
{ CS_GLOBALCLASS | CS_SAVEBITS, (WNDPROC16)"PopupMenuWndProc", 0, 8,
|
||||||
0, 0, 0, 0, 0, (SEGPTR)POPUPMENU_CLASS_NAME },
|
0, 0, 0, 0, 0, (SEGPTR)POPUPMENU_CLASS_NAME },
|
||||||
{ CS_GLOBALCLASS, (WNDPROC)"DesktopWndProc", 0, sizeof(DESKTOPINFO),
|
{ CS_GLOBALCLASS, (WNDPROC16)"DesktopWndProc", 0, sizeof(DESKTOPINFO),
|
||||||
0, 0, 0, 0, 0, (SEGPTR)DESKTOP_CLASS_NAME },
|
0, 0, 0, 0, 0, (SEGPTR)DESKTOP_CLASS_NAME },
|
||||||
{ CS_GLOBALCLASS | CS_SAVEBITS, (WNDPROC)"DefDlgProc", 0, DLGWINDOWEXTRA,
|
{ CS_GLOBALCLASS | CS_SAVEBITS, (WNDPROC16)"DefDlgProc", 0, DLGWINDOWEXTRA,
|
||||||
0, 0, 0, 0, 0, (SEGPTR)DIALOG_CLASS_NAME },
|
0, 0, 0, 0, 0, (SEGPTR)DIALOG_CLASS_NAME },
|
||||||
{ CS_GLOBALCLASS, (WNDPROC)"MDIClientWndProc", 0, sizeof(MDICLIENTINFO),
|
{ CS_GLOBALCLASS, (WNDPROC16)"MDIClientWndProc", 0, sizeof(MDICLIENTINFO),
|
||||||
0, 0, 0, STOCK_LTGRAY_BRUSH, 0, (SEGPTR)"MDICLIENT" }
|
0, 0, 0, STOCK_LTGRAY_BRUSH, 0, (SEGPTR)"MDICLIENT" }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -60,16 +60,18 @@ static WNDCLASS16 WIDGETS_BuiltinClasses[] =
|
||||||
BOOL WIDGETS_Init(void)
|
BOOL WIDGETS_Init(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char name[20];
|
char *name;
|
||||||
WNDCLASS16 *class = WIDGETS_BuiltinClasses;
|
WNDCLASS16 *class = WIDGETS_BuiltinClasses;
|
||||||
|
|
||||||
|
if (!(name = SEGPTR_ALLOC( 20 * sizeof(char) ))) return FALSE;
|
||||||
for (i = 0; i < NB_BUILTIN_CLASSES; i++, class++)
|
for (i = 0; i < NB_BUILTIN_CLASSES; i++, class++)
|
||||||
{
|
{
|
||||||
strcpy( name, (char *)class->lpszClassName );
|
strcpy( name, (char *)class->lpszClassName );
|
||||||
class->lpszClassName = MAKE_SEGPTR(name);
|
class->lpszClassName = SEGPTR_GET(name);
|
||||||
class->hCursor = LoadCursor( 0, IDC_ARROW );
|
class->hCursor = LoadCursor( 0, IDC_ARROW );
|
||||||
class->lpfnWndProc = MODULE_GetWndProcEntry16( (char *)class->lpfnWndProc );
|
class->lpfnWndProc = MODULE_GetWndProcEntry16( (char *)class->lpfnWndProc );
|
||||||
if (!RegisterClass16( class )) return FALSE;
|
if (!RegisterClass16( class )) return FALSE;
|
||||||
}
|
}
|
||||||
|
SEGPTR_FREE(name);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -474,3 +474,28 @@ WORD GetDriveType( INT drive )
|
||||||
default: return DRIVE_CANNOTDETERMINE;
|
default: return DRIVE_CANNOTDETERMINE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GetCurrentDirectory (KERNEL.411)
|
||||||
|
*/
|
||||||
|
UINT32 GetCurrentDirectory( UINT32 buflen, LPSTR buf )
|
||||||
|
{
|
||||||
|
const char *s = DRIVE_GetDosCwd( DRIVE_GetCurrentDrive() );
|
||||||
|
if (!s)
|
||||||
|
{
|
||||||
|
*buf = '\0';
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
lstrcpyn( buf, s, buflen );
|
||||||
|
return strlen(s); /* yes */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SetCurrentDirectory (KERNEL.412)
|
||||||
|
*/
|
||||||
|
BOOL32 SetCurrentDirectory( LPCSTR dir )
|
||||||
|
{
|
||||||
|
return DRIVE_Chdir( DRIVE_GetCurrentDrive(), dir );
|
||||||
|
}
|
||||||
|
|
|
@ -50,8 +50,7 @@ SPEC_FILES = $(DLLS:.spec=.S)
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
callback.c \
|
callback.c \
|
||||||
dummy.c \
|
dummy.c \
|
||||||
relay.c \
|
relay.c
|
||||||
relay32.c
|
|
||||||
|
|
||||||
ASM_SRCS = \
|
ASM_SRCS = \
|
||||||
$(SPEC_FILES) \
|
$(SPEC_FILES) \
|
||||||
|
|
|
@ -128,40 +128,40 @@ base 1
|
||||||
0123 stub QueryServiceStatus
|
0123 stub QueryServiceStatus
|
||||||
0124 stub ReadEventLogA
|
0124 stub ReadEventLogA
|
||||||
0125 stub ReadEventLogW
|
0125 stub ReadEventLogW
|
||||||
0126 stdcall RegCloseKey(long) RegCloseKey
|
0126 stdcall RegCloseKey(long) RegCloseKey
|
||||||
0127 stub RegConnectRegistryA
|
0127 stub RegConnectRegistryA
|
||||||
0128 stub RegConnectRegistryW
|
0128 stub RegConnectRegistryW
|
||||||
0129 stdcall RegCreateKeyA(long ptr ptr) RegCreateKeyA
|
0129 stdcall RegCreateKeyA(long ptr ptr) RegCreateKey32A
|
||||||
0130 stdcall RegCreateKeyExA(long ptr long ptr long long ptr ptr ptr) RegCreateKeyExA
|
0130 stdcall RegCreateKeyExA(long ptr long ptr long long ptr ptr ptr) RegCreateKeyEx32A
|
||||||
0131 stdcall RegCreateKeyExW(long ptr long ptr long long ptr ptr ptr) RegCreateKeyExW
|
0131 stdcall RegCreateKeyExW(long ptr long ptr long long ptr ptr ptr) RegCreateKeyEx32W
|
||||||
0132 stdcall RegCreateKeyW(long ptr ptr) RegCreateKeyW
|
0132 stdcall RegCreateKeyW(long ptr ptr) RegCreateKey32W
|
||||||
0133 stdcall RegDeleteKeyA(long ptr) RegDeleteKeyA
|
0133 stdcall RegDeleteKeyA(long ptr) RegDeleteKey32A
|
||||||
0134 stdcall RegDeleteKeyW(long ptr) RegDeleteKeyW
|
0134 stdcall RegDeleteKeyW(long ptr) RegDeleteKey32W
|
||||||
0135 stdcall RegDeleteValueA(long ptr) RegDeleteValueA
|
0135 stdcall RegDeleteValueA(long ptr) RegDeleteValue32A
|
||||||
0136 stdcall RegDeleteValueW(long ptr) RegDeleteValueW
|
0136 stdcall RegDeleteValueW(long ptr) RegDeleteValue32W
|
||||||
0137 stdcall RegEnumKeyA(long long ptr long) RegEnumKeyA
|
0137 stdcall RegEnumKeyA(long long ptr long) RegEnumKey32A
|
||||||
0138 stdcall RegEnumKeyExA(long long ptr ptr ptr ptr ptr ptr) RegEnumKeyExA
|
0138 stdcall RegEnumKeyExA(long long ptr ptr ptr ptr ptr ptr) RegEnumKeyEx32A
|
||||||
0139 stdcall RegEnumKeyExW(long long ptr ptr ptr ptr ptr ptr) RegEnumKeyExW
|
0139 stdcall RegEnumKeyExW(long long ptr ptr ptr ptr ptr ptr) RegEnumKeyEx32W
|
||||||
0140 stdcall RegEnumKeyW(long long ptr long) RegEnumKeyW
|
0140 stdcall RegEnumKeyW(long long ptr long) RegEnumKey32W
|
||||||
0141 stdcall RegEnumValueA(long long ptr ptr ptr ptr ptr ptr) RegEnumValueA
|
0141 stdcall RegEnumValueA(long long ptr ptr ptr ptr ptr ptr) RegEnumValue32A
|
||||||
0142 stdcall RegEnumValueW(long long ptr ptr ptr ptr ptr ptr) RegEnumValueW
|
0142 stdcall RegEnumValueW(long long ptr ptr ptr ptr ptr ptr) RegEnumValue32W
|
||||||
0143 stdcall RegFlushKey(long) RegFlushKey
|
0143 stdcall RegFlushKey(long) RegFlushKey
|
||||||
0144 stub RegGetKeySecurity
|
0144 stub RegGetKeySecurity
|
||||||
0145 stub RegLoadKeyA
|
0145 stub RegLoadKeyA
|
||||||
0146 stub RegLoadKeyW
|
0146 stub RegLoadKeyW
|
||||||
0147 stub RegNotifyChangeKeyValue
|
0147 stub RegNotifyChangeKeyValue
|
||||||
0148 stdcall RegOpenKeyA(long ptr ptr) RegOpenKeyA
|
0148 stdcall RegOpenKeyA(long ptr ptr) RegOpenKey32A
|
||||||
0149 stdcall RegOpenKeyExA(long ptr long long ptr) RegOpenKeyExA
|
0149 stdcall RegOpenKeyExA(long ptr long long ptr) RegOpenKeyEx32A
|
||||||
0150 stdcall RegOpenKeyExW(long ptr long long ptr) RegOpenKeyExW
|
0150 stdcall RegOpenKeyExW(long ptr long long ptr) RegOpenKeyEx32W
|
||||||
0151 stdcall RegOpenKeyW(long ptr ptr) RegOpenKeyW
|
0151 stdcall RegOpenKeyW(long ptr ptr) RegOpenKey32W
|
||||||
0152 stdcall RegQueryInfoKeyA(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) RegQueryInfoKeyA
|
0152 stdcall RegQueryInfoKeyA(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) RegQueryInfoKey32A
|
||||||
0153 stdcall RegQueryInfoKeyW(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) RegQueryInfoKeyW
|
0153 stdcall RegQueryInfoKeyW(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) RegQueryInfoKey32W
|
||||||
0154 stub RegQueryMultipleValuesA
|
0154 stub RegQueryMultipleValuesA
|
||||||
0155 stub RegQueryMultipleValuesW
|
0155 stub RegQueryMultipleValuesW
|
||||||
0156 stdcall RegQueryValueA(long ptr ptr ptr) RegQueryValueA
|
0156 stdcall RegQueryValueA(long ptr ptr ptr) RegQueryValue32A
|
||||||
0157 stdcall RegQueryValueExA(long ptr ptr ptr ptr ptr) RegQueryValueExA
|
0157 stdcall RegQueryValueExA(long ptr ptr ptr ptr ptr) RegQueryValueEx32A
|
||||||
0158 stdcall RegQueryValueExW(long ptr ptr ptr ptr ptr) RegQueryValueExW
|
0158 stdcall RegQueryValueExW(long ptr ptr ptr ptr ptr) RegQueryValueEx32W
|
||||||
0159 stdcall RegQueryValueW(long ptr ptr ptr) RegQueryValueW
|
0159 stdcall RegQueryValueW(long ptr ptr ptr) RegQueryValue32W
|
||||||
0160 stub RegRemapPreDefKey
|
0160 stub RegRemapPreDefKey
|
||||||
0161 stub RegReplaceKeyA
|
0161 stub RegReplaceKeyA
|
||||||
0162 stub RegReplaceKeyW
|
0162 stub RegReplaceKeyW
|
||||||
|
@ -170,10 +170,10 @@ base 1
|
||||||
0165 stub RegSaveKeyA
|
0165 stub RegSaveKeyA
|
||||||
0166 stub RegSaveKeyW
|
0166 stub RegSaveKeyW
|
||||||
0167 stub RegSetKeySecurity
|
0167 stub RegSetKeySecurity
|
||||||
0168 stdcall RegSetValueA(long ptr long ptr long) RegSetValueA
|
0168 stdcall RegSetValueA(long ptr long ptr long) RegSetValue32A
|
||||||
0169 stdcall RegSetValueExA(long ptr long long ptr long) RegSetValueExA
|
0169 stdcall RegSetValueExA(long ptr long long ptr long) RegSetValueEx32A
|
||||||
0170 stdcall RegSetValueExW(long ptr long long ptr long) RegSetValueExW
|
0170 stdcall RegSetValueExW(long ptr long long ptr long) RegSetValueEx32W
|
||||||
0171 stdcall RegSetValueW(long ptr long ptr long) RegSetValueW
|
0171 stdcall RegSetValueW(long ptr long ptr long) RegSetValue32W
|
||||||
0172 stub RegUnLoadKeyA
|
0172 stub RegUnLoadKeyA
|
||||||
0173 stub RegUnLoadKeyW
|
0173 stub RegUnLoadKeyW
|
||||||
0174 stub RegisterEventSourceA
|
0174 stub RegisterEventSourceA
|
||||||
|
@ -202,4 +202,3 @@ base 1
|
||||||
0197 stub StartServiceCtrlDispatcherW
|
0197 stub StartServiceCtrlDispatcherW
|
||||||
0198 stub StartServiceW
|
0198 stub StartServiceW
|
||||||
0199 stub UnlockServiceDatabase
|
0199 stub UnlockServiceDatabase
|
||||||
|
|
||||||
|
|
|
@ -9,39 +9,10 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include "callback.h"
|
#include "callback.h"
|
||||||
#include "stackframe.h"
|
#include "stackframe.h"
|
||||||
#include "win.h"
|
|
||||||
#include "alias.h"
|
|
||||||
#include "relay32.h"
|
|
||||||
#include "stddebug.h"
|
#include "stddebug.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
* CallWindowProc (USER.122)
|
|
||||||
*/
|
|
||||||
LONG CallWindowProc( WNDPROC func, HWND hwnd, WORD message,
|
|
||||||
WORD wParam, LONG lParam )
|
|
||||||
{
|
|
||||||
FUNCTIONALIAS *a;
|
|
||||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
|
||||||
|
|
||||||
if (!wndPtr) return 0;
|
|
||||||
|
|
||||||
/* check if we have something better than 16 bit relays */
|
|
||||||
if(!ALIAS_UseAliases || !(a=ALIAS_LookupAlias((DWORD)func)) ||
|
|
||||||
(!a->wine && !a->win32))
|
|
||||||
return CallWndProc( (FARPROC)func, wndPtr->hInstance,
|
|
||||||
hwnd, message, wParam, lParam );
|
|
||||||
if(a->wine)
|
|
||||||
return ((LONG(*)(WORD,WORD,WORD,LONG))(a->wine))
|
|
||||||
(hwnd,message,wParam,lParam);
|
|
||||||
if(!a->win32)
|
|
||||||
fprintf(stderr,"Where is the Win32 callback?\n");
|
|
||||||
if (UsesLParamPtr(message))
|
|
||||||
return RELAY32_CallWindowProcConvStruct(a->win32,hwnd,message,wParam,lParam);
|
|
||||||
return CallWndProc32( (FARPROC)a->win32, hwnd, message, wParam, lParam );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Catch (KERNEL.55)
|
* Catch (KERNEL.55)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -38,13 +38,13 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
||||||
30 pascal16 SaveDC(word) SaveDC
|
30 pascal16 SaveDC(word) SaveDC
|
||||||
31 pascal SetPixel(word s_word s_word long) SetPixel
|
31 pascal SetPixel(word s_word s_word long) SetPixel
|
||||||
32 pascal16 OffsetClipRgn(word s_word s_word) OffsetClipRgn
|
32 pascal16 OffsetClipRgn(word s_word s_word) OffsetClipRgn
|
||||||
33 pascal16 TextOut(word s_word s_word ptr word) TextOut
|
33 pascal16 TextOut(word s_word s_word ptr word) TextOut16
|
||||||
34 pascal16 BitBlt( word s_word s_word s_word s_word word s_word s_word long)
|
34 pascal16 BitBlt( word s_word s_word s_word s_word word s_word s_word long)
|
||||||
BitBlt
|
BitBlt
|
||||||
35 pascal16 StretchBlt(word s_word s_word s_word s_word word s_word s_word
|
35 pascal16 StretchBlt(word s_word s_word s_word s_word word s_word s_word
|
||||||
s_word s_word long) StretchBlt
|
s_word s_word long) StretchBlt
|
||||||
36 pascal16 Polygon (word ptr word) Polygon
|
36 pascal16 Polygon (word ptr word) Polygon16
|
||||||
37 pascal16 Polyline (word ptr word) Polyline
|
37 pascal16 Polyline (word ptr word) Polyline16
|
||||||
38 pascal Escape(word word word ptr ptr) Escape
|
38 pascal Escape(word word word ptr ptr) Escape
|
||||||
39 pascal16 RestoreDC(word s_word) RestoreDC
|
39 pascal16 RestoreDC(word s_word) RestoreDC
|
||||||
40 pascal16 FillRgn(word word word) FillRgn
|
40 pascal16 FillRgn(word word word) FillRgn
|
||||||
|
@ -54,7 +54,7 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
||||||
44 pascal16 SelectClipRgn(word word) SelectClipRgn
|
44 pascal16 SelectClipRgn(word word) SelectClipRgn
|
||||||
45 pascal16 SelectObject(word word) SelectObject
|
45 pascal16 SelectObject(word word) SelectObject
|
||||||
#46 pascal __GP?
|
#46 pascal __GP?
|
||||||
47 pascal16 CombineRgn(word word word word) CombineRgn
|
47 pascal16 CombineRgn(word word word s_word) CombineRgn
|
||||||
48 pascal16 CreateBitmap(word word word word ptr) CreateBitmap
|
48 pascal16 CreateBitmap(word word word word ptr) CreateBitmap
|
||||||
49 pascal16 CreateBitmapIndirect(ptr) CreateBitmapIndirect
|
49 pascal16 CreateBitmapIndirect(ptr) CreateBitmapIndirect
|
||||||
50 pascal16 CreateBrushIndirect(ptr) CreateBrushIndirect
|
50 pascal16 CreateBrushIndirect(ptr) CreateBrushIndirect
|
||||||
|
@ -62,7 +62,7 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
||||||
52 pascal16 CreateCompatibleDC(word) CreateCompatibleDC
|
52 pascal16 CreateCompatibleDC(word) CreateCompatibleDC
|
||||||
53 pascal16 CreateDC(ptr ptr ptr ptr) CreateDC
|
53 pascal16 CreateDC(ptr ptr ptr ptr) CreateDC
|
||||||
54 pascal16 CreateEllipticRgn(s_word s_word s_word s_word) CreateEllipticRgn
|
54 pascal16 CreateEllipticRgn(s_word s_word s_word s_word) CreateEllipticRgn
|
||||||
55 pascal16 CreateEllipticRgnIndirect(ptr) CreateEllipticRgnIndirect
|
55 pascal16 CreateEllipticRgnIndirect(ptr) CreateEllipticRgnIndirect16
|
||||||
56 pascal16 CreateFont(s_word s_word s_word s_word s_word word word word
|
56 pascal16 CreateFont(s_word s_word s_word s_word s_word word word word
|
||||||
word word word word word ptr) CreateFont
|
word word word word word ptr) CreateFont
|
||||||
57 pascal16 CreateFontIndirect(ptr) CreateFontIndirect
|
57 pascal16 CreateFontIndirect(ptr) CreateFontIndirect
|
||||||
|
@ -70,11 +70,11 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
||||||
60 pascal16 CreatePatternBrush(word) CreatePatternBrush
|
60 pascal16 CreatePatternBrush(word) CreatePatternBrush
|
||||||
61 pascal16 CreatePen(s_word s_word long) CreatePen
|
61 pascal16 CreatePen(s_word s_word long) CreatePen
|
||||||
62 pascal16 CreatePenIndirect(ptr) CreatePenIndirect
|
62 pascal16 CreatePenIndirect(ptr) CreatePenIndirect
|
||||||
63 pascal16 CreatePolygonRgn(ptr word word) CreatePolygonRgn
|
63 pascal16 CreatePolygonRgn(ptr word word) CreatePolygonRgn16
|
||||||
64 pascal16 CreateRectRgn(s_word s_word s_word s_word) CreateRectRgn
|
64 pascal16 CreateRectRgn(s_word s_word s_word s_word) CreateRectRgn
|
||||||
65 pascal16 CreateRectRgnIndirect(ptr) CreateRectRgnIndirect
|
65 pascal16 CreateRectRgnIndirect(ptr) CreateRectRgnIndirect16
|
||||||
66 pascal16 CreateSolidBrush(long) CreateSolidBrush
|
66 pascal16 CreateSolidBrush(long) CreateSolidBrush
|
||||||
67 pascal16 DPtoLP(word ptr s_word) DPtoLP
|
67 pascal16 DPtoLP(word ptr s_word) DPtoLP16
|
||||||
68 pascal16 DeleteDC(word) DeleteDC
|
68 pascal16 DeleteDC(word) DeleteDC
|
||||||
69 pascal16 DeleteObject(word) DeleteObject
|
69 pascal16 DeleteObject(word) DeleteObject
|
||||||
70 pascal16 EnumFonts(word ptr segptr long) EnumFonts
|
70 pascal16 EnumFonts(word ptr segptr long) EnumFonts
|
||||||
|
@ -84,7 +84,7 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
||||||
74 pascal GetBitmapBits(word long ptr) GetBitmapBits
|
74 pascal GetBitmapBits(word long ptr) GetBitmapBits
|
||||||
75 pascal GetBkColor(word) GetBkColor
|
75 pascal GetBkColor(word) GetBkColor
|
||||||
76 pascal16 GetBkMode(word) GetBkMode
|
76 pascal16 GetBkMode(word) GetBkMode
|
||||||
77 pascal16 GetClipBox(word ptr) GetClipBox
|
77 pascal16 GetClipBox(word ptr) GetClipBox16
|
||||||
78 pascal GetCurrentPosition(word) GetCurrentPosition
|
78 pascal GetCurrentPosition(word) GetCurrentPosition
|
||||||
79 pascal GetDCOrg(word) GetDCOrg
|
79 pascal GetDCOrg(word) GetDCOrg
|
||||||
80 pascal16 GetDeviceCaps(word s_word) GetDeviceCaps
|
80 pascal16 GetDeviceCaps(word s_word) GetDeviceCaps
|
||||||
|
@ -107,12 +107,12 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
||||||
97 pascal GetWindowOrg(word) GetWindowOrg
|
97 pascal GetWindowOrg(word) GetWindowOrg
|
||||||
98 pascal16 IntersectVisRect(word s_word s_word s_word s_word)
|
98 pascal16 IntersectVisRect(word s_word s_word s_word s_word)
|
||||||
IntersectVisRect
|
IntersectVisRect
|
||||||
99 pascal16 LPtoDP(word ptr s_word) LPtoDP
|
99 pascal16 LPtoDP(word ptr s_word) LPtoDP16
|
||||||
100 pascal16 LineDDA(s_word s_word s_word s_word segptr long) LineDDA
|
100 pascal16 LineDDA(s_word s_word s_word s_word segptr long) LineDDA
|
||||||
101 pascal16 OffsetRgn(word s_word s_word) OffsetRgn
|
101 pascal16 OffsetRgn(word s_word s_word) OffsetRgn
|
||||||
102 pascal16 OffsetVisRgn(word s_word s_word) OffsetVisRgn
|
102 pascal16 OffsetVisRgn(word s_word s_word) OffsetVisRgn
|
||||||
103 pascal16 PtVisible(word s_word s_word) PtVisible
|
103 pascal16 PtVisible(word s_word s_word) PtVisible
|
||||||
104 pascal16 RectVisibleOld(word ptr) RectVisible
|
104 pascal16 RectVisibleOld(word ptr) RectVisible16
|
||||||
105 pascal16 SelectVisRgn(word word) SelectVisRgn
|
105 pascal16 SelectVisRgn(word word) SelectVisRgn
|
||||||
106 pascal SetBitmapBits(word long ptr) SetBitmapBits
|
106 pascal SetBitmapBits(word long ptr) SetBitmapBits
|
||||||
117 pascal SetDCOrg(word s_word s_word) SetDCOrg
|
117 pascal SetDCOrg(word s_word s_word) SetDCOrg
|
||||||
|
@ -130,7 +130,7 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
||||||
131 pascal16 InquireVisRgn(word) InquireVisRgn
|
131 pascal16 InquireVisRgn(word) InquireVisRgn
|
||||||
132 pascal16 SetEnvironment(ptr ptr word) SetEnvironment
|
132 pascal16 SetEnvironment(ptr ptr word) SetEnvironment
|
||||||
133 pascal16 GetEnvironment(ptr ptr word) GetEnvironment
|
133 pascal16 GetEnvironment(ptr ptr word) GetEnvironment
|
||||||
134 pascal16 GetRgnBox(word ptr) GetRgnBox
|
134 pascal16 GetRgnBox(word ptr) GetRgnBox16
|
||||||
#135 pascal ScanLr
|
#135 pascal ScanLr
|
||||||
136 pascal16 RemoveFontResource(ptr) RemoveFontResource
|
136 pascal16 RemoveFontResource(ptr) RemoveFontResource
|
||||||
148 pascal SetBrushOrg(word s_word s_word) SetBrushOrg
|
148 pascal SetBrushOrg(word s_word s_word) SetBrushOrg
|
||||||
|
@ -144,8 +144,8 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
||||||
159 pascal16 GetMetaFileBits(word) GetMetaFileBits
|
159 pascal16 GetMetaFileBits(word) GetMetaFileBits
|
||||||
160 pascal16 SetMetaFileBits(word) SetMetaFileBits
|
160 pascal16 SetMetaFileBits(word) SetMetaFileBits
|
||||||
161 pascal16 PtInRegion(word s_word s_word) PtInRegion
|
161 pascal16 PtInRegion(word s_word s_word) PtInRegion
|
||||||
162 pascal GetBitmapDimension(word) GetBitmapDimension
|
162 pascal GetBitmapDimension(word) GetBitmapDimension
|
||||||
163 pascal SetBitmapDimension(word s_word s_word) SetBitmapDimension
|
163 pascal SetBitmapDimension(word s_word s_word) SetBitmapDimension
|
||||||
169 stub IsDCDirty
|
169 stub IsDCDirty
|
||||||
170 stub SetDCStatus
|
170 stub SetDCStatus
|
||||||
172 pascal16 SetRectRgn(word s_word s_word s_word s_word) SetRectRgn
|
172 pascal16 SetRectRgn(word s_word s_word s_word s_word) SetRectRgn
|
||||||
|
@ -154,7 +154,7 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
||||||
176 pascal16 PlayMetaFileRecord(word ptr ptr word) PlayMetaFileRecord
|
176 pascal16 PlayMetaFileRecord(word ptr ptr word) PlayMetaFileRecord
|
||||||
179 pascal16 GetDCState(word) GetDCState
|
179 pascal16 GetDCState(word) GetDCState
|
||||||
180 pascal16 SetDCState(word word) SetDCState
|
180 pascal16 SetDCState(word word) SetDCState
|
||||||
181 pascal16 RectInRegionOld(word ptr) RectInRegion
|
181 pascal16 RectInRegionOld(word ptr) RectInRegion16
|
||||||
188 stub GetTextExtentEx
|
188 stub GetTextExtentEx
|
||||||
190 stub SetDCHook
|
190 stub SetDCHook
|
||||||
191 stub GetDCHook
|
191 stub GetDCHook
|
||||||
|
@ -235,7 +235,7 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
||||||
s_word s_word) Chord
|
s_word s_word) Chord
|
||||||
349 pascal SetMapperFlags(word long) SetMapperFlags
|
349 pascal SetMapperFlags(word long) SetMapperFlags
|
||||||
350 pascal16 GetCharWidth(word word word ptr) GetCharWidth
|
350 pascal16 GetCharWidth(word word word ptr) GetCharWidth
|
||||||
351 pascal16 ExtTextOut(word s_word s_word word ptr ptr s_word ptr) ExtTextOut
|
351 pascal16 ExtTextOut(word s_word s_word word ptr ptr s_word ptr) ExtTextOut16
|
||||||
352 stub GetPhysicalFontHandle
|
352 stub GetPhysicalFontHandle
|
||||||
353 stub GetAspectRatioFilter
|
353 stub GetAspectRatioFilter
|
||||||
354 stub ShrinkGDIHeap
|
354 stub ShrinkGDIHeap
|
||||||
|
@ -283,37 +283,37 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
||||||
CreateRoundRectRgn
|
CreateRoundRectRgn
|
||||||
445 pascal16 CreateDIBPatternBrush(word word) CreateDIBPatternBrush
|
445 pascal16 CreateDIBPatternBrush(word word) CreateDIBPatternBrush
|
||||||
449 stub DEVICECOLORMATCH
|
449 stub DEVICECOLORMATCH
|
||||||
450 pascal16 PolyPolygon(word ptr ptr word) PolyPolygon
|
450 pascal16 PolyPolygon(word ptr ptr word) PolyPolygon16
|
||||||
451 pascal16 CreatePolyPolygonRgn(ptr ptr word word) CreatePolyPolygonRgn
|
451 pascal16 CreatePolyPolygonRgn(ptr ptr word word) CreatePolyPolygonRgn16
|
||||||
452 stub GDISEEGDIDO
|
452 stub GDISEEGDIDO
|
||||||
460 stub GDITASKTERMINATION
|
460 stub GDITASKTERMINATION
|
||||||
461 return SetObjectOwner 4 0
|
461 return SetObjectOwner 4 0
|
||||||
462 pascal16 IsGDIObject(word) IsGDIObject
|
462 pascal16 IsGDIObject(word) IsGDIObject
|
||||||
463 stub MAKEOBJECTPRIVATE
|
463 stub MAKEOBJECTPRIVATE
|
||||||
464 stub FIXUPBOGUSPUBLISHERMETAFILE
|
464 stub FIXUPBOGUSPUBLISHERMETAFILE
|
||||||
465 pascal16 RectVisible(word ptr) RectVisible
|
465 pascal16 RectVisible(word ptr) RectVisible16
|
||||||
466 pascal16 RectInRegion(word ptr) RectInRegion
|
466 pascal16 RectInRegion(word ptr) RectInRegion16
|
||||||
467 stub UNICODETOANSI
|
467 stub UNICODETOANSI
|
||||||
468 pascal16 GetBitmapDimensionEx(word ptr) GetBitmapDimensionEx
|
468 pascal16 GetBitmapDimensionEx(word ptr) GetBitmapDimensionEx16
|
||||||
469 pascal16 GetBrushOrgEx(word ptr) GetBrushOrgEx
|
469 pascal16 GetBrushOrgEx(word ptr) GetBrushOrgEx16
|
||||||
470 pascal16 GetCurrentPositionEx(word ptr) GetCurrentPositionEx
|
470 pascal16 GetCurrentPositionEx(word ptr) GetCurrentPositionEx16
|
||||||
471 pascal16 GetTextExtentPoint(word ptr s_word ptr) GetTextExtentPoint
|
471 pascal16 GetTextExtentPoint(word ptr s_word ptr) GetTextExtentPoint16
|
||||||
472 pascal16 GetViewportExtEx(word ptr) GetViewportExtEx
|
472 pascal16 GetViewportExtEx(word ptr) GetViewportExtEx16
|
||||||
473 pascal16 GetViewportOrgEx(word ptr) GetViewportOrgEx
|
473 pascal16 GetViewportOrgEx(word ptr) GetViewportOrgEx16
|
||||||
474 pascal16 GetWindowExtEx(word ptr) GetWindowExtEx
|
474 pascal16 GetWindowExtEx(word ptr) GetWindowExtEx16
|
||||||
475 pascal16 GetWindowOrgEx(word ptr) GetWindowOrgEx
|
475 pascal16 GetWindowOrgEx(word ptr) GetWindowOrgEx16
|
||||||
476 pascal16 OffsetViewportOrgEx(word s_word s_word ptr) OffsetViewportOrgEx
|
476 pascal16 OffsetViewportOrgEx(word s_word s_word ptr) OffsetViewportOrgEx16
|
||||||
477 pascal16 OffsetWindowOrgEx(word s_word s_word ptr) OffsetWindowOrgEx
|
477 pascal16 OffsetWindowOrgEx(word s_word s_word ptr) OffsetWindowOrgEx16
|
||||||
478 pascal16 SetBitmapDimensionEx(word s_word s_word ptr) SetBitmapDimensionEx
|
478 pascal16 SetBitmapDimensionEx(word s_word s_word ptr) SetBitmapDimensionEx16
|
||||||
479 pascal16 SetViewportExtEx(word s_word s_word ptr) SetViewportExtEx
|
479 pascal16 SetViewportExtEx(word s_word s_word ptr) SetViewportExtEx16
|
||||||
480 pascal16 SetViewportOrgEx(word s_word s_word ptr) SetViewportOrgEx
|
480 pascal16 SetViewportOrgEx(word s_word s_word ptr) SetViewportOrgEx16
|
||||||
481 pascal16 SetWindowExtEx(word s_word s_word ptr) SetWindowExtEx
|
481 pascal16 SetWindowExtEx(word s_word s_word ptr) SetWindowExtEx16
|
||||||
482 pascal16 SetWindowOrgEx(word s_word s_word ptr) SetWindowOrgEx
|
482 pascal16 SetWindowOrgEx(word s_word s_word ptr) SetWindowOrgEx16
|
||||||
483 pascal16 MoveToEx(word s_word s_word ptr) MoveToEx
|
483 pascal16 MoveToEx(word s_word s_word ptr) MoveToEx16
|
||||||
484 pascal16 ScaleViewportExtEx(word s_word s_word s_word s_word ptr)
|
484 pascal16 ScaleViewportExtEx(word s_word s_word s_word s_word ptr)
|
||||||
ScaleViewportExtEx
|
ScaleViewportExtEx16
|
||||||
485 pascal16 ScaleWindowExtEx(word s_word s_word s_word s_word ptr)
|
485 pascal16 ScaleWindowExtEx(word s_word s_word s_word s_word ptr)
|
||||||
ScaleWindowExtEx
|
ScaleWindowExtEx16
|
||||||
486 stub GETASPECTRATIOFILTEREX
|
486 stub GETASPECTRATIOFILTEREX
|
||||||
489 stub CreateDIBSection
|
489 stub CreateDIBSection
|
||||||
490 stub CloseEnhMetafile
|
490 stub CloseEnhMetafile
|
||||||
|
|
|
@ -41,8 +41,8 @@ base 1
|
||||||
0036 stub CreateDIBSection
|
0036 stub CreateDIBSection
|
||||||
0037 stub CreateDIBitmap
|
0037 stub CreateDIBitmap
|
||||||
0038 stub CreateDiscardableBitmap
|
0038 stub CreateDiscardableBitmap
|
||||||
0039 stub CreateEllipticRgn
|
0039 stdcall CreateEllipticRgn(long long long long) CreateEllipticRgn
|
||||||
0040 stub CreateEllipticRgnIndirect
|
0040 stdcall CreateEllipticRgnIndirect(ptr) CreateEllipticRgnIndirect32
|
||||||
0041 stub CreateEnhMetaFileA
|
0041 stub CreateEnhMetaFileA
|
||||||
0042 stub CreateEnhMetaFileW
|
0042 stub CreateEnhMetaFileW
|
||||||
0043 stub CreateFontA
|
0043 stub CreateFontA
|
||||||
|
@ -62,12 +62,12 @@ base 1
|
||||||
0057 stub CreatePolyPolygonRgn
|
0057 stub CreatePolyPolygonRgn
|
||||||
0058 stub CreatePolygonRgn
|
0058 stub CreatePolygonRgn
|
||||||
0059 stdcall CreateRectRgn(long long long long) CreateRectRgn
|
0059 stdcall CreateRectRgn(long long long long) CreateRectRgn
|
||||||
0060 stub CreateRectRgnIndirect
|
0060 stdcall CreateRectRgnIndirect(ptr) CreateRectRgnIndirect32
|
||||||
0061 stub CreateRoundRectRgn
|
0061 stdcall CreateRoundRectRgn(long long long long long long) CreateRoundRectRgn
|
||||||
0062 stub CreateScalableFontResourceA
|
0062 stub CreateScalableFontResourceA
|
||||||
0063 stub CreateScalableFontResourceW
|
0063 stub CreateScalableFontResourceW
|
||||||
0064 stdcall CreateSolidBrush(long) CreateSolidBrush
|
0064 stdcall CreateSolidBrush(long) CreateSolidBrush
|
||||||
0065 stub DPtoLP
|
0065 stdcall DPtoLP(long ptr long) DPtoLP32
|
||||||
0066 stub DeleteColorSpace
|
0066 stub DeleteColorSpace
|
||||||
0067 stdcall DeleteDC(long) DeleteDC
|
0067 stdcall DeleteDC(long) DeleteDC
|
||||||
0068 stub DeleteEnhMetaFile
|
0068 stub DeleteEnhMetaFile
|
||||||
|
@ -92,7 +92,7 @@ base 1
|
||||||
0087 stub EnumICMProfilesW
|
0087 stub EnumICMProfilesW
|
||||||
0088 stub EnumMetaFile
|
0088 stub EnumMetaFile
|
||||||
0089 stub EnumObjects
|
0089 stub EnumObjects
|
||||||
0090 stub EqualRgn
|
0090 stdcall EqualRgn(long long) EqualRgn
|
||||||
0091 stub Escape
|
0091 stub Escape
|
||||||
0092 stub ExcludeClipRect
|
0092 stub ExcludeClipRect
|
||||||
0093 stub ExtCreatePen
|
0093 stub ExtCreatePen
|
||||||
|
@ -100,8 +100,8 @@ base 1
|
||||||
0095 stub ExtEscape
|
0095 stub ExtEscape
|
||||||
0096 stub ExtFloodFill
|
0096 stub ExtFloodFill
|
||||||
0097 stub ExtSelectClipRgn
|
0097 stub ExtSelectClipRgn
|
||||||
0098 stub ExtTextOutA
|
0098 stdcall ExtTextOutA(long long long long ptr ptr long ptr) ExtTextOut32A
|
||||||
0099 stub ExtTextOutW
|
0099 stdcall ExtTextOutW(long long long long ptr ptr long ptr) ExtTextOut32W
|
||||||
0100 stub FillPath
|
0100 stub FillPath
|
||||||
0101 stub FillRgn
|
0101 stub FillRgn
|
||||||
0102 stub FixBrushOrgEx
|
0102 stub FixBrushOrgEx
|
||||||
|
@ -146,7 +146,7 @@ base 1
|
||||||
0141 stub GetArcDirection
|
0141 stub GetArcDirection
|
||||||
0142 stub GetAspectRatioFilterEx
|
0142 stub GetAspectRatioFilterEx
|
||||||
0143 stub GetBitmapBits
|
0143 stub GetBitmapBits
|
||||||
0144 stub GetBitmapDimensionEx
|
0144 stdcall GetBitmapDimensionEx(long ptr) GetBitmapDimensionEx32
|
||||||
0145 stub GetBkColor
|
0145 stub GetBkColor
|
||||||
0146 stub GetBkMode
|
0146 stub GetBkMode
|
||||||
0147 stub GetBoundsRect
|
0147 stub GetBoundsRect
|
||||||
|
@ -164,7 +164,7 @@ base 1
|
||||||
0159 stub GetCharWidthWOW
|
0159 stub GetCharWidthWOW
|
||||||
0160 stub GetCharacterPlacementA
|
0160 stub GetCharacterPlacementA
|
||||||
0161 stub GetCharacterPlacementW
|
0161 stub GetCharacterPlacementW
|
||||||
0162 stub GetClipBox
|
0162 stdcall GetClipBox(long ptr) GetClipBox32
|
||||||
0163 stub GetClipRgn
|
0163 stub GetClipRgn
|
||||||
0164 stub GetColorAdjustment
|
0164 stub GetColorAdjustment
|
||||||
0165 stub GetColorSpace
|
0165 stub GetColorSpace
|
||||||
|
@ -221,8 +221,8 @@ base 1
|
||||||
0216 stub GetRasterizerCaps
|
0216 stub GetRasterizerCaps
|
||||||
0217 stub GetRegionData
|
0217 stub GetRegionData
|
||||||
0218 stub GetRelAbs
|
0218 stub GetRelAbs
|
||||||
0219 stub GetRgnBox
|
0219 stdcall GetRgnBox(long ptr) GetRgnBox32
|
||||||
0220 stdcall GetStockObject(long) GetStockObject
|
0220 stdcall GetStockObject(long) GetStockObject
|
||||||
0221 stub GetStretchBltMode
|
0221 stub GetStretchBltMode
|
||||||
0222 stub GetSystemPaletteEntries
|
0222 stub GetSystemPaletteEntries
|
||||||
0223 stub GetSystemPaletteUse
|
0223 stub GetSystemPaletteUse
|
||||||
|
@ -234,8 +234,8 @@ base 1
|
||||||
0229 stub GetTextExtentExPointW
|
0229 stub GetTextExtentExPointW
|
||||||
0230 stub GetTextExtentPoint32A
|
0230 stub GetTextExtentPoint32A
|
||||||
0231 stub GetTextExtentPoint32W
|
0231 stub GetTextExtentPoint32W
|
||||||
0232 stdcall GetTextExtentPointA(long ptr long ptr) WIN32_GetTextExtentPointA
|
0232 stdcall GetTextExtentPointA(long ptr long ptr) GetTextExtentPoint32A
|
||||||
0233 stub GetTextExtentPointW
|
0233 stdcall GetTextExtentPointW(long ptr long ptr) GetTextExtentPoint32W
|
||||||
0234 stub GetTextFaceA
|
0234 stub GetTextFaceA
|
||||||
0235 stub GetTextFaceW
|
0235 stub GetTextFaceW
|
||||||
0236 stub GetTextMetricsA
|
0236 stub GetTextMetricsA
|
||||||
|
@ -249,18 +249,18 @@ base 1
|
||||||
0244 stub GetWorldTransform
|
0244 stub GetWorldTransform
|
||||||
0245 stub IntersectClipRect
|
0245 stub IntersectClipRect
|
||||||
0246 stub InvertRgn
|
0246 stub InvertRgn
|
||||||
0247 stub LPtoDP
|
0247 stdcall LPtoDP(long ptr long) LPtoDP32
|
||||||
0248 stub LineDDA
|
0248 stub LineDDA
|
||||||
0249 stdcall LineTo(long long long) LineTo
|
0249 stdcall LineTo(long long long) LineTo
|
||||||
0250 stub LoadImageColorMatcherA
|
0250 stub LoadImageColorMatcherA
|
||||||
0251 stub LoadImageColorMatcherW
|
0251 stub LoadImageColorMatcherW
|
||||||
0252 stub MaskBlt
|
0252 stub MaskBlt
|
||||||
0253 stub ModifyWorldTransform
|
0253 stub ModifyWorldTransform
|
||||||
0254 stdcall MoveToEx(long long long ptr) WIN32_MoveToEx
|
0254 stdcall MoveToEx(long long long ptr) MoveToEx32
|
||||||
0255 stub OffsetClipRgn
|
0255 stub OffsetClipRgn
|
||||||
0256 stub OffsetRgn
|
0256 stdcall OffsetRgn(long long long) OffsetRgn
|
||||||
0257 stub OffsetViewportOrgEx
|
0257 stdcall OffsetViewportOrgEx(long long long ptr) OffsetViewportOrgEx32
|
||||||
0258 stub OffsetWindowOrgEx
|
0258 stdcall OffsetWindowOrgEx(long long long ptr) OffsetWindowOrgEx32
|
||||||
0259 stub PaintRgn
|
0259 stub PaintRgn
|
||||||
0260 stdcall PatBlt(long long long long long long) PatBlt
|
0260 stdcall PatBlt(long long long long long long) PatBlt
|
||||||
0261 stub PathToRegion
|
0261 stub PathToRegion
|
||||||
|
@ -280,12 +280,12 @@ base 1
|
||||||
0275 stub Polygon
|
0275 stub Polygon
|
||||||
0276 stub Polyline
|
0276 stub Polyline
|
||||||
0277 stub PolylineTo
|
0277 stub PolylineTo
|
||||||
0278 stub PtInRegion
|
0278 stdcall PtInRegion(long long long) PtInRegion
|
||||||
0279 stub PtVisible
|
0279 stub PtVisible
|
||||||
0280 stub RealizePalette
|
0280 stub RealizePalette
|
||||||
0281 stub RectInRegion
|
0281 stdcall RectInRegion(long ptr) RectInRegion32
|
||||||
0282 stub RectVisible
|
0282 stdcall RectVisible(long ptr) RectVisible32
|
||||||
0283 stub Rectangle
|
0283 stdcall Rectangle(long long long long long) Rectangle
|
||||||
0284 stub RemoveFontResourceA
|
0284 stub RemoveFontResourceA
|
||||||
0285 stub RemoveFontResourceTracking
|
0285 stub RemoveFontResourceTracking
|
||||||
0286 stub RemoveFontResourceW
|
0286 stub RemoveFontResourceW
|
||||||
|
@ -295,8 +295,8 @@ base 1
|
||||||
0290 stub RestoreDC
|
0290 stub RestoreDC
|
||||||
0291 stub RoundRect
|
0291 stub RoundRect
|
||||||
0292 stub SaveDC
|
0292 stub SaveDC
|
||||||
0293 stub ScaleViewportExtEx
|
0293 stdcall ScaleViewportExtEx(long long long long long ptr) ScaleViewportExtEx32
|
||||||
0294 stub ScaleWindowExtEx
|
0294 stdcall ScaleWindowExtEx(long long long long long ptr) ScaleWindowExtEx32
|
||||||
0295 stub SelectBrushLocal
|
0295 stub SelectBrushLocal
|
||||||
0296 stub SelectClipPath
|
0296 stub SelectClipPath
|
||||||
0297 stub SelectClipRgn
|
0297 stub SelectClipRgn
|
||||||
|
@ -306,7 +306,7 @@ base 1
|
||||||
0301 stub SetAbortProc
|
0301 stub SetAbortProc
|
||||||
0302 stub SetArcDirection
|
0302 stub SetArcDirection
|
||||||
0303 stub SetBitmapBits
|
0303 stub SetBitmapBits
|
||||||
0304 stub SetBitmapDimensionEx
|
0304 stdcall SetBitmapDimensionEx(long long long ptr) SetBitmapDimensionEx32
|
||||||
0305 stdcall SetBkColor(long long) SetBkColor
|
0305 stdcall SetBkColor(long long) SetBkColor
|
||||||
0306 stub SetBkMode
|
0306 stub SetBkMode
|
||||||
0307 stub SetBoundsRect
|
0307 stub SetBoundsRect
|
||||||
|
@ -342,12 +342,12 @@ base 1
|
||||||
0337 stub SetTextCharacterExtra
|
0337 stub SetTextCharacterExtra
|
||||||
0338 stdcall SetTextColor(long long) SetTextColor
|
0338 stdcall SetTextColor(long long) SetTextColor
|
||||||
0339 stub SetTextJustification
|
0339 stub SetTextJustification
|
||||||
0340 stub SetViewportExtEx
|
0340 stdcall SetViewportExtEx(long long long ptr) SetViewportExtEx32
|
||||||
0341 stub SetViewportOrgEx
|
0341 stdcall SetViewportOrgEx(long long long ptr) SetViewportOrgEx32
|
||||||
0342 stub SetVirtualResolution
|
0342 stub SetVirtualResolution
|
||||||
0343 stub SetWinMetaFileBits
|
0343 stub SetWinMetaFileBits
|
||||||
0344 stub SetWindowExtEx
|
0344 stdcall SetWindowExtEx(long long long ptr) SetWindowExtEx32
|
||||||
0345 stub SetWindowOrgEx
|
0345 stdcall SetWindowOrgEx(long long long ptr) SetWindowOrgEx32
|
||||||
0346 stub SetWorldTransform
|
0346 stub SetWorldTransform
|
||||||
0347 stub StartDocA
|
0347 stub StartDocA
|
||||||
0348 stub StartDocW
|
0348 stub StartDocW
|
||||||
|
@ -357,8 +357,8 @@ base 1
|
||||||
0352 stub StrokeAndFillPath
|
0352 stub StrokeAndFillPath
|
||||||
0353 stub StrokePath
|
0353 stub StrokePath
|
||||||
0354 stub SwapBuffers
|
0354 stub SwapBuffers
|
||||||
0355 stdcall TextOutA(long long long ptr long) TextOut
|
0355 stdcall TextOutA(long long long ptr long) TextOut32A
|
||||||
0356 stub TextOutW
|
0356 stdcall TextOutW(long long long ptr long) TextOut32W
|
||||||
0357 stub UnloadNetworkFonts
|
0357 stub UnloadNetworkFonts
|
||||||
0358 stub UnrealizeObject
|
0358 stub UnrealizeObject
|
||||||
0359 stub UpdateColors
|
0359 stub UpdateColors
|
||||||
|
|
|
@ -205,17 +205,17 @@ type win16
|
||||||
205 stub CVWBreak
|
205 stub CVWBreak
|
||||||
206 pascal16 AllocSelectorArray(word) AllocSelectorArray
|
206 pascal16 AllocSelectorArray(word) AllocSelectorArray
|
||||||
207 return IsDBCSLeadByte 2 0
|
207 return IsDBCSLeadByte 2 0
|
||||||
216 pascal RegEnumKey(long long ptr long) RegEnumKey
|
216 pascal RegEnumKey(long long ptr long) RegEnumKey16
|
||||||
217 pascal RegOpenKey(long ptr ptr) RegOpenKey
|
217 pascal RegOpenKey(long ptr ptr) RegOpenKey16
|
||||||
218 pascal RegCreateKey(long ptr ptr) RegCreateKey
|
218 pascal RegCreateKey(long ptr ptr) RegCreateKey16
|
||||||
219 pascal RegDeleteKey(long ptr) RegDeleteKey
|
219 pascal RegDeleteKey(long ptr) RegDeleteKey16
|
||||||
220 pascal RegCloseKey(long) RegCloseKey
|
220 pascal RegCloseKey(long) RegCloseKey
|
||||||
221 pascal RegSetValue(long ptr long ptr long) RegSetValue
|
221 pascal RegSetValue(long ptr long ptr long) RegSetValue16
|
||||||
222 pascal RegDeleteValue(long ptr) RegDeleteValue
|
222 pascal RegDeleteValue(long ptr) RegDeleteValue16
|
||||||
223 pascal RegEnumValue(long long ptr ptr ptr ptr ptr ptr) RegEnumValue
|
223 pascal RegEnumValue(long long ptr ptr ptr ptr ptr ptr) RegEnumValue16
|
||||||
224 pascal RegQueryValue(long ptr ptr ptr) RegQueryValue
|
224 pascal RegQueryValue(long ptr ptr ptr) RegQueryValue16
|
||||||
225 pascal RegQueryValueEx(long ptr ptr ptr ptr ptr) RegQueryValueEx
|
225 pascal RegQueryValueEx(long ptr ptr ptr ptr ptr) RegQueryValueEx16
|
||||||
226 pascal RegSetValueEx(long ptr long long ptr long) RegSetValueEx
|
226 pascal RegSetValueEx(long ptr long long ptr long) RegSetValueEx16
|
||||||
227 pascal RegFlushKey(long) RegFlushKey
|
227 pascal RegFlushKey(long) RegFlushKey
|
||||||
#228 K228
|
#228 K228
|
||||||
#229 K229
|
#229 K229
|
||||||
|
@ -270,8 +270,8 @@ type win16
|
||||||
404 pascal16 FarGetOwner(word) FarGetOwner
|
404 pascal16 FarGetOwner(word) FarGetOwner
|
||||||
406 stub WritePrivateProfileStruct
|
406 stub WritePrivateProfileStruct
|
||||||
407 stub GetPrivateProfileStruct
|
407 stub GetPrivateProfileStruct
|
||||||
411 stub GetCurrentDirectory
|
411 pascal GetCurrentDirectory(long ptr) GetCurrentDirectory
|
||||||
412 stub SetCurrentDirectory
|
412 pascal16 SetCurrentDirectory(ptr) SetCurrentDirectory
|
||||||
413 stub FindFirstFile
|
413 stub FindFirstFile
|
||||||
414 stub FindNextFile
|
414 stub FindNextFile
|
||||||
415 stub FindClose
|
415 stub FindClose
|
||||||
|
|
|
@ -314,20 +314,20 @@ base 1
|
||||||
0308 stub GetVersionExW
|
0308 stub GetVersionExW
|
||||||
0309 stub GetVolumeInformationA
|
0309 stub GetVolumeInformationA
|
||||||
0310 stub GetVolumeInformationW
|
0310 stub GetVolumeInformationW
|
||||||
0311 stub GetWindowsDirectoryA
|
0311 stdcall GetWindowsDirectoryA(ptr long) GetWindowsDirectory
|
||||||
0312 stub GetWindowsDirectoryW
|
0312 stub GetWindowsDirectoryW
|
||||||
0313 stdcall GlobalAddAtomA(long) WIN32_GlobalAddAtomA
|
0313 stdcall GlobalAddAtomA(ptr) GlobalAddAtom32A
|
||||||
0314 stub GlobalAddAtomW
|
0314 stdcall GlobalAddAtomW(ptr) GlobalAddAtom32W
|
||||||
0315 stdcall GlobalAlloc(long long) GlobalAlloc32
|
0315 stdcall GlobalAlloc(long long) GlobalAlloc32
|
||||||
0316 stdcall GlobalCompact(long) GlobalCompact32
|
0316 stdcall GlobalCompact(long) GlobalCompact32
|
||||||
0317 stub GlobalDeleteAtom
|
0317 stdcall GlobalDeleteAtom(long) GlobalDeleteAtom
|
||||||
0318 stub GlobalFindAtomA
|
0318 stdcall GlobalFindAtomA(ptr) GlobalFindAtom32A
|
||||||
0319 stub GlobalFindAtomW
|
0319 stdcall GlobalFindAtomW(ptr) GlobalFindAtom32W
|
||||||
0320 stub GlobalFix
|
0320 stub GlobalFix
|
||||||
0321 stdcall GlobalFlags(long) GlobalFlags32
|
0321 stdcall GlobalFlags(long) GlobalFlags32
|
||||||
0322 stdcall GlobalFree(long) GlobalFree32
|
0322 stdcall GlobalFree(long) GlobalFree32
|
||||||
0323 stub GlobalGetAtomNameA
|
0323 stdcall GlobalGetAtomNameA(long ptr long) GlobalGetAtomName32A
|
||||||
0324 stub GlobalGetAtomNameW
|
0324 stdcall GlobalGetAtomNameW(long ptr long) GlobalGetAtomName32W
|
||||||
0325 stdcall GlobalHandle(ptr) GlobalHandle32
|
0325 stdcall GlobalHandle(ptr) GlobalHandle32
|
||||||
0326 stdcall GlobalLock(long) GlobalLock32
|
0326 stdcall GlobalLock(long) GlobalLock32
|
||||||
0327 stub GlobalMemoryStatus
|
0327 stub GlobalMemoryStatus
|
||||||
|
|
|
@ -5,7 +5,7 @@ type win16
|
||||||
2 pascal SNDPLAYSOUND(ptr word) sndPlaySound
|
2 pascal SNDPLAYSOUND(ptr word) sndPlaySound
|
||||||
5 pascal MMSYSTEMGETVERSION() mmsystemGetVersion
|
5 pascal MMSYSTEMGETVERSION() mmsystemGetVersion
|
||||||
6 pascal DriverProc(long word word long long) DriverProc
|
6 pascal DriverProc(long word word long long) DriverProc
|
||||||
30 pascal OUTPUTDEBUGSTR(ptr) OutputDebugStr
|
30 pascal16 OutputDebugStr(ptr) OutputDebugString
|
||||||
31 pascal DriverCallback(long word word word long long long)
|
31 pascal DriverCallback(long word word word long long long)
|
||||||
DriverCallback
|
DriverCallback
|
||||||
#32 pascal STACKENTER
|
#32 pascal STACKENTER
|
||||||
|
|
|
@ -1,87 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 1995 Martin von Loewis
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include "windows.h"
|
|
||||||
#include "callback.h"
|
|
||||||
#include "module.h"
|
|
||||||
#include "neexe.h"
|
|
||||||
#include "peexe.h"
|
|
||||||
#include "relay32.h"
|
|
||||||
#include "struct32.h"
|
|
||||||
#include "stackframe.h"
|
|
||||||
#include "ldt.h"
|
|
||||||
#include "stddebug.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
|
|
||||||
LONG RELAY32_CallWindowProcConvStruct( WNDPROC func, int hwnd, int message,
|
|
||||||
int wParam, LPARAM lParam16)
|
|
||||||
{
|
|
||||||
WINDOWPOS32 wp;
|
|
||||||
union {
|
|
||||||
MINMAXINFO32 mmi;
|
|
||||||
NCCALCSIZE_PARAMS32 nccs;
|
|
||||||
CREATESTRUCT32 cs;
|
|
||||||
} st;
|
|
||||||
CREATESTRUCT *lpcs;
|
|
||||||
LONG result;
|
|
||||||
void *lParam;
|
|
||||||
if(!lParam16)
|
|
||||||
return CallWndProc32(func,hwnd,message,wParam,(int)lParam16);
|
|
||||||
lParam = PTR_SEG_TO_LIN(lParam16);
|
|
||||||
switch(message) {
|
|
||||||
case WM_GETMINMAXINFO:
|
|
||||||
STRUCT32_MINMAXINFO16to32(lParam,&st.mmi);
|
|
||||||
result=CallWndProc32(func,hwnd,message,wParam,(int)&st.mmi);
|
|
||||||
STRUCT32_MINMAXINFO32to16(&st.mmi,lParam);
|
|
||||||
return result;
|
|
||||||
case WM_WINDOWPOSCHANGING:
|
|
||||||
case WM_WINDOWPOSCHANGED:
|
|
||||||
STRUCT32_WINDOWPOS16to32(lParam,&wp);
|
|
||||||
result=CallWndProc32(func,hwnd,message,wParam,(int)&wp);
|
|
||||||
STRUCT32_WINDOWPOS32to16(&wp,lParam);
|
|
||||||
return result;
|
|
||||||
case WM_NCCALCSIZE:
|
|
||||||
STRUCT32_NCCALCSIZE16to32Flat(lParam,&st.nccs);
|
|
||||||
if(wParam && ((NCCALCSIZE_PARAMS*)lParam)->lppos)
|
|
||||||
{
|
|
||||||
STRUCT32_WINDOWPOS16to32(PTR_SEG_TO_LIN(((NCCALCSIZE_PARAMS*)lParam)->lppos),&wp);
|
|
||||||
st.nccs.lppos=℘
|
|
||||||
}
|
|
||||||
else st.nccs.lppos= 0;
|
|
||||||
result=CallWndProc32(func,hwnd,message,wParam,(int)&st.nccs);
|
|
||||||
STRUCT32_NCCALCSIZE32to16Flat(&st.nccs,lParam);
|
|
||||||
if(wParam && ((NCCALCSIZE_PARAMS*)lParam)->lppos)
|
|
||||||
STRUCT32_WINDOWPOS32to16(&wp,PTR_SEG_TO_LIN(((NCCALCSIZE_PARAMS*)lParam)->lppos));
|
|
||||||
return result;
|
|
||||||
case WM_NCCREATE:
|
|
||||||
lpcs = (CREATESTRUCT*)lParam;
|
|
||||||
STRUCT32_CREATESTRUCT16to32(lParam,&st.cs);
|
|
||||||
st.cs.lpszName = HIWORD(lpcs->lpszName) ?
|
|
||||||
PTR_SEG_TO_LIN(lpcs->lpszName) : (char*)lpcs->lpszName;
|
|
||||||
st.cs.lpszClass = HIWORD(lpcs->lpszClass) ?
|
|
||||||
PTR_SEG_TO_LIN(lpcs->lpszClass) : (char*)lpcs->lpszClass;
|
|
||||||
result=CallWndProc32(func,hwnd,message,wParam,(int)&st.cs);
|
|
||||||
STRUCT32_CREATESTRUCT32to16(&st.cs,lParam);
|
|
||||||
lpcs->lpszName = HIWORD(st.cs.lpszName) ?
|
|
||||||
MAKE_SEGPTR(st.cs.lpszName) : (SEGPTR)st.cs.lpszName;
|
|
||||||
lpcs->lpszClass = HIWORD(st.cs.lpszClass) ?
|
|
||||||
MAKE_SEGPTR(st.cs.lpszClass) : (SEGPTR)st.cs.lpszClass;
|
|
||||||
return result;
|
|
||||||
case WM_GETTEXT:
|
|
||||||
case WM_SETTEXT:
|
|
||||||
return CallWndProc32(func,hwnd,message,wParam,(int)lParam);
|
|
||||||
default:
|
|
||||||
fprintf(stderr,"No conversion function for message %d\n",message);
|
|
||||||
}
|
|
||||||
return CallWndProc32(func,hwnd,message,wParam,(int)lParam);
|
|
||||||
}
|
|
|
@ -1,13 +1,13 @@
|
||||||
name shell
|
name shell
|
||||||
type win16
|
type win16
|
||||||
|
|
||||||
1 pascal RegOpenKey(long ptr ptr) RegOpenKey
|
1 pascal RegOpenKey(long ptr ptr) RegOpenKey16
|
||||||
2 pascal RegCreateKey(long ptr ptr) RegCreateKey
|
2 pascal RegCreateKey(long ptr ptr) RegCreateKey16
|
||||||
3 pascal RegCloseKey(long) RegCloseKey
|
3 pascal RegCloseKey(long) RegCloseKey
|
||||||
4 pascal RegDeleteKey(long ptr) RegDeleteKey
|
4 pascal RegDeleteKey(long ptr) RegDeleteKey16
|
||||||
5 pascal RegSetValue(long ptr long ptr long) RegSetValue
|
5 pascal RegSetValue(long ptr long ptr long) RegSetValue16
|
||||||
6 pascal RegQueryValue(long ptr ptr ptr) RegQueryValue
|
6 pascal RegQueryValue(long ptr ptr ptr) RegQueryValue16
|
||||||
7 pascal RegEnumKey(long long ptr long) RegEnumKey
|
7 pascal RegEnumKey(long long ptr long) RegEnumKey16
|
||||||
9 pascal16 DragAcceptFiles(word word) DragAcceptFiles
|
9 pascal16 DragAcceptFiles(word word) DragAcceptFiles
|
||||||
11 pascal16 DragQueryFile(word s_word ptr s_word) DragQueryFile
|
11 pascal16 DragQueryFile(word s_word ptr s_word) DragQueryFile
|
||||||
12 pascal16 DragFinish(word) DragFinish
|
12 pascal16 DragFinish(word) DragFinish
|
||||||
|
|
108
if1632/user.spec
108
if1632/user.spec
|
@ -15,8 +15,8 @@ heap 65520
|
||||||
13 pascal GetTickCount() GetTickCount
|
13 pascal GetTickCount() GetTickCount
|
||||||
14 pascal GetTimerResolution() GetTimerResolution
|
14 pascal GetTimerResolution() GetTimerResolution
|
||||||
15 pascal GetCurrentTime() GetCurrentTime
|
15 pascal GetCurrentTime() GetCurrentTime
|
||||||
16 pascal16 ClipCursor(ptr) ClipCursor
|
16 pascal16 ClipCursor(ptr) ClipCursor16
|
||||||
17 pascal16 GetCursorPos(ptr) GetCursorPos
|
17 pascal16 GetCursorPos(ptr) GetCursorPos16
|
||||||
18 pascal16 SetCapture(word) SetCapture
|
18 pascal16 SetCapture(word) SetCapture
|
||||||
19 pascal16 ReleaseCapture() ReleaseCapture
|
19 pascal16 ReleaseCapture() ReleaseCapture
|
||||||
20 pascal16 SetDoubleClickTime(word) SetDoubleClickTime
|
20 pascal16 SetDoubleClickTime(word) SetDoubleClickTime
|
||||||
|
@ -27,19 +27,19 @@ heap 65520
|
||||||
25 pascal16 GetProp(word segptr) GetProp
|
25 pascal16 GetProp(word segptr) GetProp
|
||||||
26 pascal16 SetProp(word segptr word) SetProp
|
26 pascal16 SetProp(word segptr word) SetProp
|
||||||
27 pascal16 EnumProps(word segptr) EnumProps
|
27 pascal16 EnumProps(word segptr) EnumProps
|
||||||
28 pascal16 ClientToScreen(word ptr) ClientToScreen
|
28 pascal16 ClientToScreen(word ptr) ClientToScreen16
|
||||||
29 pascal16 ScreenToClient(word ptr) ScreenToClient
|
29 pascal16 ScreenToClient(word ptr) ScreenToClient16
|
||||||
30 pascal16 WindowFromPoint(long) WindowFromPoint
|
30 pascal16 WindowFromPoint(long) WindowFromPoint16
|
||||||
31 pascal16 IsIconic(word) IsIconic
|
31 pascal16 IsIconic(word) IsIconic
|
||||||
32 pascal16 GetWindowRect(word ptr) GetWindowRect
|
32 pascal16 GetWindowRect(word ptr) GetWindowRect16
|
||||||
33 pascal16 GetClientRect(word ptr) GetClientRect
|
33 pascal16 GetClientRect(word ptr) GetClientRect16
|
||||||
34 pascal16 EnableWindow(word word) EnableWindow
|
34 pascal16 EnableWindow(word word) EnableWindow
|
||||||
35 pascal16 IsWindowEnabled(word) IsWindowEnabled
|
35 pascal16 IsWindowEnabled(word) IsWindowEnabled
|
||||||
36 pascal16 GetWindowText(word segptr word) WIN16_GetWindowText
|
36 pascal16 GetWindowText(word segptr word) WIN16_GetWindowText
|
||||||
37 pascal16 SetWindowText(word segptr) WIN16_SetWindowText
|
37 pascal16 SetWindowText(word segptr) WIN16_SetWindowText
|
||||||
38 pascal16 GetWindowTextLength(word) GetWindowTextLength
|
38 pascal16 GetWindowTextLength(word) GetWindowTextLength
|
||||||
39 pascal16 BeginPaint(word ptr) BeginPaint
|
39 pascal16 BeginPaint(word ptr) BeginPaint16
|
||||||
40 pascal16 EndPaint(word ptr) EndPaint
|
40 pascal16 EndPaint(word ptr) EndPaint16
|
||||||
41 pascal16 CreateWindow(segptr segptr long s_word s_word s_word s_word
|
41 pascal16 CreateWindow(segptr segptr long s_word s_word s_word s_word
|
||||||
word word word segptr) CreateWindow16
|
word word word segptr) CreateWindow16
|
||||||
42 pascal16 ShowWindow(word word) ShowWindow
|
42 pascal16 ShowWindow(word word) ShowWindow
|
||||||
|
@ -50,7 +50,7 @@ heap 65520
|
||||||
47 pascal16 IsWindow(word) IsWindow
|
47 pascal16 IsWindow(word) IsWindow
|
||||||
48 pascal16 IsChild(word word) IsChild
|
48 pascal16 IsChild(word word) IsChild
|
||||||
49 pascal16 IsWindowVisible(word) IsWindowVisible
|
49 pascal16 IsWindowVisible(word) IsWindowVisible
|
||||||
50 pascal16 FindWindow(segptr ptr) FindWindow
|
50 pascal16 FindWindow(segptr ptr) FindWindow16
|
||||||
#51 BEAR51
|
#51 BEAR51
|
||||||
52 pascal16 AnyPopup() AnyPopup
|
52 pascal16 AnyPopup() AnyPopup
|
||||||
53 pascal16 DestroyWindow(word) DestroyWindow
|
53 pascal16 DestroyWindow(word) DestroyWindow
|
||||||
|
@ -58,7 +58,7 @@ heap 65520
|
||||||
55 pascal16 EnumChildWindows(word segptr long) EnumChildWindows
|
55 pascal16 EnumChildWindows(word segptr long) EnumChildWindows
|
||||||
56 pascal16 MoveWindow(word word word word word word) MoveWindow
|
56 pascal16 MoveWindow(word word word word word word) MoveWindow
|
||||||
57 pascal16 RegisterClass(ptr) RegisterClass16
|
57 pascal16 RegisterClass(ptr) RegisterClass16
|
||||||
58 pascal16 GetClassName(word ptr word) GetClassName
|
58 pascal16 GetClassName(word ptr word) GetClassName16
|
||||||
59 pascal16 SetActiveWindow(word) SetActiveWindow
|
59 pascal16 SetActiveWindow(word) SetActiveWindow
|
||||||
60 pascal16 GetActiveWindow() GetActiveWindow
|
60 pascal16 GetActiveWindow() GetActiveWindow
|
||||||
61 pascal16 ScrollWindow(word s_word s_word ptr ptr) ScrollWindow
|
61 pascal16 ScrollWindow(word s_word s_word ptr ptr) ScrollWindow
|
||||||
|
@ -72,20 +72,20 @@ heap 65520
|
||||||
69 pascal16 SetCursor(word) SetCursor
|
69 pascal16 SetCursor(word) SetCursor
|
||||||
70 pascal16 SetCursorPos(word word) SetCursorPos
|
70 pascal16 SetCursorPos(word word) SetCursorPos
|
||||||
71 pascal16 ShowCursor(word) ShowCursor
|
71 pascal16 ShowCursor(word) ShowCursor
|
||||||
72 pascal16 SetRect(ptr s_word s_word s_word s_word) SetRect
|
72 pascal16 SetRect(ptr s_word s_word s_word s_word) SetRect16
|
||||||
73 pascal16 SetRectEmpty(ptr) SetRectEmpty
|
73 pascal16 SetRectEmpty(ptr) SetRectEmpty16
|
||||||
74 pascal16 CopyRect(ptr ptr) CopyRect
|
74 pascal16 CopyRect(ptr ptr) CopyRect16
|
||||||
75 pascal16 IsRectEmpty(ptr) IsRectEmpty
|
75 pascal16 IsRectEmpty(ptr) IsRectEmpty16
|
||||||
76 pascal16 PtInRect(ptr long) PtInRect
|
76 pascal16 PtInRect(ptr long) PtInRect16
|
||||||
77 pascal16 OffsetRect(ptr s_word s_word) OffsetRect
|
77 pascal16 OffsetRect(ptr s_word s_word) OffsetRect16
|
||||||
78 pascal16 InflateRect(ptr s_word s_word) InflateRect
|
78 pascal16 InflateRect(ptr s_word s_word) InflateRect16
|
||||||
79 pascal16 IntersectRect(ptr ptr ptr) IntersectRect
|
79 pascal16 IntersectRect(ptr ptr ptr) IntersectRect16
|
||||||
80 pascal16 UnionRect(ptr ptr ptr) UnionRect
|
80 pascal16 UnionRect(ptr ptr ptr) UnionRect16
|
||||||
81 pascal16 FillRect(word ptr word) FillRect
|
81 pascal16 FillRect(word ptr word) FillRect16
|
||||||
82 pascal16 InvertRect(word ptr) InvertRect
|
82 pascal16 InvertRect(word ptr) InvertRect16
|
||||||
83 pascal16 FrameRect(word ptr word) FrameRect
|
83 pascal16 FrameRect(word ptr word) FrameRect16
|
||||||
84 pascal16 DrawIcon(word s_word s_word word) DrawIcon
|
84 pascal16 DrawIcon(word s_word s_word word) DrawIcon
|
||||||
85 pascal16 DrawText(word ptr s_word ptr word) DrawText
|
85 pascal16 DrawText(word ptr s_word ptr word) DrawText16
|
||||||
87 pascal16 DialogBox(word segptr word segptr) DialogBox
|
87 pascal16 DialogBox(word segptr word segptr) DialogBox
|
||||||
88 pascal16 EndDialog(word s_word) EndDialog
|
88 pascal16 EndDialog(word s_word) EndDialog
|
||||||
89 pascal16 CreateDialog(word segptr word segptr) CreateDialog
|
89 pascal16 CreateDialog(word segptr word segptr) CreateDialog
|
||||||
|
@ -101,8 +101,8 @@ heap 65520
|
||||||
99 pascal16 DlgDirSelect(word ptr word) DlgDirSelect
|
99 pascal16 DlgDirSelect(word ptr word) DlgDirSelect
|
||||||
100 pascal16 DlgDirList(word segptr word word word) DlgDirList
|
100 pascal16 DlgDirList(word segptr word word word) DlgDirList
|
||||||
101 pascal SendDlgItemMessage(word word word word long) SendDlgItemMessage
|
101 pascal SendDlgItemMessage(word word word word long) SendDlgItemMessage
|
||||||
102 pascal16 AdjustWindowRect(ptr long word) AdjustWindowRect
|
102 pascal16 AdjustWindowRect(ptr long word) AdjustWindowRect16
|
||||||
103 pascal16 MapDialogRect(word ptr) MapDialogRect
|
103 pascal16 MapDialogRect(word ptr) MapDialogRect16
|
||||||
104 pascal16 MessageBeep(word) MessageBeep
|
104 pascal16 MessageBeep(word) MessageBeep
|
||||||
105 pascal16 FlashWindow(word word) FlashWindow
|
105 pascal16 FlashWindow(word word) FlashWindow
|
||||||
106 pascal16 GetKeyState(word) GetKeyState
|
106 pascal16 GetKeyState(word) GetKeyState
|
||||||
|
@ -116,22 +116,22 @@ heap 65520
|
||||||
114 pascal DispatchMessage(ptr) DispatchMessage
|
114 pascal DispatchMessage(ptr) DispatchMessage
|
||||||
115 stub ReplyMessage
|
115 stub ReplyMessage
|
||||||
116 pascal16 PostAppMessage(word word word long) PostAppMessage
|
116 pascal16 PostAppMessage(word word word long) PostAppMessage
|
||||||
118 pascal16 RegisterWindowMessage(long) RegisterWindowMessage
|
118 pascal16 RegisterWindowMessage(segptr) RegisterWindowMessage16
|
||||||
117 stub WindowFromDC
|
117 stub WindowFromDC
|
||||||
119 pascal GetMessagePos() GetMessagePos
|
119 pascal GetMessagePos() GetMessagePos
|
||||||
120 pascal GetMessageTime() GetMessageTime
|
120 pascal GetMessageTime() GetMessageTime
|
||||||
121 pascal SetWindowsHook(s_word segptr) SetWindowsHook
|
121 pascal SetWindowsHook(s_word segptr) SetWindowsHook
|
||||||
122 pascal CallWindowProc(segptr word word word long) CallWindowProc
|
122 pascal CallWindowProc(segptr word word word long) CallWindowProc16
|
||||||
123 pascal16 CallMsgFilter(segptr s_word) CallMsgFilter
|
123 pascal16 CallMsgFilter(segptr s_word) CallMsgFilter
|
||||||
124 pascal16 UpdateWindow(word) UpdateWindow
|
124 pascal16 UpdateWindow(word) UpdateWindow
|
||||||
125 pascal16 InvalidateRect(word ptr word) InvalidateRect
|
125 pascal16 InvalidateRect(word ptr word) InvalidateRect16
|
||||||
126 pascal16 InvalidateRgn(word word word) InvalidateRgn
|
126 pascal16 InvalidateRgn(word word word) InvalidateRgn
|
||||||
127 pascal16 ValidateRect(word ptr) ValidateRect
|
127 pascal16 ValidateRect(word ptr) ValidateRect16
|
||||||
128 pascal16 ValidateRgn(word word) ValidateRgn
|
128 pascal16 ValidateRgn(word word) ValidateRgn
|
||||||
129 pascal16 GetClassWord(word s_word) GetClassWord
|
129 pascal16 GetClassWord(word s_word) GetClassWord
|
||||||
130 pascal16 SetClassWord(word s_word word) SetClassWord
|
130 pascal16 SetClassWord(word s_word word) SetClassWord
|
||||||
131 pascal GetClassLong(word s_word) GetClassLong
|
131 pascal GetClassLong(word s_word) GetClassLong16
|
||||||
132 pascal SetClassLong(word s_word long) SetClassLong
|
132 pascal SetClassLong(word s_word long) SetClassLong16
|
||||||
133 pascal16 GetWindowWord(word s_word) GetWindowWord
|
133 pascal16 GetWindowWord(word s_word) GetWindowWord
|
||||||
134 pascal16 SetWindowWord(word s_word word) SetWindowWord
|
134 pascal16 SetWindowWord(word s_word word) SetWindowWord
|
||||||
135 pascal GetWindowLong(word s_word) GetWindowLong
|
135 pascal GetWindowLong(word s_word) GetWindowLong
|
||||||
|
@ -182,15 +182,15 @@ heap 65520
|
||||||
180 pascal GetSysColor(word) GetSysColor
|
180 pascal GetSysColor(word) GetSysColor
|
||||||
181 pascal16 SetSysColors(word ptr ptr) SetSysColors
|
181 pascal16 SetSysColors(word ptr ptr) SetSysColors
|
||||||
182 pascal16 KillSystemTimer(word word) KillSystemTimer
|
182 pascal16 KillSystemTimer(word word) KillSystemTimer
|
||||||
183 pascal16 GetCaretPos(ptr) GetCaretPos
|
183 pascal16 GetCaretPos(ptr) GetCaretPos16
|
||||||
184 stub QuerySendMessage
|
184 stub QuerySendMessage
|
||||||
185 pascal16 GrayString(word word ptr ptr word word word word word) GrayString
|
185 pascal16 GrayString(word word ptr ptr word word word word word) GrayString
|
||||||
186 pascal16 SwapMouseButton(word) SwapMouseButton
|
186 pascal16 SwapMouseButton(word) SwapMouseButton
|
||||||
187 pascal16 EndMenu() EndMenu
|
187 pascal16 EndMenu() EndMenu
|
||||||
188 pascal16 SetSysModalWindow(word) SetSysModalWindow
|
188 pascal16 SetSysModalWindow(word) SetSysModalWindow
|
||||||
189 pascal16 GetSysModalWindow() GetSysModalWindow
|
189 pascal16 GetSysModalWindow() GetSysModalWindow
|
||||||
190 pascal16 GetUpdateRect(word ptr word) GetUpdateRect
|
190 pascal16 GetUpdateRect(word ptr word) GetUpdateRect16
|
||||||
191 pascal16 ChildWindowFromPoint(word long) ChildWindowFromPoint
|
191 pascal16 ChildWindowFromPoint(word long) ChildWindowFromPoint16
|
||||||
192 pascal16 InSendMessage() InSendMessage
|
192 pascal16 InSendMessage() InSendMessage
|
||||||
193 pascal16 IsClipboardFormatAvailable(word) IsClipboardFormatAvailable
|
193 pascal16 IsClipboardFormatAvailable(word) IsClipboardFormatAvailable
|
||||||
194 pascal16 DlgDirSelectComboBox(word ptr word) DlgDirSelectComboBox
|
194 pascal16 DlgDirSelectComboBox(word ptr word) DlgDirSelectComboBox
|
||||||
|
@ -246,7 +246,7 @@ heap 65520
|
||||||
242 pascal16 CreateDialogIndirectParam(word segptr word segptr long)
|
242 pascal16 CreateDialogIndirectParam(word segptr word segptr long)
|
||||||
CreateDialogIndirectParam
|
CreateDialogIndirectParam
|
||||||
243 pascal GetDialogBaseUnits() GetDialogBaseUnits
|
243 pascal GetDialogBaseUnits() GetDialogBaseUnits
|
||||||
244 pascal16 EqualRect(ptr ptr) EqualRect
|
244 pascal16 EqualRect(ptr ptr) EqualRect16
|
||||||
245 stub EnableCommNotification
|
245 stub EnableCommNotification
|
||||||
246 stub ExitWindowsExec
|
246 stub ExitWindowsExec
|
||||||
247 pascal16 GetCursor() GetCursor
|
247 pascal16 GetCursor() GetCursor
|
||||||
|
@ -260,7 +260,7 @@ heap 65520
|
||||||
255 pascal DefDriverProc(long word word long long) DefDriverProc
|
255 pascal DefDriverProc(long word word long long) DefDriverProc
|
||||||
256 pascal16 GetDriverInfo(word ptr) GetDriverInfo
|
256 pascal16 GetDriverInfo(word ptr) GetDriverInfo
|
||||||
257 pascal16 GetNextDriver(word long) GetNextDriver
|
257 pascal16 GetNextDriver(word long) GetNextDriver
|
||||||
258 pascal16 MapWindowPoints(word word ptr word) MapWindowPoints
|
258 pascal16 MapWindowPoints(word word ptr word) MapWindowPoints16
|
||||||
259 pascal16 BeginDeferWindowPos(s_word) BeginDeferWindowPos
|
259 pascal16 BeginDeferWindowPos(s_word) BeginDeferWindowPos
|
||||||
260 pascal16 DeferWindowPos(word word word s_word s_word s_word s_word word)
|
260 pascal16 DeferWindowPos(word word word s_word s_word s_word s_word word)
|
||||||
DeferWindowPos
|
DeferWindowPos
|
||||||
|
@ -271,10 +271,10 @@ heap 65520
|
||||||
265 pascal16 ShowOwnedPopups(word word) ShowOwnedPopups
|
265 pascal16 ShowOwnedPopups(word word) ShowOwnedPopups
|
||||||
266 pascal16 SetMessageQueue(word) SetMessageQueue
|
266 pascal16 SetMessageQueue(word) SetMessageQueue
|
||||||
267 pascal16 ShowScrollBar(word word word) ShowScrollBar
|
267 pascal16 ShowScrollBar(word word word) ShowScrollBar
|
||||||
268 pascal16 GlobalAddAtom(segptr) GlobalAddAtom
|
268 pascal16 GlobalAddAtom(segptr) GlobalAddAtom16
|
||||||
269 pascal16 GlobalDeleteAtom(word) GlobalDeleteAtom
|
269 pascal16 GlobalDeleteAtom(word) GlobalDeleteAtom
|
||||||
270 pascal16 GlobalFindAtom(segptr) GlobalFindAtom
|
270 pascal16 GlobalFindAtom(segptr) GlobalFindAtom16
|
||||||
271 pascal16 GlobalGetAtomName(word ptr s_word) GlobalGetAtomName
|
271 pascal16 GlobalGetAtomName(word ptr s_word) GlobalGetAtomName16
|
||||||
272 pascal16 IsZoomed(word) IsZoomed
|
272 pascal16 IsZoomed(word) IsZoomed
|
||||||
273 stub ControlPanelInfo
|
273 stub ControlPanelInfo
|
||||||
274 stub GetNextQueueWindow
|
274 stub GetNextQueueWindow
|
||||||
|
@ -293,7 +293,7 @@ heap 65520
|
||||||
287 pascal16 GetLastActivePopup(word) GetLastActivePopup
|
287 pascal16 GetLastActivePopup(word) GetLastActivePopup
|
||||||
288 pascal GetMessageExtraInfo() GetMessageExtraInfo
|
288 pascal GetMessageExtraInfo() GetMessageExtraInfo
|
||||||
#289 KEYB_EVENT
|
#289 KEYB_EVENT
|
||||||
290 pascal16 RedrawWindow(word ptr word word) RedrawWindow
|
290 pascal16 RedrawWindow(word ptr word word) RedrawWindow16
|
||||||
291 pascal SetWindowsHookEx(s_word segptr word word) SetWindowsHookEx
|
291 pascal SetWindowsHookEx(s_word segptr word word) SetWindowsHookEx
|
||||||
292 pascal16 UnhookWindowsHookEx(segptr) UnhookWindowsHookEx
|
292 pascal16 UnhookWindowsHookEx(segptr) UnhookWindowsHookEx
|
||||||
293 pascal CallNextHookEx(segptr s_word word long) CallNextHookEx
|
293 pascal CallNextHookEx(segptr s_word word long) CallNextHookEx
|
||||||
|
@ -303,7 +303,7 @@ heap 65520
|
||||||
#301 BOZOSLIVEHERE :-)) <- this is actually EditWndProc
|
#301 BOZOSLIVEHERE :-)) <- this is actually EditWndProc
|
||||||
#306 BEAR306
|
#306 BEAR306
|
||||||
308 pascal DefDlgProc(word word word long) DefDlgProc
|
308 pascal DefDlgProc(word word word long) DefDlgProc
|
||||||
309 pascal16 GetClipCursor(ptr) GetClipCursor
|
309 pascal16 GetClipCursor(ptr) GetClipCursor16
|
||||||
314 stub SignalProc
|
314 stub SignalProc
|
||||||
319 pascal16 ScrollWindowEx(word s_word s_word ptr ptr word ptr word)
|
319 pascal16 ScrollWindowEx(word s_word s_word ptr ptr word ptr word)
|
||||||
ScrollWindowEx
|
ScrollWindowEx
|
||||||
|
@ -331,10 +331,10 @@ heap 65520
|
||||||
364 stub LookupIconIDFromDirectoryEx
|
364 stub LookupIconIDFromDirectoryEx
|
||||||
368 pascal16 CopyIcon(word word) CopyIcon
|
368 pascal16 CopyIcon(word word) CopyIcon
|
||||||
369 pascal16 CopyCursor(word word) CopyCursor
|
369 pascal16 CopyCursor(word word) CopyCursor
|
||||||
370 pascal16 GetWindowPlacement(word ptr) GetWindowPlacement
|
370 pascal16 GetWindowPlacement(word ptr) GetWindowPlacement16
|
||||||
371 pascal16 SetWindowPlacement(word ptr) SetWindowPlacement
|
371 pascal16 SetWindowPlacement(word ptr) SetWindowPlacement16
|
||||||
372 stub GetInternalIconHeader
|
372 stub GetInternalIconHeader
|
||||||
373 pascal16 SubtractRect(ptr ptr ptr) SubtractRect
|
373 pascal16 SubtractRect(ptr ptr ptr) SubtractRect16
|
||||||
375 stub DrawTextEx
|
375 stub DrawTextEx
|
||||||
376 stub SetMessageExtraInfo
|
376 stub SetMessageExtraInfo
|
||||||
378 stub SetPropEx
|
378 stub SetPropEx
|
||||||
|
@ -350,14 +350,14 @@ heap 65520
|
||||||
391 stub SignalProc32
|
391 stub SignalProc32
|
||||||
394 stub DrawIconEx
|
394 stub DrawIconEx
|
||||||
395 stub GetIconInfo
|
395 stub GetIconInfo
|
||||||
397 stub RegisterClassEx
|
397 pascal16 RegisterClassEx(ptr) RegisterClassEx16
|
||||||
398 stub GetClassInfoEx
|
398 pascal16 GetClassInfoEx(word segptr ptr) GetClassInfoEx16
|
||||||
399 stub ChildWindowFromPointEx
|
399 stub ChildWindowFromPointEx
|
||||||
400 stub FinalUserInit
|
400 stub FinalUserInit
|
||||||
402 pascal16 GetPriorityClipboardFormat(word ptr s_word)
|
402 pascal16 GetPriorityClipboardFormat(word ptr s_word)
|
||||||
GetPriorityClipboardFormat
|
GetPriorityClipboardFormat
|
||||||
403 pascal16 UnregisterClass(segptr word) UnregisterClass16
|
403 pascal16 UnregisterClass(segptr word) UnregisterClass16
|
||||||
404 pascal16 GetClassInfo(word segptr ptr) GetClassInfo
|
404 pascal16 GetClassInfo(word segptr ptr) GetClassInfo16
|
||||||
406 pascal16 CreateCursor(word word word word word ptr ptr) CreateCursor
|
406 pascal16 CreateCursor(word word word word word ptr ptr) CreateCursor
|
||||||
407 pascal16 CreateIcon(word word word word word ptr ptr) CreateIcon
|
407 pascal16 CreateIcon(word word word word word ptr ptr) CreateIcon
|
||||||
408 pascal16 CreateCursorIconIndirect(word ptr ptr ptr)
|
408 pascal16 CreateCursorIconIndirect(word ptr ptr ptr)
|
||||||
|
@ -369,14 +369,14 @@ heap 65520
|
||||||
413 pascal16 DeleteMenu(word word word) DeleteMenu
|
413 pascal16 DeleteMenu(word word word) DeleteMenu
|
||||||
414 pascal16 ModifyMenu(word word word word segptr) ModifyMenu
|
414 pascal16 ModifyMenu(word word word word segptr) ModifyMenu
|
||||||
415 pascal16 CreatePopupMenu() CreatePopupMenu
|
415 pascal16 CreatePopupMenu() CreatePopupMenu
|
||||||
416 pascal16 TrackPopupMenu(word word word word word word ptr) TrackPopupMenu
|
416 pascal16 TrackPopupMenu(word word s_word s_word s_word word ptr) TrackPopupMenu16
|
||||||
417 pascal GetMenuCheckMarkDimensions() GetMenuCheckMarkDimensions
|
417 pascal GetMenuCheckMarkDimensions() GetMenuCheckMarkDimensions
|
||||||
418 pascal16 SetMenuItemBitmaps(word word word word word) SetMenuItemBitmaps
|
418 pascal16 SetMenuItemBitmaps(word word word word word) SetMenuItemBitmaps
|
||||||
420 pascal16 wsprintf() wsprintf
|
420 pascal16 wsprintf() wsprintf
|
||||||
421 pascal16 wvsprintf(ptr ptr ptr) wvsprintf
|
421 pascal16 wvsprintf(ptr ptr ptr) wvsprintf
|
||||||
422 stub DlgDirSelectEx
|
422 stub DlgDirSelectEx
|
||||||
423 stub DlgDirSelectComboBoxEx
|
423 stub DlgDirSelectComboBoxEx
|
||||||
427 pascal16 FindWindowEx(word word segptr ptr) FindWindowEx
|
427 pascal16 FindWindowEx(word word segptr ptr) FindWindowEx16
|
||||||
428 stub TileWindows
|
428 stub TileWindows
|
||||||
429 stub CascadeWindows
|
429 stub CascadeWindows
|
||||||
430 pascal16 lstrcmp(ptr ptr) lstrcmp
|
430 pascal16 lstrcmp(ptr ptr) lstrcmp
|
||||||
|
@ -399,19 +399,19 @@ heap 65520
|
||||||
451 pascal16 TranslateMDISysAccel(word ptr) TranslateMDISysAccel
|
451 pascal16 TranslateMDISysAccel(word ptr) TranslateMDISysAccel
|
||||||
452 pascal16 CreateWindowEx(long segptr segptr long s_word s_word s_word s_word
|
452 pascal16 CreateWindowEx(long segptr segptr long s_word s_word s_word s_word
|
||||||
word word word segptr) CreateWindowEx16
|
word word word segptr) CreateWindowEx16
|
||||||
454 pascal16 AdjustWindowRectEx(ptr long word long) AdjustWindowRectEx
|
454 pascal16 AdjustWindowRectEx(ptr long word long) AdjustWindowRectEx16
|
||||||
455 pascal16 GetIconID(word long) GetIconID
|
455 pascal16 GetIconID(word long) GetIconID
|
||||||
456 pascal16 LoadIconHandler(word word) LoadIconHandler
|
456 pascal16 LoadIconHandler(word word) LoadIconHandler
|
||||||
457 pascal16 DestroyIcon(word) DestroyIcon
|
457 pascal16 DestroyIcon(word) DestroyIcon
|
||||||
458 pascal16 DestroyCursor(word) DestroyCursor
|
458 pascal16 DestroyCursor(word) DestroyCursor
|
||||||
459 pascal DumpIcon(segptr ptr ptr ptr) DumpIcon
|
459 pascal DumpIcon(segptr ptr ptr ptr) DumpIcon
|
||||||
460 pascal16 GetInternalWindowPos(word ptr ptr) GetInternalWindowPos
|
460 pascal16 GetInternalWindowPos(word ptr ptr) GetInternalWindowPos16
|
||||||
461 pascal16 SetInternalWindowPos(word word ptr ptr) SetInternalWindowPos
|
461 pascal16 SetInternalWindowPos(word word ptr ptr) SetInternalWindowPos16
|
||||||
462 pascal16 CalcChildScroll(word word) CalcChildScroll
|
462 pascal16 CalcChildScroll(word word) CalcChildScroll
|
||||||
463 pascal16 ScrollChildren(word word word long) ScrollChildren
|
463 pascal16 ScrollChildren(word word word long) ScrollChildren
|
||||||
464 pascal DragObject(word word word word word word) DragObject
|
464 pascal DragObject(word word word word word word) DragObject
|
||||||
465 pascal16 DragDetect(word long) DragDetect
|
465 pascal16 DragDetect(word long) DragDetect
|
||||||
466 pascal16 DrawFocusRect(word ptr) DrawFocusRect
|
466 pascal16 DrawFocusRect(word ptr) DrawFocusRect16
|
||||||
470 stub StringFunc
|
470 stub StringFunc
|
||||||
471 pascal16 lstrcmpi(ptr ptr) lstrcmpi
|
471 pascal16 lstrcmpi(ptr ptr) lstrcmpi
|
||||||
472 pascal AnsiNext(segptr) AnsiNext
|
472 pascal AnsiNext(segptr) AnsiNext
|
||||||
|
|
|
@ -3,15 +3,15 @@ type win32
|
||||||
base 1
|
base 1
|
||||||
|
|
||||||
0000 stub ActivateKeyboardLayout
|
0000 stub ActivateKeyboardLayout
|
||||||
0001 stub AdjustWindowRect
|
0001 stdcall AdjustWindowRect(ptr long long) AdjustWindowRect32
|
||||||
0002 stub AdjustWindowRectEx
|
0002 stdcall AdjustWindowRectEx(ptr long long long) AdjustWindowRectEx32
|
||||||
0003 stub AnyPopup
|
0003 stub AnyPopup
|
||||||
0004 stub AppendMenuA
|
0004 stub AppendMenuA
|
||||||
0005 stub AppendMenuW
|
0005 stub AppendMenuW
|
||||||
0006 stub ArrangeIconicWindows
|
0006 stub ArrangeIconicWindows
|
||||||
0007 stub AttachThreadInput
|
0007 stub AttachThreadInput
|
||||||
0008 stub BeginDeferWindowPos
|
0008 stub BeginDeferWindowPos
|
||||||
0009 stdcall BeginPaint(long ptr) USER32_BeginPaint
|
0009 stdcall BeginPaint(long ptr) BeginPaint32
|
||||||
0010 stub BringWindowToTop
|
0010 stub BringWindowToTop
|
||||||
0011 stub BroadcastSystemMessage
|
0011 stub BroadcastSystemMessage
|
||||||
0012 stub CalcChildScroll
|
0012 stub CalcChildScroll
|
||||||
|
@ -19,8 +19,8 @@ base 1
|
||||||
0014 stub CallMsgFilterA
|
0014 stub CallMsgFilterA
|
||||||
0015 stub CallMsgFilterW
|
0015 stub CallMsgFilterW
|
||||||
0016 stub CallNextHookEx
|
0016 stub CallNextHookEx
|
||||||
0017 stub CallWindowProcA
|
0017 stdcall CallWindowProcA(ptr long long long long) CallWindowProc32A
|
||||||
0018 stub CallWindowProcW
|
0018 stdcall CallWindowProcW(ptr long long long long) CallWindowProc32W
|
||||||
0019 stub CascadeChildWindows
|
0019 stub CascadeChildWindows
|
||||||
0020 stub CascadeWindows
|
0020 stub CascadeWindows
|
||||||
0021 stub ChangeClipboardChain
|
0021 stub ChangeClipboardChain
|
||||||
|
@ -50,11 +50,11 @@ base 1
|
||||||
0045 stdcall CheckMenuItem(long long long) CheckMenuItem
|
0045 stdcall CheckMenuItem(long long long) CheckMenuItem
|
||||||
0046 stub CheckMenuRadioItem
|
0046 stub CheckMenuRadioItem
|
||||||
0047 stub CheckRadioButton
|
0047 stub CheckRadioButton
|
||||||
0048 stub ChildWindowFromPoint
|
0048 stdcall ChildWindowFromPoint(long long long) ChildWindowFromPoint32
|
||||||
0049 stub ChildWindowFromPointEx
|
0049 stub ChildWindowFromPointEx
|
||||||
0050 stub ClientThreadConnect
|
0050 stub ClientThreadConnect
|
||||||
0051 stub ClientToScreen
|
0051 stdcall ClientToScreen(long ptr) ClientToScreen32
|
||||||
0052 stub ClipCursor
|
0052 stdcall ClipCursor(ptr) ClipCursor32
|
||||||
0053 stub CloseClipboard
|
0053 stub CloseClipboard
|
||||||
0054 stub CloseDesktop
|
0054 stub CloseDesktop
|
||||||
0055 stub CloseWindow
|
0055 stub CloseWindow
|
||||||
|
@ -63,7 +63,7 @@ base 1
|
||||||
0058 stub CopyAcceleratorTableW
|
0058 stub CopyAcceleratorTableW
|
||||||
0059 stub CopyIcon
|
0059 stub CopyIcon
|
||||||
0060 stub CopyImage
|
0060 stub CopyImage
|
||||||
0061 stub CopyRect
|
0061 stdcall CopyRect(ptr ptr) CopyRect32
|
||||||
0062 stub CountClipboardFormats
|
0062 stub CountClipboardFormats
|
||||||
0063 stub CreateAcceleratorTableA
|
0063 stub CreateAcceleratorTableA
|
||||||
0064 stub CreateAcceleratorTableW
|
0064 stub CreateAcceleratorTableW
|
||||||
|
@ -164,7 +164,7 @@ base 1
|
||||||
0152 stub DrawAnimatedRects
|
0152 stub DrawAnimatedRects
|
||||||
0153 stub DrawCaption
|
0153 stub DrawCaption
|
||||||
0154 stub DrawEdge
|
0154 stub DrawEdge
|
||||||
0155 stub DrawFocusRect
|
0155 stdcall DrawFocusRect(long ptr) DrawFocusRect32
|
||||||
0156 stub DrawFrame
|
0156 stub DrawFrame
|
||||||
0157 stub DrawFrameControl
|
0157 stub DrawFrameControl
|
||||||
0158 stub DrawIcon
|
0158 stub DrawIcon
|
||||||
|
@ -172,10 +172,10 @@ base 1
|
||||||
0160 stdcall DrawMenuBar(long) DrawMenuBar
|
0160 stdcall DrawMenuBar(long) DrawMenuBar
|
||||||
0161 stub DrawStateA
|
0161 stub DrawStateA
|
||||||
0162 stub DrawStateW
|
0162 stub DrawStateW
|
||||||
0163 stdcall DrawTextA(long ptr long ptr long) USER32_DrawTextA
|
0163 stdcall DrawTextA(long ptr long ptr long) DrawText32A
|
||||||
0164 stub DrawTextExA
|
0164 stub DrawTextExA
|
||||||
0165 stub DrawTextExW
|
0165 stub DrawTextExW
|
||||||
0166 stub DrawTextW
|
0166 stdcall DrawTextW(long ptr long ptr long) DrawText32W
|
||||||
0167 stub EditWndProc
|
0167 stub EditWndProc
|
||||||
0168 stdcall EmptyClipboard() EmptyClipboard
|
0168 stdcall EmptyClipboard() EmptyClipboard
|
||||||
0169 stdcall EnableMenuItem(long long long) EnableMenuItem
|
0169 stdcall EnableMenuItem(long long long) EnableMenuItem
|
||||||
|
@ -184,7 +184,7 @@ base 1
|
||||||
0172 stub EndDeferWindowPos
|
0172 stub EndDeferWindowPos
|
||||||
0173 stdcall EndDialog(long long) EndDialog
|
0173 stdcall EndDialog(long long) EndDialog
|
||||||
0174 stub EndMenu
|
0174 stub EndMenu
|
||||||
0175 stdcall EndPaint(long ptr) USER32_EndPaint
|
0175 stdcall EndPaint(long ptr) EndPaint32
|
||||||
0176 stub EndTask
|
0176 stub EndTask
|
||||||
0177 stub EnumChildWindows
|
0177 stub EnumChildWindows
|
||||||
0178 stub EnumClipboardFormats
|
0178 stub EnumClipboardFormats
|
||||||
|
@ -202,34 +202,34 @@ base 1
|
||||||
0190 stub EnumWindowStationsA
|
0190 stub EnumWindowStationsA
|
||||||
0191 stub EnumWindowStationsW
|
0191 stub EnumWindowStationsW
|
||||||
0192 stub EnumWindows
|
0192 stub EnumWindows
|
||||||
0193 stub EqualRect
|
0193 stdcall EqualRect(ptr ptr) EqualRect32
|
||||||
0194 stub ExcludeUpdateRgn
|
0194 stdcall ExcludeUpdateRgn(long long) ExcludeUpdateRgn
|
||||||
0195 stub ExitWindowsEx
|
0195 stub ExitWindowsEx
|
||||||
0196 stub FillRect
|
0196 stdcall FillRect(long ptr long) FillRect32
|
||||||
0197 return FindWindowA 8 0
|
0197 stdcall FindWindowA(ptr ptr) FindWindow32A
|
||||||
0198 stub FindWindowExA
|
0198 stdcall FindWindowExA(long long ptr ptr) FindWindowEx32A
|
||||||
0199 stub FindWindowExW
|
0199 stdcall FindWindowExW(long long ptr ptr) FindWindowEx32W
|
||||||
0200 stub FindWindowW
|
0200 stdcall FindWindowW(ptr ptr) FindWindow32W
|
||||||
0201 stdcall FlashWindow(long long) FlashWindow
|
0201 stdcall FlashWindow(long long) FlashWindow
|
||||||
0202 stub FrameRect
|
0202 stdcall FrameRect(long ptr long) FrameRect32
|
||||||
0203 stub FreeDDElParam
|
0203 stub FreeDDElParam
|
||||||
0204 stub GetActiveWindow
|
0204 stub GetActiveWindow
|
||||||
0205 stub GetAppCompatFlags
|
0205 stub GetAppCompatFlags
|
||||||
0206 stub GetAsyncKeyState
|
0206 stub GetAsyncKeyState
|
||||||
0207 stub GetCapture
|
0207 stub GetCapture
|
||||||
0208 stub GetCaretBlinkTime
|
0208 stub GetCaretBlinkTime
|
||||||
0209 stub GetCaretPos
|
0209 stdcall GetCaretPos(ptr) GetCaretPos32
|
||||||
0210 stub GetClassInfoA
|
0210 stdcall GetClassInfoA(long ptr ptr) GetClassInfo32A
|
||||||
0211 stub GetClassInfoExA
|
0211 stdcall GetClassInfoExA(long ptr ptr) GetClassInfoEx32A
|
||||||
0212 stub GetClassInfoExW
|
0212 stdcall GetClassInfoExW(long ptr ptr) GetClassInfoEx32W
|
||||||
0213 stub GetClassInfoW
|
0213 stdcall GetClassInfoW(long ptr ptr) GetClassInfo32W
|
||||||
0214 stub GetClassLongA
|
0214 stdcall GetClassLongA(long long) GetClassLong32A
|
||||||
0215 stub GetClassLongW
|
0215 stdcall GetClassLongW(long long) GetClassLong32W
|
||||||
0216 stub GetClassNameA
|
0216 stdcall GetClassNameA(long ptr long) GetClassName32A
|
||||||
0217 stub GetClassNameW
|
0217 stdcall GetClassNameW(long ptr long) GetClassName32W
|
||||||
0218 stub GetClassWord
|
0218 stdcall GetClassWord(long long) GetClassWord
|
||||||
0219 stdcall GetClientRect(long long) USER32_GetClientRect
|
0219 stdcall GetClientRect(long long) GetClientRect32
|
||||||
0220 stub GetClipCursor
|
0220 stdcall GetClipCursor(ptr) GetClipCursor32
|
||||||
0221 stub GetClipboardData
|
0221 stub GetClipboardData
|
||||||
0222 stub GetClipboardFormatNameA
|
0222 stub GetClipboardFormatNameA
|
||||||
0223 stub GetClipboardFormatNameW
|
0223 stub GetClipboardFormatNameW
|
||||||
|
@ -237,7 +237,7 @@ base 1
|
||||||
0225 stub GetClipboardViewer
|
0225 stub GetClipboardViewer
|
||||||
0226 stub GetCursor
|
0226 stub GetCursor
|
||||||
0227 stub GetCursorInfo
|
0227 stub GetCursorInfo
|
||||||
0228 stdcall GetCursorPos(ptr) GetCursorPos
|
0228 stdcall GetCursorPos(ptr) GetCursorPos32
|
||||||
0229 stdcall GetDC(long) GetDC
|
0229 stdcall GetDC(long) GetDC
|
||||||
0230 stub GetDCEx
|
0230 stub GetDCEx
|
||||||
0231 stdcall GetDesktopWindow() GetDesktopWindow
|
0231 stdcall GetDesktopWindow() GetDesktopWindow
|
||||||
|
@ -253,7 +253,7 @@ base 1
|
||||||
0241 stub GetIconInfo
|
0241 stub GetIconInfo
|
||||||
0242 stub GetInputDesktop
|
0242 stub GetInputDesktop
|
||||||
0243 stub GetInputState
|
0243 stub GetInputState
|
||||||
0244 stub GetInternalWindowPos
|
0244 stdcall GetInternalWindowPos(long ptr ptr) GetInternalWindowPos32
|
||||||
0245 stub GetKBCodePage
|
0245 stub GetKBCodePage
|
||||||
0246 stub GetKeyNameTextA
|
0246 stub GetKeyNameTextA
|
||||||
0247 stub GetKeyNameTextW
|
0247 stub GetKeyNameTextW
|
||||||
|
@ -296,7 +296,7 @@ base 1
|
||||||
0284 stub GetScrollPos
|
0284 stub GetScrollPos
|
||||||
0285 stub GetScrollRange
|
0285 stub GetScrollRange
|
||||||
0286 stub GetShellWindow
|
0286 stub GetShellWindow
|
||||||
0287 stub GetSubMenu
|
0287 stdcall GetSubMenu(long long) GetSubMenu
|
||||||
0288 stdcall GetSysColor(long) GetSysColor
|
0288 stdcall GetSysColor(long) GetSysColor
|
||||||
0289 stdcall GetSysColorBrush(long) GetSysColorBrush
|
0289 stdcall GetSysColorBrush(long) GetSysColorBrush
|
||||||
0290 stdcall GetSystemMenu(long long) GetSystemMenu
|
0290 stdcall GetSystemMenu(long long) GetSystemMenu
|
||||||
|
@ -305,8 +305,8 @@ base 1
|
||||||
0293 stub GetTabbedTextExtentW
|
0293 stub GetTabbedTextExtentW
|
||||||
0294 stub GetThreadDesktop
|
0294 stub GetThreadDesktop
|
||||||
0295 stub GetTopWindow
|
0295 stub GetTopWindow
|
||||||
0296 stub GetUpdateRect
|
0296 stdcall GetUpdateRect(long ptr long) GetUpdateRect32
|
||||||
0297 stub GetUpdateRgn
|
0297 stdcall GetUpdateRgn(long long long) GetUpdateRgn
|
||||||
0298 stub GetUserObjectInformationA
|
0298 stub GetUserObjectInformationA
|
||||||
0299 stub GetUserObjectInformationW
|
0299 stub GetUserObjectInformationW
|
||||||
0300 stub GetUserObjectSecurity
|
0300 stub GetUserObjectSecurity
|
||||||
|
@ -315,8 +315,8 @@ base 1
|
||||||
0303 stdcall GetWindowDC(long) GetWindowDC
|
0303 stdcall GetWindowDC(long) GetWindowDC
|
||||||
0304 stub GetWindowLongA
|
0304 stub GetWindowLongA
|
||||||
0305 stub GetWindowLongW
|
0305 stub GetWindowLongW
|
||||||
0306 stub GetWindowPlacement
|
0306 stdcall GetWindowPlacement(long ptr) GetWindowPlacement32
|
||||||
0307 stub GetWindowRect
|
0307 stdcall GetWindowRect(long ptr) GetWindowRect32
|
||||||
0308 stdcall GetWindowTextA(long segptr long) WIN16_GetWindowText
|
0308 stdcall GetWindowTextA(long segptr long) WIN16_GetWindowText
|
||||||
0309 stub GetWindowTextLengthA
|
0309 stub GetWindowTextLengthA
|
||||||
0310 stub GetWindowTextLengthW
|
0310 stub GetWindowTextLengthW
|
||||||
|
@ -329,16 +329,16 @@ base 1
|
||||||
0317 stub HiliteMenuItem
|
0317 stub HiliteMenuItem
|
||||||
0318 stub ImpersonateDdeClientWindow
|
0318 stub ImpersonateDdeClientWindow
|
||||||
0319 stub InSendMessage
|
0319 stub InSendMessage
|
||||||
0320 stub InflateRect
|
0320 stdcall InflateRect(ptr long long) InflateRect32
|
||||||
0321 stub InsertMenuA
|
0321 stub InsertMenuA
|
||||||
0322 stub InsertMenuItemA
|
0322 stub InsertMenuItemA
|
||||||
0323 stub InsertMenuItemW
|
0323 stub InsertMenuItemW
|
||||||
0324 stub InsertMenuW
|
0324 stub InsertMenuW
|
||||||
0325 stub InternalGetWindowText
|
0325 stub InternalGetWindowText
|
||||||
0326 stub IntersectRect
|
0326 stdcall IntersectRect(ptr ptr ptr) IntersectRect32
|
||||||
0327 stdcall InvalidateRect(long ptr long) USER32_InvalidateRect
|
0327 stdcall InvalidateRect(long ptr long) InvalidateRect32
|
||||||
0328 stub InvalidateRgn
|
0328 stdcall InvalidateRgn(long long long) InvalidateRgn
|
||||||
0329 stub InvertRect
|
0329 stdcall InvertRect(long ptr) InvertRect32
|
||||||
0330 stub IsCharAlphaA
|
0330 stub IsCharAlphaA
|
||||||
0331 stub IsCharAlphaNumericA
|
0331 stub IsCharAlphaNumericA
|
||||||
0332 stub IsCharAlphaNumericW
|
0332 stub IsCharAlphaNumericW
|
||||||
|
@ -355,11 +355,11 @@ base 1
|
||||||
0343 stub IsDlgButtonChecked
|
0343 stub IsDlgButtonChecked
|
||||||
0344 stdcall IsIconic(long) IsIconic
|
0344 stdcall IsIconic(long) IsIconic
|
||||||
0345 stub IsMenu
|
0345 stub IsMenu
|
||||||
0346 stub IsRectEmpty
|
0346 stdcall IsRectEmpty(ptr) IsRectEmpty32
|
||||||
0347 stub IsWindow
|
0347 stub IsWindow
|
||||||
0348 stub IsWindowEnabled
|
0348 stdcall IsWindowEnabled(long) IsWindowEnabled
|
||||||
0349 stub IsWindowUnicode
|
0349 stdcall IsWindowUnicode(long) IsWindowUnicode
|
||||||
0350 stub IsWindowVisible
|
0350 stdcall IsWindowVisible(long) IsWindowVisible
|
||||||
0351 stub IsZoomed
|
0351 stub IsZoomed
|
||||||
0352 stub KillSystemTimer
|
0352 stub KillSystemTimer
|
||||||
0353 stdcall KillTimer(long long) KillTimer
|
0353 stdcall KillTimer(long long) KillTimer
|
||||||
|
@ -390,11 +390,11 @@ base 1
|
||||||
0378 stub LookupIconIdFromDirectory
|
0378 stub LookupIconIdFromDirectory
|
||||||
0379 stub LookupIconIdFromDirectoryEx
|
0379 stub LookupIconIdFromDirectoryEx
|
||||||
0380 stub MBToWCSEx
|
0380 stub MBToWCSEx
|
||||||
0381 stub MapDialogRect
|
0381 stdcall MapDialogRect(long ptr) MapDialogRect32
|
||||||
0382 stub MapVirtualKeyA
|
0382 stub MapVirtualKeyA
|
||||||
0383 stub MapVirtualKeyExA
|
0383 stub MapVirtualKeyExA
|
||||||
0384 stub MapVirtualKeyW
|
0384 stub MapVirtualKeyW
|
||||||
0385 stub MapWindowPoints
|
0385 stdcall MapWindowPoints(long long ptr long) MapWindowPoints32
|
||||||
0386 stub MenuItemFromPoint
|
0386 stub MenuItemFromPoint
|
||||||
0387 stub MenuWindowProcA
|
0387 stub MenuWindowProcA
|
||||||
0388 stub MenuWindowProcW
|
0388 stub MenuWindowProcW
|
||||||
|
@ -407,14 +407,14 @@ base 1
|
||||||
0395 stub MessageBoxW
|
0395 stub MessageBoxW
|
||||||
0396 stub ModifyMenuA
|
0396 stub ModifyMenuA
|
||||||
0397 stub ModifyMenuW
|
0397 stub ModifyMenuW
|
||||||
0398 stub MoveWindow
|
0398 stdcall MoveWindow(long long long long long long) MoveWindow
|
||||||
0399 stub MsgWaitForMultipleObjects
|
0399 stub MsgWaitForMultipleObjects
|
||||||
0400 stub OemKeyScan
|
0400 stub OemKeyScan
|
||||||
0401 stub OemToCharA
|
0401 stub OemToCharA
|
||||||
0402 stub OemToCharBuffA
|
0402 stub OemToCharBuffA
|
||||||
0403 stub OemToCharBuffW
|
0403 stub OemToCharBuffW
|
||||||
0404 stub OemToCharW
|
0404 stub OemToCharW
|
||||||
0405 stub OffsetRect
|
0405 stdcall OffsetRect(ptr long long) OffsetRect32
|
||||||
0406 stub OpenClipboard
|
0406 stub OpenClipboard
|
||||||
0407 stub OpenDesktopA
|
0407 stub OpenDesktopA
|
||||||
0408 stub OpenDesktopW
|
0408 stub OpenDesktopW
|
||||||
|
@ -432,21 +432,21 @@ base 1
|
||||||
0420 stdcall PostQuitMessage(long) PostQuitMessage
|
0420 stdcall PostQuitMessage(long) PostQuitMessage
|
||||||
0421 stub PostThreadMessageA
|
0421 stub PostThreadMessageA
|
||||||
0422 stub PostThreadMessageW
|
0422 stub PostThreadMessageW
|
||||||
0423 stub PtInRect
|
0423 stdcall PtInRect(ptr long long) PtInRect32
|
||||||
0424 stub QuerySendMessage
|
0424 stub QuerySendMessage
|
||||||
0425 stub RedrawWindow
|
0425 stdcall RedrawWindow(long ptr long long) RedrawWindow32
|
||||||
0426 stdcall RegisterClassA(ptr) RegisterClass32A
|
0426 stdcall RegisterClassA(ptr) RegisterClass32A
|
||||||
0427 stub RegisterClassExA
|
0427 stdcall RegisterClassExA(ptr) RegisterClassEx32A
|
||||||
0428 stub RegisterClassExW
|
0428 stdcall RegisterClassExW(ptr) RegisterClassEx32W
|
||||||
0429 stub RegisterClassW
|
0429 stdcall RegisterClassW(ptr) RegisterClass32W
|
||||||
0430 stub RegisterClipboardFormatA
|
0430 stub RegisterClipboardFormatA
|
||||||
0431 stub RegisterClipboardFormatW
|
0431 stub RegisterClipboardFormatW
|
||||||
0432 stub RegisterHotKey
|
0432 stub RegisterHotKey
|
||||||
0433 stub RegisterLogonProcess
|
0433 stub RegisterLogonProcess
|
||||||
0434 stub RegisterSystemThread
|
0434 stub RegisterSystemThread
|
||||||
0435 stub RegisterTasklist
|
0435 stub RegisterTasklist
|
||||||
0436 stub RegisterWindowMessageA
|
0436 stdcall RegisterWindowMessageA(ptr) RegisterWindowMessage32A
|
||||||
0437 stub RegisterWindowMessageW
|
0437 stdcall RegisterWindowMessageW(ptr) RegisterWindowMessage32W
|
||||||
0438 stdcall ReleaseCapture() ReleaseCapture
|
0438 stdcall ReleaseCapture() ReleaseCapture
|
||||||
0439 stdcall ReleaseDC(long long) ReleaseDC
|
0439 stdcall ReleaseDC(long long) ReleaseDC
|
||||||
0440 stub RemoveMenu
|
0440 stub RemoveMenu
|
||||||
|
@ -455,7 +455,7 @@ base 1
|
||||||
0443 stub ReplyMessage
|
0443 stub ReplyMessage
|
||||||
0444 stub ResetDisplay
|
0444 stub ResetDisplay
|
||||||
0445 stub ReuseDDElParam
|
0445 stub ReuseDDElParam
|
||||||
0446 stub ScreenToClient
|
0446 stdcall ScreenToClient(long ptr) ScreenToClient32
|
||||||
0447 stub ScrollChildren
|
0447 stub ScrollChildren
|
||||||
0448 stub ScrollDC
|
0448 stub ScrollDC
|
||||||
0449 stub ScrollWindow
|
0449 stub ScrollWindow
|
||||||
|
@ -475,9 +475,9 @@ base 1
|
||||||
0463 stdcall SetCapture(long) SetCapture
|
0463 stdcall SetCapture(long) SetCapture
|
||||||
0464 stub SetCaretBlinkTime
|
0464 stub SetCaretBlinkTime
|
||||||
0465 stub SetCaretPos
|
0465 stub SetCaretPos
|
||||||
0466 stub SetClassLongA
|
0466 stdcall SetClassLongA(long long long) SetClassLong32A
|
||||||
0467 stub SetClassLongW
|
0467 stdcall SetClassLongW(long long long) SetClassLong32W
|
||||||
0468 stub SetClassWord
|
0468 stdcall SetClassWord(long long long) SetClassWord
|
||||||
0469 stub SetClipboardData
|
0469 stub SetClipboardData
|
||||||
0470 stub SetClipboardViewer
|
0470 stub SetClipboardViewer
|
||||||
0471 stdcall SetCursor(long) SetCursor
|
0471 stdcall SetCursor(long) SetCursor
|
||||||
|
@ -491,7 +491,7 @@ base 1
|
||||||
0479 stub SetDoubleClickTime
|
0479 stub SetDoubleClickTime
|
||||||
0480 stub SetFocus
|
0480 stub SetFocus
|
||||||
0481 stub SetForegroundWindow
|
0481 stub SetForegroundWindow
|
||||||
0482 stub SetInternalWindowPos
|
0482 stdcall SetInternalWindowPos(long long ptr ptr) SetInternalWindowPos32
|
||||||
0483 stub SetKeyboardState
|
0483 stub SetKeyboardState
|
||||||
0484 stub SetLastErrorEx
|
0484 stub SetLastErrorEx
|
||||||
0485 stub SetLogonNotifyWindow
|
0485 stub SetLogonNotifyWindow
|
||||||
|
@ -507,11 +507,11 @@ base 1
|
||||||
0495 stub SetProcessWindowStation
|
0495 stub SetProcessWindowStation
|
||||||
0496 stub SetPropA
|
0496 stub SetPropA
|
||||||
0497 stub SetPropW
|
0497 stub SetPropW
|
||||||
0498 stub SetRect
|
0498 stdcall SetRect(ptr long long long long) SetRect32
|
||||||
0499 stub SetRectEmpty
|
0499 stdcall SetRectEmpty(ptr) SetRectEmpty32
|
||||||
0500 stub SetScrollInfo
|
0500 stub SetScrollInfo
|
||||||
0501 stub SetScrollPos
|
0501 stdcall SetScrollPos(long long long long) SetScrollPos
|
||||||
0502 stub SetScrollRange
|
0502 stdcall SetScrollRange(long long long long long) SetScrollRange
|
||||||
0503 stub SetShellWindow
|
0503 stub SetShellWindow
|
||||||
0504 stub SetSysColors
|
0504 stub SetSysColors
|
||||||
0505 stub SetSysColorsTemp
|
0505 stub SetSysColorsTemp
|
||||||
|
@ -527,14 +527,14 @@ base 1
|
||||||
0515 stub SetWindowFullScreenState
|
0515 stub SetWindowFullScreenState
|
||||||
0516 stub SetWindowLongA
|
0516 stub SetWindowLongA
|
||||||
0517 stub SetWindowLongW
|
0517 stub SetWindowLongW
|
||||||
0518 stub SetWindowPlacement
|
0518 stdcall SetWindowPlacement(long ptr) SetWindowPlacement32
|
||||||
0519 stub SetWindowPos
|
0519 stub SetWindowPos
|
||||||
0520 stub SetWindowStationUser
|
0520 stub SetWindowStationUser
|
||||||
0521 stdcall SetWindowTextA(long ptr) SetWindowText
|
0521 stdcall SetWindowTextA(long ptr) SetWindowText
|
||||||
0522 stub SetWindowTextW
|
0522 stub SetWindowTextW
|
||||||
0523 stub SetWindowWord
|
0523 stub SetWindowWord
|
||||||
0524 stub SetWindowsHookA
|
0524 stub SetWindowsHookA
|
||||||
0525 stub SetWindowsHookExA
|
0525 stdcall SetWindowsHookExA(long long long long) SetWindowsHookEx32A
|
||||||
0526 stub SetWindowsHookExW
|
0526 stub SetWindowsHookExW
|
||||||
0527 stub SetWindowsHookW
|
0527 stub SetWindowsHookW
|
||||||
0528 stub ShowCaret
|
0528 stub ShowCaret
|
||||||
|
@ -544,7 +544,7 @@ base 1
|
||||||
0532 stub ShowStartGlass
|
0532 stub ShowStartGlass
|
||||||
0533 stdcall ShowWindow(long long) ShowWindow
|
0533 stdcall ShowWindow(long long) ShowWindow
|
||||||
0534 stub ShowWindowAsync
|
0534 stub ShowWindowAsync
|
||||||
0535 stub SubtractRect
|
0535 stdcall SubtractRect(ptr ptr ptr) SubtractRect32
|
||||||
0536 stub SwapMouseButton
|
0536 stub SwapMouseButton
|
||||||
0537 stub SwitchDesktop
|
0537 stub SwitchDesktop
|
||||||
0538 stub SwitchToThisWindow
|
0538 stub SwitchToThisWindow
|
||||||
|
@ -557,7 +557,7 @@ base 1
|
||||||
0545 stub ToAscii
|
0545 stub ToAscii
|
||||||
0546 stub ToAsciiEx
|
0546 stub ToAsciiEx
|
||||||
0547 stub ToUnicode
|
0547 stub ToUnicode
|
||||||
0548 stub TrackPopupMenu
|
0548 stdcall TrackPopupMenu(long long long long long long ptr) TrackPopupMenu32
|
||||||
0549 stub TrackPopupMenuEx
|
0549 stub TrackPopupMenuEx
|
||||||
0550 stub TranslateAccelerator
|
0550 stub TranslateAccelerator
|
||||||
0551 stdcall TranslateAcceleratorA(long long ptr) TranslateAccelerator
|
0551 stdcall TranslateAcceleratorA(long long ptr) TranslateAccelerator
|
||||||
|
@ -567,20 +567,20 @@ base 1
|
||||||
0555 stdcall TranslateMessage(ptr) USER32_TranslateMessage
|
0555 stdcall TranslateMessage(ptr) USER32_TranslateMessage
|
||||||
0556 stub UnhookWindowsHook
|
0556 stub UnhookWindowsHook
|
||||||
0557 stub UnhookWindowsHookEx
|
0557 stub UnhookWindowsHookEx
|
||||||
0558 stub UnionRect
|
0558 stdcall UnionRect(ptr ptr ptr) UnionRect32
|
||||||
0559 stub UnloadKeyboardLayout
|
0559 stub UnloadKeyboardLayout
|
||||||
0560 stub UnlockWindowStation
|
0560 stub UnlockWindowStation
|
||||||
0561 stub UnpackDDElParam
|
0561 stub UnpackDDElParam
|
||||||
0562 stub UnregisterClassA
|
0562 stdcall UnregisterClassA(ptr long) UnregisterClass32A
|
||||||
0563 stub UnregisterClassW
|
0563 stdcall UnregisterClassW(ptr long) UnregisterClass32W
|
||||||
0564 stub UnregisterHotKey
|
0564 stub UnregisterHotKey
|
||||||
0565 stub UpdatePerUserSystemParameters
|
0565 stub UpdatePerUserSystemParameters
|
||||||
0566 stdcall UpdateWindow(long) UpdateWindow
|
0566 stdcall UpdateWindow(long) UpdateWindow
|
||||||
0567 stub UserClientDllInitialize
|
0567 stub UserClientDllInitialize
|
||||||
0568 stub UserRealizePalette
|
0568 stub UserRealizePalette
|
||||||
0569 stub UserRegisterWowHandlers
|
0569 stub UserRegisterWowHandlers
|
||||||
0570 stub ValidateRect
|
0570 stdcall ValidateRect(long ptr) ValidateRect32
|
||||||
0571 stub ValidateRgn
|
0571 stdcall ValidateRgn(long long) ValidateRgn
|
||||||
0572 stub VkKeyScanA
|
0572 stub VkKeyScanA
|
||||||
0573 stub VkKeyScanExA
|
0573 stub VkKeyScanExA
|
||||||
0574 stub VkKeyScanExW
|
0574 stub VkKeyScanExW
|
||||||
|
@ -590,7 +590,7 @@ base 1
|
||||||
0578 stdcall WinHelpA(long ptr long long) WIN32_WinHelpA
|
0578 stdcall WinHelpA(long ptr long long) WIN32_WinHelpA
|
||||||
0579 stub WinHelpW
|
0579 stub WinHelpW
|
||||||
0580 stub WindowFromDC
|
0580 stub WindowFromDC
|
||||||
0581 stub WindowFromPoint
|
0581 stdcall WindowFromPoint(long long) WindowFromPoint32
|
||||||
0582 stub keybd_event
|
0582 stub keybd_event
|
||||||
0583 stub mouse_event
|
0583 stub mouse_event
|
||||||
0584 stdcall wsprintfA() USER32_wsprintfA
|
0584 stdcall wsprintfA() USER32_wsprintfA
|
||||||
|
@ -608,4 +608,3 @@ base 1
|
||||||
0588 stub RegisterServicesProcess
|
0588 stub RegisterServicesProcess
|
||||||
0588 stub SetWindowRgn
|
0588 stub SetWindowRgn
|
||||||
0588 stub ToUnicodeEx
|
0588 stub ToUnicodeEx
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ typedef struct
|
||||||
GDIOBJHDR header;
|
GDIOBJHDR header;
|
||||||
BITMAP bitmap;
|
BITMAP bitmap;
|
||||||
Pixmap pixmap;
|
Pixmap pixmap;
|
||||||
SIZE size; /* For SetBitmapDimension() */
|
SIZE16 size; /* For SetBitmapDimension() */
|
||||||
} BITMAPOBJ;
|
} BITMAPOBJ;
|
||||||
|
|
||||||
/* GCs used for B&W and color bitmap operations */
|
/* GCs used for B&W and color bitmap operations */
|
||||||
|
|
|
@ -64,7 +64,7 @@ extern WORD CallTo16_regs_( FARPROC func, WORD ds, WORD es, WORD bp, WORD ax,
|
||||||
CallTo16_long_wwl( func, CURRENT_DS, code, wParam, lParam )
|
CallTo16_long_wwl( func, CURRENT_DS, code, wParam, lParam )
|
||||||
#define CallTimeFuncProc( func, id, msg, dwUser, dw1, dw2 ) \
|
#define CallTimeFuncProc( func, id, msg, dwUser, dw1, dw2 ) \
|
||||||
CallTo16_word_wwlll( func, CURRENT_DS, id, msg, dwUser, dw1, dw2 )
|
CallTo16_word_wwlll( func, CURRENT_DS, id, msg, dwUser, dw1, dw2 )
|
||||||
#define CallWndProc( func, ds, hwnd, msg, wParam, lParam ) \
|
#define CallWndProc16( func, ds, hwnd, msg, wParam, lParam ) \
|
||||||
CallTo16_long_wwwl( func, ds, hwnd, msg, wParam, lParam )
|
CallTo16_long_wwwl( func, ds, hwnd, msg, wParam, lParam )
|
||||||
#define CallWordBreakProc( func, lpch, ichCurrent, cch, code ) \
|
#define CallWordBreakProc( func, lpch, ichCurrent, cch, code ) \
|
||||||
CallTo16_word_lwww( func, CURRENT_DS, lpch, ichCurrent, cch, code )
|
CallTo16_word_lwww( func, CURRENT_DS, lpch, ichCurrent, cch, code )
|
||||||
|
@ -73,9 +73,9 @@ extern WORD CallTo16_regs_( FARPROC func, WORD ds, WORD es, WORD bp, WORD ax,
|
||||||
/* List of the 32-bit callback functions. This list is used */
|
/* List of the 32-bit callback functions. This list is used */
|
||||||
/* by the build program to generate the file if1632/callto32.S */
|
/* by the build program to generate the file if1632/callto32.S */
|
||||||
|
|
||||||
extern LONG CallTo32_0( FARPROC );
|
extern LONG CallTo32_0( FARPROC32 );
|
||||||
extern LONG CallTo32_3( FARPROC, DWORD, DWORD, DWORD );
|
extern LONG CallTo32_3( FARPROC32, DWORD, DWORD, DWORD );
|
||||||
extern LONG CallTo32_4( FARPROC, DWORD, DWORD, DWORD, DWORD );
|
extern LONG CallTo32_4( FARPROC32, DWORD, DWORD, DWORD, DWORD );
|
||||||
|
|
||||||
#define CallTaskStart32( func ) \
|
#define CallTaskStart32( func ) \
|
||||||
CallTo32_0( func )
|
CallTo32_0( func )
|
||||||
|
@ -111,11 +111,14 @@ extern LONG CallTo32_4( FARPROC, DWORD, DWORD, DWORD, DWORD );
|
||||||
(*func)( code, wParam, lParam )
|
(*func)( code, wParam, lParam )
|
||||||
#define CallTimeFuncProc( func, id, msg, dwUser, dw1, dw2 ) \
|
#define CallTimeFuncProc( func, id, msg, dwUser, dw1, dw2 ) \
|
||||||
(*func)( id, msg, dwUser, dw1, dw2 )
|
(*func)( id, msg, dwUser, dw1, dw2 )
|
||||||
#define CallWndProc( func, ds, hwnd, msg, wParam, lParam ) \
|
#define CallWndProc16( func, ds, hwnd, msg, wParam, lParam ) \
|
||||||
|
(*func)( hwnd, msg, wParam, lParam )
|
||||||
|
#define CallWndProc32( func, hwnd, msg, wParam, lParam ) \
|
||||||
(*func)( hwnd, msg, wParam, lParam )
|
(*func)( hwnd, msg, wParam, lParam )
|
||||||
#define CallWordBreakProc( func, lpch, ichCurrent, cch, code ) \
|
#define CallWordBreakProc( func, lpch, ichCurrent, cch, code ) \
|
||||||
(*func)( lpch, ichCurrent, cch, code )
|
(*func)( lpch, ichCurrent, cch, code )
|
||||||
|
|
||||||
|
|
||||||
#endif /* WINELIB */
|
#endif /* WINELIB */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,22 +17,29 @@ typedef struct tagCLASS
|
||||||
UINT32 magic; /* Magic number */
|
UINT32 magic; /* Magic number */
|
||||||
UINT32 cWindows; /* Count of existing windows */
|
UINT32 cWindows; /* Count of existing windows */
|
||||||
UINT32 style; /* Class style */
|
UINT32 style; /* Class style */
|
||||||
|
UINT32 flags; /* Class flags (see below) */
|
||||||
WNDPROC16 lpfnWndProc; /* 16-bit window procedure */
|
WNDPROC16 lpfnWndProc; /* 16-bit window procedure */
|
||||||
INT32 cbClsExtra; /* Class extra bytes */
|
INT32 cbClsExtra; /* Class extra bytes */
|
||||||
INT32 cbWndExtra; /* Window extra bytes */
|
INT32 cbWndExtra; /* Window extra bytes */
|
||||||
SEGPTR lpszMenuName; /* Default menu name */
|
LPSTR menuNameA; /* Default menu name (ASCII string) */
|
||||||
HANDLE16 hInstance; /* Module that created the task */
|
LPWSTR menuNameW; /* Default menu name (Unicode) */
|
||||||
|
HINSTANCE32 hInstance; /* Module that created the task */
|
||||||
HICON16 hIcon; /* Default icon */
|
HICON16 hIcon; /* Default icon */
|
||||||
|
HICON16 hIconSm; /* Default small icon */
|
||||||
HCURSOR16 hCursor; /* Default cursor */
|
HCURSOR16 hCursor; /* Default cursor */
|
||||||
HBRUSH16 hbrBackground; /* Default background */
|
HBRUSH16 hbrBackground; /* Default background */
|
||||||
ATOM atomName; /* Name of the class */
|
ATOM atomName; /* Name of the class */
|
||||||
HANDLE16 hdce; /* Class DCE (if CS_CLASSDC) */
|
HANDLE16 hdce; /* Class DCE (if CS_CLASSDC) */
|
||||||
WORD wExtra[1]; /* Class extra bytes */
|
LONG wExtra[1]; /* Class extra bytes */
|
||||||
} CLASS;
|
} CLASS;
|
||||||
|
|
||||||
|
/* Class flags */
|
||||||
|
#define CLASS_FLAG_UNICODE 0x0001 /* Window procedure expects Unicode */
|
||||||
|
|
||||||
extern void CLASS_DumpClass( CLASS *class );
|
extern void CLASS_DumpClass( CLASS *class );
|
||||||
extern void CLASS_WalkClasses(void);
|
extern void CLASS_WalkClasses(void);
|
||||||
extern void CLASS_FreeModuleClasses( HMODULE hModule );
|
extern void CLASS_FreeModuleClasses( HMODULE hModule );
|
||||||
|
extern CLASS *CLASS_FindClassByAtom( ATOM atom, HINSTANCE16 hinstance );
|
||||||
extern CLASS * CLASS_FindClassByName( SEGPTR name, HINSTANCE hinstance );
|
extern CLASS * CLASS_FindClassByName( SEGPTR name, HINSTANCE hinstance );
|
||||||
|
|
||||||
#endif /* CLASS_H */
|
#endif /* CLASS_H */
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "gdi.h"
|
#include "gdi.h"
|
||||||
|
|
||||||
extern HPALETTE COLOR_Init(void);
|
extern HPALETTE16 COLOR_Init(void);
|
||||||
extern int COLOR_ToPhysical( DC *dc, COLORREF color );
|
extern int COLOR_ToPhysical( DC *dc, COLORREF color );
|
||||||
extern void COLOR_SetMapping( DC *dc, HANDLE map, HANDLE revMap, WORD size );
|
extern void COLOR_SetMapping( DC *dc, HANDLE map, HANDLE revMap, WORD size );
|
||||||
extern BOOL COLOR_IsSolid( COLORREF color );
|
extern BOOL COLOR_IsSolid( COLORREF color );
|
||||||
|
|
|
@ -4,16 +4,16 @@
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DWORD dwStyle;
|
DWORD dwStyle;
|
||||||
DWORD dwState;
|
DWORD dwState;
|
||||||
HWND hWndEdit;
|
HWND hWndEdit;
|
||||||
HWND hWndLBox;
|
HWND hWndLBox;
|
||||||
WORD LBoxTop;
|
WORD LBoxTop;
|
||||||
BOOL DropDownVisible;
|
BOOL DropDownVisible;
|
||||||
short LastSel;
|
short LastSel;
|
||||||
RECT RectEdit;
|
RECT16 RectEdit;
|
||||||
RECT RectButton;
|
RECT16 RectButton;
|
||||||
BOOL bRedrawFlag;
|
BOOL bRedrawFlag;
|
||||||
} HEADCOMBO,*LPHEADCOMBO;
|
} HEADCOMBO,*LPHEADCOMBO;
|
||||||
|
|
||||||
LRESULT ComboBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
LRESULT ComboBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
|
@ -13,7 +13,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
HBRUSH hbrushPattern;
|
HBRUSH hbrushPattern;
|
||||||
HBITMAP hbitmapWallPaper;
|
HBITMAP hbitmapWallPaper;
|
||||||
SIZE bitmapSize;
|
SIZE16 bitmapSize;
|
||||||
BOOL fTileWallPaper;
|
BOOL fTileWallPaper;
|
||||||
} DESKTOPINFO;
|
} DESKTOPINFO;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
UINT gmBlackBoxX;
|
UINT gmBlackBoxX;
|
||||||
UINT gmBlackBoxY;
|
UINT gmBlackBoxY;
|
||||||
POINT gmptGlyphOrigin;
|
POINT16 gmptGlyphOrigin;
|
||||||
int gmCellIncX;
|
int gmCellIncX;
|
||||||
int gmCellIncY;
|
int gmCellIncY;
|
||||||
} GLYPHMETRICS,*LPGLYPHMETRICS;
|
} GLYPHMETRICS,*LPGLYPHMETRICS;
|
||||||
|
|
|
@ -90,13 +90,13 @@ typedef struct
|
||||||
HRGN hClipRgn; /* Clip region (may be 0) */
|
HRGN hClipRgn; /* Clip region (may be 0) */
|
||||||
HRGN hVisRgn; /* Visible region (must never be 0) */
|
HRGN hVisRgn; /* Visible region (must never be 0) */
|
||||||
HRGN hGCClipRgn; /* GC clip region (ClipRgn AND VisRgn) */
|
HRGN hGCClipRgn; /* GC clip region (ClipRgn AND VisRgn) */
|
||||||
HPEN hPen;
|
HPEN16 hPen;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
HFONT hFont;
|
HFONT hFont;
|
||||||
HBITMAP hBitmap;
|
HBITMAP hBitmap;
|
||||||
HBITMAP hFirstBitmap; /* Bitmap selected at creation of the DC */
|
HBITMAP hFirstBitmap; /* Bitmap selected at creation of the DC */
|
||||||
HANDLE hDevice;
|
HANDLE hDevice;
|
||||||
HPALETTE hPalette;
|
HPALETTE16 hPalette;
|
||||||
|
|
||||||
WORD ROPmode;
|
WORD ROPmode;
|
||||||
WORD polyFillMode;
|
WORD polyFillMode;
|
||||||
|
@ -214,15 +214,15 @@ typedef struct tagDC
|
||||||
#define STOCK_BLACK_BRUSH ((HBRUSH)(FIRST_STOCK_HANDLE+BLACK_BRUSH))
|
#define STOCK_BLACK_BRUSH ((HBRUSH)(FIRST_STOCK_HANDLE+BLACK_BRUSH))
|
||||||
#define STOCK_NULL_BRUSH ((HBRUSH)(FIRST_STOCK_HANDLE+NULL_BRUSH))
|
#define STOCK_NULL_BRUSH ((HBRUSH)(FIRST_STOCK_HANDLE+NULL_BRUSH))
|
||||||
#define STOCK_HOLLOW_BRUSH ((HBRUSH)(FIRST_STOCK_HANDLE+HOLLOW_BRUSH))
|
#define STOCK_HOLLOW_BRUSH ((HBRUSH)(FIRST_STOCK_HANDLE+HOLLOW_BRUSH))
|
||||||
#define STOCK_WHITE_PEN ((HPEN)(FIRST_STOCK_HANDLE+WHITE_PEN))
|
#define STOCK_WHITE_PEN ((HPEN16)(FIRST_STOCK_HANDLE+WHITE_PEN))
|
||||||
#define STOCK_BLACK_PEN ((HPEN)(FIRST_STOCK_HANDLE+BLACK_PEN))
|
#define STOCK_BLACK_PEN ((HPEN16)(FIRST_STOCK_HANDLE+BLACK_PEN))
|
||||||
#define STOCK_NULL_PEN ((HPEN)(FIRST_STOCK_HANDLE+NULL_PEN))
|
#define STOCK_NULL_PEN ((HPEN16)(FIRST_STOCK_HANDLE+NULL_PEN))
|
||||||
#define STOCK_OEM_FIXED_FONT ((HFONT)(FIRST_STOCK_HANDLE+OEM_FIXED_FONT))
|
#define STOCK_OEM_FIXED_FONT ((HFONT)(FIRST_STOCK_HANDLE+OEM_FIXED_FONT))
|
||||||
#define STOCK_ANSI_FIXED_FONT ((HFONT)(FIRST_STOCK_HANDLE+ANSI_FIXED_FONT))
|
#define STOCK_ANSI_FIXED_FONT ((HFONT)(FIRST_STOCK_HANDLE+ANSI_FIXED_FONT))
|
||||||
#define STOCK_ANSI_VAR_FONT ((HFONT)(FIRST_STOCK_HANDLE+ANSI_VAR_FONT))
|
#define STOCK_ANSI_VAR_FONT ((HFONT)(FIRST_STOCK_HANDLE+ANSI_VAR_FONT))
|
||||||
#define STOCK_SYSTEM_FONT ((HFONT)(FIRST_STOCK_HANDLE+SYSTEM_FONT))
|
#define STOCK_SYSTEM_FONT ((HFONT)(FIRST_STOCK_HANDLE+SYSTEM_FONT))
|
||||||
#define STOCK_DEVICE_DEFAULT_FONT ((HFONT)(FIRST_STOCK_HANDLE+DEVICE_DEFAULT_FONT))
|
#define STOCK_DEVICE_DEFAULT_FONT ((HFONT)(FIRST_STOCK_HANDLE+DEVICE_DEFAULT_FONT))
|
||||||
#define STOCK_DEFAULT_PALETTE ((HPALETTE)(FIRST_STOCK_HANDLE+DEFAULT_PALETTE))
|
#define STOCK_DEFAULT_PALETTE ((HPALETTE16)(FIRST_STOCK_HANDLE+DEFAULT_PALETTE))
|
||||||
#define STOCK_SYSTEM_FIXED_FONT ((HFONT)(FIRST_STOCK_HANDLE+SYSTEM_FIXED_FONT))
|
#define STOCK_SYSTEM_FIXED_FONT ((HFONT)(FIRST_STOCK_HANDLE+SYSTEM_FIXED_FONT))
|
||||||
|
|
||||||
#define FIRST_STOCK_FONT STOCK_OEM_FIXED_FONT
|
#define FIRST_STOCK_FONT STOCK_OEM_FIXED_FONT
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#ifndef __WINE_GRAPHICS_H
|
#ifndef __WINE_GRAPHICS_H
|
||||||
#define __WINE_GRAPHICS_H
|
#define __WINE_GRAPHICS_H
|
||||||
|
|
||||||
extern void GRAPH_DrawReliefRect( HDC hdc, RECT *rect, int highlight_size,
|
extern void GRAPH_DrawReliefRect( HDC hdc, RECT16 *rect, int highlight_size,
|
||||||
int shadow_size, BOOL pressed );
|
int shadow_size, BOOL pressed );
|
||||||
extern BOOL GRAPH_DrawBitmap( HDC hdc, HBITMAP hbitmap, int xdest, int ydest,
|
extern BOOL GRAPH_DrawBitmap( HDC hdc, HBITMAP hbitmap, int xdest, int ydest,
|
||||||
int xsrc, int ysrc, int width, int height );
|
int xsrc, int ysrc, int width, int height );
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef __WINE_HANDLE32_H
|
#ifndef __WINE_HANDLE32_H
|
||||||
#define __WINE_HANDLE32_H
|
#define __WINE_HANDLE32_H
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <stdlib.h>
|
||||||
#include "wintypes.h"
|
#include "wintypes.h"
|
||||||
|
|
||||||
/* The _*_OBJECT structures contain information needed about each
|
/* The _*_OBJECT structures contain information needed about each
|
||||||
|
|
|
@ -11,5 +11,23 @@
|
||||||
#include "winnt.h"
|
#include "winnt.h"
|
||||||
|
|
||||||
extern HANDLE32 SystemHeap;
|
extern HANDLE32 SystemHeap;
|
||||||
|
extern HANDLE32 SegptrHeap;
|
||||||
|
|
||||||
|
extern int HEAP_IsInsideHeap( HANDLE32 heap, DWORD flags, LPCVOID ptr );
|
||||||
|
extern SEGPTR HEAP_GetSegptr( HANDLE32 heap, DWORD flags, LPCVOID ptr );
|
||||||
|
extern LPSTR HEAP_strdupA( HANDLE32 heap, DWORD flags, LPCSTR str );
|
||||||
|
|
||||||
|
/* SEGPTR helper macros */
|
||||||
|
|
||||||
|
#define SEGPTR_ALLOC(size) \
|
||||||
|
(HeapAlloc( SegptrHeap, 0, (size) ))
|
||||||
|
#define SEGPTR_NEW(type) \
|
||||||
|
((type *)HeapAlloc( SegptrHeap, 0, sizeof(type) ))
|
||||||
|
#define SEGPTR_STRDUP(str) \
|
||||||
|
(HIWORD(str) ? HEAP_strdupA( SegptrHeap, 0, (str) ) : (LPSTR)(str))
|
||||||
|
#define SEGPTR_GET(ptr) \
|
||||||
|
(HIWORD(ptr) ? HEAP_GetSegptr( SegptrHeap, 0, (ptr) ) : (SEGPTR)(ptr))
|
||||||
|
#define SEGPTR_FREE(ptr) \
|
||||||
|
(HIWORD(ptr) ? HeapFree( SegptrHeap, 0, (ptr) ) : 0)
|
||||||
|
|
||||||
#endif /* __WINE_HEAP_H */
|
#endif /* __WINE_HEAP_H */
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
typedef struct tagLISTSTRUCT {
|
typedef struct tagLISTSTRUCT {
|
||||||
MEASUREITEMSTRUCT mis;
|
MEASUREITEMSTRUCT mis;
|
||||||
UINT itemState;
|
UINT itemState;
|
||||||
RECT itemRect;
|
RECT16 itemRect;
|
||||||
HANDLE hData;
|
HANDLE hData;
|
||||||
char *itemText;
|
char *itemText;
|
||||||
struct tagLISTSTRUCT *lpNext;
|
struct tagLISTSTRUCT *lpNext;
|
||||||
|
@ -60,12 +60,12 @@ extern int ListBoxSetCurSel(LPHEADLIST lphl, WORD wIndex);
|
||||||
extern int ListBoxSetSel(LPHEADLIST lphl, WORD wIndex, WORD state);
|
extern int ListBoxSetSel(LPHEADLIST lphl, WORD wIndex, WORD state);
|
||||||
extern int ListBoxGetSel(LPHEADLIST lphl, WORD wIndex);
|
extern int ListBoxGetSel(LPHEADLIST lphl, WORD wIndex);
|
||||||
extern LONG ListBoxDirectory(LPHEADLIST lphl, UINT attrib, LPCSTR filespec);
|
extern LONG ListBoxDirectory(LPHEADLIST lphl, UINT attrib, LPCSTR filespec);
|
||||||
extern int ListBoxGetItemRect(LPHEADLIST lphl, WORD wIndex, LPRECT rect);
|
extern int ListBoxGetItemRect(LPHEADLIST lphl, WORD wIndex, LPRECT16 rect);
|
||||||
extern int ListBoxSetItemHeight(LPHEADLIST lphl, WORD wIndex, long height);
|
extern int ListBoxSetItemHeight(LPHEADLIST lphl, WORD wIndex, long height);
|
||||||
extern int ListBoxFindNextMatch(LPHEADLIST lphl, WORD wChar);
|
extern int ListBoxFindNextMatch(LPHEADLIST lphl, WORD wChar);
|
||||||
|
|
||||||
extern void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC hdc,
|
extern void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC hdc,
|
||||||
LPLISTSTRUCT lpls, RECT *rect, WORD itemAction,
|
LPLISTSTRUCT lpls, RECT16 *rect, WORD itemAction,
|
||||||
WORD itemState);
|
WORD itemState);
|
||||||
extern int ListBoxFindMouse(LPHEADLIST lphl, int X, int Y);
|
extern int ListBoxFindMouse(LPHEADLIST lphl, int X, int Y);
|
||||||
extern void ListBoxAskMeasure(LPHEADLIST lphl, LPLISTSTRUCT lpls);
|
extern void ListBoxAskMeasure(LPHEADLIST lphl, LPLISTSTRUCT lpls);
|
||||||
|
|
|
@ -31,17 +31,18 @@ typedef struct tagMDIWCL
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
WORD nActiveChildren;
|
WORD nActiveChildren;
|
||||||
HWND flagChildMaximized;
|
HWND hwndChildMaximized;
|
||||||
HWND hwndActiveChild;
|
HWND hwndActiveChild;
|
||||||
HMENU hWindowMenu;
|
HMENU hWindowMenu;
|
||||||
WORD idFirstChild;
|
WORD idFirstChild;
|
||||||
HANDLE hFrameTitle;
|
WORD nTotalCreated;
|
||||||
WORD sbNeedUpdate;
|
HANDLE hFrameTitle;
|
||||||
WORD sbRecalc;
|
WORD sbNeedUpdate;
|
||||||
HBITMAP obmClose;
|
WORD sbRecalc;
|
||||||
HBITMAP obmRestore;
|
HBITMAP obmClose;
|
||||||
HWND self;
|
HBITMAP obmRestore;
|
||||||
|
HWND self;
|
||||||
} MDICLIENTINFO;
|
} MDICLIENTINFO;
|
||||||
|
|
||||||
#endif /* MDI_H */
|
#endif /* MDI_H */
|
||||||
|
|
|
@ -12,9 +12,9 @@ extern BOOL MENU_Init(void);
|
||||||
extern HMENU MENU_GetDefSysMenu(void);
|
extern HMENU MENU_GetDefSysMenu(void);
|
||||||
extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
|
extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
|
||||||
int orgX, int orgY );
|
int orgX, int orgY );
|
||||||
extern void MENU_TrackMouseMenuBar( HWND hwnd, POINT pt );
|
extern void MENU_TrackMouseMenuBar( HWND hwnd, POINT16 pt );
|
||||||
extern void MENU_TrackKbdMenuBar( WND*, UINT wParam, INT vkey);
|
extern void MENU_TrackKbdMenuBar( WND*, UINT wParam, INT vkey);
|
||||||
extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect,
|
extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT16 lprect,
|
||||||
HWND hwnd, BOOL suppress_draw );
|
HWND hwnd, BOOL suppress_draw );
|
||||||
extern LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam );
|
extern LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam );
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ typedef struct tagMENUITEM
|
||||||
{
|
{
|
||||||
WORD item_flags; /* Item flags */
|
WORD item_flags; /* Item flags */
|
||||||
UINT item_id; /* Item or popup id */
|
UINT item_id; /* Item or popup id */
|
||||||
RECT rect; /* Item area (relative to menu window) */
|
RECT16 rect; /* Item area (relative to menu window) */
|
||||||
WORD xTab; /* X position of text after Tab */
|
WORD xTab; /* X position of text after Tab */
|
||||||
HBITMAP hCheckBit; /* Bitmap for checked item */
|
HBITMAP hCheckBit; /* Bitmap for checked item */
|
||||||
HBITMAP hUnCheckBit; /* Bitmap for unchecked item */
|
HBITMAP hUnCheckBit; /* Bitmap for unchecked item */
|
||||||
|
|
|
@ -28,10 +28,10 @@ BOOL MF_MetaParam8(DC *dc, short func, short param1, short param2,
|
||||||
short param6, short param7, short param8);
|
short param6, short param7, short param8);
|
||||||
BOOL MF_CreateBrushIndirect(DC *dc, HBRUSH hBrush, LOGBRUSH *logbrush);
|
BOOL MF_CreateBrushIndirect(DC *dc, HBRUSH hBrush, LOGBRUSH *logbrush);
|
||||||
BOOL MF_CreatePatternBrush(DC *dc, HBRUSH hBrush, LOGBRUSH *logbrush);
|
BOOL MF_CreatePatternBrush(DC *dc, HBRUSH hBrush, LOGBRUSH *logbrush);
|
||||||
BOOL MF_CreatePenIndirect(DC *dc, HPEN hPen, LOGPEN *logpen);
|
BOOL MF_CreatePenIndirect(DC *dc, HPEN16 hPen, LOGPEN *logpen);
|
||||||
BOOL MF_CreateFontIndirect(DC *dc, HFONT hFont, LOGFONT *logfont);
|
BOOL MF_CreateFontIndirect(DC *dc, HFONT hFont, LOGFONT *logfont);
|
||||||
BOOL MF_TextOut(DC *dc, short x, short y, LPSTR str, short count);
|
BOOL MF_TextOut(DC *dc, short x, short y, LPCSTR str, short count);
|
||||||
BOOL MF_MetaPoly(DC *dc, short func, LPPOINT pt, short count);
|
BOOL MF_MetaPoly(DC *dc, short func, LPPOINT16 pt, short count);
|
||||||
BOOL MF_BitBlt(DC *dcDest, short xDest, short yDest, short width,
|
BOOL MF_BitBlt(DC *dcDest, short xDest, short yDest, short width,
|
||||||
short height, HDC hdcSrc, short xSrc, short ySrc, DWORD rop);
|
short height, HDC hdcSrc, short xSrc, short ySrc, DWORD rop);
|
||||||
BOOL MF_StretchBlt(DC *dcDest, short xDest, short yDest, short widthDest,
|
BOOL MF_StretchBlt(DC *dcDest, short xDest, short yDest, short widthDest,
|
||||||
|
|
|
@ -1247,16 +1247,16 @@ typedef struct {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DWORD dwCallback;
|
DWORD dwCallback;
|
||||||
#ifdef MCI_USE_OFFEXT
|
#ifdef MCI_USE_OFFEXT
|
||||||
POINT ptOffset;
|
POINT16 ptOffset;
|
||||||
POINT ptExtent;
|
POINT16 ptExtent;
|
||||||
#else /* ifdef MCI_USE_OFFEXT */
|
#else /* ifdef MCI_USE_OFFEXT */
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
#endif /* ifdef MCI_USE_OFFEXT */
|
#endif /* ifdef MCI_USE_OFFEXT */
|
||||||
} MCI_ANIM_RECT_PARMS, *LPMCI_ANIM_RECT_PARMS;
|
} MCI_ANIM_RECT_PARMS, *LPMCI_ANIM_RECT_PARMS;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DWORD dwCallback;
|
DWORD dwCallback;
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
} MCI_ANIM_UPDATE_PARMS, *LPMCI_ANIM_UPDATE_PARMS;
|
} MCI_ANIM_UPDATE_PARMS, *LPMCI_ANIM_UPDATE_PARMS;
|
||||||
|
|
||||||
|
@ -1315,23 +1315,23 @@ typedef struct {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DWORD dwCallback;
|
DWORD dwCallback;
|
||||||
#ifdef MCI_USE_OFFEXT
|
#ifdef MCI_USE_OFFEXT
|
||||||
POINT ptOffset;
|
POINT16 ptOffset;
|
||||||
POINT ptExtent;
|
POINT16 ptExtent;
|
||||||
#else /* ifdef MCI_USE_OFFEXT */
|
#else /* ifdef MCI_USE_OFFEXT */
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
#endif /* ifdef MCI_USE_OFFEXT */
|
#endif /* ifdef MCI_USE_OFFEXT */
|
||||||
} MCI_OVLY_RECT_PARMS, *LPMCI_OVLY_RECT_PARMS;
|
} MCI_OVLY_RECT_PARMS, *LPMCI_OVLY_RECT_PARMS;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DWORD dwCallback;
|
DWORD dwCallback;
|
||||||
LPCSTR lpfilename;
|
LPCSTR lpfilename;
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
} MCI_OVLY_SAVE_PARMS, *LPMCI_OVLY_SAVE_PARMS;
|
} MCI_OVLY_SAVE_PARMS, *LPMCI_OVLY_SAVE_PARMS;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DWORD dwCallback;
|
DWORD dwCallback;
|
||||||
LPCSTR lpfilename;
|
LPCSTR lpfilename;
|
||||||
RECT rc;
|
RECT16 rc;
|
||||||
} MCI_OVLY_LOAD_PARMS, *LPMCI_OVLY_LOAD_PARMS;
|
} MCI_OVLY_LOAD_PARMS, *LPMCI_OVLY_LOAD_PARMS;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -126,8 +126,8 @@ extern HINSTANCE MODULE_GetInstance( HMODULE hModule );
|
||||||
extern WORD MODULE_GetOrdinal( HMODULE hModule, const char *name );
|
extern WORD MODULE_GetOrdinal( HMODULE hModule, const char *name );
|
||||||
extern SEGPTR MODULE_GetEntryPoint( HMODULE hModule, WORD ordinal );
|
extern SEGPTR MODULE_GetEntryPoint( HMODULE hModule, WORD ordinal );
|
||||||
extern BOOL MODULE_SetEntryPoint( HMODULE hModule, WORD ordinal, WORD offset );
|
extern BOOL MODULE_SetEntryPoint( HMODULE hModule, WORD ordinal, WORD offset );
|
||||||
extern FARPROC MODULE_GetWndProcEntry16( const char *name );
|
extern FARPROC16 MODULE_GetWndProcEntry16( const char *name );
|
||||||
extern FARPROC MODULE_GetWndProcEntry32( const char *name );
|
extern FARPROC32 MODULE_GetWndProcEntry32( const char *name );
|
||||||
|
|
||||||
/* builtin.c */
|
/* builtin.c */
|
||||||
extern BOOL BUILTIN_Init(void);
|
extern BOOL BUILTIN_Init(void);
|
||||||
|
|
|
@ -9,17 +9,16 @@
|
||||||
|
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
|
||||||
extern void NC_GetInsideRect( HWND hwnd, RECT *rect );
|
extern void NC_GetMinMaxInfo( HWND hwnd, POINT16 *maxSize, POINT16 *maxPos,
|
||||||
extern void NC_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
|
POINT16 *minTrack, POINT16 *maxTrack );
|
||||||
POINT *minTrack, POINT *maxTrack );
|
|
||||||
extern void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint );
|
extern void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint );
|
||||||
extern LONG NC_HandleNCPaint( HWND hwnd , HRGN clip);
|
extern LONG NC_HandleNCPaint( HWND hwnd , HRGN clip);
|
||||||
extern LONG NC_HandleNCActivate( HWND hwnd, WPARAM wParam );
|
extern LONG NC_HandleNCActivate( HWND hwnd, WPARAM wParam );
|
||||||
extern LONG NC_HandleNCCalcSize( HWND hwnd, NCCALCSIZE_PARAMS *params );
|
extern LONG NC_HandleNCCalcSize( HWND hwnd, NCCALCSIZE_PARAMS16 *params );
|
||||||
extern LONG NC_HandleNCHitTest( HWND hwnd, POINT pt );
|
extern LONG NC_HandleNCHitTest( HWND hwnd, POINT16 pt );
|
||||||
extern LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam );
|
extern LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam );
|
||||||
extern LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM wParam, LPARAM lParam);
|
extern LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM wParam, LPARAM lParam);
|
||||||
extern LONG NC_HandleSysCommand( HWND hwnd, WPARAM wParam, POINT pt );
|
extern LONG NC_HandleSysCommand( HWND hwnd, WPARAM wParam, POINT16 pt );
|
||||||
extern LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam );
|
extern LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam );
|
||||||
|
|
||||||
#endif /* __WINE_NONCLIENT_H */
|
#endif /* __WINE_NONCLIENT_H */
|
||||||
|
|
|
@ -159,7 +159,7 @@ typedef struct _OLESERVERDOCVTBL {
|
||||||
OLESTATUS (*Save)(LPOLESERVERDOC);
|
OLESTATUS (*Save)(LPOLESERVERDOC);
|
||||||
OLESTATUS (*Close)(LPOLESERVERDOC);
|
OLESTATUS (*Close)(LPOLESERVERDOC);
|
||||||
OLESTATUS (*SetHostNames)(LPOLESERVERDOC,OLE_LPCSTR,OLE_LPCSTR);
|
OLESTATUS (*SetHostNames)(LPOLESERVERDOC,OLE_LPCSTR,OLE_LPCSTR);
|
||||||
OLESTATUS (*SetDocDimensions)(LPOLESERVERDOC,LPRECT);
|
OLESTATUS (*SetDocDimensions)(LPOLESERVERDOC,LPRECT16);
|
||||||
OLESTATUS (*GetObject)(LPOLESERVERDOC,OLE_LPCSTR,LPOLEOBJECT*,LPOLECLIENT);
|
OLESTATUS (*GetObject)(LPOLESERVERDOC,OLE_LPCSTR,LPOLEOBJECT*,LPOLECLIENT);
|
||||||
OLESTATUS (*Release)(LPOLESERVERDOC);
|
OLESTATUS (*Release)(LPOLESERVERDOC);
|
||||||
OLESTATUS (*SetColorScheme)(LPOLESERVERDOC,LPLOGPALETTE);
|
OLESTATUS (*SetColorScheme)(LPOLESERVERDOC,LPLOGPALETTE);
|
||||||
|
@ -204,7 +204,7 @@ typedef struct _OLEOBJECTVTBL {
|
||||||
OLESTATUS (*GetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE *);
|
OLESTATUS (*GetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE *);
|
||||||
OLESTATUS (*SetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE);
|
OLESTATUS (*SetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE);
|
||||||
OLESTATUS (*SetTargetDevice)(LPOLEOBJECT,HGLOBAL);
|
OLESTATUS (*SetTargetDevice)(LPOLEOBJECT,HGLOBAL);
|
||||||
OLESTATUS (*SetBounds)(LPOLEOBJECT,LPRECT);
|
OLESTATUS (*SetBounds)(LPOLEOBJECT,LPRECT16);
|
||||||
OLESTATUS (*EnumFormats)(LPOLEOBJECT,OLECLIPFORMAT);
|
OLESTATUS (*EnumFormats)(LPOLEOBJECT,OLECLIPFORMAT);
|
||||||
OLESTATUS (*SetColorScheme)(LPOLEOBJECT,LPLOGPALETTE);
|
OLESTATUS (*SetColorScheme)(LPOLEOBJECT,LPLOGPALETTE);
|
||||||
OLESTATUS (*Delete)(LPOLEOBJECT);
|
OLESTATUS (*Delete)(LPOLEOBJECT);
|
||||||
|
@ -214,8 +214,8 @@ typedef struct _OLEOBJECTVTBL {
|
||||||
OLESTATUS (*CopyFromLink)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,OLE_LPCSTR,LPOLEOBJECT *);
|
OLESTATUS (*CopyFromLink)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,OLE_LPCSTR,LPOLEOBJECT *);
|
||||||
OLESTATUS (*Equal)(LPOLEOBJECT,LPOLEOBJECT);
|
OLESTATUS (*Equal)(LPOLEOBJECT,LPOLEOBJECT);
|
||||||
OLESTATUS (*CopyToClipBoard)(LPOLEOBJECT);
|
OLESTATUS (*CopyToClipBoard)(LPOLEOBJECT);
|
||||||
OLESTATUS (*Draw)(LPOLEOBJECT,HDC,LPRECT,LPRECT,HDC);
|
OLESTATUS (*Draw)(LPOLEOBJECT,HDC,LPRECT16,LPRECT16,HDC);
|
||||||
OLESTATUS (*Activate)(LPOLEOBJECT,UINT,BOOL,BOOL,HWND,LPRECT);
|
OLESTATUS (*Activate)(LPOLEOBJECT,UINT,BOOL,BOOL,HWND,LPRECT16);
|
||||||
OLESTATUS (*Execute)(LPOLEOBJECT,HGLOBAL,UINT);
|
OLESTATUS (*Execute)(LPOLEOBJECT,HGLOBAL,UINT);
|
||||||
OLESTATUS (*Close)(LPOLEOBJECT);
|
OLESTATUS (*Close)(LPOLEOBJECT);
|
||||||
OLESTATUS (*Update)(LPOLEOBJECT);
|
OLESTATUS (*Update)(LPOLEOBJECT);
|
||||||
|
@ -226,7 +226,7 @@ typedef struct _OLEOBJECTVTBL {
|
||||||
OLESTATUS (*Rename)(LPOLEOBJECT,OLE_LPCSTR);
|
OLESTATUS (*Rename)(LPOLEOBJECT,OLE_LPCSTR);
|
||||||
OLESTATUS (*QueryName)(LPOLEOBJECT,LPSTR,LPUINT16);
|
OLESTATUS (*QueryName)(LPOLEOBJECT,LPSTR,LPUINT16);
|
||||||
OLESTATUS (*QueryType)(LPOLEOBJECT,LPLONG);
|
OLESTATUS (*QueryType)(LPOLEOBJECT,LPLONG);
|
||||||
OLESTATUS (*QueryBounds)(LPOLEOBJECT,LPRECT);
|
OLESTATUS (*QueryBounds)(LPOLEOBJECT,LPRECT16);
|
||||||
OLESTATUS (*QuerySize)(LPOLEOBJECT,LPDWORD);
|
OLESTATUS (*QuerySize)(LPOLEOBJECT,LPDWORD);
|
||||||
OLESTATUS (*QueryOpen)(LPOLEOBJECT);
|
OLESTATUS (*QueryOpen)(LPOLEOBJECT);
|
||||||
OLESTATUS (*QueryOutOfDate)(LPOLEOBJECT);
|
OLESTATUS (*QueryOutOfDate)(LPOLEOBJECT);
|
||||||
|
|
|
@ -25,6 +25,6 @@ typedef struct
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int PEN_GetObject( PENOBJ * pen, int count, LPSTR buffer );
|
extern int PEN_GetObject( PENOBJ * pen, int count, LPSTR buffer );
|
||||||
extern HPEN PEN_SelectObject( DC * dc, HPEN hpen, PENOBJ * pen );
|
extern HPEN16 PEN_SelectObject( DC * dc, HPEN16 hpen, PENOBJ * pen );
|
||||||
|
|
||||||
#endif /* __WINE_PEN_H */
|
#endif /* __WINE_PEN_H */
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
/* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef REGFUNC_H
|
|
||||||
#define REGFUNC_H
|
|
||||||
|
|
||||||
#include "wine.h"
|
|
||||||
#include "stackframe.h"
|
|
||||||
|
|
||||||
#define _CONTEXT ((struct sigcontext_struct *) CURRENT_STACK16->args)
|
|
||||||
#define _AX (_CONTEXT->sc_eax)
|
|
||||||
#define _BX (_CONTEXT->sc_ebx)
|
|
||||||
#define _CX (_CONTEXT->sc_ecx)
|
|
||||||
#define _DX (_CONTEXT->sc_edx)
|
|
||||||
#define _SI (_CONTEXT->sc_esi)
|
|
||||||
#define _DI (_CONTEXT->sc_edi)
|
|
||||||
#define _DS (_CONTEXT->sc_ds)
|
|
||||||
#define _ES (_CONTEXT->sc_es)
|
|
||||||
|
|
||||||
extern void ReturnFromRegisterFunc(void);
|
|
||||||
|
|
||||||
#endif /* REGFUNC_H */
|
|
|
@ -18,6 +18,6 @@ typedef struct
|
||||||
|
|
||||||
|
|
||||||
extern BOOL REGION_DeleteObject( HRGN hrgn, RGNOBJ * obj );
|
extern BOOL REGION_DeleteObject( HRGN hrgn, RGNOBJ * obj );
|
||||||
extern BOOL REGION_FrameRgn(HRGN dest,HRGN src,int x,int y);
|
extern BOOL REGION_FrameRgn( HRGN dest, HRGN src, INT32 x, INT32 y );
|
||||||
|
|
||||||
#endif /* __WINE_REGION_H */
|
#endif /* __WINE_REGION_H */
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
/*
|
|
||||||
* Relay32 definitions
|
|
||||||
*
|
|
||||||
* Copyright 1995 Martin von Loewis
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __WINE_RELAY32_H
|
|
||||||
#define __WINE_RELAY32_H
|
|
||||||
|
|
||||||
#include "struct32.h"
|
|
||||||
|
|
||||||
typedef struct tagWNDCLASSA{
|
|
||||||
UINT style;
|
|
||||||
WNDPROC lpfnWndProc;
|
|
||||||
int cbClsExtra;
|
|
||||||
int cbWndExtra;
|
|
||||||
DWORD hInstance;
|
|
||||||
DWORD hIcon;
|
|
||||||
DWORD hCursor;
|
|
||||||
DWORD hbrBackground;
|
|
||||||
char* lpszMenuName;
|
|
||||||
char* lpszClassName;
|
|
||||||
}WNDCLASSA;
|
|
||||||
|
|
||||||
ATOM USER32_RegisterClassA(WNDCLASSA *);
|
|
||||||
LRESULT USER32_DefWindowProcA(DWORD hwnd,DWORD msg,DWORD wParam,DWORD lParam);
|
|
||||||
BOOL USER32_GetMessageA(MSG32* lpmsg,DWORD hwnd,DWORD min,DWORD max);
|
|
||||||
HDC USER32_BeginPaint(DWORD hwnd,PAINTSTRUCT32 *lpps);
|
|
||||||
BOOL USER32_EndPaint(DWORD hwnd,PAINTSTRUCT32 *lpps);
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -22,6 +22,6 @@ typedef struct
|
||||||
extern LONG ScrollBarWndProc( HWND hwnd, WORD uMsg, WORD wParam, LONG lParam );
|
extern LONG ScrollBarWndProc( HWND hwnd, WORD uMsg, WORD wParam, LONG lParam );
|
||||||
extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, int nBar );
|
extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, int nBar );
|
||||||
extern void SCROLL_HandleScrollEvent( HWND hwnd, int nBar,
|
extern void SCROLL_HandleScrollEvent( HWND hwnd, int nBar,
|
||||||
WORD msg, POINT pt); /* scroll.c */
|
WORD msg, POINT16 pt );
|
||||||
|
|
||||||
#endif /* SCROLL_H */
|
#endif /* SCROLL_H */
|
||||||
|
|
|
@ -26,7 +26,7 @@ extern void SHELL_Init();
|
||||||
|
|
||||||
typedef struct { /* structure for dropped files */
|
typedef struct { /* structure for dropped files */
|
||||||
WORD wSize;
|
WORD wSize;
|
||||||
POINT ptMousePos;
|
POINT16 ptMousePos;
|
||||||
BOOL fInNonClientArea;
|
BOOL fInNonClientArea;
|
||||||
/* memory block with filenames follows */
|
/* memory block with filenames follows */
|
||||||
} DROPFILESTRUCT, *LPDROPFILESTRUCT;
|
} DROPFILESTRUCT, *LPDROPFILESTRUCT;
|
||||||
|
|
|
@ -15,6 +15,7 @@ void STRING32_UniToAnsi(LPSTR dest,LPCWSTR src);
|
||||||
void STRING32_AnsiToUni(LPWSTR dest,LPCSTR src);
|
void STRING32_AnsiToUni(LPWSTR dest,LPCSTR src);
|
||||||
LPSTR STRING32_DupUniToAnsi(LPCWSTR src);
|
LPSTR STRING32_DupUniToAnsi(LPCWSTR src);
|
||||||
LPWSTR STRING32_DupAnsiToUni(LPCSTR src);
|
LPWSTR STRING32_DupAnsiToUni(LPCSTR src);
|
||||||
|
LPWSTR STRING32_lstrcpyW(LPWSTR dst, LPCWSTR src);
|
||||||
int STRING32_lstrcmpnW(LPCWSTR a,LPCWSTR b,DWORD len);
|
int STRING32_lstrcmpnW(LPCWSTR a,LPCWSTR b,DWORD len);
|
||||||
int STRING32_lstrcmpniW(LPCWSTR a,LPCWSTR b,DWORD len);
|
int STRING32_lstrcmpniW(LPCWSTR a,LPCWSTR b,DWORD len);
|
||||||
DWORD STRING32_lstrlenW(LPCWSTR);
|
DWORD STRING32_lstrlenW(LPCWSTR);
|
||||||
|
|
|
@ -7,44 +7,23 @@
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct tagRECT32
|
void STRUCT32_RECT32to16(const RECT32*,RECT16*);
|
||||||
{
|
void STRUCT32_RECT16to32(const RECT16*,RECT32*);
|
||||||
LONG left;
|
void STRUCT32_POINT32to16(const POINT32*,POINT16*);
|
||||||
LONG top;
|
void STRUCT32_POINT16to32(const POINT16*,POINT32*);
|
||||||
LONG right;
|
void STRUCT32_SIZE16to32(const SIZE16*, SIZE32*);
|
||||||
LONG bottom;
|
|
||||||
} RECT32;
|
|
||||||
|
|
||||||
void STRUCT32_RECT32to16(const RECT32*,RECT*);
|
extern void STRUCT32_MINMAXINFO32to16( const MINMAXINFO32*, MINMAXINFO16* );
|
||||||
void STRUCT32_RECT16to32(const RECT*,RECT32*);
|
extern void STRUCT32_MINMAXINFO16to32( const MINMAXINFO16*, MINMAXINFO32* );
|
||||||
|
extern void STRUCT32_WINDOWPOS32to16( const WINDOWPOS32*, WINDOWPOS16* );
|
||||||
|
extern void STRUCT32_WINDOWPOS16to32( const WINDOWPOS16*, WINDOWPOS32* );
|
||||||
|
extern void STRUCT32_NCCALCSIZE32to16Flat( const NCCALCSIZE_PARAMS32 *from,
|
||||||
|
NCCALCSIZE_PARAMS16 *to,
|
||||||
|
int validRects );
|
||||||
|
extern void STRUCT32_NCCALCSIZE16to32Flat( const NCCALCSIZE_PARAMS16* from,
|
||||||
|
NCCALCSIZE_PARAMS32* to,
|
||||||
|
int validRects );
|
||||||
|
|
||||||
typedef struct tagPOINT32
|
|
||||||
{
|
|
||||||
LONG x;
|
|
||||||
LONG y;
|
|
||||||
} POINT32;
|
|
||||||
|
|
||||||
typedef struct tagSIZE32
|
|
||||||
{
|
|
||||||
LONG cx;
|
|
||||||
LONG cy;
|
|
||||||
} SIZE32;
|
|
||||||
|
|
||||||
void STRUCT32_POINT32to16(const POINT32*,POINT*);
|
|
||||||
void STRUCT32_POINT16to32(const POINT*,POINT32*);
|
|
||||||
void STRUCT32_SIZE16to32(const SIZE* p16, SIZE32* p32);
|
|
||||||
|
|
||||||
typedef struct tagMINMAXINFO32
|
|
||||||
{
|
|
||||||
POINT32 ptReserved;
|
|
||||||
POINT32 ptMaxSize;
|
|
||||||
POINT32 ptMaxPosition;
|
|
||||||
POINT32 ptMinTrackSize;
|
|
||||||
POINT32 ptMaxTrackSize;
|
|
||||||
} MINMAXINFO32;
|
|
||||||
|
|
||||||
void STRUCT32_MINMAXINFO32to16(const MINMAXINFO32*,MINMAXINFO*);
|
|
||||||
void STRUCT32_MINMAXINFO16to32(const MINMAXINFO*,MINMAXINFO32*);
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DWORD style;
|
DWORD style;
|
||||||
|
@ -79,60 +58,8 @@ typedef struct tagMSG32
|
||||||
void STRUCT32_MSG16to32(MSG *msg16,MSG32 *msg32);
|
void STRUCT32_MSG16to32(MSG *msg16,MSG32 *msg32);
|
||||||
void STRUCT32_MSG32to16(MSG32 *msg32,MSG *msg16);
|
void STRUCT32_MSG32to16(MSG32 *msg32,MSG *msg16);
|
||||||
|
|
||||||
typedef struct tagPAINTSTRUCT32
|
void STRUCT32_CREATESTRUCT32Ato16(const CREATESTRUCT32A*,CREATESTRUCT16*);
|
||||||
{
|
void STRUCT32_CREATESTRUCT16to32A(const CREATESTRUCT16*,CREATESTRUCT32A*);
|
||||||
DWORD hdc;
|
|
||||||
DWORD fErase;
|
|
||||||
RECT32 rcPaint;
|
|
||||||
DWORD fRestore;
|
|
||||||
DWORD fIncUpdate;
|
|
||||||
BYTE rgbReserved[32];
|
|
||||||
} PAINTSTRUCT32;
|
|
||||||
|
|
||||||
typedef struct tagWINDOWPOS32
|
|
||||||
{
|
|
||||||
DWORD hwnd;
|
|
||||||
DWORD hwndInsertAfter;
|
|
||||||
LONG x;
|
|
||||||
LONG y;
|
|
||||||
LONG cx;
|
|
||||||
LONG cy;
|
|
||||||
DWORD flags;
|
|
||||||
} WINDOWPOS32;
|
|
||||||
|
|
||||||
void STRUCT32_WINDOWPOS32to16(const WINDOWPOS32*,WINDOWPOS*);
|
|
||||||
void STRUCT32_WINDOWPOS16to32(const WINDOWPOS*,WINDOWPOS32*);
|
|
||||||
|
|
||||||
typedef struct tagNCCALCSIZE_PARAMS32
|
|
||||||
{
|
|
||||||
RECT32 rgrc[3];
|
|
||||||
WINDOWPOS32 *lppos;
|
|
||||||
} NCCALCSIZE_PARAMS32;
|
|
||||||
|
|
||||||
void STRUCT32_NCCALCSIZE32to16Flat(const NCCALCSIZE_PARAMS32*,
|
|
||||||
NCCALCSIZE_PARAMS*);
|
|
||||||
void STRUCT32_NCCALCSIZE16to32Flat(const NCCALCSIZE_PARAMS* from,
|
|
||||||
NCCALCSIZE_PARAMS32* to);
|
|
||||||
|
|
||||||
typedef struct tagCREATESTRUCT32
|
|
||||||
{
|
|
||||||
DWORD lpCreateParams;
|
|
||||||
DWORD hInstance;
|
|
||||||
DWORD hMenu;
|
|
||||||
DWORD hwndParent;
|
|
||||||
LONG cy;
|
|
||||||
LONG cx;
|
|
||||||
LONG y;
|
|
||||||
LONG x;
|
|
||||||
LONG style;
|
|
||||||
LPSTR lpszName;
|
|
||||||
LPSTR lpszClass;
|
|
||||||
DWORD dwExStyle;
|
|
||||||
} CREATESTRUCT32;
|
|
||||||
typedef CREATESTRUCT32 CREATESTRUCTA;
|
|
||||||
|
|
||||||
void STRUCT32_CREATESTRUCT32to16(const CREATESTRUCT32*,CREATESTRUCT*);
|
|
||||||
void STRUCT32_CREATESTRUCT16to32(const CREATESTRUCT*,CREATESTRUCT32*);
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
BYTE bWidth;
|
BYTE bWidth;
|
||||||
|
|
|
@ -17,9 +17,9 @@ struct SysColorObjects
|
||||||
HBRUSH hbrushInactiveCaption; /* COLOR_INACTIVECAPTION */
|
HBRUSH hbrushInactiveCaption; /* COLOR_INACTIVECAPTION */
|
||||||
HBRUSH hbrushMenu; /* COLOR_MENU */
|
HBRUSH hbrushMenu; /* COLOR_MENU */
|
||||||
HBRUSH hbrushWindow; /* COLOR_WINDOW */
|
HBRUSH hbrushWindow; /* COLOR_WINDOW */
|
||||||
HPEN hpenWindowFrame; /* COLOR_WINDOWFRAME */
|
HPEN16 hpenWindowFrame; /* COLOR_WINDOWFRAME */
|
||||||
/* COLOR_MENUTEXT */
|
/* COLOR_MENUTEXT */
|
||||||
HPEN hpenWindowText; /* COLOR_WINDOWTEXT */
|
HPEN16 hpenWindowText; /* COLOR_WINDOWTEXT */
|
||||||
/* COLOR_CAPTIONTEXT */
|
/* COLOR_CAPTIONTEXT */
|
||||||
HBRUSH hbrushActiveBorder; /* COLOR_ACTIVEBORDER */
|
HBRUSH hbrushActiveBorder; /* COLOR_ACTIVEBORDER */
|
||||||
HBRUSH hbrushInactiveBorder; /* COLOR_INACTIVEBORDER */
|
HBRUSH hbrushInactiveBorder; /* COLOR_INACTIVEBORDER */
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#define ICONTITLE_CLASS_NAME "#32772" /* IconTitle */
|
#define ICONTITLE_CLASS_NAME "#32772" /* IconTitle */
|
||||||
|
|
||||||
#define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
|
#define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
|
||||||
#define DESKTOP_CLASS_ATOM MAKEINTATOM(32769) /* Desktop */
|
#define DESKTOP_CLASS_ATOM ((ATOM)32769) /* Desktop */
|
||||||
#define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
|
#define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
|
||||||
#define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
|
#define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
|
||||||
#define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
|
#define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
|
||||||
|
@ -35,13 +35,13 @@ typedef struct tagWND
|
||||||
struct tagWND *owner; /* Window owner */
|
struct tagWND *owner; /* Window owner */
|
||||||
CLASS *class; /* Window class */
|
CLASS *class; /* Window class */
|
||||||
DWORD dwMagic; /* Magic number (must be WND_MAGIC) */
|
DWORD dwMagic; /* Magic number (must be WND_MAGIC) */
|
||||||
HWND hwndSelf; /* Handle of this window */
|
HWND16 hwndSelf; /* Handle of this window */
|
||||||
HANDLE hInstance; /* Window hInstance (from CreateWindow) */
|
HINSTANCE16 hInstance; /* Window hInstance (from CreateWindow) */
|
||||||
RECT rectClient; /* Client area rel. to parent client area */
|
RECT16 rectClient; /* Client area rel. to parent client area */
|
||||||
RECT rectWindow; /* Whole window rel. to parent client area */
|
RECT16 rectWindow; /* Whole window rel. to parent client area */
|
||||||
RECT rectNormal; /* Window rect. when in normal state */
|
RECT16 rectNormal; /* Window rect. when in normal state */
|
||||||
POINT ptIconPos; /* Icon position */
|
POINT16 ptIconPos; /* Icon position */
|
||||||
POINT ptMaxPos; /* Maximized window position */
|
POINT16 ptMaxPos; /* Maximized window position */
|
||||||
HGLOBAL hmemTaskQ; /* Task queue global memory handle */
|
HGLOBAL hmemTaskQ; /* Task queue global memory handle */
|
||||||
HRGN hrgnUpdate; /* Update region */
|
HRGN hrgnUpdate; /* Update region */
|
||||||
HWND hwndLastActive;/* Last active popup hwnd */
|
HWND hwndLastActive;/* Last active popup hwnd */
|
||||||
|
@ -57,7 +57,7 @@ typedef struct tagWND
|
||||||
Window window; /* X window (only for top-level windows) */
|
Window window; /* X window (only for top-level windows) */
|
||||||
HMENU hSysMenu; /* window's copy of System Menu */
|
HMENU hSysMenu; /* window's copy of System Menu */
|
||||||
HANDLE hProp; /* Handle of Properties List */
|
HANDLE hProp; /* Handle of Properties List */
|
||||||
WORD wExtra[1]; /* Window extra bytes */
|
DWORD wExtra[1]; /* Window extra bytes */
|
||||||
} WND;
|
} WND;
|
||||||
|
|
||||||
/* WND flags values */
|
/* WND flags values */
|
||||||
|
@ -67,9 +67,10 @@ typedef struct tagWND
|
||||||
#define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
|
#define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
|
||||||
#define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
|
#define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
|
||||||
#define WIN_NO_REDRAW 0x0020 /* WM_SETREDRAW called for this window */
|
#define WIN_NO_REDRAW 0x0020 /* WM_SETREDRAW called for this window */
|
||||||
#define WIN_GOT_SIZEMSG 0x0040 /* WM_SIZE has been sent to the window */
|
#define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
|
||||||
#define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
|
#define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
|
||||||
#define WIN_MANAGED 0x0100 /* Window managed by the X wm */
|
#define WIN_MANAGED 0x0100 /* Window managed by the X wm */
|
||||||
|
#define WIN_UNICODE 0x0200 /* Window procedure expects Unicode */
|
||||||
|
|
||||||
/* Window functions */
|
/* Window functions */
|
||||||
extern WND *WIN_FindWndPtr( HWND hwnd );
|
extern WND *WIN_FindWndPtr( HWND hwnd );
|
||||||
|
|
|
@ -119,7 +119,7 @@ int WinMain(HINSTANCE, HINSTANCE prev, char *cmd, int show);
|
||||||
#define GMEM_FIXED 0x0000
|
#define GMEM_FIXED 0x0000
|
||||||
#define GMEM_MOVEABLE 0x0002
|
#define GMEM_MOVEABLE 0x0002
|
||||||
|
|
||||||
HACCEL LoadAcceleratorsA( HINSTANCE, const char *);
|
HACCEL32 LoadAcceleratorsA( HINSTANCE, const char *);
|
||||||
#define FreeModule(hLibModule) FreeLibrary((hLibModule))
|
#define FreeModule(hLibModule) FreeLibrary((hLibModule))
|
||||||
#define MakeProcInstance(lpProc,hInstance) (lpProc)
|
#define MakeProcInstance(lpProc,hInstance) (lpProc)
|
||||||
#define FreeProcInstance(lpProc) (lpProc)
|
#define FreeProcInstance(lpProc) (lpProc)
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -18,6 +18,7 @@
|
||||||
#define HEAP_DISABLE_COALESCE_ON_FREE 0x00000080
|
#define HEAP_DISABLE_COALESCE_ON_FREE 0x00000080
|
||||||
#define HEAP_CREATE_ALIGN_16 0x00010000
|
#define HEAP_CREATE_ALIGN_16 0x00010000
|
||||||
#define HEAP_CREATE_ENABLE_TRACING 0x00020000
|
#define HEAP_CREATE_ENABLE_TRACING 0x00020000
|
||||||
|
#define HEAP_WINE_SEGPTR 0x01000000 /* Not a Win32 flag */
|
||||||
|
#define HEAP_WINE_CODESEG 0x02000000 /* Not a Win32 flag */
|
||||||
|
|
||||||
#endif /* __WINE_WINNT_H */
|
#endif /* __WINE_WINNT_H */
|
||||||
|
|
|
@ -22,7 +22,7 @@ typedef struct
|
||||||
WORD valid;
|
WORD valid;
|
||||||
WORD wMagic;
|
WORD wMagic;
|
||||||
HWND hwndParent;
|
HWND hwndParent;
|
||||||
WINDOWPOS winPos[1];
|
WINDOWPOS16 winPos[1];
|
||||||
} DWP;
|
} DWP;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -36,10 +36,10 @@ extern void WINPOS_FindIconPos( HWND hwnd );
|
||||||
extern BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus);
|
extern BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus);
|
||||||
extern BOOL WINPOS_ChangeActiveWindow( HWND hwnd, BOOL mouseMsg );
|
extern BOOL WINPOS_ChangeActiveWindow( HWND hwnd, BOOL mouseMsg );
|
||||||
extern LONG WINPOS_SendNCCalcSize( HWND hwnd, BOOL calcValidRect,
|
extern LONG WINPOS_SendNCCalcSize( HWND hwnd, BOOL calcValidRect,
|
||||||
RECT *newWindowRect, RECT *oldWindowRect,
|
RECT16 *newWindowRect, RECT16 *oldWindowRect,
|
||||||
RECT *oldClientRect, SEGPTR winpos,
|
RECT16 *oldClientRect, SEGPTR winpos,
|
||||||
RECT *newClientRect );
|
RECT16 *newClientRect );
|
||||||
extern LONG WINPOS_HandleWindowPosChanging( WINDOWPOS *winpos );
|
extern LONG WINPOS_HandleWindowPosChanging( WINDOWPOS16 *winpos );
|
||||||
extern INT WINPOS_WindowFromPoint( POINT pt, WND **ppWnd );
|
extern INT16 WINPOS_WindowFromPoint( POINT16 pt, WND **ppWnd );
|
||||||
|
|
||||||
#endif /* __WINE_WINPOS_H */
|
#endif /* __WINE_WINPOS_H */
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
#define REG_OPTION_NON_VOLATILE 0x00000000
|
#define REG_OPTION_NON_VOLATILE 0x00000000
|
||||||
#define REG_OPTION_VOLATILE 0x00000001
|
#define REG_OPTION_VOLATILE 0x00000001
|
||||||
#define REG_OPTION_CREATE_LINK 0x00000002
|
#define REG_OPTION_CREATE_LINK 0x00000002
|
||||||
|
#define REG_OPTION_TAINTED 0x80000000
|
||||||
|
|
||||||
#define REG_CREATED_NEW_KEY 0x00000001
|
#define REG_CREATED_NEW_KEY 0x00000001
|
||||||
#define REG_OPENED_EXISTING_KEY 0x00000002
|
#define REG_OPENED_EXISTING_KEY 0x00000002
|
||||||
|
|
|
@ -41,8 +41,8 @@
|
||||||
# define WINELIB_NAME_AW(func) func##16
|
# define WINELIB_NAME_AW(func) func##16
|
||||||
# endif /* WINELIB32 */
|
# endif /* WINELIB32 */
|
||||||
#else /* WINELIB */
|
#else /* WINELIB */
|
||||||
# define WINELIB_NAME(func) /* nothing */
|
# define WINELIB_NAME(func) this is a syntax error
|
||||||
# define WINELIB_NAME_AW(func) /* nothing */
|
# define WINELIB_NAME_AW(func) this is a syntax error
|
||||||
#endif /* WINELIB */
|
#endif /* WINELIB */
|
||||||
|
|
||||||
#ifdef WINELIB
|
#ifdef WINELIB
|
||||||
|
@ -62,12 +62,13 @@ typedef int INT32;
|
||||||
typedef unsigned int UINT32;
|
typedef unsigned int UINT32;
|
||||||
typedef unsigned short WORD;
|
typedef unsigned short WORD;
|
||||||
typedef unsigned long DWORD;
|
typedef unsigned long DWORD;
|
||||||
typedef unsigned short BOOL;
|
|
||||||
typedef unsigned char BYTE;
|
typedef unsigned char BYTE;
|
||||||
typedef long LONG;
|
typedef long LONG;
|
||||||
typedef char CHAR;
|
typedef char CHAR;
|
||||||
/* Some systems might have wchar_t, but we really need 16 bit characters */
|
/* Some systems might have wchar_t, but we really need 16 bit characters */
|
||||||
typedef unsigned short WCHAR;
|
typedef unsigned short WCHAR;
|
||||||
|
typedef unsigned short BOOL16;
|
||||||
|
typedef int BOOL32;
|
||||||
|
|
||||||
/* Handles types. These are the same for emulator and library. */
|
/* Handles types. These are the same for emulator and library. */
|
||||||
|
|
||||||
|
@ -186,6 +187,7 @@ DECL_WINELIB_TYPE(INT);
|
||||||
DECL_WINELIB_TYPE(LPINT);
|
DECL_WINELIB_TYPE(LPINT);
|
||||||
DECL_WINELIB_TYPE(LPUINT);
|
DECL_WINELIB_TYPE(LPUINT);
|
||||||
DECL_WINELIB_TYPE(UINT);
|
DECL_WINELIB_TYPE(UINT);
|
||||||
|
DECL_WINELIB_TYPE(BOOL);
|
||||||
DECL_WINELIB_TYPE(WPARAM);
|
DECL_WINELIB_TYPE(WPARAM);
|
||||||
|
|
||||||
DECL_WINELIB_TYPE(HACCEL);
|
DECL_WINELIB_TYPE(HACCEL);
|
||||||
|
@ -232,18 +234,15 @@ DECL_WINELIB_TYPE(WNDPROC);
|
||||||
#ifndef WINELIB
|
#ifndef WINELIB
|
||||||
typedef INT16 INT;
|
typedef INT16 INT;
|
||||||
typedef UINT16 UINT;
|
typedef UINT16 UINT;
|
||||||
|
typedef BOOL16 BOOL;
|
||||||
typedef WPARAM16 WPARAM;
|
typedef WPARAM16 WPARAM;
|
||||||
typedef HANDLE16 HACCEL;
|
|
||||||
typedef HANDLE16 HANDLE;
|
typedef HANDLE16 HANDLE;
|
||||||
typedef HANDLE16 HBITMAP;
|
typedef HANDLE16 HBITMAP;
|
||||||
typedef HANDLE16 HBRUSH;
|
typedef HANDLE16 HBRUSH;
|
||||||
typedef HANDLE16 HCURSOR;
|
typedef HANDLE16 HCURSOR;
|
||||||
typedef HANDLE16 HDC;
|
typedef HANDLE16 HDC;
|
||||||
typedef HANDLE16 HDROP;
|
|
||||||
typedef HANDLE16 HDRVR;
|
typedef HANDLE16 HDRVR;
|
||||||
typedef HANDLE16 HDWP;
|
|
||||||
typedef HANDLE16 HFONT;
|
typedef HANDLE16 HFONT;
|
||||||
typedef HANDLE16 HGDIOBJ;
|
|
||||||
typedef HANDLE16 HGLOBAL;
|
typedef HANDLE16 HGLOBAL;
|
||||||
typedef HANDLE16 HICON;
|
typedef HANDLE16 HICON;
|
||||||
typedef HANDLE16 HINSTANCE;
|
typedef HANDLE16 HINSTANCE;
|
||||||
|
@ -254,8 +253,6 @@ typedef HANDLE16 HMIDIIN;
|
||||||
typedef HANDLE16 HMIDIOUT;
|
typedef HANDLE16 HMIDIOUT;
|
||||||
typedef HANDLE16 HMMIO;
|
typedef HANDLE16 HMMIO;
|
||||||
typedef HANDLE16 HMODULE;
|
typedef HANDLE16 HMODULE;
|
||||||
typedef HANDLE16 HPALETTE;
|
|
||||||
typedef HANDLE16 HPEN;
|
|
||||||
typedef HANDLE16 HQUEUE;
|
typedef HANDLE16 HQUEUE;
|
||||||
typedef HANDLE16 HRGN;
|
typedef HANDLE16 HRGN;
|
||||||
typedef HANDLE16 HRSRC;
|
typedef HANDLE16 HRSRC;
|
||||||
|
@ -335,17 +332,19 @@ typedef FARPROC HOOKPROC;
|
||||||
|
|
||||||
/* Macros to split words and longs. */
|
/* Macros to split words and longs. */
|
||||||
|
|
||||||
#define LOBYTE(w) ((BYTE)(WORD)(w))
|
#define LOBYTE(w) ((BYTE)(WORD)(w))
|
||||||
#define HIBYTE(w) ((BYTE)((WORD)(w) >> 8))
|
#define HIBYTE(w) ((BYTE)((WORD)(w) >> 8))
|
||||||
|
|
||||||
#define LOWORD(l) ((WORD)(DWORD)(l))
|
#define LOWORD(l) ((WORD)(DWORD)(l))
|
||||||
#define HIWORD(l) ((WORD)((DWORD)(l) >> 16))
|
#define HIWORD(l) ((WORD)((DWORD)(l) >> 16))
|
||||||
|
|
||||||
#define SLOWORD(l) ((INT16)(LONG)(l))
|
#define SLOWORD(l) ((INT16)(LONG)(l))
|
||||||
#define SHIWORD(l) ((INT16)((LONG)(l) >> 16))
|
#define SHIWORD(l) ((INT16)((LONG)(l) >> 16))
|
||||||
|
|
||||||
#define MAKELONG(low, high) ((LONG)(((WORD)(low)) | \
|
#define MAKELONG(low,high) ((LONG)(((WORD)(low)) | \
|
||||||
(((DWORD)((WORD)(high))) << 16)))
|
(((DWORD)((WORD)(high))) << 16)))
|
||||||
|
#define MAKELPARAM(low,high) ((LPARAM)MAKELONG(low,high))
|
||||||
|
#define MAKEWPARAM(low,high) ((WPARAM32)MAKELONG(low,high))
|
||||||
|
|
||||||
#define SELECTOROF(ptr) (HIWORD(ptr))
|
#define SELECTOROF(ptr) (HIWORD(ptr))
|
||||||
#define OFFSETOF(ptr) (LOWORD(ptr))
|
#define OFFSETOF(ptr) (LOWORD(ptr))
|
||||||
|
|
|
@ -86,7 +86,21 @@ typedef struct
|
||||||
HICON32 hIconSm;
|
HICON32 hIconSm;
|
||||||
} WNDCLASSEX32W, *LPWNDCLASSEX32W;
|
} WNDCLASSEX32W, *LPWNDCLASSEX32W;
|
||||||
|
|
||||||
typedef void WNDCLASSEX16; /* There's no WNDCLASSEX in Win16 */
|
typedef struct
|
||||||
|
{
|
||||||
|
UINT32 cbSize;
|
||||||
|
UINT32 style;
|
||||||
|
WNDPROC16 lpfnWndProc;
|
||||||
|
INT16 cbClsExtra;
|
||||||
|
INT16 cbWndExtra;
|
||||||
|
HANDLE16 hInstance;
|
||||||
|
HICON16 hIcon;
|
||||||
|
HCURSOR16 hCursor;
|
||||||
|
HBRUSH16 hbrBackground;
|
||||||
|
SEGPTR lpszMenuName;
|
||||||
|
SEGPTR lpszClassName;
|
||||||
|
HICON16 hIconSm;
|
||||||
|
} WNDCLASSEX16, *LPWNDCLASSEX16;
|
||||||
|
|
||||||
DECL_WINELIB_TYPE_AW(WNDCLASS);
|
DECL_WINELIB_TYPE_AW(WNDCLASS);
|
||||||
DECL_WINELIB_TYPE_AW(LPWNDCLASS);
|
DECL_WINELIB_TYPE_AW(LPWNDCLASS);
|
||||||
|
@ -125,23 +139,7 @@ DECL_WINELIB_TYPE_AW(LPWNDCLASSEX);
|
||||||
#define GCW_STYLE (-26)
|
#define GCW_STYLE (-26)
|
||||||
#define GCL_STYLE GCW_STYLE
|
#define GCL_STYLE GCW_STYLE
|
||||||
#define GCW_ATOM (-32)
|
#define GCW_ATOM (-32)
|
||||||
#define GCL_HICONSM (-34)
|
#define GCW_HICONSM (-34)
|
||||||
|
#define GCL_HICONSM GCW_HICONSM
|
||||||
ATOM RegisterClass16(const WNDCLASS16*);
|
|
||||||
ATOM RegisterClass32A(const WNDCLASS32A *);
|
|
||||||
ATOM RegisterClass32W(const WNDCLASS32W *);
|
|
||||||
#define RegisterClass WINELIB_NAME_AW(RegisterClass)
|
|
||||||
ATOM RegisterClassEx32A(const WNDCLASSEX32A *);
|
|
||||||
ATOM RegisterClassEx32W(const WNDCLASSEX32W *);
|
|
||||||
#define RegisterClassEx WINELIB_NAME_AW(RegisterClassEx)
|
|
||||||
BOOL UnregisterClass16(SEGPTR,HINSTANCE16);
|
|
||||||
BOOL UnregisterClass32A(LPCSTR,HINSTANCE32);
|
|
||||||
BOOL UnregisterClass32W(LPCWSTR,HINSTANCE32);
|
|
||||||
#define UnregisterClass WINELIB_NAME_AW(UnregisterClass)
|
|
||||||
|
|
||||||
BOOL GetClassInfo(HANDLE,SEGPTR,WNDCLASS16 *);
|
|
||||||
LONG GetClassLong(HWND,short);
|
|
||||||
int GetClassName(HWND,LPSTR,short);
|
|
||||||
LONG SetClassLong(HWND,short,LONG);
|
|
||||||
|
|
||||||
#endif /* __WINE_WINUSER_H */
|
#endif /* __WINE_WINUSER_H */
|
||||||
|
|
|
@ -2,9 +2,7 @@ TOPSRC = @top_srcdir@
|
||||||
MODULE = library
|
MODULE = library
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
atom.c \
|
|
||||||
arch.c \
|
arch.c \
|
||||||
heap.c \
|
|
||||||
libres.c \
|
libres.c \
|
||||||
miscstubs.c \
|
miscstubs.c \
|
||||||
sup.c \
|
sup.c \
|
||||||
|
|
341
library/atom.c
341
library/atom.c
|
@ -1,341 +0,0 @@
|
||||||
/*
|
|
||||||
* Atom table functions
|
|
||||||
*
|
|
||||||
* Copyright 1993, 1994, 1995 Alexandre Julliard
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#include "windows.h"
|
|
||||||
#include "xmalloc.h"
|
|
||||||
|
|
||||||
#ifdef CONFIG_IPC
|
|
||||||
#include "dde_atom.h"
|
|
||||||
#include "options.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MIN_STR_ATOM 0xc000
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
WORD refCount;
|
|
||||||
BYTE length;
|
|
||||||
char* str;
|
|
||||||
} ATOMDATA;
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
void* next;
|
|
||||||
ATOMDATA a2h[16];
|
|
||||||
} ATOMtoHANDLEtable;
|
|
||||||
|
|
||||||
static ATOMtoHANDLEtable* GlobalAtomTable = NULL;
|
|
||||||
static ATOMtoHANDLEtable* LocalAtomTable = NULL;
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* ATOM_Init
|
|
||||||
*
|
|
||||||
* Global table initialisation.
|
|
||||||
*/
|
|
||||||
BOOL ATOM_Init(void)
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* ATOM_AddAtom
|
|
||||||
*/
|
|
||||||
static ATOM ATOM_AddAtom( ATOMtoHANDLEtable** tableptr, SEGPTR name )
|
|
||||||
{
|
|
||||||
ATOMDATA* FirstUnused;
|
|
||||||
ATOM FirstUnusedIndex;
|
|
||||||
ATOM Index;
|
|
||||||
ATOMtoHANDLEtable* table;
|
|
||||||
int i,len;
|
|
||||||
char *str;
|
|
||||||
|
|
||||||
/* Check for integer atom */
|
|
||||||
|
|
||||||
if (!HIWORD(name)) return (ATOM)LOWORD(name);
|
|
||||||
str = (char*)name;
|
|
||||||
if (str[0] == '#') return atoi( &str[1] );
|
|
||||||
|
|
||||||
if ((len = strlen( str )) > 255) len = 255;
|
|
||||||
table = *tableptr;
|
|
||||||
FirstUnused = NULL;
|
|
||||||
FirstUnusedIndex = 0;
|
|
||||||
Index = MIN_STR_ATOM;
|
|
||||||
while (table)
|
|
||||||
{
|
|
||||||
for(i=0; i<16; i++, Index++)
|
|
||||||
{
|
|
||||||
if (!table->a2h[i].refCount)
|
|
||||||
{
|
|
||||||
FirstUnused=&table->a2h[i];
|
|
||||||
FirstUnusedIndex=Index;
|
|
||||||
}
|
|
||||||
else if ((table->a2h[i].length == len) &&
|
|
||||||
(!lstrncmpi( table->a2h[i].str, str, len )))
|
|
||||||
{
|
|
||||||
table->a2h[i].refCount++;
|
|
||||||
return Index;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tableptr = (ATOMtoHANDLEtable**)&table->next;
|
|
||||||
table = table->next;
|
|
||||||
}
|
|
||||||
if(!FirstUnused)
|
|
||||||
{
|
|
||||||
*tableptr = xmalloc(sizeof(ATOMtoHANDLEtable));
|
|
||||||
(*tableptr)->next = NULL;
|
|
||||||
for(i=0; i<16; i++)
|
|
||||||
{
|
|
||||||
(*tableptr)->a2h[i].str = NULL;
|
|
||||||
(*tableptr)->a2h[i].refCount = 0;
|
|
||||||
}
|
|
||||||
FirstUnused = (*tableptr)->a2h;
|
|
||||||
FirstUnusedIndex = Index;
|
|
||||||
}
|
|
||||||
if((FirstUnused->str = malloc(len+1)))
|
|
||||||
{
|
|
||||||
memcpy( FirstUnused->str, str, len );
|
|
||||||
FirstUnused->str[len] = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
FirstUnused->refCount = 1;
|
|
||||||
FirstUnused->length = len;
|
|
||||||
return FirstUnusedIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* ATOM_DeleteAtom
|
|
||||||
*/
|
|
||||||
static ATOM ATOM_DeleteAtom( ATOMtoHANDLEtable** tableptr, ATOM atom )
|
|
||||||
{
|
|
||||||
ATOMtoHANDLEtable* table;
|
|
||||||
int i;
|
|
||||||
ATOM Index;
|
|
||||||
|
|
||||||
if (atom < MIN_STR_ATOM) return 0; /* Integer atom */
|
|
||||||
|
|
||||||
Index = MIN_STR_ATOM;
|
|
||||||
table = *tableptr;
|
|
||||||
while (table)
|
|
||||||
{
|
|
||||||
if(atom-Index < 16)
|
|
||||||
{
|
|
||||||
i=atom-Index;
|
|
||||||
|
|
||||||
/* Delete atom */
|
|
||||||
if (--table->a2h[i].refCount == 0)
|
|
||||||
{
|
|
||||||
free(table->a2h[i].str);
|
|
||||||
table->a2h[i].str=NULL;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Index+=16;
|
|
||||||
table = table->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return atom;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* ATOM_FindAtom
|
|
||||||
*/
|
|
||||||
static ATOM ATOM_FindAtom( ATOMtoHANDLEtable** tableptr, SEGPTR name )
|
|
||||||
{
|
|
||||||
ATOM Index;
|
|
||||||
ATOMtoHANDLEtable* table;
|
|
||||||
int i,len;
|
|
||||||
char *str;
|
|
||||||
|
|
||||||
/* Check for integer atom */
|
|
||||||
|
|
||||||
if (!HIWORD(name)) return (ATOM)LOWORD(name);
|
|
||||||
str = (char*)name;
|
|
||||||
if (str[0] == '#') return atoi( &str[1] );
|
|
||||||
|
|
||||||
if ((len = strlen( str )) > 255) len = 255;
|
|
||||||
table=*tableptr;
|
|
||||||
Index=MIN_STR_ATOM;
|
|
||||||
while (table)
|
|
||||||
{
|
|
||||||
for(i=0; i<16; i++, Index++)
|
|
||||||
{
|
|
||||||
if ((table->a2h[i].refCount != 0) &&
|
|
||||||
(table->a2h[i].length == len) &&
|
|
||||||
(!lstrncmpi( table->a2h[i].str, str, len )))
|
|
||||||
return Index;
|
|
||||||
}
|
|
||||||
table=table->next;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* ATOM_GetAtomName
|
|
||||||
*/
|
|
||||||
static WORD ATOM_GetAtomName( ATOMtoHANDLEtable** tableptr, ATOM atom,
|
|
||||||
LPSTR buffer, short count )
|
|
||||||
{
|
|
||||||
ATOMtoHANDLEtable* table;
|
|
||||||
ATOM Index;
|
|
||||||
char * strPtr=NULL;
|
|
||||||
int i,len=0;
|
|
||||||
char text[8];
|
|
||||||
|
|
||||||
if (!count) return 0;
|
|
||||||
if (atom < MIN_STR_ATOM)
|
|
||||||
{
|
|
||||||
sprintf( text, "#%d", atom );
|
|
||||||
len = strlen(text);
|
|
||||||
strPtr = text;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Index = MIN_STR_ATOM;
|
|
||||||
table = *tableptr;
|
|
||||||
while (table)
|
|
||||||
{
|
|
||||||
if(atom-Index < 16)
|
|
||||||
{
|
|
||||||
i=atom-Index;
|
|
||||||
|
|
||||||
if (table->a2h[i].refCount == 0)
|
|
||||||
table=NULL;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
len = table->a2h[i].length;
|
|
||||||
strPtr = table->a2h[i].str;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Index+=16;
|
|
||||||
table = table->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!table)return 0;
|
|
||||||
}
|
|
||||||
if (len >= count) len = count-1;
|
|
||||||
memcpy( buffer, strPtr, len );
|
|
||||||
buffer[len] = '\0';
|
|
||||||
return len;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* InitAtomTable (KERNEL.68)
|
|
||||||
*/
|
|
||||||
WORD InitAtomTable( WORD entries )
|
|
||||||
{
|
|
||||||
return entries;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* GetAtomHandle (KERNEL.73)
|
|
||||||
*/
|
|
||||||
HANDLE GetAtomHandle( ATOM atom )
|
|
||||||
{
|
|
||||||
fprintf(stderr,"JBP: GetAtomHandle() called (obsolete).\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* AddAtom (KERNEL.70)
|
|
||||||
*/
|
|
||||||
ATOM AddAtom( SEGPTR str )
|
|
||||||
{
|
|
||||||
return ATOM_AddAtom( &LocalAtomTable, (SEGPTR)str );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* DeleteAtom (KERNEL.71)
|
|
||||||
*/
|
|
||||||
ATOM DeleteAtom( ATOM atom )
|
|
||||||
{
|
|
||||||
return ATOM_DeleteAtom( &LocalAtomTable, atom );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* FindAtom (KERNEL.69)
|
|
||||||
*/
|
|
||||||
ATOM FindAtom( SEGPTR str )
|
|
||||||
{
|
|
||||||
return ATOM_FindAtom( &LocalAtomTable, str );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* GetAtomName (KERNEL.72)
|
|
||||||
*/
|
|
||||||
WORD GetAtomName( ATOM atom, LPSTR buffer, short count )
|
|
||||||
{
|
|
||||||
return ATOM_GetAtomName( &LocalAtomTable, atom, buffer, count );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* GlobalAddAtom (USER.268)
|
|
||||||
*/
|
|
||||||
ATOM GlobalAddAtom( SEGPTR str )
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_IPC
|
|
||||||
if (Options.ipc) return DDE_GlobalAddAtom( str );
|
|
||||||
#endif
|
|
||||||
return ATOM_AddAtom( &GlobalAtomTable, str );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* GlobalDeleteAtom (USER.269)
|
|
||||||
*/
|
|
||||||
ATOM GlobalDeleteAtom( ATOM atom )
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_IPC
|
|
||||||
if (Options.ipc) return DDE_GlobalDeleteAtom( atom );
|
|
||||||
#endif
|
|
||||||
return ATOM_DeleteAtom( &GlobalAtomTable, atom );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* GlobalFindAtom (USER.270)
|
|
||||||
*/
|
|
||||||
ATOM GlobalFindAtom( SEGPTR str )
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_IPC
|
|
||||||
if (Options.ipc) return DDE_GlobalFindAtom( str );
|
|
||||||
#endif
|
|
||||||
return ATOM_FindAtom( &GlobalAtomTable, str );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* GlobalGetAtomName (USER.271)
|
|
||||||
*/
|
|
||||||
WORD GlobalGetAtomName( ATOM atom, LPSTR buffer, short count )
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_IPC
|
|
||||||
if (Options.ipc) return DDE_GlobalGetAtomName( atom, buffer, count );
|
|
||||||
#endif
|
|
||||||
return ATOM_GetAtomName( &GlobalAtomTable, atom, buffer, count );
|
|
||||||
}
|
|
340
library/heap.c
340
library/heap.c
|
@ -1,340 +0,0 @@
|
||||||
/*
|
|
||||||
* Memory alllocation for the Wine Library toolkit
|
|
||||||
*
|
|
||||||
* Copyright (C) 1994 Miguel de Icaza
|
|
||||||
*
|
|
||||||
* All the memory management is being done by the libc malloc and friends.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* #ifndef __STDC__ */
|
|
||||||
#include <malloc.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
/* #endif */
|
|
||||||
#include "windows.h"
|
|
||||||
#include "xmalloc.h"
|
|
||||||
|
|
||||||
#ifdef WINELIB16
|
|
||||||
|
|
||||||
/* Controls the blocks per handle table */
|
|
||||||
#define MAXBLOCKS 1024
|
|
||||||
|
|
||||||
typedef struct handle_table {
|
|
||||||
struct handle_table *next;
|
|
||||||
void *blocks [MAXBLOCKS];
|
|
||||||
} handle_table_t;
|
|
||||||
|
|
||||||
static handle_table_t handle_table;
|
|
||||||
|
|
||||||
static void **HEAP_GetFreeSlot (HANDLE *hNum)
|
|
||||||
{
|
|
||||||
handle_table_t *table, *last;
|
|
||||||
int i, j;
|
|
||||||
|
|
||||||
for (table = &handle_table, j = 0; table; table = table->next, j++){
|
|
||||||
for (i = 0; i < MAXBLOCKS; i++)
|
|
||||||
if (!table->blocks [i])
|
|
||||||
goto AssignBlock;
|
|
||||||
last = table;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* No free slots */
|
|
||||||
last->next = xmalloc (sizeof (handle_table_t));
|
|
||||||
table = last->next;
|
|
||||||
memset (table, 0, sizeof (handle_table_t));
|
|
||||||
i = 0;
|
|
||||||
|
|
||||||
AssignBlock:
|
|
||||||
*hNum = j*MAXBLOCKS+i;
|
|
||||||
return &table->blocks [i];
|
|
||||||
}
|
|
||||||
|
|
||||||
static void HEAP_Handle_is_Zero ()
|
|
||||||
{
|
|
||||||
printf ("Warning: Handle is Zero, segmentation fault comming\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void **HEAP_FindSlot (HANDLE hNum)
|
|
||||||
{
|
|
||||||
handle_table_t *table = &handle_table;
|
|
||||||
int i, j;
|
|
||||||
|
|
||||||
if (!hNum)
|
|
||||||
HEAP_Handle_is_Zero ();
|
|
||||||
|
|
||||||
hNum--;
|
|
||||||
for (j = hNum; j > MAXBLOCKS; j -= MAXBLOCKS){
|
|
||||||
table = table->next;
|
|
||||||
if (!table) return 0;
|
|
||||||
}
|
|
||||||
return &table->blocks [hNum%MAXBLOCKS];
|
|
||||||
}
|
|
||||||
|
|
||||||
HANDLE LocalAlloc (WORD flags, WORD bytes)
|
|
||||||
{
|
|
||||||
void *m;
|
|
||||||
void **slot;
|
|
||||||
HANDLE hMem;
|
|
||||||
|
|
||||||
slot = HEAP_GetFreeSlot (&hMem);
|
|
||||||
if ((m = malloc (bytes)))
|
|
||||||
{
|
|
||||||
*slot = m;
|
|
||||||
if (flags & LMEM_ZEROINIT) memset( m, 0, bytes );
|
|
||||||
|
|
||||||
#ifdef DEBUG_HEAP
|
|
||||||
printf ("Handle %d [%d] = %p\n", hMem+1, bytes, m);
|
|
||||||
#endif
|
|
||||||
return hMem+1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
WORD LocalCompact (WORD min_free)
|
|
||||||
{
|
|
||||||
return min_free;
|
|
||||||
}
|
|
||||||
|
|
||||||
WORD LocalFlags (HANDLE hMem)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
HANDLE LocalFree (HANDLE hMem)
|
|
||||||
{
|
|
||||||
void **m;
|
|
||||||
if(!hMem)
|
|
||||||
return 0;
|
|
||||||
m = HEAP_FindSlot (hMem);
|
|
||||||
|
|
||||||
free (*m);
|
|
||||||
*m = 0;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL LocalInit (WORD segment, WORD start, WORD end)
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
WORD LocalLock (HANDLE hMem)
|
|
||||||
{
|
|
||||||
void **m = HEAP_FindSlot (hMem);
|
|
||||||
#ifdef DEBUG_HEAP
|
|
||||||
printf (">%d->%p\n", hMem, *m);
|
|
||||||
#endif
|
|
||||||
return m ? *m : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
HANDLE LocalReAlloc (HANDLE hMem, WORD flags, WORD bytes)
|
|
||||||
{
|
|
||||||
void **m = HEAP_FindSlot (hMem);
|
|
||||||
|
|
||||||
xrealloc (*m, bytes);
|
|
||||||
}
|
|
||||||
|
|
||||||
WORD LocalSize (HANDLE hMem)
|
|
||||||
{
|
|
||||||
/* Not implemented yet */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
BOOL LocalUnlock (HANDLE hMem)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
HANDLE GlobalAlloc (WORD flags, DWORD size)
|
|
||||||
{
|
|
||||||
return LocalAlloc (flags, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
HANDLE GlobalFree (HANDLE hMem)
|
|
||||||
{
|
|
||||||
return LocalFree (hMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
char *GlobalLock (HANDLE hMem)
|
|
||||||
{
|
|
||||||
return LocalLock (hMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL GlobalUnlock (HANDLE hMem)
|
|
||||||
{
|
|
||||||
return LocalUnlock (hMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
WORD GlobalFlags16(HANDLE hMem)
|
|
||||||
{
|
|
||||||
return LocalFlags (hMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD GlobalSize16(HANDLE hMem)
|
|
||||||
{
|
|
||||||
return LocalSize (hMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD GlobalCompact(DWORD desired)
|
|
||||||
{
|
|
||||||
if (desired)
|
|
||||||
return desired;
|
|
||||||
else
|
|
||||||
return 0x01000000; /* Should check the available core. */
|
|
||||||
}
|
|
||||||
|
|
||||||
HANDLE GlobalReAlloc16(HANDLE hMem, DWORD new_size, WORD flags)
|
|
||||||
{
|
|
||||||
if (!(flags & GMEM_MODIFY))
|
|
||||||
return LocalReAlloc (hMem, new_size, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
int HEAP_LocalSize ()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int HEAP_LocalFindHeap ()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef UNIMPLEMENTED
|
|
||||||
|
|
||||||
DWORD int GlobalHandle(WORD selector)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* WINELIB16 */
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
typedef struct { DWORD Size; DWORD Padding[3]; } HeapData;
|
|
||||||
|
|
||||||
HANDLE HEAP_Alloc (WORD flags, DWORD bytes)
|
|
||||||
{
|
|
||||||
HeapData* m;
|
|
||||||
|
|
||||||
bytes+=sizeof(HeapData);
|
|
||||||
if ((m = malloc (bytes)))
|
|
||||||
{
|
|
||||||
if (flags & LMEM_ZEROINIT) memset( m, 0, bytes );
|
|
||||||
}
|
|
||||||
m->Size=bytes-sizeof(HeapData);
|
|
||||||
return (HANDLE)(m+1);
|
|
||||||
}
|
|
||||||
|
|
||||||
HANDLE HEAP_Free (HANDLE hMem)
|
|
||||||
{
|
|
||||||
HeapData* m;
|
|
||||||
if(!hMem)
|
|
||||||
return 0;
|
|
||||||
m=(HeapData*)hMem;
|
|
||||||
free(m-1);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD HEAP_Size (HANDLE hMem)
|
|
||||||
{
|
|
||||||
HeapData* m=(HeapData*)hMem;
|
|
||||||
return (m-1)->Size;
|
|
||||||
}
|
|
||||||
|
|
||||||
HANDLE HEAP_ReAlloc(HANDLE hMem,DWORD bytes,UINT flags)
|
|
||||||
{
|
|
||||||
HeapData* m=(HeapData*)hMem;
|
|
||||||
if(!bytes)
|
|
||||||
{
|
|
||||||
free(m-1);
|
|
||||||
return 0; /* Inaccurate behavior, but should suffice */
|
|
||||||
}
|
|
||||||
m=realloc (m-1, bytes+sizeof(HeapData));
|
|
||||||
if(flags & LMEM_ZEROINIT && bytes > m->Size)
|
|
||||||
memset( (char*)m+sizeof(HeapData)+m->Size, 0, bytes-m->Size );
|
|
||||||
m->Size=bytes;
|
|
||||||
return (HANDLE)(m+1);
|
|
||||||
}
|
|
||||||
|
|
||||||
HANDLE LocalAlloc (WORD flags, WORD bytes)
|
|
||||||
{
|
|
||||||
return HEAP_Alloc(flags,bytes);
|
|
||||||
}
|
|
||||||
|
|
||||||
UINT LocalFlags (HANDLE hMem)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
HANDLE LocalFree (HANDLE hMem)
|
|
||||||
{
|
|
||||||
return HEAP_Free(hMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL LocalInit (HANDLE segment, WORD start, WORD end)
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
LPVOID LocalLock (HANDLE hMem)
|
|
||||||
{
|
|
||||||
return (LPVOID)hMem;
|
|
||||||
}
|
|
||||||
|
|
||||||
HANDLE LocalReAlloc (HANDLE hMem, WORD new_size, WORD flags)
|
|
||||||
{
|
|
||||||
if (!(flags & LMEM_MODIFY))
|
|
||||||
return HEAP_ReAlloc (hMem, new_size, flags);
|
|
||||||
else
|
|
||||||
return hMem;
|
|
||||||
}
|
|
||||||
|
|
||||||
UINT LocalSize (HANDLE hMem)
|
|
||||||
{
|
|
||||||
return HEAP_Size(hMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL LocalUnlock (HANDLE hMem)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
HANDLE GlobalAlloc (WORD flags, DWORD size)
|
|
||||||
{
|
|
||||||
return HEAP_Alloc (flags,size);
|
|
||||||
}
|
|
||||||
|
|
||||||
HANDLE GlobalFree (HANDLE hMem)
|
|
||||||
{
|
|
||||||
return HEAP_Free (hMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
LPVOID GlobalLock (HGLOBAL hMem)
|
|
||||||
{
|
|
||||||
return (LPVOID)hMem;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL GlobalUnlock (HANDLE hMem)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
WORD GlobalFlags32(HANDLE hMem)
|
|
||||||
{
|
|
||||||
return LocalFlags (hMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD GlobalSize32(HANDLE hMem)
|
|
||||||
{
|
|
||||||
return HEAP_Size (hMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
HANDLE GlobalReAlloc32(HANDLE hMem, DWORD new_size, WORD flags)
|
|
||||||
{
|
|
||||||
if (!(flags & GMEM_MODIFY))
|
|
||||||
return HEAP_ReAlloc (hMem, new_size, flags);
|
|
||||||
else
|
|
||||||
return hMem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -10,7 +10,6 @@
|
||||||
#include "dde_mem.h"
|
#include "dde_mem.h"
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "relay32.h"
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
|
||||||
|
@ -44,93 +43,6 @@ int CallTo32_LargeStack( int (*func)(), int nbargs, ...)
|
||||||
|
|
||||||
WORD CallTo16_word_ ( FARPROC func, WORD arg ) { return func(arg); }
|
WORD CallTo16_word_ ( FARPROC func, WORD arg ) { return func(arg); }
|
||||||
|
|
||||||
#if 0
|
|
||||||
void GlobalFreeAll(HGLOBAL16 owner)
|
|
||||||
{
|
|
||||||
WINELIB_UNIMP("GlobalFreeAll()");
|
|
||||||
}
|
|
||||||
|
|
||||||
SEGPTR WIN16_GlobalLock16(HGLOBAL16 h)
|
|
||||||
{ return (SEGPTR)h; }
|
|
||||||
HLOCAL LOCAL_Free(WORD ds, HLOCAL handle)
|
|
||||||
{ return LocalFree(handle); }
|
|
||||||
HLOCAL LOCAL_Alloc(WORD ds, WORD flags, WORD size)
|
|
||||||
{ return LocalAlloc(flags,size); }
|
|
||||||
HLOCAL LOCAL_ReAlloc(WORD ds, HLOCAL handle, WORD size, WORD flags)
|
|
||||||
{ return LocalReAlloc(handle,size,flags); }
|
|
||||||
LPSTR LOCAL_Lock( WORD ds, HLOCAL handle )
|
|
||||||
{ return LocalLock(handle); }
|
|
||||||
BOOL LOCAL_Unlock( WORD ds, HLOCAL handle )
|
|
||||||
{ return LocalUnlock(handle); }
|
|
||||||
WORD LOCAL_Size( WORD ds, HLOCAL handle )
|
|
||||||
{ return LocalSize(handle); }
|
|
||||||
|
|
||||||
void FarSetOwner(HANDLE a, HANDLE b)
|
|
||||||
{
|
|
||||||
WINELIB_UNIMP("FarSetOwner()");
|
|
||||||
}
|
|
||||||
|
|
||||||
#define GLOBAL_MAX_ALLOC_SIZE 0x00ff0000 /* Largest allocation is 16M - 64K */
|
|
||||||
|
|
||||||
HGLOBAL GLOBAL_Alloc( WORD flags, DWORD size, HGLOBAL hOwner,
|
|
||||||
BOOL isCode, BOOL is32Bit, BOOL isReadOnly )
|
|
||||||
{
|
|
||||||
void *ptr;
|
|
||||||
HGLOBAL handle;
|
|
||||||
SHMDATA shmdata;
|
|
||||||
|
|
||||||
dprintf_global( stddeb, "GLOBAL_Alloc: %ld flags=%04x\n", size, flags );
|
|
||||||
|
|
||||||
/* Fixup the size */
|
|
||||||
|
|
||||||
if (size >= GLOBAL_MAX_ALLOC_SIZE - 0x1f) return 0;
|
|
||||||
if (size == 0) size = 0x20;
|
|
||||||
else size = (size + 0x1f) & ~0x1f;
|
|
||||||
|
|
||||||
/* Allocate the linear memory */
|
|
||||||
|
|
||||||
#ifdef CONFIG_IPC
|
|
||||||
if ((flags & GMEM_DDESHARE) && Options.ipc)
|
|
||||||
ptr = DDE_malloc(flags, size, &shmdata);
|
|
||||||
else
|
|
||||||
#endif /* CONFIG_IPC */
|
|
||||||
ptr = malloc( size );
|
|
||||||
if (!ptr) return 0;
|
|
||||||
|
|
||||||
/* Allocate the selector(s) */
|
|
||||||
|
|
||||||
handle = GLOBAL_CreateBlock( flags, ptr, size, hOwner,
|
|
||||||
isCode, is32Bit, isReadOnly, &shmdata);
|
|
||||||
if (!handle)
|
|
||||||
{
|
|
||||||
free( ptr );
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flags & GMEM_ZEROINIT) memset( ptr, 0, size );
|
|
||||||
return handle;
|
|
||||||
}
|
|
||||||
|
|
||||||
HGLOBAL GLOBAL_CreateBlock( WORD flags, const void *ptr, DWORD size,
|
|
||||||
HGLOBAL hOwner, BOOL isCode,
|
|
||||||
BOOL is32Bit, BOOL isReadOnly,
|
|
||||||
SHMDATA *shmdata)
|
|
||||||
{
|
|
||||||
return (HGLOBAL)ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL GLOBAL_FreeBlock( HGLOBAL handle )
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
HGLOBAL GlobalHandle(LPCVOID a)
|
|
||||||
{
|
|
||||||
fprintf(stderr,"JBP: GlobalHandle() ignored.\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern LRESULT ACTIVATEAPP_callback(HWND,UINT,WPARAM,LPARAM);
|
extern LRESULT ACTIVATEAPP_callback(HWND,UINT,WPARAM,LPARAM);
|
||||||
extern LRESULT AboutDlgProc(HWND,UINT,WPARAM,LPARAM);
|
extern LRESULT AboutDlgProc(HWND,UINT,WPARAM,LPARAM);
|
||||||
extern LRESULT ButtonWndProc(HWND,UINT,WPARAM,LPARAM);
|
extern LRESULT ButtonWndProc(HWND,UINT,WPARAM,LPARAM);
|
||||||
|
|
|
@ -6,12 +6,6 @@
|
||||||
#include "arch.h"
|
#include "arch.h"
|
||||||
#include "neexe.h"
|
#include "neexe.h"
|
||||||
|
|
||||||
LRESULT CallWindowProc (WNDPROC func, HWND hwnd, UINT message,
|
|
||||||
WPARAM wParam, LPARAM lParam)
|
|
||||||
{
|
|
||||||
return (*func)(hwnd, message, wParam, lParam);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Header loading routines for WineLib.
|
* Header loading routines for WineLib.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -13,7 +13,6 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include "alias.h"
|
#include "alias.h"
|
||||||
#include "module.h"
|
#include "module.h"
|
||||||
#include "task.h"
|
|
||||||
#include "selectors.h"
|
#include "selectors.h"
|
||||||
#include "comm.h"
|
#include "comm.h"
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
@ -37,12 +36,14 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||||
#include "user.h"
|
#include "user.h"
|
||||||
#include "dce.h"
|
#include "dce.h"
|
||||||
#include "pe_image.h"
|
#include "pe_image.h"
|
||||||
|
#include "shell.h"
|
||||||
#include "stddebug.h"
|
#include "stddebug.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
void init_wine_signals(void);
|
void init_wine_signals(void);
|
||||||
|
|
||||||
HANDLE32 SystemHeap = 0;
|
HANDLE32 SystemHeap = 0;
|
||||||
|
HANDLE32 SegptrHeap = 0;
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Main initialisation routine
|
* Main initialisation routine
|
||||||
|
@ -53,8 +54,9 @@ int MAIN_Init(void)
|
||||||
|
|
||||||
int queueSize;
|
int queueSize;
|
||||||
|
|
||||||
/* Create the system heap */
|
/* Create the system and SEGPTR heaps */
|
||||||
if (!(SystemHeap = HeapCreate( HEAP_GROWABLE, 0x10000, 0 ))) return 0;
|
if (!(SystemHeap = HeapCreate( HEAP_GROWABLE, 0x10000, 0 ))) return 0;
|
||||||
|
if (!(SegptrHeap = HeapCreate( HEAP_WINE_SEGPTR, 0, 0 ))) return 0;
|
||||||
|
|
||||||
/* Load the configuration file */
|
/* Load the configuration file */
|
||||||
if (!PROFILE_LoadWineIni()) return 0;
|
if (!PROFILE_LoadWineIni()) return 0;
|
||||||
|
@ -101,6 +103,8 @@ int MAIN_Init(void)
|
||||||
/* Initialize the DOS memory */
|
/* Initialize the DOS memory */
|
||||||
if (!INT21_Init()) return 0;
|
if (!INT21_Init()) return 0;
|
||||||
#endif
|
#endif
|
||||||
|
/* registry initialisation */
|
||||||
|
SHELL_LoadRegistry();
|
||||||
|
|
||||||
/* Global atom table initialisation */
|
/* Global atom table initialisation */
|
||||||
if (!ATOM_Init()) return 0;
|
if (!ATOM_Init()) return 0;
|
||||||
|
|
|
@ -759,7 +759,7 @@ BOOL MODULE_SetEntryPoint( HMODULE hModule, WORD ordinal, WORD offset )
|
||||||
* Return an entry point from the WPROCS dll.
|
* Return an entry point from the WPROCS dll.
|
||||||
*/
|
*/
|
||||||
#ifndef WINELIB
|
#ifndef WINELIB
|
||||||
WNDPROC MODULE_GetWndProcEntry16( const char *name )
|
FARPROC16 MODULE_GetWndProcEntry16( const char *name )
|
||||||
{
|
{
|
||||||
WORD ordinal;
|
WORD ordinal;
|
||||||
static HMODULE hModule = 0;
|
static HMODULE hModule = 0;
|
||||||
|
@ -777,7 +777,7 @@ WNDPROC MODULE_GetWndProcEntry16( const char *name )
|
||||||
* Return an entry point from the WPROCS32 dll.
|
* Return an entry point from the WPROCS32 dll.
|
||||||
*/
|
*/
|
||||||
#ifndef WINELIB
|
#ifndef WINELIB
|
||||||
WNDPROC MODULE_GetWndProcEntry32( const char *name )
|
FARPROC32 MODULE_GetWndProcEntry32( const char *name )
|
||||||
{
|
{
|
||||||
static HMODULE hModule = 0;
|
static HMODULE hModule = 0;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "neexe.h"
|
#include "neexe.h"
|
||||||
#include "peexe.h"
|
#include "peexe.h"
|
||||||
#include "pe_image.h"
|
#include "pe_image.h"
|
||||||
#include "relay32.h"
|
|
||||||
#include "module.h"
|
#include "module.h"
|
||||||
#include "alias.h"
|
#include "alias.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
|
@ -171,11 +171,7 @@ void init_wine_signals(void)
|
||||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||||
struct sigaltstack ss;
|
struct sigaltstack ss;
|
||||||
|
|
||||||
#if !defined (__FreeBSD__)
|
|
||||||
if ((ss.ss_base = malloc(MINSIGSTKSZ)) == NULL) {
|
|
||||||
#else
|
|
||||||
if ((ss.ss_sp = malloc(MINSIGSTKSZ)) == NULL) {
|
if ((ss.ss_sp = malloc(MINSIGSTKSZ)) == NULL) {
|
||||||
#endif
|
|
||||||
fprintf(stderr, "Unable to allocate signal stack (%d bytes)\n",
|
fprintf(stderr, "Unable to allocate signal stack (%d bytes)\n",
|
||||||
MINSIGSTKSZ);
|
MINSIGSTKSZ);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
141
memory/atom.c
141
memory/atom.c
|
@ -11,8 +11,6 @@
|
||||||
* have to be changed.
|
* have to be changed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef WINELIB
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -22,6 +20,7 @@
|
||||||
#include "instance.h"
|
#include "instance.h"
|
||||||
#include "ldt.h"
|
#include "ldt.h"
|
||||||
#include "stackframe.h"
|
#include "stackframe.h"
|
||||||
|
#include "string32.h"
|
||||||
#include "user.h"
|
#include "user.h"
|
||||||
|
|
||||||
#ifdef CONFIG_IPC
|
#ifdef CONFIG_IPC
|
||||||
|
@ -31,6 +30,7 @@
|
||||||
|
|
||||||
#define DEFAULT_ATOMTABLE_SIZE 37
|
#define DEFAULT_ATOMTABLE_SIZE 37
|
||||||
#define MIN_STR_ATOM 0xc000
|
#define MIN_STR_ATOM 0xc000
|
||||||
|
#define MAX_ATOM_LEN 255
|
||||||
|
|
||||||
#define ATOMTOHANDLE(atom) ((HANDLE)(atom) << 2)
|
#define ATOMTOHANDLE(atom) ((HANDLE)(atom) << 2)
|
||||||
#define HANDLETOATOM(handle) ((ATOM)(0xc000 | ((handle) >> 2)))
|
#define HANDLETOATOM(handle) ((ATOM)(0xc000 | ((handle) >> 2)))
|
||||||
|
@ -45,10 +45,10 @@
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* ATOM_InitTable
|
* ATOM_InitTable
|
||||||
*/
|
*/
|
||||||
static WORD ATOM_InitTable( WORD selector, WORD entries )
|
static HANDLE16 ATOM_InitTable( WORD selector, WORD entries )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
HANDLE handle;
|
HANDLE16 handle;
|
||||||
ATOMTABLE *table;
|
ATOMTABLE *table;
|
||||||
|
|
||||||
/* Allocate the table */
|
/* Allocate the table */
|
||||||
|
@ -72,9 +72,9 @@ static WORD ATOM_InitTable( WORD selector, WORD entries )
|
||||||
*
|
*
|
||||||
* Global table initialisation.
|
* Global table initialisation.
|
||||||
*/
|
*/
|
||||||
WORD ATOM_Init()
|
BOOL ATOM_Init(void)
|
||||||
{
|
{
|
||||||
return ATOM_InitTable( USER_HeapSel, DEFAULT_ATOMTABLE_SIZE );
|
return ATOM_InitTable( USER_HeapSel, DEFAULT_ATOMTABLE_SIZE ) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -124,21 +124,15 @@ static WORD ATOM_Hash( WORD entries, LPCSTR str, WORD len )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* ATOM_AddAtom
|
* ATOM_AddAtom
|
||||||
*/
|
*/
|
||||||
static ATOM ATOM_AddAtom( WORD selector, SEGPTR name )
|
static ATOM ATOM_AddAtom( WORD selector, LPCSTR str )
|
||||||
{
|
{
|
||||||
WORD hash;
|
WORD hash;
|
||||||
HANDLE entry;
|
HANDLE entry;
|
||||||
ATOMENTRY * entryPtr;
|
ATOMENTRY * entryPtr;
|
||||||
ATOMTABLE * table;
|
ATOMTABLE * table;
|
||||||
int len;
|
int len;
|
||||||
char *str;
|
|
||||||
|
|
||||||
/* Check for integer atom */
|
|
||||||
|
|
||||||
if (!HIWORD(name)) return (ATOM)LOWORD(name);
|
|
||||||
str = PTR_SEG_TO_LIN( name );
|
|
||||||
if (str[0] == '#') return atoi( &str[1] );
|
|
||||||
|
|
||||||
|
if (str[0] == '#') return atoi( &str[1] ); /* Check for integer atom */
|
||||||
if ((len = strlen( str )) > 255) len = 255;
|
if ((len = strlen( str )) > 255) len = 255;
|
||||||
if (!(table = ATOM_GetTable( selector, TRUE ))) return 0;
|
if (!(table = ATOM_GetTable( selector, TRUE ))) return 0;
|
||||||
hash = ATOM_Hash( table->size, str, len );
|
hash = ATOM_Hash( table->size, str, len );
|
||||||
|
@ -159,7 +153,6 @@ static ATOM ATOM_AddAtom( WORD selector, SEGPTR name )
|
||||||
if (!entry) return 0;
|
if (!entry) return 0;
|
||||||
/* Reload the table ptr in case it moved in linear memory */
|
/* Reload the table ptr in case it moved in linear memory */
|
||||||
table = ATOM_GetTable( selector, FALSE );
|
table = ATOM_GetTable( selector, FALSE );
|
||||||
str = PTR_SEG_TO_LIN( name );
|
|
||||||
entryPtr = ATOM_MakePtr( selector, entry );
|
entryPtr = ATOM_MakePtr( selector, entry );
|
||||||
entryPtr->next = table->entries[hash];
|
entryPtr->next = table->entries[hash];
|
||||||
entryPtr->refCount = 1;
|
entryPtr->refCount = 1;
|
||||||
|
@ -209,20 +202,14 @@ static ATOM ATOM_DeleteAtom( WORD selector, ATOM atom )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* ATOM_FindAtom
|
* ATOM_FindAtom
|
||||||
*/
|
*/
|
||||||
static ATOM ATOM_FindAtom( WORD selector, SEGPTR name )
|
static ATOM ATOM_FindAtom( WORD selector, LPCSTR str )
|
||||||
{
|
{
|
||||||
ATOMTABLE * table;
|
ATOMTABLE * table;
|
||||||
WORD hash;
|
WORD hash;
|
||||||
HANDLE entry;
|
HANDLE entry;
|
||||||
int len;
|
int len;
|
||||||
char *str;
|
|
||||||
|
|
||||||
/* Check for integer atom */
|
|
||||||
|
|
||||||
if (!HIWORD(name)) return (ATOM)LOWORD(name);
|
|
||||||
str = PTR_SEG_TO_LIN( name );
|
|
||||||
if (str[0] == '#') return atoi( &str[1] );
|
|
||||||
|
|
||||||
|
if (str[0] == '#') return atoi( &str[1] ); /* Check for integer atom */
|
||||||
if ((len = strlen( str )) > 255) len = 255;
|
if ((len = strlen( str )) > 255) len = 255;
|
||||||
if (!(table = ATOM_GetTable( selector, FALSE ))) return 0;
|
if (!(table = ATOM_GetTable( selector, FALSE ))) return 0;
|
||||||
hash = ATOM_Hash( table->size, str, len );
|
hash = ATOM_Hash( table->size, str, len );
|
||||||
|
@ -242,14 +229,14 @@ static ATOM ATOM_FindAtom( WORD selector, SEGPTR name )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* ATOM_GetAtomName
|
* ATOM_GetAtomName
|
||||||
*/
|
*/
|
||||||
static WORD ATOM_GetAtomName( WORD selector, ATOM atom,
|
static UINT32 ATOM_GetAtomName( WORD selector, ATOM atom,
|
||||||
LPSTR buffer, short count )
|
LPSTR buffer, INT32 count )
|
||||||
{
|
{
|
||||||
ATOMTABLE * table;
|
ATOMTABLE * table;
|
||||||
ATOMENTRY * entryPtr;
|
ATOMENTRY * entryPtr;
|
||||||
HANDLE entry;
|
HANDLE entry;
|
||||||
char * strPtr;
|
char * strPtr;
|
||||||
int len;
|
UINT32 len;
|
||||||
char text[8];
|
char text[8];
|
||||||
|
|
||||||
if (!count) return 0;
|
if (!count) return 0;
|
||||||
|
@ -298,7 +285,20 @@ HANDLE GetAtomHandle( ATOM atom )
|
||||||
*/
|
*/
|
||||||
ATOM AddAtom( SEGPTR str )
|
ATOM AddAtom( SEGPTR str )
|
||||||
{
|
{
|
||||||
return ATOM_AddAtom( CURRENT_DS, str );
|
ATOM atom;
|
||||||
|
HANDLE16 ds = CURRENT_DS;
|
||||||
|
|
||||||
|
if (!HIWORD(str)) return (ATOM)LOWORD(str); /* Integer atom */
|
||||||
|
if (SELECTOR_TO_ENTRY(LOWORD(str)) == SELECTOR_TO_ENTRY(ds))
|
||||||
|
{
|
||||||
|
/* If the string is in the same data segment as the atom table, make */
|
||||||
|
/* a copy of the string to be sure it doesn't move in linear memory. */
|
||||||
|
char buffer[256];
|
||||||
|
lstrcpyn( buffer, (char *)PTR_SEG_TO_LIN(str), sizeof(buffer) );
|
||||||
|
atom = ATOM_AddAtom( ds, buffer );
|
||||||
|
}
|
||||||
|
else atom = ATOM_AddAtom( ds, (LPCSTR)PTR_SEG_TO_LIN(str) );
|
||||||
|
return atom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -316,7 +316,8 @@ ATOM DeleteAtom( ATOM atom )
|
||||||
*/
|
*/
|
||||||
ATOM FindAtom( SEGPTR str )
|
ATOM FindAtom( SEGPTR str )
|
||||||
{
|
{
|
||||||
return ATOM_FindAtom( CURRENT_DS, str );
|
if (!HIWORD(str)) return (ATOM)LOWORD(str); /* Integer atom */
|
||||||
|
return ATOM_FindAtom( CURRENT_DS, (LPCSTR)PTR_SEG_TO_LIN(str) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -325,24 +326,47 @@ ATOM FindAtom( SEGPTR str )
|
||||||
*/
|
*/
|
||||||
WORD GetAtomName( ATOM atom, LPSTR buffer, short count )
|
WORD GetAtomName( ATOM atom, LPSTR buffer, short count )
|
||||||
{
|
{
|
||||||
return ATOM_GetAtomName( CURRENT_DS, atom, buffer, count );
|
return (WORD)ATOM_GetAtomName( CURRENT_DS, atom, buffer, count );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GlobalAddAtom (USER.268)
|
* GlobalAddAtom16 (USER.268)
|
||||||
*/
|
*/
|
||||||
ATOM GlobalAddAtom( SEGPTR str )
|
ATOM GlobalAddAtom16( SEGPTR str )
|
||||||
{
|
{
|
||||||
|
if (!HIWORD(str)) return (ATOM)LOWORD(str); /* Integer atom */
|
||||||
#ifdef CONFIG_IPC
|
#ifdef CONFIG_IPC
|
||||||
if (Options.ipc) return DDE_GlobalAddAtom( str );
|
if (Options.ipc) return DDE_GlobalAddAtom( str );
|
||||||
#endif
|
#endif
|
||||||
|
return ATOM_AddAtom( USER_HeapSel, (LPCSTR)PTR_SEG_TO_LIN(str) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GlobalAddAtom32A (KERNEL32.313)
|
||||||
|
*/
|
||||||
|
ATOM GlobalAddAtom32A( LPCSTR str )
|
||||||
|
{
|
||||||
|
if (!HIWORD(str)) return (ATOM)LOWORD(str); /* Integer atom */
|
||||||
return ATOM_AddAtom( USER_HeapSel, str );
|
return ATOM_AddAtom( USER_HeapSel, str );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GlobalDeleteAtom (USER.269)
|
* GlobalAddAtom32W (KERNEL32.314)
|
||||||
|
*/
|
||||||
|
ATOM GlobalAddAtom32W( LPCWSTR str )
|
||||||
|
{
|
||||||
|
char buffer[MAX_ATOM_LEN+1];
|
||||||
|
if (!HIWORD(str)) return (ATOM)LOWORD(str); /* Integer atom */
|
||||||
|
STRING32_UniToAnsi( buffer, str ); /* FIXME: 'str' length? */
|
||||||
|
return ATOM_AddAtom( USER_HeapSel, buffer );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GlobalDeleteAtom (USER.269) (KERNEL32.317)
|
||||||
*/
|
*/
|
||||||
ATOM GlobalDeleteAtom( ATOM atom )
|
ATOM GlobalDeleteAtom( ATOM atom )
|
||||||
{
|
{
|
||||||
|
@ -354,26 +378,69 @@ ATOM GlobalDeleteAtom( ATOM atom )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GlobalFindAtom (USER.270)
|
* GlobalFindAtom16 (USER.270)
|
||||||
*/
|
*/
|
||||||
ATOM GlobalFindAtom( SEGPTR str )
|
ATOM GlobalFindAtom16( SEGPTR str )
|
||||||
{
|
{
|
||||||
|
if (!HIWORD(str)) return (ATOM)LOWORD(str); /* Integer atom */
|
||||||
#ifdef CONFIG_IPC
|
#ifdef CONFIG_IPC
|
||||||
if (Options.ipc) return DDE_GlobalFindAtom( str );
|
if (Options.ipc) return DDE_GlobalFindAtom( str );
|
||||||
#endif
|
#endif
|
||||||
|
return ATOM_FindAtom( USER_HeapSel, (LPCSTR)PTR_SEG_TO_LIN(str) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GlobalFindAtom32A (KERNEL32.318)
|
||||||
|
*/
|
||||||
|
ATOM GlobalFindAtom32A( LPCSTR str )
|
||||||
|
{
|
||||||
|
if (!HIWORD(str)) return (ATOM)LOWORD(str); /* Integer atom */
|
||||||
return ATOM_FindAtom( USER_HeapSel, str );
|
return ATOM_FindAtom( USER_HeapSel, str );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GlobalGetAtomName (USER.271)
|
* GlobalFindAtom32W (KERNEL32.319)
|
||||||
*/
|
*/
|
||||||
WORD GlobalGetAtomName( ATOM atom, LPSTR buffer, short count )
|
ATOM GlobalFindAtom32W( LPCWSTR str )
|
||||||
|
{
|
||||||
|
char buffer[MAX_ATOM_LEN+1];
|
||||||
|
if (!HIWORD(str)) return (ATOM)LOWORD(str); /* Integer atom */
|
||||||
|
STRING32_UniToAnsi( buffer, str ); /* FIXME: 'str' length? */
|
||||||
|
return ATOM_FindAtom( USER_HeapSel, buffer );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GlobalGetAtomName16 (USER.271)
|
||||||
|
*/
|
||||||
|
UINT16 GlobalGetAtomName16( ATOM atom, LPSTR buffer, INT16 count )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_IPC
|
#ifdef CONFIG_IPC
|
||||||
if (Options.ipc) return DDE_GlobalGetAtomName( atom, buffer, count );
|
if (Options.ipc) return DDE_GlobalGetAtomName( atom, buffer, count );
|
||||||
#endif
|
#endif
|
||||||
|
return (UINT16)ATOM_GetAtomName( USER_HeapSel, atom, buffer, count );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GlobalGetAtomName32A (KERNEL32.323)
|
||||||
|
*/
|
||||||
|
UINT32 GlobalGetAtomName32A( ATOM atom, LPSTR buffer, INT32 count )
|
||||||
|
{
|
||||||
return ATOM_GetAtomName( USER_HeapSel, atom, buffer, count );
|
return ATOM_GetAtomName( USER_HeapSel, atom, buffer, count );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* WINELIB */
|
/***********************************************************************
|
||||||
|
* GlobalGetAtomName32W (KERNEL32.324)
|
||||||
|
*/
|
||||||
|
UINT32 GlobalGetAtomName32W( ATOM atom, LPWSTR buffer, INT32 count )
|
||||||
|
{
|
||||||
|
UINT32 len;
|
||||||
|
char tmp[MAX_ATOM_LEN+1];
|
||||||
|
if (count > sizeof(tmp)) count = sizeof(tmp);
|
||||||
|
len = ATOM_GetAtomName( USER_HeapSel, atom, tmp, count );
|
||||||
|
STRING32_AnsiToUni( buffer, tmp ); /* FIXME: len? */
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
|
@ -441,7 +441,7 @@ LPVOID GlobalLock16( HGLOBAL16 handle )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GlobalUnlock16 (KERNEL.19)
|
* GlobalUnlock16 (KERNEL.19)
|
||||||
*/
|
*/
|
||||||
BOOL GlobalUnlock16( HGLOBAL16 handle )
|
BOOL16 GlobalUnlock16( HGLOBAL16 handle )
|
||||||
{
|
{
|
||||||
dprintf_global( stddeb, "GlobalUnlock16: %04x\n", handle );
|
dprintf_global( stddeb, "GlobalUnlock16: %04x\n", handle );
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -911,7 +911,7 @@ DWORD GlobalSize32( HGLOBAL32 handle )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GlobalUnlock32 (KERNEL32.332)
|
* GlobalUnlock32 (KERNEL32.332)
|
||||||
*/
|
*/
|
||||||
BOOL GlobalUnlock32( HGLOBAL32 handle )
|
BOOL32 GlobalUnlock32( HGLOBAL32 handle )
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
123
memory/heap.c
123
memory/heap.c
|
@ -10,6 +10,7 @@
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include "debugger.h"
|
#include "debugger.h"
|
||||||
#include "kernel32.h" /* for CRITICAL_SECTION */
|
#include "kernel32.h" /* for CRITICAL_SECTION */
|
||||||
|
#include "selectors.h"
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "winerror.h"
|
#include "winerror.h"
|
||||||
#include "winnt.h"
|
#include "winnt.h"
|
||||||
|
@ -72,6 +73,7 @@ typedef struct tagSUBHEAP
|
||||||
struct tagSUBHEAP *next; /* Next sub-heap */
|
struct tagSUBHEAP *next; /* Next sub-heap */
|
||||||
struct tagHEAP *heap; /* Main heap structure */
|
struct tagHEAP *heap; /* Main heap structure */
|
||||||
DWORD magic; /* Magic number */
|
DWORD magic; /* Magic number */
|
||||||
|
WORD selector; /* Selector for HEAP_WINE_SEGPTR heaps */
|
||||||
} SUBHEAP;
|
} SUBHEAP;
|
||||||
|
|
||||||
#define SUBHEAP_MAGIC ((DWORD)('S' | ('U'<<8) | ('B'<<16) | ('H'<<24)))
|
#define SUBHEAP_MAGIC ((DWORD)('S' | ('U'<<8) | ('B'<<16) | ('H'<<24)))
|
||||||
|
@ -216,7 +218,7 @@ static void HEAP_InsertFreeBlock( HEAP *heap, ARENA_FREE *pArena )
|
||||||
*
|
*
|
||||||
* Find the sub-heap containing a given address.
|
* Find the sub-heap containing a given address.
|
||||||
*/
|
*/
|
||||||
static SUBHEAP *HEAP_FindSubHeap( HEAP *heap, void *ptr )
|
static SUBHEAP *HEAP_FindSubHeap( HEAP *heap, LPCVOID ptr )
|
||||||
{
|
{
|
||||||
SUBHEAP *sub = &heap->subheap;
|
SUBHEAP *sub = &heap->subheap;
|
||||||
while (sub)
|
while (sub)
|
||||||
|
@ -409,16 +411,25 @@ static void HEAP_ShrinkBlock(SUBHEAP *subheap, ARENA_INUSE *pArena, DWORD size)
|
||||||
*
|
*
|
||||||
* Create a sub-heap of the given size.
|
* Create a sub-heap of the given size.
|
||||||
*/
|
*/
|
||||||
static SUBHEAP *HEAP_CreateSubHeap( DWORD commitSize, DWORD totalSize )
|
static SUBHEAP *HEAP_CreateSubHeap( DWORD flags, DWORD commitSize,
|
||||||
|
DWORD totalSize )
|
||||||
{
|
{
|
||||||
SUBHEAP *subheap;
|
SUBHEAP *subheap;
|
||||||
|
WORD selector = 0;
|
||||||
|
|
||||||
/* Round-up sizes on a 64K boundary */
|
/* Round-up sizes on a 64K boundary */
|
||||||
|
|
||||||
totalSize = (totalSize + 0xffff) & 0xffff0000;
|
if (flags & HEAP_WINE_SEGPTR)
|
||||||
commitSize = (commitSize + 0xffff) & 0xffff0000;
|
{
|
||||||
if (!commitSize) commitSize = 0x10000;
|
totalSize = commitSize = 0x10000; /* Only 64K at a time for SEGPTRs */
|
||||||
if (totalSize < commitSize) totalSize = commitSize;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
totalSize = (totalSize + 0xffff) & 0xffff0000;
|
||||||
|
commitSize = (commitSize + 0xffff) & 0xffff0000;
|
||||||
|
if (!commitSize) commitSize = 0x10000;
|
||||||
|
if (totalSize < commitSize) totalSize = commitSize;
|
||||||
|
}
|
||||||
|
|
||||||
/* Allocate the memory block */
|
/* Allocate the memory block */
|
||||||
|
|
||||||
|
@ -437,6 +448,21 @@ static SUBHEAP *HEAP_CreateSubHeap( DWORD commitSize, DWORD totalSize )
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Allocate a selector if needed */
|
||||||
|
|
||||||
|
if (flags & HEAP_WINE_SEGPTR)
|
||||||
|
{
|
||||||
|
selector = SELECTOR_AllocBlock( subheap, totalSize,
|
||||||
|
(flags & HEAP_WINE_CODESEG) ? SEGMENT_CODE : SEGMENT_DATA,
|
||||||
|
(flags & HEAP_WINE_CODESEG) != 0, FALSE );
|
||||||
|
if (!selector)
|
||||||
|
{
|
||||||
|
fprintf( stderr, "HEAP_CreateSubHeap: could not allocate selector\n" );
|
||||||
|
VirtualFree( subheap, 0, MEM_RELEASE );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Fill the sub-heap structure */
|
/* Fill the sub-heap structure */
|
||||||
|
|
||||||
subheap->size = totalSize;
|
subheap->size = totalSize;
|
||||||
|
@ -445,6 +471,7 @@ static SUBHEAP *HEAP_CreateSubHeap( DWORD commitSize, DWORD totalSize )
|
||||||
subheap->next = NULL;
|
subheap->next = NULL;
|
||||||
subheap->heap = NULL;
|
subheap->heap = NULL;
|
||||||
subheap->magic = SUBHEAP_MAGIC;
|
subheap->magic = SUBHEAP_MAGIC;
|
||||||
|
subheap->selector = selector;
|
||||||
return subheap;
|
return subheap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -490,7 +517,8 @@ static ARENA_FREE *HEAP_FindFreeBlock( HEAP *heap, DWORD size,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
size += sizeof(SUBHEAP) + sizeof(ARENA_FREE);
|
size += sizeof(SUBHEAP) + sizeof(ARENA_FREE);
|
||||||
if (!(subheap = HEAP_CreateSubHeap( size, MAX( HEAP_DEF_SIZE, size ) )))
|
if (!(subheap = HEAP_CreateSubHeap( heap->flags, size,
|
||||||
|
MAX( HEAP_DEF_SIZE, size ) )))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Insert the new sub-heap in the list */
|
/* Insert the new sub-heap in the list */
|
||||||
|
@ -674,6 +702,72 @@ static BOOL HEAP_ValidateInUseArena( SUBHEAP *subheap, ARENA_INUSE *pArena )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* HEAP_IsInsideHeap
|
||||||
|
*
|
||||||
|
* Check whether the pointer is to a block inside a given heap.
|
||||||
|
*/
|
||||||
|
int HEAP_IsInsideHeap( HANDLE32 heap, DWORD flags, LPCVOID ptr )
|
||||||
|
{
|
||||||
|
HEAP *heapPtr = HEAP_GetPtr( heap );
|
||||||
|
SUBHEAP *subheap;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* Validate the parameters */
|
||||||
|
|
||||||
|
if (!heapPtr) return 0;
|
||||||
|
flags |= heapPtr->flags;
|
||||||
|
if (!(flags & HEAP_NO_SERIALIZE)) HeapLock( heap );
|
||||||
|
ret = (((subheap = HEAP_FindSubHeap( heapPtr, ptr )) != NULL) &&
|
||||||
|
(((char *)ptr >= (char *)subheap + subheap->headerSize
|
||||||
|
+ sizeof(ARENA_INUSE))));
|
||||||
|
if (!(flags & HEAP_NO_SERIALIZE)) HeapUnlock( heap );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* HEAP_GetSegptr
|
||||||
|
*
|
||||||
|
* Transform a linear pointer into a SEGPTR. The pointer must have been
|
||||||
|
* allocated from a HEAP_WINE_SEGPTR heap.
|
||||||
|
*/
|
||||||
|
SEGPTR HEAP_GetSegptr( HANDLE32 heap, DWORD flags, LPCVOID ptr )
|
||||||
|
{
|
||||||
|
HEAP *heapPtr = HEAP_GetPtr( heap );
|
||||||
|
SUBHEAP *subheap;
|
||||||
|
SEGPTR ret;
|
||||||
|
|
||||||
|
/* Validate the parameters */
|
||||||
|
|
||||||
|
if (!heapPtr) return 0;
|
||||||
|
flags |= heapPtr->flags;
|
||||||
|
if (!(flags & HEAP_WINE_SEGPTR))
|
||||||
|
{
|
||||||
|
fprintf( stderr, "HEAP_GetSegptr: heap %08x is not a SEGPTR heap\n",
|
||||||
|
heap );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (!(flags & HEAP_NO_SERIALIZE)) HeapLock( heap );
|
||||||
|
|
||||||
|
/* Get the subheap */
|
||||||
|
|
||||||
|
if (!(subheap = HEAP_FindSubHeap( heapPtr, ptr )))
|
||||||
|
{
|
||||||
|
fprintf( stderr, "HEAP_GetSegptr: %p is not inside heap %08x\n",
|
||||||
|
ptr, heap );
|
||||||
|
if (!(flags & HEAP_NO_SERIALIZE)) HeapUnlock( heap );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Build the SEGPTR */
|
||||||
|
|
||||||
|
ret = PTR_SEG_OFF_TO_SEGPTR(subheap->selector, (DWORD)ptr-(DWORD)subheap);
|
||||||
|
if (!(flags & HEAP_NO_SERIALIZE)) HeapUnlock( heap );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* HeapCreate (KERNEL32.336)
|
* HeapCreate (KERNEL32.336)
|
||||||
*/
|
*/
|
||||||
|
@ -691,7 +785,7 @@ HANDLE32 HeapCreate( DWORD flags, DWORD initialSize, DWORD maxSize )
|
||||||
maxSize = HEAP_DEF_SIZE;
|
maxSize = HEAP_DEF_SIZE;
|
||||||
flags |= HEAP_GROWABLE;
|
flags |= HEAP_GROWABLE;
|
||||||
}
|
}
|
||||||
if (!(subheap = HEAP_CreateSubHeap( initialSize, maxSize )))
|
if (!(subheap = HEAP_CreateSubHeap( flags, initialSize, maxSize )))
|
||||||
{
|
{
|
||||||
SetLastError( ERROR_OUTOFMEMORY );
|
SetLastError( ERROR_OUTOFMEMORY );
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1095,5 +1189,18 @@ BOOL HeapValidate( HANDLE32 heap, DWORD flags, LPVOID block )
|
||||||
*/
|
*/
|
||||||
BOOL HeapWalk( HANDLE32 heap, void *entry )
|
BOOL HeapWalk( HANDLE32 heap, void *entry )
|
||||||
{
|
{
|
||||||
|
fprintf( stderr, "HeapWalk(%08x): not implemented\n", heap );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* HEAP_strdupA
|
||||||
|
*/
|
||||||
|
LPSTR HEAP_strdupA( HANDLE32 heap, DWORD flags, LPCSTR str )
|
||||||
|
{
|
||||||
|
INT32 len = lstrlen(str) + 1;
|
||||||
|
LPSTR p = HeapAlloc( heap, flags, len );
|
||||||
|
if (p) strcpy( p, str );
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
157
memory/local.c
157
memory/local.c
|
@ -505,6 +505,62 @@ static HLOCAL16 LOCAL_FreeArena( WORD ds, WORD arena )
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* LOCAL_ShrinkArena
|
||||||
|
*
|
||||||
|
* Shrink an arena by creating a free block at its end if possible.
|
||||||
|
* 'size' includes the arena header, and must be aligned.
|
||||||
|
*/
|
||||||
|
static void LOCAL_ShrinkArena( WORD ds, WORD arena, WORD size )
|
||||||
|
{
|
||||||
|
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||||
|
LOCALARENA *pArena = ARENA_PTR( ptr, arena );
|
||||||
|
|
||||||
|
if (arena + size + LALIGN(sizeof(LOCALARENA)) < pArena->next)
|
||||||
|
{
|
||||||
|
LOCALHEAPINFO *pInfo = LOCAL_GetHeap( ds );
|
||||||
|
if (!pInfo) return;
|
||||||
|
LOCAL_AddBlock( ptr, arena, arena + size );
|
||||||
|
pInfo->items++;
|
||||||
|
LOCAL_FreeArena( ds, arena + size );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* LOCAL_GrowArenaDownward
|
||||||
|
*
|
||||||
|
* Grow an arena downward by using the previous arena (must be free).
|
||||||
|
*/
|
||||||
|
static void LOCAL_GrowArenaDownward( WORD ds, WORD arena, WORD newsize )
|
||||||
|
{
|
||||||
|
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||||
|
LOCALHEAPINFO *pInfo;
|
||||||
|
LOCALARENA *pArena = ARENA_PTR( ptr, arena );
|
||||||
|
WORD prevArena = pArena->prev & ~3;
|
||||||
|
LOCALARENA *pPrevArena = ARENA_PTR( ptr, prevArena );
|
||||||
|
WORD offset, size;
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
if (!(pInfo = LOCAL_GetHeap( ds ))) return;
|
||||||
|
offset = pPrevArena->size;
|
||||||
|
size = pArena->next - arena - ARENA_HEADER_SIZE;
|
||||||
|
LOCAL_RemoveFreeBlock( ptr, prevArena );
|
||||||
|
LOCAL_RemoveBlock( ptr, arena );
|
||||||
|
pInfo->items--;
|
||||||
|
p = (char *)pPrevArena + ARENA_HEADER_SIZE;
|
||||||
|
while (offset < size)
|
||||||
|
{
|
||||||
|
memcpy( p, p + offset, offset );
|
||||||
|
p += offset;
|
||||||
|
size -= offset;
|
||||||
|
}
|
||||||
|
if (size) memcpy( p, p + offset, size );
|
||||||
|
LOCAL_ShrinkArena( ds, prevArena, newsize );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* LOCAL_GetFreeSpace
|
* LOCAL_GetFreeSpace
|
||||||
*/
|
*/
|
||||||
|
@ -543,11 +599,11 @@ static WORD LOCAL_GetFreeSpace(WORD ds, WORD countdiscard)
|
||||||
*/
|
*/
|
||||||
static WORD LOCAL_Compact( HANDLE16 ds, WORD minfree, WORD flags )
|
static WORD LOCAL_Compact( HANDLE16 ds, WORD minfree, WORD flags )
|
||||||
{
|
{
|
||||||
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 ), *fcp, *mcp;
|
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||||
LOCALHEAPINFO *pInfo;
|
LOCALHEAPINFO *pInfo;
|
||||||
LOCALARENA *pArena, *pMoveArena, *pFinalArena;
|
LOCALARENA *pArena, *pMoveArena, *pFinalArena;
|
||||||
WORD arena, movearena, finalarena, table;
|
WORD arena, movearena, finalarena, table;
|
||||||
WORD count, movesize, size, i;
|
WORD count, movesize, size;
|
||||||
WORD freespace;
|
WORD freespace;
|
||||||
LOCALHANDLEENTRY *pEntry;
|
LOCALHANDLEENTRY *pEntry;
|
||||||
|
|
||||||
|
@ -607,16 +663,10 @@ static WORD LOCAL_Compact( HANDLE16 ds, WORD minfree, WORD flags )
|
||||||
{
|
{
|
||||||
dprintf_local(stddeb, "Moving it to %04x.\n", finalarena);
|
dprintf_local(stddeb, "Moving it to %04x.\n", finalarena);
|
||||||
pFinalArena = ARENA_PTR(ptr, finalarena);
|
pFinalArena = ARENA_PTR(ptr, finalarena);
|
||||||
|
size = pFinalArena->size;
|
||||||
/* Check to see if it's worth creating a free arena at the end */
|
|
||||||
if(pFinalArena->size > movesize+LALIGN(sizeof(LOCALARENA)))
|
|
||||||
{
|
|
||||||
LOCAL_AddBlock(ptr, finalarena, finalarena + movesize);
|
|
||||||
LOCAL_MakeBlockFree(ptr, finalarena + movesize);
|
|
||||||
pInfo->items++;
|
|
||||||
}
|
|
||||||
/* Copy the arena to it's new location */
|
|
||||||
LOCAL_RemoveFreeBlock(ptr, finalarena);
|
LOCAL_RemoveFreeBlock(ptr, finalarena);
|
||||||
|
LOCAL_ShrinkArena( ds, finalarena, movesize );
|
||||||
|
/* Copy the arena to it's new location */
|
||||||
memcpy((char *)pFinalArena + ARENA_HEADER_SIZE,
|
memcpy((char *)pFinalArena + ARENA_HEADER_SIZE,
|
||||||
(char *)pMoveArena + ARENA_HEADER_SIZE,
|
(char *)pMoveArena + ARENA_HEADER_SIZE,
|
||||||
movesize - ARENA_HEADER_SIZE );
|
movesize - ARENA_HEADER_SIZE );
|
||||||
|
@ -631,17 +681,7 @@ static WORD LOCAL_Compact( HANDLE16 ds, WORD minfree, WORD flags )
|
||||||
/* Previous arena is free (but < movesize) */
|
/* Previous arena is free (but < movesize) */
|
||||||
/* so we can 'slide' movearena down into it */
|
/* so we can 'slide' movearena down into it */
|
||||||
finalarena = pMoveArena->prev & ~3;
|
finalarena = pMoveArena->prev & ~3;
|
||||||
pFinalArena = ARENA_PTR(ptr, finalarena);
|
LOCAL_GrowArenaDownward( ds, movearena, movesize );
|
||||||
dprintf_local(stddeb, "Sliding arena %04x to %04x.\n",
|
|
||||||
movearena, finalarena);
|
|
||||||
LOCAL_RemoveFreeBlock(ptr, finalarena);
|
|
||||||
LOCAL_RemoveBlock(ptr, movearena);
|
|
||||||
mcp = (char *)pMoveArena + ARENA_HEADER_SIZE;
|
|
||||||
fcp = (char *)pFinalArena + ARENA_HEADER_SIZE;
|
|
||||||
for(i = 0; i < movesize - ARENA_HEADER_SIZE; i++)
|
|
||||||
*(fcp++) = *(mcp++);
|
|
||||||
LOCAL_AddBlock(ptr, finalarena, finalarena + movesize);
|
|
||||||
LOCAL_MakeBlockFree(ptr, finalarena + movesize);
|
|
||||||
/* Update handle table entry */
|
/* Update handle table entry */
|
||||||
pEntry->addr = finalarena + ARENA_HEADER_SIZE;
|
pEntry->addr = finalarena + ARENA_HEADER_SIZE;
|
||||||
}
|
}
|
||||||
|
@ -753,21 +793,13 @@ static HLOCAL16 LOCAL_GetBlock( HANDLE16 ds, WORD size, WORD flags )
|
||||||
|
|
||||||
/* Make a block out of the free arena */
|
/* Make a block out of the free arena */
|
||||||
pArena = ARENA_PTR( ptr, arena );
|
pArena = ARENA_PTR( ptr, arena );
|
||||||
dprintf_local( stddeb, "LOCAL_GetBlock size = %04x, arena at %04x size %04x\n", size,
|
dprintf_local(stddeb, "LOCAL_GetBlock size = %04x, arena %04x size %04x\n",
|
||||||
arena, pArena->size );
|
size, arena, pArena->size );
|
||||||
if (pArena->size > size + LALIGN(sizeof(LOCALARENA)))
|
|
||||||
{
|
|
||||||
LOCAL_AddBlock( ptr, arena, arena+size );
|
|
||||||
LOCAL_MakeBlockFree( ptr, arena+size );
|
|
||||||
pInfo->items++;
|
|
||||||
}
|
|
||||||
LOCAL_RemoveFreeBlock( ptr, arena );
|
LOCAL_RemoveFreeBlock( ptr, arena );
|
||||||
|
LOCAL_ShrinkArena( ds, arena, size );
|
||||||
|
|
||||||
if (flags & LMEM_ZEROINIT) {
|
if (flags & LMEM_ZEROINIT) memset( (char *)pArena + ARENA_HEADER_SIZE, 0,
|
||||||
memset( (char *)pArena + ARENA_HEADER_SIZE, 0, size - ARENA_HEADER_SIZE );
|
size - ARENA_HEADER_SIZE );
|
||||||
}
|
|
||||||
|
|
||||||
dprintf_local( stddeb, "Local_GetBlock: arena at %04x\n", arena );
|
|
||||||
return arena + ARENA_HEADER_SIZE;
|
return arena + ARENA_HEADER_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1000,7 +1032,26 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
|
||||||
if (!(pInfo = LOCAL_GetHeap( ds ))) return 0;
|
if (!(pInfo = LOCAL_GetHeap( ds ))) return 0;
|
||||||
|
|
||||||
if (HANDLE_FIXED( handle )) blockhandle = handle;
|
if (HANDLE_FIXED( handle )) blockhandle = handle;
|
||||||
else blockhandle = *(WORD *)(ptr + handle);
|
else
|
||||||
|
{
|
||||||
|
pEntry = (LOCALHANDLEENTRY *) (ptr + handle);
|
||||||
|
if(pEntry->flags & (LMEM_DISCARDED >> 8))
|
||||||
|
{
|
||||||
|
dprintf_local(stddeb, "ReAllocating discarded block\n");
|
||||||
|
if (!(pEntry->addr = LOCAL_GetBlock( ds, size, flags))) return 0;
|
||||||
|
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 ); /* Reload ptr */
|
||||||
|
pEntry = (LOCALHANDLEENTRY *) (ptr + handle);
|
||||||
|
pEntry->flags = (BYTE) (flags >> 8);
|
||||||
|
pEntry->lock = 0;
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
if (!(blockhandle = pEntry->addr))
|
||||||
|
{
|
||||||
|
fprintf( stderr, "Local_ReAlloc(%04x,%04x): invalid handle\n",
|
||||||
|
ds, handle );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
arena = ARENA_HEADER( blockhandle );
|
arena = ARENA_HEADER( blockhandle );
|
||||||
dprintf_local( stddeb, "LocalReAlloc: arena is %04x\n", arena );
|
dprintf_local( stddeb, "LocalReAlloc: arena is %04x\n", arena );
|
||||||
|
@ -1057,15 +1108,15 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
|
||||||
|
|
||||||
/* Check for size reduction */
|
/* Check for size reduction */
|
||||||
|
|
||||||
if (nextarena < pArena->next)
|
if (nextarena <= pArena->next)
|
||||||
{
|
{
|
||||||
if (nextarena < pArena->next - LALIGN(sizeof(LOCALARENA)))
|
if (nextarena < pArena->next - LALIGN(sizeof(LOCALARENA)))
|
||||||
{
|
{
|
||||||
dprintf_local( stddeb, "size reduction, making new free block\n");
|
dprintf_local( stddeb, "size reduction, making new free block\n");
|
||||||
/* It is worth making a new free block */
|
/* It is worth making a new free block */
|
||||||
LOCAL_AddBlock( ptr, arena, nextarena );
|
LOCAL_AddBlock( ptr, arena, nextarena );
|
||||||
LOCAL_MakeBlockFree( ptr, nextarena );
|
|
||||||
pInfo->items++;
|
pInfo->items++;
|
||||||
|
LOCAL_FreeArena( ds, nextarena );
|
||||||
}
|
}
|
||||||
dprintf_local( stddeb, "LocalReAlloc: returning %04x\n", handle );
|
dprintf_local( stddeb, "LocalReAlloc: returning %04x\n", handle );
|
||||||
return handle;
|
return handle;
|
||||||
|
@ -1083,8 +1134,8 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
|
||||||
dprintf_local( stddeb, "size increase, making new free block\n");
|
dprintf_local( stddeb, "size increase, making new free block\n");
|
||||||
/* It is worth making a new free block */
|
/* It is worth making a new free block */
|
||||||
LOCAL_AddBlock( ptr, arena, nextarena );
|
LOCAL_AddBlock( ptr, arena, nextarena );
|
||||||
LOCAL_MakeBlockFree( ptr, nextarena );
|
|
||||||
pInfo->items++;
|
pInfo->items++;
|
||||||
|
LOCAL_FreeArena( ds, nextarena );
|
||||||
}
|
}
|
||||||
dprintf_local( stddeb, "LocalReAlloc: returning %04x\n", handle );
|
dprintf_local( stddeb, "LocalReAlloc: returning %04x\n", handle );
|
||||||
return handle;
|
return handle;
|
||||||
|
@ -1099,16 +1150,30 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
|
||||||
return 0; /* FIXME: should we free it here? */
|
return 0; /* FIXME: should we free it here? */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(newhandle = LOCAL_GetBlock( ds, size, flags ))) return 0;
|
newhandle = LOCAL_GetBlock( ds, size, flags );
|
||||||
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 ); /* Reload ptr */
|
||||||
memcpy( ptr + newhandle, ptr + (arena + ARENA_HEADER_SIZE), size );
|
if (!newhandle)
|
||||||
LOCAL_FreeArena( ds, arena );
|
{
|
||||||
|
/* Check if previous block is free and large enough */
|
||||||
|
LOCALARENA *pPrev = ARENA_PTR( ptr, pArena->prev & 3 );
|
||||||
|
if (((pPrev->prev & 3) == LOCAL_ARENA_FREE) &&
|
||||||
|
(pPrev->size + pArena->next >= nextarena))
|
||||||
|
{
|
||||||
|
newhandle = (pArena->prev & ~3) + ARENA_HEADER_SIZE;
|
||||||
|
LOCAL_GrowArenaDownward( ds, arena, size + ARENA_HEADER_SIZE );
|
||||||
|
}
|
||||||
|
else return 0; /* Nothing to do, no space left for the block */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memcpy( ptr + newhandle, ptr + (arena + ARENA_HEADER_SIZE), size );
|
||||||
|
LOCAL_FreeArena( ds, arena );
|
||||||
|
}
|
||||||
if (HANDLE_MOVEABLE( handle ))
|
if (HANDLE_MOVEABLE( handle ))
|
||||||
{
|
{
|
||||||
dprintf_local( stddeb, "LocalReAlloc: fixing handle\n");
|
dprintf_local( stddeb, "LocalReAlloc: fixing handle\n");
|
||||||
pEntry = (LOCALHANDLEENTRY *)(ptr + handle);
|
pEntry = (LOCALHANDLEENTRY *)(ptr + handle);
|
||||||
pEntry->addr = newhandle;
|
pEntry->addr = newhandle;
|
||||||
pEntry->flags |= ~(LMEM_DISCARDED >> 8); /* clear discarded flag */
|
|
||||||
pEntry->lock = 0;
|
pEntry->lock = 0;
|
||||||
newhandle = handle;
|
newhandle = handle;
|
||||||
}
|
}
|
||||||
|
@ -1331,7 +1396,7 @@ SEGPTR LocalLock16( HLOCAL16 handle )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* LocalUnlock16 (KERNEL.9)
|
* LocalUnlock16 (KERNEL.9)
|
||||||
*/
|
*/
|
||||||
BOOL LocalUnlock16( HLOCAL16 handle )
|
BOOL16 LocalUnlock16( HLOCAL16 handle )
|
||||||
{
|
{
|
||||||
return LOCAL_Unlock( CURRENT_DS, handle );
|
return LOCAL_Unlock( CURRENT_DS, handle );
|
||||||
}
|
}
|
||||||
|
@ -1608,7 +1673,7 @@ UINT32 LocalSize32( HLOCAL32 handle )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* LocalUnlock32 (KERNEL32.381)
|
* LocalUnlock32 (KERNEL32.381)
|
||||||
*/
|
*/
|
||||||
BOOL LocalUnlock32( HLOCAL32 handle )
|
BOOL32 LocalUnlock32( HLOCAL32 handle )
|
||||||
{
|
{
|
||||||
return GlobalUnlock32( (HGLOBAL32)handle );
|
return GlobalUnlock32( (HGLOBAL32)handle );
|
||||||
}
|
}
|
||||||
|
|
252
misc/commdlg.c
252
misc/commdlg.c
|
@ -207,7 +207,7 @@ static LPSTR FILEDLG_GetFileType(LPSTR cfptr, LPSTR fptr, WORD index)
|
||||||
*/
|
*/
|
||||||
static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)PTR_SEG_TO_LIN(lParam);
|
LPDRAWITEMSTRUCT16 lpdis = (LPDRAWITEMSTRUCT16)PTR_SEG_TO_LIN(lParam);
|
||||||
char str[512];
|
char str[512];
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
HBITMAP hBitmap, hPrevBitmap;
|
HBITMAP hBitmap, hPrevBitmap;
|
||||||
|
@ -218,13 +218,13 @@ static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
if (lpdis->CtlType == ODT_LISTBOX && lpdis->CtlID == lst1) {
|
if (lpdis->CtlType == ODT_LISTBOX && lpdis->CtlID == lst1) {
|
||||||
hBrush = SelectObject(lpdis->hDC, GetStockObject(LTGRAY_BRUSH));
|
hBrush = SelectObject(lpdis->hDC, GetStockObject(LTGRAY_BRUSH));
|
||||||
SelectObject(lpdis->hDC, hBrush);
|
SelectObject(lpdis->hDC, hBrush);
|
||||||
FillRect(lpdis->hDC, &lpdis->rcItem, hBrush);
|
FillRect16(lpdis->hDC, &lpdis->rcItem, hBrush);
|
||||||
SendMessage(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID,
|
SendMessage(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID,
|
||||||
(LPARAM)MAKE_SEGPTR(str));
|
(LPARAM)MAKE_SEGPTR(str));
|
||||||
TextOut(lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top,
|
TextOut16(lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top,
|
||||||
str, strlen(str));
|
str, strlen(str));
|
||||||
if (lpdis->itemState != 0) {
|
if (lpdis->itemState != 0) {
|
||||||
InvertRect(lpdis->hDC, &lpdis->rcItem);
|
InvertRect16(lpdis->hDC, &lpdis->rcItem);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -232,14 +232,14 @@ static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
if (lpdis->CtlType == ODT_LISTBOX && lpdis->CtlID == lst2) {
|
if (lpdis->CtlType == ODT_LISTBOX && lpdis->CtlID == lst2) {
|
||||||
hBrush = SelectObject(lpdis->hDC, GetStockObject(LTGRAY_BRUSH));
|
hBrush = SelectObject(lpdis->hDC, GetStockObject(LTGRAY_BRUSH));
|
||||||
SelectObject(lpdis->hDC, hBrush);
|
SelectObject(lpdis->hDC, hBrush);
|
||||||
FillRect(lpdis->hDC, &lpdis->rcItem, hBrush);
|
FillRect16(lpdis->hDC, &lpdis->rcItem, hBrush);
|
||||||
SendMessage(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID,
|
SendMessage(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID,
|
||||||
(LPARAM)MAKE_SEGPTR(str));
|
(LPARAM)MAKE_SEGPTR(str));
|
||||||
|
|
||||||
hBitmap = hFolder;
|
hBitmap = hFolder;
|
||||||
GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm);
|
GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm);
|
||||||
TextOut(lpdis->hDC, lpdis->rcItem.left + bm.bmWidth,
|
TextOut16(lpdis->hDC, lpdis->rcItem.left + bm.bmWidth,
|
||||||
lpdis->rcItem.top, str, strlen(str));
|
lpdis->rcItem.top, str, strlen(str));
|
||||||
hMemDC = CreateCompatibleDC(lpdis->hDC);
|
hMemDC = CreateCompatibleDC(lpdis->hDC);
|
||||||
hPrevBitmap = SelectObject(hMemDC, hBitmap);
|
hPrevBitmap = SelectObject(hMemDC, hBitmap);
|
||||||
BitBlt(lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top,
|
BitBlt(lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top,
|
||||||
|
@ -247,14 +247,14 @@ static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
SelectObject(hMemDC, hPrevBitmap);
|
SelectObject(hMemDC, hPrevBitmap);
|
||||||
DeleteDC(hMemDC);
|
DeleteDC(hMemDC);
|
||||||
if (lpdis->itemState != 0) {
|
if (lpdis->itemState != 0) {
|
||||||
InvertRect(lpdis->hDC, &lpdis->rcItem);
|
InvertRect16(lpdis->hDC, &lpdis->rcItem);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (lpdis->CtlType == ODT_COMBOBOX && lpdis->CtlID == cmb2) {
|
if (lpdis->CtlType == ODT_COMBOBOX && lpdis->CtlID == cmb2) {
|
||||||
hBrush = SelectObject(lpdis->hDC, GetStockObject(LTGRAY_BRUSH));
|
hBrush = SelectObject(lpdis->hDC, GetStockObject(LTGRAY_BRUSH));
|
||||||
SelectObject(lpdis->hDC, hBrush);
|
SelectObject(lpdis->hDC, hBrush);
|
||||||
FillRect(lpdis->hDC, &lpdis->rcItem, hBrush);
|
FillRect16(lpdis->hDC, &lpdis->rcItem, hBrush);
|
||||||
SendMessage(lpdis->hwndItem, CB_GETLBTEXT, lpdis->itemID,
|
SendMessage(lpdis->hwndItem, CB_GETLBTEXT, lpdis->itemID,
|
||||||
(LPARAM)MAKE_SEGPTR(str));
|
(LPARAM)MAKE_SEGPTR(str));
|
||||||
switch(DRIVE_GetType( str[2] - 'a' ))
|
switch(DRIVE_GetType( str[2] - 'a' ))
|
||||||
|
@ -266,8 +266,8 @@ static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
default: hBitmap = hHDisk; break;
|
default: hBitmap = hHDisk; break;
|
||||||
}
|
}
|
||||||
GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm);
|
GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm);
|
||||||
TextOut(lpdis->hDC, lpdis->rcItem.left + bm.bmWidth,
|
TextOut16(lpdis->hDC, lpdis->rcItem.left + bm.bmWidth,
|
||||||
lpdis->rcItem.top, str, strlen(str));
|
lpdis->rcItem.top, str, strlen(str));
|
||||||
hMemDC = CreateCompatibleDC(lpdis->hDC);
|
hMemDC = CreateCompatibleDC(lpdis->hDC);
|
||||||
hPrevBitmap = SelectObject(hMemDC, hBitmap);
|
hPrevBitmap = SelectObject(hMemDC, hBitmap);
|
||||||
BitBlt(lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top,
|
BitBlt(lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top,
|
||||||
|
@ -275,7 +275,7 @@ static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
SelectObject(hMemDC, hPrevBitmap);
|
SelectObject(hMemDC, hPrevBitmap);
|
||||||
DeleteDC(hMemDC);
|
DeleteDC(hMemDC);
|
||||||
if (lpdis->itemState != 0) {
|
if (lpdis->itemState != 0) {
|
||||||
InvertRect(lpdis->hDC, &lpdis->rcItem);
|
InvertRect16(lpdis->hDC, &lpdis->rcItem);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -389,7 +389,7 @@ static LONG FILEDLG_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
if (lpofn->Flags & OFN_HIDEREADONLY)
|
if (lpofn->Flags & OFN_HIDEREADONLY)
|
||||||
ShowWindow(GetDlgItem(hWnd, chx1), SW_HIDE);
|
ShowWindow(GetDlgItem(hWnd, chx1), SW_HIDE);
|
||||||
if (FILEDLG_HookCallChk(lpofn))
|
if (FILEDLG_HookCallChk(lpofn))
|
||||||
return (BOOL)CallWindowProc(lpofn->lpfnHook,
|
return (BOOL)CallWindowProc16(lpofn->lpfnHook,
|
||||||
hWnd, WM_INITDIALOG, wParam,(LPARAM)MAKE_SEGPTR(lpofn));
|
hWnd, WM_INITDIALOG, wParam,(LPARAM)MAKE_SEGPTR(lpofn));
|
||||||
else
|
else
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -430,8 +430,8 @@ static LRESULT FILEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, (LPARAM)MAKE_SEGPTR(tmpstr));
|
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, (LPARAM)MAKE_SEGPTR(tmpstr));
|
||||||
|
|
||||||
if (FILEDLG_HookCallChk(lpofn))
|
if (FILEDLG_HookCallChk(lpofn))
|
||||||
CallWindowProc (lpofn->lpfnHook, hWnd,
|
CallWindowProc16(lpofn->lpfnHook, hWnd,
|
||||||
RegisterWindowMessage(MAKE_SEGPTR(LBSELCHSTRING)),
|
RegisterWindowMessage32A( LBSELCHSTRING ),
|
||||||
control, MAKELONG(lRet,CD_LBSELCHANGE));
|
control, MAKELONG(lRet,CD_LBSELCHANGE));
|
||||||
/* FIXME: for OFN_ALLOWMULTISELECT we need CD_LBSELSUB, CD_SELADD, CD_LBSELNOITEMS */
|
/* FIXME: for OFN_ALLOWMULTISELECT we need CD_LBSELSUB, CD_SELADD, CD_LBSELNOITEMS */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -567,8 +567,8 @@ static LRESULT FILEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
if (FILEDLG_HookCallChk(lpofn))
|
if (FILEDLG_HookCallChk(lpofn))
|
||||||
{
|
{
|
||||||
lRet= (BOOL)CallWindowProc (lpofn->lpfnHook,
|
lRet= (BOOL)CallWindowProc16(lpofn->lpfnHook,
|
||||||
hWnd, RegisterWindowMessage(MAKE_SEGPTR(FILEOKSTRING)),
|
hWnd, RegisterWindowMessage32A( FILEOKSTRING ),
|
||||||
0, (LPARAM)MAKE_SEGPTR(lpofn));
|
0, (LPARAM)MAKE_SEGPTR(lpofn));
|
||||||
if (lRet)
|
if (lRet)
|
||||||
{
|
{
|
||||||
|
@ -599,7 +599,7 @@ LRESULT FileOpenDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
|
||||||
if (wMsg!=WM_INITDIALOG)
|
if (wMsg!=WM_INITDIALOG)
|
||||||
if (FILEDLG_HookCallChk(lpofn))
|
if (FILEDLG_HookCallChk(lpofn))
|
||||||
{
|
{
|
||||||
LRESULT lRet=(BOOL)CallWindowProc(lpofn->lpfnHook, hWnd, wMsg, wParam, lParam);
|
LRESULT lRet=(BOOL)CallWindowProc16(lpofn->lpfnHook, hWnd, wMsg, wParam, lParam);
|
||||||
if (lRet)
|
if (lRet)
|
||||||
return lRet; /* else continue message processing */
|
return lRet; /* else continue message processing */
|
||||||
}
|
}
|
||||||
|
@ -642,7 +642,7 @@ LRESULT FileSaveDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
|
||||||
if (wMsg!=WM_INITDIALOG)
|
if (wMsg!=WM_INITDIALOG)
|
||||||
if (FILEDLG_HookCallChk(lpofn))
|
if (FILEDLG_HookCallChk(lpofn))
|
||||||
{
|
{
|
||||||
LRESULT lRet=(BOOL)CallWindowProc(lpofn->lpfnHook, hWnd, wMsg, wParam, lParam);
|
LRESULT lRet=(BOOL)CallWindowProc16(lpofn->lpfnHook, hWnd, wMsg, wParam, lParam);
|
||||||
if (lRet)
|
if (lRet)
|
||||||
return lRet; /* else continue message processing */
|
return lRet; /* else continue message processing */
|
||||||
}
|
}
|
||||||
|
@ -806,8 +806,8 @@ static LRESULT FINDDLG_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
static LRESULT FINDDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
static LRESULT FINDDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
LPFINDREPLACE lpfr;
|
LPFINDREPLACE lpfr;
|
||||||
int uFindReplaceMessage = RegisterWindowMessage(MAKE_SEGPTR(FINDMSGSTRING));
|
int uFindReplaceMessage = RegisterWindowMessage32A( FINDMSGSTRING );
|
||||||
int uHelpMessage = RegisterWindowMessage(MAKE_SEGPTR(HELPMSGSTRING));
|
int uHelpMessage = RegisterWindowMessage32A( HELPMSGSTRING );
|
||||||
|
|
||||||
lpfr = (LPFINDREPLACE)GetWindowLong(hWnd, DWL_USER);
|
lpfr = (LPFINDREPLACE)GetWindowLong(hWnd, DWL_USER);
|
||||||
switch (wParam) {
|
switch (wParam) {
|
||||||
|
@ -898,8 +898,8 @@ static LRESULT REPLACEDLG_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
static LRESULT REPLACEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
static LRESULT REPLACEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
LPFINDREPLACE lpfr;
|
LPFINDREPLACE lpfr;
|
||||||
int uFindReplaceMessage = RegisterWindowMessage(MAKE_SEGPTR(FINDMSGSTRING));
|
int uFindReplaceMessage = RegisterWindowMessage32A( FINDMSGSTRING );
|
||||||
int uHelpMessage = RegisterWindowMessage(MAKE_SEGPTR(HELPMSGSTRING));
|
int uHelpMessage = RegisterWindowMessage32A( HELPMSGSTRING );
|
||||||
|
|
||||||
lpfr = (LPFINDREPLACE)GetWindowLong(hWnd, DWL_USER);
|
lpfr = (LPFINDREPLACE)GetWindowLong(hWnd, DWL_USER);
|
||||||
switch (wParam) {
|
switch (wParam) {
|
||||||
|
@ -1124,10 +1124,10 @@ struct CCPRIVATE
|
||||||
int nextuserdef; /* next free place in user defined color array */
|
int nextuserdef; /* next free place in user defined color array */
|
||||||
HDC hdcMem; /* color graph used for BitBlt() */
|
HDC hdcMem; /* color graph used for BitBlt() */
|
||||||
HBITMAP hbmMem; /* color graph bitmap */
|
HBITMAP hbmMem; /* color graph bitmap */
|
||||||
RECT fullsize; /* original dialog window size */
|
RECT16 fullsize; /* original dialog window size */
|
||||||
UINT msetrgb; /* # of SETRGBSTRING message (today not used) */
|
UINT msetrgb; /* # of SETRGBSTRING message (today not used) */
|
||||||
RECT old3angle; /* last position of l-marker */
|
RECT16 old3angle; /* last position of l-marker */
|
||||||
RECT oldcross; /* last position of color/satuation marker */
|
RECT16 oldcross; /* last position of color/satuation marker */
|
||||||
BOOL updating; /* to prevent recursive WM_COMMAND/EN_UPDATE procesing */
|
BOOL updating; /* to prevent recursive WM_COMMAND/EN_UPDATE procesing */
|
||||||
int h;
|
int h;
|
||||||
int s;
|
int s;
|
||||||
|
@ -1255,21 +1255,18 @@ static int CC_MouseCheckPredefColorArray(HWND hDlg,int dlgitem,int rows,int cols
|
||||||
LPARAM lParam,COLORREF *cr)
|
LPARAM lParam,COLORREF *cr)
|
||||||
{
|
{
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
POINT point;
|
POINT16 point = MAKEPOINT16(lParam);
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
int dx,dy,x,y;
|
int dx,dy,x,y;
|
||||||
|
|
||||||
point.x=LOWORD(lParam);
|
ClientToScreen16(hDlg,&point);
|
||||||
point.y=HIWORD(lParam);
|
|
||||||
ClientToScreen(hDlg,&point);
|
|
||||||
|
|
||||||
hwnd=GetDlgItem(hDlg,dlgitem);
|
hwnd=GetDlgItem(hDlg,dlgitem);
|
||||||
GetWindowRect(hwnd,&rect);
|
GetWindowRect16(hwnd,&rect);
|
||||||
if (PtInRect(&rect,point))
|
if (PtInRect16(&rect,point))
|
||||||
{
|
{
|
||||||
dx=(rect.right-rect.left)/cols;
|
dx=(rect.right-rect.left)/cols;
|
||||||
dy=(rect.bottom-rect.top)/rows;
|
dy=(rect.bottom-rect.top)/rows;
|
||||||
ScreenToClient(hwnd,&point);
|
ScreenToClient16(hwnd,&point);
|
||||||
|
|
||||||
if (point.x % dx < (dx-DISTANCE) && point.y % dy < (dy-DISTANCE))
|
if (point.x % dx < (dx-DISTANCE) && point.y % dy < (dy-DISTANCE))
|
||||||
{
|
{
|
||||||
|
@ -1290,21 +1287,18 @@ static int CC_MouseCheckUserColorArray(HWND hDlg,int dlgitem,int rows,int cols,
|
||||||
LPARAM lParam,COLORREF *cr,COLORREF*crarr)
|
LPARAM lParam,COLORREF *cr,COLORREF*crarr)
|
||||||
{
|
{
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
POINT point;
|
POINT16 point = MAKEPOINT16(lParam);
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
int dx,dy,x,y;
|
int dx,dy,x,y;
|
||||||
|
|
||||||
point.x=LOWORD(lParam);
|
ClientToScreen16(hDlg,&point);
|
||||||
point.y=HIWORD(lParam);
|
|
||||||
ClientToScreen(hDlg,&point);
|
|
||||||
|
|
||||||
hwnd=GetDlgItem(hDlg,dlgitem);
|
hwnd=GetDlgItem(hDlg,dlgitem);
|
||||||
GetWindowRect(hwnd,&rect);
|
GetWindowRect16(hwnd,&rect);
|
||||||
if (PtInRect(&rect,point))
|
if (PtInRect16(&rect,point))
|
||||||
{
|
{
|
||||||
dx=(rect.right-rect.left)/cols;
|
dx=(rect.right-rect.left)/cols;
|
||||||
dy=(rect.bottom-rect.top)/rows;
|
dy=(rect.bottom-rect.top)/rows;
|
||||||
ScreenToClient(hwnd,&point);
|
ScreenToClient16(hwnd,&point);
|
||||||
|
|
||||||
if (point.x % dx < (dx-DISTANCE) && point.y % dy < (dy-DISTANCE))
|
if (point.x % dx < (dx-DISTANCE) && point.y % dy < (dy-DISTANCE))
|
||||||
{
|
{
|
||||||
|
@ -1334,19 +1328,17 @@ static int CC_MouseCheckUserColorArray(HWND hDlg,int dlgitem,int rows,int cols,
|
||||||
static int CC_MouseCheckColorGraph(HWND hDlg,int dlgitem,int *hori,int *vert,LPARAM lParam)
|
static int CC_MouseCheckColorGraph(HWND hDlg,int dlgitem,int *hori,int *vert,LPARAM lParam)
|
||||||
{
|
{
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
POINT point;
|
POINT16 point = MAKEPOINT16(lParam);
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
long x,y;
|
long x,y;
|
||||||
|
|
||||||
point.x=LOWORD(lParam);
|
ClientToScreen16(hDlg,&point);
|
||||||
point.y=HIWORD(lParam);
|
|
||||||
ClientToScreen(hDlg,&point);
|
|
||||||
hwnd=GetDlgItem(hDlg,dlgitem);
|
hwnd=GetDlgItem(hDlg,dlgitem);
|
||||||
GetWindowRect(hwnd,&rect);
|
GetWindowRect16(hwnd,&rect);
|
||||||
if (PtInRect(&rect,point))
|
if (PtInRect16(&rect,point))
|
||||||
{
|
{
|
||||||
GetClientRect(hwnd,&rect);
|
GetClientRect16(hwnd,&rect);
|
||||||
ScreenToClient(hwnd,&point);
|
ScreenToClient16(hwnd,&point);
|
||||||
|
|
||||||
x=(long)point.x*MAXHORI;
|
x=(long)point.x*MAXHORI;
|
||||||
x/=rect.right;
|
x/=rect.right;
|
||||||
|
@ -1368,14 +1360,13 @@ static int CC_MouseCheckColorGraph(HWND hDlg,int dlgitem,int *hori,int *vert,LPA
|
||||||
static int CC_MouseCheckResultWindow(HWND hDlg,LPARAM lParam)
|
static int CC_MouseCheckResultWindow(HWND hDlg,LPARAM lParam)
|
||||||
{
|
{
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
POINT point;
|
POINT16 point = MAKEPOINT16(lParam);
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
point.x=LOWORD(lParam);
|
|
||||||
point.y=HIWORD(lParam);
|
ClientToScreen16(hDlg,&point);
|
||||||
ClientToScreen(hDlg,&point);
|
|
||||||
hwnd=GetDlgItem(hDlg,0x2c5);
|
hwnd=GetDlgItem(hDlg,0x2c5);
|
||||||
GetWindowRect(hwnd,&rect);
|
GetWindowRect16(hwnd,&rect);
|
||||||
if (PtInRect(&rect,point))
|
if (PtInRect16(&rect,point))
|
||||||
{
|
{
|
||||||
PostMessage(hDlg,WM_COMMAND,0x2c9,0);
|
PostMessage(hDlg,WM_COMMAND,0x2c9,0);
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1429,14 +1420,14 @@ static int CC_CheckDigitsInEdit(HWND hwnd,int maxval)
|
||||||
*/
|
*/
|
||||||
static void CC_PaintSelectedColor(HWND hDlg,COLORREF cr)
|
static void CC_PaintSelectedColor(HWND hDlg,COLORREF cr)
|
||||||
{
|
{
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
HWND hwnd=GetDlgItem(hDlg,0x2c5);
|
HWND hwnd=GetDlgItem(hDlg,0x2c5);
|
||||||
if (IsWindowVisible(GetDlgItem(hDlg,0x2c6))) /* if full size */
|
if (IsWindowVisible(GetDlgItem(hDlg,0x2c6))) /* if full size */
|
||||||
{
|
{
|
||||||
hdc=GetDC(hwnd);
|
hdc=GetDC(hwnd);
|
||||||
GetClientRect (hwnd, &rect) ;
|
GetClientRect16 (hwnd, &rect) ;
|
||||||
hBrush = CreateSolidBrush(cr);
|
hBrush = CreateSolidBrush(cr);
|
||||||
if (hBrush)
|
if (hBrush)
|
||||||
{
|
{
|
||||||
|
@ -1463,25 +1454,25 @@ static void CC_PaintTriangle(HWND hDlg,int y)
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
long temp;
|
long temp;
|
||||||
int w=GetDialogBaseUnits();
|
int w=GetDialogBaseUnits();
|
||||||
POINT points[3];
|
POINT16 points[3];
|
||||||
int height;
|
int height;
|
||||||
int oben;
|
int oben;
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
HWND hwnd=GetDlgItem(hDlg,0x2be);
|
HWND hwnd=GetDlgItem(hDlg,0x2be);
|
||||||
struct CCPRIVATE *lpp=(struct CCPRIVATE *)GetWindowLong(hDlg, DWL_USER);
|
struct CCPRIVATE *lpp=(struct CCPRIVATE *)GetWindowLong(hDlg, DWL_USER);
|
||||||
|
|
||||||
if (IsWindowVisible(GetDlgItem(hDlg,0x2c6))) /* if full size */
|
if (IsWindowVisible(GetDlgItem(hDlg,0x2c6))) /* if full size */
|
||||||
{
|
{
|
||||||
GetClientRect(hwnd,&rect);
|
GetClientRect16(hwnd,&rect);
|
||||||
height=rect.bottom;
|
height=rect.bottom;
|
||||||
hDC=GetDC(hDlg);
|
hDC=GetDC(hDlg);
|
||||||
|
|
||||||
points[0].y=rect.top;
|
points[0].y=rect.top;
|
||||||
points[0].x=rect.right; /* | /| */
|
points[0].x=rect.right; /* | /| */
|
||||||
ClientToScreen(hwnd,points); /* | / | */
|
ClientToScreen16(hwnd,points); /* | / | */
|
||||||
ScreenToClient(hDlg,points); /* |< | */
|
ScreenToClient16(hDlg,points); /* |< | */
|
||||||
oben=points[0].y; /* | \ | */
|
oben=points[0].y; /* | \ | */
|
||||||
/* | \| */
|
/* | \| */
|
||||||
temp=(long)height*(long)y;
|
temp=(long)height*(long)y;
|
||||||
points[0].y=oben+height -temp/(long)MAXVERT;
|
points[0].y=oben+height -temp/(long)MAXVERT;
|
||||||
points[1].y=points[0].y+w;
|
points[1].y=points[0].y+w;
|
||||||
|
@ -1489,12 +1480,12 @@ static void CC_PaintTriangle(HWND hDlg,int y)
|
||||||
points[2].x=points[1].x=points[0].x + w;
|
points[2].x=points[1].x=points[0].x + w;
|
||||||
|
|
||||||
if (lpp->old3angle.left)
|
if (lpp->old3angle.left)
|
||||||
FillRect(hDC,&lpp->old3angle,GetStockObject(WHITE_BRUSH));
|
FillRect16(hDC,&lpp->old3angle,GetStockObject(WHITE_BRUSH));
|
||||||
lpp->old3angle.left =points[0].x;
|
lpp->old3angle.left =points[0].x;
|
||||||
lpp->old3angle.right =points[1].x+1;
|
lpp->old3angle.right =points[1].x+1;
|
||||||
lpp->old3angle.top =points[2].y-1;
|
lpp->old3angle.top =points[2].y-1;
|
||||||
lpp->old3angle.bottom=points[1].y+1;
|
lpp->old3angle.bottom=points[1].y+1;
|
||||||
Polygon(hDC,points,3);
|
Polygon16(hDC,points,3);
|
||||||
ReleaseDC(hDlg,hDC);
|
ReleaseDC(hDlg,hDC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1509,15 +1500,15 @@ static void CC_PaintCross(HWND hDlg,int x,int y)
|
||||||
int w=GetDialogBaseUnits();
|
int w=GetDialogBaseUnits();
|
||||||
HWND hwnd=GetDlgItem(hDlg,0x2c6);
|
HWND hwnd=GetDlgItem(hDlg,0x2c6);
|
||||||
struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong(hDlg, DWL_USER);
|
struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong(hDlg, DWL_USER);
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
POINT point;
|
POINT16 point;
|
||||||
HPEN hPen;
|
HPEN16 hPen;
|
||||||
|
|
||||||
if (IsWindowVisible(GetDlgItem(hDlg,0x2c6))) /* if full size */
|
if (IsWindowVisible(GetDlgItem(hDlg,0x2c6))) /* if full size */
|
||||||
{
|
{
|
||||||
GetClientRect(hwnd,&rect);
|
GetClientRect16(hwnd,&rect);
|
||||||
hDC=GetDC(hwnd);
|
hDC=GetDC(hwnd);
|
||||||
SelectClipRgn(hDC,CreateRectRgnIndirect(&rect));
|
SelectClipRgn(hDC,CreateRectRgnIndirect16(&rect));
|
||||||
hPen=CreatePen(PS_SOLID,2,0);
|
hPen=CreatePen(PS_SOLID,2,0);
|
||||||
hPen=SelectObject(hDC,hPen);
|
hPen=SelectObject(hDC,hPen);
|
||||||
point.x=((long)rect.right*(long)x)/(long)MAXHORI;
|
point.x=((long)rect.right*(long)x)/(long)MAXHORI;
|
||||||
|
@ -1556,10 +1547,10 @@ static void CC_PrepareColorGraph(HWND hDlg)
|
||||||
struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong(hDlg, DWL_USER);
|
struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong(hDlg, DWL_USER);
|
||||||
HBRUSH hbrush;
|
HBRUSH hbrush;
|
||||||
HDC hdc ;
|
HDC hdc ;
|
||||||
RECT rect,client;
|
RECT16 rect,client;
|
||||||
HCURSOR hcursor=SetCursor(LoadCursor(0,IDC_WAIT));
|
HCURSOR hcursor=SetCursor(LoadCursor(0,IDC_WAIT));
|
||||||
|
|
||||||
GetClientRect(hwnd,&client);
|
GetClientRect16(hwnd,&client);
|
||||||
hdc=GetDC(hwnd);
|
hdc=GetDC(hwnd);
|
||||||
lpp->hdcMem = CreateCompatibleDC(hdc);
|
lpp->hdcMem = CreateCompatibleDC(hdc);
|
||||||
lpp->hbmMem = CreateCompatibleBitmap(hdc,client.right,client.bottom);
|
lpp->hbmMem = CreateCompatibleBitmap(hdc,client.right,client.bottom);
|
||||||
|
@ -1580,7 +1571,7 @@ static void CC_PrepareColorGraph(HWND hDlg)
|
||||||
g=CC_HSLtoRGB('G',hue,sat,120);
|
g=CC_HSLtoRGB('G',hue,sat,120);
|
||||||
b=CC_HSLtoRGB('B',hue,sat,120);
|
b=CC_HSLtoRGB('B',hue,sat,120);
|
||||||
hbrush=CreateSolidBrush(RGB(r,g,b));
|
hbrush=CreateSolidBrush(RGB(r,g,b));
|
||||||
FillRect(lpp->hdcMem,&rect,hbrush);
|
FillRect16(lpp->hdcMem,&rect,hbrush);
|
||||||
DeleteObject(hbrush);
|
DeleteObject(hbrush);
|
||||||
rect.bottom=rect.top;
|
rect.bottom=rect.top;
|
||||||
}
|
}
|
||||||
|
@ -1598,14 +1589,14 @@ static void CC_PaintColorGraph(HWND hDlg)
|
||||||
HWND hwnd=GetDlgItem(hDlg,0x2c6);
|
HWND hwnd=GetDlgItem(hDlg,0x2c6);
|
||||||
struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong(hDlg, DWL_USER);
|
struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong(hDlg, DWL_USER);
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
if (IsWindowVisible(hwnd)) /* if full size */
|
if (IsWindowVisible(hwnd)) /* if full size */
|
||||||
{
|
{
|
||||||
if (!lpp->hdcMem)
|
if (!lpp->hdcMem)
|
||||||
CC_PrepareColorGraph(hDlg); /* should not be necessary */
|
CC_PrepareColorGraph(hDlg); /* should not be necessary */
|
||||||
|
|
||||||
hDC=GetDC(hwnd);
|
hDC=GetDC(hwnd);
|
||||||
GetClientRect(hwnd,&rect);
|
GetClientRect16(hwnd,&rect);
|
||||||
if (lpp->hdcMem)
|
if (lpp->hdcMem)
|
||||||
BitBlt(hDC,0,0,rect.right,rect.bottom,lpp->hdcMem,0,0,SRCCOPY);
|
BitBlt(hDC,0,0,rect.right,rect.bottom,lpp->hdcMem,0,0,SRCCOPY);
|
||||||
else
|
else
|
||||||
|
@ -1619,7 +1610,7 @@ static void CC_PaintColorGraph(HWND hDlg)
|
||||||
static void CC_PaintLumBar(HWND hDlg,int hue,int sat)
|
static void CC_PaintLumBar(HWND hDlg,int hue,int sat)
|
||||||
{
|
{
|
||||||
HWND hwnd=GetDlgItem(hDlg,0x2be);
|
HWND hwnd=GetDlgItem(hDlg,0x2be);
|
||||||
RECT rect,client;
|
RECT16 rect,client;
|
||||||
int lum,ldif,ydif,r,g,b;
|
int lum,ldif,ydif,r,g,b;
|
||||||
HBRUSH hbrush;
|
HBRUSH hbrush;
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
|
@ -1627,7 +1618,7 @@ static void CC_PaintLumBar(HWND hDlg,int hue,int sat)
|
||||||
if (IsWindowVisible(hwnd))
|
if (IsWindowVisible(hwnd))
|
||||||
{
|
{
|
||||||
hDC=GetDC(hwnd);
|
hDC=GetDC(hwnd);
|
||||||
GetClientRect(hwnd,&client);
|
GetClientRect16(hwnd,&client);
|
||||||
rect=client;
|
rect=client;
|
||||||
|
|
||||||
ldif=240/YSTEPS;
|
ldif=240/YSTEPS;
|
||||||
|
@ -1639,12 +1630,12 @@ static void CC_PaintLumBar(HWND hDlg,int hue,int sat)
|
||||||
g=CC_HSLtoRGB('G',hue,sat,lum);
|
g=CC_HSLtoRGB('G',hue,sat,lum);
|
||||||
b=CC_HSLtoRGB('B',hue,sat,lum);
|
b=CC_HSLtoRGB('B',hue,sat,lum);
|
||||||
hbrush=CreateSolidBrush(RGB(r,g,b));
|
hbrush=CreateSolidBrush(RGB(r,g,b));
|
||||||
FillRect(hDC,&rect,hbrush);
|
FillRect16(hDC,&rect,hbrush);
|
||||||
DeleteObject(hbrush);
|
DeleteObject(hbrush);
|
||||||
rect.bottom=rect.top;
|
rect.bottom=rect.top;
|
||||||
}
|
}
|
||||||
GetClientRect(hwnd,&rect);
|
GetClientRect16(hwnd,&rect);
|
||||||
FrameRect(hDC,&rect,GetStockObject(BLACK_BRUSH));
|
FrameRect16(hDC,&rect,GetStockObject(BLACK_BRUSH));
|
||||||
ReleaseDC(hwnd,hDC);
|
ReleaseDC(hwnd,hDC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1697,7 +1688,7 @@ static void CC_EditSetHSL(HWND hDlg,int h,int s,int l)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CC_SwitchToFullSize [internal]
|
* CC_SwitchToFullSize [internal]
|
||||||
*/
|
*/
|
||||||
static void CC_SwitchToFullSize(HWND hDlg,COLORREF result,LPRECT lprect)
|
static void CC_SwitchToFullSize(HWND hDlg,COLORREF result,LPRECT16 lprect)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong(hDlg, DWL_USER);
|
struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong(hDlg, DWL_USER);
|
||||||
|
@ -1729,18 +1720,18 @@ static void CC_SwitchToFullSize(HWND hDlg,COLORREF result,LPRECT lprect)
|
||||||
static void CC_PaintPredefColorArray(HWND hDlg,int rows,int cols)
|
static void CC_PaintPredefColorArray(HWND hDlg,int rows,int cols)
|
||||||
{
|
{
|
||||||
HWND hwnd=GetDlgItem(hDlg,0x2d0);
|
HWND hwnd=GetDlgItem(hDlg,0x2d0);
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
int dx,dy,i,j,k;
|
int dx,dy,i,j,k;
|
||||||
|
|
||||||
GetClientRect(hwnd,&rect);
|
GetClientRect16(hwnd,&rect);
|
||||||
dx=rect.right/cols;
|
dx=rect.right/cols;
|
||||||
dy=rect.bottom/rows;
|
dy=rect.bottom/rows;
|
||||||
k=rect.left;
|
k=rect.left;
|
||||||
|
|
||||||
hdc=GetDC(hwnd);
|
hdc=GetDC(hwnd);
|
||||||
GetClientRect (hwnd, &rect) ;
|
GetClientRect16 (hwnd, &rect) ;
|
||||||
|
|
||||||
for (j=0;j<rows;j++)
|
for (j=0;j<rows;j++)
|
||||||
{
|
{
|
||||||
|
@ -1768,12 +1759,12 @@ static void CC_PaintPredefColorArray(HWND hDlg,int rows,int cols)
|
||||||
static void CC_PaintUserColorArray(HWND hDlg,int rows,int cols,COLORREF* lpcr)
|
static void CC_PaintUserColorArray(HWND hDlg,int rows,int cols,COLORREF* lpcr)
|
||||||
{
|
{
|
||||||
HWND hwnd=GetDlgItem(hDlg,0x2d1);
|
HWND hwnd=GetDlgItem(hDlg,0x2d1);
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
int dx,dy,i,j,k;
|
int dx,dy,i,j,k;
|
||||||
|
|
||||||
GetClientRect(hwnd,&rect);
|
GetClientRect16(hwnd,&rect);
|
||||||
|
|
||||||
dx=rect.right/cols;
|
dx=rect.right/cols;
|
||||||
dy=rect.bottom/rows;
|
dy=rect.bottom/rows;
|
||||||
|
@ -1825,8 +1816,8 @@ static LONG CC_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
int i,res;
|
int i,res;
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
POINT point;
|
POINT16 point;
|
||||||
struct CCPRIVATE * lpp;
|
struct CCPRIVATE * lpp;
|
||||||
|
|
||||||
dprintf_commdlg(stddeb,"ColorDlgProc // WM_INITDIALOG lParam=%08lX\n", lParam);
|
dprintf_commdlg(stddeb,"ColorDlgProc // WM_INITDIALOG lParam=%08lX\n", lParam);
|
||||||
|
@ -1841,7 +1832,7 @@ static LONG CC_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
if (!(lpp->lpcc->Flags & CC_SHOWHELP))
|
if (!(lpp->lpcc->Flags & CC_SHOWHELP))
|
||||||
ShowWindow(GetDlgItem(hDlg,0x40e),SW_HIDE);
|
ShowWindow(GetDlgItem(hDlg,0x40e),SW_HIDE);
|
||||||
lpp->msetrgb=RegisterWindowMessage(MAKE_SEGPTR(SETRGBSTRING));
|
lpp->msetrgb=RegisterWindowMessage32A( SETRGBSTRING );
|
||||||
#if 0
|
#if 0
|
||||||
cpos=MAKELONG(5,7); /* init */
|
cpos=MAKELONG(5,7); /* init */
|
||||||
if (lpp->lpcc->Flags & CC_RGBINIT)
|
if (lpp->lpcc->Flags & CC_RGBINIT)
|
||||||
|
@ -1857,7 +1848,7 @@ static LONG CC_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
found:
|
found:
|
||||||
/* FIXME: Draw_a_focus_rect & set_init_values */
|
/* FIXME: Draw_a_focus_rect & set_init_values */
|
||||||
#endif
|
#endif
|
||||||
GetWindowRect(hDlg,&lpp->fullsize);
|
GetWindowRect16(hDlg,&lpp->fullsize);
|
||||||
if (lpp->lpcc->Flags & CC_FULLOPEN || lpp->lpcc->Flags & CC_PREVENTFULLOPEN)
|
if (lpp->lpcc->Flags & CC_FULLOPEN || lpp->lpcc->Flags & CC_PREVENTFULLOPEN)
|
||||||
{
|
{
|
||||||
hwnd=GetDlgItem(hDlg,0x2cf);
|
hwnd=GetDlgItem(hDlg,0x2cf);
|
||||||
|
@ -1869,9 +1860,9 @@ static LONG CC_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
res=rect.bottom-rect.top;
|
res=rect.bottom-rect.top;
|
||||||
hwnd=GetDlgItem(hDlg,0x2c6); /* cut at left border */
|
hwnd=GetDlgItem(hDlg,0x2c6); /* cut at left border */
|
||||||
point.x=point.y=0;
|
point.x=point.y=0;
|
||||||
ClientToScreen(hwnd,&point);
|
ClientToScreen16(hwnd,&point);
|
||||||
ScreenToClient(hDlg,&point);
|
ScreenToClient16(hDlg,&point);
|
||||||
GetClientRect(hDlg,&rect);
|
GetClientRect16(hDlg,&rect);
|
||||||
point.x+=GetSystemMetrics(SM_CXDLGFRAME);
|
point.x+=GetSystemMetrics(SM_CXDLGFRAME);
|
||||||
SetWindowPos(hDlg,NULL,0,0,point.x,res,SWP_NOMOVE|SWP_NOZORDER);
|
SetWindowPos(hDlg,NULL,0,0,point.x,res,SWP_NOMOVE|SWP_NOZORDER);
|
||||||
|
|
||||||
|
@ -1884,7 +1875,7 @@ static LONG CC_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
for (i=0x2bf;i<0x2c5;i++)
|
for (i=0x2bf;i<0x2c5;i++)
|
||||||
SendMessage(GetDlgItem(hDlg,i),EM_LIMITTEXT,3,0); /* max 3 digits: xyz */
|
SendMessage(GetDlgItem(hDlg,i),EM_LIMITTEXT,3,0); /* max 3 digits: xyz */
|
||||||
if (CC_HookCallChk(lpp->lpcc))
|
if (CC_HookCallChk(lpp->lpcc))
|
||||||
res=CallWindowProc((FARPROC)lpp->lpcc->lpfnHook,hDlg,WM_INITDIALOG,wParam,lParam);
|
res=CallWindowProc16((FARPROC)lpp->lpcc->lpfnHook,hDlg,WM_INITDIALOG,wParam,lParam);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1960,7 +1951,7 @@ static LRESULT CC_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
case 0x2cf:
|
case 0x2cf:
|
||||||
CC_SwitchToFullSize(hDlg,lpp->lpcc->rgbResult,&lpp->fullsize);
|
CC_SwitchToFullSize(hDlg,lpp->lpcc->rgbResult,&lpp->fullsize);
|
||||||
InvalidateRect(hDlg,NULL,NULL);
|
InvalidateRect32( hDlg, NULL, TRUE );
|
||||||
SetFocus(GetDlgItem(hDlg,0x2bf));
|
SetFocus(GetDlgItem(hDlg,0x2bf));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1990,16 +1981,16 @@ static LRESULT CC_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x40e: /* Help! */ /* The Beatles, 1965 ;-) */
|
case 0x40e: /* Help! */ /* The Beatles, 1965 ;-) */
|
||||||
i=RegisterWindowMessage(MAKE_SEGPTR(HELPMSGSTRING));
|
i=RegisterWindowMessage32A( HELPMSGSTRING );
|
||||||
if (lpp->lpcc->hwndOwner)
|
if (lpp->lpcc->hwndOwner)
|
||||||
SendMessage(lpp->lpcc->hwndOwner,i,0,(LPARAM)lpp->lpcc);
|
SendMessage(lpp->lpcc->hwndOwner,i,0,(LPARAM)lpp->lpcc);
|
||||||
if (CC_HookCallChk(lpp->lpcc))
|
if (CC_HookCallChk(lpp->lpcc))
|
||||||
CallWindowProc((FARPROC)lpp->lpcc->lpfnHook,hDlg,
|
CallWindowProc16((FARPROC)lpp->lpcc->lpfnHook,hDlg,
|
||||||
WM_COMMAND,psh15,(LPARAM)lpp->lpcc);
|
WM_COMMAND,psh15,(LPARAM)lpp->lpcc);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDOK :
|
case IDOK :
|
||||||
cokmsg=RegisterWindowMessage(MAKE_SEGPTR(COLOROKSTRING));
|
cokmsg=RegisterWindowMessage32A( COLOROKSTRING );
|
||||||
if (lpp->lpcc->hwndOwner)
|
if (lpp->lpcc->hwndOwner)
|
||||||
if (SendMessage(lpp->lpcc->hwndOwner,cokmsg,0,(LPARAM)lpp->lpcc))
|
if (SendMessage(lpp->lpcc->hwndOwner,cokmsg,0,(LPARAM)lpp->lpcc))
|
||||||
break; /* do NOT close */
|
break; /* do NOT close */
|
||||||
|
@ -2032,11 +2023,11 @@ static LRESULT CC_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
CC_PaintSelectedColor(hDlg,lpp->lpcc->rgbResult);
|
CC_PaintSelectedColor(hDlg,lpp->lpcc->rgbResult);
|
||||||
|
|
||||||
/* special necessary for Wine */
|
/* special necessary for Wine */
|
||||||
ValidateRect(GetDlgItem(hDlg,0x2d0),NULL);
|
ValidateRect32(GetDlgItem(hDlg,0x2d0),NULL);
|
||||||
ValidateRect(GetDlgItem(hDlg,0x2d1),NULL);
|
ValidateRect32(GetDlgItem(hDlg,0x2d1),NULL);
|
||||||
ValidateRect(GetDlgItem(hDlg,0x2c6),NULL);
|
ValidateRect32(GetDlgItem(hDlg,0x2c6),NULL);
|
||||||
ValidateRect(GetDlgItem(hDlg,0x2be),NULL);
|
ValidateRect32(GetDlgItem(hDlg,0x2be),NULL);
|
||||||
ValidateRect(GetDlgItem(hDlg,0x2c5),NULL);
|
ValidateRect32(GetDlgItem(hDlg,0x2c5),NULL);
|
||||||
/* hope we can remove it later -->FIXME */
|
/* hope we can remove it later -->FIXME */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2104,7 +2095,7 @@ LRESULT ColorDlgProc(HWND hDlg, UINT message,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
res=0;
|
res=0;
|
||||||
if (CC_HookCallChk(lpp->lpcc))
|
if (CC_HookCallChk(lpp->lpcc))
|
||||||
res=CallWindowProc((FARPROC)lpp->lpcc->lpfnHook,hDlg,message,wParam,lParam);
|
res=CallWindowProc16((FARPROC)lpp->lpcc->lpfnHook,hDlg,message,wParam,lParam);
|
||||||
if (res)
|
if (res)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -2239,9 +2230,10 @@ int FontStyleEnumProc(LPLOGFONT lplf ,LPTEXTMETRIC lptm, int nFontType, LPARAM l
|
||||||
i=0;
|
i=0;
|
||||||
while (sizes[i])
|
while (sizes[i])
|
||||||
{
|
{
|
||||||
sprintf(buffer,"%3d",sizes[i++]);
|
sprintf(buffer,"%d",sizes[i]);
|
||||||
j=SendMessage(hcmb3,CB_ADDSTRING,0,(LPARAM)MAKE_SEGPTR(buffer));
|
j=SendMessage(hcmb3,CB_INSERTSTRING,-1,(LPARAM)MAKE_SEGPTR(buffer));
|
||||||
SendMessage(hcmb3, CB_SETITEMDATA, j, MAKELONG(sizes[i],0));
|
SendMessage(hcmb3, CB_SETITEMDATA, j, MAKELONG(sizes[i],0));
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2391,7 +2383,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
ReleaseDC(hDlg,hdc);
|
ReleaseDC(hDlg,hdc);
|
||||||
res=TRUE;
|
res=TRUE;
|
||||||
if (CFn_HookCallChk(lpcf))
|
if (CFn_HookCallChk(lpcf))
|
||||||
res=CallWindowProc(lpcf->lpfnHook,hDlg,WM_INITDIALOG,wParam,lParam);
|
res=CallWindowProc16(lpcf->lpfnHook,hDlg,WM_INITDIALOG,wParam,lParam);
|
||||||
SetCursor(hcursor);
|
SetCursor(hcursor);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -2422,23 +2414,23 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
char buffer[40];
|
char buffer[40];
|
||||||
BITMAP bm;
|
BITMAP bm;
|
||||||
COLORREF cr;
|
COLORREF cr;
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
#if 0
|
#if 0
|
||||||
HDC hMemDC;
|
HDC hMemDC;
|
||||||
int nFontType;
|
int nFontType;
|
||||||
HBITMAP hBitmap; /* for later TT usage */
|
HBITMAP hBitmap; /* for later TT usage */
|
||||||
#endif
|
#endif
|
||||||
LPDRAWITEMSTRUCT lpdi = (LPDRAWITEMSTRUCT)PTR_SEG_TO_LIN(lParam);
|
LPDRAWITEMSTRUCT16 lpdi = (LPDRAWITEMSTRUCT16)PTR_SEG_TO_LIN(lParam);
|
||||||
|
|
||||||
if (lpdi->itemID == 0xFFFF) /* got no items */
|
if (lpdi->itemID == 0xFFFF) /* got no items */
|
||||||
DrawFocusRect(lpdi->hDC, &lpdi->rcItem);
|
DrawFocusRect16(lpdi->hDC, &lpdi->rcItem);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (lpdi->CtlType == ODT_COMBOBOX)
|
if (lpdi->CtlType == ODT_COMBOBOX)
|
||||||
{
|
{
|
||||||
hBrush = SelectObject(lpdi->hDC, GetStockObject(LTGRAY_BRUSH));
|
hBrush = SelectObject(lpdi->hDC, GetStockObject(LTGRAY_BRUSH));
|
||||||
SelectObject(lpdi->hDC, hBrush);
|
SelectObject(lpdi->hDC, hBrush);
|
||||||
FillRect(lpdi->hDC, &lpdi->rcItem, hBrush);
|
FillRect16(lpdi->hDC, &lpdi->rcItem, hBrush);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return TRUE; /* this should never happen */
|
return TRUE; /* this should never happen */
|
||||||
|
@ -2450,8 +2442,8 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
SendMessage(lpdi->hwndItem, CB_GETLBTEXT, lpdi->itemID,
|
SendMessage(lpdi->hwndItem, CB_GETLBTEXT, lpdi->itemID,
|
||||||
(LPARAM)MAKE_SEGPTR(buffer));
|
(LPARAM)MAKE_SEGPTR(buffer));
|
||||||
GetObject(hBitmapTT, sizeof(BITMAP), (LPSTR)&bm);
|
GetObject(hBitmapTT, sizeof(BITMAP), (LPSTR)&bm);
|
||||||
TextOut(lpdi->hDC, lpdi->rcItem.left + bm.bmWidth + 10,
|
TextOut16(lpdi->hDC, lpdi->rcItem.left + bm.bmWidth + 10,
|
||||||
lpdi->rcItem.top, buffer, lstrlen(buffer));
|
lpdi->rcItem.top, buffer, lstrlen(buffer));
|
||||||
#if 0
|
#if 0
|
||||||
nFontType = SendMessage(lpdi->hwndItem, CB_GETITEMDATA, lpdi->itemID,0L);
|
nFontType = SendMessage(lpdi->hwndItem, CB_GETITEMDATA, lpdi->itemID,0L);
|
||||||
/* FIXME: draw bitmap if truetype usage */
|
/* FIXME: draw bitmap if truetype usage */
|
||||||
|
@ -2470,15 +2462,15 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
case cmb3: /* dprintf_commdlg(stddeb,"WM_DRAWITEN cmb2,cmb3\n"); */
|
case cmb3: /* dprintf_commdlg(stddeb,"WM_DRAWITEN cmb2,cmb3\n"); */
|
||||||
SendMessage(lpdi->hwndItem, CB_GETLBTEXT, lpdi->itemID,
|
SendMessage(lpdi->hwndItem, CB_GETLBTEXT, lpdi->itemID,
|
||||||
(LPARAM)MAKE_SEGPTR(buffer));
|
(LPARAM)MAKE_SEGPTR(buffer));
|
||||||
TextOut(lpdi->hDC, lpdi->rcItem.left,
|
TextOut16(lpdi->hDC, lpdi->rcItem.left,
|
||||||
lpdi->rcItem.top, buffer, lstrlen(buffer));
|
lpdi->rcItem.top, buffer, lstrlen(buffer));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case cmb4: /* dprintf_commdlg(stddeb,"WM_DRAWITEM cmb4 (=COLOR)\n"); */
|
case cmb4: /* dprintf_commdlg(stddeb,"WM_DRAWITEM cmb4 (=COLOR)\n"); */
|
||||||
SendMessage(lpdi->hwndItem, CB_GETLBTEXT, lpdi->itemID,
|
SendMessage(lpdi->hwndItem, CB_GETLBTEXT, lpdi->itemID,
|
||||||
(LPARAM)MAKE_SEGPTR(buffer));
|
(LPARAM)MAKE_SEGPTR(buffer));
|
||||||
TextOut(lpdi->hDC, lpdi->rcItem.left + 25+5,
|
TextOut16(lpdi->hDC, lpdi->rcItem.left + 25+5,
|
||||||
lpdi->rcItem.top, buffer, lstrlen(buffer));
|
lpdi->rcItem.top, buffer, lstrlen(buffer));
|
||||||
cr = SendMessage(lpdi->hwndItem, CB_GETITEMDATA, lpdi->itemID,0L);
|
cr = SendMessage(lpdi->hwndItem, CB_GETITEMDATA, lpdi->itemID,0L);
|
||||||
hBrush = CreateSolidBrush(cr);
|
hBrush = CreateSolidBrush(cr);
|
||||||
if (hBrush)
|
if (hBrush)
|
||||||
|
@ -2498,7 +2490,7 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
default: return TRUE; /* this should never happen */
|
default: return TRUE; /* this should never happen */
|
||||||
}
|
}
|
||||||
if (lpdi->itemState ==ODS_SELECTED)
|
if (lpdi->itemState ==ODS_SELECTED)
|
||||||
InvertRect(lpdi->hDC, &rect);
|
InvertRect16(lpdi->hDC, &rect);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -2622,15 +2614,15 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
if (i!=CB_ERR)
|
if (i!=CB_ERR)
|
||||||
{
|
{
|
||||||
lpcf->rgbColors=textcolors[i];
|
lpcf->rgbColors=textcolors[i];
|
||||||
InvalidateRect(GetDlgItem(hDlg,stc6),NULL,0);
|
InvalidateRect32( GetDlgItem(hDlg,stc6), NULL, 0 );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case psh15:i=RegisterWindowMessage(MAKE_SEGPTR(HELPMSGSTRING));
|
case psh15:i=RegisterWindowMessage32A( HELPMSGSTRING );
|
||||||
if (lpcf->hwndOwner)
|
if (lpcf->hwndOwner)
|
||||||
SendMessage(lpcf->hwndOwner,i,0,(LPARAM)lpcf);
|
SendMessage(lpcf->hwndOwner,i,0,(LPARAM)lpcf);
|
||||||
if (CFn_HookCallChk(lpcf))
|
if (CFn_HookCallChk(lpcf))
|
||||||
CallWindowProc(lpcf->lpfnHook,hDlg,WM_COMMAND,psh15,(LPARAM)lpcf);
|
CallWindowProc16(lpcf->lpfnHook,hDlg,WM_COMMAND,psh15,(LPARAM)lpcf);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDOK:EndDialog(hDlg, TRUE);
|
case IDOK:EndDialog(hDlg, TRUE);
|
||||||
|
@ -2657,7 +2649,7 @@ LRESULT FormatCharDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
if (!lpcf)
|
if (!lpcf)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (CFn_HookCallChk(lpcf))
|
if (CFn_HookCallChk(lpcf))
|
||||||
res=CallWindowProc(lpcf->lpfnHook,hDlg,message,wParam,lParam);
|
res=CallWindowProc16(lpcf->lpfnHook,hDlg,message,wParam,lParam);
|
||||||
if (res)
|
if (res)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,6 @@ BOOL WinHelp(HWND hWnd, LPSTR lpHelpFile, WORD wCommand, DWORD dwData)
|
||||||
{
|
{
|
||||||
static WORD WM_WINHELP=0;
|
static WORD WM_WINHELP=0;
|
||||||
HWND hDest;
|
HWND hDest;
|
||||||
char szBuf[20];
|
|
||||||
LPWINHELP lpwh;
|
LPWINHELP lpwh;
|
||||||
HANDLE hwh;
|
HANDLE hwh;
|
||||||
void *data=0;
|
void *data=0;
|
||||||
|
@ -122,13 +121,11 @@ BOOL WinHelp(HWND hWnd, LPSTR lpHelpFile, WORD wCommand, DWORD dwData)
|
||||||
/* FIXME: Should be directed yield, to let winhelp open the window */
|
/* FIXME: Should be directed yield, to let winhelp open the window */
|
||||||
Yield();
|
Yield();
|
||||||
if(!WM_WINHELP) {
|
if(!WM_WINHELP) {
|
||||||
strcpy(szBuf,"WM_WINHELP");
|
WM_WINHELP=RegisterWindowMessage32A("WM_WINHELP");
|
||||||
WM_WINHELP=RegisterWindowMessage(MAKE_SEGPTR(szBuf));
|
|
||||||
if(!WM_WINHELP)
|
if(!WM_WINHELP)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
strcpy(szBuf,"MS_WINHELP");
|
hDest = FindWindow32A( "MS_WINHELP", NULL );
|
||||||
hDest = FindWindow(MAKE_SEGPTR(szBuf),0);
|
|
||||||
if(!hDest)
|
if(!hDest)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
switch(wCommand)
|
switch(wCommand)
|
||||||
|
|
19
misc/main.c
19
misc/main.c
|
@ -564,9 +564,6 @@ int main( int argc, char *argv[] )
|
||||||
|
|
||||||
MAIN_ParseOptions( &argc, argv );
|
MAIN_ParseOptions( &argc, argv );
|
||||||
|
|
||||||
SHELL_Init();
|
|
||||||
SHELL_LoadRegistry();
|
|
||||||
|
|
||||||
screen = DefaultScreenOfDisplay( display );
|
screen = DefaultScreenOfDisplay( display );
|
||||||
screenWidth = WidthOfScreen( screen );
|
screenWidth = WidthOfScreen( screen );
|
||||||
screenHeight = HeightOfScreen( screen );
|
screenHeight = HeightOfScreen( screen );
|
||||||
|
@ -892,38 +889,45 @@ BOOL SystemParametersInfo (UINT uAction, UINT uParam, LPVOID lpvParam, UINT fuWi
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETBORDER:
|
case SPI_GETBORDER:
|
||||||
*(INT *) lpvParam = 1;
|
*(INT *)lpvParam = GetSystemMetrics( SM_CXFRAME );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETFASTTASKSWITCH:
|
case SPI_GETFASTTASKSWITCH:
|
||||||
*(BOOL *) lpvParam = FALSE;
|
*(BOOL *) lpvParam = FALSE;
|
||||||
|
/* FIXME GetProfileInt( "windows", "CoolSwitch", 1 ) */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETGRIDGRANULARITY:
|
case SPI_GETGRIDGRANULARITY:
|
||||||
*(INT *) lpvParam = 1;
|
*(INT *) lpvParam = 1;
|
||||||
|
/* FIXME GetProfileInt( "desktop", "GridGranularity", 1 ) */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETICONTITLEWRAP:
|
case SPI_GETICONTITLEWRAP:
|
||||||
*(BOOL *) lpvParam = FALSE;
|
*(BOOL *) lpvParam = FALSE;
|
||||||
|
/* FIXME GetProfileInt( "desktop", "?", True ) */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETKEYBOARDDELAY:
|
case SPI_GETKEYBOARDDELAY:
|
||||||
*(INT *) lpvParam = 1;
|
*(INT *) lpvParam = 1;
|
||||||
|
/* FIXME */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETKEYBOARDSPEED:
|
case SPI_GETKEYBOARDSPEED:
|
||||||
*(WORD *) lpvParam = 30;
|
*(WORD *) lpvParam = 30;
|
||||||
|
/* FIXME */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETMENUDROPALIGNMENT:
|
case SPI_GETMENUDROPALIGNMENT:
|
||||||
*(BOOL *) lpvParam = FALSE;
|
*(BOOL *) lpvParam = GetSystemMetrics( SM_MENUDROPALIGNMENT ); /* XXX check this */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETSCREENSAVEACTIVE:
|
case SPI_GETSCREENSAVEACTIVE:
|
||||||
|
/* FIXME GetProfileInt( "windows", "ScreenSaveActive", 1 ); */
|
||||||
*(BOOL *) lpvParam = FALSE;
|
*(BOOL *) lpvParam = FALSE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETSCREENSAVETIMEOUT:
|
case SPI_GETSCREENSAVETIMEOUT:
|
||||||
|
/* FIXME GetProfileInt( "windows", "ScreenSaveTimeout", 300 ); */
|
||||||
XGetScreenSaver(display, &timeout, &temp,&temp,&temp);
|
XGetScreenSaver(display, &timeout, &temp,&temp,&temp);
|
||||||
*(INT *) lpvParam = timeout * 1000;
|
*(INT *) lpvParam = timeout * 1000;
|
||||||
break;
|
break;
|
||||||
|
@ -932,14 +936,14 @@ BOOL SystemParametersInfo (UINT uAction, UINT uParam, LPVOID lpvParam, UINT fuWi
|
||||||
if (lpvParam == NULL)
|
if (lpvParam == NULL)
|
||||||
fprintf(stderr, "SystemParametersInfo: Horizontal icon spacing set to %d\n.", uParam);
|
fprintf(stderr, "SystemParametersInfo: Horizontal icon spacing set to %d\n.", uParam);
|
||||||
else
|
else
|
||||||
*(INT *) lpvParam = 50;
|
*(INT *) lpvParam = GetSystemMetrics( SM_CXICONSPACING );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_ICONVERTICALSPACING:
|
case SPI_ICONVERTICALSPACING:
|
||||||
if (lpvParam == NULL)
|
if (lpvParam == NULL)
|
||||||
fprintf(stderr, "SystemParametersInfo: Vertical icon spacing set to %d\n.", uParam);
|
fprintf(stderr, "SystemParametersInfo: Vertical icon spacing set to %d\n.", uParam);
|
||||||
else
|
else
|
||||||
*(INT *) lpvParam = 50;
|
*(INT *) lpvParam = GetSystemMetrics( SM_CYICONSPACING );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_SETBEEP:
|
case SPI_SETBEEP:
|
||||||
|
@ -979,6 +983,7 @@ BOOL SystemParametersInfo (UINT uAction, UINT uParam, LPVOID lpvParam, UINT fuWi
|
||||||
|
|
||||||
case SPI_GETICONTITLELOGFONT:
|
case SPI_GETICONTITLELOGFONT:
|
||||||
{
|
{
|
||||||
|
/* FIXME GetProfileString( "?", "?", "?" ) */
|
||||||
LPLOGFONT lpLogFont = (LPLOGFONT)lpvParam;
|
LPLOGFONT lpLogFont = (LPLOGFONT)lpvParam;
|
||||||
lpLogFont->lfHeight = 10;
|
lpLogFont->lfHeight = 10;
|
||||||
lpLogFont->lfWidth = 0;
|
lpLogFont->lfWidth = 0;
|
||||||
|
|
237
misc/rect.c
237
misc/rect.c
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Rectangle-related functions
|
* Rectangle-related functions
|
||||||
*
|
*
|
||||||
* Copyright 1993 Alexandre Julliard
|
* Copyright 1993, 1996 Alexandre Julliard
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -9,9 +9,9 @@
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SetRect (USER.72)
|
* SetRect16 (USER.72)
|
||||||
*/
|
*/
|
||||||
void SetRect( LPRECT rect, short left, short top, short right, short bottom )
|
void SetRect16(LPRECT16 rect, INT16 left, INT16 top, INT16 right, INT16 bottom)
|
||||||
{
|
{
|
||||||
rect->left = left;
|
rect->left = left;
|
||||||
rect->right = right;
|
rect->right = right;
|
||||||
|
@ -21,18 +21,39 @@ void SetRect( LPRECT rect, short left, short top, short right, short bottom )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SetRectEmpty (USER.73)
|
* SetRect32 (USER32.498)
|
||||||
*/
|
*/
|
||||||
void SetRectEmpty( LPRECT rect )
|
void SetRect32(LPRECT32 rect, INT32 left, INT32 top, INT32 right, INT32 bottom)
|
||||||
|
{
|
||||||
|
rect->left = left;
|
||||||
|
rect->right = right;
|
||||||
|
rect->top = top;
|
||||||
|
rect->bottom = bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SetRectEmpty16 (USER.73)
|
||||||
|
*/
|
||||||
|
void SetRectEmpty16( LPRECT16 rect )
|
||||||
{
|
{
|
||||||
rect->left = rect->right = rect->top = rect->bottom = 0;
|
rect->left = rect->right = rect->top = rect->bottom = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CopyRect (USER.74)
|
* SetRectEmpty32 (USER32.499)
|
||||||
*/
|
*/
|
||||||
BOOL CopyRect( LPRECT dest, LPRECT src )
|
void SetRectEmpty32( LPRECT32 rect )
|
||||||
|
{
|
||||||
|
rect->left = rect->right = rect->top = rect->bottom = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CopyRect16 (USER.74)
|
||||||
|
*/
|
||||||
|
BOOL16 CopyRect16( RECT16 *dest, const RECT16 *src )
|
||||||
{
|
{
|
||||||
*dest = *src;
|
*dest = *src;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -40,18 +61,37 @@ BOOL CopyRect( LPRECT dest, LPRECT src )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* IsRectEmpty (USER.75)
|
* CopyRect32 (USER32.61)
|
||||||
*/
|
*/
|
||||||
BOOL IsRectEmpty( LPRECT rect )
|
BOOL32 CopyRect32( RECT32 *dest, const RECT32 *src )
|
||||||
|
{
|
||||||
|
*dest = *src;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* IsRectEmpty16 (USER.75)
|
||||||
|
*/
|
||||||
|
BOOL16 IsRectEmpty16( const RECT16 *rect )
|
||||||
{
|
{
|
||||||
return ((rect->left == rect->right) || (rect->top == rect->bottom));
|
return ((rect->left == rect->right) || (rect->top == rect->bottom));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* PtInRect (USER.76)
|
* IsRectEmpty32 (USER32.346)
|
||||||
*/
|
*/
|
||||||
BOOL PtInRect( LPRECT rect, POINT pt )
|
BOOL32 IsRectEmpty32( const RECT32 *rect )
|
||||||
|
{
|
||||||
|
return ((rect->left == rect->right) || (rect->top == rect->bottom));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* PtInRect16 (USER.76)
|
||||||
|
*/
|
||||||
|
BOOL16 PtInRect16( const RECT16 *rect, POINT16 pt )
|
||||||
{
|
{
|
||||||
return ((pt.x >= rect->left) && (pt.x < rect->right) &&
|
return ((pt.x >= rect->left) && (pt.x < rect->right) &&
|
||||||
(pt.y >= rect->top) && (pt.y < rect->bottom));
|
(pt.y >= rect->top) && (pt.y < rect->bottom));
|
||||||
|
@ -59,9 +99,19 @@ BOOL PtInRect( LPRECT rect, POINT pt )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* OffsetRect (USER.77)
|
* PtInRect32 (USER32.423)
|
||||||
*/
|
*/
|
||||||
void OffsetRect( LPRECT rect, short x, short y )
|
BOOL32 PtInRect32( const RECT32 *rect, POINT32 pt )
|
||||||
|
{
|
||||||
|
return ((pt.x >= rect->left) && (pt.x < rect->right) &&
|
||||||
|
(pt.y >= rect->top) && (pt.y < rect->bottom));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* OffsetRect16 (USER.77)
|
||||||
|
*/
|
||||||
|
void OffsetRect16( LPRECT16 rect, INT16 x, INT16 y )
|
||||||
{
|
{
|
||||||
rect->left += x;
|
rect->left += x;
|
||||||
rect->right += x;
|
rect->right += x;
|
||||||
|
@ -71,9 +121,21 @@ void OffsetRect( LPRECT rect, short x, short y )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* InflateRect (USER.78)
|
* OffsetRect32 (USER32.405)
|
||||||
*/
|
*/
|
||||||
void InflateRect( LPRECT rect, short x, short y )
|
void OffsetRect32( LPRECT32 rect, INT32 x, INT32 y )
|
||||||
|
{
|
||||||
|
rect->left += x;
|
||||||
|
rect->right += x;
|
||||||
|
rect->top += y;
|
||||||
|
rect->bottom += y;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* InflateRect16 (USER.78)
|
||||||
|
*/
|
||||||
|
void InflateRect16( LPRECT16 rect, INT16 x, INT16 y )
|
||||||
{
|
{
|
||||||
rect->left -= x;
|
rect->left -= x;
|
||||||
rect->top -= y;
|
rect->top -= y;
|
||||||
|
@ -83,15 +145,27 @@ void InflateRect( LPRECT rect, short x, short y )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* IntersectRect (USER.79)
|
* InflateRect32 (USER32.320)
|
||||||
*/
|
*/
|
||||||
BOOL IntersectRect( LPRECT dest, LPRECT src1, LPRECT src2 )
|
void InflateRect32( LPRECT32 rect, INT32 x, INT32 y )
|
||||||
{
|
{
|
||||||
if (IsRectEmpty(src1) || IsRectEmpty(src2) ||
|
rect->left -= x;
|
||||||
|
rect->top -= y;
|
||||||
|
rect->right += x;
|
||||||
|
rect->bottom += y;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* IntersectRect16 (USER.79)
|
||||||
|
*/
|
||||||
|
BOOL16 IntersectRect16( LPRECT16 dest, const RECT16 *src1, const RECT16 *src2 )
|
||||||
|
{
|
||||||
|
if (IsRectEmpty16(src1) || IsRectEmpty16(src2) ||
|
||||||
(src1->left >= src2->right) || (src2->left >= src1->right) ||
|
(src1->left >= src2->right) || (src2->left >= src1->right) ||
|
||||||
(src1->top >= src2->bottom) || (src2->top >= src1->bottom))
|
(src1->top >= src2->bottom) || (src2->top >= src1->bottom))
|
||||||
{
|
{
|
||||||
SetRectEmpty( dest );
|
SetRectEmpty16( dest );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
dest->left = MAX( src1->left, src2->left );
|
dest->left = MAX( src1->left, src2->left );
|
||||||
|
@ -103,22 +177,42 @@ BOOL IntersectRect( LPRECT dest, LPRECT src1, LPRECT src2 )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* UnionRect (USER.80)
|
* IntersectRect32 (USER32.326)
|
||||||
*/
|
*/
|
||||||
BOOL UnionRect( LPRECT dest, LPRECT src1, LPRECT src2 )
|
BOOL32 IntersectRect32( LPRECT32 dest, const RECT32 *src1, const RECT32 *src2 )
|
||||||
{
|
{
|
||||||
if (IsRectEmpty(src1))
|
if (IsRectEmpty32(src1) || IsRectEmpty32(src2) ||
|
||||||
|
(src1->left >= src2->right) || (src2->left >= src1->right) ||
|
||||||
|
(src1->top >= src2->bottom) || (src2->top >= src1->bottom))
|
||||||
{
|
{
|
||||||
if (IsRectEmpty(src2))
|
SetRectEmpty32( dest );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
dest->left = MAX( src1->left, src2->left );
|
||||||
|
dest->right = MIN( src1->right, src2->right );
|
||||||
|
dest->top = MAX( src1->top, src2->top );
|
||||||
|
dest->bottom = MIN( src1->bottom, src2->bottom );
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* UnionRect16 (USER.80)
|
||||||
|
*/
|
||||||
|
BOOL16 UnionRect16( LPRECT16 dest, const RECT16 *src1, const RECT16 *src2 )
|
||||||
|
{
|
||||||
|
if (IsRectEmpty16(src1))
|
||||||
|
{
|
||||||
|
if (IsRectEmpty16(src2))
|
||||||
{
|
{
|
||||||
SetRectEmpty( dest );
|
SetRectEmpty16( dest );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else *dest = *src2;
|
else *dest = *src2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (IsRectEmpty(src2)) *dest = *src1;
|
if (IsRectEmpty16(src2)) *dest = *src1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dest->left = MIN( src1->left, src2->left );
|
dest->left = MIN( src1->left, src2->left );
|
||||||
|
@ -132,9 +226,38 @@ BOOL UnionRect( LPRECT dest, LPRECT src1, LPRECT src2 )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* EqualRect (USER.244)
|
* UnionRect32 (USER32.558)
|
||||||
*/
|
*/
|
||||||
BOOL EqualRect( const RECT* rect1, const RECT* rect2 )
|
BOOL32 UnionRect32( LPRECT32 dest, const RECT32 *src1, const RECT32 *src2 )
|
||||||
|
{
|
||||||
|
if (IsRectEmpty32(src1))
|
||||||
|
{
|
||||||
|
if (IsRectEmpty32(src2))
|
||||||
|
{
|
||||||
|
SetRectEmpty32( dest );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else *dest = *src2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (IsRectEmpty32(src2)) *dest = *src1;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dest->left = MIN( src1->left, src2->left );
|
||||||
|
dest->right = MAX( src1->right, src2->right );
|
||||||
|
dest->top = MIN( src1->top, src2->top );
|
||||||
|
dest->bottom = MAX( src1->bottom, src2->bottom );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* EqualRect16 (USER.244)
|
||||||
|
*/
|
||||||
|
BOOL16 EqualRect16( const RECT16* rect1, const RECT16* rect2 )
|
||||||
{
|
{
|
||||||
return ((rect1->left == rect2->left) && (rect1->right == rect2->right) &&
|
return ((rect1->left == rect2->left) && (rect1->right == rect2->right) &&
|
||||||
(rect1->top == rect2->top) && (rect1->bottom == rect2->bottom));
|
(rect1->top == rect2->top) && (rect1->bottom == rect2->bottom));
|
||||||
|
@ -142,23 +265,33 @@ BOOL EqualRect( const RECT* rect1, const RECT* rect2 )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SubtractRect (USER.373)
|
* EqualRect32 (USER32.193)
|
||||||
*/
|
*/
|
||||||
BOOL SubtractRect( LPRECT dest, LPRECT src1, LPRECT src2 )
|
BOOL32 EqualRect32( const RECT32* rect1, const RECT32* rect2 )
|
||||||
{
|
{
|
||||||
RECT tmp;
|
return ((rect1->left == rect2->left) && (rect1->right == rect2->right) &&
|
||||||
|
(rect1->top == rect2->top) && (rect1->bottom == rect2->bottom));
|
||||||
|
}
|
||||||
|
|
||||||
if (IsRectEmpty( src1 ))
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SubtractRect16 (USER.373)
|
||||||
|
*/
|
||||||
|
BOOL16 SubtractRect16( LPRECT16 dest, const RECT16 *src1, const RECT16 *src2 )
|
||||||
|
{
|
||||||
|
RECT16 tmp;
|
||||||
|
|
||||||
|
if (IsRectEmpty16( src1 ))
|
||||||
{
|
{
|
||||||
SetRectEmpty( dest );
|
SetRectEmpty16( dest );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
*dest = *src1;
|
*dest = *src1;
|
||||||
if (IntersectRect( &tmp, src1, src2 ))
|
if (IntersectRect16( &tmp, src1, src2 ))
|
||||||
{
|
{
|
||||||
if (EqualRect( &tmp, dest ))
|
if (EqualRect16( &tmp, dest ))
|
||||||
{
|
{
|
||||||
SetRectEmpty( dest );
|
SetRectEmpty16( dest );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if ((tmp.top == dest->top) && (tmp.bottom == dest->bottom))
|
if ((tmp.top == dest->top) && (tmp.bottom == dest->bottom))
|
||||||
|
@ -175,3 +308,37 @@ BOOL SubtractRect( LPRECT dest, LPRECT src1, LPRECT src2 )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SubtractRect32 (USER32.535)
|
||||||
|
*/
|
||||||
|
BOOL32 SubtractRect32( LPRECT32 dest, const RECT32 *src1, const RECT32 *src2 )
|
||||||
|
{
|
||||||
|
RECT32 tmp;
|
||||||
|
|
||||||
|
if (IsRectEmpty32( src1 ))
|
||||||
|
{
|
||||||
|
SetRectEmpty32( dest );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
*dest = *src1;
|
||||||
|
if (IntersectRect32( &tmp, src1, src2 ))
|
||||||
|
{
|
||||||
|
if (EqualRect32( &tmp, dest ))
|
||||||
|
{
|
||||||
|
SetRectEmpty32( dest );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
if ((tmp.top == dest->top) && (tmp.bottom == dest->bottom))
|
||||||
|
{
|
||||||
|
if (tmp.left == dest->left) dest->left = tmp.right;
|
||||||
|
else if (tmp.right == dest->right) dest->right = tmp.left;
|
||||||
|
}
|
||||||
|
else if ((tmp.left == dest->left) && (tmp.right == dest->right))
|
||||||
|
{
|
||||||
|
if (tmp.top == dest->top) dest->top = tmp.bottom;
|
||||||
|
else if (tmp.bottom == dest->bottom) dest->bottom = tmp.top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
1075
misc/registry.c
1075
misc/registry.c
File diff suppressed because it is too large
Load Diff
142
misc/shell.c
142
misc/shell.c
|
@ -17,6 +17,7 @@
|
||||||
#include "stddebug.h"
|
#include "stddebug.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
#include "winreg.h"
|
||||||
|
|
||||||
extern HANDLE CURSORICON_LoadHandler( HANDLE, HINSTANCE, BOOL);
|
extern HANDLE CURSORICON_LoadHandler( HANDLE, HINSTANCE, BOOL);
|
||||||
extern WORD GetIconID( HANDLE hResource, DWORD resType );
|
extern WORD GetIconID( HANDLE hResource, DWORD resType );
|
||||||
|
@ -37,7 +38,7 @@ void DragAcceptFiles(HWND hWnd, BOOL b)
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* DragQueryFile [SHELL.11]
|
* DragQueryFile [SHELL.11]
|
||||||
*/
|
*/
|
||||||
UINT DragQueryFile(HDROP hDrop, WORD wFile, LPSTR lpszFile, WORD wLength)
|
UINT DragQueryFile(HDROP16 hDrop, WORD wFile, LPSTR lpszFile, WORD wLength)
|
||||||
{
|
{
|
||||||
/* hDrop is a global memory block allocated with GMEM_SHARE
|
/* hDrop is a global memory block allocated with GMEM_SHARE
|
||||||
* with DROPFILESTRUCT as a header and filenames following
|
* with DROPFILESTRUCT as a header and filenames following
|
||||||
|
@ -81,7 +82,7 @@ UINT DragQueryFile(HDROP hDrop, WORD wFile, LPSTR lpszFile, WORD wLength)
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* DragFinish [SHELL.12]
|
* DragFinish [SHELL.12]
|
||||||
*/
|
*/
|
||||||
void DragFinish(HDROP h)
|
void DragFinish(HDROP16 h)
|
||||||
{
|
{
|
||||||
GlobalFree16((HGLOBAL16)h);
|
GlobalFree16((HGLOBAL16)h);
|
||||||
}
|
}
|
||||||
|
@ -90,14 +91,14 @@ void DragFinish(HDROP h)
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* DragQueryPoint [SHELL.13]
|
* DragQueryPoint [SHELL.13]
|
||||||
*/
|
*/
|
||||||
BOOL DragQueryPoint(HDROP hDrop, POINT *p)
|
BOOL DragQueryPoint(HDROP16 hDrop, POINT16 *p)
|
||||||
{
|
{
|
||||||
LPDROPFILESTRUCT lpDropFileStruct;
|
LPDROPFILESTRUCT lpDropFileStruct;
|
||||||
BOOL bRet;
|
BOOL bRet;
|
||||||
|
|
||||||
lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock16(hDrop);
|
lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock16(hDrop);
|
||||||
|
|
||||||
memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT));
|
memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT16));
|
||||||
bRet = lpDropFileStruct->fInNonClientArea;
|
bRet = lpDropFileStruct->fInNonClientArea;
|
||||||
|
|
||||||
GlobalUnlock16(hDrop);
|
GlobalUnlock16(hDrop);
|
||||||
|
@ -145,7 +146,7 @@ HINSTANCE ShellExecute(HWND hWnd, LPCSTR lpOperation, LPCSTR lpFile, LPSTR lpPar
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
len=200;
|
len=200;
|
||||||
if (RegQueryValue((HKEY)HKEY_CLASSES_ROOT,p,subclass,&len)==SHELL_ERROR_SUCCESS) {
|
if (RegQueryValue16((HKEY)HKEY_CLASSES_ROOT,p,subclass,&len)==SHELL_ERROR_SUCCESS) {
|
||||||
if (len>20)
|
if (len>20)
|
||||||
fprintf(stddeb,"ShellExecute:subclass with len %ld? (%s), please report.\n",len,subclass);
|
fprintf(stddeb,"ShellExecute:subclass with len %ld? (%s), please report.\n",len,subclass);
|
||||||
subclass[len]='\0';
|
subclass[len]='\0';
|
||||||
|
@ -154,7 +155,7 @@ HINSTANCE ShellExecute(HWND hWnd, LPCSTR lpOperation, LPCSTR lpFile, LPSTR lpPar
|
||||||
strcat(subclass,"\\command");
|
strcat(subclass,"\\command");
|
||||||
dprintf_exec(stddeb,"ShellExecute:looking for %s.\n",subclass);
|
dprintf_exec(stddeb,"ShellExecute:looking for %s.\n",subclass);
|
||||||
len=400;
|
len=400;
|
||||||
if (RegQueryValue((HKEY)HKEY_CLASSES_ROOT,subclass,cmd,&len)==SHELL_ERROR_SUCCESS) {
|
if (RegQueryValue16((HKEY)HKEY_CLASSES_ROOT,subclass,cmd,&len)==SHELL_ERROR_SUCCESS) {
|
||||||
char *t;
|
char *t;
|
||||||
dprintf_exec(stddeb,"ShellExecute:...got %s\n",cmd);
|
dprintf_exec(stddeb,"ShellExecute:...got %s\n",cmd);
|
||||||
cmd[len]='\0';
|
cmd[len]='\0';
|
||||||
|
@ -196,10 +197,131 @@ HINSTANCE ShellExecute(HWND hWnd, LPCSTR lpOperation, LPCSTR lpFile, LPSTR lpPar
|
||||||
*/
|
*/
|
||||||
HINSTANCE FindExecutable(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult)
|
HINSTANCE FindExecutable(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult)
|
||||||
{
|
{
|
||||||
fprintf(stdnimp, "FindExecutable: someone has to fix me and this is YOUR turn! :-)\n");
|
char *extension = NULL; /* pointer to file extension */
|
||||||
|
char tmpext[5]; /* local copy to mung as we please */
|
||||||
|
char filetype[256]; /* registry name for this filetype */
|
||||||
|
LONG filetypelen=256; /* length of above */
|
||||||
|
char command[256]; /* command from registry */
|
||||||
|
LONG commandlen=256; /* This is the most DOS can handle :) */
|
||||||
|
char buffer[256]; /* Used to GetProfileString */
|
||||||
|
HINSTANCE retval=31; /* default - 'No association was found' */
|
||||||
|
char *tok; /* token pointer */
|
||||||
|
int i; /* random counter */
|
||||||
|
|
||||||
lpResult[0]='\0';
|
dprintf_exec(stddeb, "FindExecutable: File %s, Dir %s\n",
|
||||||
return 31; /* no association */
|
(lpFile != NULL?lpFile:"-"),
|
||||||
|
(lpDirectory != NULL?lpDirectory:"-"));
|
||||||
|
|
||||||
|
lpResult[0]='\0'; /* Start off with an empty return string */
|
||||||
|
|
||||||
|
/* trap NULL parameters on entry */
|
||||||
|
if (( lpFile == NULL ) || ( lpDirectory == NULL ) ||
|
||||||
|
( lpResult == NULL ))
|
||||||
|
{
|
||||||
|
/* FIXME - should throw a warning, perhaps! */
|
||||||
|
return 2; /* File not found. Close enough, I guess. */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* First thing we need is the file's extension */
|
||||||
|
extension = strchr( lpFile, '.' ); /* Assumes first "." is the one... */
|
||||||
|
if ((extension == NULL) || (extension == &lpFile[strlen(lpFile)]))
|
||||||
|
{
|
||||||
|
return 31; /* no association */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make local copy & lowercase it for reg & 'programs=' lookup */
|
||||||
|
strncpy( tmpext, extension, 5 );
|
||||||
|
if (strlen(extension)<=4)
|
||||||
|
tmpext[strlen(extension)]='\0';
|
||||||
|
else
|
||||||
|
tmpext[4]='\0';
|
||||||
|
for (i=0;i<strlen(tmpext);i++) tmpext[i]=tolower(tmpext[i]);
|
||||||
|
dprintf_exec(stddeb, "FindExecutable: %s file\n", tmpext);
|
||||||
|
|
||||||
|
/* Three places to check: */
|
||||||
|
/* 1. win.ini, [windows], programs (NB no leading '.') */
|
||||||
|
/* 2. Registry, HKEY_CLASS_ROOT\<filetype>\shell\open\command */
|
||||||
|
/* 3. win.ini, [extensions], extension (NB no leading '.' */
|
||||||
|
/* All I know of the order is that registry is checked before */
|
||||||
|
/* extensions; however, it'd make sense to check the programs */
|
||||||
|
/* section first, so that's what happens here. */
|
||||||
|
|
||||||
|
/* See if it's a program */
|
||||||
|
GetProfileString("windows", "programs", "exe pif bat com",
|
||||||
|
buffer, sizeof(buffer)); /* FIXME check return code! */
|
||||||
|
|
||||||
|
for (i=0;i<strlen(buffer); i++) buffer[i]=tolower(buffer[i]);
|
||||||
|
|
||||||
|
tok = strtok(buffer, " \t"); /* ? */
|
||||||
|
while( tok!= NULL)
|
||||||
|
{
|
||||||
|
if (strcmp(tok, &tmpext[1])==0) /* have to skip the leading "." */
|
||||||
|
{
|
||||||
|
strcpy(lpResult, lpFile); /* Need to perhaps check that */
|
||||||
|
/* the file has a path attached */
|
||||||
|
dprintf_exec(stddeb, "FindExecutable: found %s\n", lpResult);
|
||||||
|
return 33; /* Greater than 32 to indicate success FIXME */
|
||||||
|
/* what are the correct values here? */
|
||||||
|
}
|
||||||
|
tok=strtok(NULL, " \t");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check registry */
|
||||||
|
if (RegQueryValue16( (HKEY)HKEY_CLASSES_ROOT, tmpext, filetype,
|
||||||
|
&filetypelen ) == SHELL_ERROR_SUCCESS )
|
||||||
|
{
|
||||||
|
filetype[filetypelen]='\0';
|
||||||
|
dprintf_exec(stddeb, "File type: %s\n", filetype);
|
||||||
|
|
||||||
|
/* Looking for ...buffer\shell\open\command */
|
||||||
|
strcat( filetype, "\\shell\\open\\command" );
|
||||||
|
|
||||||
|
if (RegQueryValue16( (HKEY)HKEY_CLASSES_ROOT, filetype, command,
|
||||||
|
&commandlen ) == SHELL_ERROR_SUCCESS )
|
||||||
|
{
|
||||||
|
/* Is there a replace() function anywhere? */
|
||||||
|
command[commandlen]='\0';
|
||||||
|
strcpy( lpResult, command );
|
||||||
|
tok=strstr( lpResult, "%1" );
|
||||||
|
if (tok != NULL)
|
||||||
|
{
|
||||||
|
tok[0]='\0'; /* truncate string at the percent */
|
||||||
|
strcat( lpResult, lpFile ); /* what if no dir in lpFile? */
|
||||||
|
tok=strstr( command, "%1" );
|
||||||
|
if ((tok!=NULL) && (strlen(tok)>2))
|
||||||
|
{
|
||||||
|
strcat( lpResult, &tok[2] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
retval=33;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else /* Check win.ini */
|
||||||
|
{
|
||||||
|
/* Toss the leading dot */
|
||||||
|
extension++;
|
||||||
|
GetProfileString( "extensions", extension, "", command,
|
||||||
|
sizeof(command));
|
||||||
|
if (strlen(command)!=0)
|
||||||
|
{
|
||||||
|
strcpy( lpResult, command );
|
||||||
|
tok=strstr( lpResult, "^" ); /* should be ^.extension? */
|
||||||
|
if (tok != NULL)
|
||||||
|
{
|
||||||
|
tok[0]='\0';
|
||||||
|
strcat( lpResult, lpFile ); /* what if no dir in lpFile? */
|
||||||
|
tok=strstr( command, "^" ); /* see above */
|
||||||
|
if ((tok != NULL) && (strlen(tok)>5))
|
||||||
|
{
|
||||||
|
strcat( lpResult, &tok[5]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
retval=33;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dprintf_exec(stddeb, "FindExecutable: returning %s\n", lpResult);
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char AppName[128], AppMisc[1536];
|
static char AppName[128], AppMisc[1536];
|
||||||
|
@ -466,7 +588,7 @@ LPSTR SHELL_FindString(LPSTR lpEnv, LPCSTR entry)
|
||||||
UINT l = strlen(entry);
|
UINT l = strlen(entry);
|
||||||
for( ; *lpEnv ; lpEnv+=strlen(lpEnv)+1 )
|
for( ; *lpEnv ; lpEnv+=strlen(lpEnv)+1 )
|
||||||
{
|
{
|
||||||
if( strncasecmp(lpEnv, entry, l) ) continue;
|
if( lstrncmpi(lpEnv, entry, l) ) continue;
|
||||||
|
|
||||||
if( !*(lpEnv+l) )
|
if( !*(lpEnv+l) )
|
||||||
return (lpEnv + l); /* empty entry */
|
return (lpEnv + l); /* empty entry */
|
||||||
|
|
|
@ -149,7 +149,14 @@ static const char *MessageTypeNames[SPY_MAX_MSGNUM + 1] =
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
|
||||||
/* 0x00F0 - Win32 Buttons */
|
/* 0x00F0 - Win32 Buttons */
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
"BM_GETCHECK32", /* 0x00f0 */
|
||||||
|
"BM_SETCHECK32", /* 0x00f1 */
|
||||||
|
"BM_GETSTATE32", /* 0x00f2 */
|
||||||
|
"BM_SETSTATE32", /* 0x00f3 */
|
||||||
|
"BM_SETSTYLE32", /* 0x00f4 */
|
||||||
|
"BM_CLICK32", /* 0x00f5 */
|
||||||
|
"BM_GETIMAGE32", /* 0x00f6 */
|
||||||
|
"BM_SETIMAGE32", /* 0x00f7 */
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||||
|
|
||||||
"WM_KEYDOWN", /* 0x0100 */
|
"WM_KEYDOWN", /* 0x0100 */
|
||||||
|
|
|
@ -21,8 +21,9 @@ WORD USER_HeapSel = 0;
|
||||||
|
|
||||||
#ifndef WINELIB
|
#ifndef WINELIB
|
||||||
|
|
||||||
extern void TIMER_NukeTimers(HWND, HQUEUE );
|
extern void TIMER_NukeTimers(HWND, HQUEUE);
|
||||||
extern HTASK TASK_GetNextTask(HTASK);
|
extern HTASK TASK_GetNextTask(HTASK);
|
||||||
|
extern void QUEUE_SetDoomedQueue(HQUEUE);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetFreeSystemResources (USER.284)
|
* GetFreeSystemResources (USER.284)
|
||||||
|
@ -130,10 +131,14 @@ void USER_AppExit(HTASK hTask, HINSTANCE hInstance, HQUEUE hQueue)
|
||||||
|
|
||||||
HOOK_FreeQueueHooks( hQueue );
|
HOOK_FreeQueueHooks( hQueue );
|
||||||
|
|
||||||
|
QUEUE_SetDoomedQueue( hQueue );
|
||||||
|
|
||||||
/* Nuke orphaned windows */
|
/* Nuke orphaned windows */
|
||||||
|
|
||||||
WIN_DestroyQueueWindows( desktop->child, hQueue );
|
WIN_DestroyQueueWindows( desktop->child, hQueue );
|
||||||
|
|
||||||
|
QUEUE_SetDoomedQueue( 0 );
|
||||||
|
|
||||||
/* Free the message queue */
|
/* Free the message queue */
|
||||||
|
|
||||||
QUEUE_DeleteMsgQueue( hQueue );
|
QUEUE_DeleteMsgQueue( hQueue );
|
||||||
|
|
|
@ -59,8 +59,8 @@ find_ne_resource(
|
||||||
dprintf_resource(stderr,"shiftcount is %d\n",shiftcount);
|
dprintf_resource(stderr,"shiftcount is %d\n",shiftcount);
|
||||||
dprintf_resource(stderr,"reading resource typeinfo dir.\n");
|
dprintf_resource(stderr,"reading resource typeinfo dir.\n");
|
||||||
|
|
||||||
if (!HIWORD(typeid)) typeid = (SEGPTR)((WORD)typeid | 0x8000);
|
if (!HIWORD(typeid)) typeid = (SEGPTR)(LOWORD(typeid) | 0x8000);
|
||||||
if (!HIWORD(resid)) resid = (SEGPTR)((WORD)resid | 0x8000);
|
if (!HIWORD(resid)) resid = (SEGPTR)(LOWORD(resid) | 0x8000);
|
||||||
while (1) {
|
while (1) {
|
||||||
int skipflag;
|
int skipflag;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "winsock.h"
|
#include "winsock.h"
|
||||||
#include "toolhelp.h"
|
#include "global.h"
|
||||||
#include "stddebug.h"
|
#include "stddebug.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
|
|
|
@ -195,14 +195,6 @@ LRESULT DriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||||
return DrvDefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
|
return DrvDefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* OutputDebugStr [MMSYSTEM.30]
|
|
||||||
*/
|
|
||||||
void OutputDebugStr(LPCSTR str)
|
|
||||||
{
|
|
||||||
fprintf(stdnimp, "EMPTY STUB !!! OutputDebugStr('%s');\n", str);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* DriverCallback [MMSYSTEM.31]
|
* DriverCallback [MMSYSTEM.31]
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -629,7 +629,7 @@ static void BITBLT_GetRow( XImage *image, int *pdata, short row,
|
||||||
static void BITBLT_StretchImage( XImage *srcImage, XImage *dstImage,
|
static void BITBLT_StretchImage( XImage *srcImage, XImage *dstImage,
|
||||||
short widthSrc, short heightSrc,
|
short widthSrc, short heightSrc,
|
||||||
short widthDst, short heightDst,
|
short widthDst, short heightDst,
|
||||||
RECT *visRectSrc, RECT *visRectDst,
|
RECT16 *visRectSrc, RECT16 *visRectDst,
|
||||||
int foreground, int background, WORD mode )
|
int foreground, int background, WORD mode )
|
||||||
{
|
{
|
||||||
int *rowSrc, *rowDst, *pixel;
|
int *rowSrc, *rowDst, *pixel;
|
||||||
|
@ -775,14 +775,14 @@ static void BITBLT_GetSrcAreaStretch( DC *dcSrc, DC *dcDst,
|
||||||
short widthSrc, short heightSrc,
|
short widthSrc, short heightSrc,
|
||||||
short xDst, short yDst,
|
short xDst, short yDst,
|
||||||
short widthDst, short heightDst,
|
short widthDst, short heightDst,
|
||||||
RECT *visRectSrc, RECT *visRectDst )
|
RECT16 *visRectSrc, RECT16 *visRectDst )
|
||||||
{
|
{
|
||||||
XImage *imageSrc, *imageDst;
|
XImage *imageSrc, *imageDst;
|
||||||
|
|
||||||
RECT rectSrc = *visRectSrc;
|
RECT16 rectSrc = *visRectSrc;
|
||||||
RECT rectDst = *visRectDst;
|
RECT16 rectDst = *visRectDst;
|
||||||
OffsetRect( &rectSrc, -xSrc, -ySrc );
|
OffsetRect16( &rectSrc, -xSrc, -ySrc );
|
||||||
OffsetRect( &rectDst, -xDst, -yDst );
|
OffsetRect16( &rectDst, -xDst, -yDst );
|
||||||
imageSrc = XGetImage( display, dcSrc->u.x.drawable,
|
imageSrc = XGetImage( display, dcSrc->u.x.drawable,
|
||||||
visRectSrc->left, visRectSrc->top,
|
visRectSrc->left, visRectSrc->top,
|
||||||
visRectSrc->right - visRectSrc->left,
|
visRectSrc->right - visRectSrc->left,
|
||||||
|
@ -810,7 +810,7 @@ static void BITBLT_GetSrcAreaStretch( DC *dcSrc, DC *dcDst,
|
||||||
*/
|
*/
|
||||||
static void BITBLT_GetSrcArea( DC *dcSrc, DC *dcDst, Pixmap pixmap, GC gc,
|
static void BITBLT_GetSrcArea( DC *dcSrc, DC *dcDst, Pixmap pixmap, GC gc,
|
||||||
short xSrc, short ySrc,
|
short xSrc, short ySrc,
|
||||||
RECT *visRectSrc )
|
RECT16 *visRectSrc )
|
||||||
{
|
{
|
||||||
XImage *imageSrc, *imageDst;
|
XImage *imageSrc, *imageDst;
|
||||||
register short x, y;
|
register short x, y;
|
||||||
|
@ -884,7 +884,7 @@ static void BITBLT_GetSrcArea( DC *dcSrc, DC *dcDst, Pixmap pixmap, GC gc,
|
||||||
* Retrieve an area from the destination DC, mapping all the
|
* Retrieve an area from the destination DC, mapping all the
|
||||||
* pixels to Windows colors.
|
* pixels to Windows colors.
|
||||||
*/
|
*/
|
||||||
static void BITBLT_GetDstArea( DC *dc, Pixmap pixmap, GC gc, RECT *visRectDst )
|
static void BITBLT_GetDstArea(DC *dc, Pixmap pixmap, GC gc, RECT16 *visRectDst)
|
||||||
{
|
{
|
||||||
short width = visRectDst->right - visRectDst->left;
|
short width = visRectDst->right - visRectDst->left;
|
||||||
short height = visRectDst->bottom - visRectDst->top;
|
short height = visRectDst->bottom - visRectDst->top;
|
||||||
|
@ -915,7 +915,7 @@ static void BITBLT_GetDstArea( DC *dc, Pixmap pixmap, GC gc, RECT *visRectDst )
|
||||||
* Put an area back into the destination DC, mapping the pixel
|
* Put an area back into the destination DC, mapping the pixel
|
||||||
* colors to X pixels.
|
* colors to X pixels.
|
||||||
*/
|
*/
|
||||||
static void BITBLT_PutDstArea( DC *dc, Pixmap pixmap, GC gc, RECT *visRectDst )
|
static void BITBLT_PutDstArea(DC *dc, Pixmap pixmap, GC gc, RECT16 *visRectDst)
|
||||||
{
|
{
|
||||||
short width = visRectDst->right - visRectDst->left;
|
short width = visRectDst->right - visRectDst->left;
|
||||||
short height = visRectDst->bottom - visRectDst->top;
|
short height = visRectDst->bottom - visRectDst->top;
|
||||||
|
@ -953,9 +953,9 @@ static BOOL BITBLT_GetVisRectangles( DC *dcDst, short xDst, short yDst,
|
||||||
short widthDst, short heightDst,
|
short widthDst, short heightDst,
|
||||||
DC *dcSrc, short xSrc, short ySrc,
|
DC *dcSrc, short xSrc, short ySrc,
|
||||||
short widthSrc, short heightSrc,
|
short widthSrc, short heightSrc,
|
||||||
RECT *visRectSrc, RECT *visRectDst )
|
RECT16 *visRectSrc, RECT16 *visRectDst )
|
||||||
{
|
{
|
||||||
RECT tmpRect, clipRect;
|
RECT16 tmpRect, clipRect;
|
||||||
|
|
||||||
if (widthSrc < 0) { widthSrc = -widthSrc; xSrc -= widthSrc; }
|
if (widthSrc < 0) { widthSrc = -widthSrc; xSrc -= widthSrc; }
|
||||||
if (widthDst < 0) { widthDst = -widthDst; xDst -= widthDst; }
|
if (widthDst < 0) { widthDst = -widthDst; xDst -= widthDst; }
|
||||||
|
@ -964,28 +964,28 @@ static BOOL BITBLT_GetVisRectangles( DC *dcDst, short xDst, short yDst,
|
||||||
|
|
||||||
/* Get the destination visible rectangle */
|
/* Get the destination visible rectangle */
|
||||||
|
|
||||||
SetRect( &tmpRect, xDst, yDst, xDst + widthDst, yDst + heightDst );
|
SetRect16( &tmpRect, xDst, yDst, xDst + widthDst, yDst + heightDst );
|
||||||
GetRgnBox( dcDst->w.hGCClipRgn, &clipRect );
|
GetRgnBox16( dcDst->w.hGCClipRgn, &clipRect );
|
||||||
OffsetRect( &clipRect, dcDst->w.DCOrgX, dcDst->w.DCOrgY );
|
OffsetRect16( &clipRect, dcDst->w.DCOrgX, dcDst->w.DCOrgY );
|
||||||
if (!IntersectRect( visRectDst, &tmpRect, &clipRect )) return FALSE;
|
if (!IntersectRect16( visRectDst, &tmpRect, &clipRect )) return FALSE;
|
||||||
|
|
||||||
/* Get the source visible rectangle */
|
/* Get the source visible rectangle */
|
||||||
|
|
||||||
if (!dcSrc) return TRUE;
|
if (!dcSrc) return TRUE;
|
||||||
SetRect( &tmpRect, xSrc, ySrc, xSrc + widthSrc, ySrc + heightSrc );
|
SetRect16( &tmpRect, xSrc, ySrc, xSrc + widthSrc, ySrc + heightSrc );
|
||||||
/* Apparently the clip region is only for output, so use hVisRgn here */
|
/* Apparently the clip region is only for output, so use hVisRgn here */
|
||||||
GetRgnBox( dcSrc->w.hVisRgn, &clipRect );
|
GetRgnBox16( dcSrc->w.hVisRgn, &clipRect );
|
||||||
OffsetRect( &clipRect, dcSrc->w.DCOrgX, dcSrc->w.DCOrgY );
|
OffsetRect16( &clipRect, dcSrc->w.DCOrgX, dcSrc->w.DCOrgY );
|
||||||
if (!IntersectRect( visRectSrc, &tmpRect, &clipRect )) return FALSE;
|
if (!IntersectRect16( visRectSrc, &tmpRect, &clipRect )) return FALSE;
|
||||||
|
|
||||||
/* Intersect the rectangles */
|
/* Intersect the rectangles */
|
||||||
|
|
||||||
if ((widthSrc == widthDst) && (heightSrc == heightDst)) /* no stretching */
|
if ((widthSrc == widthDst) && (heightSrc == heightDst)) /* no stretching */
|
||||||
{
|
{
|
||||||
OffsetRect( visRectSrc, xDst - xSrc, yDst - ySrc );
|
OffsetRect16( visRectSrc, xDst - xSrc, yDst - ySrc );
|
||||||
if (!IntersectRect( &tmpRect, visRectSrc, visRectDst )) return FALSE;
|
if (!IntersectRect16( &tmpRect, visRectSrc, visRectDst )) return FALSE;
|
||||||
*visRectSrc = *visRectDst = tmpRect;
|
*visRectSrc = *visRectDst = tmpRect;
|
||||||
OffsetRect( visRectSrc, xSrc - xDst, ySrc - yDst );
|
OffsetRect16( visRectSrc, xSrc - xDst, ySrc - yDst );
|
||||||
}
|
}
|
||||||
else /* stretching */
|
else /* stretching */
|
||||||
{
|
{
|
||||||
|
@ -995,7 +995,7 @@ static BOOL BITBLT_GetVisRectangles( DC *dcDst, short xDst, short yDst,
|
||||||
((visRectSrc->right-xSrc) * widthDst) / widthSrc;
|
((visRectSrc->right-xSrc) * widthDst) / widthSrc;
|
||||||
visRectSrc->bottom = yDst +
|
visRectSrc->bottom = yDst +
|
||||||
((visRectSrc->bottom-ySrc) * heightDst) / heightSrc;
|
((visRectSrc->bottom-ySrc) * heightDst) / heightSrc;
|
||||||
if (!IntersectRect( &tmpRect, visRectSrc, visRectDst )) return FALSE;
|
if (!IntersectRect16( &tmpRect, visRectSrc, visRectDst )) return FALSE;
|
||||||
*visRectSrc = *visRectDst = tmpRect;
|
*visRectSrc = *visRectDst = tmpRect;
|
||||||
visRectSrc->left = xSrc + (visRectSrc->left-xDst)*widthSrc/widthDst;
|
visRectSrc->left = xSrc + (visRectSrc->left-xDst)*widthSrc/widthDst;
|
||||||
visRectSrc->top = ySrc + (visRectSrc->top-yDst)*heightSrc/heightDst;
|
visRectSrc->top = ySrc + (visRectSrc->top-yDst)*heightSrc/heightDst;
|
||||||
|
@ -1003,7 +1003,7 @@ static BOOL BITBLT_GetVisRectangles( DC *dcDst, short xDst, short yDst,
|
||||||
((visRectSrc->right-xDst) * widthSrc) / widthDst;
|
((visRectSrc->right-xDst) * widthSrc) / widthDst;
|
||||||
visRectSrc->bottom = ySrc +
|
visRectSrc->bottom = ySrc +
|
||||||
((visRectSrc->bottom-yDst) * heightSrc) / heightDst;
|
((visRectSrc->bottom-yDst) * heightSrc) / heightDst;
|
||||||
if (IsRectEmpty( visRectSrc )) return FALSE;
|
if (IsRectEmpty16( visRectSrc )) return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1020,7 +1020,7 @@ BOOL BITBLT_InternalStretchBlt( DC *dcDst, short xDst, short yDst,
|
||||||
short widthSrc, short heightSrc, DWORD rop )
|
short widthSrc, short heightSrc, DWORD rop )
|
||||||
{
|
{
|
||||||
BOOL usePat, useSrc, useDst, destUsed, fStretch, fNullBrush;
|
BOOL usePat, useSrc, useDst, destUsed, fStretch, fNullBrush;
|
||||||
RECT visRectDst, visRectSrc;
|
RECT16 visRectDst, visRectSrc;
|
||||||
short width, height;
|
short width, height;
|
||||||
const BYTE *opcode;
|
const BYTE *opcode;
|
||||||
Pixmap pixmaps[3] = { 0, 0, 0 }; /* pixmaps for DST, SRC, TMP */
|
Pixmap pixmaps[3] = { 0, 0, 0 }; /* pixmaps for DST, SRC, TMP */
|
||||||
|
@ -1113,11 +1113,13 @@ BOOL BITBLT_InternalStretchBlt( DC *dcDst, short xDst, short yDst,
|
||||||
case SRCCOPY: /* 0xcc */
|
case SRCCOPY: /* 0xcc */
|
||||||
if (dcSrc->w.bitsPerPixel == dcDst->w.bitsPerPixel)
|
if (dcSrc->w.bitsPerPixel == dcDst->w.bitsPerPixel)
|
||||||
{
|
{
|
||||||
|
XSetGraphicsExposures( display, dcDst->u.x.gc, True );
|
||||||
XSetFunction( display, dcDst->u.x.gc, GXcopy );
|
XSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||||
XCopyArea( display, dcSrc->u.x.drawable,
|
XCopyArea( display, dcSrc->u.x.drawable,
|
||||||
dcDst->u.x.drawable, dcDst->u.x.gc,
|
dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||||
visRectSrc.left, visRectSrc.top,
|
visRectSrc.left, visRectSrc.top,
|
||||||
width, height, visRectDst.left, visRectDst.top );
|
width, height, visRectDst.left, visRectDst.top );
|
||||||
|
XSetGraphicsExposures( display, dcDst->u.x.gc, False );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (dcSrc->w.bitsPerPixel == 1)
|
if (dcSrc->w.bitsPerPixel == 1)
|
||||||
|
@ -1125,10 +1127,12 @@ BOOL BITBLT_InternalStretchBlt( DC *dcDst, short xDst, short yDst,
|
||||||
XSetBackground( display, dcDst->u.x.gc, dcDst->w.textPixel );
|
XSetBackground( display, dcDst->u.x.gc, dcDst->w.textPixel );
|
||||||
XSetForeground( display, dcDst->u.x.gc, dcDst->w.backgroundPixel );
|
XSetForeground( display, dcDst->u.x.gc, dcDst->w.backgroundPixel );
|
||||||
XSetFunction( display, dcDst->u.x.gc, GXcopy );
|
XSetFunction( display, dcDst->u.x.gc, GXcopy );
|
||||||
|
XSetGraphicsExposures( display, dcDst->u.x.gc, True );
|
||||||
XCopyPlane( display, dcSrc->u.x.drawable,
|
XCopyPlane( display, dcSrc->u.x.drawable,
|
||||||
dcDst->u.x.drawable, dcDst->u.x.gc,
|
dcDst->u.x.drawable, dcDst->u.x.gc,
|
||||||
visRectSrc.left, visRectSrc.top,
|
visRectSrc.left, visRectSrc.top,
|
||||||
width, height, visRectDst.left, visRectDst.top, 1 );
|
width, height, visRectDst.left, visRectDst.top, 1 );
|
||||||
|
XSetGraphicsExposures( display, dcDst->u.x.gc, False );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -317,10 +317,11 @@ HBITMAP CreateDiscardableBitmap(HDC hdc, INT width, INT height)
|
||||||
return CreateCompatibleBitmap(hdc, width, height);
|
return CreateCompatibleBitmap(hdc, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetBitmapDimensionEx (GDI.468)
|
* GetBitmapDimensionEx16 (GDI.468)
|
||||||
*/
|
*/
|
||||||
BOOL GetBitmapDimensionEx( HBITMAP hbitmap, LPSIZE size )
|
BOOL16 GetBitmapDimensionEx16( HBITMAP16 hbitmap, LPSIZE16 size )
|
||||||
{
|
{
|
||||||
BITMAPOBJ * bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
|
BITMAPOBJ * bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
|
||||||
if (!bmp) return FALSE;
|
if (!bmp) return FALSE;
|
||||||
|
@ -330,19 +331,34 @@ BOOL GetBitmapDimensionEx( HBITMAP hbitmap, LPSIZE size )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetBitmapDimension (GDI.162)
|
* GetBitmapDimensionEx32 (GDI.468)
|
||||||
*/
|
*/
|
||||||
DWORD GetBitmapDimension( HBITMAP hbitmap )
|
BOOL32 GetBitmapDimensionEx32( HBITMAP32 hbitmap, LPSIZE32 size )
|
||||||
{
|
{
|
||||||
SIZE size;
|
BITMAPOBJ * bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
|
||||||
if (!GetBitmapDimensionEx( hbitmap, &size )) return 0;
|
if (!bmp) return FALSE;
|
||||||
return size.cx | (size.cy << 16);
|
size->cx = (INT32)bmp->size.cx;
|
||||||
|
size->cy = (INT32)bmp->size.cy;
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SetBitmapDimensionEx (GDI.478)
|
* GetBitmapDimension (GDI.162)
|
||||||
*/
|
*/
|
||||||
BOOL SetBitmapDimensionEx( HBITMAP hbitmap, short x, short y, LPSIZE prevSize )
|
DWORD GetBitmapDimension( HBITMAP16 hbitmap )
|
||||||
|
{
|
||||||
|
SIZE16 size;
|
||||||
|
if (!GetBitmapDimensionEx16( hbitmap, &size )) return 0;
|
||||||
|
return MAKELONG( size.cx, size.cy );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SetBitmapDimensionEx16 (GDI.478)
|
||||||
|
*/
|
||||||
|
BOOL16 SetBitmapDimensionEx16( HBITMAP16 hbitmap, INT16 x, INT16 y,
|
||||||
|
LPSIZE16 prevSize )
|
||||||
{
|
{
|
||||||
BITMAPOBJ * bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
|
BITMAPOBJ * bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
|
||||||
if (!bmp) return FALSE;
|
if (!bmp) return FALSE;
|
||||||
|
@ -353,12 +369,27 @@ BOOL SetBitmapDimensionEx( HBITMAP hbitmap, short x, short y, LPSIZE prevSize )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SetBitmapDimensionEx32 (GDI.478)
|
||||||
|
*/
|
||||||
|
BOOL32 SetBitmapDimensionEx32( HBITMAP32 hbitmap, INT32 x, INT32 y,
|
||||||
|
LPSIZE32 prevSize )
|
||||||
|
{
|
||||||
|
BITMAPOBJ * bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
|
||||||
|
if (!bmp) return FALSE;
|
||||||
|
if (prevSize) CONV_SIZE16TO32( &bmp->size, prevSize );
|
||||||
|
bmp->size.cx = (INT16)x;
|
||||||
|
bmp->size.cy = (INT16)y;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SetBitmapDimension (GDI.163)
|
* SetBitmapDimension (GDI.163)
|
||||||
*/
|
*/
|
||||||
DWORD SetBitmapDimension( HBITMAP hbitmap, short x, short y )
|
DWORD SetBitmapDimension( HBITMAP16 hbitmap, INT16 x, INT16 y )
|
||||||
{
|
{
|
||||||
SIZE size;
|
SIZE16 size;
|
||||||
if (!SetBitmapDimensionEx( hbitmap, x, y, &size )) return 0;
|
if (!SetBitmapDimensionEx16( hbitmap, x, y, &size )) return 0;
|
||||||
return size.cx | (size.cy << 16);
|
return MAKELONG( size.cx, size.cy );
|
||||||
}
|
}
|
||||||
|
|
|
@ -304,11 +304,11 @@ BOOL PtVisible( HDC hdc, short x, short y )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* RectVisible (GDI.104)
|
* RectVisible16 (GDI.104)
|
||||||
*/
|
*/
|
||||||
BOOL RectVisible( HDC hdc, LPRECT rect )
|
BOOL16 RectVisible16( HDC16 hdc, LPRECT16 rect )
|
||||||
{
|
{
|
||||||
RECT tmpRect;
|
RECT16 tmpRect;
|
||||||
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
||||||
if (!dc) return FALSE;
|
if (!dc) return FALSE;
|
||||||
dprintf_clipping(stddeb,"RectVisible: %04x %d,%dx%d,%d\n",
|
dprintf_clipping(stddeb,"RectVisible: %04x %d,%dx%d,%d\n",
|
||||||
|
@ -316,22 +316,46 @@ BOOL RectVisible( HDC hdc, LPRECT rect )
|
||||||
if (!dc->w.hGCClipRgn) return FALSE;
|
if (!dc->w.hGCClipRgn) return FALSE;
|
||||||
/* copy rectangle to avoid overwriting by LPtoDP */
|
/* copy rectangle to avoid overwriting by LPtoDP */
|
||||||
tmpRect = *rect;
|
tmpRect = *rect;
|
||||||
LPtoDP( hdc, (LPPOINT)&tmpRect, 2 );
|
LPtoDP16( hdc, (LPPOINT16)&tmpRect, 2 );
|
||||||
return RectInRegion( dc->w.hGCClipRgn, &tmpRect );
|
return RectInRegion16( dc->w.hGCClipRgn, &tmpRect );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetClipBox (GDI.77)
|
* RectVisible32 (GDI32.282)
|
||||||
*/
|
*/
|
||||||
int GetClipBox( HDC hdc, LPRECT rect )
|
BOOL32 RectVisible32( HDC32 hdc, LPRECT32 rect )
|
||||||
|
{
|
||||||
|
RECT16 rect16;
|
||||||
|
CONV_RECT32TO16( rect, &rect16 );
|
||||||
|
return RectVisible16( (HDC16)hdc, &rect16 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GetClipBox16 (GDI.77)
|
||||||
|
*/
|
||||||
|
INT16 GetClipBox16( HDC16 hdc, LPRECT16 rect )
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
||||||
if (!dc) return ERROR;
|
if (!dc) return ERROR;
|
||||||
dprintf_clipping(stddeb, "GetClipBox: %04x %p\n", hdc, rect );
|
ret = GetRgnBox16( dc->w.hGCClipRgn, rect );
|
||||||
ret = GetRgnBox( dc->w.hGCClipRgn, rect );
|
DPtoLP16( hdc, (LPPOINT16)rect, 2 );
|
||||||
DPtoLP( hdc, (LPPOINT)rect, 2 );
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GetClipBox32 (GDI32.162)
|
||||||
|
*/
|
||||||
|
INT32 GetClipBox32( HDC32 hdc, LPRECT32 rect )
|
||||||
|
{
|
||||||
|
INT32 ret;
|
||||||
|
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
||||||
|
if (!dc) return ERROR;
|
||||||
|
ret = GetRgnBox32( dc->w.hGCClipRgn, rect );
|
||||||
|
DPtoLP32( hdc, (LPPOINT32)rect, 2 );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,11 +106,11 @@ static BOOL COLOR_BuildMap( Colormap map, int depth, int size )
|
||||||
*
|
*
|
||||||
* Create the system palette.
|
* Create the system palette.
|
||||||
*/
|
*/
|
||||||
static HPALETTE COLOR_InitPalette(void)
|
static HPALETTE16 COLOR_InitPalette(void)
|
||||||
{
|
{
|
||||||
int i, size, pixel;
|
int i, size, pixel;
|
||||||
XColor color;
|
XColor color;
|
||||||
HPALETTE hpalette;
|
HPALETTE16 hpalette;
|
||||||
LOGPALETTE * palPtr;
|
LOGPALETTE * palPtr;
|
||||||
WORD *colorTranslation, *revTranslation;
|
WORD *colorTranslation, *revTranslation;
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ COLOR_Computeshifts(unsigned long maskbits, int *shift, int *max)
|
||||||
*
|
*
|
||||||
* Initialize color map and system palette.
|
* Initialize color map and system palette.
|
||||||
*/
|
*/
|
||||||
HPALETTE COLOR_Init(void)
|
HPALETTE16 COLOR_Init(void)
|
||||||
{
|
{
|
||||||
Visual * visual = DefaultVisual( display, DefaultScreen(display) );
|
Visual * visual = DefaultVisual( display, DefaultScreen(display) );
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
Cursor CURSORICON_XCursor = None; /* Current X cursor */
|
Cursor CURSORICON_XCursor = None; /* Current X cursor */
|
||||||
static HCURSOR hActiveCursor = 0; /* Active cursor */
|
static HCURSOR hActiveCursor = 0; /* Active cursor */
|
||||||
static int CURSOR_ShowCount = 0; /* Cursor display count */
|
static int CURSOR_ShowCount = 0; /* Cursor display count */
|
||||||
static RECT CURSOR_ClipRect; /* Cursor clipping rect */
|
static RECT32 CURSOR_ClipRect; /* Cursor clipping rect */
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* CURSORICON_FindBestIcon
|
* CURSORICON_FindBestIcon
|
||||||
|
@ -237,7 +237,7 @@ HANDLE CURSORICON_LoadHandler( HANDLE handle, HINSTANCE hInstance,
|
||||||
HANDLE hAndBits, hXorBits;
|
HANDLE hAndBits, hXorBits;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
int size, sizeAnd, sizeXor;
|
int size, sizeAnd, sizeXor;
|
||||||
POINT hotspot = { 0 ,0 };
|
POINT16 hotspot = { 0 ,0 };
|
||||||
BITMAPOBJ *bmpXor, *bmpAnd;
|
BITMAPOBJ *bmpXor, *bmpAnd;
|
||||||
BITMAPINFO *bmi, *pInfo;
|
BITMAPINFO *bmi, *pInfo;
|
||||||
CURSORICONINFO *info;
|
CURSORICONINFO *info;
|
||||||
|
@ -245,7 +245,7 @@ HANDLE CURSORICON_LoadHandler( HANDLE handle, HINSTANCE hInstance,
|
||||||
|
|
||||||
if (fCursor) /* If cursor, get the hotspot */
|
if (fCursor) /* If cursor, get the hotspot */
|
||||||
{
|
{
|
||||||
POINT *pt = (POINT *)LockResource( handle );
|
POINT16 *pt = (POINT16 *)LockResource( handle );
|
||||||
hotspot = *pt;
|
hotspot = *pt;
|
||||||
bmi = (BITMAPINFO *)(pt + 1);
|
bmi = (BITMAPINFO *)(pt + 1);
|
||||||
}
|
}
|
||||||
|
@ -864,20 +864,31 @@ HCURSOR GetCursor(void)
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* ClipCursor (USER.16)
|
* ClipCursor16 (USER.16)
|
||||||
*/
|
*/
|
||||||
BOOL ClipCursor( RECT *rect )
|
BOOL16 ClipCursor16( const RECT16 *rect )
|
||||||
{
|
{
|
||||||
if (!rect) SetRectEmpty( &CURSOR_ClipRect );
|
if (!rect) SetRectEmpty32( &CURSOR_ClipRect );
|
||||||
else CopyRect( &CURSOR_ClipRect, rect );
|
else CONV_RECT16TO32( rect, &CURSOR_ClipRect );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetCursorPos (USER.17)
|
* ClipCursor32 (USER32.52)
|
||||||
*/
|
*/
|
||||||
void GetCursorPos( POINT *pt )
|
BOOL32 ClipCursor32( const RECT32 *rect )
|
||||||
|
{
|
||||||
|
if (!rect) SetRectEmpty32( &CURSOR_ClipRect );
|
||||||
|
else CopyRect32( &CURSOR_ClipRect, rect );
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GetCursorPos16 (USER.17)
|
||||||
|
*/
|
||||||
|
void GetCursorPos16( POINT16 *pt )
|
||||||
{
|
{
|
||||||
Window root, child;
|
Window root, child;
|
||||||
int rootX, rootY, childX, childY;
|
int rootX, rootY, childX, childY;
|
||||||
|
@ -897,11 +908,31 @@ void GetCursorPos( POINT *pt )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetClipCursor (USER.309)
|
* GetCursorPos32 (USER32.228)
|
||||||
*/
|
*/
|
||||||
void GetClipCursor( RECT *rect )
|
void GetCursorPos32( POINT32 *pt )
|
||||||
{
|
{
|
||||||
if (rect) CopyRect( rect, &CURSOR_ClipRect );
|
POINT16 pt16;
|
||||||
|
GetCursorPos16( &pt16 );
|
||||||
|
if (pt) CONV_POINT16TO32( &pt16, pt );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GetClipCursor16 (USER.309)
|
||||||
|
*/
|
||||||
|
void GetClipCursor16( RECT16 *rect )
|
||||||
|
{
|
||||||
|
if (rect) CONV_RECT32TO16( &CURSOR_ClipRect, rect );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GetClipCursor32 (USER32.220)
|
||||||
|
*/
|
||||||
|
void GetClipCursor32( RECT32 *rect )
|
||||||
|
{
|
||||||
|
if (rect) CopyRect32( rect, &CURSOR_ClipRect );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,13 +26,22 @@ func_type func_name( HDC hdc ) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DC_GET_VAL_EX( func_name, ret_x, ret_y ) \
|
#define DC_GET_VAL_EX( func_name, ret_x, ret_y ) \
|
||||||
BOOL func_name( HDC hdc, LPPOINT pt ) \
|
BOOL16 func_name##16( HDC16 hdc, LPPOINT16 pt ) \
|
||||||
{ \
|
{ \
|
||||||
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); \
|
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); \
|
||||||
if (!dc) return FALSE; \
|
if (!dc) return FALSE; \
|
||||||
pt->x = dc->w.ret_x; \
|
pt->x = dc->w.ret_x; \
|
||||||
pt->y = dc->w.ret_y; \
|
pt->y = dc->w.ret_y; \
|
||||||
return TRUE; \
|
return TRUE; \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
BOOL32 func_name##32( HDC32 hdc, LPPOINT32 pt ) \
|
||||||
|
{ \
|
||||||
|
DC * dc = (DC *) GDI_GetObjPtr( (HDC16)hdc, DC_MAGIC ); \
|
||||||
|
if (!dc) return FALSE; \
|
||||||
|
pt->x = dc->w.ret_x; \
|
||||||
|
pt->y = dc->w.ret_y; \
|
||||||
|
return TRUE; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DC_SET_MODE( func_name, dc_field, min_val, max_val, meta_func ) \
|
#define DC_SET_MODE( func_name, dc_field, min_val, max_val, meta_func ) \
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "metafile.h"
|
#include "metafile.h"
|
||||||
#include "callback.h"
|
#include "callback.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
#include "string32.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "stddebug.h"
|
#include "stddebug.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
@ -616,16 +617,29 @@ INT GetTextFace( HDC hdc, INT count, LPSTR name )
|
||||||
*/
|
*/
|
||||||
DWORD GetTextExtent( HDC hdc, LPCSTR str, short count )
|
DWORD GetTextExtent( HDC hdc, LPCSTR str, short count )
|
||||||
{
|
{
|
||||||
SIZE size;
|
SIZE16 size;
|
||||||
if (!GetTextExtentPoint( hdc, str, count, &size )) return 0;
|
if (!GetTextExtentPoint16( hdc, str, count, &size )) return 0;
|
||||||
return MAKELONG( size.cx, size.cy );
|
return MAKELONG( size.cx, size.cy );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetTextExtentPoint (GDI.471)
|
* GetTextExtentPoint16 (GDI.471)
|
||||||
*/
|
*/
|
||||||
BOOL GetTextExtentPoint( HDC hdc, LPCSTR str, short count, LPSIZE size )
|
BOOL16 GetTextExtentPoint16( HDC16 hdc, LPCSTR str, INT16 count, LPSIZE16 size)
|
||||||
|
{
|
||||||
|
SIZE32 size32;
|
||||||
|
BOOL32 ret = GetTextExtentPoint32A( hdc, str, count, &size32 );
|
||||||
|
CONV_SIZE32TO16( &size32, size );
|
||||||
|
return (BOOL16)ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GetTextExtentPoint32A (GDI32.232)
|
||||||
|
*/
|
||||||
|
BOOL32 GetTextExtentPoint32A( HDC32 hdc, LPCSTR str, INT32 count,
|
||||||
|
LPSIZE32 size )
|
||||||
{
|
{
|
||||||
int dir, ascent, descent;
|
int dir, ascent, descent;
|
||||||
XCharStruct info;
|
XCharStruct info;
|
||||||
|
@ -639,12 +653,25 @@ BOOL GetTextExtentPoint( HDC hdc, LPCSTR str, short count, LPSIZE size )
|
||||||
size->cy = abs((dc->u.x.font.fstruct->ascent+dc->u.x.font.fstruct->descent)
|
size->cy = abs((dc->u.x.font.fstruct->ascent+dc->u.x.font.fstruct->descent)
|
||||||
* dc->w.WndExtY / dc->w.VportExtY);
|
* dc->w.WndExtY / dc->w.VportExtY);
|
||||||
|
|
||||||
dprintf_font(stddeb,"GetTextExtentPoint(%04x '%*.*s' %d %p): returning %d,%d\n",
|
dprintf_font(stddeb,"GetTextExtentPoint(%08x '%*.*s' %d %p): returning %d,%d\n",
|
||||||
hdc, count, count, str, count, size, size->cx, size->cy );
|
hdc, count, count, str, count, size, size->cx, size->cy );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GetTextExtentPoint32W (GDI32.233)
|
||||||
|
*/
|
||||||
|
BOOL32 GetTextExtentPoint32W( HDC32 hdc, LPCWSTR str, INT32 count,
|
||||||
|
LPSIZE32 size )
|
||||||
|
{
|
||||||
|
char *p = STRING32_DupUniToAnsi( str );
|
||||||
|
BOOL32 ret = GetTextExtentPoint32A( hdc, p, count, size );
|
||||||
|
free( p );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetTextMetrics (GDI.93)
|
* GetTextMetrics (GDI.93)
|
||||||
*/
|
*/
|
||||||
|
@ -667,6 +694,49 @@ BOOL GetTextMetrics( HDC hdc, LPTEXTMETRIC metrics )
|
||||||
* dc->w.WndExtX / dc->w.VportExtX );
|
* dc->w.WndExtX / dc->w.VportExtX );
|
||||||
metrics->tmAveCharWidth = abs( metrics->tmAveCharWidth
|
metrics->tmAveCharWidth = abs( metrics->tmAveCharWidth
|
||||||
* dc->w.WndExtX / dc->w.VportExtX );
|
* dc->w.WndExtX / dc->w.VportExtX );
|
||||||
|
|
||||||
|
dprintf_font(stdnimp,"text metrics:\n
|
||||||
|
InternalLeading = %i
|
||||||
|
ExternalLeading = %i
|
||||||
|
MaxCharWidth = %i
|
||||||
|
Weight = %i
|
||||||
|
Italic = %i
|
||||||
|
Underlined = %i
|
||||||
|
StruckOut = %i
|
||||||
|
FirstChar = %i
|
||||||
|
LastChar = %i
|
||||||
|
DefaultChar = %i
|
||||||
|
BreakChar = %i
|
||||||
|
CharSet = %i
|
||||||
|
Overhang = %i
|
||||||
|
DigitizedAspectX = %i
|
||||||
|
DigitizedAspectY = %i
|
||||||
|
AveCharWidth = %i
|
||||||
|
MaxCharWidth = %i
|
||||||
|
Ascent = %i
|
||||||
|
Descent = %i
|
||||||
|
Height = %i\n",
|
||||||
|
metrics->tmInternalLeading,
|
||||||
|
metrics->tmExternalLeading,
|
||||||
|
metrics->tmMaxCharWidth,
|
||||||
|
metrics->tmWeight,
|
||||||
|
metrics->tmItalic,
|
||||||
|
metrics->tmUnderlined,
|
||||||
|
metrics->tmStruckOut,
|
||||||
|
metrics->tmFirstChar,
|
||||||
|
metrics->tmLastChar,
|
||||||
|
metrics->tmDefaultChar,
|
||||||
|
metrics->tmBreakChar,
|
||||||
|
metrics->tmCharSet,
|
||||||
|
metrics->tmOverhang,
|
||||||
|
metrics->tmDigitizedAspectX,
|
||||||
|
metrics->tmDigitizedAspectY,
|
||||||
|
metrics->tmAveCharWidth,
|
||||||
|
metrics->tmMaxCharWidth,
|
||||||
|
metrics->tmAscent,
|
||||||
|
metrics->tmDescent,
|
||||||
|
metrics->tmHeight);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,12 @@
|
||||||
#include "bitmap.h"
|
#include "bitmap.h"
|
||||||
#include "brush.h"
|
#include "brush.h"
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
|
#include "heap.h"
|
||||||
#include "palette.h"
|
#include "palette.h"
|
||||||
#include "pen.h"
|
#include "pen.h"
|
||||||
#include "region.h"
|
#include "region.h"
|
||||||
#include "callback.h"
|
#include "callback.h"
|
||||||
#include "stddebug.h"
|
#include "stddebug.h"
|
||||||
/* #define DEBUG_GDI */
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ static GDIOBJHDR * StockObjects[NB_STOCK_OBJECTS] =
|
||||||
*/
|
*/
|
||||||
BOOL GDI_Init(void)
|
BOOL GDI_Init(void)
|
||||||
{
|
{
|
||||||
HPALETTE hpalette;
|
HPALETTE16 hpalette;
|
||||||
|
|
||||||
/* Create default palette */
|
/* Create default palette */
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ GDIOBJHDR * GDI_GetObjPtr( HANDLE handle, WORD magic )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* DeleteObject (GDI.69)
|
* DeleteObject (GDI.69)
|
||||||
*/
|
*/
|
||||||
BOOL DeleteObject( HGDIOBJ obj )
|
BOOL DeleteObject( HGDIOBJ16 obj )
|
||||||
{
|
{
|
||||||
/* Check if object is valid */
|
/* Check if object is valid */
|
||||||
|
|
||||||
|
@ -380,6 +380,8 @@ INT EnumObjects( HDC hdc, INT nObjType, GOBJENUMPROC lpEnumFunc, LPARAM lParam )
|
||||||
};
|
};
|
||||||
|
|
||||||
int i, retval = 0;
|
int i, retval = 0;
|
||||||
|
LOGPEN *pen;
|
||||||
|
LOGBRUSH *brush = NULL;
|
||||||
|
|
||||||
dprintf_gdi( stddeb, "EnumObjects: %04x %d %08lx %08lx\n",
|
dprintf_gdi( stddeb, "EnumObjects: %04x %d %08lx %08lx\n",
|
||||||
hdc, nObjType, (DWORD)lpEnumFunc, lParam );
|
hdc, nObjType, (DWORD)lpEnumFunc, lParam );
|
||||||
|
@ -387,40 +389,50 @@ INT EnumObjects( HDC hdc, INT nObjType, GOBJENUMPROC lpEnumFunc, LPARAM lParam )
|
||||||
{
|
{
|
||||||
case OBJ_PEN:
|
case OBJ_PEN:
|
||||||
/* Enumerate solid pens */
|
/* Enumerate solid pens */
|
||||||
|
if (!(pen = SEGPTR_NEW(LOGPEN))) break;
|
||||||
for (i = 0; i < sizeof(solid_colors)/sizeof(solid_colors[0]); i++)
|
for (i = 0; i < sizeof(solid_colors)/sizeof(solid_colors[0]); i++)
|
||||||
{
|
{
|
||||||
LOGPEN pen = { PS_SOLID, { 1, 0 }, solid_colors[i] };
|
pen->lopnStyle = PS_SOLID;
|
||||||
retval = CallEnumObjectsProc( lpEnumFunc, MAKE_SEGPTR(&pen),
|
pen->lopnWidth.x = 1;
|
||||||
|
pen->lopnWidth.y = 0;
|
||||||
|
pen->lopnColor = solid_colors[i];
|
||||||
|
retval = CallEnumObjectsProc( lpEnumFunc, SEGPTR_GET(pen),
|
||||||
lParam );
|
lParam );
|
||||||
dprintf_gdi( stddeb, "EnumObject: solid pen %08lx, ret=%d\n",
|
dprintf_gdi( stddeb, "EnumObject: solid pen %08lx, ret=%d\n",
|
||||||
solid_colors[i], retval);
|
solid_colors[i], retval);
|
||||||
if (!retval) break;
|
if (!retval) break;
|
||||||
}
|
}
|
||||||
|
SEGPTR_FREE(pen);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OBJ_BRUSH:
|
case OBJ_BRUSH:
|
||||||
/* Enumerate solid brushes */
|
/* Enumerate solid brushes */
|
||||||
|
if (!(brush = SEGPTR_NEW(LOGBRUSH))) break;
|
||||||
for (i = 0; i < sizeof(solid_colors)/sizeof(solid_colors[0]); i++)
|
for (i = 0; i < sizeof(solid_colors)/sizeof(solid_colors[0]); i++)
|
||||||
{
|
{
|
||||||
LOGBRUSH brush = { BS_SOLID, solid_colors[i], 0 };
|
brush->lbStyle = BS_SOLID;
|
||||||
retval = CallEnumObjectsProc( lpEnumFunc, MAKE_SEGPTR(&brush),
|
brush->lbColor = solid_colors[i];
|
||||||
|
brush->lbHatch = 0;
|
||||||
|
retval = CallEnumObjectsProc( lpEnumFunc, SEGPTR_GET(brush),
|
||||||
lParam );
|
lParam );
|
||||||
dprintf_gdi( stddeb, "EnumObject: solid brush %08lx, ret=%d\n",
|
dprintf_gdi( stddeb, "EnumObject: solid brush %08lx, ret=%d\n",
|
||||||
solid_colors[i], retval);
|
solid_colors[i], retval);
|
||||||
if (!retval) break;
|
if (!retval) break;
|
||||||
}
|
}
|
||||||
if (!retval) break;
|
|
||||||
|
|
||||||
/* Now enumerate hatched brushes */
|
/* Now enumerate hatched brushes */
|
||||||
for (i = HS_HORIZONTAL; i <= HS_DIAGCROSS; i++)
|
if (retval) for (i = HS_HORIZONTAL; i <= HS_DIAGCROSS; i++)
|
||||||
{
|
{
|
||||||
LOGBRUSH brush = { BS_HATCHED, RGB(0,0,0), i };
|
brush->lbStyle = BS_HATCHED;
|
||||||
retval = CallEnumObjectsProc( lpEnumFunc, MAKE_SEGPTR(&brush),
|
brush->lbColor = RGB(0,0,0);
|
||||||
|
brush->lbHatch = i;
|
||||||
|
retval = CallEnumObjectsProc( lpEnumFunc, SEGPTR_GET(brush),
|
||||||
lParam );
|
lParam );
|
||||||
dprintf_gdi( stddeb, "EnumObject: hatched brush %d, ret=%d\n",
|
dprintf_gdi( stddeb, "EnumObject: hatched brush %d, ret=%d\n",
|
||||||
i, retval);
|
i, retval);
|
||||||
if (!retval) break;
|
if (!retval) break;
|
||||||
}
|
}
|
||||||
|
SEGPTR_FREE(brush);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -307,7 +307,7 @@ BOOL EnumMetaFile(HDC hdc, HMETAFILE hmf, MFENUMPROC lpEnumFunc,LPARAM lpData)
|
||||||
{
|
{
|
||||||
METAHEADER *mh = (METAHEADER *)GlobalLock16(hmf);
|
METAHEADER *mh = (METAHEADER *)GlobalLock16(hmf);
|
||||||
METARECORD *mr;
|
METARECORD *mr;
|
||||||
HANDLETABLE *ht;
|
SEGPTR ht;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
|
|
||||||
dprintf_metafile(stddeb,"EnumMetaFile(%04x, %04x, %08lx, %08lx)\n",
|
dprintf_metafile(stddeb,"EnumMetaFile(%04x, %04x, %08lx, %08lx)\n",
|
||||||
|
@ -317,7 +317,7 @@ BOOL EnumMetaFile(HDC hdc, HMETAFILE hmf, MFENUMPROC lpEnumFunc,LPARAM lpData)
|
||||||
|
|
||||||
hHT = GlobalAlloc16(GMEM_MOVEABLE | GMEM_ZEROINIT,
|
hHT = GlobalAlloc16(GMEM_MOVEABLE | GMEM_ZEROINIT,
|
||||||
sizeof(HANDLETABLE) * mh->mtNoObjects);
|
sizeof(HANDLETABLE) * mh->mtNoObjects);
|
||||||
ht = (HANDLETABLE *)GlobalLock16(hHT);
|
ht = WIN16_GlobalLock16(hHT);
|
||||||
|
|
||||||
offset = mh->mtHeaderSize * 2;
|
offset = mh->mtHeaderSize * 2;
|
||||||
|
|
||||||
|
@ -326,9 +326,8 @@ BOOL EnumMetaFile(HDC hdc, HMETAFILE hmf, MFENUMPROC lpEnumFunc,LPARAM lpData)
|
||||||
while (offset < (mh->mtSize * 2))
|
while (offset < (mh->mtSize * 2))
|
||||||
{
|
{
|
||||||
mr = (METARECORD *)((char *)mh + offset);
|
mr = (METARECORD *)((char *)mh + offset);
|
||||||
if (!CallEnumMetafileProc(lpEnumFunc, hdc, MAKE_SEGPTR(ht),
|
if (!CallEnumMetafileProc(lpEnumFunc, hdc, ht, MAKE_SEGPTR(mr), /* FIXME!! */
|
||||||
MAKE_SEGPTR(mr), mh->mtNoObjects,
|
mh->mtNoObjects, (LONG)lpData))
|
||||||
(LONG)lpData))
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
offset += (mr->rdSize * 2);
|
offset += (mr->rdSize * 2);
|
||||||
|
@ -504,22 +503,22 @@ void PlayMetaFileRecord(HDC hdc, HANDLETABLE *ht, METARECORD *mr,
|
||||||
|
|
||||||
case META_TEXTOUT:
|
case META_TEXTOUT:
|
||||||
s1 = *(mr->rdParam);
|
s1 = *(mr->rdParam);
|
||||||
TextOut(hdc, *(mr->rdParam + ((s1 + 1) >> 1) + 2),
|
TextOut16(hdc, *(mr->rdParam + ((s1 + 1) >> 1) + 2),
|
||||||
*(mr->rdParam + ((s1 + 1) >> 1) + 1),
|
*(mr->rdParam + ((s1 + 1) >> 1) + 1),
|
||||||
(char *)(mr->rdParam + 1), s1);
|
(char *)(mr->rdParam + 1), s1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case META_POLYGON:
|
case META_POLYGON:
|
||||||
Polygon(hdc, (LPPOINT)(mr->rdParam + 1), *(mr->rdParam));
|
Polygon16(hdc, (LPPOINT16)(mr->rdParam + 1), *(mr->rdParam));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case META_POLYPOLYGON:
|
case META_POLYPOLYGON:
|
||||||
PolyPolygon(hdc, (LPPOINT)(mr->rdParam + *(mr->rdParam) + 1),
|
PolyPolygon16(hdc, (LPPOINT16)(mr->rdParam + *(mr->rdParam) + 1),
|
||||||
(LPINT16)(mr->rdParam + 1), *(mr->rdParam));
|
(LPINT16)(mr->rdParam + 1), *(mr->rdParam));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case META_POLYLINE:
|
case META_POLYLINE:
|
||||||
Polyline(hdc, (LPPOINT)(mr->rdParam + 1), *(mr->rdParam));
|
Polyline16(hdc, (LPPOINT16)(mr->rdParam + 1), *(mr->rdParam));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case META_RESTOREDC:
|
case META_RESTOREDC:
|
||||||
|
@ -614,7 +613,8 @@ void PlayMetaFileRecord(HDC hdc, HANDLETABLE *ht, METARECORD *mr,
|
||||||
x6=mr->rdParam[(s1+1)/2+5]; /* unknown meaning */
|
x6=mr->rdParam[(s1+1)/2+5]; /* unknown meaning */
|
||||||
x7=mr->rdParam[(s1+1)/2+6]; /* unknown meaning */
|
x7=mr->rdParam[(s1+1)/2+6]; /* unknown meaning */
|
||||||
x8=mr->rdParam[(s1+1)/2+7]; /* unknown meaning */
|
x8=mr->rdParam[(s1+1)/2+7]; /* unknown meaning */
|
||||||
ExtTextOut(hdc, x, y, options, (LPRECT) &mr->rdParam[(s1+1)/2+4], (char *)(mr->rdParam + 4), s1, NULL);
|
ExtTextOut16( hdc, x, y, options, (LPRECT16) &mr->rdParam[(s1+1)/2+4],
|
||||||
|
(char *)(mr->rdParam + 4), s1, NULL );
|
||||||
/* fprintf(stderr,"EXTTEXTOUT (len: %d) %hd : %hd %hd %hd %hd [%s].\n",
|
/* fprintf(stderr,"EXTTEXTOUT (len: %d) %hd : %hd %hd %hd %hd [%s].\n",
|
||||||
(mr->rdSize-s1),options,x5,x6,x7,x8,(char*) &(mr->rdParam[4]) );*/
|
(mr->rdSize-s1),options,x5,x6,x7,x8,(char*) &(mr->rdParam[4]) );*/
|
||||||
}
|
}
|
||||||
|
@ -1058,7 +1058,7 @@ BOOL MF_CreatePatternBrush(DC *dc, HBRUSH hBrush, LOGBRUSH *logbrush)
|
||||||
* MF_CreatePenIndirect
|
* MF_CreatePenIndirect
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BOOL MF_CreatePenIndirect(DC *dc, HPEN hPen, LOGPEN *logpen)
|
BOOL MF_CreatePenIndirect(DC *dc, HPEN16 hPen, LOGPEN *logpen)
|
||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
HMETAFILE handle;
|
HMETAFILE handle;
|
||||||
|
@ -1131,7 +1131,7 @@ BOOL MF_CreateFontIndirect(DC *dc, HFONT hFont, LOGFONT *logfont)
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* MF_TextOut
|
* MF_TextOut
|
||||||
*/
|
*/
|
||||||
BOOL MF_TextOut(DC *dc, short x, short y, LPSTR str, short count)
|
BOOL MF_TextOut(DC *dc, short x, short y, LPCSTR str, short count)
|
||||||
{
|
{
|
||||||
HMETAFILE handle;
|
HMETAFILE handle;
|
||||||
DWORD len;
|
DWORD len;
|
||||||
|
@ -1160,7 +1160,7 @@ BOOL MF_TextOut(DC *dc, short x, short y, LPSTR str, short count)
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* MF_MetaPoly - implements Polygon and Polyline
|
* MF_MetaPoly - implements Polygon and Polyline
|
||||||
*/
|
*/
|
||||||
BOOL MF_MetaPoly(DC *dc, short func, LPPOINT pt, short count)
|
BOOL MF_MetaPoly(DC *dc, short func, LPPOINT16 pt, short count)
|
||||||
{
|
{
|
||||||
HMETAFILE handle;
|
HMETAFILE handle;
|
||||||
DWORD len;
|
DWORD len;
|
||||||
|
|
|
@ -331,7 +331,7 @@ static HBITMAP OBM_MakeBitmap( WORD width, WORD height,
|
||||||
* Create the 2 bitmaps from XPM data.
|
* Create the 2 bitmaps from XPM data.
|
||||||
*/
|
*/
|
||||||
static BOOL OBM_CreateBitmaps( char **data, BOOL color, HBITMAP *hBitmap,
|
static BOOL OBM_CreateBitmaps( char **data, BOOL color, HBITMAP *hBitmap,
|
||||||
HBITMAP *hBitmapMask, POINT *hotspot )
|
HBITMAP *hBitmapMask, POINT16 *hotspot )
|
||||||
{
|
{
|
||||||
Pixmap pixmap, pixmask;
|
Pixmap pixmap, pixmask;
|
||||||
XpmAttributes *attrs;
|
XpmAttributes *attrs;
|
||||||
|
@ -407,7 +407,7 @@ HANDLE OBM_LoadCursorIcon( WORD id, BOOL fCursor )
|
||||||
CURSORICONINFO *pInfo;
|
CURSORICONINFO *pInfo;
|
||||||
BITMAPOBJ *bmpXor, *bmpAnd;
|
BITMAPOBJ *bmpXor, *bmpAnd;
|
||||||
HBITMAP hXorBits, hAndBits;
|
HBITMAP hXorBits, hAndBits;
|
||||||
POINT hotspot;
|
POINT16 hotspot;
|
||||||
int sizeXor, sizeAnd;
|
int sizeXor, sizeAnd;
|
||||||
|
|
||||||
if (fCursor)
|
if (fCursor)
|
||||||
|
|
|
@ -20,7 +20,7 @@ static WORD SystemPaletteUse = SYSPAL_STATIC; /* currently not considered */
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* PALETTE_GetNearestIndexAndColor
|
* PALETTE_GetNearestIndexAndColor
|
||||||
*/
|
*/
|
||||||
static WORD PALETTE_GetNearestIndexAndColor(HPALETTE hpalette, COLORREF *color)
|
static WORD PALETTE_GetNearestIndexAndColor(HPALETTE16 hpalette, COLORREF *color)
|
||||||
{
|
{
|
||||||
int i, minDist, dist;
|
int i, minDist, dist;
|
||||||
WORD index = 0;
|
WORD index = 0;
|
||||||
|
@ -69,10 +69,10 @@ static WORD PALETTE_GetNearestIndexAndColor(HPALETTE hpalette, COLORREF *color)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CreatePalette (GDI.360)
|
* CreatePalette (GDI.360)
|
||||||
*/
|
*/
|
||||||
HPALETTE CreatePalette( const LOGPALETTE* palette )
|
HPALETTE16 CreatePalette( const LOGPALETTE* palette )
|
||||||
{
|
{
|
||||||
PALETTEOBJ * palettePtr;
|
PALETTEOBJ * palettePtr;
|
||||||
HPALETTE hpalette;
|
HPALETTE16 hpalette;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
size = sizeof(LOGPALETTE) + (palette->palNumEntries - 1) * sizeof(PALETTEENTRY);
|
size = sizeof(LOGPALETTE) + (palette->palNumEntries - 1) * sizeof(PALETTEENTRY);
|
||||||
|
@ -87,7 +87,7 @@ HPALETTE CreatePalette( const LOGPALETTE* palette )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetPaletteEntries (GDI.363)
|
* GetPaletteEntries (GDI.363)
|
||||||
*/
|
*/
|
||||||
WORD GetPaletteEntries( HPALETTE hpalette, WORD start, WORD count,
|
WORD GetPaletteEntries( HPALETTE16 hpalette, WORD start, WORD count,
|
||||||
LPPALETTEENTRY entries )
|
LPPALETTEENTRY entries )
|
||||||
{
|
{
|
||||||
PALETTEOBJ * palPtr;
|
PALETTEOBJ * palPtr;
|
||||||
|
@ -107,7 +107,7 @@ WORD GetPaletteEntries( HPALETTE hpalette, WORD start, WORD count,
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SetPaletteEntries (GDI.364)
|
* SetPaletteEntries (GDI.364)
|
||||||
*/
|
*/
|
||||||
WORD SetPaletteEntries( HPALETTE hpalette, WORD start, WORD count,
|
WORD SetPaletteEntries( HPALETTE16 hpalette, WORD start, WORD count,
|
||||||
LPPALETTEENTRY entries )
|
LPPALETTEENTRY entries )
|
||||||
{
|
{
|
||||||
PALETTEOBJ * palPtr;
|
PALETTEOBJ * palPtr;
|
||||||
|
@ -126,7 +126,7 @@ WORD SetPaletteEntries( HPALETTE hpalette, WORD start, WORD count,
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* ResizePalette (GDI.368)
|
* ResizePalette (GDI.368)
|
||||||
*/
|
*/
|
||||||
BOOL ResizePalette(HPALETTE hPal, UINT cEntries)
|
BOOL ResizePalette(HPALETTE16 hPal, UINT cEntries)
|
||||||
{
|
{
|
||||||
fprintf(stdnimp,"ResizePalette: empty stub! \n");
|
fprintf(stdnimp,"ResizePalette: empty stub! \n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -135,7 +135,7 @@ BOOL ResizePalette(HPALETTE hPal, UINT cEntries)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* AnimatePalette (GDI.367)
|
* AnimatePalette (GDI.367)
|
||||||
*/
|
*/
|
||||||
BOOL AnimatePalette(HPALETTE hPal, UINT StartIndex, UINT NumEntries,
|
BOOL AnimatePalette(HPALETTE16 hPal, UINT StartIndex, UINT NumEntries,
|
||||||
LPPALETTEENTRY PaletteColors)
|
LPPALETTEENTRY PaletteColors)
|
||||||
{
|
{
|
||||||
fprintf(stdnimp,"AnimatePalette: empty stub! \n");
|
fprintf(stdnimp,"AnimatePalette: empty stub! \n");
|
||||||
|
@ -196,7 +196,7 @@ WORD GetSystemPaletteEntries( HDC hdc, WORD start, WORD count,
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetNearestPaletteIndex (GDI.370)
|
* GetNearestPaletteIndex (GDI.370)
|
||||||
*/
|
*/
|
||||||
WORD GetNearestPaletteIndex( HPALETTE hpalette, COLORREF color )
|
WORD GetNearestPaletteIndex( HPALETTE16 hpalette, COLORREF color )
|
||||||
{
|
{
|
||||||
WORD index = PALETTE_GetNearestIndexAndColor( hpalette, &color );
|
WORD index = PALETTE_GetNearestIndexAndColor( hpalette, &color );
|
||||||
dprintf_palette(stddeb,"GetNearestPaletteIndex(%04x,%06lx): returning %d\n",
|
dprintf_palette(stddeb,"GetNearestPaletteIndex(%04x,%06lx): returning %d\n",
|
||||||
|
@ -235,9 +235,9 @@ int PALETTE_GetObject( PALETTEOBJ * palette, int count, LPSTR buffer )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GDISelectPalette (GDI.361)
|
* GDISelectPalette (GDI.361)
|
||||||
*/
|
*/
|
||||||
HPALETTE GDISelectPalette( HDC hdc, HPALETTE hpal )
|
HPALETTE16 GDISelectPalette( HDC hdc, HPALETTE16 hpal )
|
||||||
{
|
{
|
||||||
HPALETTE prev;
|
HPALETTE16 prev;
|
||||||
DC *dc;
|
DC *dc;
|
||||||
|
|
||||||
dprintf_palette(stddeb, "GDISelectPalette: %04x %04x\n", hdc, hpal );
|
dprintf_palette(stddeb, "GDISelectPalette: %04x %04x\n", hdc, hpal );
|
||||||
|
@ -255,15 +255,49 @@ HPALETTE GDISelectPalette( HDC hdc, HPALETTE hpal )
|
||||||
*/
|
*/
|
||||||
UINT GDIRealizePalette( HDC hdc )
|
UINT GDIRealizePalette( HDC hdc )
|
||||||
{
|
{
|
||||||
dprintf_palette(stdnimp, "GDIRealizePalette: %04x\n", hdc );
|
UINT realized = 0;
|
||||||
return 0;
|
COLORREF color;
|
||||||
|
DC* dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ) ;
|
||||||
|
PALETTEOBJ* palPtr;
|
||||||
|
|
||||||
|
dprintf_palette(stdnimp, "GDIRealizePalette: %04x...", hdc );
|
||||||
|
|
||||||
|
if( dc )
|
||||||
|
{
|
||||||
|
palPtr = (PALETTEOBJ *) GDI_GetObjPtr( dc->w.hPalette, PALETTE_MAGIC );
|
||||||
|
|
||||||
|
if( palPtr )
|
||||||
|
{
|
||||||
|
WORD index, i;
|
||||||
|
HANDLE hMap;
|
||||||
|
WORD* pMap;
|
||||||
|
|
||||||
|
hMap = GDI_HEAP_ALLOC(sizeof(WORD)*palPtr->logpalette.palNumEntries);
|
||||||
|
pMap = (WORD*)GDI_HEAP_LIN_ADDR( hMap );
|
||||||
|
|
||||||
|
if( pMap )
|
||||||
|
{
|
||||||
|
for (i = 0; i < palPtr->logpalette.palNumEntries ; i++)
|
||||||
|
{
|
||||||
|
color = *(COLORREF*)(palPtr->logpalette.palPalEntry + i);
|
||||||
|
index = PALETTE_GetNearestIndexAndColor( STOCK_DEFAULT_PALETTE, &color);
|
||||||
|
if( index != i ) realized++;
|
||||||
|
pMap[i] = index;
|
||||||
|
}
|
||||||
|
COLOR_SetMapping(dc, hMap, 0, i);
|
||||||
|
GDI_HEAP_FREE(hMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dprintf_palette(stdnimp, " realized %i colors\n", realized );
|
||||||
|
return realized;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SelectPalette (USER.282)
|
* SelectPalette (USER.282)
|
||||||
*/
|
*/
|
||||||
HPALETTE SelectPalette(HDC hDC, HPALETTE hPal, BOOL bForceBackground)
|
HPALETTE16 SelectPalette(HDC hDC, HPALETTE16 hPal, BOOL bForceBackground)
|
||||||
{
|
{
|
||||||
return GDISelectPalette( hDC, hPal );
|
return GDISelectPalette( hDC, hPal );
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CreatePen (GDI.61)
|
* CreatePen (GDI.61)
|
||||||
*/
|
*/
|
||||||
HPEN CreatePen( INT style, INT width, COLORREF color )
|
HPEN16 CreatePen( INT style, INT width, COLORREF color )
|
||||||
{
|
{
|
||||||
LOGPEN logpen = { style, { width, 0 }, color };
|
LOGPEN logpen = { style, { width, 0 }, color };
|
||||||
dprintf_gdi(stddeb, "CreatePen: %d %d %06lx\n", style, width, color );
|
dprintf_gdi(stddeb, "CreatePen: %d %d %06lx\n", style, width, color );
|
||||||
|
@ -24,10 +24,10 @@ HPEN CreatePen( INT style, INT width, COLORREF color )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CreatePenIndirect (GDI.62)
|
* CreatePenIndirect (GDI.62)
|
||||||
*/
|
*/
|
||||||
HPEN CreatePenIndirect( const LOGPEN * pen )
|
HPEN16 CreatePenIndirect( const LOGPEN * pen )
|
||||||
{
|
{
|
||||||
PENOBJ * penPtr;
|
PENOBJ * penPtr;
|
||||||
HPEN hpen;
|
HPEN16 hpen;
|
||||||
|
|
||||||
if (pen->lopnStyle > PS_INSIDEFRAME) return 0;
|
if (pen->lopnStyle > PS_INSIDEFRAME) return 0;
|
||||||
hpen = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC );
|
hpen = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC );
|
||||||
|
@ -52,13 +52,13 @@ int PEN_GetObject( PENOBJ * pen, int count, LPSTR buffer )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* PEN_SelectObject
|
* PEN_SelectObject
|
||||||
*/
|
*/
|
||||||
HPEN PEN_SelectObject( DC * dc, HPEN hpen, PENOBJ * pen )
|
HPEN16 PEN_SelectObject( DC * dc, HPEN16 hpen, PENOBJ * pen )
|
||||||
{
|
{
|
||||||
static char dash_dash[] = { 5, 3 }; /* ----- ----- ----- */
|
static char dash_dash[] = { 5, 3 }; /* ----- ----- ----- */
|
||||||
static char dash_dot[] = { 2, 2 }; /* -- -- -- -- -- -- */
|
static char dash_dot[] = { 2, 2 }; /* -- -- -- -- -- -- */
|
||||||
static char dash_dashdot[] = { 4,3,2,3 }; /* ---- -- ---- -- */
|
static char dash_dashdot[] = { 4,3,2,3 }; /* ---- -- ---- -- */
|
||||||
static char dash_dashdotdot[] = { 4,2,2,2,2,2 }; /* ---- -- -- ---- */
|
static char dash_dashdotdot[] = { 4,2,2,2,2,2 }; /* ---- -- -- ---- */
|
||||||
HPEN prevHandle = dc->w.hPen;
|
HPEN16 prevHandle = dc->w.hPen;
|
||||||
|
|
||||||
if (dc->header.wMagic == METAFILE_DC_MAGIC)
|
if (dc->header.wMagic == METAFILE_DC_MAGIC)
|
||||||
if (MF_CreatePenIndirect(dc, hpen, &(pen->logpen)))
|
if (MF_CreatePenIndirect(dc, hpen, &(pen->logpen)))
|
||||||
|
|
118
objects/region.c
118
objects/region.c
|
@ -7,10 +7,8 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "region.h"
|
#include "region.h"
|
||||||
#include "stddebug.h"
|
#include "stddebug.h"
|
||||||
/* #define DEBUG_REGION */
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,9 +24,9 @@ BOOL REGION_DeleteObject( HRGN hrgn, RGNOBJ * obj )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* OffsetRgn (GDI.101)
|
* OffsetRgn (GDI.101) (GDI32.256)
|
||||||
*/
|
*/
|
||||||
int OffsetRgn( HRGN hrgn, short x, short y )
|
INT16 OffsetRgn( HRGN32 hrgn, INT32 x, INT32 y )
|
||||||
{
|
{
|
||||||
RGNOBJ * obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC );
|
RGNOBJ * obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC );
|
||||||
if (!obj) return ERROR;
|
if (!obj) return ERROR;
|
||||||
|
@ -40,33 +38,45 @@ int OffsetRgn( HRGN hrgn, short x, short y )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetRgnBox (GDI.134)
|
* GetRgnBox16 (GDI.134)
|
||||||
*/
|
*/
|
||||||
int GetRgnBox( HRGN hrgn, LPRECT rect )
|
INT16 GetRgnBox16( HRGN16 hrgn, LPRECT16 rect )
|
||||||
{
|
{
|
||||||
RGNOBJ * obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC );
|
RGNOBJ * obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC );
|
||||||
if (!obj) return ERROR;
|
if (!obj) return ERROR;
|
||||||
dprintf_region(stddeb, "GetRgnBox: %04x\n", hrgn );
|
dprintf_region(stddeb, "GetRgnBox: %04x\n", hrgn );
|
||||||
if (!obj->xrgn)
|
if (!obj->xrgn)
|
||||||
{
|
{
|
||||||
SetRectEmpty( rect );
|
SetRectEmpty16( rect );
|
||||||
return NULLREGION;
|
return NULLREGION;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
XRectangle xrect;
|
XRectangle xrect;
|
||||||
XClipBox( obj->xrgn, &xrect );
|
XClipBox( obj->xrgn, &xrect );
|
||||||
SetRect( rect, xrect.x, xrect.y,
|
SetRect16( rect, xrect.x, xrect.y,
|
||||||
xrect.x + xrect.width, xrect.y + xrect.height);
|
xrect.x + xrect.width, xrect.y + xrect.height);
|
||||||
return COMPLEXREGION;
|
return COMPLEXREGION;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CreateRectRgn (GDI.64)
|
* GetRgnBox32 (GDI32.219)
|
||||||
*/
|
*/
|
||||||
HRGN CreateRectRgn( INT left, INT top, INT right, INT bottom )
|
INT32 GetRgnBox32( HRGN32 hrgn, LPRECT32 rect )
|
||||||
|
{
|
||||||
|
RECT16 r;
|
||||||
|
INT16 ret = GetRgnBox16( hrgn, &r );
|
||||||
|
CONV_RECT16TO32( &r, rect );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CreateRectRgn (GDI.64) (GDI32.59)
|
||||||
|
*/
|
||||||
|
HRGN CreateRectRgn( INT32 left, INT32 top, INT32 right, INT32 bottom )
|
||||||
{
|
{
|
||||||
HRGN hrgn;
|
HRGN hrgn;
|
||||||
RGNOBJ *obj;
|
RGNOBJ *obj;
|
||||||
|
@ -91,18 +101,27 @@ HRGN CreateRectRgn( INT left, INT top, INT right, INT bottom )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CreateRectRgnIndirect (GDI.65)
|
* CreateRectRgnIndirect16 (GDI.65)
|
||||||
*/
|
*/
|
||||||
HRGN CreateRectRgnIndirect( const RECT* rect )
|
HRGN16 CreateRectRgnIndirect16( const RECT16* rect )
|
||||||
{
|
{
|
||||||
return CreateRectRgn( rect->left, rect->top, rect->right, rect->bottom );
|
return CreateRectRgn( rect->left, rect->top, rect->right, rect->bottom );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SetRectRgn (GDI.172)
|
* CreateRectRgnIndirect32 (GDI32.60)
|
||||||
*/
|
*/
|
||||||
void SetRectRgn( HRGN hrgn, short left, short top, short right, short bottom )
|
HRGN32 CreateRectRgnIndirect32( const RECT32* rect )
|
||||||
|
{
|
||||||
|
return CreateRectRgn( rect->left, rect->top, rect->right, rect->bottom );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SetRectRgn (GDI.172) (GDI32.332)
|
||||||
|
*/
|
||||||
|
void SetRectRgn( HRGN32 hrgn, INT32 left, INT32 top, INT32 right, INT32 bottom)
|
||||||
{
|
{
|
||||||
RGNOBJ * obj;
|
RGNOBJ * obj;
|
||||||
|
|
||||||
|
@ -122,10 +141,10 @@ void SetRectRgn( HRGN hrgn, short left, short top, short right, short bottom )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CreateRoundRectRgn (GDI.444)
|
* CreateRoundRectRgn (GDI.444) (GDI32.61)
|
||||||
*/
|
*/
|
||||||
HRGN CreateRoundRectRgn( INT left, INT top, INT right, INT bottom,
|
HRGN CreateRoundRectRgn( INT32 left, INT32 top, INT32 right, INT32 bottom,
|
||||||
INT ellipse_width, INT ellipse_height )
|
INT32 ellipse_width, INT32 ellipse_height )
|
||||||
{
|
{
|
||||||
RGNOBJ * obj;
|
RGNOBJ * obj;
|
||||||
HRGN hrgn;
|
HRGN hrgn;
|
||||||
|
@ -218,9 +237,9 @@ HRGN CreateRoundRectRgn( INT left, INT top, INT right, INT bottom,
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CreateEllipticRgn (GDI.54)
|
* CreateEllipticRgn (GDI.54) (GDI32.39)
|
||||||
*/
|
*/
|
||||||
HRGN CreateEllipticRgn( INT left, INT top, INT right, INT bottom )
|
HRGN CreateEllipticRgn( INT32 left, INT32 top, INT32 right, INT32 bottom )
|
||||||
{
|
{
|
||||||
return CreateRoundRectRgn( left, top, right, bottom,
|
return CreateRoundRectRgn( left, top, right, bottom,
|
||||||
right-left, bottom-top );
|
right-left, bottom-top );
|
||||||
|
@ -228,9 +247,9 @@ HRGN CreateEllipticRgn( INT left, INT top, INT right, INT bottom )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CreateEllipticRgnIndirect (GDI.55)
|
* CreateEllipticRgnIndirect16 (GDI.55)
|
||||||
*/
|
*/
|
||||||
HRGN CreateEllipticRgnIndirect( LPRECT rect )
|
HRGN16 CreateEllipticRgnIndirect16( const RECT16 *rect )
|
||||||
{
|
{
|
||||||
return CreateRoundRectRgn(rect->left, rect->top, rect->right, rect->bottom,
|
return CreateRoundRectRgn(rect->left, rect->top, rect->right, rect->bottom,
|
||||||
rect->right-rect->left, rect->bottom-rect->top );
|
rect->right-rect->left, rect->bottom-rect->top );
|
||||||
|
@ -238,19 +257,29 @@ HRGN CreateEllipticRgnIndirect( LPRECT rect )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CreatePolygonRgn (GDI.63)
|
* CreateEllipticRgnIndirect32 (GDI32.40)
|
||||||
*/
|
*/
|
||||||
HRGN CreatePolygonRgn( const POINT * points, INT count, INT mode )
|
HRGN32 CreateEllipticRgnIndirect32( const RECT32 *rect )
|
||||||
{
|
{
|
||||||
return CreatePolyPolygonRgn( points, &count, 1, mode );
|
return CreateRoundRectRgn(rect->left, rect->top, rect->right, rect->bottom,
|
||||||
|
rect->right-rect->left, rect->bottom-rect->top );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CreatePolyPolygonRgn (GDI.451)
|
* CreatePolygonRgn16 (GDI.63)
|
||||||
*/
|
*/
|
||||||
HRGN CreatePolyPolygonRgn( const POINT * points, const INT16 * count,
|
HRGN16 CreatePolygonRgn16( const POINT16 * points, INT16 count, INT16 mode )
|
||||||
INT nbpolygons, INT mode )
|
{
|
||||||
|
return CreatePolyPolygonRgn16( points, &count, 1, mode );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CreatePolyPolygonRgn16 (GDI.451)
|
||||||
|
*/
|
||||||
|
HRGN16 CreatePolyPolygonRgn16( const POINT16 * points, const INT16 * count,
|
||||||
|
INT16 nbpolygons, INT16 mode )
|
||||||
{
|
{
|
||||||
RGNOBJ * obj;
|
RGNOBJ * obj;
|
||||||
HRGN hrgn;
|
HRGN hrgn;
|
||||||
|
@ -314,9 +343,9 @@ HRGN CreatePolyPolygonRgn( const POINT * points, const INT16 * count,
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* PtInRegion (GDI.161)
|
* PtInRegion (GDI.161) (GDI32.278)
|
||||||
*/
|
*/
|
||||||
BOOL PtInRegion( HRGN hrgn, short x, short y )
|
BOOL PtInRegion( HRGN32 hrgn, INT32 x, INT32 y )
|
||||||
{
|
{
|
||||||
RGNOBJ * obj;
|
RGNOBJ * obj;
|
||||||
|
|
||||||
|
@ -327,9 +356,9 @@ BOOL PtInRegion( HRGN hrgn, short x, short y )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* RectInRegion (GDI.181)
|
* RectInRegion16 (GDI.181)
|
||||||
*/
|
*/
|
||||||
BOOL RectInRegion( HRGN hrgn, LPRECT rect )
|
BOOL16 RectInRegion16( HRGN16 hrgn, const RECT16 *rect )
|
||||||
{
|
{
|
||||||
RGNOBJ * obj;
|
RGNOBJ * obj;
|
||||||
|
|
||||||
|
@ -342,9 +371,24 @@ BOOL RectInRegion( HRGN hrgn, LPRECT rect )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* EqualRgn (GDI.72)
|
* RectInRegion32 (GDI32.281)
|
||||||
*/
|
*/
|
||||||
BOOL EqualRgn( HRGN rgn1, HRGN rgn2 )
|
BOOL32 RectInRegion32( HRGN32 hrgn, const RECT32 *rect )
|
||||||
|
{
|
||||||
|
RGNOBJ * obj;
|
||||||
|
|
||||||
|
if (!(obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC ))) return FALSE;
|
||||||
|
if (!obj->xrgn) return FALSE;
|
||||||
|
return (XRectInRegion( obj->xrgn, rect->left, rect->top,
|
||||||
|
rect->right-rect->left,
|
||||||
|
rect->bottom-rect->top ) != RectangleOut);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* EqualRgn (GDI.72) (GDI32.90)
|
||||||
|
*/
|
||||||
|
BOOL EqualRgn( HRGN32 rgn1, HRGN32 rgn2 )
|
||||||
{
|
{
|
||||||
RGNOBJ *obj1, *obj2;
|
RGNOBJ *obj1, *obj2;
|
||||||
if (!(obj1 = (RGNOBJ *) GDI_GetObjPtr( rgn1, REGION_MAGIC ))) return FALSE;
|
if (!(obj1 = (RGNOBJ *) GDI_GetObjPtr( rgn1, REGION_MAGIC ))) return FALSE;
|
||||||
|
@ -384,7 +428,7 @@ static int REGION_CopyRegion( RGNOBJ *src, RGNOBJ *dest )
|
||||||
*
|
*
|
||||||
* Create a region that is a frame around another region
|
* Create a region that is a frame around another region
|
||||||
*/
|
*/
|
||||||
BOOL REGION_FrameRgn( HRGN hDest, HRGN hSrc, int x, int y )
|
BOOL REGION_FrameRgn( HRGN hDest, HRGN hSrc, INT32 x, INT32 y )
|
||||||
{
|
{
|
||||||
RGNOBJ *destObj,*srcObj;
|
RGNOBJ *destObj,*srcObj;
|
||||||
Region result;
|
Region result;
|
||||||
|
@ -402,11 +446,11 @@ BOOL REGION_FrameRgn( HRGN hDest, HRGN hSrc, int x, int y )
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CombineRgn (GDI.451)
|
* CombineRgn (GDI.451) (GDI32.19)
|
||||||
*
|
*
|
||||||
* The behavior is correct even if src and dest regions are the same.
|
* The behavior is correct even if src and dest regions are the same.
|
||||||
*/
|
*/
|
||||||
INT CombineRgn( HRGN hDest, HRGN hSrc1, HRGN hSrc2, INT mode )
|
INT16 CombineRgn( HRGN32 hDest, HRGN32 hSrc1, HRGN32 hSrc2, INT32 mode )
|
||||||
{
|
{
|
||||||
RGNOBJ *destObj, *src1Obj, *src2Obj;
|
RGNOBJ *destObj, *src1Obj, *src2Obj;
|
||||||
Region destrgn;
|
Region destrgn;
|
||||||
|
|
155
objects/text.c
155
objects/text.c
|
@ -12,6 +12,7 @@
|
||||||
#include "gdi.h"
|
#include "gdi.h"
|
||||||
#include "callback.h"
|
#include "callback.h"
|
||||||
#include "metafile.h"
|
#include "metafile.h"
|
||||||
|
#include "string32.h"
|
||||||
#include "stddebug.h"
|
#include "stddebug.h"
|
||||||
/* #define DEBUG_TEXT */
|
/* #define DEBUG_TEXT */
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
@ -51,7 +52,7 @@ static const char *TEXT_NextLine( HDC hdc, const char *str, int *count,
|
||||||
int i = 0, j = 0, k;
|
int i = 0, j = 0, k;
|
||||||
int plen = 0;
|
int plen = 0;
|
||||||
int numspaces;
|
int numspaces;
|
||||||
SIZE size;
|
SIZE16 size;
|
||||||
int lasttab = 0;
|
int lasttab = 0;
|
||||||
int wb_i = 0, wb_j = 0, wb_count = 0;
|
int wb_i = 0, wb_j = 0, wb_count = 0;
|
||||||
|
|
||||||
|
@ -74,7 +75,7 @@ static const char *TEXT_NextLine( HDC hdc, const char *str, int *count,
|
||||||
if (!(format & DT_NOCLIP) || !(format & DT_NOPREFIX) ||
|
if (!(format & DT_NOCLIP) || !(format & DT_NOPREFIX) ||
|
||||||
(format & DT_WORDBREAK))
|
(format & DT_WORDBREAK))
|
||||||
{
|
{
|
||||||
if (!GetTextExtentPoint(hdc, &dest[j-1], 1, &size))
|
if (!GetTextExtentPoint16(hdc, &dest[j-1], 1, &size))
|
||||||
return NULL;
|
return NULL;
|
||||||
plen += size.cx;
|
plen += size.cx;
|
||||||
}
|
}
|
||||||
|
@ -91,7 +92,7 @@ static const char *TEXT_NextLine( HDC hdc, const char *str, int *count,
|
||||||
dest[j++] = str[i++];
|
dest[j++] = str[i++];
|
||||||
if (!(format & DT_NOCLIP) || (format & DT_WORDBREAK))
|
if (!(format & DT_NOCLIP) || (format & DT_WORDBREAK))
|
||||||
{
|
{
|
||||||
if (!GetTextExtentPoint(hdc, &dest[j-1], 1, &size))
|
if (!GetTextExtentPoint16(hdc, &dest[j-1], 1, &size))
|
||||||
return NULL;
|
return NULL;
|
||||||
plen += size.cx;
|
plen += size.cx;
|
||||||
}
|
}
|
||||||
|
@ -105,7 +106,7 @@ static const char *TEXT_NextLine( HDC hdc, const char *str, int *count,
|
||||||
wb_j = j;
|
wb_j = j;
|
||||||
wb_count = *count;
|
wb_count = *count;
|
||||||
|
|
||||||
if (!GetTextExtentPoint(hdc, &dest[lasttab], j - lasttab,
|
if (!GetTextExtentPoint16(hdc, &dest[lasttab], j - lasttab,
|
||||||
&size))
|
&size))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -121,7 +122,7 @@ static const char *TEXT_NextLine( HDC hdc, const char *str, int *count,
|
||||||
if (!(format & DT_NOCLIP) || !(format & DT_NOPREFIX) ||
|
if (!(format & DT_NOCLIP) || !(format & DT_NOPREFIX) ||
|
||||||
(format & DT_WORDBREAK))
|
(format & DT_WORDBREAK))
|
||||||
{
|
{
|
||||||
if (!GetTextExtentPoint(hdc, &dest[j-1], 1, &size))
|
if (!GetTextExtentPoint16(hdc, &dest[j-1], 1, &size))
|
||||||
return NULL;
|
return NULL;
|
||||||
plen += size.cx;
|
plen += size.cx;
|
||||||
}
|
}
|
||||||
|
@ -136,7 +137,7 @@ static const char *TEXT_NextLine( HDC hdc, const char *str, int *count,
|
||||||
wb_i = i;
|
wb_i = i;
|
||||||
wb_j = j - 1;
|
wb_j = j - 1;
|
||||||
wb_count = *count;
|
wb_count = *count;
|
||||||
if (!GetTextExtentPoint(hdc, &dest[j-1], 1, &size))
|
if (!GetTextExtentPoint16(hdc, &dest[j-1], 1, &size))
|
||||||
return NULL;
|
return NULL;
|
||||||
plen += size.cx;
|
plen += size.cx;
|
||||||
}
|
}
|
||||||
|
@ -147,7 +148,7 @@ static const char *TEXT_NextLine( HDC hdc, const char *str, int *count,
|
||||||
if (!(format & DT_NOCLIP) || !(format & DT_NOPREFIX) ||
|
if (!(format & DT_NOCLIP) || !(format & DT_NOPREFIX) ||
|
||||||
(format & DT_WORDBREAK))
|
(format & DT_WORDBREAK))
|
||||||
{
|
{
|
||||||
if (!GetTextExtentPoint(hdc, &dest[j-1], 1, &size))
|
if (!GetTextExtentPoint16(hdc, &dest[j-1], 1, &size))
|
||||||
return NULL;
|
return NULL;
|
||||||
plen += size.cx;
|
plen += size.cx;
|
||||||
}
|
}
|
||||||
|
@ -182,11 +183,12 @@ static const char *TEXT_NextLine( HDC hdc, const char *str, int *count,
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* DrawText (USER.85)
|
* DrawText16 (USER.85)
|
||||||
*/
|
*/
|
||||||
INT DrawText( HDC hdc, LPCSTR str, INT i_count, LPRECT rect, UINT flags )
|
INT16 DrawText16( HDC16 hdc, LPCSTR str, INT16 i_count,
|
||||||
|
LPRECT16 rect, UINT16 flags )
|
||||||
{
|
{
|
||||||
SIZE size;
|
SIZE16 size;
|
||||||
const char *strPtr;
|
const char *strPtr;
|
||||||
static char line[1024];
|
static char line[1024];
|
||||||
int len, lh, count=i_count;
|
int len, lh, count=i_count;
|
||||||
|
@ -214,9 +216,9 @@ INT DrawText( HDC hdc, LPCSTR str, INT i_count, LPRECT rect, UINT flags )
|
||||||
|
|
||||||
if (flags & DT_EXPANDTABS)
|
if (flags & DT_EXPANDTABS)
|
||||||
{
|
{
|
||||||
GetTextExtentPoint(hdc, " ", 1, &size);
|
GetTextExtentPoint16(hdc, " ", 1, &size);
|
||||||
spacewidth = size.cx;
|
spacewidth = size.cx;
|
||||||
GetTextExtentPoint(hdc, "o", 1, &size);
|
GetTextExtentPoint16(hdc, "o", 1, &size);
|
||||||
tabwidth = size.cx * tabstop;
|
tabwidth = size.cx * tabstop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,13 +229,13 @@ INT DrawText( HDC hdc, LPCSTR str, INT i_count, LPRECT rect, UINT flags )
|
||||||
|
|
||||||
if (prefix_offset != -1)
|
if (prefix_offset != -1)
|
||||||
{
|
{
|
||||||
GetTextExtentPoint(hdc, line, prefix_offset, &size);
|
GetTextExtentPoint16(hdc, line, prefix_offset, &size);
|
||||||
prefix_x = size.cx;
|
prefix_x = size.cx;
|
||||||
GetTextExtentPoint(hdc, line, prefix_offset + 1, &size);
|
GetTextExtentPoint16(hdc, line, prefix_offset + 1, &size);
|
||||||
prefix_end = size.cx - 1;
|
prefix_end = size.cx - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!GetTextExtentPoint(hdc, line, len, &size)) return 0;
|
if (!GetTextExtentPoint16(hdc, line, len, &size)) return 0;
|
||||||
if (flags & DT_CENTER) x = (rect->left + rect->right -
|
if (flags & DT_CENTER) x = (rect->left + rect->right -
|
||||||
size.cx) / 2;
|
size.cx) / 2;
|
||||||
else if (flags & DT_RIGHT) x = rect->right - size.cx;
|
else if (flags & DT_RIGHT) x = rect->right - size.cx;
|
||||||
|
@ -246,16 +248,16 @@ INT DrawText( HDC hdc, LPCSTR str, INT i_count, LPRECT rect, UINT flags )
|
||||||
}
|
}
|
||||||
if (!(flags & DT_CALCRECT))
|
if (!(flags & DT_CALCRECT))
|
||||||
{
|
{
|
||||||
if (!ExtTextOut( hdc, x, y, (flags & DT_NOCLIP) ? 0 : ETO_CLIPPED,
|
if (!ExtTextOut16(hdc, x, y, (flags & DT_NOCLIP) ? 0 : ETO_CLIPPED,
|
||||||
rect, line, len, NULL )) return 0;
|
rect, line, len, NULL )) return 0;
|
||||||
}
|
}
|
||||||
else if (size.cx > max_width)
|
else if (size.cx > max_width)
|
||||||
max_width = size.cx;
|
max_width = size.cx;
|
||||||
|
|
||||||
if (prefix_offset != -1)
|
if (prefix_offset != -1)
|
||||||
{
|
{
|
||||||
HPEN hpen = CreatePen( PS_SOLID, 1, GetTextColor(hdc) );
|
HPEN16 hpen = CreatePen( PS_SOLID, 1, GetTextColor(hdc) );
|
||||||
HPEN oldPen = SelectObject( hdc, hpen );
|
HPEN16 oldPen = SelectObject( hdc, hpen );
|
||||||
MoveTo(hdc, x + prefix_x, y + tm.tmAscent + 1 );
|
MoveTo(hdc, x + prefix_x, y + tm.tmAscent + 1 );
|
||||||
LineTo(hdc, x + prefix_end, y + tm.tmAscent + 1 );
|
LineTo(hdc, x + prefix_end, y + tm.tmAscent + 1 );
|
||||||
SelectObject( hdc, oldPen );
|
SelectObject( hdc, oldPen );
|
||||||
|
@ -283,15 +285,47 @@ INT DrawText( HDC hdc, LPCSTR str, INT i_count, LPRECT rect, UINT flags )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* ExtTextOut (GDI.351)
|
* DrawText32A (USER32.163)
|
||||||
*/
|
*/
|
||||||
BOOL ExtTextOut( HDC hdc, short x, short y, WORD flags, LPRECT lprect,
|
INT32 DrawText32A( HDC32 hdc, LPCSTR str, INT32 count,
|
||||||
LPSTR str, WORD count, LPINT16 lpDx )
|
LPRECT32 rect, UINT32 flags )
|
||||||
|
{
|
||||||
|
RECT16 rect16;
|
||||||
|
INT16 ret;
|
||||||
|
|
||||||
|
if (!rect)
|
||||||
|
return DrawText16( (HDC16)hdc, str, (INT16)count, NULL, (UINT16)flags);
|
||||||
|
CONV_RECT32TO16( rect, &rect16 );
|
||||||
|
ret = DrawText16( (HDC16)hdc, str, (INT16)count, &rect16, (UINT16)flags );
|
||||||
|
CONV_RECT16TO32( &rect16, rect );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* DrawText32W (USER32.166)
|
||||||
|
*/
|
||||||
|
INT32 DrawText32W( HDC32 hdc, LPCWSTR str, INT32 count,
|
||||||
|
LPRECT32 rect, UINT32 flags )
|
||||||
|
{
|
||||||
|
char *p = STRING32_DupUniToAnsi( str );
|
||||||
|
INT32 ret = DrawText32A( hdc, p, count, rect, flags );
|
||||||
|
free(p);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* ExtTextOut16 (GDI.351)
|
||||||
|
*/
|
||||||
|
BOOL16 ExtTextOut16( HDC16 hdc, INT16 x, INT16 y, UINT16 flags,
|
||||||
|
const RECT16 *lprect, LPCSTR str, UINT16 count,
|
||||||
|
const INT16 *lpDx )
|
||||||
{
|
{
|
||||||
int dir, ascent, descent, i;
|
int dir, ascent, descent, i;
|
||||||
XCharStruct info;
|
XCharStruct info;
|
||||||
XFontStruct *font;
|
XFontStruct *font;
|
||||||
RECT rect;
|
RECT16 rect;
|
||||||
|
|
||||||
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
||||||
if (!dc)
|
if (!dc)
|
||||||
|
@ -421,7 +455,7 @@ BOOL ExtTextOut( HDC hdc, short x, short y, WORD flags, LPRECT lprect,
|
||||||
items = xmalloc( count * sizeof(XTextItem) );
|
items = xmalloc( count * sizeof(XTextItem) );
|
||||||
for (i = 0, pitem = items; i < count; i++, pitem++)
|
for (i = 0, pitem = items; i < count; i++, pitem++)
|
||||||
{
|
{
|
||||||
pitem->chars = str + i;
|
pitem->chars = (char *)str + i;
|
||||||
pitem->nchars = 1;
|
pitem->nchars = 1;
|
||||||
pitem->font = None;
|
pitem->font = None;
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
|
@ -434,7 +468,7 @@ BOOL ExtTextOut( HDC hdc, short x, short y, WORD flags, LPRECT lprect,
|
||||||
pitem->delta += dc->w.breakExtra;
|
pitem->delta += dc->w.breakExtra;
|
||||||
if (lpDx)
|
if (lpDx)
|
||||||
{
|
{
|
||||||
INT width;
|
INT16 width;
|
||||||
GetCharWidth( hdc, str[i], str[i], &width );
|
GetCharWidth( hdc, str[i], str[i], &width );
|
||||||
pitem->delta += lpDx[i-1] - width;
|
pitem->delta += lpDx[i-1] - width;
|
||||||
}
|
}
|
||||||
|
@ -479,11 +513,62 @@ BOOL ExtTextOut( HDC hdc, short x, short y, WORD flags, LPRECT lprect,
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* TextOut (GDI.33)
|
* ExtTextOut32A (GDI32.98)
|
||||||
*/
|
*/
|
||||||
BOOL TextOut( HDC hdc, short x, short y, LPSTR str, short count )
|
BOOL32 ExtTextOut32A( HDC32 hdc, INT32 x, INT32 y, UINT32 flags,
|
||||||
|
const RECT32 *lprect, LPCSTR str, UINT32 count,
|
||||||
|
const INT32 *lpDx )
|
||||||
{
|
{
|
||||||
return ExtTextOut( hdc, x, y, 0, NULL, str, count, NULL );
|
RECT16 rect16;
|
||||||
|
|
||||||
|
if (lpDx) fprintf( stderr, "ExtTextOut32A: lpDx not implemented\n" );
|
||||||
|
if (!lprect)
|
||||||
|
return ExtTextOut16( (HDC16)hdc, (INT16)x, (INT16)y, (UINT16)flags,
|
||||||
|
NULL, str, (UINT16)count, NULL );
|
||||||
|
CONV_RECT32TO16( lprect, &rect16 );
|
||||||
|
return ExtTextOut16( (HDC16)hdc, (INT16)x, (INT16)y, (UINT16)flags,
|
||||||
|
&rect16, str, (UINT16)count, NULL );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* ExtTextOut32W (GDI32.99)
|
||||||
|
*/
|
||||||
|
BOOL32 ExtTextOut32W( HDC32 hdc, INT32 x, INT32 y, UINT32 flags,
|
||||||
|
const RECT32 *lprect, LPCWSTR str, UINT32 count,
|
||||||
|
const INT32 *lpDx )
|
||||||
|
{
|
||||||
|
char *p = STRING32_DupUniToAnsi( str );
|
||||||
|
INT32 ret = ExtTextOut32A( hdc, x, y, flags, lprect, p, count, lpDx );
|
||||||
|
free(p);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* TextOut16 (GDI.33)
|
||||||
|
*/
|
||||||
|
BOOL16 TextOut16( HDC16 hdc, INT16 x, INT16 y, LPCSTR str, INT16 count )
|
||||||
|
{
|
||||||
|
return ExtTextOut16( hdc, x, y, 0, NULL, str, count, NULL );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* TextOut32A (GDI32.355)
|
||||||
|
*/
|
||||||
|
BOOL32 TextOut32A( HDC32 hdc, INT32 x, INT32 y, LPCSTR str, INT32 count )
|
||||||
|
{
|
||||||
|
return ExtTextOut32A( hdc, x, y, 0, NULL, str, count, NULL );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* TextOut32W (GDI32.356)
|
||||||
|
*/
|
||||||
|
BOOL32 TextOut32W( HDC32 hdc, INT32 x, INT32 y, LPCWSTR str, INT32 count )
|
||||||
|
{
|
||||||
|
return ExtTextOut32W( hdc, x, y, 0, NULL, str, count, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -501,8 +586,8 @@ BOOL GrayString(HDC hdc, HBRUSH hbr, FARPROC gsprc, LPARAM lParam,
|
||||||
} else {
|
} else {
|
||||||
current_color = GetTextColor(hdc);
|
current_color = GetTextColor(hdc);
|
||||||
SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT) );
|
SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT) );
|
||||||
s = TextOut(hdc, x, y, (LPSTR) lParam,
|
s = TextOut16(hdc, x, y, (LPSTR) lParam,
|
||||||
cch ? cch : lstrlen((LPCSTR) lParam) );
|
cch ? cch : lstrlen((LPCSTR) lParam) );
|
||||||
SetTextColor(hdc, current_color);
|
SetTextColor(hdc, current_color);
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
|
@ -556,11 +641,11 @@ LONG TEXT_TabbedTextOut( HDC hdc, int x, int y, LPSTR lpstr, int count,
|
||||||
tabPos = nTabOrg + ((x + LOWORD(extent) - nTabOrg) / defWidth + 1) * defWidth;
|
tabPos = nTabOrg + ((x + LOWORD(extent) - nTabOrg) / defWidth + 1) * defWidth;
|
||||||
if (fDisplayText)
|
if (fDisplayText)
|
||||||
{
|
{
|
||||||
RECT r;
|
RECT16 r;
|
||||||
SetRect( &r, x, y, tabPos, y+HIWORD(extent) );
|
SetRect16( &r, x, y, tabPos, y+HIWORD(extent) );
|
||||||
ExtTextOut( hdc, x, y,
|
ExtTextOut16( hdc, x, y,
|
||||||
GetBkMode(hdc) == OPAQUE ? ETO_OPAQUE : 0,
|
GetBkMode(hdc) == OPAQUE ? ETO_OPAQUE : 0,
|
||||||
&r, lpstr, i, NULL );
|
&r, lpstr, i, NULL );
|
||||||
}
|
}
|
||||||
x = tabPos;
|
x = tabPos;
|
||||||
count -= i+1;
|
count -= i+1;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue