Skip to content
Snippets Groups Projects
Commit fb9a919f authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

Release 940301

Tue Mar  1 11:30:21 1994  Bob Amstadt  (bob@pooh)

	* [Configure] [*/Imakefile]
	Created configure script to handle different types of Wine builds.

	* [Configure] [tools/build.c] [if1632/Imakefile] [Wine.tmpl]
	Added ability to compile Wine on systems with 14-char filename limit.

	* [if1632/relay.c] [include/options.h] [misc/main.c]
	Added -relaydbg option to command line if DEBUG_RELAY is defined.

	* [loader/selector.c]
	Fixed bug in GetEntryDLLName() that caused Wine to seg fault.

	* [memory/heap.c]
	Fixed LocalInit() to work correctly.

	* [misc/user.c]
	Added code to call loaded DLLs' initialization routines.

Tue Mar  1 01:01:17 MET 1994  julliard@di.epfl.ch (Alexandre Julliard)

	* [windows/dce.c]
	Added clipping of child windows by their parent's client area.

	* [windows/nonclient.c]
	Bug fix in NC_DoNCPaint().

	* [windows/painting.c]
	Bug fix in RedrawWindow().

Feb 27, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)

	* [mem/atom.c]
	Bug fix again in ATOM_DeleteAtom() : 
		change LocalFree() by USER_HEAP_FREE().
	(Previous patch done Feb 13th had been lost)

	* [controls/scroll.c]
	Move bitmaps loading in AllocScrollBar() instead of in WM_CREATE.

	* [windows/class.c] (sorry Alex ...)
	There was no bug there "in RegisterClass() : 
                WNDCLASS->lpszClassName was reset to NULL."
                              ^^^^^

	* [misc/clipboard.c]	--- New File ---
	New function EnumClipboardFormats().
	New function OpenClipboard().
	New function CloseClipboard().
	New function EmptyClipboard().
	New function GetClipboardOwner().
	New function GetClipboardViewer().
	New function CountClipboardFormats().
	New function IsClipboardFormatAvailable().
	New function OpenClipboard().
	New function GetClipboardData().
	New function SetClipboardViewer().
	New function EnumClipboardFormats().
	New function RegisterClipboardFormat().
	New function ChangeClipboardChain().
	New function SetClipboardData().
	New function GetOpenClipboardWindow().
	New function GetPriorityClipboardFormat().
	New function GetClipboardFormatName().

Tue Mar  1 20:15:45 1994  Erik Bos <erik@trashcan.hacktic.nl>

	* [misc/comm.c]
	bugfix in OpenComm().

Tue Feb 22 18:04:02 1994  Jeffrey Hsu <hsu@freefall.cdrom.com>

	* [include/winsock.h]
	The sockproto struct is already defined in <sys/socket.h>

	* [misc/winsock.c]
	Need to include <netinet/in.h> for struct in-addr.
	Use sys_errlist[] instead of strerror[].

	*[toolkit/heap.c]
	ANSI C specifies that the malloc functions are defined in stdlib.h,
	  so we don't need to include malloc.h.

	*[loader/ldtlib.c]
	Print informative error message about probable cause of i386_set_ldt()
	  failure and then exit.

	*[Imakefile]
	For systems that don't use gmake by default, set the MAKE variable
	  to gmake and propagate it on recursive makes.
	Take out -li386 for FreeBSD systems and define __FreeBSD__ so Wine
	  can be built with the FreeBSD 1.0.2 compiler.

Tue Feb 22 02:52:19 EST 1994    jrichard@cs.uml.edu (John Richardson)

        * [objects/bitblt.c]
        Added in three functions to do stretching and compression
        for WHITEONBLACK, BLACKONWHITE, and color copies.

Tue Feb 22 15:01:31 EST 1994    jrichard@cs.uml.edu (John Richardson)

        * [windows/graphics.c]
        Added FloodFill and FloodFill_rec.  FloodFill_rec is pretty
        inefficent, but should suffice for now.

        * [include/windows.h]
        Changed the x,y paramaters for the FloodFill prototype 
        from ints to shorts

Tue Feb 22 00:58:28 MET 1994  julliard@di.epfl.ch (Alexandre Julliard)

	* [windows/widgets.c]
	Added desktop window class.

	* [windows/painting.c]
	Bug fix in RedrawWindow().
	Implemented ExcludeUpdateRgn().

	* [windows/win.c] [windows/winpos.c]
	Implemented desktop window.

	* [controls/desktop.c]
	Preliminary desktop window procedure.

Feb 20, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)

	* [controls/menu.c]
	New function LoadMenuIndirect().
	New function GetMenuCheckMarkDimensions().

	* [if1632/user.spec]
	Entry for DefDlgProc().

	* [windows/class.c]
	Fix bug in RegisterClass() : 
		WNDCLASS->lpszMenuName was reset to NULL.

	* [windows/win.c]
	In CreateWindowEx(), if hMenu == 0 then use 
		wndclass->lpszMenuName to load Menu from resource;

Mon Feb 21 22:38:28 1994 Erik Bos (erik@trashcan.hacktic.nl)

	* [loader/library.c] [loader/wine.c]
	Fixed runing DLL's as main executable problem.

	* [misc/dos_fs.c]
	Added wildcard support in DOS_readdir().

	* [misc/winsocket.c]
	Added proper error handling of BSD winsocket functions.

	* [miscemu/int21.c]
	KERNEL_DOS3Call renamed to DOS3Call and modified to use do_int21().

	* [main/main.c]
	Added functions for GetVersion, GetWinFlags and GetTimerResolution
	for libwine.a, SystemParametersInfo() partly implemented.

Tue Feb 22 19:00:02 1994  Miguel de Icaza  (miguel@xochitl.nuclecu.unam.mx)

	* [toolkit/winmain.c]
	Added _WinMain function. Setups the library (calls USER_InitApp).

	* [toolkit/sup.c]
	Added load_mz_header, load_ne_header, load_type_info and
	load_name_info functions.

	* [toolkit/heap.c] 
	Code cleanup. 

	* [misc/user.c]
	Moved from loader/misc.c. I hope to put back all the loader
	functions in the ~loader subdirectory in the future. CUrrently is
	needed since it has USER_InitApp.

	* [misc/resource.c]
	Since WineLib will probably need DLLs (currently it needs
	Sysres.dll). WineLib will be using much code of the loader again.
	So I removed some ifdefs that were used by WineLib.

	Added load_typeinfo and load_nameinfo (and the corresponding
	functions in [toolkit/sup.c]

	Added integer convertion functions in the needed places.

	Added very ugly patch (includes wine.c). In the next release I
	plan to move back all the loader routines to ~/loader. In the
	meantime I needed this patch. It doesn't affect any of the
	emulator code (its ifdefed for WineLib).

	* [misc/main.c]
	Cleaned up call to WinMain (now uses [toolkit/winmain.c]
	Ifdefed argument number checking when compiling the library.

	* [loader/wine.c]
	Modified to use load_(mz|ne)_header instead of doing a direct
	read.  When compiling the emulator it still uses the direct read
	for performance. 

	* [include/wine.h]
	Prototypes for loading routines.

	* [include/class.h]
	Added WINE_PACKED macro instead of __attribute__ ((packed))

	* [include/arch.h]
	Macros for converting integers (Little endian to big-endian).
	Needed in the Sun to allow loading of DLL files.

Mon Feb 14 23:48:09 MET 1994  julliard@di.epfl.ch (Alexandre Julliard)

	* [windows/clipping.c]
	Moved everything into windows/painting.c and removed this file.

	* [windows/message.c]
	Removed calls to memmove() in MSG_RemoveMsg().

	* [windows/nonclient.c]
	Added WM_GETMINMAXINFO support for window resizing.

	* [windows/painting.c]
	Implemented RedrawWindow().

	* [windows/scroll.c]
	Bug fix in ScrollWindowEx().

	* [windows/win.c]
	Moved UpdateWindow() to windows/painting.c.

Fri Feb 11 12:41:28 1994  Erik Bos (erik@trashcan.hacktic.nl)
	
	* [loader/wine.c] [misc/dos_fs.c]
	getenv() eq NULL bugfixes.

	* [misc/comm.c]
	cfmakeraw changed for SunOS.

Feb 13, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)

	* [mem/atom.c]
	Bug fix in ATOM_DeleteAtom() : 
		change LocalFree() by USER_HEAP_FREE().

	* [misc/message.c]
	New function FatalAppExit().

	* [objects/font.c]
	New empty stub SetMapperFlags().

	* [controls/menu.c]
	Better CheckMark & other bitmaps placement.

	* [windows/graphics.c]
	New function RoundRect() : calc.exe now working...

Tue Feb 15 14:29:37 1994  John Richardson

        * [objects/bitblt.c]
        Fixed StretchBlt so it works quicker and faster.  It still doesn't
        use the StretchMode bits for bitmap compression, but that will
        come soon.

Mon Feb 14 13:21:04 1994  Miguel de Icaza  (miguel@roxanne.nuclecu.unam.mx)

	* [include/windows.h,dialog.h,gdi.h]
	Changed __atribute__ ((packed)) for WINE_PACKED. 
	When compiling the library this is defined as nothing. This gets
	rid with all the problems compiling under SunOS. Also 

	* [windows/utility.c]
	Added DebugPrintString.

	* [toolkit/sup.c]
	Added hSysRes = 1 definition to resolve externals.
	Added CallLineDDAProc function (toolkit version).
	Added toy, and hi ineficient memmove until code in message.c get
	rewritten.

	* [objects/gdiobj.c]
	Ifdefed linux/emulator-dependent code to allow compilation of
	WineLib.

	* [misc/winsocket.c]
	Added ifdef to allow compilation under SunOS.

	* [misc/resource.c]
	When compiling the library, the resource file is expected to be in
	a file called $argv[0].Res. Also the information of the resource
	is expected to be at offset 0 of the .Res file.

	* [misc/main.c]
	Call WinMain with arguments if compiling WineLib.
	Call shutdown functions (Comm_DeInit, DOS_DeInitFS).
	Call sync_profiles to preserve changes to .INI files.

	* [misc/comm.c,dos_fs.c]
	removed call to atexit(Comm_DeInit)
	removed call to atexit(DOS_DeInitFS)
	Shutdown functions are now called from the return of WinMain

	* removed memorylib subdirectory

	* moved memory/atom.c    to misc/atom.c
	  moved memorylib/heap.c to toolkit/heap.c

	* [loader/wine.c]
	Moved DebugPrintString to windows/utility.c

	* [include/winsock.h]
	Define SO_DONTLINGER only if it has not been previously defined.

	* [include/windows.h]
	added definition for DLGPROC.
	added definition for LMEM_WINE_ALIGN and other LMEM_* constants.
	When compiling WineLib WNDPROC is defined with all the parameters
	to avoid compilation problems.

	* [include/user.h]
	When compiling WineLib USER_HEAP_(ALLOC|REALLOC|ADDR|FREE) the
	calls are translated to the library allocation routines.

	* [include/gdi.h,user.h]
	When compiling WineLib GDI_HEAP_(ALLOC|ADDR|FREE) the calls are
	translated to the library allocation routines.

	* [include/atom.h]
	Defined LocalAlign. When compiling the emulator it's translated as
	a call to LocalAlloc (the original code), when compiling WineLib
	as a call to LocalAlloc with a WINE-flag called LMEM_WINE_ALIGN
	(atom.c needs aligned data on a 4 byte boundary).

	* [misc/file.c]
	Renamed KERNEL_* functions and fixed prototypes.

	* [if1632/kernel.spec]
	Renamed KERNEL_* functions in order to be used by applications
	using Wine as a library (OpeFile, _lclose, _lread, _lcreate,
	_llseek, _lopen, _lwrite).

	* [Makefile]
	Create library instead of executable when building target
	libwine.a 

Tue Feb  8 13:52:11 1994  Miguel de Icaza  (miguel@roxanne)

	* [Makefiles]
	Use $(CC) instead of cc.
	Added libwine target.

	* [include/prototypes]
	#ifdefed section for WineLib

	* moved loader/cursor.c   to misc/cursor.c
	  moved loader/resource.c to misc/resource.c
	  moved misc/emulate.c    to miscemu/emulate.c
	  moved misc/int1a.c      to miscemu/int1a.c
	  moved misc/int21.c	  to miscemu/int21.c
	  moved	misc/kernel.c	  to miscemu/kernel.c
	  moved misc/user.c       to miscemu/user.c

	* [memorylib/heap.c]
	Heap management for WineLib

	* [misc/comm.c]
	Modified to allow compilation under SunOS (#include errno, SunOS
	doesn't have atexit ()).

	* [misc/dos_fs.c]
	Modified to allow compilation under SunOS (#include vfs.h)

	* [misc/file.c]
	Modified to allow compilation under SunOS (OPEN_MAX constant,
	#include unistd.h)

	* [objects/palette.c]
	Modified to allow compilation under SunOS (#include limits)

	* [toolkit/sup.c]
	WineLib version of CallWindowProc.

	* [windows/event.c]
	Typedef XPointer under X11R4 (OpenWindows).

	* [windows/win.c]
	When compiling WineLib, use direct callbacks instead of the
	windows supplied callbacks.

Mon Feb  7 22:37:34 MET 1994  julliard@di.epfl.ch (Alexandre Julliard)

	* [loader/cursor.c]
	New function CURSOR_SetWinCursor(), for internal use, to set
	the cursor of a specific window more reliably than with SetCursor().

	* [windows/nonclient.c]
	Better window management. Moving and resizing from the system
	menu should work now.
	Added scroll-bar mouse tracking.

	* [windows/win.c]
	Moved scroll-bar creation and destruction to defwnd.c.

Feb 5, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)

	* [windows/nonclient.c]
	Call to StdDrawMenuBar() during NC's drawing.
	New NC_TrackMouseMenuBar() function which call 
		MenuButtonDown(), MenuButtonUp() & MenuMouseMove().

	* [controls/menu.c]
	New ChangeMenu() function.
	Remove permanently old Xt menu code.
	Make common functions MenuButtonDown(), MenuButtonUp()
		& MenuMouseMove() for both popups & menubar.
	
	* [controls/combo.c]
	Paint OBM_COMBO directly in combo client.

	* [controls/listbox.c]
	Fix bug in multicolumns calculations.

	* [controls/Makefile]
	Remove rules for old file 'caption.c'.

	* [misc/kernel.c]
	Remove empty stub GetModuleFileName().

	* [loader/library.c]
	New GetModuleHandle() function.
	New GetModuleUsage() function.
	New GetModuleFileName() function.

	* [loader/resource.c]
	Try to find the bug a missing menu loading ... Not found yet !

	* [windows/win.c]
	Remove old menubar creation.

Thu Feb  3 22:30:11 1994  Erik Bos (erik@trashcan.hacktic.nl)

	* [misc/winsocket.c]
	More functions added.

	* [if1632/winsock.spec] [misc/winsocket.c]
	Added John Brezak's winsock.dll stuff.
parent dba420a7
No related branches found
Tags wine-940301
No related merge requests found
----------------------------------------------------------------------
Tue Mar 1 11:30:21 1994 Bob Amstadt (bob@pooh)
* [Configure] [*/Imakefile]
Created configure script to handle different types of Wine builds.
* [Configure] [tools/build.c] [if1632/Imakefile] [Wine.tmpl]
Added ability to compile Wine on systems with 14-char filename limit.
* [if1632/relay.c] [include/options.h] [misc/main.c]
Added -relaydbg option to command line if DEBUG_RELAY is defined.
* [loader/selector.c]
Fixed bug in GetEntryDLLName() that caused Wine to seg fault.
* [memory/heap.c]
Fixed LocalInit() to work correctly.
* [misc/user.c]
Added code to call loaded DLLs' initialization routines.
Tue Mar 1 01:01:17 MET 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [windows/dce.c]
Added clipping of child windows by their parent's client area.
* [windows/nonclient.c]
Bug fix in NC_DoNCPaint().
* [windows/painting.c]
Bug fix in RedrawWindow().
Feb 27, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [mem/atom.c]
Bug fix again in ATOM_DeleteAtom() :
change LocalFree() by USER_HEAP_FREE().
(Previous patch done Feb 13th had been lost)
* [controls/scroll.c]
Move bitmaps loading in AllocScrollBar() instead of in WM_CREATE.
* [windows/class.c] (sorry Alex ...)
There was no bug there "in RegisterClass() :
WNDCLASS->lpszClassName was reset to NULL."
^^^^^
* [misc/clipboard.c] --- New File ---
New function EnumClipboardFormats().
New function OpenClipboard().
New function CloseClipboard().
New function EmptyClipboard().
New function GetClipboardOwner().
New function GetClipboardViewer().
New function CountClipboardFormats().
New function IsClipboardFormatAvailable().
New function OpenClipboard().
New function GetClipboardData().
New function SetClipboardViewer().
New function EnumClipboardFormats().
New function RegisterClipboardFormat().
New function ChangeClipboardChain().
New function SetClipboardData().
New function GetOpenClipboardWindow().
New function GetPriorityClipboardFormat().
New function GetClipboardFormatName().
Tue Mar 1 20:15:45 1994 Erik Bos <erik@trashcan.hacktic.nl>
* [misc/comm.c]
bugfix in OpenComm().
----------------------------------------------------------------------
Tue Feb 22 18:04:02 1994 Jeffrey Hsu <hsu@freefall.cdrom.com>
* [include/winsock.h]
The sockproto struct is already defined in <sys/socket.h>
* [misc/winsock.c]
Need to include <netinet/in.h> for struct in-addr.
Use sys_errlist[] instead of strerror[].
*[toolkit/heap.c]
ANSI C specifies that the malloc functions are defined in stdlib.h,
so we don't need to include malloc.h.
*[loader/ldtlib.c]
Print informative error message about probable cause of i386_set_ldt()
failure and then exit.
*[Imakefile]
For systems that don't use gmake by default, set the MAKE variable
to gmake and propagate it on recursive makes.
Take out -li386 for FreeBSD systems and define __FreeBSD__ so Wine
can be built with the FreeBSD 1.0.2 compiler.
Tue Feb 22 02:52:19 EST 1994 jrichard@cs.uml.edu (John Richardson)
* [objects/bitblt.c]
Added in three functions to do stretching and compression
for WHITEONBLACK, BLACKONWHITE, and color copies.
Tue Feb 22 15:01:31 EST 1994 jrichard@cs.uml.edu (John Richardson)
* [windows/graphics.c]
Added FloodFill and FloodFill_rec. FloodFill_rec is pretty
inefficent, but should suffice for now.
* [include/windows.h]
Changed the x,y paramaters for the FloodFill prototype
from ints to shorts
Tue Feb 22 00:58:28 MET 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [windows/widgets.c]
Added desktop window class.
* [windows/painting.c]
Bug fix in RedrawWindow().
Implemented ExcludeUpdateRgn().
* [windows/win.c] [windows/winpos.c]
Implemented desktop window.
* [controls/desktop.c]
Preliminary desktop window procedure.
Feb 20, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [controls/menu.c]
New function LoadMenuIndirect().
New function GetMenuCheckMarkDimensions().
* [if1632/user.spec]
Entry for DefDlgProc().
* [windows/class.c]
Fix bug in RegisterClass() :
WNDCLASS->lpszMenuName was reset to NULL.
* [windows/win.c]
In CreateWindowEx(), if hMenu == 0 then use
wndclass->lpszMenuName to load Menu from resource;
Mon Feb 21 22:38:28 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [loader/library.c] [loader/wine.c]
Fixed runing DLL's as main executable problem.
* [misc/dos_fs.c]
Added wildcard support in DOS_readdir().
* [misc/winsocket.c]
Added proper error handling of BSD winsocket functions.
* [miscemu/int21.c]
KERNEL_DOS3Call renamed to DOS3Call and modified to use do_int21().
* [main/main.c]
Added functions for GetVersion, GetWinFlags and GetTimerResolution
for libwine.a, SystemParametersInfo() partly implemented.
Tue Feb 22 19:00:02 1994 Miguel de Icaza (miguel@xochitl.nuclecu.unam.mx)
* [toolkit/winmain.c]
Added _WinMain function. Setups the library (calls USER_InitApp).
* [toolkit/sup.c]
Added load_mz_header, load_ne_header, load_type_info and
load_name_info functions.
* [toolkit/heap.c]
Code cleanup.
* [misc/user.c]
Moved from loader/misc.c. I hope to put back all the loader
functions in the ~loader subdirectory in the future. CUrrently is
needed since it has USER_InitApp.
* [misc/resource.c]
Since WineLib will probably need DLLs (currently it needs
Sysres.dll). WineLib will be using much code of the loader again.
So I removed some ifdefs that were used by WineLib.
Added load_typeinfo and load_nameinfo (and the corresponding
functions in [toolkit/sup.c]
Added integer convertion functions in the needed places.
Added very ugly patch (includes wine.c). In the next release I
plan to move back all the loader routines to ~/loader. In the
meantime I needed this patch. It doesn't affect any of the
emulator code (its ifdefed for WineLib).
* [misc/main.c]
Cleaned up call to WinMain (now uses [toolkit/winmain.c]
Ifdefed argument number checking when compiling the library.
* [loader/wine.c]
Modified to use load_(mz|ne)_header instead of doing a direct
read. When compiling the emulator it still uses the direct read
for performance.
* [include/wine.h]
Prototypes for loading routines.
* [include/class.h]
Added WINE_PACKED macro instead of __attribute__ ((packed))
* [include/arch.h]
Macros for converting integers (Little endian to big-endian).
Needed in the Sun to allow loading of DLL files.
----------------------------------------------------------------------
Mon Feb 14 23:48:09 MET 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [windows/clipping.c]
Moved everything into windows/painting.c and removed this file.
* [windows/message.c]
Removed calls to memmove() in MSG_RemoveMsg().
* [windows/nonclient.c]
Added WM_GETMINMAXINFO support for window resizing.
* [windows/painting.c]
Implemented RedrawWindow().
* [windows/scroll.c]
Bug fix in ScrollWindowEx().
* [windows/win.c]
Moved UpdateWindow() to windows/painting.c.
Fri Feb 11 12:41:28 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [loader/wine.c] [misc/dos_fs.c]
getenv() eq NULL bugfixes.
* [misc/comm.c]
cfmakeraw changed for SunOS.
Feb 13, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [mem/atom.c]
Bug fix in ATOM_DeleteAtom() :
change LocalFree() by USER_HEAP_FREE().
* [misc/message.c]
New function FatalAppExit().
* [objects/font.c]
New empty stub SetMapperFlags().
* [controls/menu.c]
Better CheckMark & other bitmaps placement.
* [windows/graphics.c]
New function RoundRect() : calc.exe now working...
Tue Feb 15 14:29:37 1994 John Richardson
* [objects/bitblt.c]
Fixed StretchBlt so it works quicker and faster. It still doesn't
use the StretchMode bits for bitmap compression, but that will
come soon.
Mon Feb 14 13:21:04 1994 Miguel de Icaza (miguel@roxanne.nuclecu.unam.mx)
* [include/windows.h,dialog.h,gdi.h]
Changed __atribute__ ((packed)) for WINE_PACKED.
When compiling the library this is defined as nothing. This gets
rid with all the problems compiling under SunOS. Also
* [windows/utility.c]
Added DebugPrintString.
* [toolkit/sup.c]
Added hSysRes = 1 definition to resolve externals.
Added CallLineDDAProc function (toolkit version).
Added toy, and hi ineficient memmove until code in message.c get
rewritten.
* [objects/gdiobj.c]
Ifdefed linux/emulator-dependent code to allow compilation of
WineLib.
* [misc/winsocket.c]
Added ifdef to allow compilation under SunOS.
* [misc/resource.c]
When compiling the library, the resource file is expected to be in
a file called $argv[0].Res. Also the information of the resource
is expected to be at offset 0 of the .Res file.
* [misc/main.c]
Call WinMain with arguments if compiling WineLib.
Call shutdown functions (Comm_DeInit, DOS_DeInitFS).
Call sync_profiles to preserve changes to .INI files.
* [misc/comm.c,dos_fs.c]
removed call to atexit(Comm_DeInit)
removed call to atexit(DOS_DeInitFS)
Shutdown functions are now called from the return of WinMain
* removed memorylib subdirectory
* moved memory/atom.c to misc/atom.c
moved memorylib/heap.c to toolkit/heap.c
* [loader/wine.c]
Moved DebugPrintString to windows/utility.c
* [include/winsock.h]
Define SO_DONTLINGER only if it has not been previously defined.
* [include/windows.h]
added definition for DLGPROC.
added definition for LMEM_WINE_ALIGN and other LMEM_* constants.
When compiling WineLib WNDPROC is defined with all the parameters
to avoid compilation problems.
* [include/user.h]
When compiling WineLib USER_HEAP_(ALLOC|REALLOC|ADDR|FREE) the
calls are translated to the library allocation routines.
* [include/gdi.h,user.h]
When compiling WineLib GDI_HEAP_(ALLOC|ADDR|FREE) the calls are
translated to the library allocation routines.
* [include/atom.h]
Defined LocalAlign. When compiling the emulator it's translated as
a call to LocalAlloc (the original code), when compiling WineLib
as a call to LocalAlloc with a WINE-flag called LMEM_WINE_ALIGN
(atom.c needs aligned data on a 4 byte boundary).
* [misc/file.c]
Renamed KERNEL_* functions and fixed prototypes.
* [if1632/kernel.spec]
Renamed KERNEL_* functions in order to be used by applications
using Wine as a library (OpeFile, _lclose, _lread, _lcreate,
_llseek, _lopen, _lwrite).
* [Makefile]
Create library instead of executable when building target
libwine.a
----------------------------------------------------------------------
Tue Feb 8 13:52:11 1994 Miguel de Icaza (miguel@roxanne)
* [Makefiles]
Use $(CC) instead of cc.
Added libwine target.
* [include/prototypes]
#ifdefed section for WineLib
* moved loader/cursor.c to misc/cursor.c
moved loader/resource.c to misc/resource.c
moved misc/emulate.c to miscemu/emulate.c
moved misc/int1a.c to miscemu/int1a.c
moved misc/int21.c to miscemu/int21.c
moved misc/kernel.c to miscemu/kernel.c
moved misc/user.c to miscemu/user.c
* [memorylib/heap.c]
Heap management for WineLib
* [misc/comm.c]
Modified to allow compilation under SunOS (#include errno, SunOS
doesn't have atexit ()).
* [misc/dos_fs.c]
Modified to allow compilation under SunOS (#include vfs.h)
* [misc/file.c]
Modified to allow compilation under SunOS (OPEN_MAX constant,
#include unistd.h)
* [objects/palette.c]
Modified to allow compilation under SunOS (#include limits)
* [toolkit/sup.c]
WineLib version of CallWindowProc.
* [windows/event.c]
Typedef XPointer under X11R4 (OpenWindows).
* [windows/win.c]
When compiling WineLib, use direct callbacks instead of the
windows supplied callbacks.
Mon Feb 7 22:37:34 MET 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
New function CURSOR_SetWinCursor(), for internal use, to set
the cursor of a specific window more reliably than with SetCursor().
* [windows/nonclient.c]
Better window management. Moving and resizing from the system
menu should work now.
Added scroll-bar mouse tracking.
* [windows/win.c]
Moved scroll-bar creation and destruction to defwnd.c.
Feb 5, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/nonclient.c]
Call to StdDrawMenuBar() during NC's drawing.
New NC_TrackMouseMenuBar() function which call
MenuButtonDown(), MenuButtonUp() & MenuMouseMove().
* [controls/menu.c]
New ChangeMenu() function.
Remove permanently old Xt menu code.
Make common functions MenuButtonDown(), MenuButtonUp()
& MenuMouseMove() for both popups & menubar.
* [controls/combo.c]
Paint OBM_COMBO directly in combo client.
* [controls/listbox.c]
Fix bug in multicolumns calculations.
* [controls/Makefile]
Remove rules for old file 'caption.c'.
* [misc/kernel.c]
Remove empty stub GetModuleFileName().
* [loader/library.c]
New GetModuleHandle() function.
New GetModuleUsage() function.
New GetModuleFileName() function.
* [loader/resource.c]
Try to find the bug a missing menu loading ... Not found yet !
* [windows/win.c]
Remove old menubar creation.
Thu Feb 3 22:30:11 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/winsocket.c]
More functions added.
* [if1632/winsock.spec] [misc/winsocket.c]
Added John Brezak's winsock.dll stuff.
----------------------------------------------------------------------
Tue Feb 1 21:14:47 1994 Bob Amstadt (bob@pooh)
* [loader/selector.c]
......@@ -58,7 +510,7 @@ Jan 31, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
New GetSubMenu() function.
Move GetMenu() & SetMenu() functions from 'windows/win.c'.
* [controls/combo.c]
* [controls/listbox.c]
Start changes to satisfy recent changes in scrollbars/windows.
* [loader/resource.c]
......
#! /bin/sh
ALLDEFINES=''
echo -n 'Build Wine as emulator or library (E/L) [E]? '
read input
if [ "$input" = 'l' -o "$input" = 'L' ]
then
WINELIB='#define WineLib -DWINELIB'
ALLDEFINES=$ALLDEFINES -DWINELIB
else
WINELIB=''
fi
echo -n 'Short filenames (Y/N) [N]? '
read input
if [ "$input" = 'y' -o "$input" = 'Y' ]
then
SHORTNAMES='#define ShortNames -DSHORTNAMES'
ALLDEFINES=$ALLDEFINES -DSHORTNAMES
else
SHORTNAMES=''
fi
echo '/* autoconf.h generated automatically. Run Configure. */' > autoconf.h
echo $WINELIB >> autoconf.h
echo $SHORTNAMES >> autoconf.h
echo "#define AutoDefines $ALLDEFINES" >> autoconf.h
xmkmf -a
#include "autoconf.h"
#include "Wine.tmpl"
#if defined(i386FreeBsd)
MAKE = gmake
CC = gcc -D__FreeBSD__
#endif
DEFINES = AutoDefines -DUSE_READLINE -DWINESTAT
/*
* This is the second try at using Imakefiles. There are probably many
* problems and things I haven't even considered. I do not have a fixed
......@@ -12,66 +20,76 @@
*/
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'CC=$(CC)'
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'CC=$(CC)' 'MAKE=$(MAKE)'\
'DEFINES=$(DEFINES)'
SUBDIRS = \
tools \
COMMONSUBDIRS = \
controls \
etc \
if1632 \
include \
loader \
memory \
misc \
objects \
test \
windows
/*
* due to me not having the time and resources to test this, debugging
* has been left out by for now of the Imakefiles. To put it back you have
* to add:
* debugger
* to the SUBDIRS list and:
* debugger
* readline.o
* to the OBJS list.
*
* Not doing this will make the build fail in loader/signal.c, with an
* unresolved reference to wine_debug. Comment out the line for now...
* sigh. Fixed soon.
*/
EMUSUBDIRS = \
tools \
debugger \
if1632 \
loader \
memory \
miscemu
LIBSUBDIRS = \
toolkit
WINEDIR = $(LIBDIR)/wine
OBJS = \
if1632.o \
COMMONOBJS = \
controls.o \
loader.o \
memory.o \
misc.o \
objects.o \
windows.o
#ifdef i386BsdArchitecture
SYSLIBS = -ll -lm -li386 -lgnumalloc
/*
* WARNING: if1632.o must be the first object file because its code must be
* linked at the lowest possible addresses.
*/
EMUOBJS = \
if1632.o \
debugger.o \
loader.o \
memory.o \
miscemu.o \
readline.o
LIBOBJS = \
toolkit.o
#ifndef WINELIB
SUBDIRS = $(COMMONSUBDIRS) $(EMUSUBDIRS)
OBJS = $(COMMONOBJS) $(EMUOBJS)
#else
#ifdef LinuxArchitecture
SYSLIBS = -lm
SUBDIRS = $(COMMONSUBDIRS) $(LIBSUBDIRS)
OBJS = $(COMMONOBJS) $(LIBOBJS)
#endif
#if defined(i386BsdArchitecture)
SYSLIBS = -ll -lm -li386 -lgnumalloc
#elif defined(i386FreeBsd)
SYSLIBS = -ll -lm -lgnumalloc
#elif defined(LinuxArchitecture)
SYSLIBS = -lm -lg
#endif
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
#ifdef i386BsdArchitecture
AllTarget(wine)
#endif
NormalProgramTarget(wine,$(OBJS),XawClientDepLibs,XawClientLibs,$(SYSLIBS))
#ifdef LinuxArchitecture
AllTarget(wine)
#ifndef WINELIB
NormalProgramTarget(wine,$(EMUOBJS) $(COMMONOBJS),$(DEPXLIB),$(XLIB),$(SYSLIBS))
#else
NormalLibraryTarget(wine,$(LIBOBJS) $(COMMONOBJS))
#endif
depend::
......
######################################################################
# These variables are inherited by the sub-makefiles
DEBUGOPTS=
COPTS=-O2 -m486
INCLUDE_DIR=include
LDFLAGS=
######################################################################
# These definitions are for the top level
TARGET=wine
LIBS=-L/usr/X386/lib -lX11 -lm
OBJS=if1632/if1632.o controls/controls.o loader/loader.o \
memory/memory.o misc/misc.o objects/objects.o windows/windows.o debugger/debugger.o
SUBDIRS=if1632 controls loader memory misc objects windows debugger
TAGFILES=if1632/{*.c,*.S} controls/{*.c,*.S} loader/{*.c,*.S} \
memory/{*.c,*.S} misc/{*.c,*.S} objects/{*.c,*.S} \
windows/{*.c,*.S} debugger/{*.c,*.S}
all: $(TARGET)
dummy:
tags:
etags $(TAGFILES)
clean:
rm -f *~ *.o *#
@for i in tools $(SUBDIRS); do (cd $$i && $(MAKE) clean) || exit; done
patchclean:
rm -f `find . -name '*.orig' -o -name '*.rej'`
$(TARGET): dummy
@for i in tools $(SUBDIRS); \
do (cd $$i && echo $$i && $(MAKE) INCLUDE_DIR=../$(INCLUDE_DIR) \
COPTS="$(COPTS)" DEBUGOPTS="$(DEBUGOPTS)") || exit; done
$(CC) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
depend:
@for i in tools $(SUBDIRS); \
do (cd $$i && echo $$i && \
$(MAKE) INCLUDE_DIR=../$(INCLUDE_DIR) COPTS="$(COPTS)" depend) \
|| exit; done
......@@ -4,23 +4,16 @@ LICENSE unless explicitly stated in the individual source file.
INSTALLATION:
Linux:
You must have one of:
Uncompress and untar this archive into the directory of your
choice. This release requires a Linux version 0.99 pl13 kernel
or above.
Linux version 0.99.13 or above
NetBSD-current
FreeBSD-current or FreeBSD 1.1
NetBSD:
If you use BSD make rather than GNU make, you must apply the patches
in the file "bsdmake.patch". This release requires NetBSD-current.
All:
To build Wine, first do a "make depend" and then a "make". The
To build Wine, first do a "./Configure" and then a "make". The
executable "wine" will be built. "wine" will load and run Windows'
executables. You must have a file "wine.ini" in the current directory,
your homedirectory, or in the path specified by the environment
your home directory, or in the path specified by the environment
variable WINEPATH. Multiple directories in WINEPATH should be seperated
by semi-colons and NOT by colons!
......@@ -41,6 +34,31 @@ For example: to run Windows' solitaire:
Have a nice game of solitaire, but be careful. Emulation isn't perfect.
So, occassionally it will crash.
WHAT'S NEW with Wine-940301: (see ChangeLog for details)
- NEW Configure script to set compile time options!
- Support for filesystems with short (less than 14 chars) filenames.
- Clipboard functions!
- and more...
WHAT'S NEW with Wine-940223: (see ChangeLog for details)
- FreeBSD support
- FloodFill()
- Desktop window support
- Menu fixes
- and more...
WHAT'S NEW with Wine-940216: (see ChangeLog for details)
- Many many bug fixes
- Switched to using Imakefile's instead of Makefile's.
- Lot's of changes for libwine.a
WHAT'S NEW with Wine-940209: (see ChangeLog for details)
- Many many bug fixes
- Minor directory structure reorganization
- New GetModule*() functions.
- WINSOCK DLL
- First stab at Wine as a library
WHAT'S NEW with Wine-940201: (see ChangeLog for details)
- Support for huge data structures.
- FreeBSD support.
......
......@@ -6,13 +6,22 @@ XCOMM Imake rules go here
XCOMM First, dll description to files etc
#ifndef MakeDllFromSpec
#ifndef ShortNames
#define MakeDllFromSpec(name,objfile) @@\
objfile.o: Concat(dll_,name.o) Concat3(dll_,name,_tab.o) @@\
@@\
Concat(dll_,name.S) Concat3(dll_,name,_tab.c): name.spec $(TOP)/tools/build @@\
$(TOP)/tools/build name.spec @@\
#endif
#else
#define MakeDllFromSpec(name,objfile) @@\
objfile.o: Concat(dll_,name.o) Concat(dtb_,name.o) @@\
@@\
Concat(dll_,name.S) Concat(dtb_,name.c): name.spec $(TOP)/tools/build @@\
$(TOP)/tools/build name.spec @@\
#endif /* SHORTNAMES */
#endif /* MakeDllFromSpec */
/*
* WineRelocatableTarget - generate rules to produce a relocatable object
......
/* autoconf.h generated automatically. Run Configure. */
#error You must run Configure before you can build the makefiles.
*** Makefile.orig Tue Jan 18 12:36:47 1994
--- Makefile Mon Jan 24 22:34:06 1994
***************
*** 8,14 ****
######################################################################
# These definitions are for the top level
TARGET=wine
! LIBS=-L/usr/X386/lib -lX11 -lm
OBJS=if1632/if1632.o controls/controls.o loader/loader.o \
memory/memory.o misc/misc.o objects/objects.o windows/windows.o debugger/debugger.o
SUBDIRS=if1632 controls loader memory misc objects windows debugger
--- 8,14 ----
######################################################################
# These definitions are for the top level
TARGET=wine
! LIBS=-L/usr/X386/lib -lX11 -lm -li386 -lgnumalloc -ll
OBJS=if1632/if1632.o controls/controls.o loader/loader.o \
memory/memory.o misc/misc.o objects/objects.o windows/windows.o debugger/debugger.o
SUBDIRS=if1632 controls loader memory misc objects windows debugger
diff -ruN ../Backup//controls/Makefile ./controls/Makefile
--- ../Backup//controls/Makefile Sat Sep 11 22:13:44 1993
+++ ./controls/Makefile Thu Sep 16 10:00:24 1993
@@ -14,6 +14,7 @@
depend:
$(CC) $(CFLAGS) -M *.c > .depend
-ifeq (.depend,$(wildcard .depend))
-include .depend
-endif
+.if exists(.depend)
+.include ".depend"
+.endif
+
diff -ruN ../Backup//if1632/Makefile ./if1632/Makefile
--- ../Backup//if1632/Makefile Tue Sep 14 08:56:17 1993
+++ ./if1632/Makefile Thu Sep 16 10:00:24 1993
@@ -45,9 +45,9 @@
depend:
$(CC) $(CFLAGS) -M *.c > .depend
-ifeq (.depend,$(wildcard .depend))
-include .depend
-endif
+.if exists(.depend)
+.include ".depend"
+.endif
diff -ruN ../Backup//loader/Makefile ./loader/Makefile
--- ../Backup//loader/Makefile Sat Sep 11 21:42:05 1993
+++ ./loader/Makefile Thu Sep 16 10:00:24 1993
@@ -13,6 +13,6 @@
depend:
$(CC) $(CFLAGS) -M *.c > .depend
-ifeq (.depend,$(wildcard .depend))
-include .depend
-endif
+.if exists(.depend)
+.include ".depend"
+.endif
diff -ruN ../Backup//memory/Makefile ./memory/Makefile
--- ../Backup//memory/Makefile Sat Sep 11 21:42:05 1993
+++ ./memory/Makefile Thu Sep 16 10:00:24 1993
@@ -13,6 +13,6 @@
depend:
$(CC) $(CFLAGS) -M *.c > .depend
-ifeq (.depend,$(wildcard .depend))
-include .depend
-endif
+.if exists(.depend)
+.include ".depend"
+.endif
diff -ruN ../Backup//misc/Makefile ./misc/Makefile
--- ../Backup//misc/Makefile Tue Sep 14 09:17:00 1993
+++ ./misc/Makefile Thu Sep 16 10:00:24 1993
@@ -14,6 +14,6 @@
depend:
$(CC) $(CFLAGS) -M *.c > .depend
-ifeq (.depend,$(wildcard .depend))
-include .depend
-endif
+.if exists(.depend)
+.include ".depend"
+.endif
diff -ruN ../Backup//objects/Makefile ./objects/Makefile
--- ../Backup//objects/Makefile Tue Sep 14 13:59:04 1993
+++ ./objects/Makefile Thu Sep 16 10:00:24 1993
@@ -14,6 +14,6 @@
depend:
$(CC) $(CFLAGS) -M *.c > .depend
-ifeq (.depend,$(wildcard .depend))
-include .depend
-endif
+.if exists(.depend)
+.include ".depend"
+.endif
diff -ruN ../Backup//tools/Makefile ./tools/Makefile
--- ../Backup//tools/Makefile Tue Sep 14 09:46:40 1993
+++ ./tools/Makefile Thu Sep 16 10:00:24 1993
@@ -14,6 +14,10 @@
#
# Dependency lists
#
-ifeq (.depend,$(wildcard .depend))
-include .depend
-endif
+.if exists(.depend)
+.include ".depend"
+.endif
+
+#ifeq (.depend,$(wildcard .depend))
+#include .depend
+#endif
diff -ruN ../Backup//windows/Makefile ./windows/Makefile
--- ../Backup//windows/Makefile Tue Sep 14 08:39:45 1993
+++ ./windows/Makefile Thu Sep 16 10:00:24 1993
@@ -14,6 +14,6 @@
depend:
$(CC) $(CFLAGS) -M *.c > .depend
-ifeq (.depend,$(wildcard .depend))
-include .depend
-endif
+.if exists(.depend)
+.include ".depend"
+.endif
--- debugger/Makefile.orig Thu Sep 30 07:29:39 1993
+++ debugger/Makefile Thu Sep 30 07:27:00 1993
@@ -37,3 +37,6 @@
depend: dbg.tab.c dbg.tab.h lex.yy.c
$(CC) $(CFLAGS) -M *.c > .depend
+.if exists(.depend)
+.include ".depend"
+.endif
......@@ -4,23 +4,15 @@ MODULE = controls
SRCS = \
button.c \
caption.c \
combo.c \
listbox.c \
menu.c \
scroll.c \
static.c \
desktop.c \
widgets.c
OBJS = \
button.o \
caption.o \
combo.o \
listbox.o \
menu.o \
scroll.o \
static.o \
widgets.o
OBJS = $(SRCS:.c=.o)
WineRelocatableTarget($(TOP)/$(MODULE),,$(OBJS))
DependTarget()
......
CFLAGS=$(COPTS) $(DEBUGOPTS) -I$(INCLUDE_DIR)
OBJS = menu.o caption.o widgets.o button.o \
scroll.o listbox.o combo.o static.o
default: controls.o
controls.o: $(OBJS)
$(LD) -r -o controls.o $(OBJS)
clean:
rm -f *.o *~ *.s dll_* *.a *#
depend:
$(CC) $(CFLAGS) -M *.c > .depend
ifeq (.depend,$(wildcard .depend))
include .depend
endif
/*
* Interface code to CAPTION widget
*
* Copyright Martin Ayotte, 1994
*
*/
/*
#define DEBUG_CAPTION
*/
static char Copyright[] = "Copyright Martin Ayotte, 1994";
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include "windows.h"
#include "caption.h"
#include "heap.h"
#include "win.h"
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
HBITMAP hStdClose = (HBITMAP)NULL;
HBITMAP hStdCloseD = (HBITMAP)NULL;
HBITMAP hStdMinim = (HBITMAP)NULL;
HBITMAP hStdMinimD = (HBITMAP)NULL;
HBITMAP hStdMaxim = (HBITMAP)NULL;
HBITMAP hStdMaximD = (HBITMAP)NULL;
HMENU hStdSysMenu = (HMENU)NULL;
LPHEADCAPTION CaptionBarGetWindowAndStorage(HWND hWnd, WND **wndPtr);
LPHEADCAPTION CaptionBarGetStorageHeader(HWND hWnd);
void SetMenuLogicalParent(HMENU hMenu, HWND hWnd);
/***********************************************************************
* CaptionBarWndProc
*/
LONG CaptionBarWndProc( HWND hWnd, WORD message, WORD wParam, LONG lParam )
{
WORD wRet;
short x, y;
short width, height;
WND *wndPtr;
LPHEADCAPTION lphs;
PAINTSTRUCT ps;
HDC hDC;
HDC hMemDC;
BITMAP bm;
RECT rect;
char str[128];
switch(message)
{
case WM_CREATE:
wndPtr = WIN_FindWndPtr(hWnd);
lphs = (LPHEADCAPTION)malloc(sizeof(HEADCAPTION));
if (lphs == 0) {
printf("Bad Memory Alloc on CAPTIONBAR !\n");
return 0;
}
memset(lphs, 0, sizeof(HEADCAPTION));
#ifdef DEBUG_CAPTION
printf("CreateCaptionBarStruct %lX !\n", lphs);
#endif
*((LPHEADCAPTION *)&wndPtr->wExtra[1]) = lphs;
if (hStdClose == (HBITMAP)NULL)
hStdClose = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_CLOSE));
lphs->hClose = hStdClose;
if (hStdMinim == (HBITMAP)NULL)
hStdMinim = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_REDUCE));
lphs->hMinim = hStdMinim;
if (hStdMaxim == (HBITMAP)NULL)
hStdMaxim = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_RESTORE));
lphs->hMaxim = hStdMaxim;
if (hStdCloseD == (HBITMAP)NULL)
hStdCloseD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_CLOSE));
if (hStdMinimD == (HBITMAP)NULL)
hStdMinimD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_REDUCED));
if (hStdMaximD == (HBITMAP)NULL)
hStdMaximD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_RESTORED));
if (hStdSysMenu == (HBITMAP)NULL)
hStdSysMenu = LoadMenu((HINSTANCE)NULL, "SYSMENU");
lphs->hSysMenu = hStdSysMenu;
printf("CaptionBar SYSMENU %04X !\n", lphs->hSysMenu);
if (lphs->hSysMenu == 0) lphs->hSysMenu = CreatePopupMenu();
AppendMenu(lphs->hSysMenu, MF_STRING, 9999, "About &Wine ...");
GetClientRect(hWnd, &rect);
CopyRect(&lphs->rectClose, &rect);
CopyRect(&lphs->rectMaxim, &rect);
lphs->rectClose.right = lphs->rectClose.left +
lphs->rectClose.bottom + lphs->rectClose.top;
lphs->rectMaxim.left = lphs->rectMaxim.right -
lphs->rectMaxim.bottom + lphs->rectMaxim.top;
CopyRect(&lphs->rectMinim, &lphs->rectMaxim);
if (lphs->hMaxim != 0) {
lphs->rectMinim.left = lphs->rectMaxim.bottom + lphs->rectMaxim.top;
lphs->rectMinim.right = lphs->rectMaxim.bottom + lphs->rectMaxim.top;
}
if (lphs->hClose == 0) lphs->rectClose.right = lphs->rectClose.left;
printf("CAPTION Close.right=%d Maxim.left=%d Minim.left=%d !\n",
lphs->rectClose.right, lphs->rectMaxim.left, lphs->rectMinim.left);
return 0;
case WM_DESTROY:
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
if (lphs == 0) return 0;
#ifdef DEBUG_CAPTION
printf("CaptionBar WM_DESTROY %lX !\n", lphs);
#endif
DestroyMenu(lphs->hSysMenu);
free(lphs);
*((LPHEADCAPTION *)&wndPtr->wExtra[1]) = 0;
return 0;
case WM_COMMAND:
#ifdef DEBUG_CAPTION
printf("CaptionBar WM_COMMAND %04X %08X !\n", wParam, lParam);
#endif
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
if (wParam == 9999) {
printf("CaptionBar Show 'About Wine ...' !\n");
}
SendMessage(wndPtr->hwndParent, message, wParam, lParam);
break;
case WM_SIZE:
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
width = LOWORD(lParam);
height = HIWORD(lParam);
if (lphs->hClose != 0)
SetRect(&lphs->rectClose, 0, 0, height, height);
if (lphs->hMinim != 0) {
if (lphs->hMaxim != 0)
SetRect(&lphs->rectMinim, width - 2 * height, 0,
width - height, height);
else
SetRect(&lphs->rectMinim, width - height, 0, width, height);
}
if (lphs->hMaxim != 0)
SetRect(&lphs->rectMaxim, width - height, 0, width, height);
break;
case WM_LBUTTONDOWN:
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
SetCapture(hWnd);
x = LOWORD(lParam);
y = HIWORD(lParam);
hDC = GetDC(hWnd);
if (x > lphs->rectClose.left && x < lphs->rectClose.right) {
lphs->hClose = hStdCloseD;
InvalidateRect(hWnd, &lphs->rectClose, TRUE);
UpdateWindow(hWnd);
}
if (x > lphs->rectMinim.left && x < lphs->rectMinim.right) {
lphs->hMinim = hStdMinimD;
InvalidateRect(hWnd, &lphs->rectMinim, TRUE);
UpdateWindow(hWnd);
}
if (x > lphs->rectMaxim.left && x < lphs->rectMaxim.right &&
lphs->hMaxim != 0) {
lphs->hMaxim = hStdMaximD;
InvalidateRect(hWnd, &lphs->rectMaxim, TRUE);
UpdateWindow(hWnd);
}
ReleaseDC(hWnd, hDC);
break;
case WM_LBUTTONUP:
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
ReleaseCapture();
#ifdef DEBUG_CAPTION
printf("CaptionBar WM_LBUTTONUP %lX !\n", lParam);
#endif
x = LOWORD(lParam);
y = HIWORD(lParam);
if (x > lphs->rectClose.left && x < lphs->rectClose.right) {
lphs->hClose = hStdClose;
InvalidateRect(hWnd, &lphs->rectClose, TRUE);
UpdateWindow(hWnd);
TrackPopupMenu(lphs->hSysMenu, TPM_LEFTBUTTON, 0, -20,
0, wndPtr->hwndParent, (LPRECT)NULL);
SetMenuLogicalParent(lphs->hSysMenu, hWnd);
printf("CAPTION Pop the SYSMENU !\n");
break;
}
if (x > lphs->rectMinim.left && x < lphs->rectMinim.right) {
SendMessage(wndPtr->hwndParent, WM_SYSCOMMAND, SC_MINIMIZE, 0L);
lphs->hMinim = hStdMinim;
InvalidateRect(hWnd, &lphs->rectMinim, TRUE);
UpdateWindow(hWnd);
printf("CAPTION Minimize Window !\n");
break;
}
if (x > lphs->rectMaxim.left && x < lphs->rectMaxim.right) {
lphs->hMaxim = hStdMaxim;
InvalidateRect(hWnd, &lphs->rectMaxim, TRUE);
UpdateWindow(hWnd);
SendMessage(wndPtr->hwndParent, WM_SYSCOMMAND, SC_MAXIMIZE, 0L);
printf("CAPTION Maximize Window !\n");
break;
}
break;
case WM_LBUTTONDBLCLK:
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
#ifdef DEBUG_CAPTION
printf("CaptionBar WM_LBUTTONDBLCLK %lX !\n", lParam);
#endif
x = LOWORD(lParam);
y = HIWORD(lParam);
if (x > lphs->rectClose.left && x < lphs->rectClose.right) {
SendMessage(wndPtr->hwndParent, WM_SYSCOMMAND, SC_CLOSE, 0L);
printf("CAPTION DoubleClick Close Window !\n");
break;
}
break;
case WM_KEYDOWN:
case WM_KEYUP:
case WM_CHAR:
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
return(SendMessage(wndPtr->hwndParent, message, wParam, lParam));
case WM_PAINT:
GetWindowRect(hWnd, &rect);
#ifdef DEBUG_CAPTION
printf("CaptionBar WM_PAINT left=%d top=%d right=%d bottom=%d !\n",
rect.left, rect.top, rect.right, rect.bottom);
#endif
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
hDC = BeginPaint(hWnd, &ps);
hMemDC = CreateCompatibleDC(hDC);
if (lphs->hClose != 0) {
GetObject(lphs->hClose, sizeof(BITMAP), (LPSTR)&bm);
SelectObject(hMemDC, lphs->hClose);
BitBlt(hDC, 0, 0, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
}
if (lphs->hMinim != 0) {
GetObject(lphs->hMinim, sizeof(BITMAP), (LPSTR)&bm);
SelectObject(hMemDC, lphs->hMinim);
BitBlt(hDC, lphs->rectMinim.left, 0, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
}
if (lphs->hMaxim != 0) {
GetObject(lphs->hMaxim, sizeof(BITMAP), (LPSTR)&bm);
SelectObject(hMemDC, lphs->hMaxim);
BitBlt(hDC, lphs->rectMaxim.left, 0, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
}
DeleteDC(hMemDC);
GetClientRect(hWnd, &rect);
FrameRect(hDC, &rect, GetStockObject(BLACK_BRUSH));
rect.left = lphs->rectClose.right;
rect.right = lphs->rectMinim.left;
#ifdef DEBUG_CAPTION
printf("CaptionBar WM_PAINT left=%d top=%d right=%d bottom=%d !\n",
rect.left, rect.top, rect.right, rect.bottom);
#endif
FillRect(hDC, &rect, GetStockObject(GRAY_BRUSH));
if (GetWindowTextLength(wndPtr->hwndParent) > 0) {
GetWindowText(wndPtr->hwndParent, str, sizeof(str));
width = GetTextExtent(hDC, str, strlen(str));
DrawText(hDC, str, -1, &rect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
}
EndPaint(hWnd, &ps);
break;
default:
return DefWindowProc( hWnd, message, wParam, lParam );
}
return(0);
}
LPHEADCAPTION CaptionBarGetWindowAndStorage(HWND hWnd, WND **wndPtr)
{
WND *Ptr;
LPHEADCAPTION lphs;
*(wndPtr) = Ptr = WIN_FindWndPtr(hWnd);
if (Ptr == 0) {
printf("Bad Window handle on CaptionBar !\n");
return 0;
}
lphs = *((LPHEADCAPTION *)&Ptr->wExtra[1]);
return lphs;
}
LPHEADCAPTION CaptionBarGetStorageHeader(HWND hWnd)
{
WND *wndPtr;
LPHEADCAPTION lphs;
wndPtr = WIN_FindWndPtr(hWnd);
if (wndPtr == 0) {
printf("Bad Window handle on CaptionBar !\n");
return 0;
}
lphs = *((LPHEADCAPTION *)&wndPtr->wExtra[1]);
return lphs;
}
......@@ -11,8 +11,6 @@
static char Copyright[] = "Copyright Martin Ayotte, 1993";
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include "windows.h"
#include "combo.h"
#include "heap.h"
......@@ -39,8 +37,7 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
int AltState;
WND *wndPtr;
LPHEADCOMBO lphc;
LPDRAWITEMSTRUCT lpdis;
HDC hMemDC;
HDC hDC, hMemDC;
BITMAP bm;
char str[128];
PAINTSTRUCT paintstruct;
......@@ -48,47 +45,48 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
switch(message)
{
case WM_CREATE:
ShowScrollBar(hwnd, SB_BOTH, FALSE);
GetClientRect(hwnd, &rect);
width = rect.right - rect.left;
height = rect.bottom - rect.top;
/* SetWindowPos(hwnd, 0, 0, 0, width, 16,
SWP_NOMOVE | SWP_NOZORDER); */
CreateComboStruct(hwnd);
wndPtr = WIN_FindWndPtr(hwnd);
lphc = ComboGetStorageHeader(hwnd);
if (lphc == NULL) return 0;
if (wndPtr == NULL) return 0;
#ifdef DEBUG_COMBO
printf("Combo WM_CREATE %lX !\n", lphc);
#endif
if (hComboBit == (HBITMAP)NULL)
hComboBit = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_COMBO));
lphc->hWndDrop = CreateWindow("BUTTON", "",
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE | BS_OWNERDRAW,
width - 16, 0, 16, 16, hwnd, 1, wndPtr->hInstance, 0L);
GetObject(hComboBit, sizeof(BITMAP), (LPSTR)&bm);
wndPtr->dwStyle &= 0xFFFFFFFFL ^ (WS_VSCROLL | WS_HSCROLL);
GetWindowRect(hwnd, &rect);
width = rect.right - rect.left;
height = rect.bottom - rect.top;
SetWindowPos(hwnd, 0, 0, 0, width + bm.bmHeight, bm.bmHeight,
SWP_NOMOVE | SWP_NOZORDER);
CreateComboStruct(hwnd);
lphc = ComboGetStorageHeader(hwnd);
if (lphc == NULL) return 0;
if (wndPtr->dwStyle & CBS_SIMPLE)
/* lphc->hWndEdit = CreateWindow("EDIT", "", */
lphc->hWndEdit = CreateWindow("STATIC", "",
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE | SS_LEFT,
0, 0, width - 16, 16, hwnd, 1, wndPtr->hInstance, 0L);
0, 0, width - bm.bmHeight, bm.bmHeight,
hwnd, 1, wndPtr->hInstance, 0L);
else
lphc->hWndEdit = CreateWindow("STATIC", "",
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE | SS_LEFT,
0, 0, width - 16, 16, hwnd, 1, wndPtr->hInstance, 0L);
0, 0, width - bm.bmHeight, bm.bmHeight,
hwnd, 1, wndPtr->hInstance, 0L);
lphc->hWndLBox = CreateWindow("LISTBOX", "",
WS_CHILD | WS_CLIPCHILDREN | WS_BORDER | WS_VSCROLL | LBS_NOTIFY,
wndPtr->rectClient.left, wndPtr->rectClient.top + 16, width, height,
wndPtr->hwndParent, 1, wndPtr->hInstance, (LPSTR)MAKELONG(0, hwnd));
wndPtr->rectClient.left, wndPtr->rectClient.top + bm.bmHeight,
width, height, wndPtr->hwndParent, 1,
wndPtr->hInstance, (LPSTR)MAKELONG(0, hwnd));
ShowWindow(lphc->hWndLBox, SW_HIDE);
#ifdef DEBUG_COMBO
printf("Combo Creation Drop=%X LBox=%X!\n", lphc->hWndDrop, lphc->hWndLBox);
printf("Combo Creation LBox=%X!\n", lphc->hWndLBox);
#endif
return 0;
case WM_DESTROY:
lphc = ComboGetStorageHeader(hwnd);
if (lphc == 0) return 0;
/*
DestroyWindow(lphc->hWndDrop);
DestroyWindow(lphc->hWndEdit);
*/
DestroyWindow(lphc->hWndLBox);
......@@ -106,30 +104,6 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
wndPtr = WIN_FindWndPtr(hwnd);
lphc = ComboGetStorageHeader(hwnd);
if (lphc == NULL) return 0;
if (LOWORD(lParam) == lphc->hWndDrop) {
if (HIWORD(lParam) != BN_CLICKED) return 0;
#ifdef DEBUG_COMBO
printf("CB_SHOWDROPDOWN !\n");
#endif
lphc->dwState = lphc->dwState ^ CB_SHOWDROPDOWN;
if ((lphc->dwState & CB_SHOWDROPDOWN) == CB_SHOWDROPDOWN) {
ShowWindow(lphc->hWndLBox, SW_SHOW);
/*
SetFocus(lphc->hWndLBox);
*/
}
else {
/*
SetFocus(lphc->hWndEdit);
*/
ShowWindow(lphc->hWndLBox, SW_HIDE);
y = SendMessage(lphc->hWndLBox, LB_GETCURSEL, 0, 0L);
if (y != LB_ERR) {
SendMessage(lphc->hWndLBox, LB_GETTEXT, (WORD)y, (LPARAM)str);
SendMessage(lphc->hWndEdit, WM_SETTEXT, (WORD)y, (LPARAM)str);
}
}
}
if (LOWORD(lParam) == lphc->hWndLBox) {
switch(HIWORD(lParam))
{
......@@ -153,13 +127,39 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
break;
case WM_LBUTTONDOWN:
printf("Combo WM_LBUTTONDOWN wParam=%x lParam=%lX !\n", wParam, lParam);
GetClientRect(hwnd, &rect);
rect.left = rect.right - (rect.bottom - rect.top);
hDC = GetDC(hwnd);
InflateRect(&rect, -1, -1);
DrawReliefRect(hDC, rect, 1, 1);
ReleaseDC(hwnd, hDC);
wndPtr = WIN_FindWndPtr(hwnd);
lphc = ComboGetStorageHeader(hwnd);
lphc->dwState = lphc->dwState ^ CB_SHOWDROPDOWN;
if ((lphc->dwState & CB_SHOWDROPDOWN) == CB_SHOWDROPDOWN)
ShowWindow(lphc->hWndLBox, SW_SHOW);
else {
/*
SetFocus(lphc->hWndEdit);
*/
ShowWindow(lphc->hWndLBox, SW_HIDE);
y = SendMessage(lphc->hWndLBox, LB_GETCURSEL, 0, 0L);
if (y != LB_ERR) {
SendMessage(lphc->hWndLBox, LB_GETTEXT, (WORD)y, (LPARAM)str);
SendMessage(lphc->hWndEdit, WM_SETTEXT, (WORD)y, (LPARAM)str);
}
}
break;
case WM_LBUTTONUP:
printf("Combo WM_LBUTTONUP wParam=%x lParam=%lX !\n", wParam, lParam);
GetClientRect(hwnd, &rect);
rect.left = rect.right - (rect.bottom - rect.top);
hDC = GetDC(hwnd);
InflateRect(&rect, -1, -1);
DrawReliefRect(hDC, rect, 1, 0);
ReleaseDC(hwnd, hDC);
break;
case WM_KEYDOWN:
case WM_KEYDOWN:
wndPtr = WIN_FindWndPtr(hwnd);
lphc = ComboGetStorageHeader(hwnd);
y = SendMessage(lphc->hWndLBox, LB_GETCURSEL, 0, 0L);
......@@ -206,32 +206,19 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
break;
case WM_CTLCOLOR:
return(SendMessage(GetParent(hwnd), WM_CTLCOLOR, wParam, lParam));
case WM_DRAWITEM:
#ifdef DEBUG_SCROLL
printf("ComboBox WM_DRAWITEM w=%04X l=%08X\n", wParam, lParam);
#endif
lpdis = (LPDRAWITEMSTRUCT)lParam;
if (lpdis->CtlType == ODT_BUTTON && lpdis->itemAction == ODA_DRAWENTIRE) {
hMemDC = CreateCompatibleDC(lpdis->hDC);
GetObject(hComboBit, sizeof(BITMAP), (LPSTR)&bm);
SelectObject(hMemDC, hComboBit);
BitBlt(lpdis->hDC, 0, 0, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
DeleteDC(hMemDC);
}
if (lpdis->CtlType == ODT_BUTTON && lpdis->itemAction == ODA_SELECT) {
CopyRect(&rect, &lpdis->rcItem);
InflateRect(&rect, -1, -1);
DrawReliefRect(lpdis->hDC, rect, 1, 1);
}
break;
case WM_PAINT:
BeginPaint( hwnd, &paintstruct );
EndPaint( hwnd, &paintstruct );
GetClientRect(hwnd, &rect);
hDC = BeginPaint(hwnd, &paintstruct);
hMemDC = CreateCompatibleDC(hDC);
GetObject(hComboBit, sizeof(BITMAP), (LPSTR)&bm);
SelectObject(hMemDC, hComboBit);
BitBlt(hDC, rect.right - bm.bmWidth, 0,
bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
DeleteDC(hMemDC);
EndPaint(hwnd, &paintstruct);
lphc = ComboGetStorageHeader(hwnd);
InvalidateRect(lphc->hWndEdit, NULL, TRUE);
UpdateWindow(lphc->hWndEdit);
InvalidateRect(lphc->hWndDrop, NULL, TRUE);
UpdateWindow(lphc->hWndDrop);
if ((lphc->dwState & CB_SHOWDROPDOWN) == CB_SHOWDROPDOWN) {
InvalidateRect(lphc->hWndLBox, NULL, TRUE);
UpdateWindow(lphc->hWndLBox);
......
/*
* Desktop window class.
*
* Copyright 1994 Alexandre Julliard
*/
static char Copyright[] = "Copyright Alexandre Julliard, 1994";
#include "windows.h"
LONG DesktopWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam )
{
/* Most messages are ignored (we DON'T call DefWindowProc) */
switch(message)
{
}
return 0;
}
......@@ -12,8 +12,6 @@
static char Copyright[] = "Copyright Martin Ayotte, 1993";
#include <stdio.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
......@@ -87,14 +85,11 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
SetScrollRange(hwnd, SB_HORZ, 1, 1, TRUE);
ShowScrollBar(hwnd, SB_HORZ, FALSE);
}
if (wndPtr->hCursor == (HCURSOR)NULL)
wndPtr->hCursor = LoadCursor((HINSTANCE)NULL, IDC_ARROW);
return 0;
case WM_DESTROY:
lphl = ListBoxGetWindowAndStorage(hwnd, &wndPtr);
if (lphl == 0) return 0;
ListBoxResetContent(hwnd);
DestroyCursor(wndPtr->hCursor);
free(lphl);
*((LPHEADLIST *)&wndPtr->wExtra[1]) = 0;
#ifdef DEBUG_LISTBOX
......@@ -496,6 +491,19 @@ void StdDrawListBox(HWND hwnd)
lphl->ItemsPerColumn = ipc = 0;
for(i = 1; i <= lphl->ItemsCount; i++) {
if (i >= lphl->FirstVisible) {
if (lpls == NULL) break;
if ((h + lpls->dis.rcItem.bottom - lpls->dis.rcItem.top) > rect.bottom) {
if ((wndPtr->dwStyle & LBS_MULTICOLUMN) == LBS_MULTICOLUMN) {
lphl->ItemsPerColumn = max(lphl->ItemsPerColumn, ipc);
ipc = 0;
h = 0;
rect.left += lphl->ColumnsWidth;
rect.right += lphl->ColumnsWidth;
if (rect.left > maxwidth) break;
}
else
break;
}
h2 = lpls->dis.rcItem.bottom - lpls->dis.rcItem.top;
lpls->dis.rcItem.top = h;
lpls->dis.rcItem.bottom = h + h2;
......@@ -512,18 +520,6 @@ void StdDrawListBox(HWND hwnd)
h += h2;
lphl->ItemsVisible++;
ipc++;
if (h > rect.bottom) {
if ((wndPtr->dwStyle & LBS_MULTICOLUMN) == LBS_MULTICOLUMN) {
lphl->ItemsPerColumn = max(lphl->ItemsPerColumn, ipc);
ipc = 0;
h = 0;
rect.left += lphl->ColumnsWidth;
rect.right += lphl->ColumnsWidth;
if (rect.left > maxwidth) break;
}
else
break;
}
}
if (lpls->lpNext == NULL) goto EndOfPaint;
lpls = (LPLISTSTRUCT)lpls->lpNext;
......@@ -624,7 +620,7 @@ EndOfPaint:
int ListBoxFindMouse(HWND hwnd, int X, int Y)
{
WND *wndPtr;
WND *wndPtr;
LPHEADLIST lphl;
LPLISTSTRUCT lpls;
RECT rect;
......
This diff is collapsed.
......@@ -10,8 +10,6 @@
*/
static char Copyright[] = "Copyright Martin Ayotte, 1993";
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include "windows.h"
#include "sysmetrics.h"
#include "scroll.h"
......@@ -32,7 +30,7 @@ HBITMAP hRgArrowD = 0;
LPHEADSCROLL ScrollBarGetWindowAndStorage(HWND hWnd, WND **wndPtr);
LPHEADSCROLL ScrollBarGetStorageHeader(HWND hWnd);
LPHEADSCROLL GetScrollObjectHandle(HWND hWnd, int nBar);
LPHEADSCROLL GetScrollObjectStruct(HWND hWnd, int nBar);
void ScrollBarButtonDown(HWND hWnd, int nBar, int x, int y);
void ScrollBarButtonUp(HWND hWnd, int nBar, int x, int y);
void ScrollBarMouseMove(HWND hWnd, int nBar, WORD wParam, int x, int y);
......@@ -64,22 +62,6 @@ LONG ScrollBarWndProc( HWND hWnd, WORD message, WORD wParam, LONG lParam )
#ifdef DEBUG_SCROLL
printf("ScrollBar Creation !\n");
#endif
if (hUpArrow == (HBITMAP)NULL)
hUpArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_UPARROWI));
if (hDnArrow == (HBITMAP)NULL)
hDnArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_DNARROWI));
if (hLfArrow == (HBITMAP)NULL)
hLfArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_LFARROWI));
if (hRgArrow == (HBITMAP)NULL)
hRgArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_RGARROWI));
if (hUpArrowD == (HBITMAP)NULL)
hUpArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_UPARROWD));
if (hDnArrowD == (HBITMAP)NULL)
hDnArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_DNARROWD));
if (hLfArrowD == (HBITMAP)NULL)
hLfArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_LFARROWD));
if (hRgArrowD == (HBITMAP)NULL)
hRgArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_RGARROWD));
return 0;
case WM_DESTROY:
lphs = ScrollBarGetWindowAndStorage(hWnd, &wndPtr);
......@@ -165,10 +147,9 @@ void ScrollBarButtonDown(HWND hWnd, int nBar, int x, int y)
RECT rect, rect2;
int width, height;
LONG dwOwner;
lphs = GetScrollObjectHandle(hWnd, nBar);
printf("ScrollBarButtonDown // x=%d y=%d\n", x, y);
lphs = GetScrollObjectStruct(hWnd, nBar);
#ifdef DEBUG_SCROLL
printf("ScrollBarButtonDown // x=%d y=%d\n", x, y);
printf("ScrollBarButtonDown // x=%d y=%d\n", x, y);
#endif
if (nBar == SB_CTL) {
hWndParent = GetParent(hWnd);
......@@ -181,16 +162,12 @@ void ScrollBarButtonDown(HWND hWnd, int nBar, int x, int y)
/*
SetFocus(lphs->hWndOwner);
*/
if (nBar != SB_CTL) {
GetWindowRect(lphs->hWndOwner, &rect);
x -= rect.left;
y -= rect.top;
}
CopyRect(&rect, &lphs->rect);
#ifdef DEBUG_SCROLL
printf("ScrollDown / x=%d y=%d left=%d top=%d right=%d bottom=%d \n",
x, y, rect.left, rect.top, rect.right, rect.bottom);
#endif
if (lphs->Direction == WM_VSCROLL) {
y -= rect.top;
width = rect.right - rect.left;
if (y < (lphs->CurPix + width)) {
if (y < width) {
......@@ -198,30 +175,26 @@ void ScrollBarButtonDown(HWND hWnd, int nBar, int x, int y)
CopyRect(&rect2, &rect);
rect2.bottom = rect2.top + width;
InvalidateRect(lphs->hWndOwner, &rect2, TRUE);
printf("ScrollBarButtonDown // SB_LINEUP \n");
SendMessage(hWndParent, lphs->Direction,
SB_LINEUP, dwOwner);
}
else {
lphs->ButtonDown = 5;
printf("ScrollBarButtonDown // SB_PAGEUP \n");
SendMessage(hWndParent, lphs->Direction,
SB_PAGEUP, dwOwner);
}
}
if (y > (lphs->CurPix + (width << 1))) {
if (y > (rect.bottom - width)) {
if (y > (rect.bottom - rect.top - width)) {
lphs->ButtonDown = 2;
CopyRect(&rect2, &rect);
rect2.top = rect2.bottom - width;
InvalidateRect(lphs->hWndOwner, &rect2, TRUE);
printf("ScrollBarButtonDown // SB_LINEDOWN \n");
SendMessage(hWndParent, lphs->Direction,
SB_LINEDOWN, dwOwner);
}
else {
lphs->ButtonDown = 6;
printf("ScrollBarButtonDown // SB_PAGEDOWN \n");
SendMessage(hWndParent, lphs->Direction,
SB_PAGEDOWN, dwOwner);
}
......@@ -235,7 +208,6 @@ void ScrollBarButtonDown(HWND hWnd, int nBar, int x, int y)
}
}
else {
x -= rect.left;
height = rect.bottom - rect.top;
if (x < (lphs->CurPix + height)) {
if (x < height) {
......@@ -289,11 +261,10 @@ void ScrollBarButtonUp(HWND hWnd, int nBar, int x, int y)
{
LPHEADSCROLL lphs;
RECT rect, rect2;
printf("ScrollBarButtonUp // x=%d y=%d\n", x, y);
#ifdef DEBUG_SCROLL
printf("ScrollBarButtonUp // x=%d y=%d\n", x, y);
#endif
lphs = GetScrollObjectHandle(hWnd, nBar);
lphs = GetScrollObjectStruct(hWnd, nBar);
lphs->ThumbActive = FALSE;
if (lphs->ButtonDown != 0) {
lphs->ButtonDown = 0;
......@@ -314,7 +285,7 @@ void ScrollBarMouseMove(HWND hWnd, int nBar, WORD wParam, int x, int y)
#ifdef DEBUG_SCROLL
printf("ScrollBarButtonMove // w=%04X x=%d y=%d \n", wParam, x, y);
#endif
lphs = GetScrollObjectHandle(hWnd, nBar);
lphs = GetScrollObjectStruct(hWnd, nBar);
if (lphs->ThumbActive == 0) return;
if (nBar == SB_CTL) {
hWndParent = GetParent(hWnd);
......@@ -399,6 +370,14 @@ void StdDrawScrollBar(HWND hWnd, HDC hDC, int nBar, LPRECT lprect, LPHEADSCROLL
CopyRect(&rect, lprect);
w = rect.right - rect.left;
h = rect.bottom - rect.top;
if (lphs->Direction == WM_VSCROLL)
lphs->MaxPix = h - 3 * w;
else
lphs->MaxPix = w - 3 * h;
if (lphs->MaxVal != lphs->MinVal)
lphs->CurPix = lphs->MaxPix * (abs((short)lphs->CurVal) - abs(lphs->MinVal)) /
(abs(lphs->MaxVal) - abs(lphs->MinVal));
if (lphs->CurPix > lphs->MaxPix) lphs->CurPix = lphs->MaxPix;
hMemDC = CreateCompatibleDC(hDC);
if (lphs->Direction == WM_VSCROLL) {
GetObject(hUpArrow, sizeof(BITMAP), (LPSTR)&bm);
......@@ -473,39 +452,18 @@ int CreateScrollBarStruct(HWND hWnd)
WND *wndPtr;
LPHEADSCROLL lphs;
wndPtr = WIN_FindWndPtr(hWnd);
lphs = (LPHEADSCROLL)malloc(sizeof(HEADSCROLL));
if (lphs == 0) {
printf("Bad Memory Alloc on ScrollBar !\n");
return 0;
}
width = wndPtr->rectClient.right - wndPtr->rectClient.left;
height = wndPtr->rectClient.bottom - wndPtr->rectClient.top;
if (width <= height)
lphs = AllocScrollBar(WS_VSCROLL, width, height);
else
lphs = AllocScrollBar(WS_HSCROLL, width, height);
#ifdef DEBUG_SCROLL
printf("CreateScrollBarStruct %lX !\n", lphs);
#endif
*((LPHEADSCROLL *)&wndPtr->wExtra[1]) = lphs;
lphs->hWndOwner = hWnd;
lphs->ThumbActive = FALSE;
lphs->TimerPending = FALSE;
lphs->ButtonDown = 0;
lphs->MinVal = 0;
lphs->MaxVal = 100;
lphs->CurVal = 0;
lphs->CurPix = 0;
width = wndPtr->rectClient.right - wndPtr->rectClient.left;
height = wndPtr->rectClient.bottom - wndPtr->rectClient.top;
CopyRect(&lphs->rect, &wndPtr->rectClient);
if (width <= height)
{
lphs->MaxPix = height - 3 * width;
lphs->Direction = WM_VSCROLL;
}
else
{
lphs->MaxPix = width - 3 * height;
lphs->Direction = WM_HSCROLL;
}
if (lphs->MaxPix < 1) lphs->MaxPix = 1;
if (wndPtr->hCursor == (HCURSOR)NULL)
wndPtr->hCursor = LoadCursor((HINSTANCE)NULL, IDC_ARROW);
return TRUE;
}
......@@ -514,6 +472,22 @@ int CreateScrollBarStruct(HWND hWnd)
LPHEADSCROLL AllocScrollBar(DWORD dwStyle, int width, int height)
{
LPHEADSCROLL lphs;
if (hUpArrow == (HBITMAP)NULL)
hUpArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_UPARROWI));
if (hDnArrow == (HBITMAP)NULL)
hDnArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_DNARROWI));
if (hLfArrow == (HBITMAP)NULL)
hLfArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_LFARROWI));
if (hRgArrow == (HBITMAP)NULL)
hRgArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_RGARROWI));
if (hUpArrowD == (HBITMAP)NULL)
hUpArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_UPARROWD));
if (hDnArrowD == (HBITMAP)NULL)
hDnArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_DNARROWD));
if (hLfArrowD == (HBITMAP)NULL)
hLfArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_LFARROWD));
if (hRgArrowD == (HBITMAP)NULL)
hRgArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_RGARROWD));
lphs = (LPHEADSCROLL)malloc(sizeof(HEADSCROLL));
if (lphs == 0) {
printf("Bad Memory Alloc on ScrollBar !\n");
......@@ -570,9 +544,9 @@ void NC_CreateScrollBars(HWND hWnd)
/*************************************************************************
* GetScrollObjectHandle
* GetScrollObjectStruct [internal]
*/
LPHEADSCROLL GetScrollObjectHandle(HWND hWnd, int nBar)
LPHEADSCROLL GetScrollObjectStruct(HWND hWnd, int nBar)
{
WND *wndPtr;
LPHEADSCROLL lphs;
......@@ -593,7 +567,7 @@ int SetScrollPos(HWND hWnd, int nBar, int nPos, BOOL bRedraw)
{
int nRet;
LPHEADSCROLL lphs;
lphs = GetScrollObjectHandle(hWnd, nBar);
lphs = GetScrollObjectStruct(hWnd, nBar);
if (lphs == NULL) return 0;
nRet = lphs->CurVal;
lphs->CurVal = (short)nPos;
......@@ -622,7 +596,7 @@ int SetScrollPos(HWND hWnd, int nBar, int nPos, BOOL bRedraw)
int GetScrollPos(HWND hWnd, int nBar)
{
LPHEADSCROLL lphs;
lphs = GetScrollObjectHandle(hWnd, nBar);
lphs = GetScrollObjectStruct(hWnd, nBar);
if (lphs == NULL) return 0;
return lphs->CurVal;
}
......@@ -635,7 +609,7 @@ int GetScrollPos(HWND hWnd, int nBar)
void SetScrollRange(HWND hWnd, int nBar, int MinPos, int MaxPos, BOOL bRedraw)
{
LPHEADSCROLL lphs;
lphs = GetScrollObjectHandle(hWnd, nBar);
lphs = GetScrollObjectStruct(hWnd, nBar);
if (lphs == NULL) return;
lphs->MinVal = (short)MinPos;
lphs->MaxVal = (short)MaxPos;
......@@ -661,7 +635,7 @@ void SetScrollRange(HWND hWnd, int nBar, int MinPos, int MaxPos, BOOL bRedraw)
void GetScrollRange(HWND hWnd, int nBar, LPINT lpMin, LPINT lpMax)
{
LPHEADSCROLL lphs;
lphs = GetScrollObjectHandle(hWnd, nBar);
lphs = GetScrollObjectStruct(hWnd, nBar);
if (lphs == NULL) return;
*lpMin = lphs->MinVal;
*lpMax = lphs->MaxVal;
......@@ -686,22 +660,20 @@ void ShowScrollBar(HWND hWnd, WORD wBar, BOOL bFlag)
return;
}
wndPtr = WIN_FindWndPtr(hWnd);
if ((wBar == SB_VERT) || (wBar == SB_BOTH)) {
/*
if ((wBar == SB_VERT) || (wBar == SB_BOTH)) {
if (bFlag)
ShowWindow(wndPtr->hWndVScroll, SW_SHOW);
wndPtr->dwStyle |= WS_VSCROLL;
else
ShowWindow(wndPtr->hWndVScroll, SW_HIDE);
*/
wndPtr->dwStyle &= 0xFFFFFFFFL ^ WS_VSCROLL;
}
if ((wBar == SB_HORZ) || (wBar == SB_BOTH)) {
/*
if (bFlag)
ShowWindow(wndPtr->hWndHScroll, SW_SHOW);
wndPtr->dwStyle |= WS_HSCROLL;
else
ShowWindow(wndPtr->hWndHScroll, SW_HIDE);
*/
wndPtr->dwStyle &= 0xFFFFFFFFL ^ WS_HSCROLL;
}
*/
}
......@@ -6,8 +6,7 @@
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
#include "windows.h"
#include "dialog.h"
#include "win.h"
LONG ButtonWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam );
......@@ -16,6 +15,7 @@ LONG ScrollBarWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam );
LONG ListBoxWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
LONG ComboBoxWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
LONG PopupMenuWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
LONG DesktopWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
static WNDCLASS WIDGETS_BuiltinClasses[] =
......@@ -32,6 +32,8 @@ static WNDCLASS WIDGETS_BuiltinClasses[] =
0, 0, 0, 0, NULL, "COMBOBOX" },
{ CS_GLOBALCLASS, (LONG(*)())PopupMenuWndProc, 0, 8,
0, 0, 0, 0, NULL, "POPUPMENU" },
{ CS_GLOBALCLASS, (LONG(*)())DesktopWndProc, 0, 0,
0, 0, 0, 0, NULL, DESKTOP_CLASS_NAME },
{ CS_GLOBALCLASS, (LONG(*)())DefDlgProc, 0, DLGWINDOWEXTRA,
0, 0, 0, 0, NULL, DIALOG_CLASS_NAME }
};
......
......@@ -5,8 +5,6 @@
MODULE = debugger
DEFINES = -DUSE_READLINE
SUBDIRS = readline
/* Quick and dirt hack, since i386 is defined as 1. sigh */
......
CFLAGS=-g -I../include -DUSE_READLINE ${COPTS}
LIBS= readline/libedit.a
OBJS=dbg.tab.o hash.o lex.yy.o info.o i386-pinsn.o
#YACC=bison -v -d
YACC=yacc -b dbg -d
#LEX=flex
LEX=lex
debugger.o: ${OBJS} readline/libedit.a
(cd readline; make)
ld -r -o debugger.o ${OBJS} $(LIBS)
readline/libedit.a:
(cd readline; make)
dbg.tab.o: dbg.tab.c
gcc $(CFLAGS) -DYYDEBUG=1 -c dbg.tab.c
lex.yy.o: lex.yy.c
gcc $(CFLAGS) -I. -c lex.yy.c
lex.yy.c: debug.l
${LEX} -I debug.l
dbg.tab.c dbg.tab.h: dbg.y
${YACC} dbg.y
dtest: dtest.o debugger.o
gcc -o dtest dtest.o debugger.o
clean:
rm -f *.o main dbg.tab.* lex.yy.* *.output *~ *# dtest
(cd readline; make clean)
depend: dbg.tab.c dbg.tab.h lex.yy.c
$(CC) $(CFLAGS) -M *.c > .depend
......@@ -113,6 +113,10 @@ c { return 'c'; }
%%
#ifndef yywrap
int yywrap(void) { return 1; }
#endif
#ifdef USE_READLINE
#ifndef whitespace
#define whitespace(c) (((c) == ' ') || ((c) == '\t'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment