Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e392a0c9
Commit
e392a0c9
authored
Apr 01, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
Apr 01, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added USER32.UserSignalProc to Callout table.
Implemented built-in UserSignalProc(). Don't announce Win3.1-style USER handler any more.
parent
8139c301
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
90 additions
and
58 deletions
+90
-58
thunk.c
if1632/thunk.c
+8
-23
user.spec
if1632/user.spec
+1
-1
callback.h
include/callback.h
+3
-0
task.h
include/task.h
+5
-5
user.h
include/user.h
+2
-2
main.c
loader/main.c
+0
-3
callback.c
misc/callback.c
+2
-0
user32.spec
relay32/user32.spec
+1
-0
user.c
windows/user.c
+68
-24
No files found.
if1632/thunk.c
View file @
e392a0c9
...
...
@@ -554,31 +554,15 @@ DWORD WINAPI THUNK_GetDCHook( HDC16 hdc, FARPROC16 *phookProc )
*/
FARPROC16
WINAPI
THUNK_SetTaskSignalProc
(
HTASK16
hTask
,
FARPROC16
proc
)
{
static
FARPROC16
defSignalProc16
=
NULL
;
THUNK
*
thunk
=
THUNK_Alloc
(
proc
,
(
RELAY
)
CallTo16_word_wwwww
);
if
(
!
thunk
)
return
NULL
;
THUNK
*
thunk
=
NULL
;
if
(
!
defSignalProc16
)
defSignalProc16
=
NE_GetEntryPoint
(
GetModuleHandle16
(
"USER"
),
314
);
if
(
proc
==
defSignalProc16
)
thunk
=
(
THUNK
*
)
SetTaskSignalProc
(
hTask
,
(
FARPROC16
)
&
USER_SignalProc
);
else
{
thunk
=
THUNK_Alloc
(
proc
,
(
RELAY
)
CallTo16_word_wwwww
);
if
(
!
thunk
)
return
FALSE
;
thunk
=
(
THUNK
*
)
SetTaskSignalProc
(
hTask
,
(
FARPROC16
)
thunk
);
}
thunk
=
(
THUNK
*
)
SetTaskSignalProc
(
hTask
,
(
FARPROC16
)
thunk
);
if
(
!
thunk
)
return
NULL
;
if
(
thunk
!=
(
THUNK
*
)
USER_SignalProc
)
{
if
(
!
thunk
)
return
NULL
;
proc
=
thunk
->
proc
;
THUNK_Free
(
thunk
);
return
proc
;
}
return
defSignalProc16
;
proc
=
thunk
->
proc
;
THUNK_Free
(
thunk
);
return
proc
;
}
/***********************************************************************
...
...
@@ -883,6 +867,7 @@ void THUNK_InitCallout(void)
GETADDR
(
DispatchMessageW
,
"DispatchMessageW"
);
GETADDR
(
DispatchMessageA
,
"DispatchMessageA"
);
GETADDR
(
RedrawWindow
,
"RedrawWindow"
);
GETADDR
(
UserSignalProc
,
"UserSignalProc"
);
#undef GETADDR
}
...
...
if1632/user.spec
View file @
e392a0c9
...
...
@@ -361,7 +361,7 @@ file user.exe
385 pascal16 GetMenuContextHelpId(word) GetMenuContextHelpId16
389 pascal LoadImage(word segstr word word word word) LoadImage16
390 pascal16 CopyImage(word word word word word) CopyImage16
391
stub SignalProc32
391
pascal16 SignalProc32(long long long word) UserSignalProc
394 pascal16 DrawIconEx(word word word word word word word word word) DrawIconEx16
395 pascal16 GetIconInfo(word ptr) GetIconInfo16
397 pascal16 RegisterClassEx(ptr) RegisterClassEx16
...
...
include/callback.h
View file @
e392a0c9
...
...
@@ -122,6 +122,9 @@ typedef struct
BOOL
WINAPI
(
*
RedrawWindow
)(
HWND
hwnd
,
const
RECT
*
rectUpdate
,
HRGN
hrgnUpdate
,
UINT
flags
);
WORD
WINAPI
(
*
UserSignalProc
)(
UINT
uCode
,
DWORD
dwThreadOrProcessID
,
DWORD
dwFlags
,
HMODULE16
hModule
);
HQUEUE16
WINAPI
(
*
InitThreadInput16
)(
WORD
unknown
,
WORD
flags
);
void
WINAPI
(
*
UserYield16
)(
void
);
WORD
WINAPI
(
*
DestroyIcon32
)(
HGLOBAL16
handle
,
UINT16
flags
);
...
...
include/task.h
View file @
e392a0c9
...
...
@@ -118,11 +118,11 @@ typedef struct _TDB
#define TDBF_OS2APP 0x0008
#define TDBF_WIN32 0x0010
/* USER signals */
#define USIG_TERMINATION 0x0020
#define USIG_DLL_LOAD 0x0040
#define USIG
_DLL_UNLOAD
0x0080
#define USIG_GPF 0x0666
/*
Windows 3.1
USER signals */
#define USIG
16
_TERMINATION 0x0020
#define USIG
16
_DLL_LOAD 0x0040
#define USIG
16_DLL_UNLOAD
0x0080
#define USIG
16
_GPF 0x0666
/* THHOOK Kernel Data Structure */
...
...
include/user.h
View file @
e392a0c9
...
...
@@ -38,8 +38,8 @@ typedef struct tagUSER_DRIVER {
extern
USER_DRIVER
*
USER_Driver
;
void
WINAPI
USER_SignalProc
(
HANDLE16
,
UINT16
,
UINT16
,
HINSTANCE16
,
HQUEUE16
);
void
USER_ExitWindows
(
void
);
void
USER_QueueCleanup
(
HQUEUE16
hQueue
);
WORD
WINAPI
UserSignalProc
(
UINT
uCode
,
DWORD
dwThreadOrProcessID
,
DWORD
dwFlags
,
HMODULE16
hModule
);
#endif
/* __WINE_USER_H */
loader/main.c
View file @
e392a0c9
...
...
@@ -251,9 +251,6 @@ BOOL WINAPI MAIN_UserInit(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserve
/* Create desktop window */
if
(
!
WIN_CreateDesktopWindow
())
return
FALSE
;
/* Install default USER Signal Handler */
SetTaskSignalProc
(
0
,
(
FARPROC16
)
USER_SignalProc
);
/* Initialize keyboard driver */
KEYBOARD_Enable
(
keybd_event
,
InputKeyStateTable
);
...
...
misc/callback.c
View file @
e392a0c9
...
...
@@ -10,6 +10,7 @@
#include "task.h"
#include "syslevel.h"
#include "cursoricon.h"
#include "user.h"
#include "queue.h"
#include "debug.h"
...
...
@@ -321,6 +322,7 @@ CALLOUT_TABLE Callout =
TranslateMessage16
,
TranslateMessage
,
DispatchMessage16
,
DispatchMessageA
,
DispatchMessageW
,
RedrawWindow16
,
RedrawWindow
,
UserSignalProc
,
InitThreadInput16
,
UserYield16
,
CURSORICON_Destroy
...
...
relay32/user32.spec
View file @
e392a0c9
...
...
@@ -625,3 +625,4 @@ init MAIN_UserInit
620 stdcall GetTaskmanWindow () GetTaskmanWindow
621 stdcall SetTaskmanWindow (long) SetTaskmanWindow
622 stdcall GetProgmanWindow () GetProgmanWindow
623 stdcall UserSignalProc(long long long long) UserSignalProc
windows/user.c
View file @
e392a0c9
...
...
@@ -27,6 +27,7 @@
#include "local.h"
#include "class.h"
#include "desktop.h"
#include "process.h"
#include "debug.h"
/***********************************************************************
...
...
@@ -125,12 +126,19 @@ static void USER_ModuleUnload( HMODULE16 hModule )
/**********************************************************************
* USER_QueueCleanup
*/
void
USER_QueueCleanup
(
HQUEUE16
hQueue
)
static
void
USER_QueueCleanup
(
HQUEUE16
hQueue
)
{
if
(
hQueue
)
{
WND
*
desktop
=
WIN_GetDesktop
();
/* Patch desktop window */
if
(
desktop
->
hmemTaskQ
==
hQueue
)
{
HTASK16
nextTask
=
TASK_GetNextTask
(
GetCurrentTask
()
);
desktop
->
hmemTaskQ
=
GetTaskQueue16
(
nextTask
);
}
/* Patch resident popup menu window */
MENU_PatchResidentPopup
(
hQueue
,
NULL
);
...
...
@@ -153,27 +161,17 @@ void USER_QueueCleanup( HQUEUE16 hQueue )
/**********************************************************************
* USER_AppExit
*/
static
void
USER_AppExit
(
H
TASK16
hTask
,
HINSTANCE16
hInstance
,
HQUEUE16
hQueu
e
)
static
void
USER_AppExit
(
H
INSTANCE16
hInstanc
e
)
{
/* FIXME: empty clipboard if needed, maybe destroy menus (Windows
* only complains about them but does nothing);
*/
WND
*
desktop
=
WIN_GetDesktop
();
/* Patch desktop window */
if
(
desktop
->
hmemTaskQ
==
hQueue
)
desktop
->
hmemTaskQ
=
GetTaskQueue16
(
TASK_GetNextTask
(
hTask
));
USER_QueueCleanup
(
hQueue
);
/* ModuleUnload() in "Internals" */
hInstance
=
GetExePtr
(
hInstance
);
if
(
GetModuleUsage16
(
hInstance
)
<=
1
)
USER_ModuleUnload
(
hInstance
);
WIN_ReleaseDesktop
();
}
...
...
@@ -202,26 +200,72 @@ void WINAPI USER_SignalProc( HANDLE16 hTaskOrModule, UINT16 uCode,
UINT16
uExitFn
,
HINSTANCE16
hInstance
,
HQUEUE16
hQueue
)
{
switch
(
uCode
)
FIXME
(
win
,
"Win 3.1 USER signal %04x
\n
"
,
uCode
);
}
/***********************************************************************
* UserSignalProc (USER.610) (USER32.559)
*
* For comments about the meaning of uCode and dwFlags
* see PROCESS_CallUserSignalProc.
*
*/
WORD
WINAPI
UserSignalProc
(
UINT
uCode
,
DWORD
dwThreadOrProcessID
,
DWORD
dwFlags
,
HMODULE16
hModule
)
{
HINSTANCE16
hInst
;
/* FIXME: Proper reaction to most signals still missing. */
switch
(
uCode
)
{
case
USIG_GPF
:
case
USIG_TERMINATION
:
USER_AppExit
(
hTaskOrModule
,
hInstance
,
hQueue
);
/* task */
break
;
case
USIG_DLL_UNLOAD_WIN16
:
case
USIG_DLL_UNLOAD_WIN32
:
USER_ModuleUnload
(
hModule
);
break
;
case
USIG_DLL_UNLOAD_ORPHANS
:
break
;
case
USIG_FAULT_DIALOG_PUSH
:
case
USIG_FAULT_DIALOG_POP
:
break
;
case
USIG_THREAD_INIT
:
break
;
case
USIG_THREAD_EXIT
:
USER_QueueCleanup
(
GetThreadQueue16
(
dwThreadOrProcessID
)
);
SetThreadQueue16
(
dwThreadOrProcessID
,
0
);
break
;
case
USIG_PROCESS_CREATE
:
case
USIG_PROCESS_INIT
:
case
USIG_PROCESS_LOADED
:
case
USIG_PROCESS_RUNNING
:
break
;
case
USIG_DLL_LOAD
:
break
;
case
USIG_PROCESS_EXIT
:
break
;
case
USIG_DLL_UNLOAD
:
USER_ModuleUnload
(
hTaskOrModule
);
/* module */
break
;
case
USIG_PROCESS_DESTROY
:
hInst
=
GetProcessDword
(
dwThreadOrProcessID
,
GPD_HINSTANCE16
);
USER_AppExit
(
hInst
);
break
;
default:
FIXME
(
msg
,
"Unimplemented USER signal: %i
\n
"
,
(
int
)
uCode
);
default:
FIXME
(
win
,
"(%04x, %08lx, %04lx, %04x)
\n
"
,
uCode
,
dwThreadOrProcessID
,
dwFlags
,
hModule
);
break
;
}
/* FIXME: Should chain to GdiSignalProc now. */
return
0
;
}
/***********************************************************************
* ExitWindows16 (USER.7)
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment