Misc small cleanups.
[wine] / include / user.h
1 /*
2  * USER definitions
3  *
4  * Copyright 1993 Alexandre Julliard
5  */
6
7 #ifndef __WINE_USER_H
8 #define __WINE_USER_H
9
10 #include "ldt.h"
11 #include "local.h"
12
13 extern WORD USER_HeapSel;
14
15 #define USER_HEAP_ALLOC(size) \
16             LOCAL_Alloc( USER_HeapSel, LMEM_FIXED, (size) )
17 #define USER_HEAP_REALLOC(handle,size) \
18             LOCAL_ReAlloc( USER_HeapSel, (handle), (size), LMEM_FIXED )
19 #define USER_HEAP_FREE(handle) \
20             LOCAL_Free( USER_HeapSel, (handle) )
21 #define USER_HEAP_LIN_ADDR(handle)  \
22          ((handle) ? PTR_SEG_OFF_TO_LIN(USER_HeapSel, (handle)) : NULL)
23 #define USER_HEAP_SEG_ADDR(handle)  \
24          ((handle) ? PTR_SEG_OFF_TO_SEGPTR(USER_HeapSel, (handle)) : (SEGPTR)0)
25
26 #define USUD_LOCALALLOC        0x0001
27 #define USUD_LOCALFREE         0x0002
28 #define USUD_LOCALCOMPACT      0x0003
29 #define USUD_LOCALHEAP         0x0004
30 #define USUD_FIRSTCLASS        0x0005
31
32 typedef struct tagUSER_DRIVER {
33   BOOL (*pInitialize)(void);
34   void (*pFinalize)(void);
35 } USER_DRIVER;
36
37 extern USER_DRIVER *USER_Driver;
38
39 WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID,
40                             DWORD dwFlags, HMODULE16 hModule );
41
42 #endif  /* __WINE_USER_H */