Release 960611
[wine/multimedia.git] / win32 / user32.c
blob39ef0d7ebec20ce77bbbf704305f1315bff7fa79
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 "winproc.h"
23 #include "debug.h"
24 #include "stddebug.h"
26 /***********************************************************************
27 * GetMessageA (USER32.269)
29 BOOL USER32_GetMessageA(MSG32* lpmsg,DWORD hwnd,DWORD min,DWORD max)
31 BOOL ret;
32 MSG16 msg;
33 ret=GetMessage(MAKE_SEGPTR(&msg),(HWND)hwnd,min,max);
34 STRUCT32_MSG16to32(&msg,lpmsg);
35 return ret;
38 /***********************************************************************
39 * DispatchMessageA (USER32.140)
41 LONG USER32_DispatchMessageA(MSG32* lpmsg)
43 MSG16 msg;
44 LONG ret;
45 STRUCT32_MSG32to16(lpmsg,&msg);
46 ret=DispatchMessage(&msg);
47 STRUCT32_MSG16to32(&msg,lpmsg);
48 return ret;
51 /***********************************************************************
52 * TranslateMessage (USER32.555)
54 BOOL USER32_TranslateMessage(MSG32* lpmsg)
56 MSG16 msg;
57 STRUCT32_MSG32to16(lpmsg,&msg);
58 return TranslateMessage(&msg);
61 /***********************************************************************
62 * PeekMessageA
64 BOOL32 PeekMessage32A( LPMSG32 lpmsg, HWND32 hwnd,
65 UINT32 min,UINT32 max,UINT32 wRemoveMsg)
67 MSG16 msg;
68 BOOL ret;
69 ret=PeekMessage16(&msg,hwnd,min,max,wRemoveMsg);
70 /* FIXME: should translate the message to Win32 */
71 STRUCT32_MSG16to32(&msg,lpmsg);
72 return ret;
75 /***********************************************************************
76 * PeekMessageW
78 BOOL32 PeekMessage32W( LPMSG32 lpmsg, HWND32 hwnd,
79 UINT32 min,UINT32 max,UINT32 wRemoveMsg)
81 /* FIXME: Should perform Unicode translation on specific messages */
82 return PeekMessage32A(lpmsg,hwnd,min,max,wRemoveMsg);
85 UINT USER32_SetTimer(HWND hwnd, UINT id, UINT timeout, void *proc)
88 dprintf_win32(stddeb, "USER32_SetTimer: %d %d %d %08lx\n", hwnd, id, timeout,
89 (LONG)proc );
90 return SetTimer( hwnd, id, timeout, MAKE_SEGPTR(proc));