Release 960712
[wine/multimedia.git] / win32 / user32.c
blob6b1e455aa106a167024b7a4045c8a1936ac5821e
1 /*
2 * Win32 user functions
4 * Copyright 1995 Martin von Loewis
5 */
7 /* This file contains only wrappers to existing Wine functions or trivial
8 stubs. 'Real' implementations go into context specific files */
10 #include <unistd.h>
11 #include <stdio.h>
12 #include <stdarg.h>
13 #include "windows.h"
14 #include "winerror.h"
15 #include "stackframe.h"
16 #include "xmalloc.h"
17 #include "handle32.h"
18 #include "struct32.h"
19 #include "resource32.h"
20 #include "string32.h"
21 #include "win.h"
22 #include "debug.h"
23 #include "stddebug.h"
25 /***********************************************************************
26 * GetMessageA (USER32.269)
28 BOOL USER32_GetMessageA(MSG32* lpmsg,DWORD hwnd,DWORD min,DWORD max)
30 BOOL ret;
31 MSG16 msg;
32 ret=GetMessage(MAKE_SEGPTR(&msg),(HWND)hwnd,min,max);
33 STRUCT32_MSG16to32(&msg,lpmsg);
34 return ret;
37 /***********************************************************************
38 * DispatchMessageA (USER32.140)
40 LONG USER32_DispatchMessageA(MSG32* lpmsg)
42 MSG16 msg;
43 LONG ret;
44 STRUCT32_MSG32to16(lpmsg,&msg);
45 ret=DispatchMessage(&msg);
46 STRUCT32_MSG16to32(&msg,lpmsg);
47 return ret;
50 /***********************************************************************
51 * TranslateMessage (USER32.555)
53 BOOL USER32_TranslateMessage(MSG32* lpmsg)
55 MSG16 msg;
56 STRUCT32_MSG32to16(lpmsg,&msg);
57 return TranslateMessage(&msg);
60 /***********************************************************************
61 * PeekMessageA
63 BOOL32 PeekMessage32A( LPMSG32 lpmsg, HWND32 hwnd,
64 UINT32 min,UINT32 max,UINT32 wRemoveMsg)
66 MSG16 msg;
67 BOOL ret;
68 ret=PeekMessage16(&msg,hwnd,min,max,wRemoveMsg);
69 /* FIXME: should translate the message to Win32 */
70 STRUCT32_MSG16to32(&msg,lpmsg);
71 return ret;
74 /***********************************************************************
75 * PeekMessageW
77 BOOL32 PeekMessage32W( LPMSG32 lpmsg, HWND32 hwnd,
78 UINT32 min,UINT32 max,UINT32 wRemoveMsg)
80 /* FIXME: Should perform Unicode translation on specific messages */
81 return PeekMessage32A(lpmsg,hwnd,min,max,wRemoveMsg);