mirror of
https://github.com/reactos/wine.git
synced 2024-11-30 07:00:30 +00:00
c981d0bf88
Sun Mar 31 13:54:46 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [tools/build.c] Changed BuildSpec32Files() to generate assembly instead of C code. Unified -spec16 and -spec32 options; DLL type is now determined by the 'type' declaration in the .spec file. New -stdcall option to build all stdcall assembly relays. * [if1632/relay.c] [if1632/relay32.c] [include/dlls.h] Started to unify 16- and 32-bit builtin DLLs. * [loader/module.c] Added MODULE_GetWndProcEntry32() to mirror MODULE_GetWndProcEntry16(). * [loader/pe_image.c] [loader/resource.c] All modules now have a NE signature, and can be distinguished by the NE_FFLAGS_WIN32 flag. * [windows/alias.c] Aliases for built-in window procedures are now all created at startup in ALIAS_Init(). Fri Mar 29 14:56:39 1996 Greg Kreider <kreider@natlab.research.philips.com> * [controls/combo.c] Limit rectangle to clear to size of item when painting combo, not default. Only draw items in list when there is enough room for them. * [controls/listbox.c] Get the measure of every item that's added and store in the item's data structure. Scroll listbox if mouse near edge of box. Only draw items in list when there is enough room. Fri Mar 29 12:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [windows/defwnd.c] [windows/dialog.c] [windows/mdi.c] [windows/nonclient.c] [controls/menu.c] Various changes for better keyboard handling. * [windows/event.c] [windows/message.c] [misc/keyboard.c] Proper keyboard message ordering, working GetKeyState() (finally!), improvements in ToAscii(). * [windows/win.c] [windows/message.c] Small improvements in WIN_FindWinToRepaint. * [windows/win.c] [windows/painting.c] [windows/nonclient.c] Put update region in WM_NCPAINT wParam. * [loader/task.c] Kill task timers when task is deleted, switch timers to the new queue in SetTaskQueue(). * [loader/signal.c] [miscemu/dosmem.c] Added SIGALRM signal handler to increment BIOS clock. * [windows/win.c] [windows/winpos.c] [windows/mdi.c] Fixed ChildWindowFromPoint(), WM_PARENTNOTIFY and its handling by MDI client. * [windows/winpos.c] Improvements in handling of owned popups. "Floating" toolboxes work better now. Thu Mar 28 12:38:29 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [misc/registry.c] New file, registry rewrite including win32 extensions - Unicode - multiple valus per key - different datatypes for values - multiple rootkeys - saving and loading in different registries. * [include/winreg.h] New file, definitions and structs for registry. * [include/winerror.h] Some new error defines added... there are more, someone please check a (real-)windows winerror.h. * [if1632/shell.spec] [if1632/advapi32.spec] [if1632/kernel.spec] Registry specs added. * [if1632/relay.c] Switch internal SHELL.DLL to default 'used'. * [win32/string32.c] [include/string32.h] Some new functions added. char should be unsigned char when converting to 16bit ints. * [misc/shell.c] [include/shell.h] [win32/advapi.c] Removed old registry functions. Tue Mar 26 15:01:46 1996 Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl> * [include/bitmaps/ocr_ibeam] Fixed the position of the hotspot. * [objects/text.c] Fixed a few bugs in TEXT_TabbedTextOut(). * [windows/event.c] Fixed the order of the bits in the KeyStateTable. 0x80 is the up/down-bit. 0x01 is the toggle bit. * [loader/resource.c] [windows/mdi.c] [controls/edit.c] Fixed the calls to GetKeyState(). Tue Mar 26 08:43:15 1996 Robert Pouliot <krynos@qbc.clic.net> * [resources/sysres_Fr.rc] [resources/TODO] Updated FIND_TEXT and REPLACE_TEXT to work like the English version. Mon Mar 25 17:38:59 1996 Tristan Tarrant <tst@dcs.ed.ac.uk> * [resources/sysres_it.rc] Added support for Italian [It] language.
155 lines
4.6 KiB
C
155 lines
4.6 KiB
C
/*
|
|
* Function alias support
|
|
*
|
|
* Copyright 1995 Martin von Loewis
|
|
*
|
|
*/
|
|
|
|
#include "windows.h"
|
|
#include "alias.h"
|
|
#include "module.h"
|
|
|
|
#include "stddebug.h"
|
|
#include "debug.h"
|
|
|
|
/* some large prime */
|
|
#define TABLESIZE 2677
|
|
|
|
static ALIASHASH AliasTable[TABLESIZE];
|
|
/* this could be a bit smaller */
|
|
static FUNCTIONALIAS AliasRecord[TABLESIZE];
|
|
/* record 0 is always empty */
|
|
static int LastRecord;
|
|
|
|
int ALIAS_UseAliases;
|
|
|
|
/* Aliased window procedures */
|
|
extern LRESULT ButtonWndProc( HWND, UINT, WPARAM, LPARAM );
|
|
extern LRESULT StaticWndProc( HWND, UINT, WPARAM, LPARAM );
|
|
extern LRESULT ScrollBarWndProc( HWND, UINT, WPARAM, LPARAM );
|
|
extern LRESULT ListBoxWndProc( HWND, UINT, WPARAM, LPARAM );
|
|
extern LRESULT ComboBoxWndProc( HWND, UINT, WPARAM, LPARAM );
|
|
extern LRESULT ComboLBoxWndProc( HWND, UINT, WPARAM, LPARAM );
|
|
extern LRESULT EditWndProc( HWND, UINT, WPARAM, LPARAM );
|
|
extern LRESULT PopupMenuWndProc( HWND, UINT, WPARAM, LPARAM );
|
|
extern LRESULT DesktopWndProc( HWND, UINT, WPARAM, LPARAM );
|
|
extern LRESULT DefDlgProc( HWND, UINT, WPARAM, LPARAM );
|
|
extern LRESULT MDIClientWndProc( HWND, UINT, WPARAM, LPARAM );
|
|
extern LRESULT AboutDlgProc( HWND, UINT, WPARAM, LPARAM );
|
|
extern LRESULT CARET_Callback( HWND, UINT, WPARAM, LPARAM );
|
|
extern LRESULT SystemMessageBoxProc( HWND, UINT, WPARAM, LPARAM );
|
|
|
|
/* closed hashing */
|
|
static int ALIAS_LocateHash(DWORD value)
|
|
{
|
|
int hash,start;
|
|
start=hash=value%TABLESIZE;
|
|
while(AliasTable[hash].used && AliasTable[hash].used!=value)
|
|
{
|
|
hash++;
|
|
if(hash==TABLESIZE)
|
|
hash=0;
|
|
if(hash==start)
|
|
{
|
|
fprintf(stderr,"Hash table full, increase size in alias.c\n");
|
|
exit(0);
|
|
}
|
|
}
|
|
return hash;
|
|
}
|
|
|
|
|
|
/***********************************************************************
|
|
* ALIAS_RegisterWndProcAlias
|
|
*/
|
|
static void ALIAS_RegisterWndProcAlias( DWORD Wine, const char *name )
|
|
{
|
|
FARPROC Win16Proc, Win32Proc;
|
|
|
|
Win16Proc = MODULE_GetWndProcEntry16( name );
|
|
Win32Proc = MODULE_GetWndProcEntry32( name );
|
|
ALIAS_RegisterAlias( Wine, (DWORD)Win16Proc, (DWORD)Win32Proc );
|
|
}
|
|
|
|
|
|
/***********************************************************************
|
|
* ALIAS_Init
|
|
*
|
|
* Create aliases for the standard window procedures.
|
|
*/
|
|
BOOL ALIAS_Init(void)
|
|
{
|
|
ALIAS_RegisterWndProcAlias( (DWORD)ButtonWndProc, "ButtonWndProc" );
|
|
ALIAS_RegisterWndProcAlias( (DWORD)StaticWndProc, "StaticWndProc" );
|
|
ALIAS_RegisterWndProcAlias( (DWORD)ScrollBarWndProc, "ScrollBarWndProc" );
|
|
ALIAS_RegisterWndProcAlias( (DWORD)ListBoxWndProc, "ListBoxWndProc" );
|
|
ALIAS_RegisterWndProcAlias( (DWORD)ComboBoxWndProc, "ComboBoxWndProc" );
|
|
ALIAS_RegisterWndProcAlias( (DWORD)ComboLBoxWndProc, "ComboLBoxWndProc" );
|
|
ALIAS_RegisterWndProcAlias( (DWORD)EditWndProc, "EditWndProc" );
|
|
ALIAS_RegisterWndProcAlias( (DWORD)PopupMenuWndProc, "PopupMenuWndProc" );
|
|
ALIAS_RegisterWndProcAlias( (DWORD)DesktopWndProc, "DesktopWndProc" );
|
|
ALIAS_RegisterWndProcAlias( (DWORD)DefDlgProc, "DefDlgProc" );
|
|
ALIAS_RegisterWndProcAlias( (DWORD)MDIClientWndProc, "MDIClientWndProc" );
|
|
ALIAS_RegisterWndProcAlias( (DWORD)AboutDlgProc, "AboutDlgProc" );
|
|
ALIAS_RegisterWndProcAlias( (DWORD)CARET_Callback, "CARET_Callback" );
|
|
ALIAS_RegisterWndProcAlias( (DWORD)SystemMessageBoxProc, "SystemMessageBoxProc" );
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
/***********************************************************************
|
|
* ALIAS_RegisterAlias
|
|
*/
|
|
void ALIAS_RegisterAlias(DWORD Wine,DWORD Win16, DWORD Win32)
|
|
{
|
|
int whash = 0, w16hash = 0, w32hash = 0, recno=0;
|
|
if (!Wine && !Win16 && !Win32) return;
|
|
if (Wine)
|
|
{
|
|
whash=ALIAS_LocateHash(Wine);
|
|
recno=AliasTable[whash].used?AliasTable[whash].recno:0;
|
|
}
|
|
if (Win16)
|
|
{
|
|
w16hash=ALIAS_LocateHash(Win16);
|
|
recno=AliasTable[w16hash].used?AliasTable[w16hash].recno:0;
|
|
}
|
|
if (Win32)
|
|
{
|
|
w32hash=ALIAS_LocateHash(Win32);
|
|
recno=AliasTable[w32hash].used?AliasTable[w32hash].recno:0;
|
|
}
|
|
if (!recno)
|
|
{
|
|
recno=LastRecord;
|
|
LastRecord++;
|
|
}
|
|
if (Wine)
|
|
{
|
|
AliasTable[whash].used=Wine;
|
|
AliasTable[whash].recno=recno;
|
|
AliasRecord[recno].wine=Wine;
|
|
}
|
|
if (Win16)
|
|
{
|
|
AliasTable[w16hash].used=Win16;
|
|
AliasTable[w16hash].recno=recno;
|
|
AliasRecord[recno].win16=Win16;
|
|
}
|
|
if (Win32)
|
|
{
|
|
AliasTable[w32hash].used=Win32;
|
|
AliasTable[w32hash].recno=recno;
|
|
AliasRecord[recno].win32=Win32;
|
|
}
|
|
}
|
|
|
|
FUNCTIONALIAS* ALIAS_LookupAlias(DWORD fn)
|
|
{
|
|
int index;
|
|
index=ALIAS_LocateHash(fn);
|
|
if(AliasTable[index].used==fn)
|
|
return &AliasRecord[AliasTable[index].recno];
|
|
return 0;
|
|
}
|