Commit 1b938b18 authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Adapted to cursor/icon handling changes.

parent 05112826
...@@ -32,7 +32,5 @@ extern WORD USER_HeapSel; ...@@ -32,7 +32,5 @@ extern WORD USER_HeapSel;
void WINAPI USER_SignalProc(HANDLE16, UINT16, UINT16, HINSTANCE16, HQUEUE16); void WINAPI USER_SignalProc(HANDLE16, UINT16, UINT16, HINSTANCE16, HQUEUE16);
void USER_ExitWindows(void); void USER_ExitWindows(void);
void USER_QueueCleanup( HQUEUE16 hQueue ); void USER_QueueCleanup( HQUEUE16 hQueue );
HGLOBAL16 USER_CallDefaultRsrcHandler( HGLOBAL16 hMemObj, HMODULE16 hModule,
HRSRC16 hRsrc );
#endif /* __WINE_USER_H */ #endif /* __WINE_USER_H */
...@@ -222,6 +222,9 @@ BOOL WINAPI MAIN_UserInit(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserve ...@@ -222,6 +222,9 @@ BOOL WINAPI MAIN_UserInit(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserve
/* Initialize menus */ /* Initialize menus */
if (!MENU_Init()) return FALSE; if (!MENU_Init()) return FALSE;
/* Initialize cursor/icons */
CURSORICON_Init();
/* Initialize multimedia */ /* Initialize multimedia */
if (!MULTIMEDIA_Init()) return FALSE; if (!MULTIMEDIA_Init()) return FALSE;
......
...@@ -299,10 +299,6 @@ FARPROC16 MODULE_GetWndProcEntry16( LPCSTR name ) ...@@ -299,10 +299,6 @@ FARPROC16 MODULE_GetWndProcEntry16( LPCSTR name )
return (FARPROC16)ReplaceTextDlgProc16; return (FARPROC16)ReplaceTextDlgProc16;
if (!strcmp(name,"DefResourceHandler")) if (!strcmp(name,"DefResourceHandler"))
return (FARPROC16)NE_DefResourceHandler; return (FARPROC16)NE_DefResourceHandler;
if (!strcmp(name,"LoadDIBIconHandler"))
return (FARPROC16)LoadDIBIconHandler16;
if (!strcmp(name,"LoadDIBCursorHandler"))
return (FARPROC16)LoadDIBCursorHandler16;
FIXME(module,"No mapping for %s(), add one in library/miscstubs.c\n",name); FIXME(module,"No mapping for %s(), add one in library/miscstubs.c\n",name);
assert( FALSE ); assert( FALSE );
return NULL; return NULL;
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "win.h" #include "win.h"
#include "clipboard.h" #include "clipboard.h"
#include "menu.h" #include "menu.h"
#include "cursoricon.h"
#include "hook.h" #include "hook.h"
#include "debug.h" #include "debug.h"
#include "toolhelp.h" #include "toolhelp.h"
...@@ -96,51 +97,11 @@ BOOL16 WINAPI TimerCount16( TIMERINFO *pTimerInfo ) ...@@ -96,51 +97,11 @@ BOOL16 WINAPI TimerCount16( TIMERINFO *pTimerInfo )
return TRUE; return TRUE;
} }
static FARPROC16 __r16loader = NULL;
/**********************************************************************
* USER_CallDefaultRsrcHandler
*
* Called by the LoadDIBIcon/CursorHandler().
*/
HGLOBAL16 USER_CallDefaultRsrcHandler( HGLOBAL16 hMemObj, HMODULE16 hModule, HRSRC16 hRsrc )
{
return Callbacks->CallResourceHandlerProc( __r16loader, hMemObj, hModule, hRsrc );
}
/**********************************************************************
* USER_InstallRsrcHandler
*/
static void USER_InstallRsrcHandler( HINSTANCE16 hInstance )
{
FARPROC16 proc;
/* SetResourceHandler() returns previous function which is set
* when a module's resource table is loaded. */
proc = SetResourceHandler16( hInstance, RT_ICON16,
MODULE_GetWndProcEntry16("LoadDIBIconHandler") );
if (!__r16loader) __r16loader = proc;
proc = SetResourceHandler16( hInstance, RT_CURSOR16,
MODULE_GetWndProcEntry16("LoadDIBCursorHandler") );
if (!__r16loader) __r16loader = proc;
}
/********************************************************************** /**********************************************************************
* InitApp (USER.5) * InitApp (USER.5)
*/ */
INT16 WINAPI InitApp16( HINSTANCE16 hInstance ) INT16 WINAPI InitApp16( HINSTANCE16 hInstance )
{ {
/* InitTask() calls LibMain()'s of implicitly loaded DLLs
* prior to InitApp() so there is no clean way to do
* SetTaskSignalHandler() in time. So, broken Windows bypasses
* a pTask->userhandler on startup and simply calls a global
* function pointer to the default USER signal handler.
*/
USER_InstallRsrcHandler( hInstance );
/* Hack: restore the divide-by-zero handler */ /* Hack: restore the divide-by-zero handler */
/* FIXME: should set a USER-specific handler that displays a msg box */ /* FIXME: should set a USER-specific handler that displays a msg box */
INT_SetPMHandler( 0, INT_GetPMHandler( 0xff ) ); INT_SetPMHandler( 0, INT_GetPMHandler( 0xff ) );
...@@ -158,6 +119,7 @@ static void USER_ModuleUnload( HMODULE16 hModule ) ...@@ -158,6 +119,7 @@ static void USER_ModuleUnload( HMODULE16 hModule )
{ {
HOOK_FreeModuleHooks( hModule ); HOOK_FreeModuleHooks( hModule );
CLASS_FreeModuleClasses( hModule ); CLASS_FreeModuleClasses( hModule );
CURSORICON_FreeModuleIcons( hModule );
} }
/********************************************************************** /**********************************************************************
...@@ -244,7 +206,6 @@ void WINAPI USER_SignalProc( HANDLE16 hTaskOrModule, UINT16 uCode, ...@@ -244,7 +206,6 @@ void WINAPI USER_SignalProc( HANDLE16 hTaskOrModule, UINT16 uCode,
break; break;
case USIG_DLL_LOAD: case USIG_DLL_LOAD:
USER_InstallRsrcHandler( hTaskOrModule ); /* module */
break; break;
case USIG_DLL_UNLOAD: case USIG_DLL_UNLOAD:
......
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