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
89b93bf2
Commit
89b93bf2
authored
Dec 24, 1998
by
Ulrich Weigand
Committed by
Alexandre Julliard
Dec 24, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented stub for InitThreadInput.
Use GetThreadQueue/GetFastQueue instead of GetTaskQueue.
parent
ff35e1fb
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
23 deletions
+68
-23
user.spec
if1632/user.spec
+1
-1
queue.h
include/queue.h
+2
-0
task.h
include/task.h
+6
-0
message.c
windows/message.c
+11
-11
queue.c
windows/queue.c
+48
-11
No files found.
if1632/user.spec
View file @
89b93bf2
...
...
@@ -375,7 +375,7 @@ file user.exe
407 pascal16 CreateIcon(word word word word word ptr ptr) CreateIcon16
408 pascal16 CreateCursorIconIndirect(word ptr ptr ptr)
CreateCursorIconIndirect
409
stub
InitThreadInput
409
pascal16 InitThreadInput(word word)
InitThreadInput
410 pascal16 InsertMenu(word word word word segptr) InsertMenu16
411 pascal16 AppendMenu(word word word segptr) AppendMenu16
412 pascal16 RemoveMenu(word word word) RemoveMenu16
...
...
include/queue.h
View file @
89b93bf2
...
...
@@ -100,4 +100,6 @@ extern void QUEUE_FlushMessages(HQUEUE16);
extern
void
hardware_event
(
WORD
message
,
WORD
wParam
,
LONG
lParam
,
int
xPos
,
int
yPos
,
DWORD
time
,
DWORD
extraInfo
);
extern
HQUEUE16
WINAPI
InitThreadInput
(
WORD
unknown
,
WORD
flags
);
#endif
/* __WINE_QUEUE_H */
include/task.h
View file @
89b93bf2
...
...
@@ -155,4 +155,10 @@ extern HTASK16 TASK_GetNextTask( HTASK16 hTask );
extern
BOOL32
TASK_Reschedule
(
void
);
extern
void
TASK_InstallTHHook
(
THHOOK
*
pNewThook
);
extern
HQUEUE16
WINAPI
SetThreadQueue
(
DWORD
thread
,
HQUEUE16
hQueue
);
extern
HQUEUE16
WINAPI
GetThreadQueue
(
DWORD
thread
);
extern
VOID
WINAPI
SetFastQueue
(
DWORD
thread
,
HANDLE32
hQueue
);
extern
HANDLE32
WINAPI
GetFastQueue
(
void
);
#endif
/* __WINE_TASK_H */
windows/message.c
View file @
89b93bf2
...
...
@@ -102,7 +102,7 @@ static DWORD MSG_TranslateMouseMsg( HWND16 hTopWnd, DWORD filter,
INT16
ht
,
hittest
,
sendSC
=
0
;
UINT16
message
=
msg
->
message
;
POINT16
screen_pt
,
pt
;
HANDLE16
hQ
=
Get
TaskQueue
(
0
);
HANDLE16
hQ
=
Get
FastQueue
(
);
MESSAGEQUEUE
*
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
hQ
);
BOOL32
eatMsg
=
FALSE
;
BOOL32
mouseClick
=
((
message
==
WM_LBUTTONDOWN
)
||
...
...
@@ -278,10 +278,10 @@ static DWORD MSG_TranslateKbdMsg( HWND16 hTopWnd, DWORD filter,
message
+=
WM_SYSKEYDOWN
-
WM_KEYDOWN
;
}
pWnd
=
WIN_FindWndPtr
(
hWnd
);
if
(
pWnd
&&
(
pWnd
->
hmemTaskQ
!=
Get
TaskQueue
(
0
)))
if
(
pWnd
&&
(
pWnd
->
hmemTaskQ
!=
Get
FastQueue
(
)))
{
/* Not for the current task */
MESSAGEQUEUE
*
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
TaskQueue
(
0
)
);
MESSAGEQUEUE
*
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
FastQueue
(
)
);
if
(
queue
)
QUEUE_ClearWakeBit
(
queue
,
QS_KEY
);
/* Wake up the other task */
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
pWnd
->
hmemTaskQ
);
...
...
@@ -596,7 +596,7 @@ static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND16 hwnd, UINT16 msg,
QSMCTRL
qCtrl
=
{
0
,
1
};
MESSAGEQUEUE
*
queue
,
*
destQ
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
TaskQueue
(
0
)
)))
return
0
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
FastQueue
(
)
)))
return
0
;
if
(
!
(
destQ
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
hDestQueue
)))
return
0
;
if
(
IsTaskLocked
()
||
!
IsWindow32
(
hwnd
))
return
0
;
...
...
@@ -619,7 +619,7 @@ static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND16 hwnd, UINT16 msg,
queue
->
wParamHigh
=
HIWORD
(
wParam
);
queue
->
lParam
=
lParam
;
queue
->
hPrevSendingTask
=
destQ
->
hSendingTask
;
destQ
->
hSendingTask
=
Get
TaskQueue
(
0
);
destQ
->
hSendingTask
=
Get
FastQueue
(
);
QUEUE_ClearWakeBit
(
queue
,
QS_SMPARAMSFREE
);
queue
->
flags
=
(
queue
->
flags
&
~
(
QUEUE_SM_WIN32
|
QUEUE_SM_UNICODE
))
|
flags
;
...
...
@@ -670,7 +670,7 @@ void WINAPI ReplyMessage16( LRESULT result )
MESSAGEQUEUE
*
senderQ
;
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
TaskQueue
(
0
)
)))
return
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
FastQueue
(
)
)))
return
;
TRACE
(
msg
,
"ReplyMessage, queue %04x
\n
"
,
queue
->
self
);
...
...
@@ -736,7 +736,7 @@ static BOOL32 MSG_PeekMessage( LPMSG16 msg, HWND16 hwnd, WORD first, WORD last,
while
(
1
)
{
hQueue
=
Get
TaskQueue
(
0
);
hQueue
=
Get
FastQueue
(
);
msgQueue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
hQueue
);
if
(
!
msgQueue
)
return
FALSE
;
msgQueue
->
changeBits
=
0
;
...
...
@@ -1222,7 +1222,7 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
SPY_EnterMessage
(
SPY_SENDMESSAGE16
,
hwnd
,
msg
,
wParam
,
lParam
);
if
(
wndPtr
->
hmemTaskQ
!=
Get
TaskQueue
(
0
))
if
(
wndPtr
->
hmemTaskQ
!=
Get
FastQueue
(
))
ret
=
MSG_SendMessage
(
wndPtr
->
hmemTaskQ
,
hwnd
,
msg
,
wParam
,
lParam
,
0
);
else
...
...
@@ -1329,7 +1329,7 @@ LRESULT WINAPI SendMessage32A( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
SPY_EnterMessage
(
SPY_SENDMESSAGE32
,
hwnd
,
msg
,
wParam
,
lParam
);
if
(
wndPtr
->
hmemTaskQ
!=
Get
TaskQueue
(
0
))
if
(
wndPtr
->
hmemTaskQ
!=
Get
FastQueue
(
))
ret
=
MSG_SendMessage
(
wndPtr
->
hmemTaskQ
,
hwnd
,
msg
,
wParam
,
lParam
,
QUEUE_SM_WIN32
);
else
...
...
@@ -1400,7 +1400,7 @@ LRESULT WINAPI SendMessage32W(
SPY_EnterMessage
(
SPY_SENDMESSAGE32
,
hwnd
,
msg
,
wParam
,
lParam
);
if
(
wndPtr
->
hmemTaskQ
!=
Get
TaskQueue
(
0
))
if
(
wndPtr
->
hmemTaskQ
!=
Get
FastQueue
(
))
ret
=
MSG_SendMessage
(
wndPtr
->
hmemTaskQ
,
hwnd
,
msg
,
wParam
,
lParam
,
QUEUE_SM_WIN32
|
QUEUE_SM_UNICODE
);
else
...
...
@@ -1938,7 +1938,7 @@ BOOL32 WINAPI InSendMessage32(void)
{
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
TaskQueue
(
0
)
)))
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
FastQueue
(
)
)))
return
0
;
return
(
BOOL32
)
queue
->
InSendMessageHandle
;
}
...
...
windows/queue.c
View file @
89b93bf2
...
...
@@ -312,11 +312,11 @@ void QUEUE_WaitBits( WORD bits )
{
MESSAGEQUEUE
*
queue
;
TRACE
(
msg
,
"q %04x waiting for %04x
\n
"
,
Get
TaskQueue
(
0
),
bits
);
TRACE
(
msg
,
"q %04x waiting for %04x
\n
"
,
Get
FastQueue
(
),
bits
);
for
(;;)
{
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
TaskQueue
(
0
)
)))
return
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
FastQueue
(
)
)))
return
;
if
(
queue
->
changeBits
&
bits
)
{
...
...
@@ -752,7 +752,7 @@ void WINAPI PostQuitMessage32( INT32 exitCode )
{
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
TaskQueue
(
0
)
)))
return
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
FastQueue
(
)
)))
return
;
queue
->
wPostQMsg
=
TRUE
;
queue
->
wExitCode
=
(
WORD
)
exitCode
;
}
...
...
@@ -819,7 +819,7 @@ BOOL32 WINAPI SetMessageQueue32( INT32 size )
SIGNAL_MaskAsyncEvents
(
TRUE
);
/* Copy data and free the old message queue */
if
((
hQueue
=
GetT
ask
Queue
(
0
))
!=
0
)
if
((
hQueue
=
GetT
hread
Queue
(
0
))
!=
0
)
{
MESSAGEQUEUE
*
oldQ
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
hQueue
);
memcpy
(
&
queuePtr
->
wParamHigh
,
&
oldQ
->
wParamHigh
,
...
...
@@ -838,12 +838,25 @@ BOOL32 WINAPI SetMessageQueue32( INT32 size )
hFirstQueue
=
hNewQueue
;
if
(
!
queuePtr
->
next
)
pCursorQueue
=
queuePtr
;
SetT
ask
Queue
(
0
,
hNewQueue
);
SetT
hread
Queue
(
0
,
hNewQueue
);
SIGNAL_MaskAsyncEvents
(
FALSE
);
return
TRUE
;
}
/***********************************************************************
* InitThreadInput (USER.409)
*/
HQUEUE16
WINAPI
InitThreadInput
(
WORD
unknown
,
WORD
flags
)
{
HQUEUE16
hQueue
=
GetTaskQueue
(
0
);
FIXME
(
msg
,
"(%04X,%04X): should create thread-local message queue!
\n
"
,
unknown
,
flags
);
SetFastQueue
(
0
,
hQueue
);
return
hQueue
;
}
/***********************************************************************
* GetQueueStatus16 (USER.334)
...
...
@@ -853,7 +866,7 @@ DWORD WINAPI GetQueueStatus16( UINT16 flags )
MESSAGEQUEUE
*
queue
;
DWORD
ret
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
TaskQueue
(
0
)
)))
return
0
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
FastQueue
(
)
)))
return
0
;
ret
=
MAKELONG
(
queue
->
changeBits
,
queue
->
wakeBits
);
queue
->
changeBits
=
0
;
return
ret
&
MAKELONG
(
flags
,
flags
);
...
...
@@ -867,7 +880,7 @@ DWORD WINAPI GetQueueStatus32( UINT32 flags )
MESSAGEQUEUE
*
queue
;
DWORD
ret
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
TaskQueue
(
0
)
)))
return
0
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
FastQueue
(
)
)))
return
0
;
ret
=
MAKELONG
(
queue
->
changeBits
,
queue
->
wakeBits
);
queue
->
changeBits
=
0
;
return
ret
&
MAKELONG
(
flags
,
flags
);
...
...
@@ -900,11 +913,35 @@ BOOL32 WINAPI GetInputState32(void)
{
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
TaskQueue
(
0
)
)))
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
FastQueue
(
)
)))
return
FALSE
;
return
queue
->
wakeBits
&
(
QS_KEY
|
QS_MOUSEBUTTON
);
}
/***********************************************************************
* UserYield (USER.332)
*/
void
WINAPI
UserYield
(
void
)
{
TDB
*
pCurTask
=
(
TDB
*
)
GlobalLock16
(
GetCurrentTask
()
);
MESSAGEQUEUE
*
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
pCurTask
->
hQueue
);
if
(
!
THREAD_IsWin16
(
THREAD_Current
()
)
)
{
FIXME
(
task
,
"called for Win32 thread (%04x)!
\n
"
,
THREAD_Current
()
->
teb_sel
);
return
;
}
/* Handle sent messages */
while
(
queue
&&
(
queue
->
wakeBits
&
QS_SENDMESSAGE
))
QUEUE_ReceiveMessage
(
queue
);
OldYield
();
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
pCurTask
->
hQueue
);
while
(
queue
&&
(
queue
->
wakeBits
&
QS_SENDMESSAGE
))
QUEUE_ReceiveMessage
(
queue
);
}
/***********************************************************************
* GetMessagePos (USER.119) (USER32.272)
...
...
@@ -931,7 +968,7 @@ DWORD WINAPI GetMessagePos(void)
{
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
TaskQueue
(
0
)
)))
return
0
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
FastQueue
(
)
)))
return
0
;
return
queue
->
GetMessagePosVal
;
}
...
...
@@ -959,7 +996,7 @@ LONG WINAPI GetMessageTime(void)
{
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
TaskQueue
(
0
)
)))
return
0
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
FastQueue
(
)
)))
return
0
;
return
queue
->
GetMessageTimeVal
;
}
...
...
@@ -971,6 +1008,6 @@ LONG WINAPI GetMessageExtraInfo(void)
{
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
TaskQueue
(
0
)
)))
return
0
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
FastQueue
(
)
)))
return
0
;
return
queue
->
GetMessageExtraInfoVal
;
}
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