Commit 530ee840 authored by Alexandre Julliard's avatar Alexandre Julliard

Release 961023

Tue Oct 22 20:09:52 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/Makefile.in] [tools/makedep.c] New program to generate dependencies; should be faster and more portable than 'gcc -MM'. * [*/*] Replaced WPARAM and HDC by explicitly-sized types. * [windows/hook.c] Fixed bug in HOOK_GetHook16 function. Thu Oct 17 09:13:50 1996 John Harvey <john@division.co.uk> * [include/debug.h] [include/stddebug.h] Added debug option for win16drv (-debugmsg +win16drv) * [graphics/win16drv/init.c] Only enable CreateDC if printer=on specified in wine section of wine.conf. printfs changed to dprintf_win16drv. Some tidying up. * [include/gdi.h] [graphics/x11drv/clipping.c] [graphics/x11drv/Makefile.in] Moved SetDeviceClipping into drivers.
parent bf9130af
This is release 961013 of Wine, the MS Windows emulator. This is still a
This is release 961023 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-961013: (see ChangeLog for details)
- Several non Win32-clean data types removed.
- Graphics driver for metafiles.
WHAT'S NEW with Wine-961023: (see ChangeLog for details)
- Printer driver fixes.
- Faster make depend.
- Lots of bug fixes.
See the README file in the distribution for installation instructions.
......@@ -16,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-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
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-961023.tar.gz
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-961023.tar.gz
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-961023.tar.gz
ftp://aris.com/pub/linux/ALPHA/Wine/development/Wine-961023.tar.gz
It should also be available from any site that mirrors tsx-11 or sunsite.
......
----------------------------------------------------------------------
Tue Oct 22 20:09:52 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [*/Makefile.in] [tools/makedep.c]
New program to generate dependencies; should be faster and more
portable than 'gcc -MM'.
* [*/*]
Replaced WPARAM and HDC by explicitly-sized types.
* [windows/hook.c]
Fixed bug in HOOK_GetHook16 function.
Thu Oct 17 09:13:50 1996 John Harvey <john@division.co.uk>
* [include/debug.h] [include/stddebug.h]
Added debug option for win16drv (-debugmsg +win16drv)
* [graphics/win16drv/init.c]
Only enable CreateDC if printer=on specified in wine section of
wine.conf.
printfs changed to dprintf_win16drv.
Some tidying up.
* [include/gdi.h] [graphics/x11drv/clipping.c]
[graphics/x11drv/Makefile.in]
Moved SetDeviceClipping into drivers.
----------------------------------------------------------------------
Sun Oct 13 15:32:32 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [Make.rules.in] [*/Makefile.in]
......
......@@ -26,17 +26,17 @@ LDLIBS = @LDLIBS@
YACC = @YACC@
LEX = @LEX@
LEXLIB = @LEXLIB@
DIVINCL = -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include -I.
DIVINCL = -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include -I$(SRCDIR) -I.
ALLCFLAGS = $(CFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL) $(X_CFLAGS)
LDCOMBINE = ld -r
RM = rm -f
BUILD = $(TOPOBJDIR)/tools/build
MAKEDEP = $(TOPOBJDIR)/tools/makedep
WINERC = $(TOPOBJDIR)/rc/winerc
SUBMAKE = $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'OPTIONS=$(OPTIONS)'
@SET_MAKE@
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
......@@ -68,6 +68,10 @@ DEPEND_SRCS = $(C_SRCS:%=$(SRCDIR)/%) $(GEN_C_SRCS:%=./%)
$(WINERC) check_winerc:
cd $(TOPOBJDIR)/rc; $(SUBMAKE) winerc
# Rule to rebuild the makedep program
$(MAKEDEP) check_makedep:
cd $(TOPOBJDIR)/tools; $(SUBMAKE) makedep
# Rule for main module
......@@ -77,13 +81,11 @@ $(MODULE).o: $(OBJS)
# Misc. rules
depend:: $(C_SRCS) $(GEN_C_SRCS)
sed '/\#\#\# Dependencies/q' < Makefile > tmp_make
$(CC) $(ALLCFLAGS) -MM $(DEPEND_SRCS) >> tmp_make
mv tmp_make Makefile
depend:: $(MAKEDEP) $(C_SRCS) $(GEN_C_SRCS)
$(MAKEDEP) $(DIVINCL) -C. $(GEN_C_SRCS) -C$(SRCDIR) $(C_SRCS)
clean::
$(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc tmp_make winerctmp.c $(GEN_C_SRCS)
$(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc winerctmp.c $(GEN_C_SRCS) $(GEN_C_SRCS:.c=.h) $(PROGRAMS)
dummy:
......
......@@ -129,19 +129,16 @@ $(ALLSUBDIRS): dummy
install_programs: dummy
@cd programs; $(SUBMAKE) install
depend: libdepend emudepend
libdepend: dummy
for i in $(COMMONSUBDIRS) $(LIBSUBDIRS); do (cd $$i; $(MAKE) depend); done
emudepend: dummy
for i in $(EMUSUBDIRS); do (cd $$i; $(MAKE) depend); done
depend: dummy
for i in $(COMMONSUBDIRS) $(LIBSUBDIRS) $(EMUSUBDIRS); do \
(cd $$i; $(MAKE) depend) || exit 1; \
done
etags:
etags `find . -name '*.[chS]' -print`
clean:
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean); done
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
$(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc
$(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS
(cd include; $(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc)
......
......@@ -114,10 +114,10 @@ LRESULT ButtonWndProc(HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
case WM_PAINT:
if (btnPaintFunc[style])
{
PAINTSTRUCT16 ps;
HDC hdc = BeginPaint16( hWnd, &ps );
PAINTSTRUCT32 ps;
HDC32 hdc = BeginPaint32( hWnd, &ps );
(btnPaintFunc[style])( wndPtr, hdc, ODA_DRAWENTIRE );
EndPaint16( hWnd, &ps );
EndPaint32( hWnd, &ps );
}
break;
......@@ -338,7 +338,7 @@ void PB_PaintGrayOnGray(HDC32 hDC,HFONT32 hFont,RECT32 *rc,char *text)
{
static int Pattern[] = {0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55};
HBITMAP16 hbm = CreateBitmap(8, 8, 1, 1, Pattern);
HDC hdcMem = CreateCompatibleDC(hDC);
HDC32 hdcMem = CreateCompatibleDC(hDC);
HBITMAP16 hbmMem;
HBRUSH16 hBr;
RECT32 rect,rc2;
......
......@@ -200,8 +200,8 @@ LPLISTSTRUCT ListBoxGetItem(LPHEADLIST lphl, UINT uIndex)
}
void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC hdc, LPLISTSTRUCT lpls,
RECT16 *rect, WORD itemAction, WORD itemState)
void ListBoxDrawItem(HWND hwnd, LPHEADLIST lphl, HDC16 hdc, LPLISTSTRUCT lpls,
RECT16 *rect, WORD itemAction, WORD itemState)
{
if (lphl->OwnerDrawn)
{
......@@ -286,7 +286,7 @@ BOOL32 lbDeleteItemNotify(LPHEADLIST lphl, LPLISTSTRUCT lpls)
delItem->hwndItem = lphl->hSelf;
delItem->itemData = lpls->mis.itemData;
ret = SendMessage16( lphl->hParent, WM_DELETEITEM, (WPARAM)lphl->CtlID,
ret = SendMessage16( lphl->hParent, WM_DELETEITEM, (WPARAM16)lphl->CtlID,
(LPARAM)SEGPTR_GET(delItem) );
SEGPTR_FREE(delItem);
return ret;
......@@ -397,7 +397,8 @@ int ListBoxAskCompare(LPHEADLIST lphl, int startItem, SEGPTR matchData, BOOL exa
itemCmp->itemID2 = -1;
itemCmp->itemData2 = matchData;
b = SendMessage16( lphl->hParent, WM_COMPAREITEM, (WPARAM)lphl->CtlID,
b = SendMessage16( lphl->hParent, WM_COMPAREITEM,
(WPARAM16)lphl->CtlID,
(LPARAM)SEGPTR_GET(itemCmp) );
}
......@@ -1400,7 +1401,7 @@ static LONG LBSetRedraw(HWND hwnd, WORD wParam, LONG lParam)
/***********************************************************************
* LBSetFont
*/
static LONG LBSetFont(HWND hwnd, WPARAM wParam, LPARAM lParam)
static LONG LBSetFont(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
HDC32 hdc;
......@@ -1455,7 +1456,7 @@ static LONG LBPaint(HWND hwnd, WORD wParam, LONG lParam)
hOldFont = SelectObject(hdc, lphl->hFont);
hBrush = (HBRUSH16)SendMessage32A( lphl->hParent, WM_CTLCOLORLISTBOX,
(WPARAM)hdc, (LPARAM)hwnd);
(WPARAM32)hdc, (LPARAM)hwnd);
if (hBrush == 0) hBrush = GetStockObject(WHITE_BRUSH);
FillRect16(hdc, &rect, hBrush);
......@@ -2076,7 +2077,7 @@ static LONG LBSetItemHeight(HWND hwnd, WORD wParam, LONG lParam)
/***********************************************************************
* LBPassToParent
*/
static LRESULT LBPassToParent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static LRESULT LBPassToParent(HWND hwnd, UINT message, WPARAM16 wParam, LPARAM lParam)
{
WND* ptrWnd = WIN_FindWndPtr(hwnd);
......@@ -2090,7 +2091,7 @@ static LRESULT LBPassToParent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
/***********************************************************************
* ListBoxWndProc
*/
LRESULT ListBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT ListBoxWndProc(HWND hwnd, UINT message, WPARAM16 wParam, LPARAM lParam)
{
switch (message) {
case WM_CREATE: return LBCreate(hwnd, wParam, lParam);
......
......@@ -87,7 +87,7 @@ static BOOL fEndMenuCalled = FALSE;
#define IS_STRING_ITEM(flags) (!((flags) & (MF_BITMAP | MF_OWNERDRAW | \
MF_MENUBARBREAK | MF_MENUBREAK | MF_SEPARATOR)))
extern void NC_DrawSysButton(HWND hwnd, HDC hdc, BOOL down); /* nonclient.c */
extern void NC_DrawSysButton(HWND hwnd, HDC32 hdc, BOOL down); /*nonclient.c*/
extern BOOL NC_GetSysPopupPos(WND* wndPtr, RECT16* rect);
extern HTASK16 TASK_GetNextTask(HTASK16);
......@@ -345,7 +345,7 @@ static UINT MENU_FindItemByKey( HWND hwndOwner, HMENU16 hmenu, UINT key )
*
* Calculate the size of the menu item and store it in lpitem->rect.
*/
static void MENU_CalcItemSize( HDC hdc, MENUITEM *lpitem, HWND hwndOwner,
static void MENU_CalcItemSize( HDC32 hdc, MENUITEM *lpitem, HWND hwndOwner,
int orgX, int orgY, BOOL menuBar )
{
DWORD dwSize;
......@@ -484,8 +484,8 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop, HWND hwndOwner )
*
* Calculate the size of the menu bar.
*/
static void MENU_MenuBarCalcSize( HDC hdc, LPRECT16 lprect, LPPOPUPMENU lppop,
HWND hwndOwner )
static void MENU_MenuBarCalcSize( HDC32 hdc, LPRECT16 lprect,
LPPOPUPMENU lppop, HWND hwndOwner )
{
MENUITEM *lpitem;
int start, i, orgX, orgY, maxY, helpPos;
......@@ -552,7 +552,7 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT16 lprect, LPPOPUPMENU lppop,
*
* Draw a single menu item.
*/
static void MENU_DrawMenuItem( HWND hwnd, HDC hdc, MENUITEM *lpitem,
static void MENU_DrawMenuItem( HWND hwnd, HDC32 hdc, MENUITEM *lpitem,
UINT height, BOOL menuBar )
{
RECT16 rect;
......@@ -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, HMENU16 hmenu )
static void MENU_DrawPopupMenu( HWND hwnd, HDC32 hdc, HMENU16 hmenu )
{
POPUPMENU *menu;
MENUITEM *item;
......@@ -725,7 +725,8 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU16 hmenu )
*
* Paint a menu bar. Returns the height of the menu bar.
*/
UINT MENU_DrawMenuBar(HDC hDC, LPRECT16 lprect, HWND hwnd, BOOL suppress_draw)
UINT MENU_DrawMenuBar( HDC32 hDC, LPRECT16 lprect, HWND hwnd,
BOOL suppress_draw)
{
LPPOPUPMENU lppop;
int i;
......@@ -803,7 +804,7 @@ static BOOL MENU_ShowPopup(HWND hwndOwner, HMENU16 hmenu, UINT id, int x, int y,
menu->items[menu->FocusedItem].item_flags &= ~(MF_HILITE|MF_MOUSESELECT);
menu->FocusedItem = NO_SELECTED_ITEM;
}
SendMessage16( hwndOwner, WM_INITMENUPOPUP, (WPARAM)hmenu,
SendMessage16( hwndOwner, WM_INITMENUPOPUP, (WPARAM16)hmenu,
MAKELONG( id, (menu->wFlags & MF_SYSMENU) ? 1 : 0 ));
MENU_PopupMenuCalcSize( menu, hwndOwner );
......@@ -862,7 +863,7 @@ static BOOL MENU_ShowPopup(HWND hwndOwner, HMENU16 hmenu, UINT id, int x, int y,
if( !skip_init )
{
MENU_SwitchTPWndTo(GetCurrentTask());
SendMessage16( pTopPWnd->hwndSelf, WM_USER, (WPARAM)hmenu, 0L);
SendMessage16( pTopPWnd->hwndSelf, WM_USER, (WPARAM16)hmenu, 0L);
}
menu->hWnd = pTopPWnd->hwndSelf;
}
......@@ -1470,7 +1471,7 @@ static LRESULT MENU_DoNextMenu( HWND* hwndOwner, HMENU16* hmenu,
|| menu->FocusedItem == SYSMENU_SELECTED
|| ((menu->wFlags & (MF_POPUP | MF_SYSMENU)) == (MF_POPUP | MF_SYSMENU)) )
{
LRESULT l = SendMessage16( *hwndOwner, WM_NEXTMENU, (WPARAM)vk,
LRESULT l = SendMessage16( *hwndOwner, WM_NEXTMENU, (WPARAM16)vk,
(LPARAM)((menu->FocusedItem == SYSMENU_SELECTED)
? GetSystemMenu( *hwndOwner, 0)
: *hmenu));
......@@ -1930,7 +1931,7 @@ BOOL32 TrackPopupMenu32( HMENU32 hMenu, UINT32 wFlags, INT32 x, INT32 y,
/***********************************************************************
* PopupMenuWndProc
*/
LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM16 wParam,LPARAM lParam)
{
switch(message)
{
......
......@@ -6,19 +6,19 @@
*/
#include <stdio.h>
#include <windows.h>
#include "windows.h"
#include "win.h"
#include "static.h"
static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc );
static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc );
static void STATIC_PaintIconfn( WND *wndPtr, HDC hdc );
static void STATIC_PaintTextfn( WND *wndPtr, HDC32 hdc );
static void STATIC_PaintRectfn( WND *wndPtr, HDC32 hdc );
static void STATIC_PaintIconfn( WND *wndPtr, HDC32 hdc );
static COLORREF color_windowframe, color_background, color_window;
typedef void (*pfPaint)( WND *, HDC);
typedef void (*pfPaint)( WND *, HDC32 );
#define LAST_STATIC_TYPE SS_LEFTNOWORDWRAP
......@@ -67,7 +67,7 @@ static HICON16 STATIC_SetIcon( WND *wndPtr, HICON16 hicon )
/***********************************************************************
* StaticWndProc
*/
LRESULT StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
LRESULT StaticWndProc(HWND hWnd, UINT uMsg, WPARAM16 wParam, LPARAM lParam)
{
LRESULT lResult = 0;
WND *wndPtr = WIN_FindWndPtr(hWnd);
......@@ -180,7 +180,7 @@ LRESULT StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc )
static void STATIC_PaintTextfn( WND *wndPtr, HDC32 hdc )
{
RECT16 rc;
HBRUSH16 hBrush;
......@@ -228,7 +228,7 @@ static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc )
if (wndPtr->text) DrawText16( hdc, wndPtr->text, -1, &rc, wFormat );
}
static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc )
static void STATIC_PaintRectfn( WND *wndPtr, HDC32 hdc )
{
RECT16 rc;
HBRUSH16 hBrush;
......@@ -268,7 +268,7 @@ static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc )
}
static void STATIC_PaintIconfn( WND *wndPtr, HDC hdc )
static void STATIC_PaintIconfn( WND *wndPtr, HDC32 hdc )
{
RECT16 rc;
HBRUSH16 hbrush;
......
......@@ -29,7 +29,4 @@ y.tab.c y.tab.h: dbg.y
lex.yy.c: debug.l
$(LEX) -8 -I $(SRCDIR)/debug.l
clean::
$(RM) y.tab.h
### Dependencies:
......@@ -12,29 +12,26 @@ hour.
To add a new language to the list of languages that Wine can handle
you must...
1. Edit resources/Makefile.in variable "LANGUAGES" to include a new
abbreviation for the language.
2. Edit ./wine.man (search for -language) to show the new language
1. Edit ./wine.man (search for -language) to show the new language
abbreviation.
3. Edit misc/main.c variable "Languages" to contain the new language
2. Edit misc/main.c variable "Languages" to contain the new language
abbreviation and language ID. Also edit macro "USAGE" to show the
new abbreviation.
4. Edit include/options.h enum "WINE_LANGUAGE" to have a member called
3. Edit include/options.h enum "WINE_LANGUAGE" to have a member called
LANG_XX where XX is the new abbreviation.
5. Edit misc/ole2nls.c function "GetUserDefaultLCID" to contain an
4. Edit misc/ole2nls.c function "GetUserDefaultLCID" to contain an
extra case for your language. The correct return values seem to
be a mystery, but don't worry.
6. Edit resources/sysrec.c to include "sysres_XX.h" where XX is the
5. Edit resources/sysrec.c to include "sysres_XX.h" where XX is the
abbreviation for your language. (That file will be produced auto-
matically.) Edit variable "SYSRES_Resources" to contain an entry
for your language.
7. Create a new file, resources/sysres_XX.rc, where XX is the
6. Create a new file, resources/sysres_XX.rc, where XX is the
abbreviation that you chose. Your best bet is to copy one of the
other *.rc files and start translating. [Warning: the author of
this file does not know the details of the structure of these
......@@ -46,6 +43,9 @@ you must...
copy the positions from (say) English. In particular, items within
one menu should have different highlighted letters.
7. Edit resources/Makefile.in to add the name of the new file to the
SYSRES_SRCS variable.
8. Edit misc/ole2nls.c function "GetLocaleInfoA" to contain a case for
your language.
......
......@@ -59,6 +59,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
NULL, /* pSelectPalette */
NULL, /* pSetBkColor */
NULL, /* pSetBkMode */
NULL, /* pSetDeviceClipping */
NULL, /* pSetDIBitsToDevice */
NULL, /* pSetMapMode */
NULL, /* pSetMapperFlags */
......
......@@ -6,6 +6,7 @@ VPATH = @srcdir@
MODULE = x11drv
C_SRCS = \
clipping.c \
font.c \
init.c
......
/*
* DC clipping functions
*
* Copyright 1993 Alexandre Julliard
*/
#include <stdio.h>
#include "dc.h"
#include "x11drv.h"
#include "region.h"
#include "stddebug.h"
#include "debug.h"
/***********************************************************************
* X11DRV_SetDeviceClipping
*/
void X11DRV_SetDeviceClipping( DC * dc )
{
RGNOBJ *obj = (RGNOBJ *) GDI_GetObjPtr(dc->w.hGCClipRgn, REGION_MAGIC);
if (!obj)
{
fprintf( stderr, "X11DRV_SetDeviceClipping: Rgn is 0. Please report this.\n");
exit(1);
}
if (obj->xrgn)
{
XSetRegion( display, dc->u.x.gc, obj->xrgn );
XSetClipOrigin( display, dc->u.x.gc, dc->w.DCOrgX, dc->w.DCOrgY );
}
else /* Clip everything */
{
XSetClipRectangles( display, dc->u.x.gc, 0, 0, NULL, 0, 0 );
}
}
......@@ -59,6 +59,7 @@ static const DC_FUNCTIONS X11DRV_Funcs =
NULL, /* pSelectPalette */
NULL, /* pSetBkColor */
NULL, /* pSetBkMode */
X11DRV_SetDeviceClipping, /* pSetDeviceClipping */
NULL, /* pSetDIBitsToDevice */
NULL, /* pSetMapMode */
NULL, /* pSetMapperFlags */
......
......@@ -328,7 +328,7 @@ BOOL16 THUNK_UnhookWindowsHookEx16( HHOOK hhook )
{
THUNK *thunk = (THUNK *)HOOK_GetProc16( hhook );
BOOL16 ret = UnhookWindowsHookEx16( hhook );
THUNK_Free( thunk );
if (thunk) THUNK_Free( thunk );
return ret;
}
......
......@@ -17,5 +17,5 @@ typedef struct {
BOOL bRedrawFlag;
} HEADCOMBO,*LPHEADCOMBO;
LRESULT ComboBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
LRESULT ComboLBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
LRESULT ComboBoxWndProc(HWND hwnd, UINT message, WPARAM16 wParam, LPARAM lParam);
LRESULT ComboLBoxWndProc(HWND hwnd, UINT message, WPARAM16 wParam, LPARAM lParam);
......@@ -133,7 +133,7 @@ typedef FINDREPLACE *LPFINDREPLACE;
typedef struct {
DWORD lStructSize;
HWND hwndOwner; /* caller's window handle */
HDC hDC; /* printer DC/IC or NULL */
HDC16 hDC; /* printer DC/IC or NULL */
SEGPTR lpLogFont; /* ptr. to a LOGFONT struct */
short iPointSize; /* 10 * size in points of selected font */
DWORD Flags WINE_PACKED; /* enum. type flags */
......@@ -208,7 +208,7 @@ typedef struct {
HWND hwndOwner;
HGLOBAL16 hDevMode;
HGLOBAL16 hDevNames;
HDC hDC;
HDC16 hDC;
DWORD Flags;
UINT nFromPage;
UINT nToPage;
......@@ -285,14 +285,14 @@ BOOL PrintDlg( SEGPTR print);
BOOL ReplaceText( SEGPTR find);
BOOL ChooseFont(LPCHOOSEFONT lpChFont);
LRESULT FileOpenDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
LRESULT FileSaveDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
LRESULT ColorDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
LRESULT FindTextDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
LRESULT ReplaceTextDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
LRESULT PrintDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
LRESULT PrintSetupDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
LRESULT FormatCharDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
LRESULT FileOpenDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
LRESULT FileSaveDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
LRESULT ColorDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
LRESULT FindTextDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
LRESULT ReplaceTextDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
LRESULT PrintDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
LRESULT PrintSetupDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
LRESULT FormatCharDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
#ifdef __cplusplus
}
......
......@@ -91,6 +91,7 @@
#undef DEBUG_VER
#undef DEBUG_VXD
#undef DEBUG_WIN
#undef DEBUG_WIN16DRV
#undef DEBUG_WIN32
#undef DEBUG_WINSOCK
#endif
......@@ -171,6 +172,7 @@
#define DEBUG_VER
#define DEBUG_VXD
#define DEBUG_WIN
#define DEBUG_WIN16DRV
#define DEBUG_WIN32
#define DEBUG_WINSOCK
#endif
......@@ -553,6 +555,11 @@ short debug_msg_enabled[]={
#else
0,
#endif
#ifdef DEBUG_WIN16DRV
1,
#else
0,
#endif
#ifdef DEBUG_WIN32
1,
#else
......@@ -1546,8 +1553,21 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_win32 if(!debug_msg_enabled[75]) ; else fprintf
#define debugging_win32 debug_msg_enabled[75]
#define dprintf_win16drv if(!debug_msg_enabled[75]) ; else fprintf
#define debugging_win16drv debug_msg_enabled[75]
#else
#ifdef DEBUG_WIN16DRV
#define dprintf_win16drv fprintf
#define debugging_win16drv 1
#else
#define dprintf_win16drv while(0) fprintf
#define debugging_win16drv 0
#endif
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_win32 if(!debug_msg_enabled[76]) ; else fprintf
#define debugging_win32 debug_msg_enabled[76]
#else
#ifdef DEBUG_WIN32
#define dprintf_win32 fprintf
......@@ -1559,8 +1579,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_winsock if(!debug_msg_enabled[76]) ; else fprintf
#define debugging_winsock debug_msg_enabled[76]
#define dprintf_winsock if(!debug_msg_enabled[77]) ; else fprintf
#define debugging_winsock debug_msg_enabled[77]
#else
#ifdef DEBUG_WINSOCK
#define dprintf_winsock fprintf
......@@ -1650,6 +1670,7 @@ static char *debug_msg_name[] = {
"ver",
"vxd",
"win",
"win16drv",
"win32",
"winsock",
""
......
......@@ -188,6 +188,7 @@ typedef struct tagDC_FUNCS
HPALETTE32 (*pSelectPalette)(DC*,HPALETTE32,BOOL32);
COLORREF (*pSetBkColor)(DC*,COLORREF);
WORD (*pSetBkMode)(DC*,WORD);
VOID (*pSetDeviceClipping)(DC*);
INT32 (*pSetDIBitsToDevice)(DC*,INT32,INT32,DWORD,DWORD,INT32,INT32,UINT32,UINT32,LPCVOID,const BITMAPINFO*,UINT32);
WORD (*pSetMapMode)(DC*,WORD);
DWORD (*pSetMapperFlags)(DC*,DWORD);
......
......@@ -64,10 +64,10 @@ extern int ListBoxGetItemRect(LPHEADLIST lphl, WORD wIndex, LPRECT16 rect);
extern int ListBoxSetItemHeight(LPHEADLIST lphl, WORD wIndex, long height);
extern int ListBoxFindNextMatch(LPHEADLIST lphl, WORD wChar);
extern void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC hdc,
extern void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC16 hdc,
LPLISTSTRUCT lpls, RECT16 *rect, WORD itemAction,
WORD itemState);
extern int ListBoxFindMouse(LPHEADLIST lphl, int X, int Y);
extern void ListBoxAskMeasure(LPHEADLIST lphl, LPLISTSTRUCT lpls);
extern LRESULT ListBoxWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
extern LRESULT ListBoxWndProc(HWND hwnd,UINT message,WPARAM16 wParam,LPARAM lParam);
......@@ -21,7 +21,7 @@
#define WM_MDICALCCHILDSCROLL 0x10AC /* this is exactly what Windows uses */
extern LRESULT MDIClientWndProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam); /* mdi.c */
WPARAM16 wParam, LPARAM lParam); /* mdi.c */
typedef struct tagMDIWCL
{
......
......@@ -12,8 +12,9 @@ extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
int orgX, int orgY );
extern void MENU_TrackMouseMenuBar( HWND hwnd, POINT16 pt );
extern void MENU_TrackKbdMenuBar( WND*, UINT wParam, INT vkey);
extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT16 lprect,
extern UINT MENU_DrawMenuBar( HDC32 hDC, LPRECT16 lprect,
HWND hwnd, BOOL suppress_draw );
extern LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam );
extern LRESULT PopupMenuWndProc( HWND hwnd, UINT message,
WPARAM16 wParam, LPARAM lParam );
#endif /* __WINE_MENU_H */
......@@ -1257,7 +1257,7 @@ typedef struct {
typedef struct {
DWORD dwCallback;
RECT16 rc;
HDC hDC;
HDC16 hDC;
} MCI_ANIM_UPDATE_PARMS, *LPMCI_ANIM_UPDATE_PARMS;
#define MCI_OVLY_OPEN_WS 0x00010000L
......
......@@ -2,7 +2,7 @@
#define __MSDOS_H
#include <dirent.h>
#include <windows.h>
#include "windows.h"
#include "comm.h"
struct fcb {
......
......@@ -13,12 +13,12 @@ extern void NC_GetMinMaxInfo( HWND hwnd, POINT16 *maxSize, POINT16 *maxPos,
POINT16 *minTrack, POINT16 *maxTrack );
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_HandleNCActivate( WND *pwnd, WPARAM16 wParam );
extern LONG NC_HandleNCCalcSize( WND *pWnd, RECT16 *winRect );
extern LONG NC_HandleNCHitTest( HWND hwnd, POINT16 pt );
extern LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam );
extern LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM wParam, LPARAM lParam);
extern LONG NC_HandleSysCommand( HWND hwnd, WPARAM wParam, POINT16 pt );
extern LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam );
extern LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM16 wParam, LPARAM lParam );
extern LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM16 wParam, LPARAM lParam);
extern LONG NC_HandleSysCommand( HWND hwnd, WPARAM16 wParam, POINT16 pt );
extern LONG NC_HandleSetCursor( HWND hwnd, WPARAM16 wParam, LPARAM lParam );
#endif /* __WINE_NONCLIENT_H */
......@@ -221,7 +221,7 @@ typedef struct _OLEOBJECTVTBL {
OLESTATUS (*CopyFromLink)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,OLE_LPCSTR,LPOLEOBJECT *);
OLESTATUS (*Equal)(LPOLEOBJECT,LPOLEOBJECT);
OLESTATUS (*CopyToClipBoard)(LPOLEOBJECT);
OLESTATUS (*Draw)(LPOLEOBJECT,HDC,LPRECT16,LPRECT16,HDC);
OLESTATUS (*Draw)(LPOLEOBJECT,HDC16,LPRECT16,LPRECT16,HDC16);
OLESTATUS (*Activate)(LPOLEOBJECT,UINT,BOOL,BOOL,HWND,LPRECT16);
OLESTATUS (*Execute)(LPOLEOBJECT,HGLOBAL16,UINT);
OLESTATUS (*Close)(LPOLEOBJECT);
......
......@@ -81,6 +81,6 @@ DWORD SHGetFileInfo32W(LPCWSTR,DWORD,SHFILEINFO32W*,UINT32,UINT32);
#define SE_ERR_DDEBUSY 30
#define SE_ERR_NOASSOC 31
LRESULT AboutDlgProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam);
LRESULT AboutDlgProc(HWND hWnd,UINT msg,WPARAM16 wParam,LPARAM lParam);
#endif /* __WINE_SHELL_H */
......@@ -17,6 +17,6 @@ typedef struct
HICON16 hIcon; /* Icon handle for SS_ICON controls */
} STATICINFO;
extern LRESULT StaticWndProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam );
extern LRESULT StaticWndProc(HWND hWnd,UINT uMsg,WPARAM16 wParam,LPARAM lParam );
#endif /* STATIC_H */
......@@ -151,6 +151,7 @@
#undef DEBUG_VER
#undef DEBUG_VXD
#undef DEBUG_WIN
#undef DEBUG_WIN16DRV
#undef DEBUG_WIN32
#undef DEBUG_WINSOCK
#endif
......@@ -231,6 +232,7 @@
#define DEBUG_VER
#define DEBUG_VXD
#define DEBUG_WIN
#define DEBUG_WIN16DRV
#define DEBUG_WIN32
#define DEBUG_WINSOCK
#endif
......@@ -52,5 +52,6 @@ struct tagDC;
extern BOOL32 X11DRV_GetTextExtentPoint( struct tagDC *dc, LPCSTR str,
INT32 count, LPSIZE32 size );
extern VOID X11DRV_SetDeviceClipping(struct tagDC *dc);
#endif /* __WINE_X11DRV_H */
......@@ -41,23 +41,23 @@ int CallTo32_LargeStack( int (*func)(), int nbargs, ...)
}
}
extern LRESULT AboutDlgProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT ColorDlgProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT ComboBoxWndProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT ComboLBoxWndProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT EditWndProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT FileOpenDlgProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT FileSaveDlgProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT FindTextDlgProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT ListBoxWndProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT MDIClientWndProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT PopupMenuWndProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT PrintDlgProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT PrintSetupDlgProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT ReplaceTextDlgProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT ScrollBarWndProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT StaticWndProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT SystemMessageBoxProc(HWND,UINT,WPARAM,LPARAM);
extern LRESULT AboutDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT ColorDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT ComboBoxWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT ComboLBoxWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT EditWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT FileOpenDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT FileSaveDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT FindTextDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT ListBoxWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT MDIClientWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT PopupMenuWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT PrintDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT PrintSetupDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT ReplaceTextDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT ScrollBarWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT StaticWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT SystemMessageBoxProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT TASK_Reschedule(void);
/***********************************************************************
......
......@@ -10,11 +10,13 @@ C_SRCS = \
hello.c \
hello2.c \
hello3.c \
hello3res.c \
hello4.c \
new.c \
rolex.c
GEN_C_SRCS = \
hello3res.c
all: check_winerc $(PROGRAMS)
@MAKE_RULES@
......@@ -37,9 +39,6 @@ new: new.o
rolex: rolex.o
$(CC) -o rolex rolex.o $(LDOPTIONS) $(ALL_LIBS)
clean::
$(RM) $(PROGRAMS) hello3res.c hello3res.h
hello3res.c hello3res.h: $(WINERC)
### Dependencies:
......@@ -359,7 +359,8 @@ BOOL32 CLIPBOARD_RenderFormat(LPCLIPFORMAT lpFormat)
{
if( lpFormat->wDataPresent && !lpFormat->hData )
if( IsWindow(hWndClipOwner) )
SendMessage16(hWndClipOwner,WM_RENDERFORMAT,(WPARAM)lpFormat->wFormatID,0L);
SendMessage16(hWndClipOwner,WM_RENDERFORMAT,
(WPARAM16)lpFormat->wFormatID,0L);
else
{
dprintf_clipboard(stddeb,"\thWndClipOwner (%04x) is lost!\n",
......@@ -633,7 +634,8 @@ BOOL ChangeClipboardChain(HWND hWnd, HWND hWndNext)
dprintf_clipboard(stdnimp, "ChangeClipboardChain(%04x, %04x)\n", hWnd, hWndNext);
if( hWndViewer )
bRet = !SendMessage16( hWndViewer, WM_CHANGECBCHAIN, (WPARAM)hWnd, (LPARAM)hWndNext);
bRet = !SendMessage16( hWndViewer, WM_CHANGECBCHAIN,
(WPARAM16)hWnd, (LPARAM)hWndNext);
else
dprintf_clipboard(stddeb,"ChangeClipboardChain: hWndViewer is lost\n");
......
......@@ -9,7 +9,7 @@
#include "windows.h"
#include "gdi.h"
INT Escape( HDC hdc, INT nEscape, INT cbInput,
INT Escape( HDC16 hdc, INT nEscape, INT cbInput,
SEGPTR lpszInData, SEGPTR lpvOutData )
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......
......@@ -47,7 +47,7 @@ OLESTATUS OleRevokeClientDoc(LHCLIENTDOC hServerDoc)
/***********************************************************************
* OleIsDcMeta
*/
BOOL OleIsDcMeta(HDC hdc)
BOOL OleIsDcMeta(HDC16 hdc)
{
dprintf_ole(stddeb,"OleIsDCMeta(%04x)\n",hdc);
return GDI_GetObjPtr( hdc, METAFILE_DC_MAGIC ) != 0;
......
......@@ -351,7 +351,7 @@ static char AppName[128], AppMisc[1536];
/*************************************************************************
* AboutDlgProc [SHELL.33]
*/
LRESULT AboutDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
LRESULT AboutDlgProc(HWND hWnd, UINT msg, WPARAM16 wParam, LPARAM lParam)
{
char Template[512], AppTitle[512];
......
......@@ -1183,7 +1183,7 @@ static void recv_message(int sig)
}
result = PostMessage(message.hWnd, message.wMsg,
(WPARAM)message.handle, message.lParam);
(WPARAM16)message.handle, message.lParam);
if (result != FALSE) {
message_is_valid = 1;
break;
......
......@@ -345,7 +345,7 @@ MCISTR_Open(_MCISTR_PROTO_) {
FLAG1("shareable",MCI_OPEN_SHAREABLE);
if (!strcmp(keywords[i],"alias") && (i+1<nrofkeywords)) {
dwFlags |= MCI_OPEN_ALIAS;
pU->openParams.lpstrAlias=SEGPTR_GET(SEGPTR_STRDUP(keywords[i]));
pU->openParams.lpstrAlias=SEGPTR_GET(SEGPTR_STRDUP(keywords[i+1]));
i+=2;
continue;
}
......
......@@ -1287,7 +1287,7 @@ BOOL BITBLT_InternalStretchBlt( DC *dcDst, short xDst, short yDst,
/***********************************************************************
* PatBlt (GDI.29)
*/
BOOL PatBlt( HDC hdc, short left, short top,
BOOL PatBlt( HDC16 hdc, short left, short top,
short width, short height, DWORD rop)
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......@@ -1312,8 +1312,8 @@ BOOL PatBlt( HDC hdc, short left, short top,
/***********************************************************************
* BitBlt (GDI.34)
*/
BOOL BitBlt( HDC hdcDst, INT xDst, INT yDst, INT width, INT height,
HDC hdcSrc, INT xSrc, INT ySrc, DWORD rop )
BOOL BitBlt( HDC16 hdcDst, INT xDst, INT yDst, INT width, INT height,
HDC16 hdcSrc, INT xSrc, INT ySrc, DWORD rop )
{
DC *dcDst, *dcSrc;
......@@ -1340,9 +1340,9 @@ BOOL BitBlt( HDC hdcDst, INT xDst, INT yDst, INT width, INT height,
/***********************************************************************
* StretchBlt (GDI.35)
*/
BOOL StretchBlt( HDC hdcDst, short xDst, short yDst,
BOOL StretchBlt( HDC16 hdcDst, short xDst, short yDst,
short widthDst, short heightDst,
HDC hdcSrc, short xSrc, short ySrc,
HDC16 hdcSrc, short xSrc, short ySrc,
short widthSrc, short heightSrc, DWORD rop )
{
DC *dcDst, *dcSrc;
......
......@@ -18,29 +18,6 @@
(dc)->hookProc( (dc)->hSelf, DCHC_INVALIDVISRGN, (dc)->dwHookData, 0 ); \
} while(0)
/***********************************************************************
* CLIPPING_SetDeviceClipping
*
* Set the clip region of the physical device.
*/
static void CLIPPING_SetDeviceClipping( DC * dc )
{
RGNOBJ *obj = (RGNOBJ *) GDI_GetObjPtr(dc->w.hGCClipRgn, REGION_MAGIC);
if (!obj)
{
fprintf( stderr, "SetDeviceClipping: Rgn is 0. Please report this.\n");
exit(1);
}
if (obj->xrgn)
{
XSetRegion( display, dc->u.x.gc, obj->xrgn );
XSetClipOrigin( display, dc->u.x.gc, dc->w.DCOrgX, dc->w.DCOrgY );
}
else /* Clip everything */
{
XSetClipRectangles( display, dc->u.x.gc, 0, 0, NULL, 0, 0 );
}
}
/***********************************************************************
......@@ -68,14 +45,14 @@ void CLIPPING_UpdateGCRegion( DC * dc )
CombineRgn( dc->w.hGCClipRgn, dc->w.hVisRgn, 0, RGN_COPY );
else
CombineRgn( dc->w.hGCClipRgn, dc->w.hClipRgn, dc->w.hVisRgn, RGN_AND );
CLIPPING_SetDeviceClipping( dc );
if (dc->funcs->pSetDeviceClipping) dc->funcs->pSetDeviceClipping( dc );
}
/***********************************************************************
* SelectClipRgn (GDI.44)
*/
int SelectClipRgn( HDC hdc, HRGN32 hrgn )
int SelectClipRgn( HDC16 hdc, HRGN32 hrgn )
{
int retval;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......@@ -103,7 +80,7 @@ int SelectClipRgn( HDC hdc, HRGN32 hrgn )
/***********************************************************************
* SelectVisRgn (GDI.105)
*/
int SelectVisRgn( HDC hdc, HRGN32 hrgn )
int SelectVisRgn( HDC16 hdc, HRGN32 hrgn )
{
int retval;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......@@ -122,7 +99,7 @@ int SelectVisRgn( HDC hdc, HRGN32 hrgn )
/***********************************************************************
* OffsetClipRgn (GDI.32)
*/
int OffsetClipRgn( HDC hdc, short x, short y )
int OffsetClipRgn( HDC16 hdc, short x, short y )
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc)
......@@ -148,7 +125,7 @@ int OffsetClipRgn( HDC hdc, short x, short y )
/***********************************************************************
* OffsetVisRgn (GDI.102)
*/
int OffsetVisRgn( HDC hdc, short x, short y )
int OffsetVisRgn( HDC16 hdc, short x, short y )
{
int retval;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......@@ -200,7 +177,7 @@ int CLIPPING_IntersectClipRect( DC * dc, short left, short top,
/***********************************************************************
* ExcludeClipRect (GDI.21)
*/
int ExcludeClipRect( HDC hdc, short left, short top,
int ExcludeClipRect( HDC16 hdc, short left, short top,
short right, short bottom )
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......@@ -226,7 +203,7 @@ int ExcludeClipRect( HDC hdc, short left, short top,
/***********************************************************************
* IntersectClipRect (GDI.22)
*/
int IntersectClipRect( HDC hdc, short left, short top,
int IntersectClipRect( HDC16 hdc, short left, short top,
short right, short bottom )
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......@@ -292,7 +269,8 @@ static int CLIPPING_IntersectVisRect( DC * dc, short left, short top,
/***********************************************************************
* ExcludeVisRect (GDI.73)
*/
int ExcludeVisRect( HDC hdc, short left, short top, short right, short bottom )
int ExcludeVisRect( HDC16 hdc, short left, short top,
short right, short bottom )
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return ERROR;
......@@ -306,7 +284,7 @@ int ExcludeVisRect( HDC hdc, short left, short top, short right, short bottom )
/***********************************************************************
* IntersectVisRect (GDI.98)
*/
int IntersectVisRect( HDC hdc, short left, short top,
int IntersectVisRect( HDC16 hdc, short left, short top,
short right, short bottom )
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......@@ -321,7 +299,7 @@ int IntersectVisRect( HDC hdc, short left, short top,
/***********************************************************************
* PtVisible (GDI.103)
*/
BOOL PtVisible( HDC hdc, short x, short y )
BOOL PtVisible( HDC16 hdc, short x, short y )
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return ERROR;
......@@ -396,7 +374,7 @@ INT32 GetClipBox32( HDC32 hdc, LPRECT32 rect )
/***********************************************************************
* SaveVisRgn (GDI.129)
*/
HRGN32 SaveVisRgn( HDC hdc )
HRGN32 SaveVisRgn( HDC16 hdc )
{
HRGN32 copy;
RGNOBJ *obj, *copyObj;
......@@ -426,7 +404,7 @@ HRGN32 SaveVisRgn( HDC hdc )
/***********************************************************************
* RestoreVisRgn (GDI.130)
*/
int RestoreVisRgn( HDC hdc )
int RestoreVisRgn( HDC16 hdc )
{
HRGN32 saved;
RGNOBJ *obj, *savedObj;
......
......@@ -608,10 +608,10 @@ BOOL DestroyCursor( HCURSOR16 hCursor )
/***********************************************************************
* DrawIcon (USER.84)
*/
BOOL DrawIcon( HDC hdc, INT x, INT y, HICON16 hIcon )
BOOL DrawIcon( HDC16 hdc, INT x, INT y, HICON16 hIcon )
{
CURSORICONINFO *ptr;
HDC hMemDC;
HDC16 hMemDC;
HBITMAP16 hXorBits, hAndBits;
COLORREF oldFg, oldBg;
......
......@@ -366,7 +366,7 @@ BOOL32 DC_SetupGCForText( DC * dc )
/***********************************************************************
* GetDCState (GDI.179)
*/
HDC GetDCState( HDC hdc )
HDC16 GetDCState( HDC16 hdc )
{
DC * newdc, * dc;
HGDIOBJ16 handle;
......@@ -381,7 +381,7 @@ HDC GetDCState( HDC hdc )
memcpy( &newdc->w, &dc->w, sizeof(dc->w) );
memcpy( &newdc->u.x.pen, &dc->u.x.pen, sizeof(dc->u.x.pen) );
newdc->hSelf = (HDC)handle;
newdc->hSelf = (HDC32)handle;
newdc->saveLevel = 0;
newdc->w.flags |= DC_SAVED;
......@@ -400,7 +400,7 @@ HDC GetDCState( HDC hdc )
/***********************************************************************
* SetDCState (GDI.180)
*/
void SetDCState( HDC hdc, HDC hdcs )
void SetDCState( HDC16 hdc, HDC16 hdcs )
{
DC * dc, * dcs;
HRGN32 hVisRgn, hClipRgn, hGCClipRgn;
......@@ -439,9 +439,9 @@ void SetDCState( HDC hdc, HDC hdcs )
/***********************************************************************
* SaveDC (GDI.30)
*/
int SaveDC( HDC hdc )
int SaveDC( HDC16 hdc )
{
HDC hdcs;
HDC16 hdcs;
DC * dc, * dcs;
dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......@@ -464,7 +464,7 @@ int SaveDC( HDC hdc )
/***********************************************************************
* RestoreDC (GDI.39)
*/
BOOL RestoreDC( HDC hdc, short level )
BOOL RestoreDC( HDC16 hdc, short level )
{
DC * dc, * dcs;
......@@ -483,7 +483,7 @@ BOOL RestoreDC( HDC hdc, short level )
while ((short)dc->saveLevel >= level)
{
HDC hdcs = dc->header.hNext;
HDC16 hdcs = dc->header.hNext;
if (!(dcs = (DC *) GDI_GetObjPtr( hdcs, DC_MAGIC ))) return FALSE;
dc->header.hNext = dcs->header.hNext;
if ((short)--dc->saveLevel < level) SetDCState( hdc, hdcs );
......@@ -496,7 +496,7 @@ BOOL RestoreDC( HDC hdc, short level )
/***********************************************************************
* CreateDC (GDI.53)
*/
HDC CreateDC( LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE* initData )
HDC16 CreateDC( LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE* initData )
{
DC * dc;
const DC_FUNCTIONS *funcs;
......@@ -524,7 +524,7 @@ HDC CreateDC( LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE* initDa
/***********************************************************************
* CreateIC (GDI.153)
*/
HDC CreateIC( LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE* initData )
HDC16 CreateIC( LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE* initData )
{
/* Nothing special yet for ICs */
return CreateDC( driver, device, output, initData );
......@@ -534,7 +534,7 @@ HDC CreateIC( LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE* initDa
/***********************************************************************
* CreateCompatibleDC (GDI.52)
*/
HDC CreateCompatibleDC( HDC hdc )
HDC16 CreateCompatibleDC( HDC16 hdc )
{
DC *dc, *origDC;
HBITMAP16 hbitmap;
......@@ -577,7 +577,7 @@ HDC CreateCompatibleDC( HDC hdc )
/***********************************************************************
* DeleteDC (GDI.68)
*/
BOOL DeleteDC( HDC hdc )
BOOL DeleteDC( HDC16 hdc )
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return FALSE;
......@@ -587,7 +587,7 @@ BOOL DeleteDC( HDC hdc )
while (dc->saveLevel)
{
DC * dcs;
HDC hdcs = dc->header.hNext;
HDC16 hdcs = dc->header.hNext;
if (!(dcs = (DC *) GDI_GetObjPtr( hdcs, DC_MAGIC ))) break;
dc->header.hNext = dcs->header.hNext;
dc->saveLevel--;
......@@ -614,7 +614,7 @@ BOOL DeleteDC( HDC hdc )
/***********************************************************************
* ResetDC (GDI.376)
*/
HDC ResetDC( HDC hdc, /* DEVMODE */ void *devmode )
HDC16 ResetDC( HDC16 hdc, /* DEVMODE */ void *devmode )
{
fprintf( stderr, "ResetDC: empty stub!\n" );
return hdc;
......@@ -624,7 +624,7 @@ HDC ResetDC( HDC hdc, /* DEVMODE */ void *devmode )
/***********************************************************************
* GetDeviceCaps (GDI.80)
*/
int GetDeviceCaps( HDC hdc, WORD cap )
int GetDeviceCaps( HDC16 hdc, WORD cap )
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return 0;
......@@ -684,7 +684,7 @@ COLORREF SetTextColor( HDC32 hdc, COLORREF color )
/***********************************************************************
* SetTextAlign (GDI.346)
*/
WORD SetTextAlign( HDC hdc, WORD textAlign )
WORD SetTextAlign( HDC16 hdc, WORD textAlign )
{
WORD prevAlign;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......@@ -703,7 +703,7 @@ WORD SetTextAlign( HDC hdc, WORD textAlign )
/***********************************************************************
* GetDCOrg (GDI.79)
*/
DWORD GetDCOrg( HDC hdc )
DWORD GetDCOrg( HDC16 hdc )
{
Window root;
int x, y, w, h, border, depth;
......@@ -720,7 +720,7 @@ DWORD GetDCOrg( HDC hdc )
/***********************************************************************
* SetDCOrg (GDI.117)
*/
DWORD SetDCOrg( HDC hdc, short x, short y )
DWORD SetDCOrg( HDC16 hdc, short x, short y )
{
DWORD prevOrg;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......@@ -764,7 +764,7 @@ DWORD GetDCHook( HDC16 hdc, FARPROC16 *phookProc )
/***********************************************************************
* SetHookFlags (GDI.192)
*/
WORD SetHookFlags(HDC hDC, WORD flags)
WORD SetHookFlags(HDC16 hDC, WORD flags)
{
DC* dc = (DC*)GDI_GetObjPtr( hDC, DC_MAGIC );
......
......@@ -10,7 +10,7 @@
#define DC_GET_VAL( func_type, func_name, dc_field ) \
func_type func_name( HDC hdc ) \
func_type func_name( HDC16 hdc ) \
{ \
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); \
if (!dc) return 0; \
......@@ -18,7 +18,7 @@ func_type func_name( HDC hdc ) \
}
#define DC_GET_X_Y( func_type, func_name, ret_x, ret_y ) \
func_type func_name( HDC hdc ) \
func_type func_name( HDC16 hdc ) \
{ \
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); \
if (!dc) return 0; \
......@@ -45,7 +45,7 @@ BOOL32 func_name##32( HDC32 hdc, LPPOINT32 pt ) \
}
#define DC_SET_MODE( func_name, dc_field, min_val, max_val, meta_func ) \
WORD func_name( HDC hdc, WORD mode ) \
WORD func_name( HDC16 hdc, WORD mode ) \
{ \
WORD prevMode; \
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); \
......
......@@ -621,13 +621,13 @@ static int DIB_SetImageBits( DC *dc, WORD lines, WORD depth, LPSTR bits,
/***********************************************************************
* StretchDIBits (GDI.439)
*/
int StretchDIBits( HDC hdc,
WORD xDest, WORD yDest, WORD wDestWidth, WORD wDestHeight,
WORD xSrc, WORD ySrc, WORD wSrcWidth, WORD wSrcHeight,
LPSTR bits, LPBITMAPINFO info, WORD wUsage, DWORD dwRop )
int StretchDIBits( HDC16 hdc,
WORD xDest, WORD yDest, WORD wDestWidth, WORD wDestHeight,
WORD xSrc, WORD ySrc, WORD wSrcWidth, WORD wSrcHeight,
LPSTR bits, LPBITMAPINFO info, WORD wUsage, DWORD dwRop )
{
HBITMAP16 hBitmap, hOldBitmap;
HDC hdcMem;
HDC16 hdcMem;
hBitmap = CreateDIBitmap( hdc, &info->bmiHeader, CBM_INIT,
bits, info, wUsage );
......@@ -724,7 +724,7 @@ INT16 SetDIBitsToDevice( HDC32 hdc, INT32 xDest, INT32 yDest, DWORD cx,
/***********************************************************************
* GetDIBits (GDI.441)
*/
int GetDIBits( HDC hdc, HBITMAP16 hbitmap, WORD startscan, WORD lines,
int GetDIBits( HDC16 hdc, HBITMAP16 hbitmap, WORD startscan, WORD lines,
LPSTR bits, BITMAPINFO * info, WORD coloruse )
{
DC * dc;
......@@ -792,7 +792,7 @@ int GetDIBits( HDC hdc, HBITMAP16 hbitmap, WORD startscan, WORD lines,
/***********************************************************************
* CreateDIBitmap (GDI.442)
*/
HBITMAP16 CreateDIBitmap( HDC hdc, BITMAPINFOHEADER * header, DWORD init,
HBITMAP16 CreateDIBitmap( HDC16 hdc, BITMAPINFOHEADER * header, DWORD init,
LPVOID bits, BITMAPINFO * data, UINT coloruse )
{
HBITMAP16 handle;
......
......@@ -330,8 +330,9 @@ void FONT_GetMetrics( LOGFONT16 * logfont, XFontStruct * xfont,
/***********************************************************************
* GetGlyphOutLine (GDI.309)
*/
DWORD GetGlyphOutLine(HDC hdc, UINT uChar, UINT fuFormat, LPGLYPHMETRICS lpgm,
DWORD cbBuffer, LPSTR lpBuffer, LPMAT2 lpmat2)
DWORD GetGlyphOutLine( HDC16 hdc, UINT uChar, UINT fuFormat,
LPGLYPHMETRICS lpgm, DWORD cbBuffer, LPSTR lpBuffer,
LPMAT2 lpmat2)
{
fprintf( stdnimp,"GetGlyphOutLine(%04x, '%c', %04x, %p, %ld, %p, %p) // - empty stub!\n",
hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
......@@ -685,7 +686,7 @@ HFONT16 FONT_SelectObject( DC * dc, HFONT16 hfont, FONTOBJ * font )
/***********************************************************************
* GetTextCharacterExtra (GDI.89)
*/
short GetTextCharacterExtra( HDC hdc )
short GetTextCharacterExtra( HDC16 hdc )
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return 0;
......@@ -697,7 +698,7 @@ short GetTextCharacterExtra( HDC hdc )
/***********************************************************************
* SetTextCharacterExtra (GDI.8)
*/
short SetTextCharacterExtra( HDC hdc, short extra )
short SetTextCharacterExtra( HDC16 hdc, short extra )
{
short prev;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......@@ -712,7 +713,7 @@ short SetTextCharacterExtra( HDC hdc, short extra )
/***********************************************************************
* SetTextJustification (GDI.10)
*/
short SetTextJustification( HDC hdc, short extra, short breaks )
short SetTextJustification( HDC16 hdc, short extra, short breaks )
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return 0;
......@@ -738,7 +739,7 @@ short SetTextJustification( HDC hdc, short extra, short breaks )
/***********************************************************************
* GetTextFace (GDI.92)
*/
INT GetTextFace( HDC hdc, INT count, LPSTR name )
INT GetTextFace( HDC16 hdc, INT count, LPSTR name )
{
FONTOBJ *font;
......@@ -754,7 +755,7 @@ INT GetTextFace( HDC hdc, INT count, LPSTR name )
/***********************************************************************
* GetTextExtent (GDI.91)
*/
DWORD GetTextExtent( HDC hdc, LPCSTR str, short count )
DWORD GetTextExtent( HDC16 hdc, LPCSTR str, short count )
{
SIZE16 size;
if (!GetTextExtentPoint16( hdc, str, count, &size )) return 0;
......@@ -944,7 +945,7 @@ BOOL32 GetTextMetrics32W( HDC32 hdc, TEXTMETRIC32W *metrics )
/***********************************************************************
* SetMapperFlags (GDI.349)
*/
DWORD SetMapperFlags(HDC hDC, DWORD dwFlag)
DWORD SetMapperFlags(HDC16 hDC, DWORD dwFlag)
{
dprintf_font(stdnimp,"SetmapperFlags(%04x, %08lX) // Empty Stub !\n",
hDC, dwFlag);
......@@ -955,7 +956,7 @@ DWORD SetMapperFlags(HDC hDC, DWORD dwFlag)
/***********************************************************************
* GetCharABCWidths (GDI.307)
*/
BOOL GetCharABCWidths(HDC hdc, UINT wFirstChar, UINT wLastChar, LPABC16 lpABC)
BOOL GetCharABCWidths(HDC16 hdc, UINT wFirstChar, UINT wLastChar, LPABC16 lpABC)
{
/* No TrueType fonts in Wine so far */
......@@ -970,7 +971,7 @@ BOOL GetCharABCWidths(HDC hdc, UINT wFirstChar, UINT wLastChar, LPABC16 lpABC)
/***********************************************************************
* GetCharWidth (GDI.350)
*/
BOOL GetCharWidth(HDC hdc, WORD wFirstChar, WORD wLastChar, LPINT16 lpBuffer)
BOOL GetCharWidth(HDC16 hdc, WORD wFirstChar, WORD wLastChar, LPINT16 lpBuffer)
{
int i, j;
XFontStruct *xfont;
......@@ -1153,7 +1154,7 @@ void InitFontsList(void)
/*************************************************************************
* EnumFonts [GDI.70]
*/
INT EnumFonts(HDC hDC, LPCSTR lpFaceName, FONTENUMPROC16 lpEnumFunc, LPARAM lpData)
INT EnumFonts(HDC16 hDC, LPCSTR lpFaceName, FONTENUMPROC16 lpEnumFunc, LPARAM lpData)
{
HLOCAL16 hLog;
HLOCAL16 hMet;
......@@ -1223,7 +1224,7 @@ INT EnumFonts(HDC hDC, LPCSTR lpFaceName, FONTENUMPROC16 lpEnumFunc, LPARAM lpDa
/*************************************************************************
* EnumFontFamilies [GDI.330]
*/
INT EnumFontFamilies(HDC hDC, LPCSTR lpszFamily, FONTENUMPROC16 lpEnumFunc, LPARAM lpData)
INT EnumFontFamilies(HDC16 hDC, LPCSTR lpszFamily, FONTENUMPROC16 lpEnumFunc, LPARAM lpData)
{
HLOCAL16 hLog;
HLOCAL16 hMet;
......@@ -1307,7 +1308,7 @@ BOOL GetRasterizerCaps(LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
/*************************************************************************
* GetKerningPairs [GDI.332]
*/
int GetKerningPairs(HDC hDC,int cPairs,LPKERNINGPAIR16 lpKerningPairs)
int GetKerningPairs(HDC16 hDC,int cPairs,LPKERNINGPAIR16 lpKerningPairs)
{
/* This has to be dealt with when proper font handling is in place
*
......
......@@ -357,7 +357,7 @@ INT32 GetObject32W( HANDLE32 handle, INT32 count, LPVOID buffer )
/***********************************************************************
* SelectObject (GDI.45)
*/
HGDIOBJ16 SelectObject( HDC hdc, HGDIOBJ16 handle )
HGDIOBJ16 SelectObject( HDC16 hdc, HGDIOBJ16 handle )
{
GDIOBJHDR * ptr = NULL;
DC * dc;
......@@ -423,7 +423,7 @@ BOOL UnrealizeObject( HGDIOBJ16 obj )
/***********************************************************************
* EnumObjects (GDI.71)
*/
INT EnumObjects( HDC hdc, INT nObjType, GOBJENUMPROC16 lpEnumFunc,
INT EnumObjects( HDC16 hdc, INT nObjType, GOBJENUMPROC16 lpEnumFunc,
LPARAM lParam )
{
/* Solid colors to enumerate */
......
......@@ -184,7 +184,7 @@ BOOL IsValidMetaFile(HMETAFILE16 hmf)
* CloseMetafile GDI.126
*/
HMETAFILE16 CloseMetaFile(HDC hdc)
HMETAFILE16 CloseMetaFile(HDC16 hdc)
{
DC *dc;
METAHEADER *mh;
......@@ -254,7 +254,7 @@ BOOL DeleteMetaFile(HMETAFILE16 hmf)
* PlayMetafile GDI.123
*/
BOOL PlayMetaFile(HDC hdc, HMETAFILE16 hmf)
BOOL PlayMetaFile(HDC16 hdc, HMETAFILE16 hmf)
{
METAHEADER *mh = (METAHEADER *)GlobalLock16(hmf);
METARECORD *mr;
......@@ -298,7 +298,7 @@ BOOL PlayMetaFile(HDC hdc, HMETAFILE16 hmf)
* Niels de carpentier, april 1996
*/
BOOL EnumMetaFile(HDC hdc, HMETAFILE16 hmf, MFENUMPROC16 lpEnumFunc,LPARAM lpData)
BOOL EnumMetaFile(HDC16 hdc, HMETAFILE16 hmf, MFENUMPROC16 lpEnumFunc,LPARAM lpData)
{
METAHEADER *mh = (METAHEADER *)GlobalLock16(hmf);
METARECORD *mr;
......@@ -383,8 +383,8 @@ static LPSTR MF_GetDIBitsPointer(LPBITMAPINFO info)
* PlayMetaFileRecord GDI.176
*/
void PlayMetaFileRecord(HDC hdc, HANDLETABLE16 *ht, METARECORD *mr,
WORD nHandles)
void PlayMetaFileRecord(HDC16 hdc, HANDLETABLE16 *ht, METARECORD *mr,
WORD nHandles)
{
short s1;
HANDLE16 hndl;
......@@ -698,7 +698,7 @@ void PlayMetaFileRecord(HDC hdc, HANDLETABLE16 *ht, METARECORD *mr,
case META_STRETCHBLT:
{
HDC hdcSrc=CreateCompatibleDC(hdc);
HDC16 hdcSrc=CreateCompatibleDC(hdc);
HBITMAP16 hbitmap=CreateBitmap(mr->rdParam[10], /*Width */
mr->rdParam[11], /*Height*/
mr->rdParam[13], /*Planes*/
......@@ -716,7 +716,7 @@ void PlayMetaFileRecord(HDC hdc, HANDLETABLE16 *ht, METARECORD *mr,
case META_BITBLT: /* <-- not yet debugged */
{
HDC hdcSrc=CreateCompatibleDC(hdc);
HDC16 hdcSrc=CreateCompatibleDC(hdc);
HBITMAP16 hbitmap=CreateBitmap(mr->rdParam[7]/*Width */,mr->rdParam[8]/*Height*/,
mr->rdParam[10]/*Planes*/,mr->rdParam[11]/*BitsPixel*/,
(LPSTR)&mr->rdParam[12]/*bits*/);
......
......@@ -176,10 +176,8 @@ static char ** const OBM_Icons_Data[OIC_LAST-OIC_FIRST+1] =
#include "bitmaps/ocr_sizens"
#include "bitmaps/ocr_bummer"
#include "bitmaps/ocr_dragobject"
#if 0
#include "bitmaps/ocr_sizeall"
#include "bitmaps/ocr_icocur"
#endif
/*#include "bitmaps/ocr_sizeall"*/
/*#include "bitmaps/ocr_icocur"*/
/* Cursor are not all contiguous (go figure...) */
#define OCR_FIRST0 OCR_BUMMER
......
......@@ -141,7 +141,7 @@ BOOL AnimatePalette(HPALETTE16 hPal, UINT StartIndex, UINT NumEntries,
/***********************************************************************
* SetSystemPaletteUse (GDI.373)
*/
WORD SetSystemPaletteUse( HDC hdc, WORD use)
WORD SetSystemPaletteUse( HDC16 hdc, WORD use)
{
WORD old=SystemPaletteUse;
fprintf(stdnimp,"SetSystemPaletteUse(%04x,%04x) // empty stub !!!\n", hdc, use);
......@@ -152,7 +152,7 @@ WORD SetSystemPaletteUse( HDC hdc, WORD use)
/***********************************************************************
* GetSystemPaletteUse (GDI.374)
*/
WORD GetSystemPaletteUse( HDC hdc )
WORD GetSystemPaletteUse( HDC16 hdc )
{
fprintf(stdnimp,"GetSystemPaletteUse(%04x) // empty stub !!!\n", hdc);
return SystemPaletteUse;
......@@ -162,7 +162,7 @@ WORD GetSystemPaletteUse( HDC hdc )
/***********************************************************************
* GetSystemPaletteEntries (GDI.375)
*/
WORD GetSystemPaletteEntries( HDC hdc, WORD start, WORD count,
WORD GetSystemPaletteEntries( HDC16 hdc, WORD start, WORD count,
LPPALETTEENTRY entries )
{
WORD i;
......@@ -207,7 +207,7 @@ WORD GetNearestPaletteIndex( HPALETTE16 hpalette, COLORREF color )
/***********************************************************************
* GetNearestColor (GDI.154)
*/
COLORREF GetNearestColor( HDC hdc, COLORREF color )
COLORREF GetNearestColor( HDC16 hdc, COLORREF color )
{
COLORREF nearest = 0xFADECAFE;
DC *dc;
......@@ -268,7 +268,7 @@ BOOL32 PALETTE_DeleteObject( HPALETTE16 hpalette, PALETTEOBJ *palette )
/***********************************************************************
* GDISelectPalette (GDI.361)
*/
HPALETTE16 GDISelectPalette( HDC hdc, HPALETTE16 hpal, WORD wBkg)
HPALETTE16 GDISelectPalette( HDC16 hdc, HPALETTE16 hpal, WORD wBkg)
{
HPALETTE16 prev;
DC *dc;
......@@ -292,7 +292,7 @@ HPALETTE16 GDISelectPalette( HDC hdc, HPALETTE16 hpal, WORD wBkg)
* GDIRealizePalette (GDI.362)
*
*/
UINT GDIRealizePalette( HDC hdc )
UINT GDIRealizePalette( HDC16 hdc )
{
PALETTEOBJ* palPtr;
int realized = 0;
......@@ -326,7 +326,7 @@ UINT GDIRealizePalette( HDC hdc )
/***********************************************************************
* RealizeDefaultPalette (GDI.365)
*/
WORD RealizeDefaultPalette( HDC hdc )
WORD RealizeDefaultPalette( HDC16 hdc )
{
DC *dc;
PALETTEOBJ* palPtr;
......@@ -364,7 +364,7 @@ WORD RealizeDefaultPalette( HDC hdc )
/***********************************************************************
* IsDCCurrentPalette (GDI.412)
*/
BOOL IsDCCurrentPalette(HDC hDC)
BOOL IsDCCurrentPalette(HDC16 hDC)
{
DC* dc = (DC *)GDI_GetObjPtr( hDC, DC_MAGIC );
return (dc)?(dc->w.hPalette == hPrimaryPalette):FALSE;
......@@ -373,7 +373,7 @@ BOOL IsDCCurrentPalette(HDC hDC)
/***********************************************************************
* SelectPalette (USER.282)
*/
HPALETTE16 SelectPalette( HDC hDC, HPALETTE16 hPal, BOOL bForceBackground )
HPALETTE16 SelectPalette( HDC16 hDC, HPALETTE16 hPal, BOOL bForceBackground )
{
WORD wBkgPalette = 1;
PALETTEOBJ* lpt = (PALETTEOBJ*) GDI_GetObjPtr( hPal, PALETTE_MAGIC );
......@@ -426,7 +426,7 @@ UINT16 RealizePalette( HDC32 hDC )
* UpdateColors (GDI.366)
*
*/
int UpdateColors( HDC hDC )
int UpdateColors( HDC16 hDC )
{
HWND32 hWnd = WindowFromDC32( hDC );
......
......@@ -34,7 +34,7 @@ static int prefix_offset;
extern int CLIPPING_IntersectClipRect( DC * dc, short left, short top,
short right, short bottom, UINT16 flags);
static const char *TEXT_NextLine( HDC hdc, const char *str, int *count,
static const char *TEXT_NextLine( HDC16 hdc, const char *str, int *count,
char *dest, int *len, int width, WORD format)
{
/* Return next line of text from a string.
......@@ -638,7 +638,7 @@ BOOL32 TextOut32W( HDC32 hdc, INT32 x, INT32 y, LPCWSTR str, INT32 count )
/***********************************************************************
* GrayString (USER.185)
*/
BOOL GrayString(HDC hdc, HBRUSH16 hbr, GRAYSTRINGPROC16 gsprc, LPARAM lParam,
BOOL GrayString(HDC16 hdc, HBRUSH16 hbr, GRAYSTRINGPROC16 gsprc, LPARAM lParam,
INT cch, INT x, INT y, INT cx, INT cy)
{
BOOL ret;
......@@ -661,7 +661,7 @@ BOOL GrayString(HDC hdc, HBRUSH16 hbr, GRAYSTRINGPROC16 gsprc, LPARAM lParam,
* Note: this doesn't work too well for text-alignment modes other
* than TA_LEFT|TA_TOP. But we want bug-for-bug compatibility :-)
*/
LONG TEXT_TabbedTextOut( HDC hdc, int x, int y, LPSTR lpstr, int count,
LONG TEXT_TabbedTextOut( HDC16 hdc, int x, int y, LPSTR lpstr, int count,
int cTabStops, LPINT16 lpTabPos, int nTabOrg,
BOOL fDisplayText)
{
......@@ -717,7 +717,7 @@ LONG TEXT_TabbedTextOut( HDC hdc, int x, int y, LPSTR lpstr, int count,
/***********************************************************************
* TabbedTextOut (USER.196)
*/
LONG TabbedTextOut( HDC hdc, short x, short y, LPSTR lpstr, short count,
LONG TabbedTextOut( HDC16 hdc, short x, short y, LPSTR lpstr, short count,
short cTabStops, LPINT16 lpTabPos, short nTabOrg )
{
dprintf_text( stddeb, "TabbedTextOut: %04x %d,%d '%*.*s' %d\n",
......@@ -730,7 +730,7 @@ LONG TabbedTextOut( HDC hdc, short x, short y, LPSTR lpstr, short count,
/***********************************************************************
* GetTabbedTextExtent (USER.197)
*/
DWORD GetTabbedTextExtent( HDC hdc, LPSTR lpstr, int count,
DWORD GetTabbedTextExtent( HDC16 hdc, LPSTR lpstr, int count,
int cTabStops, LPINT16 lpTabPos )
{
dprintf_text( stddeb, "GetTabbedTextExtent: %04x '%*.*s' %d\n",
......
......@@ -6,12 +6,12 @@ $(SUBDIRS): dummy
@cd $@; $(MAKE)
depend:
for i in $(SUBDIRS); do (cd $$i; $(MAKE) depend); done
for i in $(SUBDIRS); do (cd $$i; $(MAKE) depend) || exit 1; done
install:
for i in $(SUBDIRS); do (cd $$i; $(MAKE) install); done
for i in $(SUBDIRS); do (cd $$i; $(MAKE) install) || exit 1; done
clean:
for i in $(SUBDIRS); do (cd $$i; $(MAKE) clean); done
for i in $(SUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
dummy:
......@@ -55,9 +55,6 @@ progman: $(MOSTOBJS) $(STRINGOBJS)
install: dummy
$(INSTALL_PROGRAM) progman $(bindir)/progman
clean::
$(RM) accel.c accel.h $(LANGUAGES:%=%.c) $(LANGUAGES:%=%.h) progman
accel.c accel.h: $(WINERC) Xx.rc
$(LANGUAGES:%=%.c) $(LANGUAGES:%=%.h): $(WINERC) Xx.rc
......
......@@ -55,10 +55,6 @@ install: dummy
$(INSTALL_PROGRAM) winhelp $(bindir)/winhelp
$(INSTALL_PROGRAM) hlp2sgml $(bindir)/hlp2sgml
clean::
$(RM) $(PROGRAMS) lex.yy.c y.tab.c y.tab.h
$(RM) $(LANGUAGES:%=%.c) $(LANGUAGES:%=%.h)
y.tab.c y.tab.h: macro.yacc.y
$(YACC) -d -t $(SRCDIR)/macro.yacc.y
......
......@@ -3,17 +3,17 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ..
SRCDIR = @srcdir@
VPATH = @srcdir@
PROGRAM = winerc
PROGRAMS = winerc
MODULE = none
C_SRCS = winerc.c
GEN_C_SRCS = y.tab.c lex.yy.c
all: $(PROGRAM)
all: $(PROGRAMS)
@MAKE_RULES@
$(PROGRAM): $(OBJS)
$(PROGRAMS): $(OBJS)
$(CC) $(CFLAGS) -o winerc $(OBJS) $(LEXLIB)
y.tab.c y.tab.h: parser.y
......@@ -22,7 +22,4 @@ y.tab.c y.tab.h: parser.y
lex.yy.c: parser.l
$(LEX) -8 -I $(SRCDIR)/parser.l
clean::
$(RM) y.tab.h $(PROGRAM)
### Dependencies:
......@@ -12,8 +12,7 @@
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#include <windows.h>
/* #include <neexe.h> */
#include "windows.h"
#include "parser.h"
#include "y.tab.h"
......
......@@ -5,9 +5,18 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = resources
LANGUAGES = En Es De No Fr Fi Da Cz Eo It Ko
SYSRES_SRCS = $(LANGUAGES:%=sysres_%.c)
SYSRES_SRCS = \
sysres_Cz.c \
sysres_Da.c \
sysres_De.c \
sysres_En.c \
sysres_Eo.c \
sysres_Es.c \
sysres_Fi.c \
sysres_Fr.c \
sysres_It.c \
sysres_Ko.c \
sysres_No.c
C_SRCS = sysres.c
GEN_C_SRCS = $(SYSRES_SRCS)
......@@ -18,7 +27,4 @@ all: check_winerc $(MODULE).o
$(SYSRES_SRCS): $(WINERC)
clean::
$(RM) $(SYSRES_SRCS:.c=.h)
### Dependencies:
......@@ -4,19 +4,19 @@ TOPOBJDIR = ..
SRCDIR = @srcdir@
VPATH = @srcdir@
PROGRAM = build
MODULE = none
PROGRAMS = build makedep
MODULE = none
C_SRCS = build.c
C_SRCS = build.c makedep.c
all: $(PROGRAM)
all: $(PROGRAMS)
@MAKE_RULES@
$(PROGRAM): $(OBJS)
$(CC) $(CFLAGS) -o build $(OBJS)
build: build.o
$(CC) $(CFLAGS) -o build build.o
clean::
$(RM) $(PROGRAM)
makedep: makedep.o
$(CC) $(CFLAGS) -o makedep makedep.o
### Dependencies:
......@@ -14,8 +14,8 @@ mv $DEBUG_H $DEBUG_H.old
mv $STDDEBUG_H $STDDEBUG_H.old
# Build the list of debug identifiers
grep -h dprintf_ */*.c | sed 's/.*dprintf_\([A-Za-z0-9_]*\).*/\1/g' | \
sort | uniq > temp.$$
grep -h dprintf_ `find . -name '*.c' -print` | \
sed 's/.*dprintf_\([A-Za-z0-9_]*\).*/\1/g' | sort | uniq > temp.$$
# Build debug.h
......
/*
* Generate include file dependencies
*
* Copyright 1996 Alexandre Julliard
*/
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/* Max first-level includes per file */
#define MAX_INCLUDES 124
typedef struct _INCL_FILE
{
struct _INCL_FILE *next;
char *name;
char *filename;
struct _INCL_FILE *owner;
struct _INCL_FILE *files[MAX_INCLUDES];
} INCL_FILE;
static INCL_FILE *firstSrc;
static INCL_FILE *firstInclude;
typedef struct _INCL_PATH
{
struct _INCL_PATH *next;
const char *name;
} INCL_PATH;
static INCL_PATH *firstPath;
static const char *SrcDir = NULL;
static const char *OutputFileName = "Makefile";
static const char *Separator = "### Dependencies";
static const char *ProgramName;
static const char Usage[] =
"Usage: %s [options] [files]\n"
"Options:\n"
" -Idir Search for include files in directory 'dir'\n"
" -Cdir Search for source files in directory 'dir'\n"
" -fxxx Store output in file 'xxx' (default: Makefile)\n"
" -sxxx Use 'xxx' as separator (default: \"### Dependencies\")\n";
/*******************************************************************
* xmalloc
*/
static void *xmalloc( int size )
{
void *res;
if (!(res = malloc (size ? size : 1)))
{
fprintf( stderr, "%s: Virtual memory exhausted.\n", ProgramName );
exit(1);
}
return res;
}
/*******************************************************************
* xstrdup
*/
static char *xstrdup( const char *str )
{
char *res = strdup( str );
if (!res)
{
fprintf( stderr, "%s: Virtual memory exhausted.\n", ProgramName );
exit(1);
}
return res;
}
/*******************************************************************
* add_include_path
*
* Add a directory to the include path.
*/
static void add_include_path( const char *name )
{
INCL_PATH *path = xmalloc( sizeof(*path) );
INCL_PATH **p = &firstPath;
while (*p) p = &(*p)->next;
*p = path;
path->next = NULL;
path->name = name;
}
/*******************************************************************
* add_src_file
*
* Add a source file to the list.
*/
static INCL_FILE *add_src_file( const char *name )
{
INCL_FILE **p = &firstSrc;
INCL_FILE *file = xmalloc( sizeof(*file) );
memset( file, 0, sizeof(*file) );
file->name = xstrdup(name);
while (*p) p = &(*p)->next;
*p = file;
return file;
}
/*******************************************************************
* add_include
*
* Add an include file if it doesn't already exists.
*/
static INCL_FILE *add_include( INCL_FILE *pFile, const char *name )
{
INCL_FILE **p = &firstInclude;
int pos;
for (pos = 0; pos < MAX_INCLUDES; pos++) if (!pFile->files[pos]) break;
if (pos >= MAX_INCLUDES)
{
fprintf( stderr, "%s: %s: too many included files, please fix MAX_INCLUDES\n",
ProgramName, pFile->name );
exit(1);
}
while (*p && strcmp( name, (*p)->name )) p = &(*p)->next;
if (!*p)
{
*p = xmalloc( sizeof(INCL_FILE) );
memset( *p, 0, sizeof(INCL_FILE) );
(*p)->name = xstrdup(name);
}
pFile->files[pos] = *p;
return *p;
}
/*******************************************************************
* open_src_file
*/
static FILE *open_src_file( INCL_FILE *pFile )
{
FILE *file;
if (SrcDir)
{
pFile->filename = xmalloc( strlen(SrcDir) + strlen(pFile->name) + 2 );
strcpy( pFile->filename, SrcDir );
strcat( pFile->filename, "/" );
strcat( pFile->filename, pFile->name );
}
else pFile->filename = xstrdup( pFile->name );
if (!(file = fopen( pFile->filename, "r" )))
{
perror( pFile->filename );
exit(1);
}
return file;
}
/*******************************************************************
* open_include_file
*/
static FILE *open_include_file( INCL_FILE *pFile )
{
FILE *file = NULL;
INCL_PATH *path;
for (path = firstPath; path; path = path->next)
{
char *filename = xmalloc(strlen(path->name) + strlen(pFile->name) + 2);
strcpy( filename, path->name );
strcat( filename, "/" );
strcat( filename, pFile->name );
if ((file = fopen( filename, "r" )))
{
pFile->filename = filename;
break;
}
free( filename );
}
if (!file)
{
if (firstPath) perror( pFile->name );
else fprintf( stderr, "%s: %s: File not found\n",
ProgramName, pFile->name );
exit(1);
}
return file;
}
/*******************************************************************
* parse_file
*/
static void parse_file( INCL_FILE *pFile, int src )
{
char buffer[1024];
char *include;
int line = 0;
FILE *file = src ? open_src_file( pFile ) : open_include_file( pFile );
while (fgets( buffer, sizeof(buffer)-1, file ))
{
char *p = buffer;
line++;
while (*p && isspace(*p)) p++;
if (*p++ != '#') continue;
while (*p && isspace(*p)) p++;
if (strncmp( p, "include", 7 )) continue;
p += 7;
while (*p && isspace(*p)) p++;
if (*p++ != '\"') continue;
include = p;
while (*p && (*p != '\"')) p++;
if (!*p)
{
fprintf( stderr, "%s:%d: Malformed #include directive\n",
pFile->filename, line );
exit(1);
}
*p = 0;
add_include( pFile, include );
}
}
/*******************************************************************
* output_include
*/
static void output_include( FILE *file, INCL_FILE *pFile,
INCL_FILE *owner, int *column )
{
int i;
if (pFile->owner == owner) return;
pFile->owner = owner;
if (*column + strlen(pFile->filename) + 1 > 70)
{
fprintf( file, " \\\n" );
*column = 0;
}
fprintf( file, " %s", pFile->filename );
*column += strlen(pFile->filename) + 1;
for (i = 0; i < MAX_INCLUDES; i++)
if (pFile->files[i]) output_include( file, pFile->files[i],
owner, column );
}
/*******************************************************************
* output_dependencies
*/
static void output_dependencies(void)
{
INCL_FILE *pFile;
int i, column;
FILE *file = NULL;
char buffer[1024];
if (Separator && ((file = fopen( OutputFileName, "r+" ))))
{
while (fgets( buffer, sizeof(buffer), file ))
if (!strncmp( buffer, Separator, strlen(Separator) )) break;
ftruncate( fileno(file), ftell(file) );
}
if (!file)
{
if (!(file = fopen( OutputFileName, "a" )))
{
perror( OutputFileName );
exit(1);
}
}
for( pFile = firstSrc; pFile; pFile = pFile->next)
{
char *name = strrchr( pFile->name, '/' );
char *obj = xstrdup( name ? name + 1 : pFile->name );
char *ext = strrchr( obj, '.' );
if (ext) strcpy( ext, ".o" );
fprintf( file, "%s: %s", obj, pFile->filename );
column = strlen(obj) + strlen(pFile->filename) + 2;
free( obj );
for (i = 0; i < MAX_INCLUDES; i++)
if (pFile->files[i]) output_include( file, pFile->files[i],
pFile, &column );
fprintf( file, "\n" );
}
}
/*******************************************************************
* parse_option
*/
static void parse_option( const char *opt )
{
switch(opt[1])
{
case 'I':
if (opt[2]) add_include_path( opt + 2 );
break;
case 'C':
if (opt[2]) SrcDir = opt + 2;
else SrcDir = NULL;
break;
case 'f':
if (opt[2]) OutputFileName = opt + 2;
break;
case 's':
if (opt[2]) Separator = opt + 2;
else Separator = NULL;
break;
default:
fprintf( stderr, "Unknown option '%s'\n", opt );
fprintf( stderr, Usage, ProgramName );
exit(1);
}
}
/*******************************************************************
* main
*/
int main( int argc, char *argv[] )
{
INCL_FILE *pFile;
ProgramName = argv[0];
while (argc > 1)
{
if (*argv[1] == '-') parse_option( argv[1] );
else
{
pFile = add_src_file( argv[1] );
parse_file( pFile, 1 );
}
argc--;
argv++;
}
for (pFile = firstInclude; pFile; pFile = pFile->next)
parse_file( pFile, 0 );
output_dependencies();
return 0;
}
......@@ -28,7 +28,7 @@
#define NB_DCE 5 /* Number of DCEs created at startup */
static DCE *firstDCE = 0;
static HDC defaultDCstate = 0;
static HDC32 defaultDCstate = 0;
/***********************************************************************
* DCE_AllocDCE
......@@ -396,7 +396,7 @@ HDC16 GetDCEx16( HWND16 hwnd, HRGN16 hrgnClip, DWORD flags )
HDC32 GetDCEx32( HWND32 hwnd, HRGN32 hrgnClip, DWORD flags )
{
HRGN32 hrgnVisible;
HDC hdc = 0;
HDC32 hdc = 0;
DCE * dce;
DC * dc;
WND * wndPtr;
......
......@@ -122,7 +122,7 @@ static LRESULT DEFDLG_Proc( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
return 0;
case WM_ERASEBKGND:
FillWindow( hwnd, hwnd, (HDC)wParam, (HBRUSH16)CTLCOLOR_DLG );
FillWindow( hwnd, hwnd, (HDC16)wParam, (HBRUSH16)CTLCOLOR_DLG );
return 1;
case WM_NCDESTROY:
......
......@@ -105,7 +105,7 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
case WM_PAINT:
{
PAINTSTRUCT16 ps;
HDC hdc = BeginPaint16( wndPtr->hwndSelf, &ps );
HDC16 hdc = BeginPaint16( wndPtr->hwndSelf, &ps );
if( hdc )
{
if( (wndPtr->dwStyle & WS_MINIMIZE) && wndPtr->class->hIcon )
......@@ -162,7 +162,7 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
if( wndPtr->flags & WIN_NCACTIVATED )
{
FillWindow( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf,
(HDC)wParam, sysColorObjects.hbrushActiveCaption );
(HDC16)wParam, sysColorObjects.hbrushActiveCaption );
return 1;
}
......@@ -175,11 +175,11 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
HBRUSH16 hbrush = CreateSolidBrush(
GetSysColor(((DWORD)wndPtr->class->hbrBackground)-1));
FillWindow( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf,
(HDC)wParam, hbrush);
(HDC16)wParam, hbrush);
DeleteObject (hbrush);
}
else FillWindow( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf,
(HDC)wParam, wndPtr->class->hbrBackground );
(HDC16)wParam, wndPtr->class->hbrBackground );
return 1;
}
......@@ -192,13 +192,13 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
case WM_CTLCOLORBTN:
case WM_CTLCOLORDLG:
case WM_CTLCOLORSTATIC:
SetBkColor( (HDC)wParam, GetSysColor(COLOR_WINDOW) );
SetTextColor( (HDC)wParam, GetSysColor(COLOR_WINDOWTEXT) );
SetBkColor( (HDC32)wParam, GetSysColor(COLOR_WINDOW) );
SetTextColor( (HDC32)wParam, GetSysColor(COLOR_WINDOWTEXT) );
return (LRESULT)sysColorObjects.hbrushWindow;
case WM_CTLCOLORSCROLLBAR:
SetBkColor( (HDC)wParam, RGB(255, 255, 255) );
SetTextColor( (HDC)wParam, RGB(0, 0, 0) );
SetBkColor( (HDC32)wParam, RGB(255, 255, 255) );
SetTextColor( (HDC32)wParam, RGB(0, 0, 0) );
UnrealizeObject( sysColorObjects.hbrushScrollbar );
return (LRESULT)sysColorObjects.hbrushScrollbar;
......@@ -206,15 +206,15 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
{
if (HIWORD(lParam) == CTLCOLOR_SCROLLBAR)
{
SetBkColor( (HDC)wParam, RGB(255, 255, 255) );
SetTextColor( (HDC)wParam, RGB(0, 0, 0) );
SetBkColor( (HDC32)wParam, RGB(255, 255, 255) );
SetTextColor( (HDC32)wParam, RGB(0, 0, 0) );
UnrealizeObject( sysColorObjects.hbrushScrollbar );
return (LRESULT)sysColorObjects.hbrushScrollbar;
}
else
{
SetBkColor( (HDC)wParam, GetSysColor(COLOR_WINDOW) );
SetTextColor( (HDC)wParam, GetSysColor(COLOR_WINDOWTEXT) );
SetBkColor( (HDC32)wParam, GetSysColor(COLOR_WINDOW) );
SetTextColor( (HDC32)wParam, GetSysColor(COLOR_WINDOWTEXT) );
return (LRESULT)sysColorObjects.hbrushWindow;
}
}
......@@ -255,7 +255,7 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
else
if( wParam == VK_ESCAPE && GetKeyState(VK_SHIFT) < 0 )
SendMessage16( wndPtr->hwndSelf, WM_SYSCOMMAND,
(WPARAM)SC_KEYMENU, (LPARAM)VK_SPACE);
(WPARAM16)SC_KEYMENU, (LPARAM)VK_SPACE);
break;
case WM_KEYUP:
......@@ -273,7 +273,7 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
if (wParam == VK_RETURN && (wndPtr->dwStyle & WS_MINIMIZE))
{
PostMessage( wndPtr->hwndSelf, WM_SYSCOMMAND,
(WPARAM)SC_RESTORE, 0L );
(WPARAM16)SC_RESTORE, 0L );
break;
}
if ((HIWORD(lParam) & KEYDATA_ALT) && wParam)
......@@ -283,7 +283,7 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
SendMessage16( wndPtr->parent->hwndSelf, msg, wParam, lParam );
else
SendMessage16( wndPtr->hwndSelf, WM_SYSCOMMAND,
(WPARAM)SC_KEYMENU, (LPARAM)(DWORD)wParam );
(WPARAM16)SC_KEYMENU, (LPARAM)(DWORD)wParam );
}
else /* check for Ctrl-Esc */
if (wParam != VK_ESCAPE) MessageBeep(0);
......
......@@ -64,7 +64,7 @@ static WORD xBaseUnit = 0, yBaseUnit = 0;
BOOL32 DIALOG_Init()
{
TEXTMETRIC16 tm;
HDC hdc;
HDC16 hdc;
/* Calculate the dialog base units */
......@@ -281,7 +281,7 @@ static BOOL32 DIALOG_CreateControls( WND *pWnd, LPCSTR template, INT32 items,
/* Send initialisation messages to the control */
if (dlgInfo->hUserFont) SendMessage32A( hwndCtrl, WM_SETFONT,
(WPARAM)dlgInfo->hUserFont, 0 );
(WPARAM32)dlgInfo->hUserFont, 0 );
if (SendMessage32A(hwndCtrl, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON)
{
/* If there's already a default push-button, set it back */
......@@ -582,8 +582,9 @@ static HWND DIALOG_CreateIndirect( HINSTANCE32 hInst, LPCSTR dlgTemplate,
dlgInfo->hwndFocus = GetNextDlgTabItem32( hwnd, 0, FALSE );
if (dlgInfo->hUserFont)
SendMessage32A( hwnd, WM_SETFONT, (WPARAM)dlgInfo->hUserFont, 0 );
if (SendMessage32A(hwnd, WM_INITDIALOG, (WPARAM)dlgInfo->hwndFocus, param))
SendMessage32A( hwnd, WM_SETFONT, (WPARAM32)dlgInfo->hUserFont, 0 );
if (SendMessage32A( hwnd, WM_INITDIALOG,
(WPARAM32)dlgInfo->hwndFocus, param ))
SetFocus32( dlgInfo->hwndFocus );
if (template.style & WS_VISIBLE) ShowWindow( hwnd, SW_SHOW );
return hwnd;
......
......@@ -50,8 +50,8 @@ BYTE KeyStateTable[256];
BYTE AsyncKeyStateTable[256];
WPARAM lastEventChar = 0; /* this will have to be changed once
* ToAscii starts working */
WPARAM16 lastEventChar = 0; /* this will have to be changed once
* ToAscii starts working */
static HWND32 captureWnd = 0;
static BOOL32 InputEnabled = TRUE;
......
......@@ -28,7 +28,7 @@
/***********************************************************************
* LineTo (GDI.19)
*/
BOOL LineTo( HDC hdc, short x, short y )
BOOL LineTo( HDC16 hdc, short x, short y )
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc)
......@@ -54,7 +54,7 @@ BOOL LineTo( HDC hdc, short x, short y )
/***********************************************************************
* MoveTo (GDI.20)
*/
DWORD MoveTo( HDC hdc, short x, short y )
DWORD MoveTo( HDC16 hdc, short x, short y )
{
short oldx, oldy;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......@@ -110,7 +110,7 @@ BOOL32 MoveToEx32( HDC32 hdc, INT32 x, INT32 y, LPPOINT32 pt )
* Helper functions for Arc(), Chord() and Pie().
* 'lines' is the number of lines to draw: 0 for Arc, 1 for Chord, 2 for Pie.
*/
static BOOL GRAPH_DrawArc( HDC hdc, int left, int top, int right, int bottom,
static BOOL GRAPH_DrawArc( HDC16 hdc, int left, int top, int right, int bottom,
int xstart, int ystart, int xend, int yend, int lines )
{
int xcenter, ycenter, istart_angle, idiff_angle, tmp;
......@@ -200,7 +200,7 @@ static BOOL GRAPH_DrawArc( HDC hdc, int left, int top, int right, int bottom,
/***********************************************************************
* Arc (GDI.23)
*/
BOOL Arc( HDC hdc, INT left, INT top, INT right, INT bottom,
BOOL Arc( HDC16 hdc, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend )
{
return GRAPH_DrawArc( hdc, left, top, right, bottom,
......@@ -211,7 +211,7 @@ BOOL Arc( HDC hdc, INT left, INT top, INT right, INT bottom,
/***********************************************************************
* Pie (GDI.26)
*/
BOOL Pie( HDC hdc, INT left, INT top, INT right, INT bottom,
BOOL Pie( HDC16 hdc, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend )
{
return GRAPH_DrawArc( hdc, left, top, right, bottom,
......@@ -222,7 +222,7 @@ BOOL Pie( HDC hdc, INT left, INT top, INT right, INT bottom,
/***********************************************************************
* Chord (GDI.348)
*/
BOOL Chord( HDC hdc, INT left, INT top, INT right, INT bottom,
BOOL Chord( HDC16 hdc, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend )
{
return GRAPH_DrawArc( hdc, left, top, right, bottom,
......@@ -233,7 +233,7 @@ BOOL Chord( HDC hdc, INT left, INT top, INT right, INT bottom,
/***********************************************************************
* Ellipse (GDI.24)
*/
BOOL Ellipse( HDC hdc, INT left, INT top, INT right, INT bottom )
BOOL Ellipse( HDC16 hdc, INT left, INT top, INT right, INT bottom )
{
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc)
......@@ -278,7 +278,7 @@ BOOL Ellipse( HDC hdc, INT left, INT top, INT right, INT bottom )
/***********************************************************************
* Rectangle (GDI.27)
*/
BOOL Rectangle( HDC hdc, INT left, INT top, INT right, INT bottom )
BOOL Rectangle( HDC16 hdc, INT left, INT top, INT right, INT bottom )
{
INT32 width;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......@@ -336,7 +336,7 @@ BOOL Rectangle( HDC hdc, INT left, INT top, INT right, INT bottom )
/***********************************************************************
* RoundRect (GDI.28)
*/
BOOL RoundRect( HDC hDC, INT left, INT top, INT right, INT bottom,
BOOL RoundRect( HDC16 hDC, INT left, INT top, INT right, INT bottom,
INT ell_width, INT ell_height )
{
DC * dc = (DC *) GDI_GetObjPtr(hDC, DC_MAGIC);
......@@ -554,7 +554,7 @@ INT32 FrameRect32( HDC32 hdc, const RECT32 *rect, HBRUSH32 hbrush )
/***********************************************************************
* SetPixel (GDI.31)
*/
COLORREF SetPixel( HDC hdc, short x, short y, COLORREF color )
COLORREF SetPixel( HDC16 hdc, short x, short y, COLORREF color )
{
Pixel pixel;
......@@ -584,7 +584,7 @@ COLORREF SetPixel( HDC hdc, short x, short y, COLORREF color )
/***********************************************************************
* GetPixel (GDI.83)
*/
COLORREF GetPixel( HDC hdc, short x, short y )
COLORREF GetPixel( HDC16 hdc, short x, short y )
{
static Pixmap pixmap = 0;
XImage * image;
......@@ -626,7 +626,7 @@ COLORREF GetPixel( HDC hdc, short x, short y )
/***********************************************************************
* PaintRgn (GDI.43)
*/
BOOL PaintRgn( HDC hdc, HRGN32 hrgn )
BOOL PaintRgn( HDC16 hdc, HRGN32 hrgn )
{
RECT16 box;
HRGN32 tmpVisRgn, prevVisRgn;
......@@ -663,7 +663,7 @@ BOOL PaintRgn( HDC hdc, HRGN32 hrgn )
/***********************************************************************
* FillRgn (GDI.40)
*/
BOOL FillRgn( HDC hdc, HRGN32 hrgn, HBRUSH16 hbrush )
BOOL FillRgn( HDC16 hdc, HRGN32 hrgn, HBRUSH16 hbrush )
{
BOOL retval;
HBRUSH16 prevBrush = SelectObject( hdc, hbrush );
......@@ -676,7 +676,7 @@ BOOL FillRgn( HDC hdc, HRGN32 hrgn, HBRUSH16 hbrush )
/***********************************************************************
* FrameRgn (GDI.41)
*/
BOOL FrameRgn( HDC hdc, HRGN32 hrgn, HBRUSH16 hbrush, int nWidth, int nHeight )
BOOL FrameRgn( HDC16 hdc, HRGN32 hrgn, HBRUSH16 hbrush, int nWidth, int nHeight )
{
HRGN32 tmp = CreateRectRgn( 0, 0, 0, 0 );
if(!REGION_FrameRgn( tmp, hrgn, nWidth, nHeight )) return 0;
......@@ -688,7 +688,7 @@ BOOL FrameRgn( HDC hdc, HRGN32 hrgn, HBRUSH16 hbrush, int nWidth, int nHeight )
/***********************************************************************
* InvertRgn (GDI.42)
*/
BOOL InvertRgn( HDC hdc, HRGN32 hrgn )
BOOL InvertRgn( HDC16 hdc, HRGN32 hrgn )
{
HBRUSH16 prevBrush = SelectObject( hdc, GetStockObject(BLACK_BRUSH) );
WORD prevROP = SetROP2( hdc, R2_NOT );
......
......@@ -79,8 +79,10 @@ HANDLE16 HOOK_GetHook( INT16 id , HQUEUE16 hQueue )
*/
HOOKPROC16 HOOK_GetProc16( HHOOK hhook )
{
HOOKDATA *data = (HOOKDATA *)USER_HEAP_LIN_ADDR( hhook );
return data ? data->proc : NULL;
HOOKDATA *data;
if (HIWORD(hhook) != HOOK_MAGIC) return NULL;
if (!(data = (HOOKDATA *)USER_HEAP_LIN_ADDR( LOWORD(hhook) ))) return NULL;
return data->proc;
}
......
......@@ -111,7 +111,7 @@ BOOL32 LPtoDP32( HDC32 hdc, LPPOINT32 points, INT32 count )
/***********************************************************************
* SetMapMode (GDI.3)
*/
WORD SetMapMode( HDC hdc, WORD mode )
WORD SetMapMode( HDC16 hdc, WORD mode )
{
WORD prevMode;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
......
......@@ -41,9 +41,6 @@ void MDI_UpdateFrameText(WND *, HWND, BOOL, LPCSTR);
BOOL MDI_AugmentFrameMenu(MDICLIENTINFO*, WND *, HWND);
BOOL MDI_RestoreFrameMenu(WND *, HWND);
void ScrollChildren(HWND , UINT , WPARAM , LPARAM );
void CalcChildScroll(HWND, WORD);
static LONG MDI_ChildActivate(WND* ,HWND );
/* -------- Miscellaneous service functions ----------
......@@ -544,7 +541,7 @@ LONG MDI_ChildActivate(WND *clientPtr, HWND hWndChild)
SendMessage16( prevActiveWnd, WM_NCACTIVATE, FALSE, 0L );
#ifdef WINELIB32
SendMessage32A( prevActiveWnd, WM_MDIACTIVATE, (WPARAM)prevActiveWnd,
SendMessage32A( prevActiveWnd, WM_MDIACTIVATE, (WPARAM32)prevActiveWnd,
(LPARAM)hWndChild);
#else
......@@ -592,13 +589,13 @@ LONG MDI_ChildActivate(WND *clientPtr, HWND hWndChild)
SendMessage16( hWndChild, WM_NCACTIVATE, TRUE, 0L);
if( GetFocus32() == clientInfo->self )
SendMessage16( clientInfo->self, WM_SETFOCUS,
(WPARAM)clientInfo->self, 0L );
(WPARAM16)clientInfo->self, 0L );
else
SetFocus32( clientInfo->self );
}
#ifdef WINELIB32
SendMessage32A( hWndChild, WM_MDIACTIVATE, (WPARAM)hWndChild,
SendMessage32A( hWndChild, WM_MDIACTIVATE, (WPARAM32)hWndChild,
(LPARAM)prevActiveWnd );
#else
SendMessage16( hWndChild, WM_MDIACTIVATE, TRUE,
......@@ -666,8 +663,8 @@ MDIWCL* MDI_BuildWCL(WND* clientWnd, INT16* iTotal)
*/
HBITMAP16 CreateMDIMenuBitmap(void)
{
HDC hDCSrc = CreateCompatibleDC(0);
HDC hDCDest = CreateCompatibleDC(hDCSrc);
HDC16 hDCSrc = CreateCompatibleDC(0);
HDC16 hDCDest = CreateCompatibleDC(hDCSrc);
HBITMAP16 hbClose = LoadBitmap16(0, MAKEINTRESOURCE(OBM_CLOSE) );
HBITMAP16 hbCopy,hb_src,hb_dest;
......@@ -977,7 +974,7 @@ void MDI_UpdateFrameText(WND *frameWnd, HWND hClient, BOOL repaint, LPCSTR lpTit
*
* This function is the handler for all MDI requests.
*/
LRESULT MDIClientWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT MDIClientWndProc(HWND hwnd, UINT message, WPARAM16 wParam, LPARAM lParam)
{
LPCREATESTRUCT16 cs;
LPCLIENTCREATESTRUCT16 ccs;
......@@ -1197,7 +1194,8 @@ LRESULT DefFrameProc16( HWND16 hwnd, HWND16 hwndMDIClient, UINT16 message,
childHwnd = MDI_GetChildByID( WIN_FindWndPtr(hwndMDIClient),
wParam );
if( childHwnd )
SendMessage16(hwndMDIClient, WM_MDIACTIVATE, (WPARAM)childHwnd , 0L);
SendMessage16(hwndMDIClient, WM_MDIACTIVATE,
(WPARAM16)childHwnd , 0L);
}
break;
......@@ -1341,7 +1339,7 @@ LRESULT DefMDIChildProc16( HWND16 hwnd, UINT16 message,
return 0;
case WM_CLOSE:
SendMessage16(ci->self,WM_MDIDESTROY,(WPARAM)hwnd,0L);
SendMessage16(ci->self,WM_MDIDESTROY,(WPARAM16)hwnd,0L);
return 0;
case WM_SETFOCUS:
......@@ -1446,7 +1444,7 @@ LRESULT DefMDIChildProc16( HWND16 hwnd, UINT16 message,
/* MDI children don't have menu bars */
PostMessage( clientWnd->parent->hwndSelf, WM_SYSCOMMAND,
(WPARAM)SC_KEYMENU, (LPARAM)wParam);
(WPARAM16)SC_KEYMENU, (LPARAM)wParam);
return 0x00010000L;
case WM_NEXTMENU:
......@@ -1500,7 +1498,7 @@ LRESULT DefMDIChildProc32A( HWND32 hwnd, UINT32 message,
/* MDI children don't have menu bars */
PostMessage( clientWnd->parent->hwndSelf, WM_SYSCOMMAND,
(WPARAM)SC_KEYMENU, (LPARAM)LOWORD(wParam) );
(WPARAM16)SC_KEYMENU, (LPARAM)LOWORD(wParam) );
return 0x00010000L;
case WM_CLOSE:
......@@ -1564,7 +1562,7 @@ BOOL TranslateMDISysAccel(HWND hwndClient, LPMSG16 msg)
WND* clientWnd = WIN_FindWndPtr( hwndClient);
WND* wnd;
MDICLIENTINFO *ci = NULL;
WPARAM wParam = 0;
WPARAM16 wParam = 0;
if( (msg->message != WM_KEYDOWN && msg->message != WM_SYSKEYDOWN) || !clientWnd )
return 0;
......@@ -1651,7 +1649,7 @@ void CalcChildScroll( HWND hwnd, WORD scroll )
/***********************************************************************
* ScrollChildren (USER.463)
*/
void ScrollChildren(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
void ScrollChildren(HWND hWnd, UINT uMsg, WPARAM16 wParam, LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hWnd);
short newPos=-1;
......
......@@ -36,7 +36,7 @@
typedef enum { SYSQ_MSG_ABANDON, SYSQ_MSG_SKIP, SYSQ_MSG_ACCEPT } SYSQ_STATUS;
extern WPARAM lastEventChar; /* event.c */
extern WPARAM16 lastEventChar; /* event.c */
extern BOOL MouseButtonsStates[3];
extern BOOL AsyncMouseButtonsStates[3];
extern BYTE KeyStateTable[256];
......@@ -146,7 +146,7 @@ static SYSQ_STATUS MSG_TranslateMouseMsg( MSG16 *msg, BOOL remove )
/* Send the WM_SETCURSOR message */
SendMessage16( msg->hwnd, WM_SETCURSOR, (WPARAM)msg->hwnd,
SendMessage16( msg->hwnd, WM_SETCURSOR, (WPARAM16)msg->hwnd,
MAKELONG( hittest, msg->message ));
if (eatMsg) return SYSQ_MSG_SKIP;
......@@ -295,7 +295,7 @@ static void MSG_JournalRecordMsg( MSG16 *msg )
/*****************************************************************
* MSG_JournalPlayBackIsAscii
*/
static BOOL MSG_JournalPlayBackIsAscii(WPARAM wParam)
static BOOL MSG_JournalPlayBackIsAscii(WPARAM16 wParam)
{
return ((wParam>VK_HELP && wParam<VK_F1) ||
wParam == VK_SPACE ||
......@@ -494,7 +494,7 @@ WORD GetDoubleClickTime()
* Implementation of an inter-task SendMessage.
*/
static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam )
WPARAM16 wParam, LPARAM lParam )
{
INT32 prevSMRL = debugSMRL;
QSMCTRL qCtrl = { 0, 1};
......@@ -956,6 +956,7 @@ LRESULT SendMessage16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPARAM lParam)
msg = pmsg->wMsg;
wParam = pmsg->wParam;
lParam = pmsg->lParam;
SEGPTR_FREE( pmsg );
}
}
......
......@@ -18,7 +18,7 @@ typedef struct {
WORD type;
} MSGBOX, *LPMSGBOX;
LRESULT SystemMessageBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
LRESULT SystemMessageBoxProc(HWND hwnd,UINT message,WPARAM16 wParam,LPARAM lParam)
{
LPMSGBOX lpmb;
RECT16 rect, textrect;
......@@ -65,20 +65,20 @@ LRESULT SystemMessageBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
switch(lpmb->type & MB_ICONMASK) {
case MB_ICONEXCLAMATION:
SendDlgItemMessage16(hwnd, stc1, STM_SETICON,
(WPARAM)LoadIcon16(0, IDI_EXCLAMATION), 0);
(WPARAM16)LoadIcon16(0, IDI_EXCLAMATION), 0);
break;
case MB_ICONQUESTION:
SendDlgItemMessage16(hwnd, stc1, STM_SETICON,
(WPARAM)LoadIcon16(0, IDI_QUESTION), 0);
(WPARAM16)LoadIcon16(0, IDI_QUESTION), 0);
break;
case MB_ICONASTERISK:
SendDlgItemMessage16(hwnd, stc1, STM_SETICON,
(WPARAM)LoadIcon16(0, IDI_ASTERISK), 0);
(WPARAM16)LoadIcon16(0, IDI_ASTERISK), 0);
break;
case MB_ICONHAND:
default:
SendDlgItemMessage16(hwnd, stc1, STM_SETICON,
(WPARAM)LoadIcon16(0, IDI_HAND), 0);
(WPARAM16)LoadIcon16(0, IDI_HAND), 0);
break;
}
......
......@@ -431,10 +431,10 @@ LONG NC_HandleNCHitTest( HWND hwnd, POINT16 pt )
/***********************************************************************
* NC_DrawSysButton
*/
void NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down )
void NC_DrawSysButton( HWND hwnd, HDC16 hdc, BOOL down )
{
RECT16 rect;
HDC hdcMem;
HDC16 hdcMem;
HBITMAP16 hbitmap;
WND *wndPtr = WIN_FindWndPtr( hwnd );
......@@ -455,7 +455,7 @@ void NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down )
/***********************************************************************
* NC_DrawMaxButton
*/
static void NC_DrawMaxButton( HWND hwnd, HDC hdc, BOOL down )
static void NC_DrawMaxButton( HWND hwnd, HDC16 hdc, BOOL down )
{
RECT16 rect;
WND *wndPtr = WIN_FindWndPtr( hwnd );
......@@ -475,7 +475,7 @@ static void NC_DrawMaxButton( HWND hwnd, HDC hdc, BOOL down )
/***********************************************************************
* NC_DrawMinButton
*/
static void NC_DrawMinButton( HWND hwnd, HDC hdc, BOOL down )
static void NC_DrawMinButton( HWND hwnd, HDC16 hdc, BOOL down )
{
RECT16 rect;
WND *wndPtr = WIN_FindWndPtr( hwnd );
......@@ -497,7 +497,7 @@ static void NC_DrawMinButton( HWND hwnd, HDC hdc, BOOL down )
* Draw a window frame inside the given rectangle, and update the rectangle.
* The correct pen for the frame must be selected in the DC.
*/
static void NC_DrawFrame( HDC hdc, RECT16 *rect, BOOL dlgFrame, BOOL active )
static void NC_DrawFrame( HDC16 hdc, RECT16 *rect, BOOL dlgFrame, BOOL active )
{
short width, height, tmp;
......@@ -573,7 +573,7 @@ static void NC_DrawFrame( HDC hdc, RECT16 *rect, BOOL dlgFrame, BOOL active )
*
* Draw the frame used when moving or resizing window.
*/
static void NC_DrawMovingFrame( HDC hdc, RECT16 *rect, BOOL thickframe )
static void NC_DrawMovingFrame( HDC16 hdc, RECT16 *rect, BOOL thickframe )
{
if (thickframe)
{
......@@ -600,7 +600,7 @@ static void NC_DrawMovingFrame( HDC hdc, RECT16 *rect, BOOL thickframe )
* Draw the window caption.
* The correct pen for the window frame must be selected in the DC.
*/
static void NC_DrawCaption( HDC hdc, RECT16 *rect, HWND hwnd,
static void NC_DrawCaption( HDC16 hdc, RECT16 *rect, HWND hwnd,
DWORD style, BOOL active )
{
RECT16 r = *rect;
......@@ -778,7 +778,7 @@ LONG NC_HandleNCPaint( HWND hwnd , HRGN32 clip)
*
* Handle a WM_NCACTIVATE message. Called from DefWindowProc().
*/
LONG NC_HandleNCActivate( WND *wndPtr, WPARAM wParam )
LONG NC_HandleNCActivate( WND *wndPtr, WPARAM16 wParam )
{
WORD wStateChange;
......@@ -804,7 +804,7 @@ LONG NC_HandleNCActivate( WND *wndPtr, WPARAM wParam )
*
* Handle a WM_SETCURSOR message. Called from DefWindowProc().
*/
LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam )
LONG NC_HandleSetCursor( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{
if (hwnd != (HWND)wParam) return 0; /* Don't set the cursor for child windows */
......@@ -873,7 +873,7 @@ BOOL NC_GetSysPopupPos( WND* wndPtr, RECT16* rect )
*
* Track a mouse button press on the system menu.
*/
static void NC_TrackSysMenu( HWND hwnd, HDC hdc, POINT16 pt )
static void NC_TrackSysMenu( HWND hwnd, HDC16 hdc, POINT16 pt )
{
RECT16 rect;
WND *wndPtr = WIN_FindWndPtr( hwnd );
......@@ -906,7 +906,7 @@ static void NC_TrackSysMenu( HWND hwnd, HDC hdc, POINT16 pt )
* Initialisation of a move or resize, when initiatied from a menu choice.
* Return hit test code for caption or sizing border.
*/
static LONG NC_StartSizeMove( HWND hwnd, WPARAM wParam, POINT16 *capturePoint )
static LONG NC_StartSizeMove( HWND hwnd, WPARAM16 wParam, POINT16 *capturePoint )
{
LONG hittest = 0;
POINT16 pt;
......@@ -979,7 +979,7 @@ static LONG NC_StartSizeMove( HWND hwnd, WPARAM wParam, POINT16 *capturePoint )
}
*capturePoint = pt;
SetCursorPos( capturePoint->x, capturePoint->y );
NC_HandleSetCursor( hwnd, (WPARAM)hwnd, MAKELONG( hittest, WM_MOUSEMOVE ));
NC_HandleSetCursor( hwnd, (WPARAM16)hwnd, MAKELONG( hittest, WM_MOUSEMOVE ));
return hittest;
}
......@@ -1278,7 +1278,7 @@ static void NC_TrackScrollBar( HWND32 hwnd, WPARAM32 wParam, POINT32 pt )
*
* Handle a WM_NCLBUTTONDOWN message. Called from DefWindowProc().
*/
LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{
HDC32 hdc;
......@@ -1334,7 +1334,7 @@ LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
*
* Handle a WM_NCLBUTTONDBLCLK message. Called from DefWindowProc().
*/
LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM wParam, LPARAM lParam )
LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM16 wParam, LPARAM lParam )
{
/*
* if this is an icon, send a restore since we are handling
......@@ -1370,7 +1370,7 @@ LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM wParam, LPARAM lParam )
*
* Handle a WM_SYSCOMMAND message. Called from DefWindowProc().
*/
LONG NC_HandleSysCommand( HWND hwnd, WPARAM wParam, POINT16 pt )
LONG NC_HandleSysCommand( HWND hwnd, WPARAM16 wParam, POINT16 pt )
{
WND *wndPtr = WIN_FindWndPtr( hwnd );
POINT32 pt32;
......
......@@ -133,7 +133,7 @@ HDC16 BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
wndPtr->flags &= ~WIN_NEEDS_ERASEBKGND;
lps->fErase = !SendMessage16(hwnd, (bIcon) ? WM_ICONERASEBKGND
: WM_ERASEBKGND,
(WPARAM)lps->hdc, 0 );
(WPARAM16)lps->hdc, 0 );
}
else lps->fErase = TRUE;
......@@ -208,7 +208,7 @@ void PaintRect( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc,
if (!hwndParent) return;
hbrush = (HBRUSH16)SendMessage32A( hwndParent,
WM_CTLCOLORMSGBOX + (UINT32)hbrush,
(WPARAM)hdc, (LPARAM)hwnd );
(WPARAM32)hdc, (LPARAM)hwnd );
}
if (hbrush) FillRect16( hdc, rect, hbrush );
}
......@@ -217,10 +217,10 @@ void PaintRect( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc,
/***********************************************************************
* GetControlBrush (USER.326)
*/
HBRUSH16 GetControlBrush( HWND hwnd, HDC hdc, WORD control )
HBRUSH16 GetControlBrush( HWND hwnd, HDC16 hdc, WORD control )
{
return (HBRUSH16)SendMessage32A( GetParent32(hwnd), WM_CTLCOLOR+control,
(WPARAM)hdc, (LPARAM)hwnd );
(WPARAM32)hdc, (LPARAM)hwnd );
}
......@@ -379,7 +379,7 @@ BOOL32 PAINT_RedrawWindow( HWND32 hwnd, const RECT32 *rectUpdate,
{
if (SendMessage16( hwnd, (bIcon) ? WM_ICONERASEBKGND
: WM_ERASEBKGND,
(WPARAM)hdc, 0 ))
(WPARAM16)hdc, 0 ))
wndPtr->flags &= ~WIN_NEEDS_ERASEBKGND;
ReleaseDC32( hwnd, hdc );
}
......
......@@ -101,7 +101,7 @@ void ScrollWindow(HWND hwnd, short dx, short dy, LPRECT16 rect, LPRECT16 clipRec
* ScrollDC (USER.221)
*
*/
BOOL ScrollDC(HDC hdc, short dx, short dy, LPRECT16 rc, LPRECT16 cliprc,
BOOL ScrollDC(HDC16 hdc, short dx, short dy, LPRECT16 rc, LPRECT16 cliprc,
HRGN32 hrgnUpdate, LPRECT16 rcUpdate)
{
HRGN32 hrgnClip = 0;
......
......@@ -2016,7 +2016,7 @@ BOOL FlashWindow(HWND hWnd, BOOL bInvert)
{
HDC32 hDC = GetDC32(hWnd);
if (!SendMessage16( hWnd, WM_ERASEBKGND, (WPARAM)hDC, (LPARAM)0 ))
if (!SendMessage16( hWnd, WM_ERASEBKGND, (WPARAM16)hDC, 0 ))
wndPtr->flags |= WIN_NEEDS_ERASEBKGND;
ReleaseDC32( hWnd, hDC );
......@@ -2032,7 +2032,7 @@ BOOL FlashWindow(HWND hWnd, BOOL bInvert)
}
else
{
WPARAM wparam;
WPARAM16 wparam;
if (bInvert) wparam = !(wndPtr->flags & WIN_NCACTIVATED);
else wparam = (hWnd == GetActiveWindow());
......@@ -2126,7 +2126,7 @@ BOOL DRAG_QueryUpdate( HWND hQueryWnd, SEGPTR spDragInfo )
ptrDragInfo->hScope = hQueryWnd;
bResult = SendMessage16( hQueryWnd ,WM_QUERYDROPOBJECT ,
(WPARAM)wParam ,(LPARAM) spDragInfo );
(WPARAM16)wParam ,(LPARAM) spDragInfo );
if( !bResult )
ptrDragInfo->pt = pt;
......@@ -2257,7 +2257,7 @@ DWORD DragObject(HWND hwndScope, HWND hWnd, WORD wObj, HANDLE16 hOfStruct,
dprintf_msg(stddeb,"drag: got %04x\n",btemp);
/* send WM_DRAGLOOP */
SendMessage16( hWnd, WM_DRAGLOOP, (WPARAM)(hCurrentCursor != hBummer) ,
SendMessage16( hWnd, WM_DRAGLOOP, (WPARAM16)(hCurrentCursor != hBummer) ,
(LPARAM) spDragInfo );
/* send WM_DRAGSELECT or WM_DRAGMOVE */
if( hCurrentWnd != lpDragInfo->hScope )
......@@ -2292,7 +2292,7 @@ DWORD DragObject(HWND hwndScope, HWND hWnd, WORD wObj, HANDLE16 hOfStruct,
if( hCurrentCursor != hBummer )
dwRet = SendMessage16( lpDragInfo->hScope, WM_DROPOBJECT,
(WPARAM)hWnd, (LPARAM)spDragInfo );
(WPARAM16)hWnd, (LPARAM)spDragInfo );
GlobalFree16(hDragInfo);
return dwRet;
......
......@@ -962,7 +962,7 @@ BOOL32 WINPOS_SetActiveWindow( HWND32 hWnd, BOOL32 fMouse, BOOL32 fChangeFocus)
LRESULT wRet;
cbtStruct->fMouse = fMouse;
cbtStruct->hWndActive = hwndActive;
wRet = HOOK_CallHooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hWnd,
wRet = HOOK_CallHooks( WH_CBT, HCBT_ACTIVATE, (WPARAM16)hWnd,
(LPARAM)SEGPTR_GET(cbtStruct) );
SEGPTR_FREE(cbtStruct);
if (wRet) return wRet;
......@@ -990,7 +990,7 @@ BOOL32 WINPOS_SetActiveWindow( HWND32 hWnd, BOOL32 fMouse, BOOL32 fChangeFocus)
/* send palette messages */
if (hWnd && SendMessage16( hWnd, WM_QUERYNEWPALETTE, 0, 0L))
SendMessage16((HWND16)-1, WM_PALETTEISCHANGING, (WPARAM)hWnd, 0L );
SendMessage16((HWND16)-1, WM_PALETTEISCHANGING, (WPARAM16)hWnd, 0L );
/* if prev wnd is minimized redraw icon title
if( hwndPrevActive )
......
......@@ -69,13 +69,14 @@ Enter the debugger before starting application
Turn debugging messages on or off - for instance,
.I -debugmsg +dll,+heap
will turn on DLL and heap debugging messages. The full list is:
all, accel, bitblt, bitmap, caret, catch, cdaudio, class, clipboard, clipping,
combo, comm, cursor, dc, dialog, dll, dosfs, driver, edit, enum, event, exec,
file, fixup, font, gdi, global, graphics, icon, int, key, keyboard, ldt,
listbox, local, malloc, mci, mcianim, mciwave, mdi, menu, menucalc, message,
metafile, midi, mmio, mmsys, mmtime, module, msg, nonclient, ole, palette,
profile, prop, reg, region, relay, resource, scroll, selector, selectors,
stress, syscolor, task, text, timer, toolhelp, utility, win, winsock.
all, accel, atom, bitblt, bitmap, caret, cdaudio, class, clipboard, clipping,
combo, comm, commdlg, crtdll, cursor, dc, dde, dialog, dll, dosfs, driver, edit,
env, event, exec, file, fixup, font, gdi, global, graphics, heap, hook, icon,
int, key, keyboard, ldt, listbox, local, mci, mcianim, mciwave, mdi, menu,
message, metafile, midi, mmio, mmsys, mmtime, module, msg, nonclient, ole,
palette, profile, prop, reg, region, relay, resource, scroll, selector,
sem, sendmsg, shm, stress, syscolor, task, text, timer, toolhelp, ver, vxd, win,
win32, winsock.
.TP
.I -depth n
Change the depth to use for multiple-depth screens
......@@ -91,9 +92,11 @@ Enables/disables built-in DLL's - starting wine with
.I -dll -commdlg
is probably a good idea.
The full list of DLLs modifiable by this is:
KERNEL, USER, GDI, WIN87EM, SHELL, SOUND, KEYBOARD, WINSOCK, STRESS, MMSYSTEM,
SYSTEM, TOOLHELP, MOUSE, COMMDLG, OLE2, OLE2CONV, OLE2DISP, OLE2NLS, OLE2PROX,
OLECLI, OLESVR, COMPOBJ, STORAGE, WINPROCS, DDEML
WIN87EM, SHELL, SOUND, KEYBOARD, WINSOCK, STRESS, MMSYSTEM, SYSTEM, TOOLHELP,
MOUSE, COMMDLG, OLE2, OLE2CONV, OLE2DISP, OLE2NLS, OLE2PROX, OLECLI, OLESVR,
COMPOBJ, STORAGE, WINPROCS, DDEML, ADVAPI32, COMCTL32, COMDLG32, CRTDLL,
GDI32, LZ32, MPR, NTDLL, OLE32, SHELL32, USER32, VER, VERSION, W32SYS, WINMM,
WINSPOOL, WSOCK32
.TP
.I -fixedmap
Use a "standard" color map.
......@@ -126,6 +129,10 @@ Use a private color map
.TP
.I -synchronous
Turn on synchronous display mode
.TP
.I -winver version
Specify which Windows version WINE should imitate.
Possible arguments are: win31, win95 and nt351.
.PD 1
.SH PROGRAM/ARGUMENTS
The program name may be specified in DOS format (C:\\WINDOWS\\SOL.EXE) or in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment