Release 960818
[wine/multimedia.git] / win32 / user32.c
blobafb5bcefe63372350a2ac3f9bba8b9471d36c8d5
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 "heap.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 = SEGPTR_NEW(MSG16);
31 if (!msg) return 0;
32 ret=GetMessage(SEGPTR_GET(msg),(HWND)hwnd,min,max);
33 STRUCT32_MSG16to32(msg,lpmsg);
34 SEGPTR_FREE(msg);
35 return ret;
38 /***********************************************************************
39 * IsDialogMessageA (USER32.341)
41 BOOL IsDialogMessage32A(DWORD hwnd, MSG32* lpmsg)
43 MSG16 msg;
44 STRUCT32_MSG32to16(lpmsg, &msg);
45 return IsDialogMessage(hwnd, &msg);
48 /***********************************************************************
49 * DispatchMessageA (USER32.140)
51 LONG USER32_DispatchMessageA(MSG32* lpmsg)
53 MSG16 msg;
54 LONG ret;
55 STRUCT32_MSG32to16(lpmsg,&msg);
56 ret=DispatchMessage(&msg);
57 STRUCT32_MSG16to32(&msg,lpmsg);
58 return ret;
61 /***********************************************************************
62 * TranslateMessage (USER32.555)
64 BOOL USER32_TranslateMessage(MSG32* lpmsg)
66 MSG16 msg;
67 STRUCT32_MSG32to16(lpmsg,&msg);
68 return TranslateMessage(&msg);
71 /***********************************************************************
72 * PeekMessageA
74 BOOL32 PeekMessage32A( LPMSG32 lpmsg, HWND32 hwnd,
75 UINT32 min,UINT32 max,UINT32 wRemoveMsg)
77 MSG16 msg;
78 BOOL ret;
79 ret=PeekMessage16(&msg,hwnd,min,max,wRemoveMsg);
80 /* FIXME: should translate the message to Win32 */
81 STRUCT32_MSG16to32(&msg,lpmsg);
82 return ret;
85 /***********************************************************************
86 * PeekMessageW
88 BOOL32 PeekMessage32W( LPMSG32 lpmsg, HWND32 hwnd,
89 UINT32 min,UINT32 max,UINT32 wRemoveMsg)
91 /* FIXME: Should perform Unicode translation on specific messages */
92 return PeekMessage32A(lpmsg,hwnd,min,max,wRemoveMsg);