wine/controls/widgets.c
Alexandre Julliard 75d86e1f06 Release 961117
Sun Nov 17 15:01:45 1996  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [graphics/bitblt.c] [graphics/x11drv/bitblt.c]
	Moved BitBlt operations to the new graphics driver
	interface. Implemented PatBlt32, BitBlt32 and StretchBlt32.

	* [memory/global.c]
	Unified MemManInfo() and GlobalMemoryStatus().

	* [objects/text.c]
	Fixed ExtTextOut() to always use physical coords for clip rect.

	* [windows/dialog.c]
	Implemented DlgDirSelectEx() and Win32 version of DlgDirSelect*.

	* [windows/event.c]
	Avoid busy-looping in EVENT_WaitXEvent when no timer is pending
	(thanks to Thomas Koenig).

	* [windows/painting.c]
	Moved update region clipping for CS_PARENTDC windows to BeginPaint().
	
	* [windows/scroll.c]
	Implemented Win32 version of ScrollWindow() and ScrollDC().

Tue Nov 12 09:52:17 1996  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [files/*.c] [win32/file.c]
	Some win32 filetime conversion functions added.
	Fixed behaviour with DOS drives pointing to UNIX /
	SetCurrentDirectory() may also get X:\xxx paths.
	Fixed FILE_Open when called from CreateFile().
	Added GetFileSize(), MapViewOfFile(), SetFileTime(), GetFileTime().

	* [misc/crtdll.c] [if1632/crtdll.spec]
	Added some new functions.

	* [if1632/user32.spec]
	Some thunks into win16 code added.

	* [win32/init.c]
	Added GetSystemInfo(), removed GetModuleFileName() stub.

	* [win32/code_page.c] [if1632/thunk.c]
	Added EnumSystemCodePages* (untested).

	* [objects/font.c] [if1632/thunk.c]
	Added EnumFontFamilies32*.
	
Mon Nov 11 14:50:24 1996  Huw D. M. Davies <h.davies1@physics.oxford.ac.uk>

	* [controls/menu.c] [windows/mdi.c]
	Don't delete the MDI `windows' menu if it's already been deleted.

	* [misc/exec.c]
	Notepad always calls WinHelp(.., HELP_QUIT, ...) at termination
 	and complains if it returns FALSE.

	* [windows/winpos.c]
	Get maximized MDI child's nonclient area redrawn after resize.

Thu Nov  7 13:32:34 1996  Lee Jaekil <juria@seodu.co.kr>

	* [memory/global.c]
	Use /proc filesystem for GlobalMemoryStatus() on Linux.

Mon Nov  4 18:30:00 1996  Alex Korobka <alex@trantor.pharm.sunysb.edu>

	* [windows/event.c]
	Added OffiX-style file drop handling. File paths must be
	DOS-mappable by Wine (via wine.conf).

	* [controls/combo.c]
        Added WM_GETTEXT handler.

	* [objects/palette.c]
	Added ResizePalette() (untested).

	* [objects/cursoricon.c]
	Implemented icon to cursor conversion.

	* [objects/color.c]
	Fixed crash on startup when no colorcells are writeable.

Mon Nov  4 00:49:41 1996  Ulrich Schmid  <uschmid@mail.hh.provi.de>

	* [rc/winerc.c]
	Added support for win32 output.

	* [library/libres.c] [include/libres.h] [loader/resource.c]
	Renamed LIBRES_FindResource to LIBRES_FindResource16.
	Added LIBRES_FindResource32.

Sun Nov 3 21:21:45 1996  Robert Pouliot <krynos@clic.net>

	* [loader/builtin.c] [if1632/Makefile.in] [if1632/wing.spec]
	Added the spec file for WinG, it's only stub for now, but it
	should be easy to do by someone with Windows programming
	knowledge. See: ftp.microsoft.com/SoftLib/MSLFILES/wing10.exe.

	* [if1632/crtdll.spec]
	Added some string and memory functions to make sfxed95.exe (of
 	Warcraft 2) almost work.
1996-11-17 18:59:11 +00:00

151 lines
4.5 KiB
C

/*
* Windows widgets (built-in window classes)
*
* Copyright 1993 Alexandre Julliard
*/
#include "win.h"
#include "commctrl.h"
#include "button.h"
#include "static.h"
#include "status.h"
#include "scroll.h"
#include "desktop.h"
#include "mdi.h"
#include "gdi.h"
#include "module.h"
#include "heap.h"
#define OLD_LISTBOX
typedef struct
{
UINT16 style;
INT16 wndExtra;
HBRUSH16 background;
LPCSTR procName;
LPCSTR className;
} BUILTIN_CLASS_INFO16;
static const BUILTIN_CLASS_INFO16 WIDGETS_BuiltinClasses16[] =
{
{ CS_GLOBALCLASS | CS_PARENTDC,
sizeof(STATICINFO), 0, "StaticWndProc", "STATIC" },
#ifdef OLD_LISTBOX
{ CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS,
8, 0, "ListBoxWndProc", "LISTBOX" },
#endif
{ CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS,
8, 0, "ComboBoxWndProc", "COMBOBOX" },
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS,
8, 0, "ComboLBoxWndProc", "COMBOLBOX" },
{ CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS,
sizeof(DWORD), 0, "EditWndProc", "EDIT" },
{ CS_GLOBALCLASS | CS_SAVEBITS,
sizeof(HMENU32), 0, "PopupMenuWndProc", POPUPMENU_CLASS_NAME },
{ CS_GLOBALCLASS | CS_SAVEBITS,
DLGWINDOWEXTRA, 0, "DefDlgProc", DIALOG_CLASS_NAME },
{ CS_GLOBALCLASS, sizeof(MDICLIENTINFO),
STOCK_LTGRAY_BRUSH, "MDIClientWndProc", "MDICLIENT" }
};
#define NB_BUILTIN_CLASSES16 \
(sizeof(WIDGETS_BuiltinClasses16)/sizeof(WIDGETS_BuiltinClasses16[0]))
static WNDCLASS32A WIDGETS_BuiltinClasses32[] =
{
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC,
ButtonWndProc, 0, sizeof(BUTTONINFO), 0, 0, 0, 0, 0, "BUTTON" },
#ifndef OLD_LISTBOX
{ CS_GLOBALCLASS | CS_DBLCLKS /*| CS_PARENTDC*/,
ListBoxWndProc32, 0, sizeof(void *), 0, 0, 0, 0, 0, "LISTBOX" },
#endif
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC,
ScrollBarWndProc, 0, sizeof(SCROLLBAR_INFO), 0, 0, 0, 0, 0, "SCROLLBAR"},
{ CS_GLOBALCLASS, DesktopWndProc, 0, sizeof(DESKTOPINFO),
0, 0, 0, 0, 0, DESKTOP_CLASS_NAME }
};
#define NB_BUILTIN_CLASSES32 \
(sizeof(WIDGETS_BuiltinClasses32)/sizeof(WIDGETS_BuiltinClasses32[0]))
static WNDCLASS32A WIDGETS_CommonControls32[] =
{
{ CS_GLOBALCLASS | CS_VREDRAW | CS_HREDRAW, StatusWindowProc, 0,
sizeof(STATUSWINDOWINFO), 0, 0, 0, 0, 0, STATUSCLASSNAME32A },
};
#define NB_COMMON_CONTROLS32 \
(sizeof(WIDGETS_CommonControls32)/sizeof(WIDGETS_CommonControls32[0]))
/***********************************************************************
* WIDGETS_Init
*
* Initialize the built-in window classes.
*/
BOOL WIDGETS_Init(void)
{
int i;
char *name;
const BUILTIN_CLASS_INFO16 *info16 = WIDGETS_BuiltinClasses16;
WNDCLASS16 class16;
WNDCLASS32A *class32 = WIDGETS_BuiltinClasses32;
if (!(name = SEGPTR_ALLOC( 20 * sizeof(char) ))) return FALSE;
/* Create 16-bit classes */
class16.cbClsExtra = 0;
class16.hInstance = 0;
class16.hIcon = 0;
class16.hCursor = LoadCursor16( 0, IDC_ARROW );
class16.lpszMenuName = (SEGPTR)0;
class16.lpszClassName = SEGPTR_GET(name);
for (i = 0; i < NB_BUILTIN_CLASSES16; i++, info16++)
{
class16.style = info16->style;
class16.lpfnWndProc = (WNDPROC16)MODULE_GetWndProcEntry16( info16->procName );
class16.cbWndExtra = info16->wndExtra;
class16.hbrBackground = info16->background;
strcpy( name, info16->className );
if (!RegisterClass16( &class16 )) return FALSE;
}
/* Create 32-bit classes */
for (i = 0; i < NB_BUILTIN_CLASSES32; i++, class32++)
{
/* Just to make sure the string is > 0x10000 */
strcpy( name, (char *)class32->lpszClassName );
class32->lpszClassName = name;
class32->hCursor = LoadCursor16( 0, IDC_ARROW );
if (!RegisterClass32A( class32 )) return FALSE;
}
SEGPTR_FREE(name);
return TRUE;
}
/***********************************************************************
* InitCommonControls (COMCTL32.15)
*/
void InitCommonControls(void)
{
int i;
char name[30];
WNDCLASS32A *class32 = WIDGETS_CommonControls32;
for (i = 0; i < NB_COMMON_CONTROLS32; i++, class32++)
{
/* Just to make sure the string is > 0x10000 */
strcpy( name, (char *)class32->lpszClassName );
class32->lpszClassName = name;
class32->hCursor = LoadCursor16( 0, IDC_ARROW );
RegisterClass32A( class32 );
}
}