Release 960717
[wine/multimedia.git] / win32 / user32.c
blob4451e2a572235d8d763b255c44999f7c4e49bfbb
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 "string32.h"
20 #include "win.h"
21 #include "debug.h"
22 #include "stddebug.h"
24 /***********************************************************************
25 * GetMessageA (USER32.269)
27 BOOL USER32_GetMessageA(MSG32* lpmsg,DWORD hwnd,DWORD min,DWORD max)
29 BOOL ret;
30 MSG16 msg;
31 ret=GetMessage(MAKE_SEGPTR(&msg),(HWND)hwnd,min,max);
32 STRUCT32_MSG16to32(&msg,lpmsg);
33 return ret;
36 /***********************************************************************
37 * DispatchMessageA (USER32.140)
39 LONG USER32_DispatchMessageA(MSG32* lpmsg)
41 MSG16 msg;
42 LONG ret;
43 STRUCT32_MSG32to16(lpmsg,&msg);
44 ret=DispatchMessage(&msg);
45 STRUCT32_MSG16to32(&msg,lpmsg);
46 return ret;
49 /***********************************************************************
50 * TranslateMessage (USER32.555)
52 BOOL USER32_TranslateMessage(MSG32* lpmsg)
54 MSG16 msg;
55 STRUCT32_MSG32to16(lpmsg,&msg);
56 return TranslateMessage(&msg);
59 /***********************************************************************
60 * PeekMessageA
62 BOOL32 PeekMessage32A( LPMSG32 lpmsg, HWND32 hwnd,
63 UINT32 min,UINT32 max,UINT32 wRemoveMsg)
65 MSG16 msg;
66 BOOL ret;
67 ret=PeekMessage16(&msg,hwnd,min,max,wRemoveMsg);
68 /* FIXME: should translate the message to Win32 */
69 STRUCT32_MSG16to32(&msg,lpmsg);
70 return ret;
73 /***********************************************************************
74 * PeekMessageW
76 BOOL32 PeekMessage32W( LPMSG32 lpmsg, HWND32 hwnd,
77 UINT32 min,UINT32 max,UINT32 wRemoveMsg)
79 /* FIXME: Should perform Unicode translation on specific messages */
80 return PeekMessage32A(lpmsg,hwnd,min,max,wRemoveMsg);