Commit 7d654eb2 authored by Alexandre Julliard's avatar Alexandre Julliard

Release 960225

Sat Feb 24 16:17:05 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [files/profile.c] Added \r when writing profile files, for DOS compatibility. * [memory/global.c] Fixed bug in GlobalReAlloc() that caused a discarded block not to be reallocated if its size was not changed. * [memory/selector.c] Avoid setting a valid LDT entry with base and limit set to 0, as this causes the kernel to clear the entry. This fixes a crash when exiting Windows program manager. * [objects/metafile.c] Removed call to creat() instead of _lcreat() for WINELIB. Fri Feb 23 00:35:54 1996 Thomas Sandford <tdgsandf@prds-grn.demon.co.uk> * [if1632/gdi32.spec] GetTextExtentPointA now has win32 specific implementation. * [include/struct32.h] Define new structure tagSIZE32 and typedef SIZE32 to it. Define prototype for function PARAM32_SIZE16to32 * [win32/param32.c] New functions PARAM32_SIZE16to32 and WIN32_GetTextExtentPointA * [win32/memory.c] Added missing file pointer parameter to fprintf. Thu Feb 22 01:14:21 1996 Eric Warnke <ew2193@csc.albany.edu> * [windows/nonclient.c] Added more familiar icon activity, ie single click brings up system menu. Wed Feb 21 13:07:04 1996 Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl> * [controls/menu.c] Added calls to HideCaret() and ShowCaret() from within TrackPopupMenu(), MENU_TrackMouseMenuBar() and MENU_TrackKbdMenuBar(). Are there any more places where this should be done? * [controls/static.c] Fixed a FIXME in STATIC_SetIcon(), which now returns a handle to the previous icon. Added a new FIXME at the point where WM_SETTEXT is handled for a SS_ICON static control. * [misc/commdlg.c] Implemented FindText() and ReplaceText() Still missing : Templates and Hooks handling / error checking * [resources/sysres_En.c] Redesigned FIND_TEXT and REPLACE_TEXT dialogs, so they now work. Languages other than En should update these too, though, as well as redimension the controls because some of the text doesn't fit. Created file resources/TODO to explain this. * [windows/caret.c] Re-written. It now uses the correct R2_XORPEN. It resets the blink timer on SetCaretPos(). It does its own hide/show scheme when SetCaretPos() is called (should be faster). Mon Feb 19 21:50:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Miscellaneous changes for better LBS_EXTENDEDSEL support. Removed several superfluous redrawals of item list. * [controls/scroll.c] WM_GETDLGCODE return value. * [windows/win.c] FlashWindow function. * [windows/painting.c] [windows/scroll.c] Added HideCaret/ShowCaret calls. * [objects/font.c] Added GetCharABCWidths stub. * [include/windows.h] "#define"s needed for changes mentioned above. Mon Feb 19 20:12:03 1996 Hans de Graaff <Hans.deGraaff@twi72.twi.tudelft.nl> * [include/winsock.h] Change order of includes to get in_addr struct defined in time. (Note: Linux 1.3.66, libc 5.2.18) * [misc/main.c] [include/options.h] [miscemu/int2f.c] Changed the -enhanced option into a -mode option, which can be either 'standard' or 'enhanced'. 'enhanced' is the default.
parent 0c126c7c
This is release 960218 of Wine the MS Windows emulator. This is still a
This is release 960225 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.
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
forget to include a ChangeLog entry.
WHAT'S NEW with Wine-960218: (see ChangeLog for details)
- Lots of edit control fixes.
- Czech language support.
- As usual, more Win32 code.
WHAT'S NEW with Wine-960225: (see ChangeLog for details)
- Many caret fixes.
- New -mode option to replace -enhanced.
- Many listboxes improvements.
- Find and Replace dialogs in built-in COMMDLG fixed.
- Lots of bug fixes.
See the README file in the distribution for installation instructions.
......@@ -17,19 +18,21 @@ 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:
sunsite.unc.edu:/pub/Linux/ALPHA/wine/Wine-960218.tar.gz
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-960218.tar.gz
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-960218.tar.gz
aris.com:/pub/linux/ALPHA/Wine/development/Wine-960218.tar.gz
sunsite.unc.edu:/pub/Linux/ALPHA/wine/development/Wine-960225.tar.gz
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-960225.tar.gz
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-960225.tar.gz
aris.com:/pub/linux/ALPHA/Wine/development/Wine-960225.tar.gz
It should also be available from any site that mirrors tsx-11 or sunsite.
If you submitted a patch, please check to make sure it has been
included in the new release.
New developers should read the info files available from the ftp sites.
The files NEWBIE-PROJECTS, DEVELOPERS-HINTS and Wine.FAQ are required
reading for new developers.
If you want to get the new releases faster, you can subscribe to the
wine-patches mailing list by sending a mail containing 'subscribe
wine-patches your_address' to majordomo@tiger.informatik.hu-berlin.de.
To avoid overloading the mail host, please subscribe only if you
really intend to test the new releases as soon as they're out.
Wine is available thanks to the work of Bob Amstadt, Dag Asheim,
Martin Ayotte, Ross Biro, Erik Bos, Fons Botman, John Brezak,
......
----------------------------------------------------------------------
Sat Feb 24 16:17:05 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/profile.c]
Added \r when writing profile files, for DOS compatibility.
* [memory/global.c]
Fixed bug in GlobalReAlloc() that caused a discarded block not to
be reallocated if its size was not changed.
* [memory/selector.c]
Avoid setting a valid LDT entry with base and limit set to 0, as
this causes the kernel to clear the entry. This fixes a crash when
exiting Windows program manager.
* [objects/metafile.c]
Removed call to creat() instead of _lcreat() for WINELIB.
Fri Feb 23 00:35:54 1996 Thomas Sandford <tdgsandf@prds-grn.demon.co.uk>
* [if1632/gdi32.spec]
GetTextExtentPointA now has win32 specific implementation.
* [include/struct32.h]
Define new structure tagSIZE32 and typedef SIZE32 to it.
Define prototype for function PARAM32_SIZE16to32
* [win32/param32.c]
New functions PARAM32_SIZE16to32 and WIN32_GetTextExtentPointA
* [win32/memory.c]
Added missing file pointer parameter to fprintf.
Thu Feb 22 01:14:21 1996 Eric Warnke <ew2193@csc.albany.edu>
* [windows/nonclient.c]
Added more familiar icon activity, ie single click brings up
system menu.
Wed Feb 21 13:07:04 1996 Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl>
* [controls/menu.c]
Added calls to HideCaret() and ShowCaret() from within
TrackPopupMenu(), MENU_TrackMouseMenuBar() and
MENU_TrackKbdMenuBar(). Are there any more places where this
should be done?
* [controls/static.c]
Fixed a FIXME in STATIC_SetIcon(), which now returns a handle to
the previous icon. Added a new FIXME at the point where
WM_SETTEXT is handled for a SS_ICON static control.
* [misc/commdlg.c]
Implemented FindText() and ReplaceText()
Still missing : Templates and Hooks handling / error checking
* [resources/sysres_En.c]
Redesigned FIND_TEXT and REPLACE_TEXT dialogs, so they now work.
Languages other than En should update these too, though, as well
as redimension the controls because some of the text doesn't fit.
Created file resources/TODO to explain this.
* [windows/caret.c]
Re-written. It now uses the correct R2_XORPEN. It resets the
blink timer on SetCaretPos(). It does its own hide/show scheme
when SetCaretPos() is called (should be faster).
Mon Feb 19 21:50:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Miscellaneous changes for better LBS_EXTENDEDSEL support.
Removed several superfluous redrawals of item list.
* [controls/scroll.c]
WM_GETDLGCODE return value.
* [windows/win.c]
FlashWindow function.
* [windows/painting.c] [windows/scroll.c]
Added HideCaret/ShowCaret calls.
* [objects/font.c]
Added GetCharABCWidths stub.
* [include/windows.h]
"#define"s needed for changes mentioned above.
Mon Feb 19 20:12:03 1996 Hans de Graaff <Hans.deGraaff@twi72.twi.tudelft.nl>
* [include/winsock.h]
Change order of includes to get in_addr struct defined in time.
(Note: Linux 1.3.66, libc 5.2.18)
* [misc/main.c] [include/options.h] [miscemu/int2f.c]
Changed the -enhanced option into a -mode option, which can be
either 'standard' or 'enhanced'. 'enhanced' is the default.
----------------------------------------------------------------------
Sun Feb 18 16:35:54 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [controls/desktop.c]
......
......@@ -1609,11 +1609,13 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, int x, int y,
void MENU_TrackMouseMenuBar( HWND hwnd, POINT pt )
{
WND *wndPtr = WIN_FindWndPtr( hwnd );
HideCaret(0);
SendMessage( hwnd, WM_ENTERMENULOOP, 0, 0 );
SendMessage( hwnd, WM_INITMENU, wndPtr->wIDmenu, 0 );
MENU_TrackMenu( (HMENU)wndPtr->wIDmenu, TPM_LEFTALIGN | TPM_LEFTBUTTON,
pt.x, pt.y, hwnd, NULL );
SendMessage( hwnd, WM_EXITMENULOOP, 0, 0 );
ShowCaret(0);
}
......@@ -1626,6 +1628,7 @@ void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam )
{
WND *wndPtr = WIN_FindWndPtr( hwnd );
if (!wndPtr->wIDmenu) return;
HideCaret(0);
SendMessage( hwnd, WM_ENTERMENULOOP, 0, 0 );
SendMessage( hwnd, WM_INITMENU, wndPtr->wIDmenu, 0 );
/* Select first selectable item */
......@@ -1634,6 +1637,7 @@ void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam )
MENU_TrackMenu( (HMENU)wndPtr->wIDmenu, TPM_LEFTALIGN | TPM_LEFTBUTTON,
0, 0, hwnd, NULL );
SendMessage( hwnd, WM_EXITMENULOOP, 0, 0 );
ShowCaret(0);
}
......@@ -1643,8 +1647,14 @@ void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam )
BOOL TrackPopupMenu( HMENU hMenu, UINT wFlags, short x, short y,
short nReserved, HWND hWnd, LPRECT lpRect )
{
if (!MENU_ShowPopup( hWnd, hMenu, 0, x, y )) return FALSE;
return MENU_TrackMenu( hMenu, wFlags, 0, 0, hWnd, lpRect );
BOOL ret;
HideCaret(0);
if (!MENU_ShowPopup( hWnd, hMenu, 0, x, y ))
ret = FALSE;
else
ret = MENU_TrackMenu( hMenu, wFlags, 0, 0, hWnd, lpRect );
ShowCaret(0);
return ret;
}
......
......@@ -812,7 +812,10 @@ LONG ScrollBarWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
break;
case WM_ERASEBKGND:
break;
return 1;
case WM_GETDLGCODE:
return DLGC_WANTARROWS; /* Windows returns this value */
case WM_PAINT:
{
......@@ -823,6 +826,13 @@ LONG ScrollBarWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
}
break;
case 0x400: /* SB_SETSCROLLPOS */
case 0x401: /* SB_GETSCROLLPOS */
case 0x402: /* SB_GETSCROLLRANGE */
case 0x403: /* SB_ENABLE */
case 0x404: /* SB_REDRAW */
fprintf(stdnimp,"ScrollBarWndProc: undocumented message %04x, please report\n", message );
default:
return DefWindowProc( hwnd, message, wParam, lParam );
}
......
......@@ -49,14 +49,14 @@ static pfPaint staticPaintFunc[LAST_STATIC_TYPE+1] =
*
* Set the icon for an SS_ICON control.
*/
static void STATIC_SetIcon( HWND hwnd, HICON hicon )
static HICON STATIC_SetIcon( HWND hwnd, HICON hicon )
{
HICON prevIcon;
WND *wndPtr = WIN_FindWndPtr( hwnd );
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
if ((wndPtr->dwStyle & 0x0f) != SS_ICON) return;
/* FIXME: is this OK?
if (infoPtr->hIcon) DestroyIcon( infoPtr->hIcon ); */
if ((wndPtr->dwStyle & 0x0f) != SS_ICON) return 0;
prevIcon = infoPtr->hIcon;
infoPtr->hIcon = hicon;
if (hicon)
{
......@@ -65,6 +65,7 @@ static void STATIC_SetIcon( HWND hwnd, HICON hicon )
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
GlobalUnlock( hicon );
}
return prevIcon;
}
......@@ -114,7 +115,7 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_NCDESTROY:
if (style == SS_ICON)
STATIC_SetIcon( hWnd, 0 ); /* Destroy the current icon */
DestroyIcon( STATIC_SetIcon( hWnd, 0 ) );
else
lResult = DefWindowProc(hWnd, uMsg, wParam, lParam);
break;
......@@ -138,6 +139,7 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_SETTEXT:
if (style == SS_ICON)
/* FIXME : should we also return the previous hIcon here ??? */
STATIC_SetIcon( hWnd, LoadIcon( wndPtr->hInstance,
(SEGPTR)lParam ));
else
......@@ -169,10 +171,10 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return (LONG)infoPtr->hIcon;
case STM_SETICON:
STATIC_SetIcon( hWnd, (HICON)wParam );
lResult = (LONG)STATIC_SetIcon( hWnd, (HICON)wParam );
InvalidateRect( hWnd, NULL, FALSE );
UpdateWindow( hWnd );
return 0;
break;
default:
lResult = DefWindowProc(hWnd, uMsg, wParam, lParam);
......
......@@ -110,12 +110,12 @@ static void PROFILE_Save( FILE *file, PROFILESECTION *section )
for ( ; section; section = section->next)
{
if (section->name) fprintf( file, "[%s]\n", section->name );
if (section->name) fprintf( file, "[%s]\r\n", section->name );
for (key = section->key; key; key = key->next)
{
fprintf( file, "%s", key->name );
if (key->value) fprintf( file, "=%s", key->value );
fprintf( file, "\n" );
fprintf( file, "\r\n" );
}
}
}
......
......@@ -215,7 +215,7 @@ id 3
304 stub ENGINESETFONTCONTEXT
305 stub ENGINEGETGLYPHBMP
306 stub ENGINEMAKEFONTDIR
307 stub GetCharABCWidths
307 pascal16 GetCharABCWidths(word word word ptr) GetCharABCWidths
308 stub GetOutLineTextMetrics
309 pascal GetGlyphOutLine(word word word ptr long ptr ptr) GetGlyphOutLine
310 pascal16 CreateScalableFontResource(word ptr ptr ptr) CreateScalableFontResource
......
......@@ -233,7 +233,7 @@ base 1
0229 stub GetTextExtentExPointW
0230 stub GetTextExtentPoint32A
0231 stub GetTextExtentPoint32W
0232 stdcall GetTextExtentPointA(long ptr long ptr) GetTextExtentPoint
0232 stdcall GetTextExtentPointA(long ptr long ptr) WIN32_GetTextExtentPointA
0233 stub GetTextExtentPointW
0234 stub GetTextFaceA
0235 stub GetTextFaceW
......
......@@ -20,6 +20,13 @@ typedef enum
LANG_Cz /* Czech */
} WINE_LANGUAGE;
/* Supported modes */
typedef enum
{
MODE_STANDARD,
MODE_ENHANCED
} WINE_MODE;
struct options
{
char * desktopGeometry; /* NULL when no desktop */
......@@ -32,7 +39,8 @@ struct options
int debug;
int allowReadOnly; /* Opening a read only file will succeed even
if write access is requested */
int enhanced; /* Start Wine in enhanced mode */
WINE_MODE mode; /* Start Wine in selected mode
(standard/enhanced) */
int ipc; /* Use IPC mechanisms */
WINE_LANGUAGE language; /* Current language */
int managed; /* Managed windows */
......
......@@ -19,8 +19,15 @@ typedef struct tagPOINT32
LONG y;
} POINT32;
typedef struct tagSIZE32
{
LONG cx;
LONG cy;
} SIZE32;
void PARAM32_POINT32to16(const POINT32*,POINT*);
void PARAM32_POINT16to32(const POINT*,POINT32*);
void PARAM32_SIZE16to32(const SIZE* p16, SIZE32* p32);
typedef struct {
DWORD style;
......
......@@ -240,7 +240,7 @@ typedef struct tagTIMERINFO {
DWORD dwmsThisVM;
} TIMERINFO;
BOOL TimerInfo( TIMERINFO *pTimerInfo );
BOOL TimerCount( TIMERINFO *pTimerInfo );
/* Window classes */
......
......@@ -689,6 +689,14 @@ typedef struct tagTEXTMETRIC
#define ETO_OPAQUE 0x02
#define ETO_CLIPPED 0x04
/* for GetCharABCWidths() */
typedef struct tagABC
{
INT abcA;
UINT abcB;
INT abcC;
} ABC, *LPABC;
/* Rasterizer status */
typedef struct
{
......@@ -1999,6 +2007,8 @@ typedef struct tagDRAGINFO {
#define LB_GETITEMDATA (WM_USER+26)
#define LB_SETITEMDATA (WM_USER+27)
#define LB_SELITEMRANGE (WM_USER+28)
#define LB_SETANCHORINDEX (WM_USER+29) /* undoc. - for LBS_EXTENDEDSEL */
#define LB_GETANCHORINDEX (WM_USER+30) /* - * - */
#define LB_SETCARETINDEX (WM_USER+31)
#define LB_GETCARETINDEX (WM_USER+32)
#define LB_SETITEMHEIGHT (WM_USER+33)
......@@ -2794,6 +2804,7 @@ BOOL GetBrushOrgEx(HDC,LPPOINT);
HWND GetCapture(void);
WORD GetCaretBlinkTime(void);
void GetCaretPos(LPPOINT);
BOOL GetCharABCWidths(HDC,UINT,UINT,LPABC);
BOOL GetCharWidth(HDC,WORD,WORD,LPINT);
BOOL GetClassInfo(HANDLE,SEGPTR,LPWNDCLASS);
LONG GetClassLong(HWND,short);
......
......@@ -7,12 +7,12 @@
#ifndef _WINSOCKAPI_
#define _WINSOCKAPI_
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/time.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include "windows.h"
......
......@@ -35,7 +35,7 @@ rolex: rolex.o $(WINELIB)
$(CC) -o rolex rolex.o $(LDOPTIONS) $(ALL_LIBS)
clean::
$(RM) hello hello2 hello3 hello3res.c hello3res.h hello4 new rolex
$(RM) $(PROGRAMS) hello3res.c hello3res.h
hello3res.c hello3res.h: $(WINERC)
......
......@@ -333,7 +333,7 @@ HGLOBAL GlobalReAlloc( HGLOBAL handle, DWORD size, WORD flags )
ptr = (void *)pArena->base;
oldsize = pArena->size;
dprintf_global(stddeb,"oldsize %08lx\n",oldsize);
if (size == oldsize) return handle; /* Nothing to do */
if (ptr && (size == oldsize)) return handle; /* Nothing to do */
ptr = realloc( ptr, size );
if (!ptr)
......
......@@ -105,8 +105,8 @@ static void SELECTOR_SetEntries( WORD sel, const void *base, DWORD size,
ldt_entry entry;
WORD i, count;
/* The limit for the first selector is the whole */
/* block. The next selectors get a 64k limit. */
/* The limit for the first selector is the whole */
/* block. The next selectors get a 64k limit. */
entry.base = (unsigned long)base;
entry.type = type;
entry.seg_32bit = is32bit;
......@@ -114,6 +114,8 @@ static void SELECTOR_SetEntries( WORD sel, const void *base, DWORD size,
entry.limit_in_pages = (size > 0x100000);
if (entry.limit_in_pages) entry.limit = ((size + 0xfff) >> 12) - 1;
else entry.limit = size - 1;
/* Make sure base and limit are not 0 together if the size is not 0 */
if (!base && !entry.limit && size) entry.limit = 1;
count = (size + 0xffff) / 0x10000;
for (i = 0; i < count; i++)
{
......
......@@ -89,7 +89,7 @@ struct options Options =
SW_SHOWNORMAL, /* cmdShow */
FALSE,
FALSE, /* AllowReadOnly */
FALSE, /* Enhanced mode */
MODE_ENHANCED, /* Enhanced mode */
FALSE, /* IPC enabled */
#ifdef DEFAULT_LANG
DEFAULT_LANG, /* Default language */
......@@ -117,7 +117,7 @@ static XrmOptionDescRec optionsTable[] =
{ "-debugmsg", ".debugmsg", XrmoptionSepArg, (caddr_t)NULL },
{ "-dll", ".dll", XrmoptionSepArg, (caddr_t)NULL },
{ "-allowreadonly", ".allowreadonly", XrmoptionNoArg, (caddr_t)"on" },
{ "-enhanced", ".enhanced", XrmoptionNoArg, (caddr_t)"off"},
{ "-mode", ".mode", XrmoptionSepArg, (caddr_t)NULL },
{ "-managed", ".managed", XrmoptionNoArg, (caddr_t)"off"}
};
......@@ -127,24 +127,23 @@ static XrmOptionDescRec optionsTable[] =
"Usage: %s [options] program_name [arguments]\n" \
"\n" \
"Options:\n" \
" -allowreadonly Read only files may be opened in write mode\n" \
" -backingstore Turn on backing store\n" \
" -debug Enter debugger before starting application\n" \
" -debugmsg name Turn debugging-messages on or off\n" \
" -depth n Change the depth to use for multiple-depth screens\n" \
" -desktop geom Use a desktop window of the given geometry\n" \
" -display name Use the specified display\n" \
" -dll name Enable or disable built-in DLLs\n" \
" -fixedmap Use a \"standard\" color map\n" \
" -iconic Start as an icon\n" \
" -ipc Enable IPC facilities\n" \
" -debug Enter debugger before starting application\n" \
" -language xx Set the language (one of En,Es,De,No,Fr,Fi,Da,Cz)\n" \
" -managed Allow the window manager to manage created windows\n" \
" -mode mode Start Wine in a particular mode (standard or enhanced)\n" \
" -name name Set the application name\n" \
" -privatemap Use a private color map\n" \
" -fixedmap Use a \"standard\" color map\n" \
" -synchronous Turn on synchronous display mode\n" \
" -backingstore Turn on backing store\n" \
" -spy file Obsolete. Use -debugmsg +message for messages\n" \
" -debugmsg name Turn debugging-messages on or off\n" \
" -dll name Enable or disable built-in DLLs\n" \
" -allowreadonly Read only files may be opened in write mode\n" \
" -enhanced Start wine in enhanced mode (like 'win /3') \n"
" -synchronous Turn on synchronous display mode\n"
......@@ -319,6 +318,24 @@ static void MAIN_ParseLanguageOption( char *arg )
/***********************************************************************
* MAIN_ParseModeOption
*
* Parse -mode option.
*/
static void MAIN_ParseModeOption( char *arg )
{
if (!lstrcmpi("enhanced", arg)) Options.mode = MODE_ENHANCED;
else if (!lstrcmpi("standard", arg)) Options.mode = MODE_STANDARD;
else
{
fprintf(stderr, "Invalid mode '%s' specified.\n", arg);
fprintf(stderr, "Valid modes are: 'standard', 'enhanced' (default).\n");
exit(1);
}
}
/***********************************************************************
* MAIN_ParseOptions
*
* Parse command line options and open display.
......@@ -368,8 +385,6 @@ static void MAIN_ParseOptions( int *argc, char *argv[] )
Options.debug = TRUE;
if (MAIN_GetResource( db, ".allowreadonly", &value ))
Options.allowReadOnly = TRUE;
if (MAIN_GetResource( db, ".enhanced", &value ))
Options.enhanced = TRUE;
if (MAIN_GetResource( db, ".ipc", &value ))
Options.ipc = TRUE;
if (MAIN_GetResource( db, ".depth", &value))
......@@ -380,6 +395,9 @@ static void MAIN_ParseOptions( int *argc, char *argv[] )
MAIN_ParseLanguageOption( (char *)value.addr );
if (MAIN_GetResource( db, ".managed", &value))
Options.managed = TRUE;
if (MAIN_GetResource( db, ".mode", &value))
MAIN_ParseModeOption( (char *)value.addr );
#ifdef DEBUG_RUNTIME
if (MAIN_GetResource( db, ".debugoptions", &value))
ParseDebugOptions((char*)value.addr);
......@@ -629,6 +647,8 @@ LONG GetWinFlags(void)
static const long cpuflags[5] =
{ WF_CPU086, WF_CPU186, WF_CPU286, WF_CPU386, WF_CPU486 };
long result = 0;
/* There doesn't seem to be any Pentium flag. */
#ifndef WINELIB
long cpuflag = cpuflags[MIN (runtime_cpu (), 4)];
......@@ -636,10 +656,21 @@ LONG GetWinFlags(void)
long cpuflag = cpuflags[4];
#endif
if (Options.enhanced)
return (WF_ENHANCED | cpuflag | WF_PMODE | WF_80x87 | WF_PAGING);
else
return (WF_STANDARD | cpuflag | WF_PMODE | WF_80x87);
switch(Options.mode) {
case MODE_STANDARD:
result = (WF_STANDARD | cpuflag | WF_PMODE | WF_80x87);
break;
case MODE_ENHANCED:
result = (WF_ENHANCED | cpuflag | WF_PMODE | WF_80x87 | WF_PAGING);
break;
default:
fprintf(stderr, "Unknown mode set? This shouldn't happen. Check GetWinFlags()!\n");
break;
}
return result;
}
/***********************************************************************
......
......@@ -71,13 +71,13 @@ static void do_int2f_16(struct sigcontext_struct *context)
switch(AL_reg(context))
{
case 0x00: /* Windows enhanced mode installation check */
AX_reg(context) = Options.enhanced ? WINVERSION : 0;
AX_reg(context) = (Options.mode == MODE_ENHANCED) ? WINVERSION : 0;
break;
case 0x0a: /* Get Windows version and type */
AX_reg(context) = 0;
BX_reg(context) = (WINVERSION >> 8) | ((WINVERSION << 8) & 0xff00);
CX_reg(context) = Options.enhanced ? 3 : 2;
CX_reg(context) = (Options.mode == MODE_ENHANCED) ? 3 : 2;
break;
case 0x80: /* Release time-slice */
......
......@@ -594,7 +594,14 @@ DWORD SetMapperFlags(HDC hDC, DWORD dwFlag)
}
/***********************************************************************/
/***********************************************************************
* GetCharABCWidths (GDI.307)
*/
BOOL GetCharABCWidths(HDC hdc, UINT wFirstChar, UINT wLastChar, LPABC lpABC)
{
/* No TrueType fonts in Wine */
return FALSE;
}
/***********************************************************************
......
......@@ -117,12 +117,7 @@ HANDLE CreateMetaFile(LPCTSTR lpFilename)
{
mh->mtType = 1;
strcpy(mf->Filename, lpFilename);
#ifndef WINELIB
mf->hFile = _lcreat(lpFilename, 0);
#else
/* temporary fix until _lcreate works under WINELIB */
mf->hFile = creat(lpFilename, 0666);
#endif
if (_lwrite(mf->hFile, (char *)mh, MFHEADERSIZE) == -1)
{
GlobalFree(mf->hMetaHdr);
......
Due to the implementation of FindText() and ReplaceText() in /misc/commdlg.c
I had to change the definition in sysres_En.rc of the dialogs FIND_TEXT and
REPLACE_TEXT. These changes should also be made for the other languages.
Not only should the definitions in sysres_??.rc made up to date with the
Enlish version, but also the dimensions of the controls should be changed so
that they will be big enough to contain the text for every individual
language.
Therefore:
- Definitions of FIND_TEXT and REPLACE_TEXT in sysres_??.rc should match
those in sysres_En.rc
- Dimensions of controls are based on sysres_En.rc. Other languages should
change these dimensions in order to make the text fit.
Frans van Dorsselaer
dorssel@rulhm1.LeidenUniv.nl
......@@ -165,36 +165,38 @@ FONT 8, "Helv"
}
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 84
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 236, 62
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Find"
FONT 8, "Helv"
{
LTEXT "Fi&nd What:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
CHECKBOX "Match &Whole Word Only", 1040, 20, 30, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Match &Case", 1041, 20, 50, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
GROUPBOX "Direction", 1072, 90, 40, 80, 40, BS_GROUPBOX
RADIOBUTTON "&Up", 1056, 100, 50, 50, 12
RADIOBUTTON "&Down", 1057, 150, 50, 50, 12
DEFPUSHBUTTON "&Find Next", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Cancel", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "Fi&nd What:", -1, 4, 8, 42, 8
EDITTEXT 1152, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "Match &Whole Word Only", 1040, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Match &Case", 1041, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP
GROUPBOX "Direction", 1072, 107, 26, 68, 28
CONTROL "&Up", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12
CONTROL "&Down", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12
DEFPUSHBUTTON "&Find Next", 1, 182, 5, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Cancel", 2, 182, 23, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Help", 1038, 182, 45, 50, 14, WS_GROUP | WS_TABSTOP
}
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 114
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 230, 94
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Replace"
FONT 8, "Helv"
{
LTEXT "Fi&nd What:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
LTEXT "Re&place With:", 1090, 6, 26, 40, 9
LTEXT "", 1091, 60, 26, 150, 9
CHECKBOX "Match &Whole Word Only", 1040, 20, 40, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Match &Case", 1041, 20, 60, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
DEFPUSHBUTTON "&Find Next", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Replace", 1024, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Replace &All", 1025, 206, 44, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Cancel", 2, 206, 64, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "Fi&nd What:", -1, 4, 9, 48, 8
EDITTEXT 1152, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
LTEXT "Re&place With:", -1, 4, 26, 48, 8
EDITTEXT 1153, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "Match &Whole Word Only", 1040, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Match &Case", 1041, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP
DEFPUSHBUTTON "&Find Next", 1, 174, 4, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Replace", 1024, 174, 21, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Replace &All", 1025, 174, 38, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Cancel", 2, 174, 55, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Help", 1038, 174, 75, 50, 14, WS_GROUP | WS_TABSTOP
}
......@@ -108,7 +108,7 @@ static int MEMORY_IsVrangeFree(DWORD start,DWORD size)
static int warned=0;
if(!warned)
{
fprintf("Don't know how to perform MEMORY_IsVrangeFree on "
fprintf(stdnimp, "Don't know how to perform MEMORY_IsVrangeFree on "
"this system.\n Please fix\n");
warned=0;
}
......
......@@ -19,6 +19,13 @@ void PARAM32_POINT32to16(const POINT32* p32,POINT* p16)
p16->y = p32->y;
}
void PARAM32_SIZE16to32(const SIZE* p16, SIZE32* p32)
{
p32->cx = p16->cx;
p32->cy = p16->cy;
}
/****************************************************************
* MoveToEx (GDI32.254)
*/
......@@ -32,3 +39,15 @@ BOOL WIN32_MoveToEx(HDC hdc,int x,int y,POINT32* p32)
return MoveToEx(hdc,x,y,&p);
}
}
BOOL WIN32_GetTextExtentPointA(HDC hdc, LPCTSTR str, int length, SIZE32* lpsize)
{
SIZE s;
BOOL retval;
retval = GetTextExtentPoint(hdc, str, length, &s);
PARAM32_SIZE16to32(&s, lpsize);
return retval;
}
......@@ -28,72 +28,109 @@ typedef struct
WORD timerid;
} CARET;
static CARET Caret;
static BOOL LockCaret;
typedef enum
{
CARET_OFF = 0,
CARET_ON,
CARET_TOGGLE,
} DISPLAY_CARET;
static void CARET_HideCaret();
static CARET Caret = { (HWND)0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
/*****************************************************************
* CARET_Callback
* CARET_GetHwnd
*/
WORD CARET_Callback(HWND hwnd, WORD msg, WORD timerid, LONG ctime)
HWND CARET_GetHwnd()
{
HDC hdc;
HBRUSH hBrush;
HRGN rgn;
dprintf_caret(stddeb,"CARET_Callback: id=%d: LockCaret=%d, hidden=%d, on=%d\n",
timerid, LockCaret, Caret.hidden, Caret.on);
if (!LockCaret && (!Caret.hidden || Caret.on))
{
Caret.on = (Caret.on ? FALSE : TRUE);
hdc = GetDC(Caret.hwnd);
if (Caret.bitmap == (HBITMAP)0 || Caret.bitmap == (HBITMAP)1)
hBrush = CreateSolidBrush(Caret.color);
else
hBrush = CreatePatternBrush(Caret.bitmap);
SelectObject(hdc, (HANDLE)hBrush);
SetROP2(hdc, R2_NOTXORPEN);
rgn = CreateRectRgn(Caret.x, Caret.y,
Caret.x + Caret.width,
Caret.y + Caret.height);
FillRgn(hdc, rgn, hBrush);
DeleteObject((HANDLE)rgn);
DeleteObject((HANDLE)hBrush);
ReleaseDC(Caret.hwnd, hdc);
}
return 0;
return Caret.hwnd;
}
/*****************************************************************
* CARET_HideCaret
* CARET_DisplayCaret
*/
static void CARET_HideCaret()
void CARET_DisplayCaret(DISPLAY_CARET status)
{
HDC hdc;
HBRUSH hBrush;
HBRUSH hPrevBrush;
HRGN rgn;
Caret.on = FALSE;
if (Caret.on && (status == CARET_ON)) return;
if (!Caret.on && (status == CARET_OFF)) return;
/* So now it's always a toggle */
Caret.on = !Caret.on;
hdc = GetDC(Caret.hwnd);
if (Caret.bitmap == (HBITMAP)0 || Caret.bitmap == (HBITMAP)1)
hBrush = CreateSolidBrush(Caret.color);
else
hBrush = CreatePatternBrush(Caret.bitmap);
SelectObject(hdc, (HANDLE)hBrush);
SetROP2(hdc, R2_NOTXORPEN);
hPrevBrush = SelectObject(hdc, (HANDLE)hBrush);
SetROP2(hdc, R2_XORPEN);
rgn = CreateRectRgn(Caret.x, Caret.y,
Caret.x + Caret.width,
Caret.y + Caret.height);
FillRgn(hdc, rgn, hBrush);
DeleteObject((HANDLE)rgn);
DeleteObject((HANDLE)hBrush);
DeleteObject( rgn );
SelectObject( hdc, hPrevBrush );
DeleteObject( hBrush );
ReleaseDC(Caret.hwnd, hdc);
}
/*****************************************************************
* CARET_Callback
*/
WORD CARET_Callback(HWND hwnd, WORD msg, WORD timerid, LONG ctime)
{
dprintf_caret(stddeb,"CARET_Callback: hwnd="NPFMT", timerid=%d, "
"caret=%d\n", hwnd, timerid, Caret.on);
CARET_DisplayCaret(CARET_TOGGLE);
return 0;
}
/*****************************************************************
* CARET_SetTimer
*/
void CARET_SetTimer(void)
{
if (Caret.timerid) KillSystemTimer((HWND)0, Caret.timerid);
Caret.timerid = SetSystemTimer((HWND)0, 0, Caret.timeout,
(FARPROC)GetWndProcEntry16("CARET_Callback"));
}
/*****************************************************************
* CARET_ResetTimer
*/
void CARET_ResetTimer(void)
{
if (Caret.timerid)
{
KillSystemTimer((HWND)0, Caret.timerid);
Caret.timerid = SetSystemTimer((HWND)0, 0, Caret.timeout,
(FARPROC)GetWndProcEntry16("CARET_Callback"));
}
}
/*****************************************************************
* CARET_KillTimer
*/
void CARET_KillTimer(void)
{
if (Caret.timerid)
{
KillSystemTimer((HWND)0, Caret.timerid);
Caret.timerid = 0;
}
}
/*****************************************************************
* CARET_Initialize
*/
......@@ -101,14 +138,16 @@ static void CARET_Initialize()
{
DWORD WineProc,Win16Proc,Win32Proc;
static int initialized=0;
if(!initialized)
{
WineProc=(DWORD)CARET_Callback;
Win16Proc=(DWORD)GetWndProcEntry16("CARET_Callback");
Win32Proc=(DWORD)RELAY32_GetEntryPoint(
RELAY32_GetBuiltinDLL("WINPROCS32"),"CARET_Callback",0);
ALIAS_RegisterAlias(WineProc,Win16Proc,Win32Proc);
initialized=1;
WineProc = (DWORD)CARET_Callback;
Win16Proc = (DWORD)GetWndProcEntry16("CARET_Callback");
Win32Proc = (DWORD)RELAY32_GetEntryPoint(
RELAY32_GetBuiltinDLL("WINPROCS32"),
"CARET_Callback", 0);
ALIAS_RegisterAlias(WineProc, Win16Proc, Win32Proc);
initialized=1;
}
}
......@@ -119,18 +158,17 @@ static void CARET_Initialize()
BOOL CreateCaret(HWND hwnd, HBITMAP bitmap, INT width, INT height)
{
if (!hwnd) return FALSE;
dprintf_caret(stddeb,"CreateCaret: hwnd="NPFMT"\n", hwnd);
if (!hwnd) return FALSE;
/* if cursor already exists, destroy it */
/* if (Caret.hwnd)
DestroyCaret();
*/
if (bitmap && bitmap != (HBITMAP)1)
Caret.bitmap = bitmap;
if (Caret.hwnd) DestroyCaret();
if (bitmap && bitmap != (HBITMAP)1) Caret.bitmap = bitmap;
if (width)
Caret.width = width;
Caret.width = width;
else
Caret.width = GetSystemMetrics(SM_CXBORDER);
......@@ -147,17 +185,11 @@ BOOL CreateCaret(HWND hwnd, HBITMAP bitmap, INT width, INT height)
if (bitmap == (HBITMAP)1)
Caret.color = GetSysColor(COLOR_GRAYTEXT);
else
Caret.color = GetSysColor(COLOR_WINDOWTEXT);
Caret.color = GetSysColor(COLOR_WINDOW);
Caret.timeout = 750;
LockCaret = FALSE;
CARET_Initialize();
Caret.timerid = SetSystemTimer( (HWND)0, 0, Caret.timeout,
(FARPROC)GetWndProcEntry16("CARET_Callback"));
dprintf_caret(stddeb,"CreateCaret: hwnd="NPFMT", timerid=%d\n",
hwnd, Caret.timerid);
return TRUE;
}
......@@ -168,16 +200,15 @@ BOOL CreateCaret(HWND hwnd, HBITMAP bitmap, INT width, INT height)
BOOL DestroyCaret()
{
/* if (!Caret.hwnd) return;
*/
dprintf_caret(stddeb,"DestroyCaret: timerid=%d\n", Caret.timerid);
if (!Caret.hwnd) return FALSE;
KillSystemTimer( (HWND)0, Caret.timerid);
dprintf_caret(stddeb,"DestroyCaret: hwnd="NPFMT", timerid=%d\n",
Caret.hwnd, Caret.timerid);
if (Caret.on)
CARET_HideCaret();
CARET_KillTimer();
CARET_DisplayCaret(CARET_OFF);
Caret.hwnd = 0; /* cursor marked as not existing */
Caret.hwnd = 0;
return TRUE;
}
......@@ -192,13 +223,15 @@ void SetCaretPos(short x, short y)
dprintf_caret(stddeb,"SetCaretPos: x=%d, y=%d\n", x, y);
LockCaret = TRUE;
if (Caret.on)
CARET_HideCaret();
CARET_KillTimer();
CARET_DisplayCaret(CARET_OFF);
Caret.x = x;
Caret.y = y;
LockCaret = FALSE;
if (!Caret.hidden)
{
CARET_DisplayCaret(CARET_ON);
CARET_SetTimer();
}
}
/*****************************************************************
......@@ -210,12 +243,12 @@ void HideCaret(HWND hwnd)
if (!Caret.hwnd) return;
if (hwnd && (Caret.hwnd != hwnd)) return;
LockCaret = TRUE;
if (Caret.on)
CARET_HideCaret();
dprintf_caret(stddeb,"HideCaret: hwnd="NPFMT", hidden=%d\n",
hwnd, Caret.hidden);
++Caret.hidden;
LockCaret = FALSE;
CARET_KillTimer();
CARET_DisplayCaret(CARET_OFF);
Caret.hidden++;
}
......@@ -228,9 +261,18 @@ void ShowCaret(HWND hwnd)
if (!Caret.hwnd) return;
if (hwnd && (Caret.hwnd != hwnd)) return;
dprintf_caret(stddeb,"ShowCaret: hidden=%d\n", Caret.hidden);
dprintf_caret(stddeb,"ShowCaret: hwnd="NPFMT", hidden=%d\n",
hwnd, Caret.hidden);
if (Caret.hidden)
--Caret.hidden;
{
Caret.hidden--;
if (!Caret.hidden)
{
CARET_DisplayCaret(CARET_ON);
CARET_SetTimer();
}
}
}
......@@ -242,12 +284,11 @@ void SetCaretBlinkTime(WORD msecs)
{
if (!Caret.hwnd) return;
CARET_Initialize();
dprintf_caret(stddeb,"SetCaretBlinkTime: hwnd="NPFMT", msecs=%d\n",
Caret.hwnd, msecs);
KillSystemTimer( (HWND)0, Caret.timerid);
Caret.timeout = msecs;
Caret.timerid = SetSystemTimer( (HWND)0, 0, Caret.timeout,
(FARPROC)GetWndProcEntry16("CARET_Callback"));
CARET_ResetTimer();
}
......@@ -258,6 +299,10 @@ void SetCaretBlinkTime(WORD msecs)
WORD GetCaretBlinkTime()
{
if (!Caret.hwnd) return 0;
dprintf_caret(stddeb,"GetCaretBlinkTime: hwnd="NPFMT", msecs=%d\n",
Caret.hwnd, Caret.timeout);
return Caret.timeout;
}
......@@ -270,6 +315,9 @@ void GetCaretPos(LPPOINT pt)
{
if (!Caret.hwnd || !pt) return;
dprintf_caret(stddeb,"GetCaretPos: hwnd="NPFMT", pt=%p, x=%d, y=%d\n",
Caret.hwnd, pt, Caret.x, Caret.y);
pt->x = Caret.x;
pt->y = Caret.y;
}
......@@ -807,6 +807,37 @@ LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam )
/***********************************************************************
* NC_TrackSysMenu
*
* Track a mouse button press on the system menu.
*/
static void NC_TrackSysMenu( HWND hwnd, HDC hdc, POINT pt )
{
RECT rect;
WND *wndPtr = WIN_FindWndPtr( hwnd );
int iconic = wndPtr->dwStyle & WS_MINIMIZE;
if (!(wndPtr->dwStyle & WS_SYSMENU)) return;
/* If window has a menu, track the menu bar normally if it not minimized */
if (HAS_MENU(wndPtr) && !iconic) MENU_TrackMouseMenuBar( hwnd, pt );
else
{
/* Otherwise track the system menu like a normal popup menu */
NC_GetInsideRect( hwnd, &rect );
OffsetRect( &rect, wndPtr->rectWindow.left, wndPtr->rectWindow.top );
if (wndPtr->dwStyle & WS_CHILD)
ClientToScreen( wndPtr->hwndParent, (POINT *)&rect );
rect.right = rect.left + SYSMETRICS_CXSIZE;
rect.bottom = rect.top + SYSMETRICS_CYSIZE;
if (!iconic) NC_DrawSysButton( hwnd, hdc, TRUE );
TrackPopupMenu( wndPtr->hSysMenu, TPM_LEFTALIGN | TPM_LEFTBUTTON,
rect.left, rect.bottom, 0, hwnd, &rect );
if (!iconic) NC_DrawSysButton( hwnd, hdc, FALSE );
}
}
/***********************************************************************
* NC_StartSizeMove
*
* Initialisation of a move or resize, when initiatied from a menu choice.
......@@ -904,6 +935,7 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam, POINT pt )
BOOL thickframe;
POINT minTrack, maxTrack, capturePoint = pt;
WND * wndPtr = WIN_FindWndPtr( hwnd );
int moved = 0;
if (IsZoomed(hwnd) || !IsWindowVisible(hwnd) ||
(wndPtr->flags & WIN_MANAGED)) return;
......@@ -977,7 +1009,7 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam, POINT pt )
while(1)
{
int dx = 0, dy = 0;
int dx = 0, dy = 0;
MSG_GetHardwareMessage( &msg );
......@@ -1012,6 +1044,7 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam, POINT pt )
if (dx || dy)
{
moved = 1;
if (msg.message == WM_KEYDOWN) SetCursorPos( pt.x, pt.y );
else
{
......@@ -1032,6 +1065,7 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam, POINT pt )
NC_DrawMovingFrame( hdc, &sizingRect, thickframe );
ReleaseCapture();
if (wndPtr->dwStyle & WS_CHILD) ReleaseDC( wndPtr->hwndParent, hdc );
else
{
......@@ -1041,6 +1075,14 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam, POINT pt )
SendMessage( hwnd, WM_EXITSIZEMOVE, 0, 0 );
SendMessage( hwnd, WM_SETVISIBLE, !IsIconic(hwnd), 0L);
/* Single click brings up the system menu */
if (!moved)
{
NC_TrackSysMenu( hwnd, hdc, pt );
return;
}
/* If Esc key, don't move the window */
if ((msg.message == WM_KEYDOWN) && (msg.wParam == VK_ESCAPE)) return;
......@@ -1152,36 +1194,6 @@ static void NC_TrackScrollBar( HWND hwnd, WORD wParam, POINT pt )
}
/***********************************************************************
* NC_TrackSysMenu
*
* Track a mouse button press on the system menu.
*/
static void NC_TrackSysMenu( HWND hwnd, HDC hdc, POINT pt )
{
RECT rect;
WND *wndPtr = WIN_FindWndPtr( hwnd );
if (!(wndPtr->dwStyle & WS_SYSMENU)) return;
/* If window has a menu, track the menu bar normally */
if (HAS_MENU(wndPtr)) MENU_TrackMouseMenuBar( hwnd, pt );
else
{
/* Otherwise track the system menu like a normal popup menu */
NC_GetInsideRect( hwnd, &rect );
OffsetRect( &rect, wndPtr->rectWindow.left, wndPtr->rectWindow.top );
if (wndPtr->dwStyle & WS_CHILD)
ClientToScreen( wndPtr->hwndParent, (POINT *)&rect );
rect.right = rect.left + SYSMETRICS_CXSIZE;
rect.bottom = rect.top + SYSMETRICS_CYSIZE;
NC_DrawSysButton( hwnd, hdc, TRUE );
TrackPopupMenu( wndPtr->hSysMenu, TPM_LEFTALIGN | TPM_LEFTBUTTON,
rect.left, rect.bottom, 0, hwnd, &rect );
NC_DrawSysButton( hwnd, hdc, FALSE );
}
}
/***********************************************************************
* NC_HandleNCLButtonDown
*
* Handle a WM_NCLBUTTONDOWN message. Called from DefWindowProc().
......
......@@ -30,13 +30,15 @@ HDC BeginPaint( HWND hwnd, LPPAINTSTRUCT lps )
hrgnUpdate = wndPtr->hrgnUpdate; /* Save update region */
if (!hrgnUpdate) /* Create an empty region */
if (!(hrgnUpdate = CreateRectRgn( 0, 0, 0, 0 ))) return 0;
if (wndPtr->hrgnUpdate || (wndPtr->flags & WIN_INTERNAL_PAINT))
MSG_DecPaintCount( wndPtr->hmemTaskQ );
wndPtr->hrgnUpdate = 0;
wndPtr->flags &= ~(WIN_NEEDS_BEGINPAINT | WIN_INTERNAL_PAINT);
HideCaret( hwnd );
if (wndPtr->flags & WIN_NEEDS_NCPAINT)
{
wndPtr->flags &= ~WIN_NEEDS_NCPAINT;
......@@ -71,6 +73,7 @@ HDC BeginPaint( HWND hwnd, LPPAINTSTRUCT lps )
BOOL EndPaint( HWND hwnd, const PAINTSTRUCT* lps )
{
ReleaseDC( hwnd, lps->hdc );
ShowCaret( hwnd );
return TRUE;
}
......
......@@ -20,6 +20,7 @@
extern HRGN DCE_GetVisRgn(HWND, WORD);
extern HWND CARET_GetHwnd();
static int RgnType;
......@@ -122,9 +123,10 @@ BOOL SCROLL_ScrollChildren( HWND hScroll, short dx, short dy)
void ScrollWindow(HWND hwnd, short dx, short dy, LPRECT rect, LPRECT clipRect)
{
HDC hdc;
HDC hdc;
HRGN hrgnUpdate,hrgnClip;
RECT rc, cliprc;
HWND hCaretWnd = CARET_GetHwnd();
dprintf_scroll(stddeb,"ScrollWindow: dx=%d, dy=%d, lpRect =%08lx clipRect=%i,%i,%i,%i\n",
dx, dy, (LONG)rect, (int)((clipRect)?clipRect->left:0),
......@@ -138,6 +140,10 @@ void ScrollWindow(HWND hwnd, short dx, short dy, LPRECT rect, LPRECT clipRect)
GetClientRect(hwnd, &rc);
hrgnClip = CreateRectRgnIndirect( &rc );
if ((hCaretWnd == hwnd) || IsChild(hwnd,hCaretWnd))
HideCaret(hCaretWnd);
else hCaretWnd = 0;
/* children will be Blt'ed too */
hdc = GetDCEx(hwnd, hrgnClip, DCX_CACHE | DCX_CLIPSIBLINGS);
DeleteObject(hrgnClip);
......@@ -150,7 +156,9 @@ void ScrollWindow(HWND hwnd, short dx, short dy, LPRECT rect, LPRECT clipRect)
(int)rect->bottom,(int)rc.left,(int)rc.top,
(int)rc.right,(int)rc.bottom);
CopyRect(&rc, rect);
if (hCaretWnd == hwnd) HideCaret(hCaretWnd);
else hCaretWnd = 0;
CopyRect(&rc, rect);
hdc = GetDC(hwnd);
}
......@@ -189,6 +197,7 @@ void ScrollWindow(HWND hwnd, short dx, short dy, LPRECT rect, LPRECT clipRect)
}
DeleteObject(hrgnUpdate);
if( hCaretWnd ) ShowCaret(hCaretWnd);
}
......
......@@ -1240,8 +1240,41 @@ BOOL AnyPopup()
*/
BOOL FlashWindow(HWND hWnd, BOOL bInvert)
{
dprintf_win(stdnimp,"EMPTY STUB !! FlashWindow !\n");
return FALSE;
WND *wndPtr = WIN_FindWndPtr(hWnd);
dprintf_win(stddeb,"FlashWindow: "NPFMT"\n", hWnd);
if (!wndPtr) return FALSE;
if (wndPtr->dwStyle & WS_MINIMIZE)
{
if (bInvert && !(wndPtr->flags & WIN_NCACTIVATED))
{
HDC hDC = GetDC(hWnd);
if (!SendMessage( hWnd, WM_ERASEBKGND, (WPARAM)hDC, (LPARAM)0 ))
wndPtr->flags |= WIN_NEEDS_ERASEBKGND;
ReleaseDC( hWnd, hDC );
wndPtr->flags |= WIN_NCACTIVATED;
}
else
{
RedrawWindow( hWnd, 0, 0, RDW_INVALIDATE | RDW_ERASE |
RDW_UPDATENOW | RDW_FRAME );
wndPtr->flags &= ~WIN_NCACTIVATED;
}
return TRUE;
}
else
{
WPARAM wparam;
if (bInvert) wparam = !(wndPtr->flags & WIN_NCACTIVATED);
else wparam = (hWnd == GetActiveWindow());
SendMessage( hWnd, WM_NCACTIVATE, wparam, (LPARAM)0 );
return wparam;
}
}
......
......@@ -56,43 +56,14 @@ the --prefix option when running
.B configure.
.SH OPTIONS
.TP
.I -depth n
Change the depth to use for multiple-depth screens
.TP
.I -desktop geom
Use a desktop window of the given geometry
.TP
.I -display name
Use the specified display
.TP
.I -iconic
Start as an icon
.TP
.I -debug
Enter the debugger before starting application
.TP
.I -language xx
Set the language to
.I xx
(one of En, Es, De, No, Fr, Fi, Da Cz)
.TP
.I -managed
Create each top-level window as a properly managed X window
.TP
.I -name name
Set the application name
.TP
.I -privatemap
Use a private color map
.TP
.I -synchronous
Turn on synchronous display mode
.I -allowreadonly
Read only files may be opened in write mode
.TP
.I -backingstore
Turn on backing store
.TP
.I -spy file
Turn on message spying to the specified file
.I -debug
Enter the debugger before starting application
.TP
.I -debugmsg name[,name]
Turn debugging messages on or off - for instance,
......@@ -106,6 +77,15 @@ 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.
.TP
.I -depth n
Change the depth to use for multiple-depth screens
.TP
.I -desktop geom
Use a desktop window of the given geometry
.TP
.I -display name
Use the specified display
.TP
.I -dll name
Enables/disables built-in DLL's - starting wine with
.I -dll -commdlg
......@@ -115,11 +95,37 @@ 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
.TP
.I -allowreadonly
Read only files may be opened in write mode
.I -fixedmap
Use a "standard" color map.
.TP
.I -iconic
Start as an icon
.TP
.I -language xx
Set the language to
.I xx
(one of En, Es, De, No, Fr, Fi, Da, Cz)
.TP
.I -managed
Create each top-level window as a properly managed X window
.TP
.I -mode modename
Determines the mode in which
.B wine
is started. Possible mode names are
.I standard
and
.I enhanced.
Enhanced mode is the default (when no -mode option is specified).
.TP
.I -enhanced
Starts wine in Enhanced mode
.I -name name
Set the application name
.TP
.I -privatemap
Use a private color map
.TP
.I -synchronous
Turn on synchronous display mode
.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