Release 961013
Sun Oct 13 15:32:32 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [Make.rules.in] [*/Makefile.in] Made it possible to compile from a directory other than the source directory. * [graphics/metafiledrv/init.c] [include/metafiledrv.h] [objects/metafile.c] [objects/dc.c] New graphics driver for metafiles. * [if1632/thunk.c] Added thunks for SetWindowsHook and SetDCHook. * [windows/dialog.c] Fixed GetNextDlgGroupItem and GetNextDlgTabItem to skip disabled items. * [*/*] Removed non Win32-clean types HANDLE, HBITMAP, HBRUSH, HFONT, HINSTANCE, HMENU, HRGN and HTASK. Wed Oct 9 14:59:45 1996 Frans van Dorsselaer <dorssel@rulhm1.LeidenUniv.nl> * [controls/edit.c] Fixed EditWndProc() to fall back to DefWndProc() when the edit state structure is not available. Wed Oct 2 14:00:34 1996 Huw D. M. Davies <h.davies1@physics.oxford.ac.uk> * [windows/nonclient.c] [windows/mdi.c] AdjustWindowRectEx16() should only take notice of the styles WS_DLGFRAME, WS_BORDER, WS_THICKFRAME and WS_EX_DLGMODALFRAME. Thanks to Alex Korobka. * [controls/scroll.c] Fixed typo in ShowScrollBar32(). Sun Aug 25 20:18:56 1996 Jukka Iivonen <iivonen@cc.helsinki.fi> * [if1632/user32.spec] [if1632/winmm.spec] Added SetParent and sndPlaySoundA.
This commit is contained in:
parent
2c69f6d8e9
commit
bf9130af10
17
ANNOUNCE
17
ANNOUNCE
|
@ -1,14 +1,13 @@
|
|||
This is release 960928 of Wine, the MS Windows emulator. This is still a
|
||||
This is release 961013 of Wine, the MS Windows emulator. This is still a
|
||||
developer's only release. There are many bugs and many unimplemented API
|
||||
features. Most applications still do not work correctly.
|
||||
|
||||
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
|
||||
forget to include a ChangeLog entry.
|
||||
|
||||
WHAT'S NEW with Wine-960928: (see ChangeLog for details)
|
||||
- Intertask messaging improved.
|
||||
- Many painting fixes.
|
||||
- Still more Win32 support.
|
||||
WHAT'S NEW with Wine-961013: (see ChangeLog for details)
|
||||
- Several non Win32-clean data types removed.
|
||||
- Graphics driver for metafiles.
|
||||
- Lots of bug fixes.
|
||||
|
||||
See the README file in the distribution for installation instructions.
|
||||
|
@ -17,10 +16,10 @@ Because of lags created by using mirror, this message may reach you before
|
|||
the release is available at the ftp sites. The sources will be available
|
||||
from the following locations:
|
||||
|
||||
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-960928.tar.gz
|
||||
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-960928.tar.gz
|
||||
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-960928.tar.gz
|
||||
ftp://aris.com/pub/linux/ALPHA/Wine/development/Wine-960928.tar.gz
|
||||
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-961013.tar.gz
|
||||
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-961013.tar.gz
|
||||
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-961013.tar.gz
|
||||
ftp://aris.com/pub/linux/ALPHA/Wine/development/Wine-961013.tar.gz
|
||||
|
||||
It should also be available from any site that mirrors tsx-11 or sunsite.
|
||||
|
||||
|
|
43
ChangeLog
43
ChangeLog
|
@ -1,3 +1,46 @@
|
|||
----------------------------------------------------------------------
|
||||
Sun Oct 13 15:32:32 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
|
||||
|
||||
* [Make.rules.in] [*/Makefile.in]
|
||||
Made it possible to compile from a directory other than the source
|
||||
directory.
|
||||
|
||||
* [graphics/metafiledrv/init.c] [include/metafiledrv.h]
|
||||
[objects/metafile.c] [objects/dc.c]
|
||||
New graphics driver for metafiles.
|
||||
|
||||
* [if1632/thunk.c]
|
||||
Added thunks for SetWindowsHook and SetDCHook.
|
||||
|
||||
* [windows/dialog.c]
|
||||
Fixed GetNextDlgGroupItem and GetNextDlgTabItem to skip disabled
|
||||
items.
|
||||
|
||||
* [*/*]
|
||||
Removed non Win32-clean types HANDLE, HBITMAP, HBRUSH, HFONT,
|
||||
HINSTANCE, HMENU, HRGN and HTASK.
|
||||
|
||||
Wed Oct 9 14:59:45 1996 Frans van Dorsselaer <dorssel@rulhm1.LeidenUniv.nl>
|
||||
|
||||
* [controls/edit.c]
|
||||
Fixed EditWndProc() to fall back to DefWndProc() when the
|
||||
edit state structure is not available.
|
||||
|
||||
Wed Oct 2 14:00:34 1996 Huw D. M. Davies <h.davies1@physics.oxford.ac.uk>
|
||||
|
||||
* [windows/nonclient.c] [windows/mdi.c]
|
||||
AdjustWindowRectEx16() should only take notice of the styles
|
||||
WS_DLGFRAME, WS_BORDER, WS_THICKFRAME and
|
||||
WS_EX_DLGMODALFRAME. Thanks to Alex Korobka.
|
||||
|
||||
* [controls/scroll.c]
|
||||
Fixed typo in ShowScrollBar32().
|
||||
|
||||
Sun Aug 25 20:18:56 1996 Jukka Iivonen <iivonen@cc.helsinki.fi>
|
||||
|
||||
* [if1632/user32.spec] [if1632/winmm.spec]
|
||||
Added SetParent and sndPlaySoundA.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Fri Sep 27 14:18:42 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
|
||||
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
# Global rules shared by all makefiles
|
||||
# The makefile must define at least TOPSRC and MODULE
|
||||
#
|
||||
# Each individual makefile should define the following variables:
|
||||
# TOPSRCDIR : top-level source directory
|
||||
# TOPOBJDIR : top-level object directory
|
||||
# SRCDIR : source directory for this module
|
||||
# MODULE : name of the module being built
|
||||
# C_SRCS : C sources for the module
|
||||
# GEN_C_SRCS : generated C sources (optional)
|
||||
# ASM_SRCS : assembly sources (optional)
|
||||
# EXTRA_OBJS : extra object files (optional)
|
||||
|
||||
# First some useful definitions
|
||||
|
||||
|
@ -10,24 +19,24 @@ CFLAGS = @CFLAGS@
|
|||
OPTIONS = @OPTIONS@
|
||||
X_CFLAGS = @X_CFLAGS@
|
||||
X_LIBS = @X_LIBS@
|
||||
XPM_LIB = -lXpm
|
||||
XLIB = @X_PRE_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@
|
||||
WINELIB = -L$(TOPSRC) -lwine
|
||||
LDLIBS = @LDLIBS@
|
||||
XPM_LIB = -lXpm
|
||||
XLIB = @X_PRE_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@
|
||||
WINELIB = -L$(TOPOBJDIR) -lwine
|
||||
LDLIBS = @LDLIBS@
|
||||
YACC = @YACC@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
DIVINCL = -I$(TOPSRC)/include
|
||||
DIVINCL = -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include -I.
|
||||
ALLCFLAGS = $(CFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL) $(X_CFLAGS)
|
||||
LDCOMBINE = ld -r
|
||||
RM = rm -f
|
||||
BUILD = $(TOPSRC)/tools/build
|
||||
WINERC = $(TOPSRC)/rc/winerc
|
||||
BUILD = $(TOPOBJDIR)/tools/build
|
||||
WINERC = $(TOPOBJDIR)/rc/winerc
|
||||
SUBMAKE = $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'OPTIONS=$(OPTIONS)'
|
||||
@SET_MAKE@
|
||||
|
||||
OBJS = $(C_SRCS:.c=.o) $(ASM_SRCS:.S=.o) $(EXTRA_OBJS)
|
||||
|
||||
OBJS = $(C_SRCS:.c=.o) $(GEN_C_SRCS:.c=.o) $(ASM_SRCS:.S=.o) $(EXTRA_OBJS)
|
||||
DEPEND_SRCS = $(C_SRCS:%=$(SRCDIR)/%) $(GEN_C_SRCS:%=./%)
|
||||
|
||||
# Implicit rules
|
||||
|
||||
|
@ -43,21 +52,21 @@ OBJS = $(C_SRCS:.c=.o) $(ASM_SRCS:.S=.o) $(EXTRA_OBJS)
|
|||
echo "#include \"windows.h\"" >winerctmp.c
|
||||
echo WINDOWS_H_ENDS_HERE >>winerctmp.c
|
||||
cat $< >>winerctmp.c
|
||||
$(CPP) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P winerctmp.c | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | $(WINERC) -c -o $* -p $*
|
||||
$(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P winerctmp.c | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | $(WINERC) -c -o $* -p $*
|
||||
$(RM) winerctmp.c
|
||||
|
||||
.rc.h:
|
||||
echo "#include \"windows.h\"" >winerctmp.c
|
||||
echo WINDOWS_H_ENDS_HERE >>winerctmp.c
|
||||
cat $< >>winerctmp.c
|
||||
$(CPP) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P winerctmp.c | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | $(WINERC) -c -o $* -p $*
|
||||
$(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P winerctmp.c | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | $(WINERC) -c -o $* -p $*
|
||||
$(RM) winerctmp.c
|
||||
|
||||
|
||||
# Rule to rebuild resource compiler
|
||||
|
||||
$(WINERC) check_winerc:
|
||||
cd $(TOPSRC)/rc; $(SUBMAKE) winerc
|
||||
cd $(TOPOBJDIR)/rc; $(SUBMAKE) winerc
|
||||
|
||||
|
||||
# Rule for main module
|
||||
|
@ -68,13 +77,13 @@ $(MODULE).o: $(OBJS)
|
|||
|
||||
# Misc. rules
|
||||
|
||||
depend:: $(C_SRCS)
|
||||
depend:: $(C_SRCS) $(GEN_C_SRCS)
|
||||
sed '/\#\#\# Dependencies/q' < Makefile > tmp_make
|
||||
$(CC) $(ALLCFLAGS) -MM $(C_SRCS) >> tmp_make
|
||||
$(CC) $(ALLCFLAGS) -MM $(DEPEND_SRCS) >> tmp_make
|
||||
mv tmp_make Makefile
|
||||
|
||||
clean::
|
||||
$(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc tmp_make winerctmp.c
|
||||
$(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc tmp_make winerctmp.c $(GEN_C_SRCS)
|
||||
|
||||
dummy:
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ COMMONSUBDIRS = \
|
|||
controls \
|
||||
files \
|
||||
graphics \
|
||||
graphics/metafiledrv \
|
||||
graphics/x11drv \
|
||||
ipc \
|
||||
loader \
|
||||
|
@ -75,6 +76,7 @@ COMMONOBJS = \
|
|||
controls/controls.o \
|
||||
files/files.o \
|
||||
graphics/graphics.o \
|
||||
graphics/metafiledrv/metafiledrv.o \
|
||||
graphics/x11drv/x11drv.o \
|
||||
ipc/ipc.o \
|
||||
loader/loader.o \
|
||||
|
|
|
@ -2066,6 +2066,7 @@ controls/Makefile
|
|||
debugger/Makefile
|
||||
files/Makefile
|
||||
graphics/Makefile
|
||||
graphics/metafiledrv/Makefile
|
||||
graphics/win16drv/Makefile
|
||||
graphics/x11drv/Makefile
|
||||
if1632/Makefile
|
||||
|
@ -2144,6 +2145,7 @@ controls/Makefile
|
|||
debugger/Makefile
|
||||
files/Makefile
|
||||
graphics/Makefile
|
||||
graphics/metafiledrv/Makefile
|
||||
graphics/win16drv/Makefile
|
||||
graphics/x11drv/Makefile
|
||||
if1632/Makefile
|
||||
|
|
|
@ -104,6 +104,7 @@ controls/Makefile
|
|||
debugger/Makefile
|
||||
files/Makefile
|
||||
graphics/Makefile
|
||||
graphics/metafiledrv/Makefile
|
||||
graphics/win16drv/Makefile
|
||||
graphics/x11drv/Makefile
|
||||
if1632/Makefile
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
DEFS = -D__WINE__
|
||||
TOPSRC = @top_srcdir@
|
||||
MODULE = controls
|
||||
DEFS = -D__WINE__
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = controls
|
||||
|
||||
C_SRCS = \
|
||||
button.c \
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "button.h"
|
||||
|
||||
static void PB_Paint( WND *wndPtr, HDC32 hDC, WORD action );
|
||||
static void PB_PaintGrayOnGray(HDC32 hDC,HFONT hFont,RECT32 *rc,char *text);
|
||||
static void PB_PaintGrayOnGray(HDC32 hDC,HFONT32 hFont,RECT32 *rc,char *text);
|
||||
static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action );
|
||||
static void GB_Paint( WND *wndPtr, HDC32 hDC, WORD action );
|
||||
static void UB_Paint( WND *wndPtr, HDC32 hDC, WORD action );
|
||||
|
@ -64,7 +64,7 @@ static const pfPaint btnPaintFunc[MAX_BTN_TYPE] =
|
|||
SendMessage32A( GetParent32((wndPtr)->hwndSelf), WM_CTLCOLORBTN, \
|
||||
(hdc), (wndPtr)->hwndSelf )
|
||||
|
||||
static HBITMAP hbitmapCheckBoxes = 0;
|
||||
static HBITMAP16 hbitmapCheckBoxes = 0;
|
||||
static WORD checkBoxWidth = 0, checkBoxHeight = 0;
|
||||
|
||||
|
||||
|
@ -173,7 +173,7 @@ LRESULT ButtonWndProc(HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
|
|||
return 0;
|
||||
|
||||
case WM_SETFONT:
|
||||
infoPtr->hFont = (HFONT) wParam;
|
||||
infoPtr->hFont = (HFONT16)wParam;
|
||||
if (lParam) PAINT_BUTTON( wndPtr, style, ODA_DRAWENTIRE );
|
||||
break;
|
||||
|
||||
|
@ -253,7 +253,7 @@ static void PB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
|||
{
|
||||
RECT32 rc;
|
||||
HPEN16 hOldPen;
|
||||
HBRUSH hOldBrush;
|
||||
HBRUSH16 hOldBrush;
|
||||
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
||||
|
||||
GetClientRect32( wndPtr->hwndSelf, &rc );
|
||||
|
@ -262,7 +262,7 @@ static void PB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
|||
if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont );
|
||||
BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
|
||||
hOldPen = (HPEN16)SelectObject(hDC, sysColorObjects.hpenWindowFrame);
|
||||
hOldBrush = (HBRUSH)SelectObject(hDC, sysColorObjects.hbrushBtnFace);
|
||||
hOldBrush = (HBRUSH16)SelectObject(hDC, sysColorObjects.hbrushBtnFace);
|
||||
SetBkMode(hDC, TRANSPARENT);
|
||||
Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
|
||||
if (action == ODA_DRAWENTIRE)
|
||||
|
@ -334,13 +334,13 @@ static void PB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
|||
* using a raster brush to avoid gray text on gray background
|
||||
*/
|
||||
|
||||
void PB_PaintGrayOnGray(HDC32 hDC,HFONT hFont,RECT32 *rc,char *text)
|
||||
void PB_PaintGrayOnGray(HDC32 hDC,HFONT32 hFont,RECT32 *rc,char *text)
|
||||
{
|
||||
static int Pattern[] = {0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55};
|
||||
HBITMAP hbm = CreateBitmap(8, 8, 1, 1, Pattern);
|
||||
HBITMAP16 hbm = CreateBitmap(8, 8, 1, 1, Pattern);
|
||||
HDC hdcMem = CreateCompatibleDC(hDC);
|
||||
HBITMAP hbmMem;
|
||||
HBRUSH hBr;
|
||||
HBITMAP16 hbmMem;
|
||||
HBRUSH16 hBr;
|
||||
RECT32 rect,rc2;
|
||||
|
||||
rect=*rc;
|
||||
|
@ -370,7 +370,7 @@ void PB_PaintGrayOnGray(HDC32 hDC,HFONT hFont,RECT32 *rc,char *text)
|
|||
static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
||||
{
|
||||
RECT16 rc;
|
||||
HBRUSH hBrush;
|
||||
HBRUSH16 hBrush;
|
||||
int textlen, delta, x, y;
|
||||
TEXTMETRIC16 tm;
|
||||
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
||||
|
@ -431,12 +431,12 @@ static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
|||
*/
|
||||
static void BUTTON_CheckAutoRadioButton( WND *wndPtr )
|
||||
{
|
||||
HWND parent, sibling;
|
||||
HWND32 parent, sibling;
|
||||
if (!(wndPtr->dwStyle & WS_CHILD)) return;
|
||||
parent = wndPtr->parent->hwndSelf;
|
||||
for(sibling = GetNextDlgGroupItem(parent,wndPtr->hwndSelf,FALSE);
|
||||
for(sibling = GetNextDlgGroupItem32( parent, wndPtr->hwndSelf, FALSE );
|
||||
sibling != wndPtr->hwndSelf;
|
||||
sibling = GetNextDlgGroupItem(parent,sibling,FALSE))
|
||||
sibling = GetNextDlgGroupItem32( parent, sibling, FALSE ))
|
||||
SendMessage32A( sibling, BM_SETCHECK32, BUTTON_UNCHECKED, 0 );
|
||||
}
|
||||
|
||||
|
@ -479,7 +479,7 @@ static void GB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
|||
static void UB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
|
||||
{
|
||||
RECT16 rc;
|
||||
HBRUSH hBrush;
|
||||
HBRUSH16 hBrush;
|
||||
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
|
||||
|
||||
if (action == ODA_SELECT) return;
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
static BOOL CBCheckSize(HWND hwnd);
|
||||
static BOOL CBLCheckSize(HWND hwnd);
|
||||
|
||||
static HBITMAP hComboBit = 0;
|
||||
static HBITMAP16 hComboBit = 0;
|
||||
static WORD CBitHeight, CBitWidth;
|
||||
|
||||
static int COMBO_Init()
|
||||
|
@ -175,7 +175,7 @@ static LRESULT CBCreate(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE | ES_LEFT,
|
||||
0, 0, rect.right-6-CBitWidth,
|
||||
lphl->StdItemHeight+2*SYSMETRICS_CYBORDER,
|
||||
hwnd, (HMENU)ID_EDIT, WIN_GetWindowInstance(hwnd), NULL );
|
||||
hwnd, (HMENU16)ID_EDIT, WIN_GetWindowInstance(hwnd), NULL );
|
||||
|
||||
lboxrect.top+=lphc->LBoxTop;
|
||||
lphc->hWndLBox = CreateWindow16( className, NULL, style |
|
||||
|
@ -184,7 +184,7 @@ static LRESULT CBCreate(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
lboxrect.left, lboxrect.top,
|
||||
lboxrect.right - lboxrect.left,
|
||||
lboxrect.bottom - lboxrect.top,
|
||||
hwndp,(HMENU)ID_CLB, WIN_GetWindowInstance(hwnd),
|
||||
hwndp,(HMENU16)ID_CLB, WIN_GetWindowInstance(hwnd),
|
||||
(LPVOID)(HWND32)hwnd );
|
||||
|
||||
wndPtr->dwStyle &= ~(WS_VSCROLL | WS_HSCROLL);
|
||||
|
@ -224,8 +224,8 @@ static LRESULT CBPaint(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
|
||||
LPLISTSTRUCT lpls;
|
||||
PAINTSTRUCT16 ps;
|
||||
HBRUSH hBrush;
|
||||
HFONT hOldFont;
|
||||
HBRUSH16 hBrush;
|
||||
HFONT16 hOldFont;
|
||||
HDC16 hdc;
|
||||
RECT16 rect;
|
||||
|
||||
|
@ -558,7 +558,7 @@ static LRESULT CBSetFont(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
if (wParam == 0)
|
||||
lphl->hFont = GetStockObject(SYSTEM_FONT);
|
||||
else
|
||||
lphl->hFont = (HFONT)wParam;
|
||||
lphl->hFont = (HFONT16)wParam;
|
||||
if (lphc->hWndEdit)
|
||||
SendMessage16(lphc->hWndEdit,WM_SETFONT,lphl->hFont,0);
|
||||
return 0;
|
||||
|
@ -914,8 +914,8 @@ static LRESULT CBLPaint( HWND hwnd, WPARAM wParam, LPARAM lParam )
|
|||
LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
|
||||
LPLISTSTRUCT lpls;
|
||||
PAINTSTRUCT16 ps;
|
||||
HBRUSH hBrush;
|
||||
HFONT hOldFont;
|
||||
HBRUSH16 hBrush;
|
||||
HFONT16 hOldFont;
|
||||
WND * wndPtr = WIN_FindWndPtr(hwnd);
|
||||
HWND combohwnd = CLBoxGetCombo(hwnd);
|
||||
HDC16 hdc;
|
||||
|
|
|
@ -49,7 +49,7 @@ typedef struct
|
|||
UINT TextWidth; /* width of the widest line in pixels */
|
||||
HLOCAL16 hBuf;
|
||||
char *text;
|
||||
HFONT hFont;
|
||||
HFONT16 hFont;
|
||||
LINEDEF *LineDefs;
|
||||
UINT XOffset; /* offset of the viewport in pixels */
|
||||
UINT FirstVisibleLine;
|
||||
|
@ -240,6 +240,9 @@ LRESULT EditWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
LRESULT lResult = 0L;
|
||||
WND *wndPtr = WIN_FindWndPtr(hwnd);
|
||||
|
||||
if ((!EDITSTATEPTR(wndPtr)) && (msg != WM_CREATE))
|
||||
return DefWindowProc16(hwnd, msg, wParam, lParam);
|
||||
|
||||
switch (msg) {
|
||||
case EM_CANUNDO:
|
||||
DPRINTF_EDIT_MSG("EM_CANUNDO");
|
||||
|
@ -504,8 +507,8 @@ static void EDIT_BuildLineDefs(WND *wndPtr)
|
|||
char *text = EDIT_GetPasswordPointer(wndPtr);
|
||||
int ww = EDIT_GetWndWidth(wndPtr);
|
||||
HDC32 hdc;
|
||||
HFONT hFont;
|
||||
HFONT oldFont = 0;
|
||||
HFONT16 hFont;
|
||||
HFONT16 oldFont = 0;
|
||||
char *start, *cp;
|
||||
int prev, next;
|
||||
int width;
|
||||
|
@ -513,7 +516,7 @@ static void EDIT_BuildLineDefs(WND *wndPtr)
|
|||
LINE_END ending;
|
||||
|
||||
hdc = GetDC32(wndPtr->hwndSelf);
|
||||
hFont = (HFONT)EDIT_WM_GetFont(wndPtr, 0, 0L);
|
||||
hFont = (HFONT16)EDIT_WM_GetFont(wndPtr, 0, 0L);
|
||||
if (hFont)
|
||||
oldFont = SelectObject(hdc, hFont);
|
||||
|
||||
|
@ -1442,15 +1445,15 @@ static INT EDIT_WndXFromCol(WND *wndPtr, UINT line, UINT col)
|
|||
char *text = EDIT_GetPasswordPointer(wndPtr);
|
||||
INT ret;
|
||||
HDC32 hdc;
|
||||
HFONT hFont;
|
||||
HFONT oldFont = 0;
|
||||
HFONT16 hFont;
|
||||
HFONT16 oldFont = 0;
|
||||
UINT lc = (UINT)EDIT_EM_GetLineCount(wndPtr, 0, 0L);
|
||||
UINT li = (UINT)EDIT_EM_LineIndex(wndPtr, line, 0L);
|
||||
UINT ll = (UINT)EDIT_EM_LineLength(wndPtr, li, 0L);
|
||||
UINT xoff = EDIT_GetXOffset(wndPtr);
|
||||
|
||||
hdc = GetDC32(wndPtr->hwndSelf);
|
||||
hFont = (HFONT)EDIT_WM_GetFont(wndPtr, 0, 0L);
|
||||
hFont = (HFONT16)EDIT_WM_GetFont(wndPtr, 0, 0L);
|
||||
if (hFont)
|
||||
oldFont = SelectObject(hdc, hFont);
|
||||
line = MAX(0, MIN(line, lc - 1));
|
||||
|
@ -2311,12 +2314,12 @@ static LRESULT EDIT_WM_Enable(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
|||
*/
|
||||
static LRESULT EDIT_WM_EraseBkGnd(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HBRUSH hBrush;
|
||||
HBRUSH16 hBrush;
|
||||
RECT16 rc;
|
||||
|
||||
hBrush = (HBRUSH)EDIT_SEND_CTLCOLOR(wndPtr, wParam);
|
||||
hBrush = (HBRUSH16)EDIT_SEND_CTLCOLOR(wndPtr, wParam);
|
||||
if (!hBrush)
|
||||
hBrush = (HBRUSH)GetStockObject(WHITE_BRUSH);
|
||||
hBrush = (HBRUSH16)GetStockObject(WHITE_BRUSH);
|
||||
|
||||
GetClientRect16(wndPtr->hwndSelf, &rc);
|
||||
IntersectClipRect((HDC)wParam, rc.left, rc.top, rc.right, rc.bottom);
|
||||
|
@ -2678,8 +2681,8 @@ static LRESULT EDIT_WM_Paint(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
|||
UINT vlc = EDIT_GetVisibleLineCount(wndPtr);
|
||||
UINT lc = (UINT)EDIT_EM_GetLineCount(wndPtr, 0, 0L);
|
||||
HDC16 hdc;
|
||||
HFONT hFont;
|
||||
HFONT oldFont = 0;
|
||||
HFONT16 hFont;
|
||||
HFONT16 oldFont = 0;
|
||||
RECT16 rc;
|
||||
RECT16 rcLine;
|
||||
RECT16 rcRgn;
|
||||
|
@ -2776,9 +2779,9 @@ static LRESULT EDIT_WM_SetFont(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
|||
EDITSTATE *es = EDITSTATEPTR(wndPtr);
|
||||
LPARAM sel = EDIT_EM_GetSel(wndPtr, 0, 0L);
|
||||
HDC32 hdc;
|
||||
HFONT oldFont = 0;
|
||||
HFONT16 oldFont = 0;
|
||||
|
||||
es->hFont = (HFONT)wParam;
|
||||
es->hFont = (HFONT16)wParam;
|
||||
hdc = GetDC32(wndPtr->hwndSelf);
|
||||
if (es->hFont)
|
||||
oldFont = SelectObject(hdc, es->hFont);
|
||||
|
|
|
@ -430,7 +430,7 @@ int ListBoxAskCompare(LPHEADLIST lphl, int startItem, SEGPTR matchData, BOOL exa
|
|||
int ListBoxInsertString(LPHEADLIST lphl, UINT uIndex, LPCSTR newstr)
|
||||
{
|
||||
LPLISTSTRUCT *lppls, lplsnew, lpls;
|
||||
HANDLE hStr;
|
||||
HANDLE16 hStr;
|
||||
LPSTR str;
|
||||
UINT Count;
|
||||
|
||||
|
@ -1408,7 +1408,7 @@ static LONG LBSetFont(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
if (wParam == 0)
|
||||
lphl->hFont = GetStockObject(SYSTEM_FONT);
|
||||
else
|
||||
lphl->hFont = (HFONT) wParam;
|
||||
lphl->hFont = (HFONT16)wParam;
|
||||
|
||||
/* a new font means possible new text height */
|
||||
/* does this mean the height of each entry must be separately changed? */
|
||||
|
@ -1434,8 +1434,8 @@ static LONG LBPaint(HWND hwnd, WORD wParam, LONG lParam)
|
|||
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
||||
LPLISTSTRUCT lpls;
|
||||
PAINTSTRUCT16 ps;
|
||||
HBRUSH hBrush;
|
||||
HFONT hOldFont;
|
||||
HBRUSH16 hBrush;
|
||||
HFONT16 hOldFont;
|
||||
HDC16 hdc = BeginPaint16( hwnd, &ps );
|
||||
DC *dc = (DC *)GDI_GetObjPtr(hdc, DC_MAGIC);
|
||||
RECT16 rect, paintRect, scratchRect;
|
||||
|
@ -1454,8 +1454,8 @@ static LONG LBPaint(HWND hwnd, WORD wParam, LONG lParam)
|
|||
|
||||
hOldFont = SelectObject(hdc, lphl->hFont);
|
||||
|
||||
hBrush = (HBRUSH)SendMessage32A( lphl->hParent, WM_CTLCOLORLISTBOX,
|
||||
(WPARAM)hdc, (LPARAM)hwnd);
|
||||
hBrush = (HBRUSH16)SendMessage32A( lphl->hParent, WM_CTLCOLORLISTBOX,
|
||||
(WPARAM)hdc, (LPARAM)hwnd);
|
||||
if (hBrush == 0) hBrush = GetStockObject(WHITE_BRUSH);
|
||||
|
||||
FillRect16(hdc, &rect, hBrush);
|
||||
|
@ -1536,7 +1536,7 @@ static LONG LBSetFocus(HWND hwnd, WORD wParam, LONG lParam)
|
|||
if( lphl->ItemsCount && lphl->ItemFocused != -1)
|
||||
{
|
||||
HDC32 hDC = GetDC32(hwnd);
|
||||
HFONT hOldFont = SelectObject(hDC, lphl->hFont);
|
||||
HFONT16 hOldFont = SelectObject(hDC, lphl->hFont);
|
||||
LPLISTSTRUCT lpls;
|
||||
|
||||
lpls = ListBoxGetItem(lphl,lphl->ItemFocused);
|
||||
|
@ -1566,7 +1566,7 @@ static LONG LBKillFocus(HWND hwnd, WORD wParam, LONG lParam)
|
|||
if( lphl->ItemFocused != -1 )
|
||||
{
|
||||
HDC32 hDC = GetDC32(hwnd);
|
||||
HFONT hOldFont = SelectObject(hDC, lphl->hFont);
|
||||
HFONT16 hOldFont = SelectObject(hDC, lphl->hFont);
|
||||
LPLISTSTRUCT lpls;
|
||||
|
||||
lpls = ListBoxGetItem(lphl,lphl->ItemFocused);
|
||||
|
|
186
controls/menu.c
186
controls/menu.c
|
@ -39,8 +39,8 @@ typedef struct
|
|||
UINT item_id; /* Item or popup id */
|
||||
RECT16 rect; /* Item area (relative to menu window) */
|
||||
WORD xTab; /* X position of text after Tab */
|
||||
HBITMAP hCheckBit; /* Bitmap for checked item */
|
||||
HBITMAP hUnCheckBit; /* Bitmap for unchecked item */
|
||||
HBITMAP16 hCheckBit; /* Bitmap for checked item */
|
||||
HBITMAP16 hUnCheckBit; /* Bitmap for unchecked item */
|
||||
LPSTR text; /* Item text or bitmap handle */
|
||||
} MENUITEM;
|
||||
|
||||
|
@ -49,7 +49,7 @@ typedef struct
|
|||
{
|
||||
WORD wFlags; /* Menu flags (MF_POPUP, MF_SYSMENU) */
|
||||
WORD wMagic; /* Magic number */
|
||||
HANDLE hTaskQ; /* Task queue for this menu */
|
||||
HQUEUE16 hTaskQ; /* Task queue for this menu */
|
||||
WORD Width; /* Width of the whole menu */
|
||||
WORD Height; /* Height of the whole menu */
|
||||
WORD nItems; /* Number of items in the menu */
|
||||
|
@ -89,11 +89,11 @@ static BOOL fEndMenuCalled = FALSE;
|
|||
|
||||
extern void NC_DrawSysButton(HWND hwnd, HDC hdc, BOOL down); /* nonclient.c */
|
||||
extern BOOL NC_GetSysPopupPos(WND* wndPtr, RECT16* rect);
|
||||
extern HTASK TASK_GetNextTask(HTASK);
|
||||
extern HTASK16 TASK_GetNextTask(HTASK16);
|
||||
|
||||
static HBITMAP hStdCheck = 0;
|
||||
static HBITMAP hStdMnArrow = 0;
|
||||
static HMENU MENU_DefSysMenu = 0; /* Default system menu */
|
||||
static HBITMAP16 hStdCheck = 0;
|
||||
static HBITMAP16 hStdMnArrow = 0;
|
||||
static HMENU16 MENU_DefSysMenu = 0; /* Default system menu */
|
||||
|
||||
|
||||
/* we _can_ use global popup window because there's no way 2 menues can
|
||||
|
@ -109,9 +109,9 @@ static UINT uSubPWndLevel = 0;
|
|||
*
|
||||
* Load a copy of the system menu.
|
||||
*/
|
||||
static HMENU MENU_CopySysMenu(void)
|
||||
static HMENU16 MENU_CopySysMenu(void)
|
||||
{
|
||||
HMENU hMenu;
|
||||
HMENU16 hMenu;
|
||||
HGLOBAL16 handle;
|
||||
POPUPMENU *menu;
|
||||
|
||||
|
@ -166,7 +166,7 @@ BOOL MENU_Init()
|
|||
*
|
||||
* Return the default system menu.
|
||||
*/
|
||||
HMENU MENU_GetDefSysMenu(void)
|
||||
HMENU16 MENU_GetDefSysMenu(void)
|
||||
{
|
||||
return MENU_DefSysMenu;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ static BOOL MENU_IsInSysMenu( POPUPMENU *menu, POINT16 pt )
|
|||
*
|
||||
* Grey the appropriate items in System menu.
|
||||
*/
|
||||
void MENU_InitSysMenuPopup(HMENU hmenu, DWORD style, DWORD clsStyle)
|
||||
void MENU_InitSysMenuPopup(HMENU16 hmenu, DWORD style, DWORD clsStyle)
|
||||
{
|
||||
BOOL gray;
|
||||
|
||||
|
@ -240,7 +240,7 @@ void MENU_InitSysMenuPopup(HMENU hmenu, DWORD style, DWORD clsStyle)
|
|||
* Find a menu item. Return a pointer on the item, and modifies *hmenu
|
||||
* in case the item was in a sub-menu.
|
||||
*/
|
||||
static MENUITEM *MENU_FindItem( HMENU *hmenu, UINT *nPos, UINT wFlags )
|
||||
static MENUITEM *MENU_FindItem( HMENU16 *hmenu, UINT *nPos, UINT wFlags )
|
||||
{
|
||||
POPUPMENU *menu;
|
||||
int i;
|
||||
|
@ -263,7 +263,7 @@ static MENUITEM *MENU_FindItem( HMENU *hmenu, UINT *nPos, UINT wFlags )
|
|||
}
|
||||
else if (item->item_flags & MF_POPUP)
|
||||
{
|
||||
HMENU hsubmenu = (HMENU)item->item_id;
|
||||
HMENU16 hsubmenu = (HMENU16)item->item_id;
|
||||
MENUITEM *subitem = MENU_FindItem( &hsubmenu, nPos, wFlags );
|
||||
if (subitem)
|
||||
{
|
||||
|
@ -311,7 +311,7 @@ static MENUITEM *MENU_FindItemByCoords( POPUPMENU *menu, int x, int y, UINT *pos
|
|||
* Find the menu item selected by a key press.
|
||||
* Return item id, -1 if none, -2 if we should close the menu.
|
||||
*/
|
||||
static UINT MENU_FindItemByKey( HWND hwndOwner, HMENU hmenu, UINT key )
|
||||
static UINT MENU_FindItemByKey( HWND hwndOwner, HMENU16 hmenu, UINT key )
|
||||
{
|
||||
POPUPMENU *menu;
|
||||
MENUITEM *item;
|
||||
|
@ -704,7 +704,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HDC hdc, MENUITEM *lpitem,
|
|||
*
|
||||
* Paint a popup menu.
|
||||
*/
|
||||
static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
|
||||
static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU16 hmenu )
|
||||
{
|
||||
POPUPMENU *menu;
|
||||
MENUITEM *item;
|
||||
|
@ -731,7 +731,7 @@ UINT MENU_DrawMenuBar(HDC hDC, LPRECT16 lprect, HWND hwnd, BOOL suppress_draw)
|
|||
int i;
|
||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
||||
lppop = (LPPOPUPMENU) USER_HEAP_LIN_ADDR( (HMENU)wndPtr->wIDmenu );
|
||||
lppop = (LPPOPUPMENU) USER_HEAP_LIN_ADDR( (HMENU16)wndPtr->wIDmenu );
|
||||
if (lppop == NULL || lprect == NULL) return SYSMETRICS_CYMENU;
|
||||
dprintf_menu(stddeb,"MENU_DrawMenuBar(%04x, %p, %p); !\n",
|
||||
hDC, lprect, lppop);
|
||||
|
@ -756,7 +756,7 @@ UINT MENU_DrawMenuBar(HDC hDC, LPRECT16 lprect, HWND hwnd, BOOL suppress_draw)
|
|||
/***********************************************************************
|
||||
* MENU_SwitchTPWndTo
|
||||
*/
|
||||
BOOL32 MENU_SwitchTPWndTo( HTASK hTask)
|
||||
BOOL32 MENU_SwitchTPWndTo( HTASK16 hTask )
|
||||
{
|
||||
/* This is supposed to be called when popup is hidden.
|
||||
* AppExit() calls with hTask == 0, so we get the next to current.
|
||||
|
@ -789,7 +789,7 @@ BOOL32 MENU_SwitchTPWndTo( HTASK hTask)
|
|||
*
|
||||
* Display a popup menu.
|
||||
*/
|
||||
static BOOL MENU_ShowPopup(HWND hwndOwner, HMENU hmenu, UINT id, int x, int y,
|
||||
static BOOL MENU_ShowPopup(HWND hwndOwner, HMENU16 hmenu, UINT id, int x, int y,
|
||||
int xanchor, int yanchor)
|
||||
{
|
||||
POPUPMENU *menu;
|
||||
|
@ -885,7 +885,7 @@ static BOOL MENU_ShowPopup(HWND hwndOwner, HMENU hmenu, UINT id, int x, int y,
|
|||
/***********************************************************************
|
||||
* MENU_SelectItem
|
||||
*/
|
||||
static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex,
|
||||
static void MENU_SelectItem( HWND hwndOwner, HMENU16 hmenu, UINT wIndex,
|
||||
BOOL sendMenuSelect )
|
||||
{
|
||||
LPPOPUPMENU lppop;
|
||||
|
@ -949,7 +949,7 @@ static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex,
|
|||
* MENU_SelectItemRel
|
||||
*
|
||||
*/
|
||||
static void MENU_SelectItemRel( HWND hwndOwner, HMENU hmenu, int offset )
|
||||
static void MENU_SelectItemRel( HWND hwndOwner, HMENU16 hmenu, int offset )
|
||||
{
|
||||
int i, min = 0;
|
||||
POPUPMENU *menu;
|
||||
|
@ -1038,7 +1038,7 @@ static BOOL MENU_SetItemData( MENUITEM *item, UINT flags, UINT id, LPCSTR str )
|
|||
*
|
||||
* Insert a new item into a menu.
|
||||
*/
|
||||
static MENUITEM *MENU_InsertItem( HMENU hMenu, UINT pos, UINT flags )
|
||||
static MENUITEM *MENU_InsertItem( HMENU16 hMenu, UINT pos, UINT flags )
|
||||
{
|
||||
MENUITEM *newItems;
|
||||
POPUPMENU *menu;
|
||||
|
@ -1104,7 +1104,7 @@ static MENUITEM *MENU_InsertItem( HMENU hMenu, UINT pos, UINT flags )
|
|||
* Parse a standard menu resource and add items to the menu.
|
||||
* Return a pointer to the end of the resource.
|
||||
*/
|
||||
static LPCSTR MENU_ParseResource( LPCSTR res, HMENU hMenu, BOOL unicode )
|
||||
static LPCSTR MENU_ParseResource( LPCSTR res, HMENU16 hMenu, BOOL unicode )
|
||||
{
|
||||
WORD flags, id = 0;
|
||||
LPCSTR str;
|
||||
|
@ -1126,7 +1126,7 @@ static LPCSTR MENU_ParseResource( LPCSTR res, HMENU hMenu, BOOL unicode )
|
|||
else res += (lstrlen32W((LPCWSTR)str) + 1) * sizeof(WCHAR);
|
||||
if (flags & MF_POPUP)
|
||||
{
|
||||
HMENU hSubMenu = CreatePopupMenu();
|
||||
HMENU16 hSubMenu = CreatePopupMenu();
|
||||
if (!hSubMenu) return NULL;
|
||||
if (!(res = MENU_ParseResource( res, hSubMenu, unicode )))
|
||||
return NULL;
|
||||
|
@ -1149,7 +1149,7 @@ static LPCSTR MENU_ParseResource( LPCSTR res, HMENU hMenu, BOOL unicode )
|
|||
*
|
||||
* Return the handle of the selected sub-popup menu (if any).
|
||||
*/
|
||||
static HMENU MENU_GetSubPopup( HMENU hmenu )
|
||||
static HMENU16 MENU_GetSubPopup( HMENU16 hmenu )
|
||||
{
|
||||
POPUPMENU *menu;
|
||||
MENUITEM *item;
|
||||
|
@ -1162,7 +1162,7 @@ static HMENU MENU_GetSubPopup( HMENU hmenu )
|
|||
item = &menu->items[menu->FocusedItem];
|
||||
if (!(item->item_flags & MF_POPUP) || !(item->item_flags & MF_MOUSESELECT))
|
||||
return 0;
|
||||
return (HMENU)item->item_id;
|
||||
return (HMENU16)item->item_id;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1171,12 +1171,12 @@ static HMENU MENU_GetSubPopup( HMENU hmenu )
|
|||
*
|
||||
* Hide the sub-popup menus of this menu.
|
||||
*/
|
||||
static void MENU_HideSubPopups( HWND hwndOwner, HMENU hmenu,
|
||||
static void MENU_HideSubPopups( HWND hwndOwner, HMENU16 hmenu,
|
||||
BOOL sendMenuSelect )
|
||||
{
|
||||
MENUITEM *item;
|
||||
POPUPMENU *menu, *submenu;
|
||||
HMENU hsubmenu;
|
||||
HMENU16 hsubmenu;
|
||||
|
||||
if (!(menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( hmenu ))) return;
|
||||
if (menu->FocusedItem == NO_SELECTED_ITEM) return;
|
||||
|
@ -1190,7 +1190,7 @@ static void MENU_HideSubPopups( HWND hwndOwner, HMENU hmenu,
|
|||
if (!(item->item_flags & MF_POPUP) ||
|
||||
!(item->item_flags & MF_MOUSESELECT)) return;
|
||||
item->item_flags &= ~MF_MOUSESELECT;
|
||||
hsubmenu = (HMENU)item->item_id;
|
||||
hsubmenu = (HMENU16)item->item_id;
|
||||
}
|
||||
submenu = (POPUPMENU *) USER_HEAP_LIN_ADDR( hsubmenu );
|
||||
MENU_HideSubPopups( hwndOwner, hsubmenu, FALSE );
|
||||
|
@ -1214,7 +1214,8 @@ static void MENU_HideSubPopups( HWND hwndOwner, HMENU hmenu,
|
|||
* Display the sub-menu of the selected item of this menu.
|
||||
* Return the handle of the submenu, or hmenu if no submenu to display.
|
||||
*/
|
||||
static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu, BOOL selectFirst )
|
||||
static HMENU16 MENU_ShowSubPopup( HWND hwndOwner, HMENU16 hmenu,
|
||||
BOOL selectFirst )
|
||||
{
|
||||
POPUPMENU *menu;
|
||||
MENUITEM *item;
|
||||
|
@ -1239,7 +1240,7 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu, BOOL selectFirst )
|
|||
item->item_flags |= MF_MOUSESELECT;
|
||||
if (menu->wFlags & MF_POPUP)
|
||||
{
|
||||
MENU_ShowPopup( hwndOwner, (HMENU)item->item_id, menu->FocusedItem,
|
||||
MENU_ShowPopup( hwndOwner, (HMENU16)item->item_id, menu->FocusedItem,
|
||||
wndPtr->rectWindow.left + item->rect.right-arrow_bitmap_width,
|
||||
wndPtr->rectWindow.top + item->rect.top,
|
||||
item->rect.left - item->rect.right + 2*arrow_bitmap_width,
|
||||
|
@ -1247,13 +1248,13 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu, BOOL selectFirst )
|
|||
}
|
||||
else
|
||||
{
|
||||
MENU_ShowPopup( hwndOwner, (HMENU)item->item_id, menu->FocusedItem,
|
||||
MENU_ShowPopup( hwndOwner, (HMENU16)item->item_id, menu->FocusedItem,
|
||||
wndPtr->rectWindow.left + item->rect.left,
|
||||
wndPtr->rectWindow.top + item->rect.bottom,
|
||||
item->rect.right - item->rect.left, item->rect.bottom - item->rect.top );
|
||||
}
|
||||
if (selectFirst) MENU_SelectItemRel( hwndOwner, (HMENU)item->item_id, ITEM_NEXT );
|
||||
return (HMENU)item->item_id;
|
||||
if (selectFirst) MENU_SelectItemRel( hwndOwner, (HMENU16)item->item_id, ITEM_NEXT );
|
||||
return (HMENU16)item->item_id;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1262,7 +1263,7 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu, BOOL selectFirst )
|
|||
*
|
||||
* Find the menu containing a given point (in screen coords).
|
||||
*/
|
||||
static HMENU MENU_FindMenuByCoords( HMENU hmenu, POINT16 pt )
|
||||
static HMENU16 MENU_FindMenuByCoords( HMENU16 hmenu, POINT16 pt )
|
||||
{
|
||||
POPUPMENU *menu;
|
||||
HWND hwnd;
|
||||
|
@ -1300,8 +1301,8 @@ static HMENU MENU_FindMenuByCoords( HMENU hmenu, POINT16 pt )
|
|||
* Execute a menu item (for instance when user pressed Enter).
|
||||
* Return TRUE if we can go on with menu tracking.
|
||||
*/
|
||||
static BOOL MENU_ExecFocusedItem( HWND hwndOwner, HMENU hmenu,
|
||||
HMENU *hmenuCurrent )
|
||||
static BOOL MENU_ExecFocusedItem( HWND hwndOwner, HMENU16 hmenu,
|
||||
HMENU16 *hmenuCurrent )
|
||||
{
|
||||
MENUITEM *item;
|
||||
POPUPMENU *menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( hmenu );
|
||||
|
@ -1333,8 +1334,8 @@ static BOOL MENU_ExecFocusedItem( HWND hwndOwner, HMENU hmenu,
|
|||
* hmenuCurrent is the top-most visible popup.
|
||||
* Return TRUE if we can go on with menu tracking.
|
||||
*/
|
||||
static BOOL MENU_ButtonDown( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
||||
POINT16 pt )
|
||||
static BOOL MENU_ButtonDown( HWND hwndOwner, HMENU16 hmenu,
|
||||
HMENU16 *hmenuCurrent, POINT16 pt )
|
||||
{
|
||||
POPUPMENU *menu;
|
||||
MENUITEM *item;
|
||||
|
@ -1383,12 +1384,12 @@ static BOOL MENU_ButtonDown( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
|||
* hmenuCurrent is the top-most visible popup.
|
||||
* Return TRUE if we can go on with menu tracking.
|
||||
*/
|
||||
static BOOL MENU_ButtonUp( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
||||
POINT16 pt )
|
||||
static BOOL MENU_ButtonUp( HWND hwndOwner, HMENU16 hmenu,
|
||||
HMENU16 *hmenuCurrent, POINT16 pt )
|
||||
{
|
||||
POPUPMENU *menu;
|
||||
MENUITEM *item;
|
||||
HMENU hsubmenu = 0;
|
||||
HMENU16 hsubmenu = 0;
|
||||
UINT id;
|
||||
|
||||
if (!hmenu) return FALSE; /* Outside all menus */
|
||||
|
@ -1409,7 +1410,7 @@ static BOOL MENU_ButtonUp( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
|||
{
|
||||
return MENU_ExecFocusedItem( hwndOwner, hmenu, hmenuCurrent );
|
||||
}
|
||||
hsubmenu = (HMENU)item->item_id;
|
||||
hsubmenu = (HMENU16)item->item_id;
|
||||
}
|
||||
/* Select first item of sub-popup */
|
||||
MENU_SelectItem( hwndOwner, hsubmenu, NO_SELECTED_ITEM, FALSE );
|
||||
|
@ -1425,8 +1426,8 @@ static BOOL MENU_ButtonUp( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
|||
* hmenuCurrent is the top-most visible popup.
|
||||
* Return TRUE if we can go on with menu tracking.
|
||||
*/
|
||||
static BOOL MENU_MouseMove( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
||||
POINT16 pt )
|
||||
static BOOL MENU_MouseMove( HWND hwndOwner, HMENU16 hmenu,
|
||||
HMENU16 *hmenuCurrent, POINT16 pt )
|
||||
{
|
||||
MENUITEM *item;
|
||||
POPUPMENU *menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( hmenu );
|
||||
|
@ -1458,7 +1459,8 @@ static BOOL MENU_MouseMove( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
|||
/***********************************************************************
|
||||
* MENU_DoNextMenu
|
||||
*/
|
||||
static LRESULT MENU_DoNextMenu( HWND* hwndOwner, HMENU* hmenu, HMENU *hmenuCurrent, UINT vk)
|
||||
static LRESULT MENU_DoNextMenu( HWND* hwndOwner, HMENU16* hmenu,
|
||||
HMENU16 *hmenuCurrent, UINT vk)
|
||||
{
|
||||
POPUPMENU *menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( *hmenu );
|
||||
UINT id = 0;
|
||||
|
@ -1541,10 +1543,11 @@ static LRESULT MENU_DoNextMenu( HWND* hwndOwner, HMENU* hmenu, HMENU *hmenuCurre
|
|||
* Handle a VK_LEFT key event in a menu.
|
||||
* hmenuCurrent is the top-most visible popup.
|
||||
*/
|
||||
static void MENU_KeyLeft( HWND* hwndOwner, HMENU* hmenu, HMENU *hmenuCurrent )
|
||||
static void MENU_KeyLeft( HWND* hwndOwner, HMENU16* hmenu,
|
||||
HMENU16 *hmenuCurrent )
|
||||
{
|
||||
POPUPMENU *menu;
|
||||
HMENU hmenutmp, hmenuprev;
|
||||
HMENU16 hmenutmp, hmenuprev;
|
||||
|
||||
menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( *hmenu );
|
||||
hmenuprev = hmenutmp = *hmenu;
|
||||
|
@ -1581,10 +1584,11 @@ static void MENU_KeyLeft( HWND* hwndOwner, HMENU* hmenu, HMENU *hmenuCurrent )
|
|||
* Handle a VK_RIGHT key event in a menu.
|
||||
* hmenuCurrent is the top-most visible popup.
|
||||
*/
|
||||
static void MENU_KeyRight( HWND* hwndOwner, HMENU* hmenu, HMENU *hmenuCurrent )
|
||||
static void MENU_KeyRight( HWND* hwndOwner, HMENU16* hmenu,
|
||||
HMENU16 *hmenuCurrent )
|
||||
{
|
||||
POPUPMENU *menu;
|
||||
HMENU hmenutmp;
|
||||
HMENU16 hmenutmp;
|
||||
|
||||
menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( *hmenu );
|
||||
|
||||
|
@ -1620,7 +1624,7 @@ static void MENU_KeyRight( HWND* hwndOwner, HMENU* hmenu, HMENU *hmenuCurrent )
|
|||
}
|
||||
else if (*hmenuCurrent != *hmenu) /* Hide last level popup */
|
||||
{
|
||||
HMENU hmenuprev;
|
||||
HMENU16 hmenuprev;
|
||||
hmenuprev = hmenutmp = *hmenu;
|
||||
while (hmenutmp != *hmenuCurrent)
|
||||
{
|
||||
|
@ -1640,12 +1644,12 @@ static void MENU_KeyRight( HWND* hwndOwner, HMENU* hmenu, HMENU *hmenuCurrent )
|
|||
* If 'x' and 'y' are not 0, we simulate a button-down event at (x,y)
|
||||
* 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( HMENU16 hmenu, UINT wFlags, int x, int y,
|
||||
HWND hwnd, const RECT16 *lprect )
|
||||
{
|
||||
MSG16 msg;
|
||||
POPUPMENU *menu;
|
||||
HMENU hmenuCurrent = hmenu;
|
||||
HMENU16 hmenuCurrent = hmenu;
|
||||
BOOL fClosed = FALSE, fRemove;
|
||||
UINT pos;
|
||||
|
||||
|
@ -1668,7 +1672,7 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, int x, int y,
|
|||
if ((msg.message >= WM_MOUSEFIRST) && (msg.message <= WM_MOUSELAST))
|
||||
{
|
||||
/* Find the sub-popup for this mouse event (if any) */
|
||||
HMENU hsubmenu = MENU_FindMenuByCoords( hmenu, msg.pt );
|
||||
HMENU16 hsubmenu = MENU_FindMenuByCoords( hmenu, msg.pt );
|
||||
|
||||
switch(msg.message)
|
||||
{
|
||||
|
@ -1822,7 +1826,7 @@ void MENU_TrackMouseMenuBar( HWND hwnd, POINT16 pt )
|
|||
HideCaret(0);
|
||||
SendMessage16( hwnd, WM_ENTERMENULOOP, 0, 0 );
|
||||
SendMessage16( hwnd, WM_INITMENU, wndPtr->wIDmenu, 0 );
|
||||
MENU_TrackMenu( (HMENU)wndPtr->wIDmenu, TPM_LEFTALIGN | TPM_LEFTBUTTON,
|
||||
MENU_TrackMenu( (HMENU16)wndPtr->wIDmenu, TPM_LEFTALIGN | TPM_LEFTBUTTON,
|
||||
pt.x, pt.y, hwnd, NULL );
|
||||
SendMessage16( hwnd, WM_EXITMENULOOP, 0, 0 );
|
||||
ShowCaret(0);
|
||||
|
@ -1837,7 +1841,7 @@ void MENU_TrackMouseMenuBar( HWND hwnd, POINT16 pt )
|
|||
void MENU_TrackKbdMenuBar( WND* wndPtr, UINT wParam, INT vkey)
|
||||
{
|
||||
UINT uItem = NO_SELECTED_ITEM;
|
||||
HMENU hTrackMenu;
|
||||
HMENU16 hTrackMenu;
|
||||
|
||||
/* find window that has a menu
|
||||
*/
|
||||
|
@ -1945,7 +1949,7 @@ LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
|
|||
PAINTSTRUCT16 ps;
|
||||
BeginPaint16( hwnd, &ps );
|
||||
MENU_DrawPopupMenu( hwnd, ps.hdc,
|
||||
(HMENU)GetWindowLong32A( hwnd, 0 ) );
|
||||
(HMENU16)GetWindowLong32A( hwnd, 0 ) );
|
||||
EndPaint16( hwnd, &ps );
|
||||
return 0;
|
||||
}
|
||||
|
@ -1962,7 +1966,7 @@ LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
|
|||
break;
|
||||
|
||||
case WM_USER:
|
||||
if (wParam) SetWindowLong32A( hwnd, 0, (HMENU)wParam );
|
||||
if (wParam) SetWindowLong32A( hwnd, 0, (HMENU16)wParam );
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc16(hwnd, message, wParam, lParam);
|
||||
|
@ -1984,7 +1988,7 @@ UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth, int orgX, int orgY )
|
|||
LPPOPUPMENU lppop;
|
||||
|
||||
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return 0;
|
||||
if (!(lppop = (LPPOPUPMENU)USER_HEAP_LIN_ADDR((HMENU)wndPtr->wIDmenu)))
|
||||
if (!(lppop = (LPPOPUPMENU)USER_HEAP_LIN_ADDR((HMENU16)wndPtr->wIDmenu)))
|
||||
return 0;
|
||||
hdc = GetDCEx32( hwnd, 0, DCX_CACHE | DCX_WINDOW );
|
||||
SetRect16(&rectBar, orgX, orgY, orgX+menubarWidth, orgY+SYSMETRICS_CYMENU);
|
||||
|
@ -2063,7 +2067,7 @@ BOOL32 ChangeMenu32W( HMENU32 hMenu, UINT32 pos, LPCWSTR data,
|
|||
/*******************************************************************
|
||||
* CheckMenuItem (USER.154)
|
||||
*/
|
||||
INT CheckMenuItem( HMENU hMenu, UINT id, UINT flags )
|
||||
INT CheckMenuItem( HMENU16 hMenu, UINT id, UINT flags )
|
||||
{
|
||||
MENUITEM *item;
|
||||
INT ret;
|
||||
|
@ -2080,7 +2084,7 @@ INT CheckMenuItem( HMENU hMenu, UINT id, UINT flags )
|
|||
/**********************************************************************
|
||||
* EnableMenuItem [USER.155]
|
||||
*/
|
||||
BOOL EnableMenuItem(HMENU hMenu, UINT wItemID, UINT wFlags)
|
||||
BOOL EnableMenuItem(HMENU16 hMenu, UINT wItemID, UINT wFlags)
|
||||
{
|
||||
MENUITEM *item;
|
||||
dprintf_menu(stddeb,"EnableMenuItem (%04x, %04X, %04X) !\n",
|
||||
|
@ -2107,7 +2111,7 @@ BOOL EnableMenuItem(HMENU hMenu, UINT wItemID, UINT wFlags)
|
|||
/*******************************************************************
|
||||
* GetMenuString (USER.161)
|
||||
*/
|
||||
int GetMenuString( HMENU hMenu, UINT wItemID,
|
||||
int GetMenuString( HMENU16 hMenu, UINT wItemID,
|
||||
LPSTR str, short nMaxSiz, UINT wFlags )
|
||||
{
|
||||
MENUITEM *item;
|
||||
|
@ -2127,7 +2131,7 @@ int GetMenuString( HMENU hMenu, UINT wItemID,
|
|||
/**********************************************************************
|
||||
* HiliteMenuItem [USER.162]
|
||||
*/
|
||||
BOOL HiliteMenuItem(HWND hWnd, HMENU hMenu, UINT wItemID, UINT wHilite)
|
||||
BOOL HiliteMenuItem(HWND hWnd, HMENU16 hMenu, UINT wItemID, UINT wHilite)
|
||||
{
|
||||
LPPOPUPMENU menu;
|
||||
dprintf_menu(stddeb,"HiliteMenuItem(%04x, %04x, %04x, %04x);\n",
|
||||
|
@ -2144,7 +2148,7 @@ BOOL HiliteMenuItem(HWND hWnd, HMENU hMenu, UINT wItemID, UINT wHilite)
|
|||
/**********************************************************************
|
||||
* GetMenuState [USER.250]
|
||||
*/
|
||||
UINT GetMenuState(HMENU hMenu, UINT wItemID, UINT wFlags)
|
||||
UINT GetMenuState(HMENU16 hMenu, UINT wItemID, UINT wFlags)
|
||||
{
|
||||
MENUITEM *item;
|
||||
dprintf_menu(stddeb,"GetMenuState(%04x, %04x, %04x);\n",
|
||||
|
@ -2152,7 +2156,7 @@ UINT GetMenuState(HMENU hMenu, UINT wItemID, UINT wFlags)
|
|||
if (!(item = MENU_FindItem( &hMenu, &wItemID, wFlags ))) return -1;
|
||||
if (item->item_flags & MF_POPUP)
|
||||
{
|
||||
POPUPMENU *menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( (HMENU)item->item_id );
|
||||
POPUPMENU *menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( (HMENU16)item->item_id );
|
||||
if (!menu) return -1;
|
||||
else return (menu->nItems << 8) | (menu->wFlags & 0xff);
|
||||
}
|
||||
|
@ -2163,7 +2167,7 @@ UINT GetMenuState(HMENU hMenu, UINT wItemID, UINT wFlags)
|
|||
/**********************************************************************
|
||||
* GetMenuItemCount [USER.263]
|
||||
*/
|
||||
INT GetMenuItemCount(HMENU hMenu)
|
||||
INT GetMenuItemCount(HMENU16 hMenu)
|
||||
{
|
||||
LPPOPUPMENU menu;
|
||||
dprintf_menu(stddeb,"GetMenuItemCount(%04x);\n", hMenu);
|
||||
|
@ -2178,7 +2182,7 @@ INT GetMenuItemCount(HMENU hMenu)
|
|||
/**********************************************************************
|
||||
* GetMenuItemID [USER.264]
|
||||
*/
|
||||
UINT GetMenuItemID(HMENU hMenu, int nPos)
|
||||
UINT GetMenuItemID(HMENU16 hMenu, int nPos)
|
||||
{
|
||||
LPPOPUPMENU menu;
|
||||
|
||||
|
@ -2226,7 +2230,7 @@ BOOL32 InsertMenu32A( HMENU32 hMenu, UINT32 pos, UINT32 flags,
|
|||
}
|
||||
|
||||
if (flags & MF_POPUP) /* Set the MF_POPUP flag on the popup-menu */
|
||||
((POPUPMENU *)USER_HEAP_LIN_ADDR((HMENU)id))->wFlags |= MF_POPUP;
|
||||
((POPUPMENU *)USER_HEAP_LIN_ADDR((HMENU16)id))->wFlags |= MF_POPUP;
|
||||
|
||||
item->hCheckBit = hStdCheck;
|
||||
item->hUnCheckBit = 0;
|
||||
|
@ -2283,7 +2287,7 @@ BOOL32 AppendMenu32W( HMENU32 hMenu, UINT32 flags, UINT32 id, LPCWSTR data )
|
|||
/**********************************************************************
|
||||
* RemoveMenu [USER.412]
|
||||
*/
|
||||
BOOL RemoveMenu(HMENU hMenu, UINT nPos, UINT wFlags)
|
||||
BOOL RemoveMenu(HMENU16 hMenu, UINT nPos, UINT wFlags)
|
||||
{
|
||||
LPPOPUPMENU menu;
|
||||
MENUITEM *item;
|
||||
|
@ -2319,11 +2323,11 @@ BOOL RemoveMenu(HMENU hMenu, UINT nPos, UINT wFlags)
|
|||
/**********************************************************************
|
||||
* DeleteMenu [USER.413]
|
||||
*/
|
||||
BOOL DeleteMenu(HMENU hMenu, UINT nPos, UINT wFlags)
|
||||
BOOL DeleteMenu(HMENU16 hMenu, UINT nPos, UINT wFlags)
|
||||
{
|
||||
MENUITEM *item = MENU_FindItem( &hMenu, &nPos, wFlags );
|
||||
if (!item) return FALSE;
|
||||
if (item->item_flags & MF_POPUP) DestroyMenu( (HMENU)item->item_id );
|
||||
if (item->item_flags & MF_POPUP) DestroyMenu( (HMENU16)item->item_id );
|
||||
/* nPos is now the position of the item */
|
||||
RemoveMenu( hMenu, nPos, wFlags | MF_BYPOSITION );
|
||||
return TRUE;
|
||||
|
@ -2350,7 +2354,7 @@ BOOL32 ModifyMenu32A( HMENU32 hMenu, UINT32 pos, UINT32 flags,
|
|||
UINT32 id, LPCSTR str )
|
||||
{
|
||||
MENUITEM *item;
|
||||
HMENU hMenu16 = hMenu;
|
||||
HMENU16 hMenu16 = hMenu;
|
||||
UINT16 pos16 = pos;
|
||||
|
||||
if (IS_STRING_ITEM(flags))
|
||||
|
@ -2392,9 +2396,9 @@ BOOL32 ModifyMenu32W( HMENU32 hMenu, UINT32 pos, UINT32 flags,
|
|||
/**********************************************************************
|
||||
* CreatePopupMenu [USER.415]
|
||||
*/
|
||||
HMENU CreatePopupMenu()
|
||||
HMENU16 CreatePopupMenu()
|
||||
{
|
||||
HMENU hmenu;
|
||||
HMENU16 hmenu;
|
||||
POPUPMENU *menu;
|
||||
|
||||
if (!(hmenu = CreateMenu())) return 0;
|
||||
|
@ -2416,8 +2420,8 @@ DWORD GetMenuCheckMarkDimensions()
|
|||
/**********************************************************************
|
||||
* SetMenuItemBitmaps [USER.418]
|
||||
*/
|
||||
BOOL SetMenuItemBitmaps(HMENU hMenu, UINT nPos, UINT wFlags,
|
||||
HBITMAP hNewUnCheck, HBITMAP hNewCheck)
|
||||
BOOL SetMenuItemBitmaps(HMENU16 hMenu, UINT nPos, UINT wFlags,
|
||||
HBITMAP16 hNewUnCheck, HBITMAP16 hNewCheck)
|
||||
{
|
||||
MENUITEM *item;
|
||||
dprintf_menu(stddeb,"SetMenuItemBitmaps(%04x, %04x, %04x, %04x, %04x)\n",
|
||||
|
@ -2444,9 +2448,9 @@ BOOL SetMenuItemBitmaps(HMENU hMenu, UINT nPos, UINT wFlags,
|
|||
/**********************************************************************
|
||||
* CreateMenu [USER.151]
|
||||
*/
|
||||
HMENU CreateMenu()
|
||||
HMENU16 CreateMenu()
|
||||
{
|
||||
HMENU hMenu;
|
||||
HMENU16 hMenu;
|
||||
LPPOPUPMENU menu;
|
||||
dprintf_menu(stddeb,"CreateMenu !\n");
|
||||
if (!(hMenu = USER_HEAP_ALLOC( sizeof(POPUPMENU) )))
|
||||
|
@ -2469,7 +2473,7 @@ HMENU CreateMenu()
|
|||
/**********************************************************************
|
||||
* DestroyMenu [USER.152]
|
||||
*/
|
||||
BOOL DestroyMenu(HMENU hMenu)
|
||||
BOOL DestroyMenu(HMENU16 hMenu)
|
||||
{
|
||||
LPPOPUPMENU lppop;
|
||||
dprintf_menu(stddeb,"DestroyMenu (%04x) !\n", hMenu);
|
||||
|
@ -2490,7 +2494,7 @@ BOOL DestroyMenu(HMENU hMenu)
|
|||
for (i = lppop->nItems; i > 0; i--, item++)
|
||||
{
|
||||
if (item->item_flags & MF_POPUP)
|
||||
DestroyMenu( (HMENU)item->item_id );
|
||||
DestroyMenu( (HMENU16)item->item_id );
|
||||
if (IS_STRING_ITEM(item->item_flags) && item->text)
|
||||
HeapFree( SystemHeap, 0, item->text );
|
||||
}
|
||||
|
@ -2504,7 +2508,7 @@ BOOL DestroyMenu(HMENU hMenu)
|
|||
/**********************************************************************
|
||||
* GetSystemMenu [USER.156]
|
||||
*/
|
||||
HMENU GetSystemMenu(HWND hWnd, BOOL bRevert)
|
||||
HMENU16 GetSystemMenu(HWND hWnd, BOOL bRevert)
|
||||
{
|
||||
WND *wndPtr = WIN_FindWndPtr( hWnd );
|
||||
if (!wndPtr) return 0;
|
||||
|
@ -2524,7 +2528,7 @@ HMENU GetSystemMenu(HWND hWnd, BOOL bRevert)
|
|||
/*******************************************************************
|
||||
* SetSystemMenu (USER.280)
|
||||
*/
|
||||
BOOL SetSystemMenu( HWND hwnd, HMENU hMenu )
|
||||
BOOL SetSystemMenu( HWND hwnd, HMENU16 hMenu )
|
||||
{
|
||||
WND *wndPtr;
|
||||
|
||||
|
@ -2539,18 +2543,18 @@ BOOL SetSystemMenu( HWND hwnd, HMENU hMenu )
|
|||
/**********************************************************************
|
||||
* GetMenu [USER.157]
|
||||
*/
|
||||
HMENU GetMenu(HWND hWnd)
|
||||
HMENU16 GetMenu(HWND hWnd)
|
||||
{
|
||||
WND * wndPtr = WIN_FindWndPtr(hWnd);
|
||||
if (wndPtr == NULL) return 0;
|
||||
return (HMENU)wndPtr->wIDmenu;
|
||||
return (HMENU16)wndPtr->wIDmenu;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* SetMenu [USER.158]
|
||||
*/
|
||||
BOOL SetMenu(HWND hWnd, HMENU hMenu)
|
||||
BOOL SetMenu(HWND hWnd, HMENU16 hMenu)
|
||||
{
|
||||
LPPOPUPMENU lpmenu;
|
||||
WND * wndPtr = WIN_FindWndPtr(hWnd);
|
||||
|
@ -2585,7 +2589,7 @@ BOOL SetMenu(HWND hWnd, HMENU hMenu)
|
|||
/**********************************************************************
|
||||
* GetSubMenu [USER.159]
|
||||
*/
|
||||
HMENU GetSubMenu(HMENU hMenu, short nPos)
|
||||
HMENU16 GetSubMenu(HMENU16 hMenu, short nPos)
|
||||
{
|
||||
LPPOPUPMENU lppop;
|
||||
|
||||
|
@ -2593,7 +2597,7 @@ HMENU GetSubMenu(HMENU hMenu, short nPos)
|
|||
if (!(lppop = (LPPOPUPMENU) USER_HEAP_LIN_ADDR(hMenu))) return 0;
|
||||
if ((UINT)nPos >= lppop->nItems) return 0;
|
||||
if (!(lppop->items[nPos].item_flags & MF_POPUP)) return 0;
|
||||
return (HMENU)lppop->items[nPos].item_id;
|
||||
return (HMENU16)lppop->items[nPos].item_id;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2610,7 +2614,7 @@ void DrawMenuBar(HWND hWnd)
|
|||
wndPtr->wIDmenu != 0) {
|
||||
dprintf_menu(stddeb,"DrawMenuBar wIDmenu=%04X \n",
|
||||
wndPtr->wIDmenu);
|
||||
lppop = (LPPOPUPMENU) USER_HEAP_LIN_ADDR((HMENU)wndPtr->wIDmenu);
|
||||
lppop = (LPPOPUPMENU) USER_HEAP_LIN_ADDR((HMENU16)wndPtr->wIDmenu);
|
||||
if (lppop == NULL) return;
|
||||
|
||||
lppop->Height = 0; /* Make sure we call MENU_MenuBarCalcSize */
|
||||
|
@ -2633,7 +2637,7 @@ void EndMenu(void)
|
|||
/***********************************************************************
|
||||
* LookupMenuHandle (USER.217)
|
||||
*/
|
||||
HMENU LookupMenuHandle( HMENU hmenu, INT id )
|
||||
HMENU16 LookupMenuHandle( HMENU16 hmenu, INT id )
|
||||
{
|
||||
if (!MENU_FindItem( &hmenu, &id, MF_BYCOMMAND )) return 0;
|
||||
else return hmenu;
|
||||
|
@ -2700,7 +2704,7 @@ HMENU32 LoadMenu32W( HINSTANCE32 instance, LPCWSTR name )
|
|||
*/
|
||||
HMENU16 LoadMenuIndirect16( LPCVOID template )
|
||||
{
|
||||
HMENU hMenu;
|
||||
HMENU16 hMenu;
|
||||
WORD version, offset;
|
||||
LPCSTR p = (LPCSTR)template;
|
||||
|
||||
|
@ -2729,7 +2733,7 @@ HMENU16 LoadMenuIndirect16( LPCVOID template )
|
|||
*/
|
||||
HMENU32 LoadMenuIndirect32A( LPCVOID template )
|
||||
{
|
||||
HMENU hMenu;
|
||||
HMENU16 hMenu;
|
||||
WORD version, offset;
|
||||
LPCSTR p = (LPCSTR)template;
|
||||
|
||||
|
@ -2767,7 +2771,7 @@ HMENU32 LoadMenuIndirect32W( LPCVOID template )
|
|||
/**********************************************************************
|
||||
* IsMenu (USER.358)
|
||||
*/
|
||||
BOOL IsMenu( HMENU hmenu )
|
||||
BOOL IsMenu( HMENU16 hmenu )
|
||||
{
|
||||
LPPOPUPMENU menu;
|
||||
if (!(menu = (LPPOPUPMENU) USER_HEAP_LIN_ADDR( hmenu ))) return FALSE;
|
||||
|
|
|
@ -1249,7 +1249,7 @@ BOOL32 ShowScrollBar32( HWND32 hwnd, INT32 nBar, BOOL32 fShow )
|
|||
else /* hide it */
|
||||
{
|
||||
if (!(wndPtr->dwStyle & WS_HSCROLL)
|
||||
&& !(wndPtr->dwStyle & WS_HSCROLL)) return TRUE;
|
||||
&& !(wndPtr->dwStyle & WS_VSCROLL)) return TRUE;
|
||||
wndPtr->dwStyle &= ~(WS_HSCROLL | WS_VSCROLL);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -145,7 +145,7 @@ LRESULT StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
case WM_SETFONT:
|
||||
if (style == SS_ICON) return 0;
|
||||
infoPtr->hFont = (HFONT)wParam;
|
||||
infoPtr->hFont = (HFONT16)wParam;
|
||||
if (LOWORD(lParam))
|
||||
{
|
||||
InvalidateRect32( hWnd, NULL, FALSE );
|
||||
|
@ -183,7 +183,7 @@ LRESULT StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc )
|
||||
{
|
||||
RECT16 rc;
|
||||
HBRUSH hBrush;
|
||||
HBRUSH16 hBrush;
|
||||
WORD wFormat;
|
||||
|
||||
LONG style = wndPtr->dwStyle;
|
||||
|
@ -231,7 +231,7 @@ static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc )
|
|||
static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc )
|
||||
{
|
||||
RECT16 rc;
|
||||
HBRUSH hBrush;
|
||||
HBRUSH16 hBrush;
|
||||
|
||||
GetClientRect16( wndPtr->hwndSelf, &rc);
|
||||
|
||||
|
@ -271,7 +271,7 @@ static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc )
|
|||
static void STATIC_PaintIconfn( WND *wndPtr, HDC hdc )
|
||||
{
|
||||
RECT16 rc;
|
||||
HBRUSH hbrush;
|
||||
HBRUSH16 hbrush;
|
||||
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
|
||||
|
||||
GetClientRect16( wndPtr->hwndSelf, &rc);
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRC = @top_srcdir@
|
||||
MODULE = debugger
|
||||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = debugger
|
||||
|
||||
C_SRCS = \
|
||||
break.c \
|
||||
|
@ -10,7 +13,9 @@ C_SRCS = \
|
|||
info.c \
|
||||
memory.c \
|
||||
registers.c \
|
||||
stack.c \
|
||||
stack.c
|
||||
|
||||
GEN_C_SRCS = \
|
||||
y.tab.c \
|
||||
lex.yy.c
|
||||
|
||||
|
@ -19,12 +24,12 @@ all: $(MODULE).o
|
|||
@MAKE_RULES@
|
||||
|
||||
y.tab.c y.tab.h: dbg.y
|
||||
$(YACC) -d -t dbg.y
|
||||
$(YACC) -d -t $(SRCDIR)/dbg.y
|
||||
|
||||
lex.yy.c: debug.l
|
||||
$(LEX) -8 -I debug.l
|
||||
$(LEX) -8 -I $(SRCDIR)/debug.l
|
||||
|
||||
clean::
|
||||
$(RM) y.tab.c y.tab.h lex.yy.c
|
||||
$(RM) y.tab.h
|
||||
|
||||
### Dependencies:
|
||||
|
|
|
@ -229,6 +229,17 @@ void DEBUG_EnterDebugger(void)
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DebugBreak16 (KERNEL.203)
|
||||
*/
|
||||
void DebugBreak16( SIGCONTEXT *regs )
|
||||
{
|
||||
const char *module = MODULE_GetModuleName( GetExePtr(GetCurrentTask()) );
|
||||
fprintf( stderr, "%s called DebugBreak\n", module ? module : "???" );
|
||||
wine_debug( SIGTRAP, regs );
|
||||
}
|
||||
|
||||
|
||||
void wine_debug( int signal, SIGCONTEXT *regs )
|
||||
{
|
||||
static int loaded_symbols = 0;
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
prefix = @prefix@
|
||||
sysconfdir = @sysconfdir@
|
||||
DEFS = -D__WINE__ -DETCDIR=\"$(sysconfdir)\"
|
||||
TOPSRC = @top_srcdir@
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = files
|
||||
|
||||
C_SRCS = \
|
||||
|
|
|
@ -80,7 +80,7 @@ static const FS_DESCR DRIVE_Filesystems[] =
|
|||
static DOSDRIVE DOSDrives[MAX_DOS_DRIVES];
|
||||
static int DRIVE_CurDrive = -1;
|
||||
|
||||
static HTASK DRIVE_LastTask = 0;
|
||||
static HTASK16 DRIVE_LastTask = 0;
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -1154,7 +1154,7 @@ LONG _hwrite( HFILE hFile, LPCSTR buffer, LONG count )
|
|||
*/
|
||||
UINT16 SetHandleCount16( UINT16 count )
|
||||
{
|
||||
HANDLE hPDB = GetCurrentPDB();
|
||||
HGLOBAL16 hPDB = GetCurrentPDB();
|
||||
PDB *pdb = (PDB *)GlobalLock16( hPDB );
|
||||
BYTE *files = PTR_SEG_TO_LIN( pdb->fileHandlesPtr );
|
||||
WORD i;
|
||||
|
@ -1198,7 +1198,7 @@ UINT16 SetHandleCount16( UINT16 count )
|
|||
#ifdef WINELIB
|
||||
newfiles = (BYTE *)GlobalAlloc32( GMEM_FIXED, count );
|
||||
#else
|
||||
HANDLE newhandle = GlobalAlloc16( GMEM_MOVEABLE, count );
|
||||
HGLOBAL16 newhandle = GlobalAlloc16( GMEM_MOVEABLE, count );
|
||||
if (!newhandle)
|
||||
{
|
||||
DOS_ERROR( ER_OutOfMemory, EC_OutOfResource, SA_Abort, EL_Memory );
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRC = @top_srcdir@
|
||||
MODULE = graphics
|
||||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = graphics
|
||||
|
||||
C_SRCS = \
|
||||
driver.c
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = metafiledrv
|
||||
|
||||
C_SRCS = \
|
||||
init.c
|
||||
|
||||
all: $(MODULE).o
|
||||
|
||||
@MAKE_RULES@
|
||||
|
||||
### Dependencies:
|
|
@ -0,0 +1,240 @@
|
|||
/*
|
||||
* Metafile driver initialisation functions
|
||||
*
|
||||
* Copyright 1996 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#include "metafiledrv.h"
|
||||
#include "dc.h"
|
||||
#include "heap.h"
|
||||
#include "global.h"
|
||||
#include "metafile.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
static BOOL32 MFDRV_DeleteDC( DC *dc );
|
||||
|
||||
static const DC_FUNCTIONS MFDRV_Funcs =
|
||||
{
|
||||
NULL, /* pArc */
|
||||
NULL, /* pBitBlt */
|
||||
NULL, /* pChord */
|
||||
NULL, /* pCreateDC */
|
||||
MFDRV_DeleteDC, /* pDeleteDC */
|
||||
NULL, /* pDeleteObject */
|
||||
NULL, /* pEllipse */
|
||||
NULL, /* pEscape */
|
||||
NULL, /* pExcludeClipRect */
|
||||
NULL, /* pExcludeVisRect */
|
||||
NULL, /* pExtFloodFill */
|
||||
NULL, /* pExtTextOut */
|
||||
NULL, /* pFillRgn */
|
||||
NULL, /* pFloodFill */
|
||||
NULL, /* pFrameRgn */
|
||||
NULL, /* pGetTextExtentPoint */
|
||||
NULL, /* pGetTextMetrics */
|
||||
NULL, /* pIntersectClipRect */
|
||||
NULL, /* pIntersectVisRect */
|
||||
NULL, /* pInvertRgn */
|
||||
NULL, /* pLineTo */
|
||||
NULL, /* pMoveToEx */
|
||||
NULL, /* pOffsetClipRgn */
|
||||
NULL, /* pOffsetViewportOrgEx */
|
||||
NULL, /* pOffsetWindowOrgEx */
|
||||
NULL, /* pPaintRgn */
|
||||
NULL, /* pPatBlt */
|
||||
NULL, /* pPie */
|
||||
NULL, /* pPolyPolygon */
|
||||
NULL, /* pPolygon */
|
||||
NULL, /* pPolyline */
|
||||
NULL, /* pRealizePalette */
|
||||
NULL, /* pRectangle */
|
||||
NULL, /* pRestoreDC */
|
||||
NULL, /* pRoundRect */
|
||||
NULL, /* pSaveDC */
|
||||
NULL, /* pScaleViewportExtEx */
|
||||
NULL, /* pScaleWindowExtEx */
|
||||
NULL, /* pSelectClipRgn */
|
||||
NULL, /* pSelectObject */
|
||||
NULL, /* pSelectPalette */
|
||||
NULL, /* pSetBkColor */
|
||||
NULL, /* pSetBkMode */
|
||||
NULL, /* pSetDIBitsToDevice */
|
||||
NULL, /* pSetMapMode */
|
||||
NULL, /* pSetMapperFlags */
|
||||
NULL, /* pSetPixel */
|
||||
NULL, /* pSetPolyFillMode */
|
||||
NULL, /* pSetROP2 */
|
||||
NULL, /* pSetRelAbs */
|
||||
NULL, /* pSetStretchBltMode */
|
||||
NULL, /* pSetTextAlign */
|
||||
NULL, /* pSetTextCharacterExtra */
|
||||
NULL, /* pSetTextColor */
|
||||
NULL, /* pSetTextJustification */
|
||||
NULL, /* pSetViewportExtEx */
|
||||
NULL, /* pSetViewportOrgEx */
|
||||
NULL, /* pSetWindowExtEx */
|
||||
NULL, /* pSetWindowOrgEx */
|
||||
NULL, /* pStretchBlt */
|
||||
NULL, /* pStretchDIBits */
|
||||
NULL /* pTextOut */
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* MFDRV_AllocMetaFile
|
||||
*/
|
||||
static DC *MFDRV_AllocMetaFile(void)
|
||||
{
|
||||
DC *dc;
|
||||
METAFILEDRV_PDEVICE *physDev;
|
||||
|
||||
if (!(dc = DC_AllocDC( &MFDRV_Funcs ))) return NULL;
|
||||
dc->header.wMagic = METAFILE_DC_MAGIC;
|
||||
|
||||
physDev = (METAFILEDRV_PDEVICE *)HeapAlloc(SystemHeap,0,sizeof(*physDev));
|
||||
if (!physDev)
|
||||
{
|
||||
GDI_HEAP_FREE( dc->hSelf );
|
||||
return NULL;
|
||||
}
|
||||
dc->physDev = physDev;
|
||||
|
||||
if (!(physDev->mh = HeapAlloc( SystemHeap, 0, sizeof(*physDev->mh) )))
|
||||
{
|
||||
HeapFree( SystemHeap, 0, physDev );
|
||||
GDI_HEAP_FREE( dc->hSelf );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
physDev->nextHandle = 0;
|
||||
|
||||
physDev->mh->mtHeaderSize = sizeof(METAHEADER) / sizeof(WORD);
|
||||
physDev->mh->mtVersion = 0x0300;
|
||||
physDev->mh->mtSize = physDev->mh->mtHeaderSize;
|
||||
physDev->mh->mtNoObjects = 0;
|
||||
physDev->mh->mtMaxRecord = 0;
|
||||
physDev->mh->mtNoParameters = 0;
|
||||
|
||||
/* DC_InitDC( dc ); */
|
||||
return dc;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* MFDRV_DeleteDC
|
||||
*/
|
||||
static BOOL32 MFDRV_DeleteDC( DC *dc )
|
||||
{
|
||||
METAFILEDRV_PDEVICE *physDev = (METAFILEDRV_PDEVICE *)dc->physDev;
|
||||
|
||||
if (physDev->mh) HeapFree( SystemHeap, 0, physDev->mh );
|
||||
HeapFree( SystemHeap, 0, physDev );
|
||||
dc->physDev = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* CreateMetafile16 (GDI.125)
|
||||
*/
|
||||
HDC16 CreateMetaFile16( LPCSTR filename )
|
||||
{
|
||||
DC *dc;
|
||||
METAFILEDRV_PDEVICE *physDev;
|
||||
HFILE hFile;
|
||||
|
||||
printf( "CreateMetafile16: '%s'\n", filename );
|
||||
dprintf_metafile( stddeb, "CreateMetaFile16: '%s'\n", filename );
|
||||
|
||||
if (!(dc = MFDRV_AllocMetaFile())) return 0;
|
||||
physDev = (METAFILEDRV_PDEVICE *)dc->physDev;
|
||||
|
||||
if (filename) /* disk based metafile */
|
||||
{
|
||||
physDev->mh->mtType = METAFILE_DISK;
|
||||
if ((hFile = _lcreat( filename, 0 )) == HFILE_ERROR)
|
||||
{
|
||||
DeleteDC( dc->hSelf );
|
||||
return 0;
|
||||
}
|
||||
if (_lwrite32( hFile, (LPSTR)physDev->mh,
|
||||
sizeof(*physDev->mh)) == HFILE_ERROR)
|
||||
{
|
||||
DeleteDC( dc->hSelf );
|
||||
return 0;
|
||||
}
|
||||
physDev->mh->mtNoParameters = hFile; /* store file descriptor here */
|
||||
/* windows probably uses this too*/
|
||||
}
|
||||
else /* memory based metafile */
|
||||
physDev->mh->mtType = METAFILE_MEMORY;
|
||||
|
||||
dprintf_metafile( stddeb, "CreateMetaFile16: returning %04x\n", dc->hSelf);
|
||||
return dc->hSelf;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************
|
||||
* CloseMetafile16 (GDI.126)
|
||||
*/
|
||||
HMETAFILE16 CloseMetaFile16( HDC16 hdc )
|
||||
{
|
||||
DC *dc;
|
||||
HMETAFILE16 hmf;
|
||||
HFILE hFile;
|
||||
METAFILEDRV_PDEVICE *physDev;
|
||||
|
||||
dprintf_metafile( stddeb, "CloseMetaFile(%04x)\n", hdc );
|
||||
|
||||
if (!(dc = DC_GetDCPtr( hdc ))) return 0;
|
||||
physDev = (METAFILEDRV_PDEVICE *)dc->physDev;
|
||||
|
||||
/* Construct the end of metafile record - this is documented
|
||||
* in SDK Knowledgebase Q99334.
|
||||
*/
|
||||
|
||||
if (!MF_MetaParam0(dc, META_EOF))
|
||||
{
|
||||
DeleteDC( hdc );
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (physDev->mh->mtType == METAFILE_DISK) /* disk based metafile */
|
||||
{
|
||||
hFile = physDev->mh->mtNoParameters;
|
||||
physDev->mh->mtNoParameters = 0;
|
||||
if (_llseek(hFile, 0L, 0) == HFILE_ERROR)
|
||||
{
|
||||
DeleteDC( hdc );
|
||||
return 0;
|
||||
}
|
||||
if (_lwrite32( hFile, (LPSTR)physDev->mh,
|
||||
sizeof(*physDev->mh)) == HFILE_ERROR)
|
||||
{
|
||||
DeleteDC( hdc );
|
||||
return 0;
|
||||
}
|
||||
_lclose(hFile);
|
||||
}
|
||||
|
||||
/* Now allocate a global handle for the metafile */
|
||||
|
||||
hmf = GLOBAL_CreateBlock( GMEM_MOVEABLE, physDev->mh,
|
||||
physDev->mh->mtSize * sizeof(WORD),
|
||||
GetCurrentPDB(), FALSE, FALSE, FALSE, NULL );
|
||||
physDev->mh = NULL; /* So it won't be deleted */
|
||||
DeleteDC( hdc );
|
||||
return hmf;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************
|
||||
* DeleteMetafile16 (GDI.127)
|
||||
*/
|
||||
BOOL16 DeleteMetaFile16( HMETAFILE16 hmf )
|
||||
{
|
||||
return !GlobalFree16( hmf );
|
||||
}
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRC = @top_srcdir@
|
||||
MODULE = win16drv
|
||||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = win16drv
|
||||
|
||||
C_SRCS = \
|
||||
font.c \
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRC = @top_srcdir@
|
||||
MODULE = x11drv
|
||||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = x11drv
|
||||
|
||||
C_SRCS = \
|
||||
font.c \
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRC = @top_srcdir@
|
||||
MODULE = if1632
|
||||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = if1632
|
||||
|
||||
DLLS = \
|
||||
DLLS = \
|
||||
advapi32.spec \
|
||||
comctl32.spec \
|
||||
comdlg32.spec \
|
||||
|
@ -75,7 +78,7 @@ all: checkbuild $(MODULE).o
|
|||
$(SPEC_FILES): $(BUILD)
|
||||
|
||||
$(BUILD) checkbuild:
|
||||
cd $(TOPSRC)/tools; $(SUBMAKE) build
|
||||
cd $(TOPOBJDIR)/tools; $(SUBMAKE) build
|
||||
|
||||
callfrom16.S: $(SPEC_FILES)
|
||||
$(BUILD) -callfrom16 `cat $(SPEC_FILES) | grep CallFrom16_ | sed 's/.*CallFrom16_\(.*\)/\1/' | sort | uniq` > callfrom16.S
|
||||
|
@ -83,13 +86,16 @@ callfrom16.S: $(SPEC_FILES)
|
|||
callfrom32.S: $(SPEC_FILES)
|
||||
$(BUILD) -callfrom32 `cat $(SPEC_FILES) | grep CallFrom32_ | sed 's/.*CallFrom32_\(.*\)/\1/' | sort | uniq` > callfrom32.S
|
||||
|
||||
callto16.S: $(TOPSRC)/include/callback.h $(BUILD)
|
||||
$(BUILD) -callto16 `cat $(TOPSRC)/include/callback.h | grep "extern.*CallTo16_" | sed 's/.*CallTo16_\(.*\)(.*/\1/' | sort | uniq` > callto16.S
|
||||
callto16.S: $(TOPSRCDIR)/include/callback.h $(BUILD)
|
||||
$(BUILD) -callto16 `cat $(TOPSRCDIR)/include/callback.h | grep "extern.*CallTo16_" | sed 's/.*CallTo16_\(.*\)(.*/\1/' | sort | uniq` > callto16.S
|
||||
|
||||
callto32.S: $(TOPSRC)/include/callback.h $(BUILD)
|
||||
$(BUILD) -callto32 `cat $(TOPSRC)/include/callback.h | grep "extern.*CallTo32_" | sed 's/.*CallTo32_\(.*\)(.*/\1/' | sort | uniq` > callto32.S
|
||||
callto32.S: $(TOPSRCDIR)/include/callback.h $(BUILD)
|
||||
$(BUILD) -callto32 `cat $(TOPSRCDIR)/include/callback.h | grep "extern.*CallTo32_" | sed 's/.*CallTo32_\(.*\)(.*/\1/' | sort | uniq` > callto32.S
|
||||
|
||||
except.o: except.S $(TOPOBJDIR)/include/config.h
|
||||
$(CC) -c $(DIVINCL) -o $*.o $(SRCDIR)/except.S
|
||||
|
||||
clean::
|
||||
rm -f $(SPEC_FILES) callfrom16.S callfrom32.S callto16.S callto32.S
|
||||
$(RM) $(SPEC_FILES) callfrom16.S callfrom32.S callto16.S callto32.S
|
||||
|
||||
### Dependencies:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (c) 1996 Onno Hovers, (onno@stack.urc.tue.nl)
|
||||
*
|
||||
*/
|
||||
#include "../include/config.h"
|
||||
#include "config.h"
|
||||
|
||||
#ifdef NEED_UNDERSCORE_PREFIX
|
||||
|
||||
|
|
|
@ -121,9 +121,9 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
|||
#122 pascal ReSurRection
|
||||
123 pascal16 PlayMetaFile(word word) PlayMetaFile
|
||||
124 pascal16 GetMetaFile(ptr) GetMetaFile
|
||||
125 pascal16 CreateMetaFile(ptr) CreateMetaFile
|
||||
126 pascal16 CloseMetaFile(word) CloseMetaFile
|
||||
127 pascal16 DeleteMetaFile(word) DeleteMetaFile
|
||||
125 pascal16 CreateMetaFile(ptr) CreateMetaFile16
|
||||
126 pascal16 CloseMetaFile(word) CloseMetaFile16
|
||||
127 pascal16 DeleteMetaFile(word) DeleteMetaFile16
|
||||
128 pascal16 MulDiv(s_word s_word s_word) MulDiv16
|
||||
129 pascal16 SaveVisRgn(word) SaveVisRgn
|
||||
130 pascal16 RestoreVisRgn(word) RestoreVisRgn
|
||||
|
@ -157,8 +157,8 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
|||
180 pascal16 SetDCState(word word) SetDCState
|
||||
181 pascal16 RectInRegionOld(word ptr) RectInRegion16
|
||||
188 stub GetTextExtentEx
|
||||
190 pascal16 SetDCHook(word segptr long) SetDCHook
|
||||
191 pascal GetDCHook(word ptr) GetDCHook
|
||||
190 pascal16 SetDCHook(word segptr long) THUNK_SetDCHook
|
||||
191 pascal GetDCHook(word ptr) THUNK_GetDCHook
|
||||
192 pascal16 SetHookFlags(word word) SetHookFlags
|
||||
193 stub SetBoundsRect
|
||||
194 stub GetBoundsRect
|
||||
|
@ -352,6 +352,26 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
|||
527 stub SetMiterLimit
|
||||
528 stub GDIParametersInfo
|
||||
529 stub CreateHalftonePalette
|
||||
# Stubs for Hebrew version
|
||||
530 pascal16 GDI_530() stub_GDI_530
|
||||
531 pascal16 GDI_531() stub_GDI_531
|
||||
532 pascal16 GDI_532() stub_GDI_532
|
||||
536 pascal16 GDI_536() stub_GDI_536
|
||||
538 pascal16 GDI_538() stub_GDI_538
|
||||
540 pascal16 GDI_540() stub_GDI_540
|
||||
543 pascal16 GDI_543() stub_GDI_543
|
||||
555 pascal16 GDI_555() stub_GDI_555
|
||||
560 pascal16 GDI_560() stub_GDI_560
|
||||
561 pascal16 GDI_561() stub_GDI_561
|
||||
564 pascal16 GDI_564() stub_GDI_564
|
||||
565 pascal16 GDI_565() stub_GDI_565
|
||||
566 pascal16 GDI_566() stub_GDI_566
|
||||
571 pascal16 GDI_571() stub_GDI_571
|
||||
572 pascal16 GDI_572() stub_GDI_572
|
||||
573 pascal16 GDI_573() stub_GDI_573
|
||||
556 pascal16 GDI_556() stub_GDI_556
|
||||
558 pascal16 GDI_558() stub_GDI_558
|
||||
569 pascal16 GDI_569() stub_GDI_569
|
||||
602 stub SetDIBColorTable
|
||||
603 stub GetDIBColorTable
|
||||
604 stub SetSolidBrush
|
||||
|
@ -377,23 +397,3 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
|||
822 stub ICMTranslateRGB
|
||||
823 stub ICMTranslateRGBs
|
||||
824 stub ICMCheckCOlorsInGamut
|
||||
# Stubs for Hebrew version
|
||||
530 pascal16 GDI_530() stub_GDI_530
|
||||
531 pascal16 GDI_531() stub_GDI_531
|
||||
532 pascal16 GDI_532() stub_GDI_532
|
||||
536 pascal16 GDI_536() stub_GDI_536
|
||||
538 pascal16 GDI_538() stub_GDI_538
|
||||
540 pascal16 GDI_540() stub_GDI_540
|
||||
543 pascal16 GDI_543() stub_GDI_543
|
||||
555 pascal16 GDI_555() stub_GDI_555
|
||||
560 pascal16 GDI_560() stub_GDI_560
|
||||
561 pascal16 GDI_561() stub_GDI_561
|
||||
564 pascal16 GDI_564() stub_GDI_564
|
||||
565 pascal16 GDI_565() stub_GDI_565
|
||||
566 pascal16 GDI_566() stub_GDI_566
|
||||
571 pascal16 GDI_571() stub_GDI_571
|
||||
572 pascal16 GDI_572() stub_GDI_572
|
||||
573 pascal16 GDI_573() stub_GDI_573
|
||||
556 pascal16 GDI_556() stub_GDI_556
|
||||
558 pascal16 GDI_558() stub_GDI_558
|
||||
569 pascal16 GDI_569() stub_GDI_569
|
||||
|
|
|
@ -213,7 +213,7 @@ base 1
|
|||
0206 stdcall GetObjectW(long long ptr) GetObject32W
|
||||
0207 stub GetOutlineTextMetricsA
|
||||
0208 stub GetOutlineTextMetricsW
|
||||
0209 stub GetPaletteEntries
|
||||
0209 stdcall GetPaletteEntries(long long long ptr) GetPaletteEntries
|
||||
0210 stub GetPath
|
||||
0211 stdcall GetPixel(long long long) GetPixel
|
||||
0212 stub GetPixelFormat
|
||||
|
|
|
@ -151,9 +151,9 @@ type win16
|
|||
150 pascal16 DirectedYield(word) DirectedYield
|
||||
151 stub WinOldApCall
|
||||
152 pascal16 GetNumTasks() GetNumTasks
|
||||
154 return GlobalNotify 4 0
|
||||
154 pascal16 GlobalNotify(segptr) GlobalNotify
|
||||
155 pascal16 GetTaskDS() GetTaskDS
|
||||
156 stub LimitEMSPages
|
||||
156 return LimitEMSPages 4 0
|
||||
157 return GetCurPID 4 0
|
||||
158 return IsWinOldApTask 2 0
|
||||
159 stub GlobalHandleNoRIP
|
||||
|
@ -200,7 +200,7 @@ type win16
|
|||
200 stub ValidateFreeSpaces
|
||||
201 stub ReplaceInst
|
||||
202 stub RegisterPtrace
|
||||
203 stub DebugBreak
|
||||
203 register DebugBreak() DebugBreak16
|
||||
204 stub SwapRecording
|
||||
205 stub CVWBreak
|
||||
206 pascal16 AllocSelectorArray(word) AllocSelectorArray
|
||||
|
|
|
@ -44,7 +44,6 @@ BOOL32 RELAY_Init(void)
|
|||
codesel );
|
||||
CALLTO16_RetAddr_long=MAKELONG( (int)CALLTO16_Ret_long-(int)CALLTO16_Start,
|
||||
codesel );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
155
if1632/thunk.c
155
if1632/thunk.c
|
@ -6,27 +6,36 @@
|
|||
|
||||
#include "windows.h"
|
||||
#include "callback.h"
|
||||
#include "heap.h"
|
||||
#include "hook.h"
|
||||
#include "module.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
#include "heap.h"
|
||||
|
||||
typedef void (*RELAY)();
|
||||
|
||||
typedef struct
|
||||
#pragma pack(1)
|
||||
|
||||
typedef struct tagTHUNK
|
||||
{
|
||||
BYTE popl_eax; /* 0x58 popl %eax (return address) */
|
||||
BYTE pushl_func; /* 0x68 pushl $proc */
|
||||
FARPROC32 proc WINE_PACKED;
|
||||
BYTE pushl_eax; /* 0x50 pushl %eax */
|
||||
BYTE jmp; /* 0xe9 jmp relay (relative jump)*/
|
||||
RELAY relay WINE_PACKED;
|
||||
BYTE popl_eax; /* 0x58 popl %eax (return address)*/
|
||||
BYTE pushl_func; /* 0x68 pushl $proc */
|
||||
FARPROC32 proc WINE_PACKED;
|
||||
BYTE pushl_eax; /* 0x50 pushl %eax */
|
||||
BYTE jmp; /* 0xe9 jmp relay (relative jump)*/
|
||||
RELAY relay WINE_PACKED;
|
||||
struct tagTHUNK *next WINE_PACKED;
|
||||
} THUNK;
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
#define DECL_THUNK(name,proc,relay) \
|
||||
THUNK name = { 0x58, 0x68, (FARPROC32)(proc), 0x50, 0xe9, \
|
||||
(RELAY)((char *)(relay) - (char *)(&(name) + 1)) }
|
||||
(RELAY)((char *)(relay) - (char *)(&(name).next)), NULL }
|
||||
|
||||
|
||||
static THUNK *firstThunk = NULL;
|
||||
|
||||
/***********************************************************************
|
||||
* THUNK_Alloc
|
||||
*/
|
||||
|
@ -40,18 +49,42 @@ static THUNK *THUNK_Alloc( FARPROC32 func, RELAY relay )
|
|||
thunk->proc = func;
|
||||
thunk->pushl_eax = 0x50;
|
||||
thunk->jmp = 0xe9;
|
||||
thunk->relay = relay;
|
||||
thunk->relay = (RELAY)((char *)relay - (char *)(&thunk->next));
|
||||
thunk->next = firstThunk;
|
||||
firstThunk = thunk;
|
||||
}
|
||||
return thunk;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* THUNK_Find
|
||||
*/
|
||||
static THUNK *THUNK_Find( FARPROC32 func )
|
||||
{
|
||||
THUNK *thunk = firstThunk;
|
||||
while (thunk && (thunk->proc != func)) thunk = thunk->next;
|
||||
return thunk;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* THUNK_Free
|
||||
*/
|
||||
static void THUNK_Free( THUNK *thunk )
|
||||
void THUNK_Free( THUNK *thunk )
|
||||
{
|
||||
HeapFree( SystemHeap, 0, thunk );
|
||||
if (HEAP_IsInsideHeap( SystemHeap, 0, thunk ))
|
||||
{
|
||||
THUNK **prev = &firstThunk;
|
||||
while (*prev && (*prev != thunk)) prev = &(*prev)->next;
|
||||
if (*prev)
|
||||
{
|
||||
*prev = thunk->next;
|
||||
HeapFree( SystemHeap, 0, thunk );
|
||||
return;
|
||||
}
|
||||
}
|
||||
fprintf( stderr, "THUNK_Free: invalid thunk addr %p\n", thunk );
|
||||
}
|
||||
|
||||
|
||||
|
@ -251,6 +284,104 @@ BOOL16 THUNK_GrayString16( HDC16 hdc, HBRUSH16 hbr, GRAYSTRINGPROC16 func,
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* THUNK_SetWindowsHook16 (USER.121)
|
||||
*/
|
||||
FARPROC16 THUNK_SetWindowsHook16( INT16 id, HOOKPROC16 proc )
|
||||
{
|
||||
HINSTANCE16 hInst = FarGetOwner( HIWORD(proc) );
|
||||
HTASK16 hTask = (id == WH_MSGFILTER) ? GetCurrentTask() : 0;
|
||||
THUNK *thunk = THUNK_Alloc( (FARPROC16)proc, (RELAY)CallTo16_long_wwl );
|
||||
if (!thunk) return 0;
|
||||
return (FARPROC16)SetWindowsHookEx16( id, (HOOKPROC16)thunk, hInst, hTask);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* THUNK_UnhookWindowsHook16 (USER.234)
|
||||
*/
|
||||
BOOL16 THUNK_UnhookWindowsHook16( INT16 id, HOOKPROC16 proc )
|
||||
{
|
||||
BOOL16 ret = FALSE;
|
||||
THUNK *thunk = THUNK_Find( (FARPROC16)proc );
|
||||
if (thunk) ret = UnhookWindowsHook16( id, (HOOKPROC16)thunk );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* THUNK_SetWindowsHookEx16 (USER.291)
|
||||
*/
|
||||
HHOOK THUNK_SetWindowsHookEx16( INT16 id, HOOKPROC16 proc, HINSTANCE16 hInst,
|
||||
HTASK16 hTask )
|
||||
{
|
||||
THUNK *thunk = THUNK_Alloc( (FARPROC16)proc, (RELAY)CallTo16_long_wwl );
|
||||
if (!thunk) return 0;
|
||||
return SetWindowsHookEx16( id, (HOOKPROC16)thunk, hInst, hTask );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* THUNK_UnhookWindowHookEx16 (USER.292)
|
||||
*/
|
||||
BOOL16 THUNK_UnhookWindowsHookEx16( HHOOK hhook )
|
||||
{
|
||||
THUNK *thunk = (THUNK *)HOOK_GetProc16( hhook );
|
||||
BOOL16 ret = UnhookWindowsHookEx16( hhook );
|
||||
THUNK_Free( thunk );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static FARPROC16 defDCHookProc = NULL;
|
||||
|
||||
/***********************************************************************
|
||||
* THUNK_SetDCHook (GDI.190)
|
||||
*/
|
||||
BOOL16 THUNK_SetDCHook( HDC16 hdc, FARPROC16 proc, DWORD dwHookData )
|
||||
{
|
||||
THUNK *thunk, *oldThunk;
|
||||
|
||||
if (!defDCHookProc) /* Get DCHook Win16 entry point */
|
||||
defDCHookProc = MODULE_GetEntryPoint( GetModuleHandle("USER"), 362 );
|
||||
|
||||
if (proc != defDCHookProc)
|
||||
{
|
||||
thunk = THUNK_Alloc( proc, (RELAY)CallTo16_word_wwll );
|
||||
if (!thunk) return FALSE;
|
||||
}
|
||||
else thunk = (THUNK *)DCHook;
|
||||
|
||||
/* Free the previous thunk */
|
||||
GetDCHook( hdc, (FARPROC16 *)&oldThunk );
|
||||
if (oldThunk && (oldThunk != (THUNK *)DCHook)) THUNK_Free( oldThunk );
|
||||
|
||||
return SetDCHook( hdc, (FARPROC16)thunk, dwHookData );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* THUNK_GetDCHook (GDI.191)
|
||||
*/
|
||||
DWORD THUNK_GetDCHook( HDC16 hdc, FARPROC16 *phookProc )
|
||||
{
|
||||
THUNK *thunk = NULL;
|
||||
DWORD ret = GetDCHook( hdc, (FARPROC16 *)&thunk );
|
||||
if (thunk)
|
||||
{
|
||||
if (thunk == (THUNK *)DCHook)
|
||||
{
|
||||
if (!defDCHookProc) /* Get DCHook Win16 entry point */
|
||||
defDCHookProc = MODULE_GetEntryPoint( GetModuleHandle("USER"),
|
||||
362 );
|
||||
*phookProc = defDCHookProc;
|
||||
}
|
||||
else *phookProc = thunk->proc;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
struct thunkstruct
|
||||
{
|
||||
char magic[4];
|
||||
|
|
|
@ -6,7 +6,7 @@ heap 65520
|
|||
2 stub OldExitWindows
|
||||
3 stub EnableOEMLayer
|
||||
4 stub DisableOEMLayer
|
||||
5 pascal16 InitApp(word) USER_InitApp
|
||||
5 pascal16 InitApp(word) InitApp
|
||||
6 pascal16 PostQuitMessage(word) PostQuitMessage
|
||||
7 pascal16 ExitWindows(long word) ExitWindows
|
||||
10 pascal16 SetTimer(word word word segptr) SetTimer16
|
||||
|
@ -115,12 +115,12 @@ heap 65520
|
|||
113 pascal16 TranslateMessage(ptr) TranslateMessage
|
||||
114 pascal DispatchMessage(ptr) DispatchMessage
|
||||
115 pascal16 ReplyMessage(long) ReplyMessage
|
||||
116 pascal16 PostAppMessage(word word word long) PostAppMessage
|
||||
116 pascal16 PostAppMessage(word word word long) PostAppMessage16
|
||||
118 pascal16 RegisterWindowMessage(segptr) RegisterWindowMessage16
|
||||
117 pascal16 WindowFromDC(word) WindowFromDC16
|
||||
119 pascal GetMessagePos() GetMessagePos
|
||||
120 pascal GetMessageTime() GetMessageTime
|
||||
121 pascal SetWindowsHook(s_word segptr) SetWindowsHook
|
||||
121 pascal SetWindowsHook(s_word segptr) THUNK_SetWindowsHook16
|
||||
122 pascal CallWindowProc(segptr word word word long) CallWindowProc16
|
||||
123 pascal16 CallMsgFilter(segptr s_word) CallMsgFilter
|
||||
124 pascal16 UpdateWindow(word) UpdateWindow
|
||||
|
@ -227,14 +227,14 @@ heap 65520
|
|||
224 pascal16 GetWindowTask(word) GetWindowTask16
|
||||
225 pascal16 EnumTaskWindows(word segptr long) THUNK_EnumTaskWindows16
|
||||
226 stub LockInput
|
||||
227 pascal16 GetNextDlgGroupItem(word word word) GetNextDlgGroupItem
|
||||
228 pascal16 GetNextDlgTabItem(word word word) GetNextDlgTabItem
|
||||
227 pascal16 GetNextDlgGroupItem(word word word) GetNextDlgGroupItem16
|
||||
228 pascal16 GetNextDlgTabItem(word word word) GetNextDlgTabItem16
|
||||
229 pascal16 GetTopWindow(word) GetTopWindow
|
||||
230 pascal16 GetNextWindow(word word) GetNextWindow
|
||||
231 stub GetSystemDebugState
|
||||
232 pascal16 SetWindowPos(word word word word word word word) SetWindowPos
|
||||
233 pascal16 SetParent(word word) SetParent
|
||||
234 pascal16 UnhookWindowsHook(s_word segptr) UnhookWindowsHook
|
||||
234 pascal16 UnhookWindowsHook(s_word segptr) THUNK_UnhookWindowsHook16
|
||||
235 pascal DefHookProc(s_word word long ptr) DefHookProc
|
||||
236 pascal16 GetCapture() GetCapture16
|
||||
237 pascal16 GetUpdateRgn(word word word) GetUpdateRgn
|
||||
|
@ -294,8 +294,8 @@ heap 65520
|
|||
288 pascal GetMessageExtraInfo() GetMessageExtraInfo
|
||||
#289 KEYB_EVENT
|
||||
290 pascal16 RedrawWindow(word ptr word word) RedrawWindow16
|
||||
291 pascal SetWindowsHookEx(s_word segptr word word) SetWindowsHookEx
|
||||
292 pascal16 UnhookWindowsHookEx(segptr) UnhookWindowsHookEx
|
||||
291 pascal SetWindowsHookEx(s_word segptr word word) THUNK_SetWindowsHookEx16
|
||||
292 pascal16 UnhookWindowsHookEx(segptr) THUNK_UnhookWindowsHookEx16
|
||||
293 pascal CallNextHookEx(segptr s_word word long) CallNextHookEx
|
||||
294 stub LockWindowUpdate
|
||||
299 register Mouse_Event() Mouse_Event
|
||||
|
|
|
@ -132,7 +132,7 @@ base 1
|
|||
0125 stdcall DefWindowProcA(long long long long) DefWindowProc32A
|
||||
0126 stdcall DefWindowProcW(long long long long) DefWindowProc32W
|
||||
0127 stdcall DeferWindowPos(long long long long long long long long) DeferWindowPos
|
||||
0128 stdcall DeleteMenu(long) DeleteMenu
|
||||
0128 stdcall DeleteMenu(long long long) DeleteMenu
|
||||
0129 stub DestroyAcceleratorTable
|
||||
0130 stdcall DestroyCaret() DestroyCaret
|
||||
0131 stub DestroyCursor
|
||||
|
@ -278,8 +278,8 @@ base 1
|
|||
0271 stub GetMessagePos
|
||||
0272 stub GetMessageTime
|
||||
0273 stdcall GetMessageW(ptr long long long) USER32_GetMessageA
|
||||
0274 stub GetNextDlgGroupItem
|
||||
0275 stub GetNextDlgTabItem
|
||||
0274 stdcall GetNextDlgGroupItem(long long long) GetNextDlgGroupItem32
|
||||
0275 stdcall GetNextDlgTabItem(long long long) GetNextDlgTabItem32
|
||||
0276 stub GetOpenClipboardWindow
|
||||
0277 stdcall GetParent(long) GetParent32
|
||||
0278 stub GetPriorityClipboardFormat
|
||||
|
@ -498,7 +498,7 @@ base 1
|
|||
0491 stub SetMenuItemInfoW
|
||||
0492 stub SetMessageExtraInfo
|
||||
0493 stdcall SetMessageQueue(long) SetMessageQueue
|
||||
0494 stub SetParent
|
||||
0494 stdcall SetParent(long long) SetParent
|
||||
0495 stub SetProcessWindowStation
|
||||
0496 stdcall SetPropA(long ptr long) SetProp32A
|
||||
0497 stdcall SetPropW(long ptr long) SetProp32W
|
||||
|
|
|
@ -133,7 +133,7 @@ type win32
|
|||
0132 stub mmioStringToFOURCCW
|
||||
0133 stub mmioWrite
|
||||
0134 stub mmsystemGetVersion
|
||||
0135 stub sndPlaySoundA
|
||||
0135 stdcall sndPlaySoundA(ptr long) sndPlaySound
|
||||
0136 stub sndPlaySoundW
|
||||
0137 stub timeBeginPeriod
|
||||
0138 stub timeEndPeriod
|
||||
|
|
|
@ -18,7 +18,7 @@ typedef struct
|
|||
|
||||
extern BOOL BRUSH_Init(void);
|
||||
extern int BRUSH_GetObject( BRUSHOBJ * brush, int count, LPSTR buffer );
|
||||
extern BOOL BRUSH_DeleteObject( HBRUSH hbrush, BRUSHOBJ * brush );
|
||||
extern HBRUSH BRUSH_SelectObject( DC * dc, HBRUSH hbrush, BRUSHOBJ * brush );
|
||||
extern BOOL32 BRUSH_DeleteObject( HBRUSH16 hbrush, BRUSHOBJ * brush );
|
||||
extern HBRUSH16 BRUSH_SelectObject(DC * dc, HBRUSH16 hbrush, BRUSHOBJ * brush);
|
||||
|
||||
#endif /* __WINE_BRUSH_H */
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
/* broken enough to rely on this :-) */
|
||||
typedef struct
|
||||
{
|
||||
WORD state; /* Current state */
|
||||
HFONT hFont; /* Button font (or 0 for system font) */
|
||||
WORD state; /* Current state */
|
||||
HFONT16 hFont; /* Button font (or 0 for system font) */
|
||||
} BUTTONINFO;
|
||||
|
||||
/* Button state values */
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
extern
|
||||
int CallTo32_LargeStack( int (*func)(), int nbargs, ... );
|
||||
|
||||
|
||||
/* List of the 16-bit callback functions. This list is used */
|
||||
/* by the build program to generate the file if1632/callto16.S */
|
||||
|
||||
|
@ -51,12 +50,8 @@ extern LONG CallTo16_long_lwwllwlllllw( FARPROC16, LONG, WORD, WORD, LONG,
|
|||
extern WORD CallTo16_regs_( FARPROC16 func, WORD ds, WORD es, WORD bp, WORD ax,
|
||||
WORD bx, WORD cx, WORD dx, WORD si, WORD di );
|
||||
|
||||
#define CallDCHookProc( func, hdc, code, data, lparam) \
|
||||
CallTo16_word_wwll( func, hdc, code, data, lparam )
|
||||
#define CallDriverProc( func, dwId, msg, hdrvr, lparam1, lparam2 ) \
|
||||
CallTo16_long_lwwll( func, dwId, msg, hdrvr, lparam1, lparam2 )
|
||||
#define CallHookProc( func, code, wParam, lParam ) \
|
||||
CallTo16_long_wwl( func, code, wParam, lParam )
|
||||
#define CallTimeFuncProc( func, id, msg, dwUser, dw1, dw2 ) \
|
||||
CallTo16_word_wwlll( func, id, msg, dwUser, dw1, dw2 )
|
||||
#define CallWindowsExitProc( func, nExitType ) \
|
||||
|
@ -72,7 +67,6 @@ extern WORD CallTo16_regs_( FARPROC16 func, WORD ds, WORD es, WORD bp, WORD ax,
|
|||
style, MAKELONG(y,x), MAKELONG(cy,cx), \
|
||||
MAKELONG(hmenu,hparent), instance, params, \
|
||||
hwnd, msg, wParam, lParam )
|
||||
#define _InitTermProc( func ) CallTo32_0( (FARPROC32)func )
|
||||
|
||||
|
||||
/* List of the 32-bit callback functions. This list is used */
|
||||
|
@ -93,12 +87,8 @@ extern LONG CallTo32_4( FARPROC32, DWORD, DWORD, DWORD, DWORD );
|
|||
|
||||
#else /* WINELIB */
|
||||
|
||||
#define CallDCHookProc( func, hdc, code, data, lparam ) \
|
||||
(*func)( hdc, code, data, lparam )
|
||||
#define CallDriverProc( func, dwId, msg, hdrvr, lparam1, lparam2 ) \
|
||||
(*func)( dwId, msg, hdrvr, lparam1, lparam2 )
|
||||
#define CallHookProc( func, code, wParam, lParam ) \
|
||||
(*func)( code, wParam, lParam )
|
||||
#define CallTimeFuncProc( func, id, msg, dwUser, dw1, dw2 ) \
|
||||
(*func)( id, msg, dwUser, dw1, dw2 )
|
||||
#define CallWindowsExitProc( func, nExitType ) \
|
||||
|
@ -109,8 +99,6 @@ extern LONG CallTo32_4( FARPROC32, DWORD, DWORD, DWORD, DWORD );
|
|||
(*func)( hwnd, msg, wParam, lParam )
|
||||
#define CallWordBreakProc( func, lpch, ichCurrent, cch, code ) \
|
||||
(*func)( lpch, ichCurrent, cch, code )
|
||||
#define _InitTermProc( func ) (*func)()
|
||||
|
||||
|
||||
#endif /* WINELIB */
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ extern "C" {
|
|||
typedef struct {
|
||||
DWORD lStructSize;
|
||||
HWND hwndOwner;
|
||||
HINSTANCE hInstance;
|
||||
HINSTANCE16 hInstance;
|
||||
SEGPTR lpstrFilter;
|
||||
SEGPTR lpstrCustomFilter;
|
||||
DWORD nMaxCustFilter;
|
||||
|
@ -96,7 +96,7 @@ typedef CHOOSECOLOR *LPCHOOSECOLOR;
|
|||
typedef struct {
|
||||
DWORD lStructSize; /* size of this struct 0x20 */
|
||||
HWND hwndOwner; /* handle to owner's window */
|
||||
HINSTANCE hInstance; /* instance handle of.EXE that */
|
||||
HINSTANCE16 hInstance; /* instance handle of.EXE that */
|
||||
/* contains cust. dlg. template */
|
||||
DWORD Flags; /* one or more of the FR_?? */
|
||||
SEGPTR lpstrFindWhat; /* ptr. to search string */
|
||||
|
@ -141,7 +141,7 @@ typedef struct {
|
|||
LPARAM lCustData; /* data passed to hook fn. */
|
||||
WNDPROC16 lpfnHook;
|
||||
SEGPTR lpTemplateName; /* custom template name */
|
||||
HINSTANCE hInstance; /* instance handle of.EXE that */
|
||||
HINSTANCE16 hInstance; /* instance handle of.EXE that */
|
||||
/* contains cust. dlg. template */
|
||||
SEGPTR lpszStyle WINE_PACKED; /* return the style field here */
|
||||
/* must be LF_FACESIZE or bigger */
|
||||
|
@ -215,7 +215,7 @@ typedef struct {
|
|||
UINT nMinPage;
|
||||
UINT nMaxPage;
|
||||
UINT nCopies;
|
||||
HINSTANCE hInstance;
|
||||
HINSTANCE16 hInstance;
|
||||
LPARAM lCustData;
|
||||
WNDPROC16 lpfnPrintHook;
|
||||
WNDPROC16 lpfnSetupHook;
|
||||
|
|
13
include/dc.h
13
include/dc.h
|
@ -14,12 +14,13 @@
|
|||
#define CLIP_EXCLUDE 0x0002
|
||||
#define CLIP_KEEPRGN 0x0004
|
||||
|
||||
extern void DC_InitDC( DC* dc );
|
||||
extern BOOL DC_SetupGCForPatBlt( DC * dc, GC gc, BOOL fMapColors );
|
||||
extern BOOL DC_SetupGCForBrush( DC * dc );
|
||||
extern BOOL DC_SetupGCForPen( DC * dc );
|
||||
extern BOOL DC_SetupGCForText( DC * dc );
|
||||
extern BOOL DC_CallHookProc( DC * dc, WORD code, LPARAM lParam );
|
||||
extern DC * DC_AllocDC( const DC_FUNCTIONS *funcs );
|
||||
extern DC * DC_GetDCPtr( HDC32 hdc );
|
||||
extern void DC_InitDC( DC * dc );
|
||||
extern BOOL32 DC_SetupGCForPatBlt( DC * dc, GC gc, BOOL32 fMapColors );
|
||||
extern BOOL32 DC_SetupGCForBrush( DC * dc );
|
||||
extern BOOL32 DC_SetupGCForPen( DC * dc );
|
||||
extern BOOL32 DC_SetupGCForText( DC * dc );
|
||||
|
||||
extern const int DC_XROPfunction[];
|
||||
|
||||
|
|
|
@ -19,16 +19,15 @@ typedef struct
|
|||
INT32 msgResult; /* Result of EndDialog() / Default button id */
|
||||
HWINDOWPROC dlgProc; /* Dialog procedure */
|
||||
LONG userInfo; /* User information (for DWL_USER) */
|
||||
HWND hwndFocus; /* Current control with focus */
|
||||
HFONT hUserFont; /* Dialog font */
|
||||
HMENU hMenu; /* Dialog menu */
|
||||
HWND16 hwndFocus; /* Current control with focus */
|
||||
HFONT16 hUserFont; /* Dialog font */
|
||||
HMENU16 hMenu; /* Dialog menu */
|
||||
WORD xBaseUnit; /* Dialog units (depends on the font) */
|
||||
WORD yBaseUnit;
|
||||
WORD fEnd; /* EndDialog() called for this dialog */
|
||||
HANDLE hDialogHeap;
|
||||
HGLOBAL16 hDialogHeap;
|
||||
} DIALOGINFO;
|
||||
|
||||
extern BOOL DIALOG_Init(void);
|
||||
extern HWND DIALOG_GetFirstTabItem( HWND hwndDlg );
|
||||
extern BOOL32 DIALOG_Init(void);
|
||||
|
||||
#endif /* DIALOG_H */
|
||||
|
|
|
@ -75,9 +75,6 @@ typedef struct
|
|||
int flags;
|
||||
const DeviceCaps *devCaps;
|
||||
|
||||
HMETAFILE16 hMetaFile;
|
||||
HGLOBAL16 hHT; /* Handle table for metafile */
|
||||
WORD HTLen; /* Handle table length (in entries) */
|
||||
HRGN16 hClipRgn; /* Clip region (may be 0) */
|
||||
HRGN16 hVisRgn; /* Visible region (must never be 0) */
|
||||
HRGN16 hGCClipRgn; /* GC clip region (ClipRgn AND VisRgn) */
|
||||
|
@ -130,7 +127,7 @@ typedef X11DRV_PDEVICE X_DC_INFO; /* Temporary */
|
|||
typedef struct tagDC
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
HDC16 hSelf; /* Handle to this DC */
|
||||
HDC32 hSelf; /* Handle to this DC */
|
||||
const struct tagDC_FUNCS *funcs; /* DC function table */
|
||||
void *physDev; /* Physical device (driver-specific) */
|
||||
WORD saveLevel;
|
||||
|
@ -235,28 +232,28 @@ typedef struct tagDC_FUNCS
|
|||
|
||||
#define NB_STOCK_OBJECTS (SYSTEM_FIXED_FONT + 1)
|
||||
|
||||
#define STOCK_WHITE_BRUSH ((HBRUSH)(FIRST_STOCK_HANDLE+WHITE_BRUSH))
|
||||
#define STOCK_LTGRAY_BRUSH ((HBRUSH)(FIRST_STOCK_HANDLE+LTGRAY_BRUSH))
|
||||
#define STOCK_GRAY_BRUSH ((HBRUSH)(FIRST_STOCK_HANDLE+GRAY_BRUSH))
|
||||
#define STOCK_DKGRAY_BRUSH ((HBRUSH)(FIRST_STOCK_HANDLE+DKGRAY_BRUSH))
|
||||
#define STOCK_BLACK_BRUSH ((HBRUSH)(FIRST_STOCK_HANDLE+BLACK_BRUSH))
|
||||
#define STOCK_NULL_BRUSH ((HBRUSH)(FIRST_STOCK_HANDLE+NULL_BRUSH))
|
||||
#define STOCK_HOLLOW_BRUSH ((HBRUSH)(FIRST_STOCK_HANDLE+HOLLOW_BRUSH))
|
||||
#define STOCK_WHITE_PEN ((HPEN16)(FIRST_STOCK_HANDLE+WHITE_PEN))
|
||||
#define STOCK_BLACK_PEN ((HPEN16)(FIRST_STOCK_HANDLE+BLACK_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_ANSI_FIXED_FONT ((HFONT)(FIRST_STOCK_HANDLE+ANSI_FIXED_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_DEVICE_DEFAULT_FONT ((HFONT)(FIRST_STOCK_HANDLE+DEVICE_DEFAULT_FONT))
|
||||
#define STOCK_DEFAULT_PALETTE ((HPALETTE16)(FIRST_STOCK_HANDLE+DEFAULT_PALETTE))
|
||||
#define STOCK_SYSTEM_FIXED_FONT ((HFONT)(FIRST_STOCK_HANDLE+SYSTEM_FIXED_FONT))
|
||||
#define STOCK_WHITE_BRUSH ((HBRUSH16)(FIRST_STOCK_HANDLE+WHITE_BRUSH))
|
||||
#define STOCK_LTGRAY_BRUSH ((HBRUSH16)(FIRST_STOCK_HANDLE+LTGRAY_BRUSH))
|
||||
#define STOCK_GRAY_BRUSH ((HBRUSH16)(FIRST_STOCK_HANDLE+GRAY_BRUSH))
|
||||
#define STOCK_DKGRAY_BRUSH ((HBRUSH16)(FIRST_STOCK_HANDLE+DKGRAY_BRUSH))
|
||||
#define STOCK_BLACK_BRUSH ((HBRUSH16)(FIRST_STOCK_HANDLE+BLACK_BRUSH))
|
||||
#define STOCK_NULL_BRUSH ((HBRUSH16)(FIRST_STOCK_HANDLE+NULL_BRUSH))
|
||||
#define STOCK_HOLLOW_BRUSH ((HBRUSH16)(FIRST_STOCK_HANDLE+HOLLOW_BRUSH))
|
||||
#define STOCK_WHITE_PEN ((HPEN16)(FIRST_STOCK_HANDLE+WHITE_PEN))
|
||||
#define STOCK_BLACK_PEN ((HPEN16)(FIRST_STOCK_HANDLE+BLACK_PEN))
|
||||
#define STOCK_NULL_PEN ((HPEN16)(FIRST_STOCK_HANDLE+NULL_PEN))
|
||||
#define STOCK_OEM_FIXED_FONT ((HFONT16)(FIRST_STOCK_HANDLE+OEM_FIXED_FONT))
|
||||
#define STOCK_ANSI_FIXED_FONT ((HFONT16)(FIRST_STOCK_HANDLE+ANSI_FIXED_FONT))
|
||||
#define STOCK_ANSI_VAR_FONT ((HFONT16)(FIRST_STOCK_HANDLE+ANSI_VAR_FONT))
|
||||
#define STOCK_SYSTEM_FONT ((HFONT16)(FIRST_STOCK_HANDLE+SYSTEM_FONT))
|
||||
#define STOCK_DEVICE_DEFAULT_FONT ((HFONT16)(FIRST_STOCK_HANDLE+DEVICE_DEFAULT_FONT))
|
||||
#define STOCK_DEFAULT_PALETTE ((HPALETTE16)(FIRST_STOCK_HANDLE+DEFAULT_PALETTE))
|
||||
#define STOCK_SYSTEM_FIXED_FONT ((HFONT16)(FIRST_STOCK_HANDLE+SYSTEM_FIXED_FONT))
|
||||
|
||||
#define FIRST_STOCK_FONT STOCK_OEM_FIXED_FONT
|
||||
#define LAST_STOCK_FONT STOCK_SYSTEM_FIXED_FONT
|
||||
#define FIRST_STOCK_FONT STOCK_OEM_FIXED_FONT
|
||||
#define LAST_STOCK_FONT STOCK_SYSTEM_FIXED_FONT
|
||||
|
||||
#define LAST_STOCK_HANDLE ((DWORD)STOCK_SYSTEM_FIXED_FONT)
|
||||
#define LAST_STOCK_HANDLE ((DWORD)STOCK_SYSTEM_FIXED_FONT)
|
||||
|
||||
/* Device <-> logical coords conversion */
|
||||
|
||||
|
@ -286,10 +283,9 @@ extern WORD GDI_HeapSel;
|
|||
((handle) ? PTR_SEG_OFF_TO_SEGPTR(GDI_HeapSel, (handle)) : (SEGPTR)0)
|
||||
|
||||
extern BOOL32 GDI_Init(void);
|
||||
extern HANDLE16 GDI_AllocObject( WORD, WORD );
|
||||
extern BOOL32 GDI_FreeObject( HANDLE16 );
|
||||
extern GDIOBJHDR * GDI_GetObjPtr( HANDLE16, WORD );
|
||||
extern FARPROC16 GDI_GetDefDCHook(void);
|
||||
extern HGDIOBJ16 GDI_AllocObject( WORD, WORD );
|
||||
extern BOOL32 GDI_FreeObject( HGDIOBJ16 );
|
||||
extern GDIOBJHDR * GDI_GetObjPtr( HGDIOBJ16, WORD );
|
||||
|
||||
extern BOOL32 DRIVER_RegisterDriver( LPCSTR name, const DC_FUNCTIONS *funcs );
|
||||
extern const DC_FUNCTIONS *DRIVER_FindDriver( LPCSTR name );
|
||||
|
|
|
@ -8,28 +8,11 @@
|
|||
#define __WINE_HOOK_H
|
||||
|
||||
#include "windows.h"
|
||||
#include "ldt.h"
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/* Hook data (pointed to by a HHOOK) */
|
||||
typedef struct
|
||||
{
|
||||
HANDLE16 next; /* 00 Next hook in chain */
|
||||
HOOKPROC16 proc WINE_PACKED; /* 02 Hook procedure */
|
||||
INT16 id; /* 06 Hook id (WH_xxx) */
|
||||
HQUEUE16 ownerQueue; /* 08 Owner queue (0 for system hook) */
|
||||
HMODULE16 ownerModule; /* 0a Owner module */
|
||||
WORD inHookProc; /* 0c TRUE if in this->proc */
|
||||
} HOOKDATA;
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
#define HOOK_MAGIC ((int)'H' | (int)'K' << 8) /* 'HK' */
|
||||
|
||||
extern HANDLE16 HOOK_GetHook( INT16 id , HQUEUE16 hQueue );
|
||||
extern LRESULT HOOK_CallHooks( INT16 id, INT16 code,
|
||||
WPARAM16 wParam, LPARAM lParam );
|
||||
extern HOOKPROC16 HOOK_GetProc16( HHOOK hook );
|
||||
extern void HOOK_FreeModuleHooks( HMODULE16 hModule );
|
||||
extern void HOOK_FreeQueueHooks( HQUEUE16 hQueue );
|
||||
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
#include "wintypes.h"
|
||||
#include "resource.h"
|
||||
|
||||
extern INT LIBRES_AccessResource( HINSTANCE hModule, HRSRC32 hRsrc );
|
||||
extern HGLOBAL32 LIBRES_AllocResource( HINSTANCE hModule, HRSRC32 hRsrc, DWORD size );
|
||||
extern HRSRC32 LIBRES_FindResource( HINSTANCE hModule, LPCSTR name, LPCSTR type );
|
||||
extern BOOL LIBRES_FreeResource( HGLOBAL32 handle );
|
||||
extern HGLOBAL32 LIBRES_LoadResource( HINSTANCE hModule, HRSRC32 hRsrc );
|
||||
extern LPVOID LIBRES_LockResource( HGLOBAL32 handle );
|
||||
extern DWORD LIBRES_SizeofResource( HINSTANCE hModule, HRSRC32 hRsrc );
|
||||
extern INT32 LIBRES_AccessResource( HINSTANCE32 hModule, HRSRC32 hRsrc );
|
||||
extern HGLOBAL32 LIBRES_AllocResource( HINSTANCE32 hModule, HRSRC32 hRsrc, DWORD size );
|
||||
extern HRSRC32 LIBRES_FindResource( HINSTANCE32 hModule, LPCSTR name, LPCSTR type );
|
||||
extern BOOL32 LIBRES_FreeResource( HGLOBAL32 handle );
|
||||
extern HGLOBAL32 LIBRES_LoadResource( HINSTANCE32 hModule, HRSRC32 hRsrc );
|
||||
extern LPVOID LIBRES_LockResource( HGLOBAL32 handle );
|
||||
extern DWORD LIBRES_SizeofResource( HINSTANCE32 hModule, HRSRC32 hRsrc );
|
||||
|
||||
#endif /* WINELIB */
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ typedef struct tagLISTSTRUCT {
|
|||
MEASUREITEMSTRUCT16 mis;
|
||||
UINT itemState;
|
||||
RECT16 itemRect;
|
||||
HANDLE hData;
|
||||
HLOCAL16 hData;
|
||||
char *itemText;
|
||||
struct tagLISTSTRUCT *lpNext;
|
||||
} LISTSTRUCT, *LPLISTSTRUCT;
|
||||
|
@ -27,14 +27,14 @@ typedef struct {
|
|||
HWND hSelf;
|
||||
DWORD dwStyle; /* added for COMBOLBOX style faking */
|
||||
HWND hParent;
|
||||
HFONT hFont;
|
||||
HFONT16 hFont;
|
||||
BOOL bRedrawFlag;
|
||||
BOOL HasStrings;
|
||||
BOOL OwnerDrawn;
|
||||
WORD iNumStops;
|
||||
LPINT16 TabStops;
|
||||
BOOL needMeasure;
|
||||
HANDLE HeapSel;
|
||||
HGLOBAL16 HeapSel;
|
||||
/* MDESC *Heap; */
|
||||
} HEADLIST,*LPHEADLIST;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ typedef struct
|
|||
WORD nActiveChildren;
|
||||
HWND hwndChildMaximized;
|
||||
HWND hwndActiveChild;
|
||||
HMENU hWindowMenu;
|
||||
HMENU16 hWindowMenu;
|
||||
WORD idFirstChild;
|
||||
WORD nTotalCreated;
|
||||
LPSTR frameTitle;
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
#define __WINE_MENU_H
|
||||
|
||||
extern BOOL MENU_Init(void);
|
||||
extern HMENU MENU_GetDefSysMenu(void);
|
||||
extern void MENU_InitSysMenuPopup(HMENU hmenu, DWORD style, DWORD clsStyle);
|
||||
extern HMENU16 MENU_GetDefSysMenu(void);
|
||||
extern void MENU_InitSysMenuPopup(HMENU16 hmenu, DWORD style, DWORD clsStyle);
|
||||
extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
|
||||
int orgX, int orgY );
|
||||
extern void MENU_TrackMouseMenuBar( HWND hwnd, POINT16 pt );
|
||||
|
|
|
@ -13,31 +13,28 @@
|
|||
#define MFVERSION 0x300
|
||||
#define META_EOF 0x0000
|
||||
|
||||
HMETAFILE16 MF_WriteRecord(HMETAFILE16 hmf, METARECORD *mr, WORD rlen);
|
||||
int MF_AddHandle(HANDLETABLE16 *ht, WORD htlen, HANDLE hobj);
|
||||
int MF_AddHandleInternal(HANDLE hobj);
|
||||
BOOL MF_MetaParam0(DC *dc, short func);
|
||||
BOOL MF_MetaParam1(DC *dc, short func, short param1);
|
||||
BOOL MF_MetaParam2(DC *dc, short func, short param1, short param2);
|
||||
BOOL MF_MetaParam4(DC *dc, short func, short param1, short param2,
|
||||
BOOL32 MF_MetaParam0(DC *dc, short func);
|
||||
BOOL32 MF_MetaParam1(DC *dc, short func, short param1);
|
||||
BOOL32 MF_MetaParam2(DC *dc, short func, short param1, short param2);
|
||||
BOOL32 MF_MetaParam4(DC *dc, short func, short param1, short param2,
|
||||
short param3, short param4);
|
||||
BOOL MF_MetaParam6(DC *dc, short func, short param1, short param2,
|
||||
BOOL32 MF_MetaParam6(DC *dc, short func, short param1, short param2,
|
||||
short param3, short param4, short param5, short param6);
|
||||
BOOL MF_MetaParam8(DC *dc, short func, short param1, short param2,
|
||||
BOOL32 MF_MetaParam8(DC *dc, short func, short param1, short param2,
|
||||
short param3, short param4, short param5,
|
||||
short param6, short param7, short param8);
|
||||
BOOL MF_CreateBrushIndirect(DC *dc, HBRUSH hBrush, LOGBRUSH16 *logbrush);
|
||||
BOOL MF_CreatePatternBrush(DC *dc, HBRUSH hBrush, LOGBRUSH16 *logbrush);
|
||||
BOOL MF_CreatePenIndirect(DC *dc, HPEN16 hPen, LOGPEN16 *logpen);
|
||||
BOOL MF_CreateFontIndirect(DC *dc, HFONT hFont, LOGFONT16 *logfont);
|
||||
BOOL MF_TextOut(DC *dc, short x, short y, LPCSTR str, short count);
|
||||
BOOL MF_ExtTextOut(DC *dc, short x, short y, UINT16 flags, const RECT16 *rect,
|
||||
BOOL32 MF_CreateBrushIndirect(DC *dc, HBRUSH16 hBrush, LOGBRUSH16 *logbrush);
|
||||
BOOL32 MF_CreatePatternBrush(DC *dc, HBRUSH16 hBrush, LOGBRUSH16 *logbrush);
|
||||
BOOL32 MF_CreatePenIndirect(DC *dc, HPEN16 hPen, LOGPEN16 *logpen);
|
||||
BOOL32 MF_CreateFontIndirect(DC *dc, HFONT16 hFont, LOGFONT16 *logfont);
|
||||
BOOL32 MF_TextOut(DC *dc, short x, short y, LPCSTR str, short count);
|
||||
BOOL32 MF_ExtTextOut(DC *dc, short x, short y, UINT16 flags, const RECT16 *rect,
|
||||
LPCSTR str, short count, const INT16 *lpDx);
|
||||
BOOL MF_MetaPoly(DC *dc, short func, LPPOINT16 pt, short count);
|
||||
BOOL MF_BitBlt(DC *dcDest, short xDest, short yDest, short width,
|
||||
short height, HDC hdcSrc, short xSrc, short ySrc, DWORD rop);
|
||||
BOOL MF_StretchBlt(DC *dcDest, short xDest, short yDest, short widthDest,
|
||||
short heightDest, HDC hdcSrc, short xSrc, short ySrc,
|
||||
BOOL32 MF_MetaPoly(DC *dc, short func, LPPOINT16 pt, short count);
|
||||
BOOL32 MF_BitBlt(DC *dcDest, short xDest, short yDest, short width,
|
||||
short height, HDC16 hdcSrc, short xSrc, short ySrc, DWORD rop);
|
||||
BOOL32 MF_StretchBlt(DC *dcDest, short xDest, short yDest, short widthDest,
|
||||
short heightDest, HDC16 hdcSrc, short xSrc, short ySrc,
|
||||
short widthSrc, short heightSrc, DWORD rop);
|
||||
|
||||
#endif /* METAFILE_H */
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Metafile driver definitions
|
||||
*/
|
||||
|
||||
#ifndef __WINE_METAFILEDRV_H
|
||||
#define __WINE_METAFILEDRV_H
|
||||
|
||||
#include "windows.h"
|
||||
#include "gdi.h"
|
||||
|
||||
/* FIXME: SDK docs says these should be 1 and 2 */
|
||||
#define METAFILE_MEMORY 0
|
||||
#define METAFILE_DISK 1
|
||||
|
||||
/* Metafile driver physical DC */
|
||||
typedef struct
|
||||
{
|
||||
METAHEADER *mh; /* Pointer to metafile header */
|
||||
UINT32 nextHandle; /* Next handle number */
|
||||
} METAFILEDRV_PDEVICE;
|
||||
|
||||
#endif /* __WINE_METAFILEDRV_H */
|
|
@ -533,7 +533,7 @@ typedef struct {
|
|||
FOURCC fccIOProc; /* pointer to I/O procedure */
|
||||
LPMMIOPROC pIOProc; /* pointer to I/O procedure */
|
||||
UINT wErrorRet; /* place for error to be returned */
|
||||
HTASK htask; /* alternate local task */
|
||||
HTASK16 htask; /* alternate local task */
|
||||
/* fields maintained by MMIO functions during buffered I/O */
|
||||
LONG cchBuffer; /* size of I/O buffer (or 0L) */
|
||||
HPSTR pchBuffer; /* start of I/O buffer (or NULL) */
|
||||
|
@ -661,7 +661,7 @@ BOOL mciGetErrorString (DWORD wError, LPSTR lpstrBuffer,
|
|||
BOOL mciSetYieldProc (UINT uDeviceID, YIELDPROC fpYieldProc,
|
||||
DWORD dwYieldData);
|
||||
|
||||
HTASK mciGetCreatorTask(UINT uDeviceID);
|
||||
HTASK16 mciGetCreatorTask(UINT uDeviceID);
|
||||
YIELDPROC mciGetYieldProc (UINT uDeviceID, DWORD * lpdwYieldData);
|
||||
|
||||
#define MCIERR_INVALID_DEVICE_ID (MCIERR_BASE + 1)
|
||||
|
@ -1515,7 +1515,7 @@ BOOL mciSetDriverData(UINT uDeviceID, DWORD dwData);
|
|||
UINT mciDriverYield(UINT uDeviceID);
|
||||
BOOL mciDriverNotify(HWND hwndCallback, UINT uDeviceID,
|
||||
UINT uStatus);
|
||||
UINT mciLoadCommandResource(HINSTANCE hInstance,
|
||||
UINT mciLoadCommandResource(HINSTANCE16 hInstance,
|
||||
LPCSTR lpResName, UINT uType);
|
||||
BOOL mciFreeCommandResource(UINT uTable);
|
||||
|
||||
|
@ -1526,7 +1526,7 @@ BOOL mciFreeCommandResource(UINT uTable);
|
|||
#define DCB_TYPEMASK 0x0007
|
||||
#define DCB_NOSWITCH 0x0008 /* don't switch stacks for callback */
|
||||
|
||||
BOOL DriverCallback(DWORD dwCallBack, UINT uFlags, HANDLE hDev,
|
||||
BOOL DriverCallback(DWORD dwCallBack, UINT uFlags, HANDLE16 hDev,
|
||||
WORD wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
|
||||
DWORD auxMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
|
|
|
@ -85,10 +85,10 @@ typedef struct
|
|||
/* Parameters for LoadModule() */
|
||||
typedef struct
|
||||
{
|
||||
HANDLE16 hEnvironment; /* Environment segment */
|
||||
SEGPTR cmdLine WINE_PACKED; /* Command-line */
|
||||
SEGPTR showCmd WINE_PACKED; /* Code for ShowWindow() */
|
||||
SEGPTR reserved WINE_PACKED;
|
||||
HGLOBAL16 hEnvironment; /* Environment segment */
|
||||
SEGPTR cmdLine WINE_PACKED; /* Command-line */
|
||||
SEGPTR showCmd WINE_PACKED; /* Code for ShowWindow() */
|
||||
SEGPTR reserved WINE_PACKED;
|
||||
} LOADPARAMS;
|
||||
|
||||
#pragma pack(4)
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
extern void NC_GetMinMaxInfo( HWND hwnd, POINT16 *maxSize, POINT16 *maxPos,
|
||||
POINT16 *minTrack, POINT16 *maxTrack );
|
||||
extern void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint );
|
||||
extern LONG NC_HandleNCPaint( HWND hwnd , HRGN clip);
|
||||
extern void NC_DoNCPaint( HWND hwnd, HRGN32 clip, BOOL suppress_menupaint );
|
||||
extern LONG NC_HandleNCPaint( HWND hwnd , HRGN32 clip);
|
||||
extern LONG NC_HandleNCActivate( WND *pwnd, WPARAM wParam );
|
||||
extern LONG NC_HandleNCCalcSize( WND *pWnd, RECT16 *winRect );
|
||||
extern LONG NC_HandleNCHitTest( HWND hwnd, POINT16 pt );
|
||||
|
|
|
@ -208,8 +208,8 @@ typedef struct _OLEOBJECTVTBL {
|
|||
OLESTATUS (*Release)(LPOLEOBJECT);
|
||||
OLESTATUS (*Show)(LPOLEOBJECT,BOOL);
|
||||
OLESTATUS (*DoVerb)(LPOLEOBJECT,UINT,BOOL,BOOL);
|
||||
OLESTATUS (*GetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE *);
|
||||
OLESTATUS (*SetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE);
|
||||
OLESTATUS (*GetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE16 *);
|
||||
OLESTATUS (*SetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE16);
|
||||
OLESTATUS (*SetTargetDevice)(LPOLEOBJECT,HGLOBAL16);
|
||||
OLESTATUS (*SetBounds)(LPOLEOBJECT,LPRECT16);
|
||||
OLESTATUS (*EnumFormats)(LPOLEOBJECT,OLECLIPFORMAT);
|
||||
|
@ -250,7 +250,7 @@ typedef struct _OLEOBJECT {
|
|||
} OLEOBJECT;
|
||||
|
||||
|
||||
OLESTATUS OleRegisterServer(LPCSTR,LPOLESERVER,LHSERVER *,HINSTANCE,OLE_SERVER_USE);
|
||||
OLESTATUS OleRegisterServer(LPCSTR,LPOLESERVER,LHSERVER *,HINSTANCE16,OLE_SERVER_USE);
|
||||
OLESTATUS OleUnblockServer(LHSERVER,BOOL *);
|
||||
OLESTATUS OleRegisterServerDoc(LHSERVER,LPCSTR,LPOLESERVERDOC,LHSERVERDOC *);
|
||||
OLESTATUS OleRegisterClientDoc(LPCSTR,LPCSTR,LONG,LHCLIENTDOC *);
|
||||
|
|
|
@ -72,7 +72,7 @@ typedef struct
|
|||
WORD signal_flags; /* 24 Flags for signal handler */
|
||||
FARPROC16 sighandler WINE_PACKED; /* 26 Signal handler */
|
||||
FARPROC16 userhandler WINE_PACKED; /* 2a USER signal handler */
|
||||
DWORD discardhandler WINE_PACKED; /* 2e Handler for GlobalDiscard() */
|
||||
FARPROC16 discardhandler WINE_PACKED; /* 2e Handler for GlobalNotify() */
|
||||
DWORD int0 WINE_PACKED; /* 32 int 0 (divide by 0) handler */
|
||||
DWORD int2 WINE_PACKED; /* 36 int 2 (NMI) handler */
|
||||
DWORD int4 WINE_PACKED; /* 3a int 4 (INTO) handler */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _WINECON_H_
|
||||
#define _WINECON_H_
|
||||
#ifndef __WINE_WINCON_H
|
||||
#define __WINE_WINCON_H
|
||||
|
||||
#define CTRL_C_EVENT 0
|
||||
#define CTRL_BREAK_EVENT 1
|
||||
|
@ -46,7 +46,7 @@ typedef struct tagCONSOLE_SCREEN_BUFFER_INFO
|
|||
} CONSOLE_SCREEN_BUFFER_INFO,*LPCONSOLE_SCREEN_BUFFER_INFO;
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* __WINE_WINCON_H */
|
||||
|
||||
#if 0
|
||||
#ifndef _WINCON_H_
|
||||
|
@ -86,26 +86,6 @@ typedef struct tagCONSOLE_SCREEN_BUFFER_INFO
|
|||
|
||||
#if 0
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int bKeyDown;
|
||||
WORD wRepeatCount;
|
||||
WORD wVirtualKeyCode;
|
||||
WORD wVirtualScanCode;
|
||||
|
||||
char AsciiChar;
|
||||
char pad;
|
||||
#if 0
|
||||
union
|
||||
{
|
||||
WCHAR UnicodeChar;
|
||||
CHAR AsciiChar;
|
||||
}
|
||||
uChar;
|
||||
#endif
|
||||
DWORD dwControlKeyState;
|
||||
} __attribute__ ((packed)) KEY_EVENT_RECORD;
|
||||
|
||||
|
||||
|
||||
#define RIGHT_ALT_PRESSED 0x1
|
||||
|
|
|
@ -3211,7 +3211,18 @@ typedef struct
|
|||
INT16 xExt;
|
||||
INT16 yExt;
|
||||
HMETAFILE16 hMF;
|
||||
} METAFILEPICT, *LPMETAFILEPICT;
|
||||
} METAFILEPICT16, *LPMETAFILEPICT16;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
INT32 mm;
|
||||
INT32 xExt;
|
||||
INT32 yExt;
|
||||
HMETAFILE32 hMF;
|
||||
} METAFILEPICT32, *LPMETAFILEPICT32;
|
||||
|
||||
DECL_WINELIB_TYPE(METAFILEPICT);
|
||||
DECL_WINELIB_TYPE(LPMETAFILEPICT);
|
||||
|
||||
/* Metafile functions */
|
||||
#define META_SETBKCOLOR 0x0201
|
||||
|
@ -3622,35 +3633,58 @@ WORD AllocDStoCSAlias(WORD);
|
|||
WORD AllocSelector(WORD);
|
||||
WORD AllocSelectorArray(WORD);
|
||||
INT16 Catch(LPCATCHBUF);
|
||||
WORD ChangeSelector(WORD,WORD);
|
||||
INT16 CloseComm(INT16);
|
||||
BOOL16 DCHook(HDC16,WORD,DWORD,LPARAM);
|
||||
VOID DirectedYield(HTASK16);
|
||||
HGLOBAL16 DirectResAlloc(HINSTANCE16,WORD,UINT16);
|
||||
BOOL16 EnableHardwareInput(BOOL16);
|
||||
HANDLE16 FarGetOwner(HGLOBAL16);
|
||||
VOID FarSetOwner(HGLOBAL16,HANDLE16);
|
||||
VOID FillWindow(HWND16,HWND16,HDC16,HBRUSH16);
|
||||
INT16 FlushComm(INT16,INT16);
|
||||
WORD FreeSelector(WORD);
|
||||
void GlobalFreeAll(HGLOBAL16);
|
||||
HGLOBAL16 GlobalLRUNewest(HGLOBAL16);
|
||||
HGLOBAL16 GlobalLRUOldest(HGLOBAL16);
|
||||
VOID GlobalNotify(FARPROC16);
|
||||
HANDLE16 GetAtomHandle(ATOM);
|
||||
DWORD GetBitmapDimension(HBITMAP16);
|
||||
HANDLE16 GetCodeHandle(FARPROC16);
|
||||
INT16 GetCommError(INT16,LPCOMSTAT);
|
||||
UINT16 GetCommEventMask(INT16,UINT16);
|
||||
VOID GetCodeInfo(FARPROC16,LPVOID);
|
||||
HANDLE16 GetCurrentPDB(void);
|
||||
HTASK16 GetCurrentTask(void);
|
||||
DWORD GetDCHook(HDC16,FARPROC16*);
|
||||
HWND16 GetDesktopHwnd(void);
|
||||
HMODULE16 GetExePtr(HANDLE16);
|
||||
WORD GetExeVersion(void);
|
||||
INT16 GetInstanceData(HINSTANCE16,WORD,INT16);
|
||||
BOOL16 GetModuleName(HINSTANCE16,LPSTR,INT16);
|
||||
FARPROC16 GetMouseEventProc(void);
|
||||
UINT16 GetNumTasks(void);
|
||||
DWORD GetSelectorBase(WORD);
|
||||
DWORD GetSelectorLimit(WORD);
|
||||
HINSTANCE16 GetTaskDS(void);
|
||||
HQUEUE16 GetTaskQueue(HTASK16);
|
||||
DWORD GlobalDOSAlloc(DWORD);
|
||||
WORD GlobalDOSFree(WORD);
|
||||
WORD GlobalPageLock(HGLOBAL16);
|
||||
WORD GlobalPageUnlock(HGLOBAL16);
|
||||
INT16 InitApp(HINSTANCE16);
|
||||
BOOL16 IsSharedSelector(HANDLE16);
|
||||
BOOL16 IsTask(HTASK16);
|
||||
HTASK16 IsTaskLocked(void);
|
||||
BOOL16 LocalInit(HANDLE16,WORD,WORD);
|
||||
HTASK16 LockCurrentTask(BOOL16);
|
||||
DWORD OffsetViewportOrg(HDC16,INT16,INT16);
|
||||
DWORD OffsetWindowOrg(HDC16,INT16,INT16);
|
||||
VOID OldYield(void);
|
||||
INT16 OpenComm(LPCSTR,UINT16,UINT16);
|
||||
VOID PaintRect(HWND16,HWND16,HDC16,HBRUSH16,const RECT16*);
|
||||
VOID PostEvent(HTASK16);
|
||||
WORD PrestoChangoSelector(WORD,WORD);
|
||||
INT16 ReadComm(INT16,LPSTR,INT16);
|
||||
DWORD ScaleViewportExt(HDC16,INT16,INT16,INT16,INT16);
|
||||
DWORD ScaleWindowExt(HDC16,INT16,INT16,INT16,INT16);
|
||||
|
@ -3658,18 +3692,26 @@ WORD SelectorAccessRights(WORD,WORD,WORD);
|
|||
DWORD SetBitmapDimension(HBITMAP16,INT16,INT16);
|
||||
DWORD SetBrushOrg(HDC16,INT16,INT16);
|
||||
UINT16* SetCommEventMask(INT16,UINT16);
|
||||
BOOL16 SetDCHook(HDC16,FARPROC16,DWORD);
|
||||
BOOL16 SetDeskPattern(void);
|
||||
VOID SetPriority(HTASK16,INT16);
|
||||
WORD SetSelectorBase(WORD,DWORD);
|
||||
WORD SetSelectorLimit(WORD,DWORD);
|
||||
HQUEUE16 SetTaskQueue(HTASK16,HQUEUE16);
|
||||
FARPROC16 SetTaskSignalProc(HTASK16,FARPROC16);
|
||||
DWORD SetViewportExt(HDC16,INT16,INT16);
|
||||
DWORD SetViewportOrg(HDC16,INT16,INT16);
|
||||
DWORD SetWindowExt(HDC16,INT16,INT16);
|
||||
DWORD SetWindowOrg(HDC16,INT16,INT16);
|
||||
VOID SwitchStackBack(void);
|
||||
VOID SwitchStackTo(WORD,WORD,WORD);
|
||||
INT16 Throw(LPCATCHBUF,INT16);
|
||||
INT16 UngetCommChar(INT16,CHAR);
|
||||
VOID UserYield(void);
|
||||
BOOL16 WaitEvent(HTASK16);
|
||||
INT16 WriteComm(INT16,LPSTR,INT16);
|
||||
VOID hmemcpy(LPVOID,LPCVOID,LONG);
|
||||
VOID Yield(void);
|
||||
|
||||
/* Declarations for functions that exist only in Win32 */
|
||||
|
||||
|
@ -3695,9 +3737,12 @@ LPCWSTR GetCommandLine32W();
|
|||
#define GetCommandLine WINELIB_NAME_AW(GetCommandLine)
|
||||
BOOL32 GetCommTimeouts(INT32,LPCOMMTIMEOUTS);
|
||||
DWORD GetFileInformationByHandle(HFILE,BY_HANDLE_FILE_INFORMATION*);
|
||||
VOID GetLocalTime(LPSYSTEMTIME);
|
||||
DWORD GetLogicalDrives(void);
|
||||
HANDLE32 GetProcessHeap(void);
|
||||
HFILE GetStdHandle(DWORD);
|
||||
BOOL32 GetSystemPowerStatus(LPSYSTEM_POWER_STATUS);
|
||||
VOID GetSystemTime(LPSYSTEMTIME);
|
||||
VOID GlobalMemoryStatus(LPMEMORYSTATUS);
|
||||
LPVOID HeapAlloc(HANDLE32,DWORD,DWORD);
|
||||
DWORD HeapCompact(HANDLE32,DWORD);
|
||||
|
@ -3744,6 +3789,9 @@ BOOL32 SetCommTimeouts(INT32,LPCOMMTIMEOUTS);
|
|||
BOOL32 SetEndOfFile(HFILE);
|
||||
DWORD SetFilePointer(HFILE,LONG,LPLONG,DWORD);
|
||||
BOOL32 SetTimeZoneInformation(const LPTIME_ZONE_INFORMATION);
|
||||
BOOL32 SetSystemPowerState(BOOL32,BOOL32);
|
||||
BOOL32 SetSystemTime(const SYSTEMTIME*);
|
||||
VOID Sleep(DWORD);
|
||||
LPVOID VirtualAlloc(LPVOID,DWORD,DWORD,DWORD);
|
||||
BOOL32 VirtualFree(LPVOID,DWORD,DWORD);
|
||||
BOOL32 WriteFile(HFILE,LPVOID,DWORD,LPDWORD,LPOVERLAPPED);
|
||||
|
@ -3805,6 +3853,7 @@ VOID SetRectRgn(HRGN32,INT32,INT32,INT32,INT32);
|
|||
COLORREF SetTextColor(HDC32,COLORREF);
|
||||
WORD SetWindowWord(HWND32,INT32,WORD);
|
||||
BOOL16 ShowCaret(HWND32);
|
||||
VOID UpdateWindow(HWND32);
|
||||
LONG _hread(HFILE,LPVOID,LONG);
|
||||
HFILE _lclose(HFILE);
|
||||
HFILE _lcreat(LPCSTR,INT32);
|
||||
|
@ -3890,6 +3939,9 @@ BOOL32 ClientToScreen32(HWND32,LPPOINT32);
|
|||
BOOL16 ClipCursor16(const RECT16*);
|
||||
BOOL32 ClipCursor32(const RECT32*);
|
||||
#define ClipCursor WINELIB_NAME(ClipCursor)
|
||||
HMETAFILE16 CloseMetaFile16(HDC16);
|
||||
HMETAFILE32 CloseMetaFile32(HDC32);
|
||||
#define CloseMetaFile WINELIB_NAME(CloseMetaFile)
|
||||
UINT16 CompareString16(DWORD,DWORD,LPCSTR,DWORD,LPCSTR,DWORD);
|
||||
UINT32 CompareString32A(DWORD,DWORD,LPCSTR,DWORD,LPCSTR,DWORD);
|
||||
UINT32 CompareString32W(DWORD,DWORD,LPCWSTR,DWORD,LPCWSTR,DWORD);
|
||||
|
@ -3941,6 +3993,10 @@ HFONT16 CreateFontIndirect16(const LOGFONT16*);
|
|||
HFONT32 CreateFontIndirect32A(const LOGFONT32A*);
|
||||
HFONT32 CreateFontIndirect32W(const LOGFONT32W*);
|
||||
#define CreateFontIndirect WINELIB_NAME_AW(CreateFontIndirect)
|
||||
HDC16 CreateMetaFile16(LPCSTR);
|
||||
HDC32 CreateMetaFile32A(LPCSTR);
|
||||
HDC32 CreateMetaFile32W(LPCWSTR);
|
||||
#define CreateMetaFile WINELIB_NAME_AW(CreateMetaFile)
|
||||
HRGN16 CreatePolyPolygonRgn16(const POINT16*,const INT16*,INT16,INT16);
|
||||
HRGN32 CreatePolyPolygonRgn32(const POINT32*,const INT32*,INT32,INT32);
|
||||
#define CreatePolyPolygonRgn WINELIB_NAME(CreatePolyPolygonRgn)
|
||||
|
@ -3984,6 +4040,9 @@ BOOL16 DeleteFile16(LPCSTR);
|
|||
BOOL32 DeleteFile32A(LPCSTR);
|
||||
BOOL32 DeleteFile32W(LPCWSTR);
|
||||
#define DeleteFile WINELIB_NAME_AW(DeleteFile)
|
||||
BOOL16 DeleteMetaFile16(HMETAFILE16);
|
||||
BOOL32 DeleteMetaFile32(HMETAFILE32);
|
||||
#define DeleteMetaFile WINELIB_NAME(DeleteMetaFile)
|
||||
INT16 DialogBox16(HINSTANCE16,SEGPTR,HWND16,DLGPROC16);
|
||||
#define DialogBox32A(inst,template,owner,func) \
|
||||
DialogBoxParam32A(inst,template,owner,func,0)
|
||||
|
@ -4191,6 +4250,12 @@ UINT32 GetInternalWindowPos32(HWND32,LPRECT32,LPPOINT32);
|
|||
UINT32 GetLogicalDriveStrings32A(UINT32,LPSTR);
|
||||
UINT32 GetLogicalDriveStrings32W(UINT32,LPWSTR);
|
||||
#define GetLogicalDriveStrings WINELIB_NAME_AW(GetLogicalDriveStrings)
|
||||
HWND16 GetNextDlgGroupItem16(HWND16,HWND16,BOOL16);
|
||||
HWND32 GetNextDlgGroupItem32(HWND32,HWND32,BOOL32);
|
||||
#define GetNextDlgGroupItem WINELIB_NAME(GetNextDlgGroupItem)
|
||||
HWND16 GetNextDlgTabItem16(HWND16,HWND16,BOOL16);
|
||||
HWND32 GetNextDlgTabItem32(HWND32,HWND32,BOOL32);
|
||||
#define GetNextDlgTabItem WINELIB_NAME(GetNextDlgTabItem)
|
||||
INT16 GetObject16(HANDLE16,INT16,LPVOID);
|
||||
INT32 GetObject32A(HANDLE32,INT32,LPVOID);
|
||||
INT32 GetObject32W(HANDLE32,INT32,LPVOID);
|
||||
|
@ -4513,6 +4578,12 @@ BOOL32 Polygon32(HDC32,LPPOINT32,INT32);
|
|||
BOOL16 Polyline16(HDC16,LPPOINT16,INT16);
|
||||
BOOL32 Polyline32(HDC32,LPPOINT32,INT32);
|
||||
#define Polyline WINELIB_NAME(Polyline)
|
||||
BOOL16 PostAppMessage16(HTASK16,UINT16,WPARAM16,LPARAM);
|
||||
#define PostAppMessage32A(thread,msg,wparam,lparam) \
|
||||
PostThreadMessage32A((DWORD)(thread),msg,wparam,lparam)
|
||||
#define PostAppMessage32W(thread,msg,wparam,lparam) \
|
||||
PostThreadMessage32W((DWORD)(thread),msg,wparam,lparam)
|
||||
#define PostAppMessage WINELIB_NAME_AW(PostAppMessage)
|
||||
BOOL16 PtInRect16(const RECT16*,POINT16);
|
||||
BOOL32 PtInRect32(const RECT32*,POINT32);
|
||||
#define PtInRect WINELIB_NAME(PtInRect)
|
||||
|
@ -4694,6 +4765,14 @@ BOOL32 SetWindowOrgEx32(HDC32,INT32,INT32,LPPOINT32);
|
|||
BOOL16 SetWindowPlacement16(HWND16,const WINDOWPLACEMENT16*);
|
||||
BOOL32 SetWindowPlacement32(HWND32,const WINDOWPLACEMENT32*);
|
||||
#define SetWindowPlacement WINELIB_NAME(SetWindowPlacement)
|
||||
FARPROC16 SetWindowsHook16(INT16,HOOKPROC16);
|
||||
HHOOK SetWindowsHook32A(INT32,HOOKPROC32);
|
||||
HHOOK SetWindowsHook32W(INT32,HOOKPROC32);
|
||||
#define SetWindowsHook WINELIB_NAME_AW(SetWindowsHook)
|
||||
HHOOK SetWindowsHookEx16(INT16,HOOKPROC16,HINSTANCE16,HTASK16);
|
||||
HHOOK SetWindowsHookEx32A(INT32,HOOKPROC32,HINSTANCE32,DWORD);
|
||||
HHOOK SetWindowsHookEx32W(INT32,HOOKPROC32,HINSTANCE32,DWORD);
|
||||
#define SetWindowsHookEx WINELIB_NAME_AW(SetWindowsHookEx)
|
||||
void SetWindowText16(HWND16,SEGPTR);
|
||||
void SetWindowText32A(HWND32,LPCSTR);
|
||||
void SetWindowText32W(HWND32,LPCWSTR);
|
||||
|
@ -4714,6 +4793,12 @@ BOOL32 TrackPopupMenu32(HMENU32,UINT32,INT32,INT32,INT32,HWND32,const RECT32
|
|||
INT16 TransmitCommChar16(INT16,CHAR);
|
||||
BOOL32 TransmitCommChar32(INT32,CHAR);
|
||||
#define TransmitCommChar WINELIB_NAME(TransmitCommChar)
|
||||
BOOL16 UnhookWindowsHook16(INT16,HOOKPROC16);
|
||||
BOOL32 UnhookWindowsHook32(INT32,HOOKPROC32);
|
||||
#define UnhookWindowsHook WINELIB_NAME(UnhookWindowsHook)
|
||||
BOOL16 UnhookWindowsHookEx16(HHOOK);
|
||||
BOOL32 UnhookWindowsHookEx32(HHOOK);
|
||||
#define UnhookWindowsHookEx WINELIB_NAME(UnhookWindowsHookEx)
|
||||
BOOL16 UnionRect16(LPRECT16,const RECT16*,const RECT16*);
|
||||
BOOL32 UnionRect32(LPRECT32,const RECT32*,const RECT32*);
|
||||
#define UnionRect WINELIB_NAME(UnionRect)
|
||||
|
@ -4823,30 +4908,14 @@ typedef INT32 INT;
|
|||
typedef UINT32 UINT;
|
||||
typedef BOOL32 BOOL;
|
||||
typedef WPARAM32 WPARAM;
|
||||
typedef HANDLE32 HANDLE;
|
||||
typedef HANDLE32 HBITMAP;
|
||||
typedef HANDLE32 HBRUSH;
|
||||
typedef HANDLE32 HDC;
|
||||
typedef HANDLE32 HFONT;
|
||||
typedef HANDLE32 HINSTANCE;
|
||||
typedef HANDLE32 HMENU;
|
||||
typedef HANDLE32 HRGN;
|
||||
typedef HANDLE32 HTASK;
|
||||
typedef HANDLE32 HWND;
|
||||
# else /* WINELIB32 */
|
||||
typedef INT16 INT;
|
||||
typedef UINT16 UINT;
|
||||
typedef BOOL16 BOOL;
|
||||
typedef WPARAM16 WPARAM;
|
||||
typedef HANDLE16 HANDLE;
|
||||
typedef HANDLE16 HBITMAP;
|
||||
typedef HANDLE16 HBRUSH;
|
||||
typedef HANDLE16 HDC;
|
||||
typedef HANDLE16 HFONT;
|
||||
typedef HANDLE16 HINSTANCE;
|
||||
typedef HANDLE16 HMENU;
|
||||
typedef HANDLE16 HRGN;
|
||||
typedef HANDLE16 HTASK;
|
||||
typedef HANDLE16 HWND;
|
||||
# endif /* WINELIB32 */
|
||||
#endif /* __WINE__ */
|
||||
|
@ -4882,61 +4951,54 @@ void CalcChildScroll(HWND,WORD);
|
|||
BOOL CallMsgFilter(SEGPTR,INT);
|
||||
LRESULT CallNextHookEx(HHOOK,INT,WPARAM,LPARAM);
|
||||
BOOL ChangeClipboardChain(HWND,HWND);
|
||||
WORD ChangeSelector(WORD,WORD);
|
||||
INT CheckMenuItem(HMENU,UINT,UINT);
|
||||
INT CheckMenuItem(HMENU16,UINT,UINT);
|
||||
BOOL Chord(HDC,INT,INT,INT,INT,INT,INT,INT,INT);
|
||||
BOOL CloseClipboard(void);
|
||||
HMETAFILE16 CloseMetaFile(HDC);
|
||||
void CloseSound(void);
|
||||
BOOL CloseWindow(HWND);
|
||||
int ConvertRequest(HWND,LPKANJISTRUCT);
|
||||
HMETAFILE16 CopyMetaFile(HMETAFILE16,LPCSTR);
|
||||
INT CountClipboardFormats(void);
|
||||
INT CountVoiceNotes(INT);
|
||||
HBRUSH CreateBrushIndirect(const LOGBRUSH16*);
|
||||
HBRUSH16 CreateBrushIndirect(const LOGBRUSH16*);
|
||||
HDC CreateCompatibleDC(HDC);
|
||||
HCURSOR16 CreateCursor(HANDLE,INT,INT,INT,INT,const BYTE*,const BYTE*);
|
||||
HANDLE CreateCursorIconIndirect(HANDLE,CURSORICONINFO*,const BYTE*,const BYTE*);
|
||||
HCURSOR16 CreateCursor(HINSTANCE16,INT,INT,INT,INT,const BYTE*,const BYTE*);
|
||||
HGLOBAL16 CreateCursorIconIndirect(HINSTANCE16,CURSORICONINFO*,const BYTE*,const BYTE*);
|
||||
HDC CreateDC(LPCSTR,LPCSTR,LPCSTR,const DEVMODE*);
|
||||
HBRUSH CreateDIBPatternBrush(HGLOBAL16,UINT);
|
||||
HBITMAP CreateDIBitmap(HDC,BITMAPINFOHEADER*,DWORD,LPVOID,BITMAPINFO*,UINT);
|
||||
HBRUSH CreateHatchBrush(INT,COLORREF);
|
||||
HBRUSH16 CreateDIBPatternBrush(HGLOBAL16,UINT);
|
||||
HBITMAP16 CreateDIBitmap(HDC,BITMAPINFOHEADER*,DWORD,LPVOID,BITMAPINFO*,UINT);
|
||||
HBRUSH16 CreateHatchBrush(INT,COLORREF);
|
||||
HDC CreateIC(LPCSTR,LPCSTR,LPCSTR,const DEVMODE*);
|
||||
HICON16 CreateIcon(HINSTANCE,INT,INT,BYTE,BYTE,const BYTE*,const BYTE*);
|
||||
HMENU CreateMenu(void);
|
||||
HDC CreateMetaFile(LPCSTR);
|
||||
HICON16 CreateIcon(HINSTANCE16,INT,INT,BYTE,BYTE,const BYTE*,const BYTE*);
|
||||
HMENU16 CreateMenu(void);
|
||||
HPALETTE16 CreatePalette(const LOGPALETTE*);
|
||||
HBRUSH CreatePatternBrush(HBITMAP);
|
||||
HBRUSH16 CreatePatternBrush(HBITMAP16);
|
||||
HPEN16 CreatePen(INT,INT,COLORREF);
|
||||
HPEN16 CreatePenIndirect(const LOGPEN16*);
|
||||
HMENU CreatePopupMenu(void);
|
||||
HBRUSH CreateSolidBrush(COLORREF);
|
||||
void DebugBreak(void);
|
||||
HMENU16 CreatePopupMenu(void);
|
||||
HBRUSH16 CreateSolidBrush(COLORREF);
|
||||
DWORD DefHookProc(short,WORD,DWORD,HHOOK*);
|
||||
HDWP16 DeferWindowPos(HDWP16,HWND,HWND,INT,INT,INT,INT,UINT);
|
||||
ATOM DeleteAtom(ATOM);
|
||||
BOOL DeleteDC(HDC);
|
||||
BOOL DeleteMenu(HMENU,UINT,UINT);
|
||||
BOOL DeleteMetaFile(HMETAFILE16);
|
||||
BOOL DeleteMenu(HMENU16,UINT,UINT);
|
||||
BOOL DeleteObject(HGDIOBJ16);
|
||||
BOOL DestroyCursor(HCURSOR16);
|
||||
BOOL DestroyIcon(HICON16);
|
||||
BOOL DestroyMenu(HMENU);
|
||||
BOOL DestroyMenu(HMENU16);
|
||||
BOOL DestroyWindow(HWND);
|
||||
HANDLE DirectResAlloc(HANDLE,WORD,WORD);
|
||||
void DirectedYield(HTASK);
|
||||
LONG DispatchMessage(const MSG16*);
|
||||
INT DlgDirList(HWND,SEGPTR,INT,INT,UINT);
|
||||
BOOL DlgDirSelect(HWND,LPSTR,INT);
|
||||
BOOL DlgDirSelectComboBox(HWND,LPSTR,INT);
|
||||
BOOL16 DragDetect(HWND16,POINT16);
|
||||
DWORD DragObject(HWND, HWND, WORD, HANDLE, WORD, HCURSOR16);
|
||||
DWORD DragObject(HWND, HWND, WORD, HANDLE16, WORD, HCURSOR16);
|
||||
BOOL DrawIcon(HDC,INT,INT,HICON16);
|
||||
void DrawMenuBar(HWND);
|
||||
DWORD DumpIcon(SEGPTR,WORD*,SEGPTR*,SEGPTR*);
|
||||
BOOL Ellipse(HDC,INT,INT,INT,INT);
|
||||
BOOL EmptyClipboard(void);
|
||||
BOOL EnableMenuItem(HMENU,UINT,UINT);
|
||||
BOOL EnableMenuItem(HMENU16,UINT,UINT);
|
||||
BOOL EnableWindow(HWND,BOOL);
|
||||
BOOL EndDeferWindowPos(HDWP16);
|
||||
UINT16 EnumClipboardFormats(UINT16);
|
||||
|
@ -4948,15 +5010,15 @@ INT Escape(HDC,INT,INT,SEGPTR,SEGPTR);
|
|||
int ExcludeClipRect(HDC,short,short,short,short);
|
||||
int ExcludeVisRect(HDC,short,short,short,short);
|
||||
BOOL ExitWindows(DWORD,WORD);
|
||||
HICON16 ExtractIcon(HINSTANCE,LPCSTR,WORD);
|
||||
HICON16 ExtractIcon(HINSTANCE16,LPCSTR,WORD);
|
||||
void FatalAppExit(UINT,LPCSTR);
|
||||
void FatalExit(int);
|
||||
BOOL FillRgn(HDC,HRGN,HBRUSH);
|
||||
BOOL FillRgn(HDC,HRGN32,HBRUSH16);
|
||||
ATOM FindAtom(SEGPTR);
|
||||
HINSTANCE FindExecutable(LPCSTR,LPCSTR,LPSTR);
|
||||
HINSTANCE16 FindExecutable(LPCSTR,LPCSTR,LPSTR);
|
||||
BOOL FlashWindow(HWND,BOOL);
|
||||
BOOL FrameRgn(HDC,HRGN,HBRUSH,int,int);
|
||||
void FreeLibrary(HANDLE);
|
||||
BOOL FrameRgn(HDC,HRGN32,HBRUSH16,int,int);
|
||||
void FreeLibrary(HINSTANCE16);
|
||||
UINT GDIRealizePalette(HDC);
|
||||
HPALETTE16 GDISelectPalette(HDC,HPALETTE16,WORD);
|
||||
HWND GetActiveWindow(void);
|
||||
|
@ -4968,21 +5030,18 @@ WORD GetBkMode(HDC);
|
|||
DWORD GetBrushOrg(HDC);
|
||||
BOOL GetCharABCWidths(HDC,UINT,UINT,LPABC16);
|
||||
BOOL GetCharWidth(HDC,WORD,WORD,LPINT16);
|
||||
HRGN GetClipRgn(HDC);
|
||||
HANDLE GetClipboardData(WORD);
|
||||
HRGN32 GetClipRgn(HDC);
|
||||
HANDLE16 GetClipboardData(WORD);
|
||||
int GetClipboardFormatName(WORD,LPSTR,short);
|
||||
HWND GetClipboardOwner(void);
|
||||
HWND GetClipboardViewer(void);
|
||||
HANDLE GetCodeHandle(FARPROC16);
|
||||
void GetCodeInfo(FARPROC16,LPVOID);
|
||||
HBRUSH GetControlBrush(HWND,HDC,WORD);
|
||||
HBRUSH16 GetControlBrush(HWND,HDC,WORD);
|
||||
DWORD GetCurrentPosition(HDC);
|
||||
DWORD GetCurrentTime(void);
|
||||
HCURSOR16 GetCursor(void);
|
||||
DWORD GetDCHook(HDC,FARPROC16*);
|
||||
DWORD GetDCOrg(HDC);
|
||||
HDC GetDCState(HDC);
|
||||
int GetDIBits(HDC,HANDLE,WORD,WORD,LPSTR,LPBITMAPINFO,WORD);
|
||||
int GetDIBits(HDC,HBITMAP16,WORD,WORD,LPSTR,LPBITMAPINFO,WORD);
|
||||
SEGPTR GetDOSEnvironment(void);
|
||||
int GetDeviceCaps(HDC,WORD);
|
||||
DWORD GetDialogBaseUnits(void);
|
||||
|
@ -4993,7 +5052,6 @@ int GetEnvironment(LPSTR,LPSTR,WORD);
|
|||
DWORD GetFreeSpace(UINT16);
|
||||
DWORD GetHeapSpaces(HMODULE16);
|
||||
BOOL GetInputState(void);
|
||||
int GetInstanceData(HANDLE,WORD,int);
|
||||
int GetKBCodePage(void);
|
||||
int GetKerningPairs(HDC,int,LPKERNINGPAIR16);
|
||||
int GetKeyNameText(LONG,LPSTR,int);
|
||||
|
@ -5001,30 +5059,25 @@ INT GetKeyState(INT);
|
|||
void GetKeyboardState(BYTE*);
|
||||
int GetKeyboardType(int);
|
||||
HWND GetLastActivePopup(HWND);
|
||||
VOID GetLocalTime(LPSYSTEMTIME); /* Win32 */
|
||||
WORD GetMapMode(HDC);
|
||||
HMENU GetMenu(HWND);
|
||||
HMENU16 GetMenu(HWND);
|
||||
DWORD GetMenuCheckMarkDimensions(void);
|
||||
INT GetMenuItemCount(HMENU);
|
||||
UINT GetMenuItemID(HMENU,int);
|
||||
UINT GetMenuState(HMENU,UINT,UINT);
|
||||
int GetMenuString(HMENU,UINT,LPSTR,short,UINT);
|
||||
INT GetMenuItemCount(HMENU16);
|
||||
UINT GetMenuItemID(HMENU16,int);
|
||||
UINT GetMenuState(HMENU16,UINT,UINT);
|
||||
int GetMenuString(HMENU16,UINT,LPSTR,short,UINT);
|
||||
BOOL GetMessage(SEGPTR,HWND,UINT,UINT);
|
||||
LONG GetMessageExtraInfo(void);
|
||||
DWORD GetMessagePos(void);
|
||||
LONG GetMessageTime(void);
|
||||
HMETAFILE16 GetMetaFile(LPSTR);
|
||||
HANDLE GetMetaFileBits(HMETAFILE16);
|
||||
int GetModuleFileName(HANDLE,LPSTR,short);
|
||||
HGLOBAL16 GetMetaFileBits(HMETAFILE16);
|
||||
INT16 GetModuleFileName(HINSTANCE16,LPSTR,INT16);
|
||||
HMODULE16 GetModuleHandle(LPCSTR);
|
||||
int GetModuleUsage(HANDLE);
|
||||
FARPROC16 GetMouseEventProc(void);
|
||||
INT16 GetModuleUsage(HINSTANCE16);
|
||||
DWORD GetNearestColor(HDC,DWORD);
|
||||
WORD GetNearestPaletteIndex(HPALETTE16,DWORD);
|
||||
HWND GetNextDlgGroupItem(HWND,HWND,BOOL);
|
||||
HWND GetNextDlgTabItem(HWND,HWND,BOOL);
|
||||
HWND GetNextWindow(HWND,WORD);
|
||||
WORD GetNumTasks(void);
|
||||
HWND GetOpenClipboardWindow(void);
|
||||
WORD GetPaletteEntries(HPALETTE16,WORD,WORD,LPPALETTEENTRY);
|
||||
DWORD GetPixel(HDC,short,short);
|
||||
|
@ -5038,15 +5091,13 @@ DWORD GetQueueStatus(UINT);
|
|||
BOOL GetRasterizerCaps(LPRASTERIZER_STATUS,UINT);
|
||||
WORD GetROP2(HDC);
|
||||
WORD GetRelAbs(HDC);
|
||||
HANDLE GetStockObject(int);
|
||||
HGDIOBJ16 GetStockObject(INT16);
|
||||
WORD GetStretchBltMode(HDC);
|
||||
HMENU GetSubMenu(HMENU,short);
|
||||
HMENU GetSystemMenu(HWND,BOOL);
|
||||
HMENU16 GetSubMenu(HMENU16,short);
|
||||
HMENU16 GetSystemMenu(HWND,BOOL);
|
||||
int GetSystemMetrics(WORD);
|
||||
WORD GetSystemPaletteEntries(HDC,WORD,WORD,LPPALETTEENTRY);
|
||||
WORD GetSystemPaletteUse(HDC);
|
||||
BOOL GetSystemPowerStatus(LPSYSTEM_POWER_STATUS);
|
||||
VOID GetSystemTime(LPSYSTEMTIME); /* Win32 */
|
||||
DWORD GetTabbedTextExtent(HDC,LPSTR,int,int,LPINT16);
|
||||
BYTE GetTempDrive(BYTE);
|
||||
WORD GetTextAlign(HDC);
|
||||
|
@ -5067,43 +5118,34 @@ DWORD GetWindowOrg(HDC);
|
|||
int GetWindowTextLength(HWND);
|
||||
ATOM GlobalDeleteAtom(ATOM);
|
||||
void GlobalFix(HGLOBAL16);
|
||||
void GlobalFreeAll(HGLOBAL16);
|
||||
HGLOBAL16 GlobalLRUNewest(HGLOBAL16);
|
||||
HGLOBAL16 GlobalLRUOldest(HGLOBAL16);
|
||||
void GlobalNotify(FARPROC16);
|
||||
WORD GlobalPageLock(HGLOBAL16);
|
||||
WORD GlobalPageUnlock(HGLOBAL16);
|
||||
BOOL16 GlobalUnWire(HGLOBAL16);
|
||||
void GlobalUnfix(HGLOBAL16);
|
||||
SEGPTR GlobalWire(HGLOBAL16);
|
||||
BOOL GrayString(HDC,HBRUSH,GRAYSTRINGPROC16,LPARAM,INT,INT,INT,INT,INT);
|
||||
BOOL HiliteMenuItem(HWND,HMENU,UINT,UINT);
|
||||
BOOL GrayString(HDC,HBRUSH16,GRAYSTRINGPROC16,LPARAM,INT,INT,INT,INT,INT);
|
||||
BOOL HiliteMenuItem(HWND,HMENU16,UINT,UINT);
|
||||
BOOL InSendMessage(void);
|
||||
WORD InitAtomTable(WORD);
|
||||
HRGN InquireVisRgn(HDC);
|
||||
HRGN32 InquireVisRgn(HDC);
|
||||
int IntersectClipRect(HDC,short,short,short,short);
|
||||
int IntersectVisRect(HDC,short,short,short,short);
|
||||
void InvalidateRgn(HWND32,HRGN32,BOOL32);
|
||||
BOOL InvertRgn(HDC,HRGN);
|
||||
BOOL InvertRgn(HDC,HRGN32);
|
||||
BOOL IsChild(HWND,HWND);
|
||||
BOOL IsClipboardFormatAvailable(WORD);
|
||||
BOOL IsDialogMessage(HWND,LPMSG16);
|
||||
WORD IsDlgButtonChecked(HWND,WORD);
|
||||
BOOL IsGDIObject(HANDLE);
|
||||
BOOL16 IsGDIObject(HGDIOBJ16);
|
||||
BOOL IsIconic(HWND);
|
||||
BOOL IsMenu(HMENU);
|
||||
BOOL IsTask(HTASK);
|
||||
HTASK IsTaskLocked(void);
|
||||
BOOL IsMenu(HMENU16);
|
||||
BOOL IsValidMetaFile(HMETAFILE16);
|
||||
BOOL IsWindowEnabled(HWND);
|
||||
BOOL IsWindowVisible(HWND);
|
||||
BOOL IsZoomed(HWND);
|
||||
void LimitEmsPages(DWORD);
|
||||
BOOL LineTo(HDC,short,short);
|
||||
HANDLE LoadLibrary(LPCSTR);
|
||||
HANDLE LoadModule(LPCSTR,LPVOID);
|
||||
HINSTANCE16 LoadLibrary(LPCSTR);
|
||||
HINSTANCE16 LoadModule(LPCSTR,LPVOID);
|
||||
FARPROC16 LocalNotify(FARPROC16);
|
||||
HMENU LookupMenuHandle(HMENU,INT);
|
||||
HMENU16 LookupMenuHandle(HMENU16,INT);
|
||||
WORD MapVirtualKey(WORD,WORD);
|
||||
void MessageBeep(WORD);
|
||||
int MessageBox(HWND,LPCSTR,LPCSTR,WORD);
|
||||
|
@ -5113,21 +5155,17 @@ DWORD OemKeyScan(WORD);
|
|||
BOOL OemToAnsi(LPCSTR,LPSTR);
|
||||
void OemToAnsiBuff(LPCSTR,LPSTR,INT);
|
||||
int OffsetClipRgn(HDC,short,short);
|
||||
void OldYield(void);
|
||||
BOOL OpenClipboard(HWND);
|
||||
BOOL OpenIcon(HWND);
|
||||
int OpenSound(void);
|
||||
void OutputDebugString(LPCSTR);
|
||||
BOOL PaintRgn(HDC,HRGN);
|
||||
BOOL PaintRgn(HDC,HRGN32);
|
||||
BOOL PatBlt(HDC,short,short,short,short,DWORD);
|
||||
BOOL Pie(HDC,INT,INT,INT,INT,INT,INT,INT,INT);
|
||||
BOOL PlayMetaFile(HDC,HMETAFILE16);
|
||||
void PlayMetaFileRecord(HDC,LPHANDLETABLE16,LPMETARECORD,WORD);
|
||||
BOOL PostAppMessage(HANDLE,WORD,WORD,LONG);
|
||||
void PostEvent(HTASK);
|
||||
BOOL PostMessage(HWND,WORD,WORD,LONG);
|
||||
void PostQuitMessage(INT);
|
||||
WORD PrestoChangoSelector(WORD,WORD);
|
||||
void ProfClear(void);
|
||||
void ProfFinish(void);
|
||||
void ProfFlush(void);
|
||||
|
@ -5141,7 +5179,7 @@ WORD RealizeDefaultPalette(HDC);
|
|||
BOOL Rectangle(HDC,INT,INT,INT,INT);
|
||||
WORD RegisterClipboardFormat(LPCSTR);
|
||||
BOOL RemoveFontResource(LPSTR);
|
||||
BOOL RemoveMenu(HMENU,UINT,UINT);
|
||||
BOOL RemoveMenu(HMENU16,UINT,UINT);
|
||||
void ReplyMessage(LRESULT);
|
||||
HDC ResetDC(HDC,LPVOID);
|
||||
BOOL ResizePalette(HPALETTE16,UINT);
|
||||
|
@ -5149,25 +5187,24 @@ BOOL RestoreDC(HDC,short);
|
|||
int RestoreVisRgn(HDC);
|
||||
BOOL RoundRect(HDC,INT,INT,INT,INT,INT,INT);
|
||||
int SaveDC(HDC);
|
||||
HRGN SaveVisRgn(HDC);
|
||||
HRGN32 SaveVisRgn(HDC);
|
||||
void ScrollChildren(HWND,UINT,WPARAM,LPARAM);
|
||||
BOOL ScrollDC(HDC,short,short,LPRECT16,LPRECT16,HRGN,LPRECT16);
|
||||
BOOL ScrollDC(HDC,short,short,LPRECT16,LPRECT16,HRGN32,LPRECT16);
|
||||
void ScrollWindow(HWND,short,short,LPRECT16,LPRECT16);
|
||||
int ScrollWindowEx(HWND,short,short,LPRECT16,LPRECT16,HRGN,LPRECT16,WORD);
|
||||
int SelectClipRgn(HDC,HRGN);
|
||||
HANDLE SelectObject(HDC,HANDLE);
|
||||
int ScrollWindowEx(HWND,short,short,LPRECT16,LPRECT16,HRGN32,LPRECT16,WORD);
|
||||
int SelectClipRgn(HDC,HRGN32);
|
||||
HGDIOBJ16 SelectObject(HDC,HGDIOBJ16);
|
||||
HPALETTE16 SelectPalette(HDC,HPALETTE16,BOOL);
|
||||
int SelectVisRgn(HDC,HRGN);
|
||||
int SelectVisRgn(HDC,HRGN32);
|
||||
HWND SetActiveWindow(HWND);
|
||||
WORD SetBkMode(HDC,WORD);
|
||||
HANDLE SetClipboardData(WORD,HANDLE);
|
||||
HANDLE16 SetClipboardData(WORD,HANDLE16);
|
||||
HWND SetClipboardViewer(HWND);
|
||||
void SetConvertHook(BOOL);
|
||||
BOOL SetConvertParams(int,int);
|
||||
BOOL32 SetCurrentDirectory(LPCSTR);
|
||||
HCURSOR16 SetCursor(HCURSOR16);
|
||||
void SetCursorPos(short,short);
|
||||
BOOL SetDCHook(HDC,FARPROC16,DWORD);
|
||||
void SetDCState(HDC,HDC);
|
||||
void SetDoubleClickTime(WORD);
|
||||
int SetEnvironment(LPCSTR,LPCSTR,WORD);
|
||||
|
@ -5176,25 +5213,22 @@ WORD SetHookFlags(HDC,WORD);
|
|||
void SetKeyboardState(BYTE*);
|
||||
WORD SetMapMode(HDC,WORD);
|
||||
DWORD SetMapperFlags(HDC,DWORD);
|
||||
BOOL SetMenu(HWND,HMENU);
|
||||
BOOL SetMenuItemBitmaps(HMENU,UINT,UINT,HBITMAP,HBITMAP);
|
||||
BOOL SetMenu(HWND,HMENU16);
|
||||
BOOL SetMenuItemBitmaps(HMENU16,UINT,UINT,HBITMAP16,HBITMAP16);
|
||||
BOOL SetMessageQueue(int);
|
||||
HMETAFILE16 SetMetaFileBits(HANDLE);
|
||||
HMETAFILE16 SetMetaFileBits(HGLOBAL16);
|
||||
WORD SetPaletteEntries(HPALETTE16,WORD,WORD,LPPALETTEENTRY);
|
||||
HWND SetParent(HWND,HWND);
|
||||
COLORREF SetPixel(HDC,short,short,COLORREF);
|
||||
WORD SetPolyFillMode(HDC,WORD);
|
||||
WORD SetROP2(HDC,WORD);
|
||||
WORD SetRelAbs(HDC,WORD);
|
||||
FARPROC16 SetResourceHandler(HANDLE,LPSTR,FARPROC16);
|
||||
FARPROC16 SetResourceHandler(HINSTANCE16,LPSTR,FARPROC16);
|
||||
int SetSoundNoise(int,int);
|
||||
WORD SetStretchBltMode(HDC,WORD);
|
||||
LONG SetSwapAreaSize(WORD);
|
||||
void SetSysColors(int,LPINT16,COLORREF*);
|
||||
WORD SetSystemPaletteUse(HDC,WORD);
|
||||
BOOL SetSystemPowerState(BOOL, BOOL);
|
||||
BOOL SetSystemTime(const SYSTEMTIME*);
|
||||
HQUEUE16 SetTaskQueue(HTASK16,HQUEUE16);
|
||||
WORD SetTextAlign(HDC,WORD);
|
||||
short SetTextCharacterExtra(HDC,short);
|
||||
short SetTextJustification(HDC,short,short);
|
||||
|
@ -5206,55 +5240,42 @@ int SetVoiceSound(int,LONG,int);
|
|||
int SetVoiceThreshold(int,int);
|
||||
BOOL SetWinDebugInfo(LPWINDEBUGINFO);
|
||||
BOOL SetWindowPos(HWND,HWND,INT,INT,INT,INT,WORD);
|
||||
FARPROC16 SetWindowsHook(short,HOOKPROC16);
|
||||
HHOOK SetWindowsHookEx(INT16,HOOKPROC16,HINSTANCE,HTASK);
|
||||
HINSTANCE ShellExecute(HWND,LPCSTR,LPCSTR,LPSTR,LPCSTR,INT);
|
||||
HINSTANCE16 ShellExecute(HWND,LPCSTR,LPCSTR,LPSTR,LPCSTR,INT);
|
||||
int ShowCursor(BOOL);
|
||||
void ShowOwnedPopups(HWND,BOOL);
|
||||
BOOL ShowWindow(HWND,int);
|
||||
DWORD SizeofResource(HMODULE16,HRSRC16);
|
||||
VOID Sleep(DWORD); /* Win32 */
|
||||
int StartSound(void);
|
||||
int StopSound(void);
|
||||
BOOL StretchBlt(HDC,short,short,short,short,HDC,short,short,short,short,DWORD);
|
||||
int StretchDIBits(HDC,WORD,WORD,WORD,WORD,WORD,WORD,WORD,WORD,LPSTR,LPBITMAPINFO,WORD,DWORD);
|
||||
BOOL SwapMouseButton(BOOL);
|
||||
void SwapRecording(WORD);
|
||||
void SwitchStackBack(void);
|
||||
void SwitchStackTo(WORD,WORD,WORD);
|
||||
int SyncAllVoices(void);
|
||||
BOOL SystemParametersInfo(UINT,UINT,LPVOID,UINT);
|
||||
LONG TabbedTextOut(HDC,short,short,LPSTR,short,short,LPINT16,short);
|
||||
int ToAscii(WORD,WORD,LPSTR,LPVOID,WORD);
|
||||
int TranslateAccelerator(HWND,HANDLE,LPMSG16);
|
||||
INT16 TranslateAccelerator(HWND,HACCEL16,LPMSG16);
|
||||
BOOL TranslateMDISysAccel(HWND,LPMSG16);
|
||||
BOOL TranslateMessage(LPMSG16);
|
||||
BOOL UnhookWindowsHook(short,HOOKPROC16);
|
||||
BOOL UnhookWindowsHookEx(HHOOK);
|
||||
BOOL UnrealizeObject(HBRUSH);
|
||||
BOOL UnrealizeObject(HGDIOBJ16);
|
||||
int UpdateColors(HDC);
|
||||
void UpdateWindow(HWND32);
|
||||
void UserYield(void);
|
||||
void ValidateCodeSegments(void);
|
||||
LPSTR ValidateFreeSpaces(void);
|
||||
void ValidateRgn(HWND32,HRGN32);
|
||||
WORD VkKeyScan(WORD);
|
||||
SEGPTR WIN16_LockResource(HANDLE);
|
||||
BOOL WaitEvent(HTASK);
|
||||
SEGPTR WIN16_LockResource(HGLOBAL16);
|
||||
void WaitMessage(void);
|
||||
int WaitSoundState(int);
|
||||
HANDLE WinExec(LPSTR,WORD);
|
||||
HINSTANCE16 WinExec(LPSTR,WORD);
|
||||
BOOL WinHelp(HWND,LPSTR,WORD,DWORD);
|
||||
void WriteOutProfiles(void);
|
||||
BOOL WritePrivateProfileString(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
|
||||
BOOL WriteProfileString(LPCSTR,LPCSTR,LPCSTR);
|
||||
void Yield(void);
|
||||
|
||||
#endif /* NO_TRANSITION_TYPES */
|
||||
|
||||
#ifdef WINELIB
|
||||
#define WINELIB_UNIMP(x) fprintf (stderr, "WineLib: Unimplemented %s\n", x)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -198,20 +198,20 @@ BOOL WSAIsBlocking(void);
|
|||
INT WSAUnhookBlockingHook(void);
|
||||
FARPROC16 WSASetBlockingHook(FARPROC16 lpBlockFunc);
|
||||
INT WSACancelBlockingCall(void);
|
||||
HANDLE WSAAsyncGetServByName(HWND hWnd, u_int wMsg,
|
||||
LPCSTR name, LPCSTR proto,
|
||||
LPSTR buf, INT buflen);
|
||||
HANDLE WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, INT port,
|
||||
LPCSTR proto, LPSTR buf, INT buflen);
|
||||
HANDLE WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg,
|
||||
LPCSTR name, LPSTR buf, INT buflen);
|
||||
HANDLE WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg,
|
||||
INT number, LPSTR buf, INT buflen);
|
||||
HANDLE WSAAsyncGetHostByName(HWND hWnd, u_int wMsg,
|
||||
LPCSTR name, LPSTR buf, INT buflen);
|
||||
HANDLE WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, LPCSTR addr, INT len,
|
||||
INT type, LPSTR buf, INT buflen);
|
||||
INT WSACancelAsyncRequest(HANDLE hAsyncTaskHandle);
|
||||
HANDLE16 WSAAsyncGetServByName(HWND hWnd, u_int wMsg,
|
||||
LPCSTR name, LPCSTR proto,
|
||||
LPSTR buf, INT buflen);
|
||||
HANDLE16 WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, INT port,
|
||||
LPCSTR proto, LPSTR buf, INT buflen);
|
||||
HANDLE16 WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg,
|
||||
LPCSTR name, LPSTR buf, INT buflen);
|
||||
HANDLE16 WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg,
|
||||
INT number, LPSTR buf, INT buflen);
|
||||
HANDLE16 WSAAsyncGetHostByName(HWND hWnd, u_int wMsg,
|
||||
LPCSTR name, LPSTR buf, INT buflen);
|
||||
HANDLE16 WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, LPCSTR addr, INT len,
|
||||
INT type, LPSTR buf, INT buflen);
|
||||
INT WSACancelAsyncRequest(HANDLE16 hAsyncTaskHandle);
|
||||
INT WSAAsyncSelect(SOCKET s, HWND hWnd, u_int wMsg, long lEvent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
#endif
|
||||
|
||||
#if !defined(__WINE__) && !defined(WINELIB)
|
||||
/* If we are not compiling Wine, then we are using Winelib */
|
||||
/* If we are not compiling Wine, then we should be using Winelib */
|
||||
#error You must use 'configure --with-library' to build Winelib programs
|
||||
#define WINELIB
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
DEFS = -D__WINE__
|
||||
TOPSRC = @top_srcdir@
|
||||
MODULE = ipc
|
||||
DEFS = -D__WINE__
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = ipc
|
||||
|
||||
C_SRCS = \
|
||||
bit_array.c \
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
DEFS = -D__WINE__
|
||||
TOPSRC = @top_srcdir@
|
||||
MODULE = library
|
||||
DEFS = -D__WINE__
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = library
|
||||
|
||||
C_SRCS = \
|
||||
arch.c \
|
||||
|
|
|
@ -32,7 +32,7 @@ void LIBRES_RegisterResources(const struct resource* const * Res)
|
|||
/**********************************************************************
|
||||
* LIBRES_FindResource
|
||||
*/
|
||||
HRSRC32 LIBRES_FindResource( HINSTANCE hModule, LPCSTR name, LPCSTR type )
|
||||
HRSRC32 LIBRES_FindResource( HINSTANCE32 hModule, LPCSTR name, LPCSTR type )
|
||||
{
|
||||
int nameid=0,typeid;
|
||||
ResListE* ResBlock;
|
||||
|
@ -81,7 +81,7 @@ HRSRC32 LIBRES_FindResource( HINSTANCE hModule, LPCSTR name, LPCSTR type )
|
|||
/**********************************************************************
|
||||
* LIBRES_LoadResource
|
||||
*/
|
||||
HGLOBAL32 LIBRES_LoadResource( HINSTANCE hModule, HRSRC32 hRsrc )
|
||||
HGLOBAL32 LIBRES_LoadResource( HINSTANCE32 hModule, HRSRC32 hRsrc )
|
||||
{
|
||||
return (HGLOBAL32)(((struct resource*)hRsrc)->bytes);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ BOOL LIBRES_FreeResource( HGLOBAL32 handle )
|
|||
/**********************************************************************
|
||||
* LIBRES_AccessResource
|
||||
*/
|
||||
INT LIBRES_AccessResource( HINSTANCE hModule, HRSRC32 hRsrc )
|
||||
INT32 LIBRES_AccessResource( HINSTANCE32 hModule, HRSRC32 hRsrc )
|
||||
{
|
||||
WINELIB_UNIMP("LIBRES_AccessResource()");
|
||||
return -1; /* Obsolete in Win32 */
|
||||
|
@ -118,7 +118,7 @@ INT LIBRES_AccessResource( HINSTANCE hModule, HRSRC32 hRsrc )
|
|||
/**********************************************************************
|
||||
* LIBRES_SizeofResource
|
||||
*/
|
||||
DWORD LIBRES_SizeofResource( HINSTANCE hModule, HRSRC32 hRsrc )
|
||||
DWORD LIBRES_SizeofResource( HINSTANCE32 hModule, HRSRC32 hRsrc )
|
||||
{
|
||||
return (DWORD)(((struct resource*)hRsrc)->size);
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ DWORD LIBRES_SizeofResource( HINSTANCE hModule, HRSRC32 hRsrc )
|
|||
/**********************************************************************
|
||||
* LIBRES_AllocResource
|
||||
*/
|
||||
HGLOBAL32 LIBRES_AllocResource( HINSTANCE hModule, HRSRC32 hRsrc, DWORD size )
|
||||
HGLOBAL32 LIBRES_AllocResource( HINSTANCE32 hModule, HRSRC32 hRsrc, DWORD size)
|
||||
{
|
||||
WINELIB_UNIMP("LIBRES_AllocResource()");
|
||||
return 0; /* Obsolete in Win32 */
|
||||
|
|
|
@ -7,14 +7,13 @@
|
|||
extern int MAIN_Init(void);
|
||||
extern BOOL WIDGETS_Init(void);
|
||||
extern BOOL WIN_CreateDesktopWindow(void);
|
||||
extern int WinMain(HINSTANCE,HINSTANCE,LPSTR,int);
|
||||
extern int WinMain(HINSTANCE16,HINSTANCE16,LPSTR,int);
|
||||
extern void TASK_Reschedule(void);
|
||||
extern int USER_InitApp(HINSTANCE);
|
||||
|
||||
|
||||
int _WinMain (int argc, char *argv [])
|
||||
{
|
||||
HINSTANCE hInstance;
|
||||
HINSTANCE16 hInstance;
|
||||
LPSTR lpszCmdParam;
|
||||
int i, len = 0;
|
||||
|
||||
|
@ -29,7 +28,7 @@ int _WinMain (int argc, char *argv [])
|
|||
if(!MAIN_Init()) return 0; /* JBP: Needed for DosDrives[] structure, etc. */
|
||||
hInstance = WinExec( *argv, SW_SHOWNORMAL );
|
||||
TASK_Reschedule();
|
||||
USER_InitApp( hInstance );
|
||||
InitApp( hInstance );
|
||||
|
||||
#ifdef WINELIBDLL
|
||||
return (int)hInstance;
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
TOPSRC = @top_srcdir@
|
||||
MODULE = none
|
||||
PROGRAMS = hello hello2 hello3 hello4 new rolex
|
||||
ALL_LIBS = $(WINELIB) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LDLIBS)
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = none
|
||||
PROGRAMS = hello hello2 hello3 hello4 new rolex
|
||||
ALL_LIBS = $(WINELIB) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LDLIBS)
|
||||
|
||||
C_SRCS = \
|
||||
hello.c \
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
DEFS = -D__WINE__
|
||||
TOPSRC = @top_srcdir@
|
||||
MODULE = loader
|
||||
DEFS = -D__WINE__
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = loader
|
||||
|
||||
C_SRCS = \
|
||||
builtin.c \
|
||||
|
|
|
@ -166,7 +166,7 @@ int MAIN_Init(void)
|
|||
int _WinMain(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
HANDLE handle;
|
||||
HINSTANCE16 handle;
|
||||
|
||||
if (!MAIN_Init()) return 0;
|
||||
|
||||
|
|
|
@ -27,13 +27,13 @@
|
|||
#include "debug.h"
|
||||
#include "callback.h"
|
||||
|
||||
extern HINSTANCE PE_LoadModule( int fd, OFSTRUCT *ofs, LOADPARAMS* params );
|
||||
extern HINSTANCE16 PE_LoadModule( int fd, OFSTRUCT *ofs, LOADPARAMS* params );
|
||||
|
||||
static HMODULE16 hFirstModule = 0;
|
||||
static HMODULE16 hCachedModule = 0; /* Module cached by MODULE_OpenFile */
|
||||
|
||||
#ifndef WINELIB
|
||||
static HANDLE hInitialStack32 = 0;
|
||||
static HGLOBAL16 hInitialStack32 = 0;
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -335,7 +335,7 @@ HINSTANCE16 MODULE_CreateInstance( HMODULE16 hModule, LOADPARAMS *params )
|
|||
SEGTABLEENTRY *pSegment;
|
||||
NE_MODULE *pModule;
|
||||
int minsize;
|
||||
HINSTANCE hNewInstance, hPrevInstance;
|
||||
HINSTANCE16 hNewInstance, hPrevInstance;
|
||||
|
||||
if (!(pModule = MODULE_GetPtr( hModule ))) return 0;
|
||||
if (pModule->dgroup == 0) return hModule;
|
||||
|
@ -997,10 +997,10 @@ static void MODULE_FreeModule( HMODULE16 hModule )
|
|||
/**********************************************************************
|
||||
* LoadModule (KERNEL.45)
|
||||
*/
|
||||
HINSTANCE LoadModule( LPCSTR name, LPVOID paramBlock )
|
||||
HINSTANCE16 LoadModule( LPCSTR name, LPVOID paramBlock )
|
||||
{
|
||||
HMODULE16 hModule;
|
||||
HANDLE hInstance, hPrevInstance;
|
||||
HINSTANCE16 hInstance, hPrevInstance;
|
||||
NE_MODULE *pModule;
|
||||
LOADPARAMS *params = (LOADPARAMS *)paramBlock;
|
||||
OFSTRUCT ofs;
|
||||
|
@ -1257,7 +1257,7 @@ BOOL16 FreeModule16( HMODULE16 hModule )
|
|||
*/
|
||||
HMODULE16 WIN16_GetModuleHandle( SEGPTR name )
|
||||
{
|
||||
if (HIWORD(name) == 0) return GetExePtr( (HANDLE)name );
|
||||
if (HIWORD(name) == 0) return GetExePtr( (HINSTANCE16)name );
|
||||
return MODULE_FindModule( PTR_SEG_TO_LIN(name) );
|
||||
}
|
||||
|
||||
|
@ -1270,7 +1270,7 @@ HMODULE16 GetModuleHandle( LPCSTR name )
|
|||
/**********************************************************************
|
||||
* GetModuleUsage (KERNEL.48)
|
||||
*/
|
||||
int GetModuleUsage( HANDLE hModule )
|
||||
INT16 GetModuleUsage( HINSTANCE16 hModule )
|
||||
{
|
||||
NE_MODULE *pModule;
|
||||
|
||||
|
@ -1285,7 +1285,7 @@ int GetModuleUsage( HANDLE hModule )
|
|||
/**********************************************************************
|
||||
* GetModuleFileName (KERNEL.49)
|
||||
*/
|
||||
int GetModuleFileName( HANDLE hModule, LPSTR lpFileName, short nSize )
|
||||
INT16 GetModuleFileName( HINSTANCE16 hModule, LPSTR lpFileName, INT16 nSize )
|
||||
{
|
||||
NE_MODULE *pModule;
|
||||
|
||||
|
@ -1312,14 +1312,14 @@ BOOL16 GetModuleName( HINSTANCE16 hinst, LPSTR buf, INT16 nSize )
|
|||
/***********************************************************************
|
||||
* LoadLibrary (KERNEL.95)
|
||||
*/
|
||||
HANDLE LoadLibrary( LPCSTR libname )
|
||||
HINSTANCE16 LoadLibrary( LPCSTR libname )
|
||||
{
|
||||
HANDLE handle;
|
||||
HINSTANCE16 handle;
|
||||
|
||||
if (__winelib)
|
||||
{
|
||||
fprintf( stderr, "LoadLibrary not supported in Winelib\n" );
|
||||
return (HANDLE)0;
|
||||
return 0;
|
||||
}
|
||||
dprintf_module( stddeb, "LoadLibrary: (%08x) %s\n", (int)libname, libname);
|
||||
|
||||
|
@ -1328,7 +1328,7 @@ HANDLE LoadLibrary( LPCSTR libname )
|
|||
if ((handle = MODULE_FindModule( libname )) != 0) return handle;
|
||||
*/
|
||||
handle = LoadModule( libname, (LPVOID)-1 );
|
||||
if (handle == (HANDLE)2) /* file not found */
|
||||
if (handle == (HINSTANCE16)2) /* file not found */
|
||||
{
|
||||
char buffer[256];
|
||||
lstrcpyn32A( buffer, libname, 252 );
|
||||
|
@ -1336,7 +1336,7 @@ HANDLE LoadLibrary( LPCSTR libname )
|
|||
handle = LoadModule( buffer, (LPVOID)-1 );
|
||||
}
|
||||
#ifndef WINELIB
|
||||
if (handle >= (HANDLE)32) NE_InitializeDLLs( GetExePtr(handle) );
|
||||
if (handle >= (HINSTANCE16)32) NE_InitializeDLLs( GetExePtr(handle) );
|
||||
#endif
|
||||
return handle;
|
||||
}
|
||||
|
@ -1345,7 +1345,7 @@ HANDLE LoadLibrary( LPCSTR libname )
|
|||
/***********************************************************************
|
||||
* FreeLibrary (KERNEL.96)
|
||||
*/
|
||||
void FreeLibrary( HANDLE handle )
|
||||
void FreeLibrary( HINSTANCE16 handle )
|
||||
{
|
||||
dprintf_module( stddeb,"FreeLibrary: %04x\n", handle );
|
||||
FreeModule16( handle );
|
||||
|
@ -1355,11 +1355,11 @@ void FreeLibrary( HANDLE handle )
|
|||
/***********************************************************************
|
||||
* WinExec (KERNEL.166)
|
||||
*/
|
||||
HANDLE WinExec( LPSTR lpCmdLine, WORD nCmdShow )
|
||||
HINSTANCE16 WinExec( LPSTR lpCmdLine, WORD nCmdShow )
|
||||
{
|
||||
LOADPARAMS params;
|
||||
HGLOBAL16 cmdShowHandle, cmdLineHandle;
|
||||
HANDLE handle;
|
||||
HINSTANCE16 handle;
|
||||
WORD *cmdShowPtr;
|
||||
char *p, *cmdline, filename[256];
|
||||
static int use_load_module = 1;
|
||||
|
@ -1394,9 +1394,9 @@ HANDLE WinExec( LPSTR lpCmdLine, WORD nCmdShow )
|
|||
#ifdef WINELIB
|
||||
/* WINELIB: Use LoadModule() only for the program itself */
|
||||
use_load_module = 0;
|
||||
params.hEnvironment = (HANDLE)GetDOSEnvironment();
|
||||
params.hEnvironment = (HGLOBAL16)GetDOSEnvironment();
|
||||
#else
|
||||
params.hEnvironment = (HANDLE)SELECTOROF( GetDOSEnvironment() );
|
||||
params.hEnvironment = (HGLOBAL16)SELECTOROF( GetDOSEnvironment() );
|
||||
#endif /* WINELIB */
|
||||
params.cmdLine = (SEGPTR)WIN16_GlobalLock16( cmdLineHandle );
|
||||
params.showCmd = (SEGPTR)WIN16_GlobalLock16( cmdShowHandle );
|
||||
|
@ -1478,12 +1478,6 @@ HANDLE WinExec( LPSTR lpCmdLine, WORD nCmdShow )
|
|||
|
||||
GlobalFree16( cmdShowHandle );
|
||||
GlobalFree16( cmdLineHandle );
|
||||
|
||||
#if 0
|
||||
if (handle < (HANDLE)32) /* Error? */
|
||||
return handle;
|
||||
#endif
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
|
|
@ -529,7 +529,7 @@ void NE_InitializeDLLs( HMODULE16 hModule )
|
|||
}
|
||||
if (pModule->dlls_to_init)
|
||||
{
|
||||
HANDLE to_init = pModule->dlls_to_init;
|
||||
HGLOBAL16 to_init = pModule->dlls_to_init;
|
||||
pModule->dlls_to_init = 0;
|
||||
for (pDLL = (HMODULE16 *)GlobalLock16( to_init ); *pDLL; pDLL++)
|
||||
{
|
||||
|
@ -549,7 +549,7 @@ void NE_InitializeDLLs( HMODULE16 hModule )
|
|||
*/
|
||||
|
||||
/* It does nothing */
|
||||
void PatchCodeHandle(HANDLE hSel)
|
||||
void PatchCodeHandle(HANDLE16 hSel)
|
||||
{
|
||||
}
|
||||
#endif /* WINELIB */
|
||||
|
|
|
@ -53,7 +53,7 @@ static DWORD NE_FindNameTableId( HMODULE16 hModule, SEGPTR typeId, SEGPTR resId
|
|||
dprintf_resource( stddeb, "NameTable entry: type=%04x id=%04x\n",
|
||||
pTypeInfo->type_id, pNameInfo->id );
|
||||
handle = LoadResource16( hModule,
|
||||
(HANDLE)((int)pNameInfo - (int)pModule) );
|
||||
(HRSRC16)((int)pNameInfo - (int)pModule) );
|
||||
for(p = (WORD*)LockResource16(handle); p && *p; p = (WORD *)((char*)p+*p))
|
||||
{
|
||||
dprintf_resource( stddeb," type=%04x '%s' id=%04x '%s'\n",
|
||||
|
|
|
@ -558,10 +558,10 @@ static struct pe_data *PE_LoadImage( int fd, HMODULE16 hModule, WORD offset )
|
|||
return pe;
|
||||
}
|
||||
|
||||
HINSTANCE MODULE_CreateInstance(HMODULE16 hModule,LOADPARAMS *params);
|
||||
HINSTANCE16 MODULE_CreateInstance(HMODULE16 hModule,LOADPARAMS *params);
|
||||
void InitTask( SIGCONTEXT *context );
|
||||
|
||||
HINSTANCE PE_LoadModule( int fd, OFSTRUCT *ofs, LOADPARAMS* params )
|
||||
HINSTANCE16 PE_LoadModule( int fd, OFSTRUCT *ofs, LOADPARAMS* params )
|
||||
{
|
||||
HMODULE16 hModule;
|
||||
HINSTANCE16 hInstance;
|
||||
|
@ -598,7 +598,6 @@ HINSTANCE PE_LoadModule( int fd, OFSTRUCT *ofs, LOADPARAMS* params )
|
|||
return hInstance;
|
||||
}
|
||||
|
||||
int USER_InitApp(HINSTANCE hInstance);
|
||||
void PE_InitTEB(int hTEB);
|
||||
|
||||
void PE_InitializeDLLs(HMODULE16 hModule);
|
||||
|
@ -612,7 +611,7 @@ void PE_Win32CallToStart( SIGCONTEXT *context )
|
|||
InitTask( context );
|
||||
hModule = GetExePtr( GetCurrentTask() );
|
||||
pModule = MODULE_GetPtr( hModule );
|
||||
USER_InitApp( hModule );
|
||||
InitApp( hModule );
|
||||
fs=(int)GlobalAlloc16( GMEM_FIXED | GMEM_ZEROINIT, 0x10000 );
|
||||
PE_InitTEB(fs);
|
||||
__asm__ __volatile__("movw %w0,%%fs"::"r" (fs));
|
||||
|
@ -686,7 +685,7 @@ void PE_InitializeDLLs(HMODULE16 hModule)
|
|||
pModule = MODULE_GetPtr( GetExePtr(hModule) );
|
||||
if (pModule->dlls_to_init)
|
||||
{
|
||||
HANDLE to_init = pModule->dlls_to_init;
|
||||
HGLOBAL16 to_init = pModule->dlls_to_init;
|
||||
pModule->dlls_to_init = 0;
|
||||
for (pDLL = (HMODULE16 *)GlobalLock16( to_init ); *pDLL; pDLL++)
|
||||
{
|
||||
|
|
|
@ -116,7 +116,7 @@ PIMAGE_RESOURCE_DIRECTORY GetResDirEntryA(PIMAGE_RESOURCE_DIRECTORY resdirptr,
|
|||
* PE_FindResourceEx32W
|
||||
*/
|
||||
HANDLE32 PE_FindResourceEx32W(
|
||||
HINSTANCE hModule, LPCWSTR name, LPCWSTR type, WORD lang
|
||||
HINSTANCE32 hModule, LPCWSTR name, LPCWSTR type, WORD lang
|
||||
)
|
||||
{
|
||||
PE_MODULE *pe;
|
||||
|
@ -152,7 +152,7 @@ HANDLE32 PE_FindResourceEx32W(
|
|||
/**********************************************************************
|
||||
* PE_LoadResource32
|
||||
*/
|
||||
HANDLE32 PE_LoadResource32( HINSTANCE hModule, HANDLE32 hRsrc )
|
||||
HANDLE32 PE_LoadResource32( HINSTANCE32 hModule, HANDLE32 hRsrc )
|
||||
{
|
||||
NE_MODULE *pModule;
|
||||
PE_MODULE *pe;
|
||||
|
|
|
@ -376,7 +376,7 @@ HGLOBAL16 AllocResource16( HMODULE16 hModule, HRSRC16 hRsrc, DWORD size )
|
|||
*
|
||||
* Check Schulman, p. 232 for details
|
||||
*/
|
||||
HANDLE DirectResAlloc(HANDLE hInstance, WORD wType, WORD wSize)
|
||||
HGLOBAL16 DirectResAlloc( HINSTANCE16 hInstance, WORD wType, UINT16 wSize )
|
||||
{
|
||||
dprintf_resource(stddeb,"DirectResAlloc(%04x,%04x,%04x)\n",
|
||||
hInstance, wType, wSize );
|
||||
|
@ -507,7 +507,7 @@ HACCEL32 LoadAccelerators32A(HINSTANCE32 instance,LPCSTR lpTableName)
|
|||
/**********************************************************************
|
||||
* TranslateAccelerator [USER.178]
|
||||
*/
|
||||
int TranslateAccelerator(HWND hWnd, HANDLE hAccel, LPMSG16 msg)
|
||||
INT16 TranslateAccelerator(HWND hWnd, HACCEL16 hAccel, LPMSG16 msg)
|
||||
{
|
||||
ACCELHEADER *lpAccelTbl;
|
||||
int i;
|
||||
|
|
|
@ -54,8 +54,8 @@ static HTASK16 hFirstTask = 0;
|
|||
static HTASK16 hCurrentTask = 0;
|
||||
static HTASK16 hTaskToKill = 0;
|
||||
static HTASK16 hLockedTask = 0;
|
||||
static WORD nTaskCount = 0;
|
||||
static HANDLE hDOSEnvironment = 0;
|
||||
static UINT16 nTaskCount = 0;
|
||||
static HGLOBAL16 hDOSEnvironment = 0;
|
||||
|
||||
/* TASK_Reschedule() 16-bit entry point */
|
||||
static FARPROC16 TASK_RescheduleProc;
|
||||
|
@ -66,7 +66,7 @@ static FARPROC16 TASK_RescheduleProc;
|
|||
#define TASK_SCHEDULE() CallTo16_word_(TASK_RescheduleProc)
|
||||
#endif
|
||||
|
||||
static HANDLE TASK_CreateDOSEnvironment(void);
|
||||
static HGLOBAL16 TASK_CreateDOSEnvironment(void);
|
||||
|
||||
/***********************************************************************
|
||||
* TASK_Init
|
||||
|
@ -83,7 +83,7 @@ BOOL32 TASK_Init(void)
|
|||
/***********************************************************************
|
||||
* TASK_GetNextTask
|
||||
*/
|
||||
HTASK TASK_GetNextTask( HTASK hTask )
|
||||
HTASK16 TASK_GetNextTask( HTASK16 hTask )
|
||||
{
|
||||
TDB* pTask = (TDB*)GlobalLock16(hTask);
|
||||
|
||||
|
@ -97,12 +97,12 @@ HTASK TASK_GetNextTask( HTASK hTask )
|
|||
*
|
||||
* Create the original DOS environment.
|
||||
*/
|
||||
static HANDLE TASK_CreateDOSEnvironment(void)
|
||||
static HGLOBAL16 TASK_CreateDOSEnvironment(void)
|
||||
{
|
||||
static const char program_name[] = "KRNL386.EXE";
|
||||
char **e, *p;
|
||||
int initial_size, size, i, winpathlen, sysdirlen;
|
||||
HANDLE handle;
|
||||
HGLOBAL16 handle;
|
||||
|
||||
extern char **environ;
|
||||
|
||||
|
@ -279,7 +279,7 @@ static void TASK_CreateThunks( HGLOBAL16 handle, WORD offset, WORD count )
|
|||
* Allocate a thunk for MakeProcInstance().
|
||||
*/
|
||||
#ifndef WINELIB32
|
||||
static SEGPTR TASK_AllocThunk( HTASK hTask )
|
||||
static SEGPTR TASK_AllocThunk( HTASK16 hTask )
|
||||
{
|
||||
TDB *pTask;
|
||||
THUNKS *pThunk;
|
||||
|
@ -316,7 +316,7 @@ static SEGPTR TASK_AllocThunk( HTASK hTask )
|
|||
* Free a MakeProcInstance() thunk.
|
||||
*/
|
||||
#ifndef WINELIB32
|
||||
static BOOL TASK_FreeThunk( HTASK hTask, SEGPTR thunk )
|
||||
static BOOL TASK_FreeThunk( HTASK16 hTask, SEGPTR thunk )
|
||||
{
|
||||
TDB *pTask;
|
||||
THUNKS *pThunk;
|
||||
|
@ -396,9 +396,9 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
|
|||
HINSTANCE16 hPrevInstance, HANDLE16 hEnvironment,
|
||||
LPCSTR cmdLine, UINT16 cmdShow )
|
||||
{
|
||||
HTASK hTask;
|
||||
HTASK16 hTask;
|
||||
TDB *pTask;
|
||||
HANDLE hParentEnv;
|
||||
HGLOBAL16 hParentEnv;
|
||||
NE_MODULE *pModule;
|
||||
SEGTABLEENTRY *pSegTable;
|
||||
LPSTR name;
|
||||
|
@ -598,10 +598,10 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
|
|||
/***********************************************************************
|
||||
* TASK_DeleteTask
|
||||
*/
|
||||
static void TASK_DeleteTask( HTASK hTask )
|
||||
static void TASK_DeleteTask( HTASK16 hTask )
|
||||
{
|
||||
TDB *pTask;
|
||||
HANDLE hPDB;
|
||||
HGLOBAL16 hPDB;
|
||||
|
||||
if (!(pTask = (TDB *)GlobalLock16( hTask ))) return;
|
||||
hPDB = pTask->hPDB;
|
||||
|
@ -711,7 +711,7 @@ void TASK_YieldToSystem(TDB* pTask)
|
|||
void TASK_Reschedule(void)
|
||||
{
|
||||
TDB *pOldTask = NULL, *pNewTask;
|
||||
HTASK hTask = 0;
|
||||
HTASK16 hTask = 0;
|
||||
|
||||
#ifdef CONFIG_IPC
|
||||
dde_reschedule();
|
||||
|
@ -862,7 +862,7 @@ void InitTask( SIGCONTEXT *context )
|
|||
/***********************************************************************
|
||||
* WaitEvent (KERNEL.30)
|
||||
*/
|
||||
BOOL WaitEvent( HTASK hTask )
|
||||
BOOL16 WaitEvent( HTASK16 hTask )
|
||||
{
|
||||
TDB *pTask;
|
||||
|
||||
|
@ -885,7 +885,7 @@ BOOL WaitEvent( HTASK hTask )
|
|||
/***********************************************************************
|
||||
* PostEvent (KERNEL.31)
|
||||
*/
|
||||
void PostEvent( HTASK hTask )
|
||||
void PostEvent( HTASK16 hTask )
|
||||
{
|
||||
TDB *pTask;
|
||||
|
||||
|
@ -898,10 +898,10 @@ void PostEvent( HTASK hTask )
|
|||
/***********************************************************************
|
||||
* SetPriority (KERNEL.32)
|
||||
*/
|
||||
void SetPriority( HTASK hTask, int delta )
|
||||
void SetPriority( HTASK16 hTask, INT16 delta )
|
||||
{
|
||||
TDB *pTask;
|
||||
int newpriority;
|
||||
INT16 newpriority;
|
||||
|
||||
if (!hTask) hTask = hCurrentTask;
|
||||
if (!(pTask = (TDB *)GlobalLock16( hTask ))) return;
|
||||
|
@ -919,7 +919,7 @@ void SetPriority( HTASK hTask, int delta )
|
|||
/***********************************************************************
|
||||
* LockCurrentTask (KERNEL.33)
|
||||
*/
|
||||
HTASK LockCurrentTask( BOOL bLock )
|
||||
HTASK16 LockCurrentTask( BOOL16 bLock )
|
||||
{
|
||||
if (bLock) hLockedTask = hCurrentTask;
|
||||
else hLockedTask = 0;
|
||||
|
@ -930,7 +930,7 @@ HTASK LockCurrentTask( BOOL bLock )
|
|||
/***********************************************************************
|
||||
* IsTaskLocked (KERNEL.122)
|
||||
*/
|
||||
HTASK IsTaskLocked(void)
|
||||
HTASK16 IsTaskLocked(void)
|
||||
{
|
||||
return hLockedTask;
|
||||
}
|
||||
|
@ -953,7 +953,7 @@ void OldYield(void)
|
|||
/***********************************************************************
|
||||
* DirectedYield (KERNEL.150)
|
||||
*/
|
||||
void DirectedYield( HTASK hTask )
|
||||
void DirectedYield( HTASK16 hTask )
|
||||
{
|
||||
TDB *pCurTask = (TDB *)GlobalLock16( hCurrentTask );
|
||||
pCurTask->hYieldTo = hTask;
|
||||
|
@ -1035,10 +1035,10 @@ void FreeProcInstance16( FARPROC16 func )
|
|||
/**********************************************************************
|
||||
* GetCodeHandle (KERNEL.93)
|
||||
*/
|
||||
HANDLE GetCodeHandle( FARPROC16 proc )
|
||||
HANDLE16 GetCodeHandle( FARPROC16 proc )
|
||||
{
|
||||
#ifndef WINELIB32
|
||||
HANDLE handle;
|
||||
HANDLE16 handle;
|
||||
BYTE *thunk = (BYTE *)PTR_SEG_TO_LIN( proc );
|
||||
|
||||
/* Return the code segment containing 'proc'. */
|
||||
|
@ -1052,7 +1052,7 @@ HANDLE GetCodeHandle( FARPROC16 proc )
|
|||
|
||||
return handle;
|
||||
#else
|
||||
return (HANDLE)proc;
|
||||
return (HANDLE16)proc;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1224,7 +1224,7 @@ HANDLE16 GetCurrentPDB(void)
|
|||
/***********************************************************************
|
||||
* GetInstanceData (KERNEL.54)
|
||||
*/
|
||||
int GetInstanceData( HANDLE instance, WORD buffer, int len )
|
||||
INT16 GetInstanceData( HINSTANCE16 instance, WORD buffer, INT16 len )
|
||||
{
|
||||
char *ptr = (char *)GlobalLock16( instance );
|
||||
if (!ptr || !len) return 0;
|
||||
|
@ -1276,7 +1276,7 @@ SEGPTR GetDOSEnvironment(void)
|
|||
/***********************************************************************
|
||||
* GetNumTasks (KERNEL.152)
|
||||
*/
|
||||
WORD GetNumTasks(void)
|
||||
UINT16 GetNumTasks(void)
|
||||
{
|
||||
return nTaskCount;
|
||||
}
|
||||
|
@ -1300,7 +1300,7 @@ HINSTANCE16 GetTaskDS(void)
|
|||
/***********************************************************************
|
||||
* IsTask (KERNEL.320)
|
||||
*/
|
||||
BOOL IsTask( HTASK hTask )
|
||||
BOOL16 IsTask( HTASK16 hTask )
|
||||
{
|
||||
TDB *pTask;
|
||||
|
||||
|
@ -1351,6 +1351,18 @@ WORD SetSigHandler( FARPROC16 newhandler, FARPROC16* oldhandler,
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GlobalNotify (KERNEL.154)
|
||||
*/
|
||||
VOID GlobalNotify( FARPROC16 proc )
|
||||
{
|
||||
TDB *pTask;
|
||||
|
||||
if (!(pTask = (TDB *)GlobalLock16( hCurrentTask ))) return;
|
||||
pTask->discardhandler = proc;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetExePtr (KERNEL.133)
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRC = @top_srcdir@
|
||||
MODULE = memory
|
||||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = memory
|
||||
|
||||
C_SRCS = \
|
||||
atom.c \
|
||||
|
|
33
memory/ldt.c
33
memory/ldt.c
|
@ -15,8 +15,18 @@
|
|||
|
||||
#ifdef linux
|
||||
#include <syscall.h>
|
||||
#include <linux/head.h>
|
||||
#include <linux/ldt.h>
|
||||
|
||||
struct modify_ldt_s
|
||||
{
|
||||
unsigned int entry_number;
|
||||
unsigned long base_addr;
|
||||
unsigned int limit;
|
||||
unsigned int seg_32bit : 1;
|
||||
unsigned int contents : 2;
|
||||
unsigned int read_exec_only : 1;
|
||||
unsigned int limit_in_pages : 1;
|
||||
unsigned int seg_not_present : 1;
|
||||
};
|
||||
|
||||
static __inline__ _syscall3(int, modify_ldt, int, func, void *, ptr,
|
||||
unsigned long, bytecount);
|
||||
|
@ -122,17 +132,16 @@ int LDT_SetEntry( int entry, const ldt_entry *content )
|
|||
#ifdef linux
|
||||
if (!__winelib)
|
||||
{
|
||||
struct modify_ldt_ldt_s ldt_info;
|
||||
struct modify_ldt_s ldt_info;
|
||||
|
||||
/* Clear all unused bits (like seg_not_present) */
|
||||
memset( &ldt_info, 0, sizeof(ldt_info) );
|
||||
ldt_info.entry_number = entry;
|
||||
ldt_info.base_addr = content->base;
|
||||
ldt_info.limit = content->limit;
|
||||
ldt_info.seg_32bit = content->seg_32bit != 0;
|
||||
ldt_info.contents = content->type;
|
||||
ldt_info.read_exec_only = content->read_only != 0;
|
||||
ldt_info.limit_in_pages = content->limit_in_pages != 0;
|
||||
ldt_info.entry_number = entry;
|
||||
ldt_info.base_addr = content->base;
|
||||
ldt_info.limit = content->limit;
|
||||
ldt_info.seg_32bit = content->seg_32bit != 0;
|
||||
ldt_info.contents = content->type;
|
||||
ldt_info.read_exec_only = content->read_only != 0;
|
||||
ldt_info.limit_in_pages = content->limit_in_pages != 0;
|
||||
ldt_info.seg_not_present = 0;
|
||||
/* Make sure the info will be accepted by the kernel */
|
||||
/* This is ugly, but what can I do? */
|
||||
if (content->type == SEGMENT_STACK)
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
DEFS = -D__WINE__
|
||||
TOPSRC = @top_srcdir@
|
||||
MODULE = misc
|
||||
DEFS = -D__WINE__
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = misc
|
||||
|
||||
C_SRCS = \
|
||||
clipboard.c \
|
||||
|
|
|
@ -299,7 +299,7 @@ HWND GetClipboardOwner()
|
|||
/**************************************************************************
|
||||
* SetClipboardData [USER.141]
|
||||
*/
|
||||
HANDLE SetClipboardData(WORD wFormat, HANDLE hData)
|
||||
HANDLE16 SetClipboardData(WORD wFormat, HANDLE16 hData)
|
||||
{
|
||||
LPCLIPFORMAT lpFormat = ClipFormats;
|
||||
Window owner;
|
||||
|
@ -403,7 +403,7 @@ BOOL32 CLIPBOARD_RenderText(LPCLIPFORMAT lpTarget, LPCLIPFORMAT lpSource)
|
|||
/**************************************************************************
|
||||
* GetClipboardData [USER.142]
|
||||
*/
|
||||
HANDLE GetClipboardData(WORD wFormat)
|
||||
HANDLE16 GetClipboardData(WORD wFormat)
|
||||
{
|
||||
LPCLIPFORMAT lpRender = ClipFormats;
|
||||
LPCLIPFORMAT lpUpdate = NULL;
|
||||
|
|
|
@ -22,12 +22,12 @@
|
|||
|
||||
static DWORD CommDlgLastError = 0;
|
||||
|
||||
static HBITMAP hFolder = 0;
|
||||
static HBITMAP hFolder2 = 0;
|
||||
static HBITMAP hFloppy = 0;
|
||||
static HBITMAP hHDisk = 0;
|
||||
static HBITMAP hCDRom = 0;
|
||||
static HBITMAP hBitmapTT = 0;
|
||||
static HBITMAP16 hFolder = 0;
|
||||
static HBITMAP16 hFolder2 = 0;
|
||||
static HBITMAP16 hFloppy = 0;
|
||||
static HBITMAP16 hHDisk = 0;
|
||||
static HBITMAP16 hCDRom = 0;
|
||||
static HBITMAP16 hBitmapTT = 0;
|
||||
|
||||
/***********************************************************************
|
||||
* FileDlg_Init [internal]
|
||||
|
@ -58,8 +58,8 @@ static BOOL FileDlg_Init()
|
|||
*/
|
||||
BOOL GetOpenFileName( SEGPTR ofn )
|
||||
{
|
||||
HINSTANCE hInst;
|
||||
HANDLE hDlgTmpl, hResInfo;
|
||||
HINSTANCE16 hInst;
|
||||
HANDLE16 hDlgTmpl, hResInfo;
|
||||
BOOL bRet;
|
||||
LPOPENFILENAME lpofn = (LPOPENFILENAME)PTR_SEG_TO_LIN(ofn);
|
||||
|
||||
|
@ -105,8 +105,8 @@ BOOL GetOpenFileName( SEGPTR ofn )
|
|||
*/
|
||||
BOOL GetSaveFileName( SEGPTR ofn)
|
||||
{
|
||||
HINSTANCE hInst;
|
||||
HANDLE hDlgTmpl, hResInfo;
|
||||
HINSTANCE16 hInst;
|
||||
HANDLE16 hDlgTmpl, hResInfo;
|
||||
BOOL bRet;
|
||||
LPOPENFILENAME lpofn = (LPOPENFILENAME)PTR_SEG_TO_LIN(ofn);
|
||||
|
||||
|
@ -218,8 +218,8 @@ static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam,int saved
|
|||
{
|
||||
LPDRAWITEMSTRUCT16 lpdis = (LPDRAWITEMSTRUCT16)PTR_SEG_TO_LIN(lParam);
|
||||
char *str;
|
||||
HBRUSH hBrush;
|
||||
HBITMAP hBitmap, hPrevBitmap;
|
||||
HBRUSH16 hBrush;
|
||||
HBITMAP16 hBitmap, hPrevBitmap;
|
||||
BITMAP16 bm;
|
||||
HDC hMemDC;
|
||||
|
||||
|
@ -706,7 +706,7 @@ LRESULT FileSaveDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
|
|||
*/
|
||||
BOOL FindText( SEGPTR find )
|
||||
{
|
||||
HANDLE hInst, hDlgTmpl;
|
||||
HANDLE16 hInst, hDlgTmpl;
|
||||
BOOL bRet;
|
||||
LPCVOID ptr;
|
||||
LPFINDREPLACE lpFind = (LPFINDREPLACE)PTR_SEG_TO_LIN(find);
|
||||
|
@ -736,7 +736,7 @@ BOOL FindText( SEGPTR find )
|
|||
*/
|
||||
BOOL ReplaceText( SEGPTR find )
|
||||
{
|
||||
HANDLE hInst, hDlgTmpl;
|
||||
HANDLE16 hInst, hDlgTmpl;
|
||||
BOOL bRet;
|
||||
LPCVOID ptr;
|
||||
LPFINDREPLACE lpFind = (LPFINDREPLACE)PTR_SEG_TO_LIN(find);
|
||||
|
@ -989,7 +989,7 @@ LRESULT ReplaceTextDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
|
|||
*/
|
||||
BOOL PrintDlg( SEGPTR printdlg )
|
||||
{
|
||||
HANDLE hInst, hDlgTmpl;
|
||||
HANDLE16 hInst, hDlgTmpl;
|
||||
BOOL bRet;
|
||||
LPPRINTDLG lpPrint = (LPPRINTDLG)PTR_SEG_TO_LIN(printdlg);
|
||||
|
||||
|
@ -1118,8 +1118,8 @@ short GetFileTitle(LPCSTR lpFile, LPSTR lpTitle, UINT cbBuf)
|
|||
*/
|
||||
BOOL ChooseColor(LPCHOOSECOLOR lpChCol)
|
||||
{
|
||||
HINSTANCE hInst;
|
||||
HANDLE hDlgTmpl, hResInfo;
|
||||
HINSTANCE16 hInst;
|
||||
HANDLE16 hDlgTmpl, hResInfo;
|
||||
BOOL bRet;
|
||||
|
||||
dprintf_commdlg(stddeb,"ChooseColor\n");
|
||||
|
@ -1177,7 +1177,7 @@ struct CCPRIVATE
|
|||
LPCHOOSECOLOR lpcc; /* points to public known data structure */
|
||||
int nextuserdef; /* next free place in user defined color array */
|
||||
HDC hdcMem; /* color graph used for BitBlt() */
|
||||
HBITMAP hbmMem; /* color graph bitmap */
|
||||
HBITMAP16 hbmMem; /* color graph bitmap */
|
||||
RECT16 fullsize; /* original dialog window size */
|
||||
UINT msetrgb; /* # of SETRGBSTRING message (today not used) */
|
||||
RECT16 old3angle; /* last position of l-marker */
|
||||
|
@ -1476,7 +1476,7 @@ static void CC_PaintSelectedColor(HWND hDlg,COLORREF cr)
|
|||
{
|
||||
RECT16 rect;
|
||||
HDC32 hdc;
|
||||
HBRUSH hBrush;
|
||||
HBRUSH16 hBrush;
|
||||
HWND hwnd=GetDlgItem(hDlg,0x2c5);
|
||||
if (IsWindowVisible(GetDlgItem(hDlg,0x2c6))) /* if full size */
|
||||
{
|
||||
|
@ -1599,7 +1599,7 @@ static void CC_PrepareColorGraph(HWND hDlg)
|
|||
int sdif,hdif,xdif,ydif,r,g,b,hue,sat;
|
||||
HWND hwnd=GetDlgItem(hDlg,0x2c6);
|
||||
struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong32A(hDlg, DWL_USER);
|
||||
HBRUSH hbrush;
|
||||
HBRUSH16 hbrush;
|
||||
HDC32 hdc ;
|
||||
RECT16 rect,client;
|
||||
HCURSOR16 hcursor=SetCursor(LoadCursor16(0,IDC_WAIT));
|
||||
|
@ -1666,7 +1666,7 @@ static void CC_PaintLumBar(HWND hDlg,int hue,int sat)
|
|||
HWND hwnd=GetDlgItem(hDlg,0x2be);
|
||||
RECT16 rect,client;
|
||||
int lum,ldif,ydif,r,g,b;
|
||||
HBRUSH hbrush;
|
||||
HBRUSH16 hbrush;
|
||||
HDC32 hDC;
|
||||
|
||||
if (IsWindowVisible(hwnd))
|
||||
|
@ -1776,7 +1776,7 @@ static void CC_PaintPredefColorArray(HWND hDlg,int rows,int cols)
|
|||
HWND hwnd=GetDlgItem(hDlg,0x2d0);
|
||||
RECT16 rect;
|
||||
HDC32 hdc;
|
||||
HBRUSH hBrush;
|
||||
HBRUSH16 hBrush;
|
||||
int dx,dy,i,j,k;
|
||||
|
||||
GetClientRect16(hwnd,&rect);
|
||||
|
@ -1815,7 +1815,7 @@ static void CC_PaintUserColorArray(HWND hDlg,int rows,int cols,COLORREF* lpcr)
|
|||
HWND hwnd=GetDlgItem(hDlg,0x2d1);
|
||||
RECT16 rect;
|
||||
HDC32 hdc;
|
||||
HBRUSH hBrush;
|
||||
HBRUSH16 hBrush;
|
||||
int dx,dy,i,j,k;
|
||||
|
||||
GetClientRect16(hwnd,&rect);
|
||||
|
@ -2199,8 +2199,8 @@ LRESULT ColorDlgProc(HWND hDlg, UINT message,
|
|||
*/
|
||||
BOOL ChooseFont(LPCHOOSEFONT lpChFont)
|
||||
{
|
||||
HINSTANCE hInst;
|
||||
HANDLE hDlgTmpl, hResInfo;
|
||||
HINSTANCE16 hInst;
|
||||
HANDLE16 hDlgTmpl, hResInfo;
|
||||
BOOL bRet;
|
||||
|
||||
dprintf_commdlg(stddeb,"ChooseFont\n");
|
||||
|
@ -2313,7 +2313,7 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, LPLOGFONT16 lplf,
|
|||
static struct FONTSTYLE fontstyles[FSTYLES]={
|
||||
{ 0,FW_NORMAL,"Regular"},{0,FW_BOLD,"Bold"},
|
||||
{ 1,FW_NORMAL,"Italic"}, {1,FW_BOLD,"Bold Italic"}};
|
||||
HFONT hf;
|
||||
HFONT16 hf;
|
||||
int i,j;
|
||||
|
||||
for (i=0;i<FSTYLES;i++)
|
||||
|
@ -2550,7 +2550,7 @@ LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
|||
*/
|
||||
LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HBRUSH hBrush;
|
||||
HBRUSH16 hBrush;
|
||||
char *buffer;
|
||||
BITMAP16 bm;
|
||||
COLORREF cr;
|
||||
|
@ -2558,7 +2558,7 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
|||
#if 0
|
||||
HDC hMemDC;
|
||||
int nFontType;
|
||||
HBITMAP hBitmap; /* for later TT usage */
|
||||
HBITMAP16 hBitmap; /* for later TT usage */
|
||||
#endif
|
||||
LPDRAWITEMSTRUCT16 lpdi = (LPDRAWITEMSTRUCT16)PTR_SEG_TO_LIN(lParam);
|
||||
|
||||
|
@ -2658,7 +2658,7 @@ LRESULT CFn_WMCtlColor(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
|||
*/
|
||||
LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HFONT hFont/*,hFontOld*/;
|
||||
HFONT16 hFont;
|
||||
int i,j;
|
||||
long l;
|
||||
HDC hdc;
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
#include "module.h"
|
||||
#include "callback.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
UINT32 CRTDLL_argc_dll; /* CRTDLL.23 */
|
||||
|
@ -109,8 +108,7 @@ DWORD CRTDLL__initterm(_INITTERMFUN *start,_INITTERMFUN *end)
|
|||
dprintf_crtdll(stddeb,"_initterm(%p,%p)\n",start,end);
|
||||
current=start;
|
||||
while (current<end) {
|
||||
if (*current)
|
||||
_InitTermProc(*current);
|
||||
if (*current) (*current)();
|
||||
current++;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -98,7 +98,7 @@ BOOL WinHelp(HWND hWnd, LPSTR lpHelpFile, WORD wCommand, DWORD dwData)
|
|||
static WORD WM_WINHELP=0;
|
||||
HWND hDest;
|
||||
LPWINHELP lpwh;
|
||||
HANDLE hwh;
|
||||
HGLOBAL16 hwh;
|
||||
void *data=0;
|
||||
int size,dsize,nlen;
|
||||
if (wCommand != HELP_QUIT) /* FIXME */
|
||||
|
|
|
@ -270,7 +270,7 @@ int WNetRestoreConnection(HWND hwndOwner,LPSTR lpszDevice)
|
|||
/**************************************************************************
|
||||
* WNetWriteJob [USER.524]
|
||||
*/
|
||||
int WNetWriteJob(HANDLE hJob,void *lpData,LPWORD lpcbData)
|
||||
int WNetWriteJob(HANDLE16 hJob,void *lpData,LPWORD lpcbData)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetWriteJob(%04x,%p,%p)\n",
|
||||
hJob,lpData,lpcbData);
|
||||
|
@ -372,7 +372,7 @@ UINT WNetAddConnection2(LPSTR lpNetPath, LPSTR lpPassWord,
|
|||
/**************************************************************************
|
||||
* WNetCloseEnum [USER.???]
|
||||
*/
|
||||
UINT WNetCloseEnum(HANDLE hEnum)
|
||||
UINT WNetCloseEnum(HANDLE16 hEnum)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetCloseEnum(%04x);\n", hEnum);
|
||||
return WN_NET_ERROR;
|
||||
|
@ -381,7 +381,7 @@ UINT WNetCloseEnum(HANDLE hEnum)
|
|||
/**************************************************************************
|
||||
* WNetEnumResource [USER.???]
|
||||
*/
|
||||
UINT WNetEnumResource(HANDLE hEnum, DWORD cRequ,
|
||||
UINT WNetEnumResource(HANDLE16 hEnum, DWORD cRequ,
|
||||
DWORD *lpCount, LPVOID lpBuf)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetEnumResource(%04x, %08lX, %p, %p);\n",
|
||||
|
@ -393,7 +393,7 @@ UINT WNetEnumResource(HANDLE hEnum, DWORD cRequ,
|
|||
* WNetOpenEnum [USER.???]
|
||||
*/
|
||||
UINT WNetOpenEnum(DWORD dwScope, DWORD dwType,
|
||||
LPNETRESOURCE lpNet, HANDLE *lphEnum)
|
||||
LPNETRESOURCE lpNet, HANDLE16 *lphEnum)
|
||||
{
|
||||
printf("EMPTY STUB !!! WNetOpenEnum(%08lX, %08lX, %p, %p);\n",
|
||||
dwScope, dwType, lpNet, lphEnum);
|
||||
|
|
|
@ -18,7 +18,7 @@ LONG OLE_current_handle;
|
|||
* OleRegisterServer
|
||||
*/
|
||||
OLESTATUS OleRegisterServer( LPCSTR name, LPOLESERVER serverStruct,
|
||||
LHSERVER *hRet, HINSTANCE hServer,
|
||||
LHSERVER *hRet, HINSTANCE16 hServer,
|
||||
OLE_SERVER_USE use )
|
||||
{
|
||||
dprintf_ole(stdnimp,"OleRegisterServer:%s\n",name);
|
||||
|
|
58
misc/shell.c
58
misc/shell.c
|
@ -46,8 +46,8 @@ typedef struct
|
|||
|
||||
#pragma pack(4)
|
||||
|
||||
extern HANDLE CURSORICON_LoadHandler( HANDLE, HINSTANCE, BOOL);
|
||||
extern WORD GetIconID( HANDLE hResource, DWORD resType );
|
||||
extern HGLOBAL16 CURSORICON_LoadHandler( HGLOBAL16, HINSTANCE16, BOOL);
|
||||
extern WORD GetIconID( HGLOBAL16 hResource, DWORD resType );
|
||||
|
||||
/*************************************************************************
|
||||
* DragAcceptFiles [SHELL.9]
|
||||
|
@ -136,10 +136,10 @@ BOOL DragQueryPoint(HDROP16 hDrop, POINT16 *p)
|
|||
* SHELL_FindExecutable
|
||||
* Utility for code sharing between FindExecutable and ShellExecute
|
||||
*/
|
||||
static HINSTANCE SHELL_FindExecutable( LPCSTR lpFile,
|
||||
LPCSTR lpDirectory,
|
||||
LPCSTR lpOperation,
|
||||
LPSTR lpResult)
|
||||
static HINSTANCE16 SHELL_FindExecutable( LPCSTR lpFile,
|
||||
LPCSTR lpDirectory,
|
||||
LPCSTR lpOperation,
|
||||
LPSTR lpResult)
|
||||
{
|
||||
char *extension = NULL; /* pointer to file extension */
|
||||
char tmpext[5]; /* local copy to mung as we please */
|
||||
|
@ -148,7 +148,7 @@ static HINSTANCE SHELL_FindExecutable( LPCSTR lpFile,
|
|||
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' */
|
||||
HINSTANCE16 retval=31; /* default - 'No association was found' */
|
||||
char *tok; /* token pointer */
|
||||
int i; /* random counter */
|
||||
char xlpFile[256]; /* result of SearchPath */
|
||||
|
@ -286,11 +286,11 @@ static HINSTANCE SHELL_FindExecutable( LPCSTR lpFile,
|
|||
/*************************************************************************
|
||||
* ShellExecute [SHELL.20]
|
||||
*/
|
||||
HINSTANCE ShellExecute(HWND hWnd, LPCSTR lpOperation, LPCSTR lpFile,
|
||||
LPSTR lpParameters, LPCSTR lpDirectory,
|
||||
INT iShowCmd)
|
||||
HINSTANCE16 ShellExecute(HWND hWnd, LPCSTR lpOperation, LPCSTR lpFile,
|
||||
LPSTR lpParameters, LPCSTR lpDirectory,
|
||||
INT iShowCmd)
|
||||
{
|
||||
HINSTANCE retval=31;
|
||||
HINSTANCE16 retval=31;
|
||||
char cmd[256];
|
||||
|
||||
dprintf_exec(stddeb, "ShellExecute(%04x,'%s','%s','%s','%s',%x)\n",
|
||||
|
@ -322,9 +322,9 @@ HINSTANCE ShellExecute(HWND hWnd, LPCSTR lpOperation, LPCSTR lpFile,
|
|||
/*************************************************************************
|
||||
* FindExecutable [SHELL.21]
|
||||
*/
|
||||
HINSTANCE FindExecutable(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult)
|
||||
HINSTANCE16 FindExecutable(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult)
|
||||
{
|
||||
HINSTANCE retval=31; /* default - 'No association was found' */
|
||||
HINSTANCE16 retval=31; /* default - 'No association was found' */
|
||||
|
||||
dprintf_exec(stddeb, "FindExecutable: File %s, Dir %s\n",
|
||||
(lpFile != NULL?lpFile:"-"),
|
||||
|
@ -380,7 +380,7 @@ LRESULT AboutDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
*/
|
||||
INT ShellAbout(HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON16 hIcon)
|
||||
{
|
||||
HANDLE handle;
|
||||
HGLOBAL16 handle;
|
||||
BOOL bRet;
|
||||
|
||||
if (szApp) strncpy(AppName, szApp, sizeof(AppName));
|
||||
|
@ -448,10 +448,10 @@ static BYTE* SHELL_GetResourceTable(HFILE hFile)
|
|||
/*************************************************************************
|
||||
* SHELL_LoadResource
|
||||
*/
|
||||
static HANDLE SHELL_LoadResource(HINSTANCE hInst, HFILE hFile, NE_NAMEINFO* pNInfo, WORD sizeShift)
|
||||
static HGLOBAL16 SHELL_LoadResource(HINSTANCE16 hInst, HFILE hFile, NE_NAMEINFO* pNInfo, WORD sizeShift)
|
||||
{
|
||||
BYTE* ptr;
|
||||
HANDLE handle = DirectResAlloc( hInst, 0x10, (DWORD)pNInfo->length << sizeShift);
|
||||
HGLOBAL16 handle = DirectResAlloc( hInst, 0x10, (DWORD)pNInfo->length << sizeShift);
|
||||
|
||||
if( (ptr = (BYTE*)GlobalLock16( handle )) )
|
||||
{
|
||||
|
@ -459,16 +459,16 @@ static HANDLE SHELL_LoadResource(HINSTANCE hInst, HFILE hFile, NE_NAMEINFO* pNIn
|
|||
_lread32( hFile, (char*)ptr, pNInfo->length << sizeShift);
|
||||
return handle;
|
||||
}
|
||||
return (HANDLE)0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* ICO_LoadIcon
|
||||
*/
|
||||
static HANDLE ICO_LoadIcon(HINSTANCE hInst, HFILE hFile, LPicoICONDIRENTRY lpiIDE)
|
||||
static HGLOBAL16 ICO_LoadIcon(HINSTANCE16 hInst, HFILE hFile, LPicoICONDIRENTRY lpiIDE)
|
||||
{
|
||||
BYTE* ptr;
|
||||
HANDLE handle = DirectResAlloc( hInst, 0x10, lpiIDE->dwBytesInRes);
|
||||
HGLOBAL16 handle = DirectResAlloc( hInst, 0x10, lpiIDE->dwBytesInRes);
|
||||
|
||||
if( (ptr = (BYTE*)GlobalLock16( handle )) )
|
||||
{
|
||||
|
@ -476,7 +476,7 @@ static HANDLE ICO_LoadIcon(HINSTANCE hInst, HFILE hFile, LPicoICONDIRENTRY lpi
|
|||
_lread32( hFile, (char*)ptr, lpiIDE->dwBytesInRes);
|
||||
return handle;
|
||||
}
|
||||
return (HANDLE)0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -484,7 +484,7 @@ static HANDLE ICO_LoadIcon(HINSTANCE hInst, HFILE hFile, LPicoICONDIRENTRY lpi
|
|||
*
|
||||
* Read .ico file and build phony ICONDIR struct for GetIconID
|
||||
*/
|
||||
static HANDLE ICO_GetIconDirectory(HINSTANCE hInst, HFILE hFile, LPicoICONDIR* lplpiID )
|
||||
static HGLOBAL16 ICO_GetIconDirectory(HINSTANCE16 hInst, HFILE hFile, LPicoICONDIR* lplpiID )
|
||||
{
|
||||
WORD id[3]; /* idReserved, idType, idCount */
|
||||
LPicoICONDIR lpiID;
|
||||
|
@ -506,8 +506,8 @@ static HANDLE ICO_GetIconDirectory(HINSTANCE hInst, HFILE hFile, LPicoICONDIR* l
|
|||
|
||||
if( _lread32(hFile,(char*)lpiID->idEntries,i) == i )
|
||||
{
|
||||
HANDLE handle = DirectResAlloc( hInst, 0x10,
|
||||
id[2]*sizeof(ICONDIRENTRY) + sizeof(id) );
|
||||
HGLOBAL16 handle = DirectResAlloc( hInst, 0x10,
|
||||
id[2]*sizeof(ICONDIRENTRY) + sizeof(id) );
|
||||
if( handle )
|
||||
{
|
||||
CURSORICONDIR* lpID = (CURSORICONDIR*)GlobalLock16( handle );
|
||||
|
@ -535,10 +535,10 @@ static HANDLE ICO_GetIconDirectory(HINSTANCE hInst, HFILE hFile, LPicoICONDIR* l
|
|||
*
|
||||
* This abortion is called directly by Progman
|
||||
*/
|
||||
HICON16 InternalExtractIcon(HINSTANCE hInstance, LPCSTR lpszExeFileName, UINT nIconIndex, WORD n )
|
||||
HGLOBAL16 InternalExtractIcon(HINSTANCE16 hInstance, LPCSTR lpszExeFileName, UINT nIconIndex, WORD n )
|
||||
{
|
||||
HANDLE hRet = 0;
|
||||
HICON16* RetPtr = NULL;
|
||||
HGLOBAL16 hRet = 0;
|
||||
HGLOBAL16* RetPtr = NULL;
|
||||
BYTE* pData;
|
||||
OFSTRUCT ofs;
|
||||
HFILE hFile = OpenFile( lpszExeFileName, &ofs, OF_READ );
|
||||
|
@ -639,9 +639,9 @@ HICON16 InternalExtractIcon(HINSTANCE hInstance, LPCSTR lpszExeFileName, UINT nI
|
|||
/*************************************************************************
|
||||
* ExtractIcon [SHELL.34]
|
||||
*/
|
||||
HICON16 ExtractIcon(HINSTANCE hInstance, LPCSTR lpszExeFileName, WORD nIconIndex)
|
||||
HICON16 ExtractIcon(HINSTANCE16 hInstance, LPCSTR lpszExeFileName, WORD nIconIndex)
|
||||
{
|
||||
HANDLE handle = InternalExtractIcon(hInstance,lpszExeFileName,nIconIndex, 1);
|
||||
HGLOBAL16 handle = InternalExtractIcon(hInstance,lpszExeFileName,nIconIndex, 1);
|
||||
|
||||
if( handle )
|
||||
{
|
||||
|
@ -828,7 +828,7 @@ DWORD
|
|||
SHGetFileInfo32A(LPCSTR path,DWORD dwFileAttributes,SHFILEINFO32A *psfi,
|
||||
UINT32 sizeofpsfi,UINT32 flags
|
||||
) {
|
||||
fprintf(stdnimp,"SHGetFileInfo32A(%s,0x%08lx,%p,%ld,0x%08lx)\n",
|
||||
fprintf(stdnimp,"SHGetFileInfo32A(%s,0x%08lx,%p,%d,0x%08x)\n",
|
||||
path,dwFileAttributes,psfi,sizeofpsfi,flags
|
||||
);
|
||||
return TRUE;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
*/
|
||||
static struct notify
|
||||
{
|
||||
HTASK htask;
|
||||
HTASK16 htask;
|
||||
FARPROC16 lpfnCallback;
|
||||
WORD wFlags;
|
||||
} *notifys = NULL;
|
||||
|
@ -51,8 +51,7 @@ BOOL16 NotifyRegister( HTASK16 htask, FARPROC16 lpfnCallback, WORD wFlags )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL
|
||||
NotifyUnregister(HTASK htask)
|
||||
BOOL16 NotifyUnregister( HTASK16 htask )
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
WORD USER_HeapSel = 0;
|
||||
|
||||
|
||||
extern HTASK TASK_GetNextTask(HTASK);
|
||||
extern BOOL32 MENU_SwitchTPWndTo(HTASK);
|
||||
extern HTASK16 TASK_GetNextTask(HTASK16);
|
||||
extern BOOL32 MENU_SwitchTPWndTo(HTASK16);
|
||||
|
||||
/***********************************************************************
|
||||
* GetFreeSystemResources (USER.284)
|
||||
|
@ -94,9 +94,9 @@ BOOL16 TimerCount( TIMERINFO *pTimerInfo )
|
|||
|
||||
|
||||
/**********************************************************************
|
||||
* USER_InitApp
|
||||
* InitApp (USER.5)
|
||||
*/
|
||||
int USER_InitApp(HINSTANCE hInstance)
|
||||
INT16 InitApp( HINSTANCE16 hInstance )
|
||||
{
|
||||
int queueSize;
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ extern int h_errno;
|
|||
|
||||
struct ipc_packet {
|
||||
long mtype;
|
||||
HANDLE handle;
|
||||
HANDLE16 handle;
|
||||
HWND hWnd;
|
||||
WORD wMsg;
|
||||
LONG lParam;
|
||||
|
@ -114,7 +114,7 @@ struct WinSockHeap {
|
|||
char scratch[8192];
|
||||
};
|
||||
static struct WinSockHeap *Heap;
|
||||
static HANDLE HeapHandle;
|
||||
static HGLOBAL16 HeapHandle;
|
||||
#ifndef WINELIB32
|
||||
static int ScratchPtr;
|
||||
#endif
|
||||
|
@ -1156,9 +1156,9 @@ SEGPTR WINSOCK_getservbyport(INT port, const char *proto)
|
|||
/******************** winsock specific functions ************************
|
||||
*
|
||||
*/
|
||||
static HANDLE new_handle = 1;
|
||||
static HANDLE16 new_handle = 1;
|
||||
|
||||
static HANDLE AllocWSAHandle(void)
|
||||
static HANDLE16 AllocWSAHandle(void)
|
||||
{
|
||||
return new_handle++;
|
||||
}
|
||||
|
@ -1198,7 +1198,7 @@ static void recv_message(int sig)
|
|||
}
|
||||
|
||||
|
||||
static void send_message( HWND hWnd, u_int wMsg, HANDLE handle, long lParam)
|
||||
static void send_message( HWND hWnd, u_int wMsg, HANDLE16 handle, long lParam)
|
||||
{
|
||||
struct ipc_packet message;
|
||||
|
||||
|
@ -1216,10 +1216,10 @@ static void send_message( HWND hWnd, u_int wMsg, HANDLE handle, long lParam)
|
|||
}
|
||||
|
||||
|
||||
HANDLE WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, LPCSTR addr,
|
||||
HANDLE16 WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, LPCSTR addr,
|
||||
INT len, INT type, LPSTR buf, INT buflen)
|
||||
{
|
||||
HANDLE handle;
|
||||
HANDLE16 handle;
|
||||
struct hostent *host;
|
||||
int newpid;
|
||||
|
||||
|
@ -1251,10 +1251,10 @@ HANDLE WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, LPCSTR addr,
|
|||
}
|
||||
|
||||
|
||||
HANDLE WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, LPCSTR name,
|
||||
HANDLE16 WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, LPCSTR name,
|
||||
LPSTR buf, INT buflen)
|
||||
{
|
||||
HANDLE handle;
|
||||
HANDLE16 handle;
|
||||
struct hostent *host;
|
||||
int newpid;
|
||||
|
||||
|
@ -1286,10 +1286,10 @@ HANDLE WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, LPCSTR name,
|
|||
}
|
||||
|
||||
|
||||
HANDLE WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg, LPCSTR name,
|
||||
HANDLE16 WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg, LPCSTR name,
|
||||
LPSTR buf, INT buflen)
|
||||
{
|
||||
HANDLE handle;
|
||||
HANDLE16 handle;
|
||||
struct protoent *proto;
|
||||
int newpid;
|
||||
|
||||
|
@ -1321,10 +1321,10 @@ HANDLE WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg, LPCSTR name,
|
|||
}
|
||||
|
||||
|
||||
HANDLE WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg, INT number,
|
||||
HANDLE16 WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg, INT number,
|
||||
LPSTR buf, INT buflen)
|
||||
{
|
||||
HANDLE handle;
|
||||
HANDLE16 handle;
|
||||
struct protoent *proto;
|
||||
int newpid;
|
||||
|
||||
|
@ -1356,10 +1356,10 @@ HANDLE WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg, INT number,
|
|||
}
|
||||
|
||||
|
||||
HANDLE WSAAsyncGetServByName(HWND hWnd, u_int wMsg, LPCSTR name,
|
||||
HANDLE16 WSAAsyncGetServByName(HWND hWnd, u_int wMsg, LPCSTR name,
|
||||
LPCSTR proto, LPSTR buf, INT buflen)
|
||||
{
|
||||
HANDLE handle;
|
||||
HANDLE16 handle;
|
||||
struct servent *service;
|
||||
int newpid;
|
||||
|
||||
|
@ -1391,10 +1391,10 @@ HANDLE WSAAsyncGetServByName(HWND hWnd, u_int wMsg, LPCSTR name,
|
|||
}
|
||||
|
||||
|
||||
HANDLE WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, INT port, LPCSTR proto,
|
||||
HANDLE16 WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, INT port, LPCSTR proto,
|
||||
LPSTR buf, INT buflen)
|
||||
{
|
||||
HANDLE handle;
|
||||
HANDLE16 handle;
|
||||
struct servent *service;
|
||||
int newpid;
|
||||
|
||||
|
@ -1493,7 +1493,7 @@ INT WSAFDIsSet(SOCKET fd, WinSock_fd_set *set)
|
|||
return 0;
|
||||
}
|
||||
|
||||
INT WSACancelAsyncRequest(HANDLE hAsyncTaskHandle)
|
||||
INT WSACancelAsyncRequest(HANDLE16 hAsyncTaskHandle)
|
||||
{
|
||||
dprintf_winsock(stddeb, "WSA_AsyncRequest: handle %04x\n", hAsyncTaskHandle);
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRC = @top_srcdir@
|
||||
MODULE = miscemu
|
||||
DEFS = -D__WINE__ -DNO_TRANSITION_TYPES
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = miscemu
|
||||
|
||||
C_SRCS = \
|
||||
cpu.c \
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
DEFS = -D__WINE__
|
||||
TOPSRC = @top_srcdir@
|
||||
MODULE = multimedia
|
||||
DEFS = -D__WINE__
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = multimedia
|
||||
|
||||
C_SRCS = \
|
||||
audio.c \
|
||||
|
|
|
@ -71,7 +71,7 @@ typedef struct {
|
|||
int nUseCount; /* Incremented for each shared open */
|
||||
BOOL fShareable; /* TRUE if first open was shareable */
|
||||
WORD wNotifyDeviceID; /* MCI device ID with a pending notification */
|
||||
HANDLE hCallback; /* Callback handle for pending notification */
|
||||
HANDLE16 hCallback; /* Callback handle for pending notification */
|
||||
HMMIO16 hFile; /* mmio file handle open as Element */
|
||||
MCI_WAVE_OPEN_PARMS openParms;
|
||||
PCMWAVEFORMAT WaveFormat;
|
||||
|
@ -104,9 +104,9 @@ static DWORD WAVE_NotifyClient(UINT wDevID, WORD wMsg,
|
|||
* WAVE_mciOpen */
|
||||
static DWORD WAVE_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_WAVE_OPEN_PARMS lpParms)
|
||||
{
|
||||
HANDLE hFormat;
|
||||
HLOCAL16 hFormat;
|
||||
LPPCMWAVEFORMAT lpWaveFormat;
|
||||
HANDLE hDesc;
|
||||
HLOCAL16 hDesc;
|
||||
LPWAVEOPENDESC lpDesc;
|
||||
LPSTR lpstrElementName;
|
||||
DWORD dwRet;
|
||||
|
@ -246,8 +246,8 @@ static DWORD WAVE_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
{
|
||||
int start, end;
|
||||
LONG bufsize, count;
|
||||
HANDLE hData;
|
||||
HANDLE hWaveHdr;
|
||||
HGLOBAL16 hData;
|
||||
HLOCAL16 hWaveHdr;
|
||||
LPWAVEHDR lpWaveHdr;
|
||||
LPWAVEHDR lp16WaveHdr;
|
||||
DWORD dwRet;
|
||||
|
@ -331,8 +331,8 @@ static DWORD WAVE_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpPar
|
|||
{
|
||||
int start, end;
|
||||
LONG bufsize;
|
||||
HANDLE hData;
|
||||
HANDLE hWaveHdr;
|
||||
HGLOBAL16 hData;
|
||||
HLOCAL16 hWaveHdr;
|
||||
LPWAVEHDR lpWaveHdr;
|
||||
LPWAVEHDR lp16WaveHdr;
|
||||
DWORD dwRet;
|
||||
|
|
|
@ -34,7 +34,7 @@ typedef struct {
|
|||
int nUseCount; /* Incremented for each shared open */
|
||||
BOOL fShareable; /* TRUE if first open was shareable */
|
||||
WORD wNotifyDeviceID; /* MCI device ID with a pending notification */
|
||||
HANDLE hCallback; /* Callback handle for pending notification */
|
||||
HANDLE16 hCallback; /* Callback handle for pending notification */
|
||||
MCI_OPEN_PARMS openParms;
|
||||
DWORD dwTimeFormat;
|
||||
int mode;
|
||||
|
|
|
@ -56,7 +56,7 @@ typedef struct {
|
|||
int nUseCount; /* Incremented for each shared open */
|
||||
BOOL fShareable; /* TRUE if first open was shareable */
|
||||
WORD wNotifyDeviceID; /* MCI device ID with a pending notification */
|
||||
HANDLE hCallback; /* Callback handle for pending notification */
|
||||
HANDLE16 hCallback; /* Callback handle for pending notification */
|
||||
MCI_OPEN_PARMS openParms;
|
||||
DWORD dwTimeFormat;
|
||||
int unixdev;
|
||||
|
|
|
@ -67,7 +67,7 @@ typedef struct {
|
|||
int nUseCount; /* Incremented for each shared open */
|
||||
BOOL fShareable; /* TRUE if first open was shareable */
|
||||
WORD wNotifyDeviceID; /* MCI device ID with a pending notification */
|
||||
HANDLE hCallback; /* Callback handle for pending notification */
|
||||
HANDLE16 hCallback; /* Callback handle for pending notification */
|
||||
HMMIO16 hFile; /* mmio file handle open as Element */
|
||||
DWORD dwBeginData;
|
||||
DWORD dwTotalLen;
|
||||
|
|
|
@ -52,7 +52,7 @@ LONG ANIM_DriverProc(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg,
|
|||
/**************************************************************************
|
||||
* MMSYSTEM_WEP [MMSYSTEM.1]
|
||||
*/
|
||||
int MMSYSTEM_WEP(HANDLE hInstance, WORD wDataSeg,
|
||||
int MMSYSTEM_WEP(HINSTANCE16 hInstance, WORD wDataSeg,
|
||||
WORD cbHeapSize, LPSTR lpCmdLine)
|
||||
{
|
||||
/* isn't WEP the Windows Exit Procedure ? */
|
||||
|
@ -68,16 +68,16 @@ BOOL sndPlaySound(LPCSTR lpszSoundName, UINT uFlags)
|
|||
HMMIO16 hmmio;
|
||||
MMCKINFO mmckInfo;
|
||||
MMCKINFO ckMainRIFF;
|
||||
HANDLE hFormat;
|
||||
HLOCAL16 hFormat;
|
||||
PCMWAVEFORMAT pcmWaveFormat;
|
||||
int count;
|
||||
int bufsize;
|
||||
HANDLE hDesc;
|
||||
HLOCAL16 hDesc;
|
||||
LPWAVEOPENDESC lpWaveDesc;
|
||||
HANDLE hWaveHdr;
|
||||
HLOCAL16 hWaveHdr;
|
||||
LPWAVEHDR lpWaveHdr;
|
||||
LPWAVEHDR lp16WaveHdr;
|
||||
HANDLE hData;
|
||||
HLOCAL16 hData;
|
||||
DWORD dwRet;
|
||||
char str[128];
|
||||
LPSTR ptr;
|
||||
|
@ -201,7 +201,7 @@ LRESULT DriverProc(DWORD dwDevID, HDRVR16 hDriv, WORD wMsg,
|
|||
/**************************************************************************
|
||||
* DriverCallback [MMSYSTEM.31]
|
||||
*/
|
||||
BOOL DriverCallback(DWORD dwCallBack, UINT uFlags, HANDLE hDev,
|
||||
BOOL DriverCallback(DWORD dwCallBack, UINT uFlags, HANDLE16 hDev,
|
||||
WORD wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
dprintf_mmsys(stddeb, "DriverCallback(%08lX, %04X, %04X, %04X, %08lX, %08lX, %08lX); !\n",
|
||||
|
@ -552,7 +552,7 @@ BOOL mciDriverNotify(HWND hWndCallBack, UINT wDevID, UINT wStatus)
|
|||
*/
|
||||
|
||||
#define _MCI_STRDUP_TO_SEG(dest,source) {\
|
||||
HANDLE x;\
|
||||
HLOCAL16 x;\
|
||||
x=USER_HEAP_ALLOC(strlen(source)+1);\
|
||||
dest=(LPSTR)MAKELONG(x,USER_HeapSel);\
|
||||
strcpy(PTR_SEG_TO_LIN(dest),source);\
|
||||
|
@ -865,7 +865,7 @@ YIELDPROC mciGetYieldProc(UINT uDeviceID, DWORD * lpdwYieldData)
|
|||
/**************************************************************************
|
||||
* mciGetCreatorTask [MMSYSTEM.717]
|
||||
*/
|
||||
HTASK mciGetCreatorTask(UINT uDeviceID)
|
||||
HTASK16 mciGetCreatorTask(UINT uDeviceID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -2219,7 +2219,7 @@ LRESULT DrvSendMessage(HDRVR16 hDriver, WORD msg, LPARAM lParam1, LPARAM lParam2
|
|||
/**************************************************************************
|
||||
* DrvGetModuleHandle [MMSYSTEM.1103]
|
||||
*/
|
||||
HANDLE DrvGetModuleHandle(HDRVR16 hDrvr)
|
||||
HANDLE16 DrvGetModuleHandle(HDRVR16 hDrvr)
|
||||
{
|
||||
dprintf_mmsys(stddeb, "DrvGetModuleHandle(%04X);\n", hDrvr);
|
||||
return 0;
|
||||
|
|
|
@ -28,7 +28,7 @@ typedef struct tagTIMERENTRY {
|
|||
WORD wDelay;
|
||||
WORD wResol;
|
||||
FARPROC16 lpFunc;
|
||||
HINSTANCE hInstance;
|
||||
HINSTANCE16 hInstance;
|
||||
DWORD dwUser;
|
||||
WORD wFlags;
|
||||
WORD wTimerID;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
DEFS = -D__WINE__
|
||||
TOPSRC = @top_srcdir@
|
||||
MODULE = objects
|
||||
DEFS = -D__WINE__
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = objects
|
||||
|
||||
C_SRCS = \
|
||||
bitblt.c \
|
||||
|
|
|
@ -124,7 +124,7 @@ HBITMAP16 CreateBitmap( INT32 width, INT32 height, UINT32 planes,
|
|||
*/
|
||||
HBITMAP16 CreateCompatibleBitmap( HDC32 hdc, INT32 width, INT32 height )
|
||||
{
|
||||
HBITMAP hbmpRet = 0;
|
||||
HBITMAP16 hbmpRet = 0;
|
||||
DC *dc;
|
||||
|
||||
dprintf_gdi( stddeb, "CreateCompatibleBitmap(%04x,%d,%d) = \n",
|
||||
|
@ -421,8 +421,8 @@ INT32 BITMAP_GetObject32( BITMAPOBJ * bmp, INT32 count, LPVOID buffer )
|
|||
HBITMAP16 BITMAP_SelectObject( DC * dc, HBITMAP16 hbitmap,
|
||||
BITMAPOBJ * bmp )
|
||||
{
|
||||
HRGN hrgn;
|
||||
HBITMAP prevHandle = dc->w.hBitmap;
|
||||
HRGN32 hrgn;
|
||||
HBITMAP16 prevHandle = dc->w.hBitmap;
|
||||
|
||||
if (!(dc->w.flags & DC_MEMORY)) return 0;
|
||||
|
||||
|
|
|
@ -141,10 +141,10 @@ Pixmap BRUSH_DitherColor( DC *dc, COLORREF color )
|
|||
/***********************************************************************
|
||||
* CreateBrushIndirect (GDI.50)
|
||||
*/
|
||||
HBRUSH CreateBrushIndirect( const LOGBRUSH16 * brush )
|
||||
HBRUSH16 CreateBrushIndirect( const LOGBRUSH16 * brush )
|
||||
{
|
||||
BRUSHOBJ * brushPtr;
|
||||
HBRUSH hbrush = GDI_AllocObject( sizeof(BRUSHOBJ), BRUSH_MAGIC );
|
||||
HBRUSH16 hbrush = GDI_AllocObject( sizeof(BRUSHOBJ), BRUSH_MAGIC );
|
||||
if (!hbrush) return 0;
|
||||
brushPtr = (BRUSHOBJ *) GDI_HEAP_LIN_ADDR( hbrush );
|
||||
memcpy( &brushPtr->logbrush, brush, sizeof(*brush) );
|
||||
|
@ -155,7 +155,7 @@ HBRUSH CreateBrushIndirect( const LOGBRUSH16 * brush )
|
|||
/***********************************************************************
|
||||
* CreateHatchBrush (GDI.58)
|
||||
*/
|
||||
HBRUSH CreateHatchBrush( INT style, COLORREF color )
|
||||
HBRUSH16 CreateHatchBrush( INT style, COLORREF color )
|
||||
{
|
||||
LOGBRUSH16 logbrush = { BS_HATCHED, color, style };
|
||||
dprintf_gdi(stddeb, "CreateHatchBrush: %d %06lx\n", style, color );
|
||||
|
@ -167,7 +167,7 @@ HBRUSH CreateHatchBrush( INT style, COLORREF color )
|
|||
/***********************************************************************
|
||||
* CreatePatternBrush (GDI.60)
|
||||
*/
|
||||
HBRUSH CreatePatternBrush( HBITMAP hbitmap )
|
||||
HBRUSH16 CreatePatternBrush( HBITMAP16 hbitmap )
|
||||
{
|
||||
LOGBRUSH16 logbrush = { BS_PATTERN, 0, 0 };
|
||||
BITMAPOBJ *bmp, *newbmp;
|
||||
|
@ -179,7 +179,7 @@ HBRUSH CreatePatternBrush( HBITMAP hbitmap )
|
|||
if (!(bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC )))
|
||||
return 0;
|
||||
logbrush.lbHatch = (INT16)CreateBitmapIndirect16( &bmp->bitmap );
|
||||
newbmp = (BITMAPOBJ *) GDI_GetObjPtr( (HANDLE)logbrush.lbHatch, BITMAP_MAGIC );
|
||||
newbmp = (BITMAPOBJ *) GDI_GetObjPtr( (HGDIOBJ16)logbrush.lbHatch, BITMAP_MAGIC );
|
||||
if (!newbmp) return 0;
|
||||
XCopyArea( display, bmp->pixmap, newbmp->pixmap, BITMAP_GC(bmp),
|
||||
0, 0, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight, 0, 0 );
|
||||
|
@ -190,7 +190,7 @@ HBRUSH CreatePatternBrush( HBITMAP hbitmap )
|
|||
/***********************************************************************
|
||||
* CreateDIBPatternBrush (GDI.445)
|
||||
*/
|
||||
HBRUSH CreateDIBPatternBrush( HGLOBAL16 hbitmap, UINT coloruse )
|
||||
HBRUSH16 CreateDIBPatternBrush( HGLOBAL16 hbitmap, UINT coloruse )
|
||||
{
|
||||
LOGBRUSH16 logbrush = { BS_DIBPATTERN, coloruse, 0 };
|
||||
BITMAPINFO *info, *newInfo;
|
||||
|
@ -214,9 +214,9 @@ HBRUSH CreateDIBPatternBrush( HGLOBAL16 hbitmap, UINT coloruse )
|
|||
GlobalUnlock16( hbitmap );
|
||||
return 0;
|
||||
}
|
||||
newInfo = (BITMAPINFO *) GlobalLock16( (HANDLE)logbrush.lbHatch );
|
||||
newInfo = (BITMAPINFO *) GlobalLock16( (HGLOBAL16)logbrush.lbHatch );
|
||||
memcpy( newInfo, info, size );
|
||||
GlobalUnlock16( (HANDLE)logbrush.lbHatch );
|
||||
GlobalUnlock16( (HGLOBAL16)logbrush.lbHatch );
|
||||
GlobalUnlock16( hbitmap );
|
||||
return CreateBrushIndirect( &logbrush );
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ HBRUSH CreateDIBPatternBrush( HGLOBAL16 hbitmap, UINT coloruse )
|
|||
/***********************************************************************
|
||||
* CreateSolidBrush (GDI.66)
|
||||
*/
|
||||
HBRUSH CreateSolidBrush( COLORREF color )
|
||||
HBRUSH16 CreateSolidBrush( COLORREF color )
|
||||
{
|
||||
LOGBRUSH16 logbrush = { BS_SOLID, color, 0 };
|
||||
dprintf_gdi(stddeb, "CreateSolidBrush: %06lx\n", color );
|
||||
|
@ -270,7 +270,7 @@ BOOL32 SetBrushOrgEx( HDC32 hdc, INT32 x, INT32 y, LPPOINT32 oldorg )
|
|||
/***********************************************************************
|
||||
* GetSysColorBrush (USER.281)
|
||||
*/
|
||||
HBRUSH GetSysColorBrush(WORD x)
|
||||
HBRUSH16 GetSysColorBrush(WORD x)
|
||||
{
|
||||
fprintf( stderr, "Unimplemented stub: GetSysColorBrush(%d)\n", x );
|
||||
return GetStockObject(LTGRAY_BRUSH);
|
||||
|
@ -280,15 +280,15 @@ HBRUSH GetSysColorBrush(WORD x)
|
|||
/***********************************************************************
|
||||
* BRUSH_DeleteObject
|
||||
*/
|
||||
BOOL BRUSH_DeleteObject( HBRUSH hbrush, BRUSHOBJ * brush )
|
||||
BOOL32 BRUSH_DeleteObject( HBRUSH16 hbrush, BRUSHOBJ * brush )
|
||||
{
|
||||
switch(brush->logbrush.lbStyle)
|
||||
{
|
||||
case BS_PATTERN:
|
||||
DeleteObject( (HANDLE)brush->logbrush.lbHatch );
|
||||
DeleteObject( (HGDIOBJ16)brush->logbrush.lbHatch );
|
||||
break;
|
||||
case BS_DIBPATTERN:
|
||||
GlobalFree16( (HANDLE)brush->logbrush.lbHatch );
|
||||
GlobalFree16( (HGLOBAL16)brush->logbrush.lbHatch );
|
||||
break;
|
||||
}
|
||||
return GDI_FreeObject( hbrush );
|
||||
|
@ -330,7 +330,7 @@ static void BRUSH_SelectSolidBrush( DC *dc, COLORREF color )
|
|||
/***********************************************************************
|
||||
* BRUSH_SelectPatternBrush
|
||||
*/
|
||||
static BOOL BRUSH_SelectPatternBrush( DC * dc, HBITMAP hbitmap )
|
||||
static BOOL BRUSH_SelectPatternBrush( DC * dc, HBITMAP16 hbitmap )
|
||||
{
|
||||
BITMAPOBJ * bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
|
||||
if (!bmp) return FALSE;
|
||||
|
@ -357,11 +357,11 @@ static BOOL BRUSH_SelectPatternBrush( DC * dc, HBITMAP hbitmap )
|
|||
/***********************************************************************
|
||||
* BRUSH_SelectObject
|
||||
*/
|
||||
HBRUSH BRUSH_SelectObject( DC * dc, HBRUSH hbrush, BRUSHOBJ * brush )
|
||||
HBRUSH16 BRUSH_SelectObject( DC * dc, HBRUSH16 hbrush, BRUSHOBJ * brush )
|
||||
{
|
||||
HBITMAP hBitmap;
|
||||
HBITMAP16 hBitmap;
|
||||
BITMAPINFO * bmpInfo;
|
||||
HBRUSH prevHandle = dc->w.hBrush;
|
||||
HBRUSH16 prevHandle = dc->w.hBrush;
|
||||
|
||||
dprintf_gdi(stddeb, "Brush_SelectObject: hdc=%04x hbrush=%04x\n",
|
||||
dc->hSelf,hbrush);
|
||||
|
@ -373,16 +373,16 @@ HBRUSH BRUSH_SelectObject( DC * dc, HBRUSH hbrush, BRUSHOBJ * brush )
|
|||
case BS_HATCHED:
|
||||
case BS_HOLLOW:
|
||||
if (!MF_CreateBrushIndirect(dc, hbrush, &(brush->logbrush)))
|
||||
return (HBRUSH)0;
|
||||
return (HBRUSH16)0;
|
||||
break;
|
||||
|
||||
case BS_PATTERN:
|
||||
case BS_DIBPATTERN:
|
||||
if (!MF_CreatePatternBrush(dc, hbrush, &(brush->logbrush)))
|
||||
return (HBRUSH)0;
|
||||
return (HBRUSH16)0;
|
||||
break;
|
||||
}
|
||||
return (HBRUSH)1;
|
||||
return (HBRUSH16)1;
|
||||
}
|
||||
|
||||
dc->w.hBrush = hbrush;
|
||||
|
@ -415,12 +415,12 @@ HBRUSH BRUSH_SelectObject( DC * dc, HBRUSH hbrush, BRUSHOBJ * brush )
|
|||
|
||||
case BS_PATTERN:
|
||||
dprintf_gdi( stddeb, "BS_PATTERN\n");
|
||||
BRUSH_SelectPatternBrush( dc, (HBRUSH)brush->logbrush.lbHatch );
|
||||
BRUSH_SelectPatternBrush( dc, (HBRUSH16)brush->logbrush.lbHatch );
|
||||
break;
|
||||
|
||||
case BS_DIBPATTERN:
|
||||
dprintf_gdi( stddeb, "BS_DIBPATTERN\n");
|
||||
if ((bmpInfo = (BITMAPINFO *) GlobalLock16( (HANDLE)brush->logbrush.lbHatch )))
|
||||
if ((bmpInfo = (BITMAPINFO *) GlobalLock16( (HGLOBAL16)brush->logbrush.lbHatch )))
|
||||
{
|
||||
int size = DIB_BitmapInfoSize( bmpInfo, brush->logbrush.lbColor );
|
||||
hBitmap = CreateDIBitmap( dc->hSelf, &bmpInfo->bmiHeader, CBM_INIT,
|
||||
|
@ -428,7 +428,7 @@ HBRUSH BRUSH_SelectObject( DC * dc, HBRUSH hbrush, BRUSHOBJ * brush )
|
|||
(WORD) brush->logbrush.lbColor );
|
||||
BRUSH_SelectPatternBrush( dc, hBitmap );
|
||||
DeleteObject( hBitmap );
|
||||
GlobalUnlock16( (HANDLE)brush->logbrush.lbHatch );
|
||||
GlobalUnlock16( (HGLOBAL16)brush->logbrush.lbHatch );
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -12,7 +12,11 @@
|
|||
/* #define DEBUG_CLIPPING */
|
||||
#include "debug.h"
|
||||
|
||||
#define UpdateDirtyDC(dc) DC_CallHookProc( dc, DCHC_INVALIDVISRGN, 0 )
|
||||
#define UPDATE_DIRTY_DC(dc) \
|
||||
do { \
|
||||
if ((dc)->hookProc && !((dc)->w.flags & (DC_SAVED | DC_MEMORY))) \
|
||||
(dc)->hookProc( (dc)->hSelf, DCHC_INVALIDVISRGN, (dc)->dwHookData, 0 ); \
|
||||
} while(0)
|
||||
|
||||
/***********************************************************************
|
||||
* CLIPPING_SetDeviceClipping
|
||||
|
@ -56,7 +60,7 @@ void CLIPPING_UpdateGCRegion( DC * dc )
|
|||
|
||||
if (dc->w.flags & DC_DIRTY)
|
||||
{
|
||||
UpdateDirtyDC(dc);
|
||||
UPDATE_DIRTY_DC(dc);
|
||||
dc->w.flags &= ~DC_DIRTY;
|
||||
}
|
||||
|
||||
|
@ -71,7 +75,7 @@ void CLIPPING_UpdateGCRegion( DC * dc )
|
|||
/***********************************************************************
|
||||
* SelectClipRgn (GDI.44)
|
||||
*/
|
||||
int SelectClipRgn( HDC hdc, HRGN hrgn )
|
||||
int SelectClipRgn( HDC hdc, HRGN32 hrgn )
|
||||
{
|
||||
int retval;
|
||||
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
||||
|
@ -99,7 +103,7 @@ int SelectClipRgn( HDC hdc, HRGN hrgn )
|
|||
/***********************************************************************
|
||||
* SelectVisRgn (GDI.105)
|
||||
*/
|
||||
int SelectVisRgn( HDC hdc, HRGN hrgn )
|
||||
int SelectVisRgn( HDC hdc, HRGN32 hrgn )
|
||||
{
|
||||
int retval;
|
||||
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
||||
|
@ -166,7 +170,7 @@ int OffsetVisRgn( HDC hdc, short x, short y )
|
|||
int CLIPPING_IntersectClipRect( DC * dc, short left, short top,
|
||||
short right, short bottom, UINT16 flags)
|
||||
{
|
||||
HRGN newRgn;
|
||||
HRGN32 newRgn;
|
||||
int ret;
|
||||
|
||||
if ( !(newRgn = CreateRectRgn( left, top, right, bottom )) ) return ERROR;
|
||||
|
@ -253,7 +257,7 @@ int IntersectClipRect( HDC hdc, short left, short top,
|
|||
static int CLIPPING_IntersectVisRect( DC * dc, short left, short top,
|
||||
short right, short bottom, BOOL exclude )
|
||||
{
|
||||
HRGN tempRgn, newRgn;
|
||||
HRGN32 tempRgn, newRgn;
|
||||
int ret;
|
||||
|
||||
left = XLPTODP( dc, left );
|
||||
|
@ -325,7 +329,7 @@ BOOL PtVisible( HDC hdc, short x, short y )
|
|||
dprintf_clipping(stddeb, "PtVisible: %04x %d,%d\n", hdc, x, y );
|
||||
if (!dc->w.hGCClipRgn) return FALSE;
|
||||
|
||||
if( dc->w.flags & DC_DIRTY ) UpdateDirtyDC(dc);
|
||||
if( dc->w.flags & DC_DIRTY ) UPDATE_DIRTY_DC(dc);
|
||||
dc->w.flags &= ~DC_DIRTY;
|
||||
|
||||
return PtInRegion( dc->w.hGCClipRgn, XLPTODP(dc,x), YLPTODP(dc,y) );
|
||||
|
@ -392,9 +396,9 @@ INT32 GetClipBox32( HDC32 hdc, LPRECT32 rect )
|
|||
/***********************************************************************
|
||||
* SaveVisRgn (GDI.129)
|
||||
*/
|
||||
HRGN SaveVisRgn( HDC hdc )
|
||||
HRGN32 SaveVisRgn( HDC hdc )
|
||||
{
|
||||
HRGN copy;
|
||||
HRGN32 copy;
|
||||
RGNOBJ *obj, *copyObj;
|
||||
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
||||
if (!dc) return 0;
|
||||
|
@ -404,7 +408,7 @@ HRGN SaveVisRgn( HDC hdc )
|
|||
fprintf( stderr, "SaveVisRgn: hVisRgn is zero. Please report this.\n" );
|
||||
exit(1);
|
||||
}
|
||||
if( dc->w.flags & DC_DIRTY ) UpdateDirtyDC(dc);
|
||||
if( dc->w.flags & DC_DIRTY ) UPDATE_DIRTY_DC(dc);
|
||||
dc->w.flags &= ~DC_DIRTY;
|
||||
|
||||
if (!(obj = (RGNOBJ *) GDI_GetObjPtr( dc->w.hVisRgn, REGION_MAGIC )))
|
||||
|
@ -424,7 +428,7 @@ HRGN SaveVisRgn( HDC hdc )
|
|||
*/
|
||||
int RestoreVisRgn( HDC hdc )
|
||||
{
|
||||
HRGN saved;
|
||||
HRGN32 saved;
|
||||
RGNOBJ *obj, *savedObj;
|
||||
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
||||
if (!dc || !dc->w.hVisRgn) return ERROR;
|
||||
|
|
|
@ -232,10 +232,10 @@ static BOOL CURSORICON_LoadDirEntry(HINSTANCE32 hInstance, SEGPTR name,
|
|||
*
|
||||
* Create a cursor or icon from a resource.
|
||||
*/
|
||||
HANDLE CURSORICON_LoadHandler( HANDLE handle, HINSTANCE hInstance,
|
||||
BOOL fCursor )
|
||||
HGLOBAL16 CURSORICON_LoadHandler( HGLOBAL16 handle, HINSTANCE16 hInstance,
|
||||
BOOL fCursor )
|
||||
{
|
||||
HANDLE hAndBits, hXorBits;
|
||||
HBITMAP16 hAndBits, hXorBits;
|
||||
HDC32 hdc;
|
||||
int size, sizeAnd, sizeXor;
|
||||
POINT16 hotspot = { 0 ,0 };
|
||||
|
@ -367,10 +367,11 @@ HANDLE CURSORICON_LoadHandler( HANDLE handle, HINSTANCE hInstance,
|
|||
*
|
||||
* Load a cursor or icon.
|
||||
*/
|
||||
static HANDLE CURSORICON_Load( HANDLE hInstance, SEGPTR name, int width,
|
||||
int height, int colors, BOOL fCursor )
|
||||
static HGLOBAL16 CURSORICON_Load( HINSTANCE16 hInstance, SEGPTR name,
|
||||
int width, int height, int colors,
|
||||
BOOL fCursor )
|
||||
{
|
||||
HANDLE handle,hRet;
|
||||
HGLOBAL16 handle, hRet;
|
||||
HRSRC16 hRsrc;
|
||||
CURSORICONDIRENTRY dirEntry;
|
||||
|
||||
|
@ -408,11 +409,11 @@ static HANDLE CURSORICON_Load( HANDLE hInstance, SEGPTR name, int width,
|
|||
*
|
||||
* Make a copy of a cursor or icon.
|
||||
*/
|
||||
static HANDLE CURSORICON_Copy( HANDLE hInstance, HANDLE handle )
|
||||
static HGLOBAL16 CURSORICON_Copy( HINSTANCE16 hInstance, HGLOBAL16 handle )
|
||||
{
|
||||
char *ptrOld, *ptrNew;
|
||||
int size;
|
||||
HANDLE hNew;
|
||||
HGLOBAL16 hNew;
|
||||
|
||||
if (!(ptrOld = (char *)GlobalLock16( handle ))) return 0;
|
||||
if (!(hInstance = GetExePtr( hInstance ))) return 0;
|
||||
|
@ -446,9 +447,7 @@ HCURSOR16 CURSORICON_IconToCursor(HICON16 hIcon)
|
|||
else
|
||||
{
|
||||
/* kludge */
|
||||
|
||||
HTASK hTask = GetCurrentTask();
|
||||
TDB* pTask = (TDB *)GlobalLock16(hTask);
|
||||
TDB* pTask = (TDB *)GlobalLock16( GetCurrentTask() );
|
||||
|
||||
if(!pTask) return 0;
|
||||
|
||||
|
@ -499,7 +498,7 @@ HICON16 LoadIcon16(HINSTANCE16 hInstance,SEGPTR name)
|
|||
/***********************************************************************
|
||||
* CreateCursor (USER.406)
|
||||
*/
|
||||
HCURSOR16 CreateCursor( HINSTANCE hInstance, INT xHotSpot, INT yHotSpot,
|
||||
HCURSOR16 CreateCursor( HINSTANCE16 hInstance, INT xHotSpot, INT yHotSpot,
|
||||
INT nWidth, INT nHeight,
|
||||
const BYTE *lpANDbits, const BYTE *lpXORbits )
|
||||
{
|
||||
|
@ -514,7 +513,7 @@ HCURSOR16 CreateCursor( HINSTANCE hInstance, INT xHotSpot, INT yHotSpot,
|
|||
/***********************************************************************
|
||||
* CreateIcon (USER.407)
|
||||
*/
|
||||
HICON16 CreateIcon( HINSTANCE hInstance, INT nWidth, INT nHeight, BYTE bPlanes,
|
||||
HICON16 CreateIcon( HINSTANCE16 hInstance, INT nWidth, INT nHeight, BYTE bPlanes,
|
||||
BYTE bBitsPixel, const BYTE* lpANDbits, const BYTE* lpXORbits)
|
||||
{
|
||||
CURSORICONINFO info = { { 0, 0 }, nWidth, nHeight, 0, bPlanes, bBitsPixel };
|
||||
|
@ -528,10 +527,12 @@ HICON16 CreateIcon( HINSTANCE hInstance, INT nWidth, INT nHeight, BYTE bPlanes,
|
|||
/***********************************************************************
|
||||
* CreateCursorIconIndirect (USER.408)
|
||||
*/
|
||||
HANDLE CreateCursorIconIndirect( HANDLE hInstance, CURSORICONINFO *info,
|
||||
const BYTE *lpANDbits, const BYTE *lpXORbits )
|
||||
HGLOBAL16 CreateCursorIconIndirect( HINSTANCE16 hInstance,
|
||||
CURSORICONINFO *info,
|
||||
const BYTE *lpANDbits,
|
||||
const BYTE *lpXORbits )
|
||||
{
|
||||
HANDLE handle;
|
||||
HGLOBAL16 handle;
|
||||
char *ptr;
|
||||
int sizeAnd, sizeXor;
|
||||
|
||||
|
@ -611,7 +612,7 @@ BOOL DrawIcon( HDC hdc, INT x, INT y, HICON16 hIcon )
|
|||
{
|
||||
CURSORICONINFO *ptr;
|
||||
HDC hMemDC;
|
||||
HBITMAP hXorBits, hAndBits;
|
||||
HBITMAP16 hXorBits, hAndBits;
|
||||
COLORREF oldFg, oldBg;
|
||||
|
||||
if (!(ptr = (CURSORICONINFO *)GlobalLock16( hIcon ))) return FALSE;
|
||||
|
@ -625,7 +626,7 @@ BOOL DrawIcon( HDC hdc, INT x, INT y, HICON16 hIcon )
|
|||
|
||||
if (hXorBits && hAndBits)
|
||||
{
|
||||
HBITMAP hBitTemp = SelectObject( hMemDC, hAndBits );
|
||||
HBITMAP16 hBitTemp = SelectObject( hMemDC, hAndBits );
|
||||
BitBlt( hdc, x, y, ptr->nWidth, ptr->nHeight, hMemDC, 0, 0, SRCAND );
|
||||
SelectObject( hMemDC, hXorBits );
|
||||
BitBlt( hdc, x, y, ptr->nWidth, ptr->nHeight, hMemDC, 0, 0, SRCINVERT);
|
||||
|
@ -934,7 +935,7 @@ void GetClipCursor32( RECT32 *rect )
|
|||
/**********************************************************************
|
||||
* GetIconID (USER.455)
|
||||
*/
|
||||
WORD GetIconID( HANDLE hResource, DWORD resType )
|
||||
WORD GetIconID( HGLOBAL16 hResource, DWORD resType )
|
||||
{
|
||||
CURSORICONDIR *lpDir = (CURSORICONDIR *)GlobalLock16(hResource);
|
||||
/* LockResource16(hResource); */
|
||||
|
@ -973,7 +974,7 @@ WORD GetIconID( HANDLE hResource, DWORD resType )
|
|||
/**********************************************************************
|
||||
* LoadIconHandler (USER.456)
|
||||
*/
|
||||
HICON16 LoadIconHandler( HANDLE hResource, BOOL bNew )
|
||||
HICON16 LoadIconHandler( HGLOBAL16 hResource, BOOL bNew )
|
||||
{
|
||||
dprintf_cursor(stddeb,"LoadIconHandler: hRes=%04x\n",hResource);
|
||||
|
||||
|
|
136
objects/dc.c
136
objects/dc.c
|
@ -14,20 +14,15 @@
|
|||
#include "color.h"
|
||||
#include "debug.h"
|
||||
#include "font.h"
|
||||
#include "callback.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
extern void CLIPPING_UpdateGCRegion( DC * dc ); /* objects/clipping.c */
|
||||
extern BOOL DCHook( HDC, WORD, DWORD, DWORD ); /* windows/dce.c */
|
||||
|
||||
/* Default DC values */
|
||||
static const WIN_DC_INFO DC_defaultValues =
|
||||
{
|
||||
0, /* flags */
|
||||
NULL, /* devCaps */
|
||||
0, /* hMetaFile */
|
||||
0, /* hHT */
|
||||
0, /* HTLen */
|
||||
0, /* hClipRgn */
|
||||
0, /* hVisRgn */
|
||||
0, /* hGCClipRgn */
|
||||
|
@ -145,6 +140,41 @@ void DC_FillDevCaps( DeviceCaps * caps )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DC_AllocDC
|
||||
*/
|
||||
DC *DC_AllocDC( const DC_FUNCTIONS *funcs )
|
||||
{
|
||||
HDC16 hdc;
|
||||
DC *dc;
|
||||
|
||||
if (!(hdc = GDI_AllocObject( sizeof(DC), DC_MAGIC ))) return NULL;
|
||||
dc = (DC *) GDI_HEAP_LIN_ADDR( hdc );
|
||||
|
||||
dc->hSelf = hdc;
|
||||
dc->funcs = funcs;
|
||||
dc->physDev = NULL;
|
||||
dc->saveLevel = 0;
|
||||
dc->dwHookData = 0L;
|
||||
dc->hookProc = NULL;
|
||||
|
||||
memcpy( &dc->w, &DC_defaultValues, sizeof(DC_defaultValues) );
|
||||
return dc;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DC_GetDCPtr
|
||||
*/
|
||||
DC *DC_GetDCPtr( HDC32 hdc )
|
||||
{
|
||||
GDIOBJHDR *ptr = (GDIOBJHDR *)GDI_HEAP_LIN_ADDR( hdc );
|
||||
if ((ptr->wMagic == DC_MAGIC) || (ptr->wMagic == METAFILE_DC_MAGIC))
|
||||
return (DC *)ptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DC_InitDC
|
||||
*
|
||||
|
@ -169,7 +199,7 @@ void DC_InitDC( DC* dc )
|
|||
* If fMapColors is TRUE, X pixels are mapped to Windows colors.
|
||||
* Return FALSE if brush is BS_NULL, TRUE otherwise.
|
||||
*/
|
||||
BOOL DC_SetupGCForPatBlt( DC * dc, GC gc, BOOL fMapColors )
|
||||
BOOL32 DC_SetupGCForPatBlt( DC * dc, GC gc, BOOL32 fMapColors )
|
||||
{
|
||||
XGCValues val;
|
||||
unsigned long mask;
|
||||
|
@ -251,7 +281,7 @@ BOOL DC_SetupGCForPatBlt( DC * dc, GC gc, BOOL fMapColors )
|
|||
* Setup dc->u.x.gc for drawing operations using current brush.
|
||||
* Return FALSE if brush is BS_NULL, TRUE otherwise.
|
||||
*/
|
||||
BOOL DC_SetupGCForBrush( DC * dc )
|
||||
BOOL32 DC_SetupGCForBrush( DC * dc )
|
||||
{
|
||||
return DC_SetupGCForPatBlt( dc, dc->u.x.gc, FALSE );
|
||||
}
|
||||
|
@ -263,7 +293,7 @@ BOOL DC_SetupGCForBrush( DC * dc )
|
|||
* Setup dc->u.x.gc for drawing operations using current pen.
|
||||
* Return FALSE if pen is PS_NULL, TRUE otherwise.
|
||||
*/
|
||||
BOOL DC_SetupGCForPen( DC * dc )
|
||||
BOOL32 DC_SetupGCForPen( DC * dc )
|
||||
{
|
||||
XGCValues val;
|
||||
|
||||
|
@ -309,7 +339,7 @@ BOOL DC_SetupGCForPen( DC * dc )
|
|||
* Setup dc->u.x.gc for text drawing operations.
|
||||
* Return FALSE if the font is null, TRUE otherwise.
|
||||
*/
|
||||
BOOL DC_SetupGCForText( DC * dc )
|
||||
BOOL32 DC_SetupGCForText( DC * dc )
|
||||
{
|
||||
XGCValues val;
|
||||
|
||||
|
@ -333,33 +363,13 @@ BOOL DC_SetupGCForText( DC * dc )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DC_CallHookProc
|
||||
*/
|
||||
BOOL DC_CallHookProc(DC* dc, WORD code, LPARAM lParam)
|
||||
{
|
||||
BOOL bRet = FALSE;
|
||||
FARPROC16 ptr = GDI_GetDefDCHook();
|
||||
|
||||
dprintf_dc(stddeb,"CallDCHook: code %04x\n", code);
|
||||
|
||||
/* if 16-bit callback is, in fact, a thunk to DCHook simply call DCHook */
|
||||
|
||||
if( dc->hookProc && !(dc->w.flags & (DC_SAVED | DC_MEMORY)) )
|
||||
bRet = (dc->hookProc == ptr) ?
|
||||
DCHook(dc->hSelf, code, dc->dwHookData, lParam):
|
||||
CallDCHookProc(dc->hookProc, dc->hSelf, code, dc->dwHookData, lParam);
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetDCState (GDI.179)
|
||||
*/
|
||||
HDC GetDCState( HDC hdc )
|
||||
{
|
||||
DC * newdc, * dc;
|
||||
HANDLE handle;
|
||||
HGDIOBJ16 handle;
|
||||
|
||||
if (!(dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ))) return 0;
|
||||
if (!(handle = GDI_AllocObject( sizeof(DC), DC_MAGIC ))) return 0;
|
||||
|
@ -393,9 +403,9 @@ HDC GetDCState( HDC hdc )
|
|||
void SetDCState( HDC hdc, HDC hdcs )
|
||||
{
|
||||
DC * dc, * dcs;
|
||||
HRGN hVisRgn, hClipRgn, hGCClipRgn;
|
||||
HFONT hfont;
|
||||
HBRUSH hbrush;
|
||||
HRGN32 hVisRgn, hClipRgn, hGCClipRgn;
|
||||
HFONT16 hfont;
|
||||
HBRUSH16 hbrush;
|
||||
|
||||
if (!(dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ))) return;
|
||||
if (!(dcs = (DC *) GDI_GetObjPtr( hdcs, DC_MAGIC ))) return;
|
||||
|
@ -489,39 +499,25 @@ BOOL RestoreDC( HDC hdc, short level )
|
|||
HDC CreateDC( LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE* initData )
|
||||
{
|
||||
DC * dc;
|
||||
HDC16 handle;
|
||||
const DC_FUNCTIONS *funcs;
|
||||
|
||||
if (!(funcs = DRIVER_FindDriver( driver ))) return 0;
|
||||
|
||||
handle = GDI_AllocObject( sizeof(DC), DC_MAGIC );
|
||||
if (!handle) return 0;
|
||||
dc = (DC *) GDI_HEAP_LIN_ADDR( handle );
|
||||
if (!(dc = DC_AllocDC( funcs ))) return 0;
|
||||
dc->w.flags = 0;
|
||||
|
||||
dprintf_dc(stddeb, "CreateDC(%s %s %s): returning %04x\n",
|
||||
driver, device, output, handle );
|
||||
|
||||
dc->hSelf = handle;
|
||||
dc->funcs = funcs;
|
||||
dc->physDev = NULL;
|
||||
dc->saveLevel = 0;
|
||||
dc->dwHookData = 0L;
|
||||
dc->hookProc = (SEGPTR)0;
|
||||
|
||||
memcpy( &dc->w, &DC_defaultValues, sizeof(DC_defaultValues) );
|
||||
dc->w.flags = 0;
|
||||
driver, device, output, dc->hSelf );
|
||||
|
||||
if (dc->funcs->pCreateDC &&
|
||||
!dc->funcs->pCreateDC( dc, driver, device, output, initData ))
|
||||
{
|
||||
dprintf_dc( stddeb, "CreateDC: creation aborted by device\n" );
|
||||
GDI_HEAP_FREE( handle );
|
||||
GDI_HEAP_FREE( dc->hSelf );
|
||||
return 0;
|
||||
}
|
||||
|
||||
DC_InitDC( dc );
|
||||
|
||||
return handle;
|
||||
return dc->hSelf;
|
||||
}
|
||||
|
||||
|
||||
|
@ -541,35 +537,24 @@ HDC CreateIC( LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE* initDa
|
|||
HDC CreateCompatibleDC( HDC hdc )
|
||||
{
|
||||
DC *dc, *origDC;
|
||||
HDC16 handle;
|
||||
HBITMAP hbitmap;
|
||||
HBITMAP16 hbitmap;
|
||||
const DC_FUNCTIONS *funcs;
|
||||
|
||||
if ((origDC = (DC *)GDI_GetObjPtr( hdc, DC_MAGIC ))) funcs = origDC->funcs;
|
||||
else funcs = DRIVER_FindDriver( "DISPLAY" );
|
||||
if (!funcs) return 0;
|
||||
|
||||
handle = GDI_AllocObject( sizeof(DC), DC_MAGIC );
|
||||
if (!handle) return 0;
|
||||
dc = (DC *) GDI_HEAP_LIN_ADDR( handle );
|
||||
if (!(dc = DC_AllocDC( funcs ))) return 0;
|
||||
|
||||
dprintf_dc(stddeb, "CreateCompatibleDC(%04x): returning %04x\n", hdc, handle );
|
||||
dprintf_dc(stddeb, "CreateCompatibleDC(%04x): returning %04x\n",
|
||||
hdc, dc->hSelf );
|
||||
|
||||
/* Create default bitmap */
|
||||
if (!(hbitmap = CreateBitmap( 1, 1, 1, 1, NULL )))
|
||||
{
|
||||
GDI_HEAP_FREE( handle );
|
||||
GDI_HEAP_FREE( dc->hSelf );
|
||||
return 0;
|
||||
}
|
||||
|
||||
memcpy( &dc->w, &DC_defaultValues, sizeof(DC_defaultValues) );
|
||||
|
||||
dc->hSelf = handle;
|
||||
dc->funcs = funcs;
|
||||
dc->physDev = NULL;
|
||||
dc->saveLevel = 0;
|
||||
dc->dwHookData = 0L;
|
||||
dc->hookProc = (SEGPTR)0;
|
||||
dc->w.flags = DC_MEMORY;
|
||||
dc->w.bitsPerPixel = 1;
|
||||
dc->w.hBitmap = hbitmap;
|
||||
|
@ -580,13 +565,12 @@ HDC CreateCompatibleDC( HDC hdc )
|
|||
{
|
||||
dprintf_dc( stddeb, "CreateDC: creation aborted by device\n" );
|
||||
DeleteObject( hbitmap );
|
||||
GDI_HEAP_FREE( handle );
|
||||
GDI_HEAP_FREE( dc->hSelf );
|
||||
return 0;
|
||||
}
|
||||
|
||||
DC_InitDC( dc );
|
||||
|
||||
return handle;
|
||||
return dc->hSelf;
|
||||
}
|
||||
|
||||
|
||||
|
@ -751,12 +735,12 @@ DWORD SetDCOrg( HDC hdc, short x, short y )
|
|||
/***********************************************************************
|
||||
* SetDCHook (GDI.190)
|
||||
*/
|
||||
BOOL SetDCHook( HDC hDC, FARPROC16 hookProc, DWORD dwHookData )
|
||||
BOOL16 SetDCHook( HDC16 hdc, FARPROC16 hookProc, DWORD dwHookData )
|
||||
{
|
||||
DC *dc = (DC *)GDI_GetObjPtr( hDC, DC_MAGIC );
|
||||
DC *dc = (DC *)GDI_GetObjPtr( hdc, DC_MAGIC );
|
||||
|
||||
dprintf_dc( stddeb, "SetDCHook: hookProc %08x, default is %08x\n",
|
||||
(unsigned)hookProc,(unsigned)GDI_GetDefDCHook() );
|
||||
(UINT32)hookProc, (UINT32)DCHook );
|
||||
|
||||
if (!dc) return FALSE;
|
||||
dc->hookProc = hookProc;
|
||||
|
@ -768,9 +752,9 @@ BOOL SetDCHook( HDC hDC, FARPROC16 hookProc, DWORD dwHookData )
|
|||
/***********************************************************************
|
||||
* GetDCHook (GDI.191)
|
||||
*/
|
||||
DWORD GetDCHook( HDC hDC, FARPROC16 *phookProc )
|
||||
DWORD GetDCHook( HDC16 hdc, FARPROC16 *phookProc )
|
||||
{
|
||||
DC *dc = (DC *)GDI_GetObjPtr( hDC, DC_MAGIC );
|
||||
DC *dc = (DC *)GDI_GetObjPtr( hdc, DC_MAGIC );
|
||||
if (!dc) return 0;
|
||||
*phookProc = dc->hookProc;
|
||||
return dc->dwHookData;
|
||||
|
|
|
@ -84,11 +84,11 @@ DC_GET_X_Y( DWORD, GetViewportExt, VportExtX, VportExtY ) /* GDI.94 */
|
|||
DC_GET_X_Y( DWORD, GetViewportOrg, VportOrgX, VportOrgY ) /* GDI.95 */
|
||||
DC_GET_X_Y( DWORD, GetWindowExt, WndExtX, WndExtY ) /* GDI.96 */
|
||||
DC_GET_X_Y( DWORD, GetWindowOrg, WndOrgX, WndOrgY ) /* GDI.97 */
|
||||
DC_GET_VAL( HRGN, InquireVisRgn, hVisRgn ) /* GDI.131 */
|
||||
DC_GET_VAL( HRGN32, InquireVisRgn, hVisRgn ) /* GDI.131 */
|
||||
DC_GET_X_Y( DWORD, GetBrushOrg, brushOrgX, brushOrgY ) /* GDI.149 */
|
||||
DC_GET_VAL( HRGN, GetClipRgn, hClipRgn ) /* GDI.173 */
|
||||
DC_GET_VAL( HRGN32, GetClipRgn, hClipRgn ) /* GDI.173 */
|
||||
DC_GET_VAL( WORD, GetTextAlign, textAlign ) /* GDI.345 */
|
||||
DC_GET_VAL( HFONT, GetCurLogFont, hFont ) /* GDI.411 */
|
||||
DC_GET_VAL( HFONT16, GetCurLogFont, hFont ) /* GDI.411 */
|
||||
DC_GET_VAL_EX( GetBrushOrgEx, brushOrgX, brushOrgY ) /* GDI.469 */
|
||||
DC_GET_VAL_EX( GetCurrentPositionEx, CursPosX, CursPosY ) /* GDI.470 */
|
||||
DC_GET_VAL_EX( GetViewportExtEx, VportExtX, VportExtY ) /* GDI.472 */
|
||||
|
|
|
@ -626,7 +626,7 @@ int StretchDIBits( HDC hdc,
|
|||
WORD xSrc, WORD ySrc, WORD wSrcWidth, WORD wSrcHeight,
|
||||
LPSTR bits, LPBITMAPINFO info, WORD wUsage, DWORD dwRop )
|
||||
{
|
||||
HBITMAP hBitmap, hOldBitmap;
|
||||
HBITMAP16 hBitmap, hOldBitmap;
|
||||
HDC hdcMem;
|
||||
|
||||
hBitmap = CreateDIBitmap( hdc, &info->bmiHeader, CBM_INIT,
|
||||
|
@ -724,7 +724,7 @@ INT16 SetDIBitsToDevice( HDC32 hdc, INT32 xDest, INT32 yDest, DWORD cx,
|
|||
/***********************************************************************
|
||||
* GetDIBits (GDI.441)
|
||||
*/
|
||||
int GetDIBits( HDC hdc, HBITMAP hbitmap, WORD startscan, WORD lines,
|
||||
int GetDIBits( HDC hdc, HBITMAP16 hbitmap, WORD startscan, WORD lines,
|
||||
LPSTR bits, BITMAPINFO * info, WORD coloruse )
|
||||
{
|
||||
DC * dc;
|
||||
|
@ -792,10 +792,10 @@ int GetDIBits( HDC hdc, HBITMAP hbitmap, WORD startscan, WORD lines,
|
|||
/***********************************************************************
|
||||
* CreateDIBitmap (GDI.442)
|
||||
*/
|
||||
HBITMAP CreateDIBitmap( HDC hdc, BITMAPINFOHEADER * header, DWORD init,
|
||||
LPVOID bits, BITMAPINFO * data, UINT coloruse )
|
||||
HBITMAP16 CreateDIBitmap( HDC hdc, BITMAPINFOHEADER * header, DWORD init,
|
||||
LPVOID bits, BITMAPINFO * data, UINT coloruse )
|
||||
{
|
||||
HBITMAP handle;
|
||||
HBITMAP16 handle;
|
||||
BOOL fColor;
|
||||
DWORD width, height;
|
||||
WORD bpp;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue