Release 970914
[wine] / win32 / user32.c
1 /*
2  * Win32 user functions
3  *
4  * Copyright 1995 Martin von Loewis
5  */
6
7 /* This file contains only wrappers to existing Wine functions or trivial
8    stubs. 'Real' implementations go into context specific files */
9
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 "handle32.h"
17 #include "struct32.h"
18 #include "win.h"
19 #include "debug.h"
20 #include "stddebug.h"
21
22 /***********************************************************************
23  *          GetMessage32A   (USER32.269)
24  */
25 BOOL32 WINAPI GetMessage32A(MSG32* lpmsg,HWND32 hwnd,UINT32 min,UINT32 max)
26 {
27     BOOL32 ret;
28     MSG16 *msg = SEGPTR_NEW(MSG16);
29     if (!msg) return 0;
30     ret=GetMessage16(SEGPTR_GET(msg),(HWND16)hwnd,min,max);
31     /* FIXME */
32     STRUCT32_MSG16to32(msg,lpmsg);
33     SEGPTR_FREE(msg);
34     return ret;
35 }
36
37 /***********************************************************************
38  *          GetMessage32W   (USER32.273)
39  */
40 BOOL32 WINAPI GetMessage32W(MSG32* lpmsg,HWND32 hwnd,UINT32 min,UINT32 max)
41 {
42     BOOL32 ret;
43     MSG16 *msg = SEGPTR_NEW(MSG16);
44     if (!msg) return 0;
45     ret=GetMessage16(SEGPTR_GET(msg),(HWND16)hwnd,min,max);
46     /* FIXME */
47     STRUCT32_MSG16to32(msg,lpmsg);
48     SEGPTR_FREE(msg);
49     return ret;
50 }
51
52 /***********************************************************************
53  *         PeekMessageA
54  */
55 BOOL32 WINAPI PeekMessage32A( LPMSG32 lpmsg, HWND32 hwnd,
56                               UINT32 min,UINT32 max,UINT32 wRemoveMsg)
57 {
58         MSG16 msg;
59         BOOL32 ret;
60         ret=PeekMessage16(&msg,hwnd,min,max,wRemoveMsg);
61         /* FIXME: should translate the message to Win32 */
62         STRUCT32_MSG16to32(&msg,lpmsg);
63         return ret;
64 }
65
66 /***********************************************************************
67  *         PeekMessageW
68  */
69 BOOL32 WINAPI PeekMessage32W( LPMSG32 lpmsg, HWND32 hwnd,
70                               UINT32 min,UINT32 max,UINT32 wRemoveMsg)
71 {
72         /* FIXME: Should perform Unicode translation on specific messages */
73         return PeekMessage32A(lpmsg,hwnd,min,max,wRemoveMsg);
74 }