2001-05-18 22:51:56 +00:00
|
|
|
/*
|
|
|
|
* Message queues related functions
|
1996-03-14 18:08:34 +00:00
|
|
|
*
|
|
|
|
* Copyright 1993, 1994 Alexandre Julliard
|
2002-03-09 23:29:33 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
1996-03-14 18:08:34 +00:00
|
|
|
*/
|
|
|
|
|
1999-02-28 12:25:03 +00:00
|
|
|
#include <string.h>
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 17:17:47 +00:00
|
|
|
#include <signal.h>
|
2000-01-01 22:38:20 +00:00
|
|
|
#include <assert.h>
|
2000-02-10 19:03:02 +00:00
|
|
|
#include "windef.h"
|
|
|
|
#include "wingdi.h"
|
2000-08-04 04:21:02 +00:00
|
|
|
#include "winerror.h"
|
1999-02-17 13:51:06 +00:00
|
|
|
#include "wine/winbase16.h"
|
|
|
|
#include "wine/winuser16.h"
|
2002-12-03 23:34:52 +00:00
|
|
|
#include "message.h"
|
1996-03-14 18:08:34 +00:00
|
|
|
#include "win.h"
|
2001-05-16 19:52:29 +00:00
|
|
|
#include "user.h"
|
1997-02-02 19:01:52 +00:00
|
|
|
#include "thread.h"
|
2002-03-09 23:29:33 +00:00
|
|
|
#include "wine/debug.h"
|
2001-07-19 00:39:09 +00:00
|
|
|
#include "wine/server.h"
|
1996-03-14 18:08:34 +00:00
|
|
|
|
2002-03-09 23:29:33 +00:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(msg);
|
1999-04-19 14:56:29 +00:00
|
|
|
|
1996-03-14 18:08:34 +00:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* QUEUE_CreateMsgQueue
|
|
|
|
*
|
|
|
|
* Creates a message queue. Doesn't link it into queue list!
|
|
|
|
*/
|
2002-10-29 21:32:37 +00:00
|
|
|
static HQUEUE16 QUEUE_CreateMsgQueue(void)
|
1996-03-14 18:08:34 +00:00
|
|
|
{
|
1996-08-11 15:49:51 +00:00
|
|
|
HQUEUE16 hQueue;
|
2001-01-05 04:08:07 +00:00
|
|
|
HANDLE handle;
|
1996-03-14 18:08:34 +00:00
|
|
|
MESSAGEQUEUE * msgQueue;
|
|
|
|
|
1999-05-02 14:32:27 +00:00
|
|
|
TRACE_(msg)("(): Creating message queue...\n");
|
Release 960428
Sun Apr 28 14:32:43 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [Makefile.in]
Subdir memory is now also compiled for Winelib, in order to get
the Win32 heap functions.
* [if1632/Makefile.in]
Renamed winprocs and winprocs32 to wprocs and wprocs32 to avoid
DLL names > 8 characters.
* [loader/builtin.c] (New file)
Grouped all built-in DLLs code in a single file.
* [memory/global.c]
Use the Win32 heap code instead of malloc() to allocate linear
memory. This will help test the heap code.
* [memory/local.c]
Fixed FreeSelector() to clear DS and ES correctly for huge blocks.
* [tools/build.c] [if1632/relay.c]
Removed 'id' directive in spec files. For relay debugging, the DLL
entry point is now computed from the CS:IP entry point address.
Added 'heap' directive to specifiy a local heap for the DLL. USER
and GDI heap are now created this way.
* [windows/class.c] [include/class.h]
Changed the class structure to use pointers instead of handles.
Changed Get/SetClassWord/Long to use a switch statement; this
allows changing the layout of the CLASS structure.
* [windows/win.c] [include/win.h]
Use a CLASS * instead of a handle for the window class.
Sat Apr 27 18:10:11 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [if1632/kernel32.spec] [memory/global.c]
[win32/memory.c] [win32/process.c]
GetProcessAffinityMask,GlobalLock,IsBadReadPtr,IsBadWritePtr,
LocalLock,SetThreadAffinityMask: new relays.
* [win32/cursoricon32.c]
Return same handle if a cursor is loaded multiple times.
Sat Apr 27 15:13:37 1996 Bang Jun Young <bangjy@nownuri.nowcom.co.kr>
* [resources/sysres_Ko.rc]
Added support for Korean [Ko] language.
Fri Apr 26 00:49:05 1996 Huw D. M. Davies <h.davies1@physics.oxford.ac.uk>
* [objects/dc.c] [objects/font.c]
Fixed problem with SaveDC()/RestoreDC() and font cache 'used' count.
* [objects/metafile.c] [objects/dcvalues.c]
Fixed broken SetTextAlign() on metafiles.
* [objects/metafile.c]
Delete objects in handle table at end of PlayMetaFile().
Wed Apr 24 19:21:01 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [if1632/ver.spec] [misc/ver.c] [include/ver.h] (New files)
VER.DLL (partially) implemented (VerFindFile,VerInstallFile)
[If it doesn't work for you, use -dll -ver and report it to me]
* [if1632/user32.spec] [if1632/kernel32.spec] [if1632/shell.spec]
[if1632/shell32.spec] [misc/ole2nls.c] [windows/message.c]
[windows/graphics.c]
Simple win32 functions, where we can just use the win16 counterpart.
Misc. stubs.
* [misc/lstr.c]
Someone reported a _lstrlen(NULL). NULL is a valid argument. Fixed.
* [misc/registry.c]
Some alloclens were off by 1, one double fclose() fixed.
Requesting value 0 of a key with no values returns an error
(should we always return a made up value NULL? what does win3.1?)
Tue Apr 23 17:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [misc/shell.c]
Implemented FindEnvironmentString(), DoEnvironmentSubst(),
ExtractIcon(), InternalExtractIcon() and ExtractAssociatedIcon().
* [misc/user.c]
Do extensive cleanup on application exit.
* [windows/hook.c] [windows/win.c] [windows/class.c]
Added miscellaneous cleanup routines.
* [controls/menu.c]
More efficient popup menu window handling.
Mon Apr 22 21:35:22 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/windows.h][objects/oembitmap.c][include/bitmaps/obm_trtype]
Added "TT-bitmap" for later usage in a ChooseFont() ownerdraw combobox.
1996-04-28 15:09:19 +00:00
|
|
|
|
1999-01-26 09:30:05 +00:00
|
|
|
if (!(hQueue = GlobalAlloc16( GMEM_FIXED | GMEM_ZEROINIT,
|
|
|
|
sizeof(MESSAGEQUEUE) )))
|
1996-03-14 18:08:34 +00:00
|
|
|
return 0;
|
1999-01-26 09:30:05 +00:00
|
|
|
|
1996-05-06 16:06:24 +00:00
|
|
|
msgQueue = (MESSAGEQUEUE *) GlobalLock16( hQueue );
|
1999-01-28 10:54:11 +00:00
|
|
|
if ( !msgQueue )
|
|
|
|
return 0;
|
|
|
|
|
2002-10-29 21:32:37 +00:00
|
|
|
SERVER_START_REQ( get_msg_queue )
|
2000-08-30 00:00:48 +00:00
|
|
|
{
|
2002-10-29 21:32:37 +00:00
|
|
|
wine_server_call_err( req );
|
|
|
|
handle = reply->handle;
|
2000-05-30 19:48:18 +00:00
|
|
|
}
|
2002-10-29 21:32:37 +00:00
|
|
|
SERVER_END_REQ;
|
|
|
|
if (!handle)
|
|
|
|
{
|
|
|
|
ERR_(msg)("Cannot get thread queue");
|
|
|
|
GlobalFree16( hQueue );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
msgQueue->server_queue = handle;
|
2001-05-18 22:51:56 +00:00
|
|
|
msgQueue->self = hQueue;
|
1996-03-14 18:08:34 +00:00
|
|
|
return hQueue;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2002-10-29 21:32:37 +00:00
|
|
|
* QUEUE_Current
|
1996-03-14 18:08:34 +00:00
|
|
|
*
|
2002-10-29 21:32:37 +00:00
|
|
|
* Get the current thread queue, creating it if required.
|
|
|
|
* QUEUE_Unlock is not needed since the queue can only be deleted by
|
|
|
|
* the current thread anyway.
|
|
|
|
*/
|
|
|
|
MESSAGEQUEUE *QUEUE_Current(void)
|
|
|
|
{
|
|
|
|
HQUEUE16 hQueue = NtCurrentTeb()->queue;
|
|
|
|
|
|
|
|
if (!hQueue)
|
|
|
|
{
|
|
|
|
if (!(hQueue = QUEUE_CreateMsgQueue())) return NULL;
|
|
|
|
SetThreadQueue16( 0, hQueue );
|
|
|
|
}
|
|
|
|
|
|
|
|
return GlobalLock16( hQueue );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* QUEUE_DeleteMsgQueue
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 17:17:47 +00:00
|
|
|
*
|
2002-10-29 21:32:37 +00:00
|
|
|
* Delete a message queue.
|
1996-03-14 18:08:34 +00:00
|
|
|
*/
|
2001-07-26 20:12:22 +00:00
|
|
|
void QUEUE_DeleteMsgQueue(void)
|
1996-03-14 18:08:34 +00:00
|
|
|
{
|
2002-10-29 21:32:37 +00:00
|
|
|
HQUEUE16 hQueue = NtCurrentTeb()->queue;
|
2001-07-26 20:12:22 +00:00
|
|
|
MESSAGEQUEUE * msgQueue;
|
|
|
|
|
|
|
|
if (!hQueue) return; /* thread doesn't have a queue */
|
1996-03-14 18:08:34 +00:00
|
|
|
|
2001-07-26 20:12:22 +00:00
|
|
|
TRACE("(): Deleting message queue %04x\n", hQueue);
|
Release 960428
Sun Apr 28 14:32:43 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [Makefile.in]
Subdir memory is now also compiled for Winelib, in order to get
the Win32 heap functions.
* [if1632/Makefile.in]
Renamed winprocs and winprocs32 to wprocs and wprocs32 to avoid
DLL names > 8 characters.
* [loader/builtin.c] (New file)
Grouped all built-in DLLs code in a single file.
* [memory/global.c]
Use the Win32 heap code instead of malloc() to allocate linear
memory. This will help test the heap code.
* [memory/local.c]
Fixed FreeSelector() to clear DS and ES correctly for huge blocks.
* [tools/build.c] [if1632/relay.c]
Removed 'id' directive in spec files. For relay debugging, the DLL
entry point is now computed from the CS:IP entry point address.
Added 'heap' directive to specifiy a local heap for the DLL. USER
and GDI heap are now created this way.
* [windows/class.c] [include/class.h]
Changed the class structure to use pointers instead of handles.
Changed Get/SetClassWord/Long to use a switch statement; this
allows changing the layout of the CLASS structure.
* [windows/win.c] [include/win.h]
Use a CLASS * instead of a handle for the window class.
Sat Apr 27 18:10:11 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [if1632/kernel32.spec] [memory/global.c]
[win32/memory.c] [win32/process.c]
GetProcessAffinityMask,GlobalLock,IsBadReadPtr,IsBadWritePtr,
LocalLock,SetThreadAffinityMask: new relays.
* [win32/cursoricon32.c]
Return same handle if a cursor is loaded multiple times.
Sat Apr 27 15:13:37 1996 Bang Jun Young <bangjy@nownuri.nowcom.co.kr>
* [resources/sysres_Ko.rc]
Added support for Korean [Ko] language.
Fri Apr 26 00:49:05 1996 Huw D. M. Davies <h.davies1@physics.oxford.ac.uk>
* [objects/dc.c] [objects/font.c]
Fixed problem with SaveDC()/RestoreDC() and font cache 'used' count.
* [objects/metafile.c] [objects/dcvalues.c]
Fixed broken SetTextAlign() on metafiles.
* [objects/metafile.c]
Delete objects in handle table at end of PlayMetaFile().
Wed Apr 24 19:21:01 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [if1632/ver.spec] [misc/ver.c] [include/ver.h] (New files)
VER.DLL (partially) implemented (VerFindFile,VerInstallFile)
[If it doesn't work for you, use -dll -ver and report it to me]
* [if1632/user32.spec] [if1632/kernel32.spec] [if1632/shell.spec]
[if1632/shell32.spec] [misc/ole2nls.c] [windows/message.c]
[windows/graphics.c]
Simple win32 functions, where we can just use the win16 counterpart.
Misc. stubs.
* [misc/lstr.c]
Someone reported a _lstrlen(NULL). NULL is a valid argument. Fixed.
* [misc/registry.c]
Some alloclens were off by 1, one double fclose() fixed.
Requesting value 0 of a key with no values returns an error
(should we always return a made up value NULL? what does win3.1?)
Tue Apr 23 17:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [misc/shell.c]
Implemented FindEnvironmentString(), DoEnvironmentSubst(),
ExtractIcon(), InternalExtractIcon() and ExtractAssociatedIcon().
* [misc/user.c]
Do extensive cleanup on application exit.
* [windows/hook.c] [windows/win.c] [windows/class.c]
Added miscellaneous cleanup routines.
* [controls/menu.c]
More efficient popup menu window handling.
Mon Apr 22 21:35:22 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/windows.h][objects/oembitmap.c][include/bitmaps/obm_trtype]
Added "TT-bitmap" for later usage in a ChooseFont() ownerdraw combobox.
1996-04-28 15:09:19 +00:00
|
|
|
|
2002-10-29 21:32:37 +00:00
|
|
|
if (!(msgQueue = GlobalLock16( hQueue )))
|
1996-03-14 18:08:34 +00:00
|
|
|
{
|
2001-07-26 20:12:22 +00:00
|
|
|
ERR("invalid thread queue\n");
|
|
|
|
return;
|
1996-03-14 18:08:34 +00:00
|
|
|
}
|
1999-01-28 10:54:11 +00:00
|
|
|
|
2001-07-26 20:12:22 +00:00
|
|
|
SetThreadQueue16( 0, 0 );
|
2002-10-29 21:32:37 +00:00
|
|
|
CloseHandle( msgQueue->server_queue );
|
|
|
|
GlobalFree16( hQueue );
|
1996-03-14 18:08:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1998-12-24 15:15:00 +00:00
|
|
|
/***********************************************************************
|
2002-09-09 19:26:55 +00:00
|
|
|
* InitThreadInput (USER.409)
|
1998-12-24 15:15:00 +00:00
|
|
|
*/
|
1999-02-26 11:11:13 +00:00
|
|
|
HQUEUE16 WINAPI InitThreadInput16( WORD unknown, WORD flags )
|
1998-12-24 15:15:00 +00:00
|
|
|
{
|
2002-10-29 21:32:37 +00:00
|
|
|
MESSAGEQUEUE *queue = QUEUE_Current();
|
|
|
|
return queue ? queue->self : 0;
|
1998-12-24 15:15:00 +00:00
|
|
|
}
|
1996-03-14 18:08:34 +00:00
|
|
|
|
1997-11-30 17:45:40 +00:00
|
|
|
/***********************************************************************
|
2000-12-22 01:38:01 +00:00
|
|
|
* GetQueueStatus (USER32.@)
|
1997-11-30 17:45:40 +00:00
|
|
|
*/
|
1999-02-26 11:11:13 +00:00
|
|
|
DWORD WINAPI GetQueueStatus( UINT flags )
|
1997-11-30 17:45:40 +00:00
|
|
|
{
|
2001-05-18 22:51:56 +00:00
|
|
|
DWORD ret = 0;
|
1997-11-30 17:45:40 +00:00
|
|
|
|
2003-01-14 19:32:42 +00:00
|
|
|
/* check for pending X events */
|
|
|
|
if (USER_Driver.pMsgWaitForMultipleObjectsEx)
|
|
|
|
USER_Driver.pMsgWaitForMultipleObjectsEx( 0, NULL, 0, 0, 0 );
|
|
|
|
|
2001-05-18 22:51:56 +00:00
|
|
|
SERVER_START_REQ( get_queue_status )
|
|
|
|
{
|
|
|
|
req->clear = 1;
|
2001-11-30 18:46:42 +00:00
|
|
|
wine_server_call( req );
|
|
|
|
ret = MAKELONG( reply->changed_bits & flags, reply->wake_bits & flags );
|
2001-05-18 22:51:56 +00:00
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
|
|
|
return ret;
|
1997-11-30 17:45:40 +00:00
|
|
|
}
|
|
|
|
|
1996-03-14 18:08:34 +00:00
|
|
|
|
2001-05-18 22:51:56 +00:00
|
|
|
/***********************************************************************
|
|
|
|
* GetInputState (USER32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI GetInputState(void)
|
|
|
|
{
|
|
|
|
DWORD ret = 0;
|
|
|
|
|
|
|
|
SERVER_START_REQ( get_queue_status )
|
|
|
|
{
|
|
|
|
req->clear = 0;
|
2001-11-30 18:46:42 +00:00
|
|
|
wine_server_call( req );
|
|
|
|
ret = reply->wake_bits & (QS_KEY | QS_MOUSEBUTTON);
|
2001-05-18 22:51:56 +00:00
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1996-03-14 18:08:34 +00:00
|
|
|
/***********************************************************************
|
2001-07-02 19:59:40 +00:00
|
|
|
* GetMessagePos (USER.119)
|
|
|
|
* GetMessagePos (USER32.@)
|
2002-05-31 23:06:46 +00:00
|
|
|
*
|
1998-10-25 09:20:30 +00:00
|
|
|
* The GetMessagePos() function returns a long value representing a
|
|
|
|
* cursor position, in screen coordinates, when the last message
|
|
|
|
* retrieved by the GetMessage() function occurs. The x-coordinate is
|
|
|
|
* in the low-order word of the return value, the y-coordinate is in
|
|
|
|
* the high-order word. The application can use the MAKEPOINT()
|
2002-05-31 23:06:46 +00:00
|
|
|
* macro to obtain a POINT structure from the return value.
|
1998-10-25 09:20:30 +00:00
|
|
|
*
|
|
|
|
* For the current cursor position, use GetCursorPos().
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
*
|
|
|
|
* Cursor position of last message on success, zero on failure.
|
|
|
|
*
|
|
|
|
* CONFORMANCE
|
|
|
|
*
|
|
|
|
* ECMA-234, Win32
|
|
|
|
*
|
1996-03-14 18:08:34 +00:00
|
|
|
*/
|
1997-08-24 16:00:30 +00:00
|
|
|
DWORD WINAPI GetMessagePos(void)
|
1996-03-14 18:08:34 +00:00
|
|
|
{
|
|
|
|
MESSAGEQUEUE *queue;
|
1999-01-28 10:54:11 +00:00
|
|
|
|
2001-07-26 20:12:22 +00:00
|
|
|
if (!(queue = QUEUE_Current())) return 0;
|
|
|
|
return queue->GetMessagePosVal;
|
1996-03-14 18:08:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-02 19:59:40 +00:00
|
|
|
* GetMessageTime (USER.120)
|
|
|
|
* GetMessageTime (USER32.@)
|
1998-10-25 09:20:30 +00:00
|
|
|
*
|
|
|
|
* GetMessageTime() returns the message time for the last message
|
|
|
|
* retrieved by the function. The time is measured in milliseconds with
|
|
|
|
* the same offset as GetTickCount().
|
|
|
|
*
|
|
|
|
* Since the tick count wraps, this is only useful for moderately short
|
|
|
|
* relative time comparisons.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
*
|
|
|
|
* Time of last message on success, zero on failure.
|
|
|
|
*
|
|
|
|
* CONFORMANCE
|
|
|
|
*
|
|
|
|
* ECMA-234, Win32
|
2002-05-31 23:06:46 +00:00
|
|
|
*
|
1996-03-14 18:08:34 +00:00
|
|
|
*/
|
1997-08-24 16:00:30 +00:00
|
|
|
LONG WINAPI GetMessageTime(void)
|
1996-03-14 18:08:34 +00:00
|
|
|
{
|
|
|
|
MESSAGEQUEUE *queue;
|
|
|
|
|
2001-07-26 20:12:22 +00:00
|
|
|
if (!(queue = QUEUE_Current())) return 0;
|
|
|
|
return queue->GetMessageTimeVal;
|
1996-03-14 18:08:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-02 19:59:40 +00:00
|
|
|
* GetMessageExtraInfo (USER.288)
|
|
|
|
* GetMessageExtraInfo (USER32.@)
|
1996-03-14 18:08:34 +00:00
|
|
|
*/
|
1997-08-24 16:00:30 +00:00
|
|
|
LONG WINAPI GetMessageExtraInfo(void)
|
1996-03-14 18:08:34 +00:00
|
|
|
{
|
|
|
|
MESSAGEQUEUE *queue;
|
|
|
|
|
2001-07-26 20:12:22 +00:00
|
|
|
if (!(queue = QUEUE_Current())) return 0;
|
|
|
|
return queue->GetMessageExtraInfoVal;
|
1996-03-14 18:08:34 +00:00
|
|
|
}
|