Skip to content

Commit a5e65cd

Browse files
committed
[ARWINSS]
- Bring missing GDI Object Manager defines into gdiobj.c. - Add missing ime.h include into win32k.h svn path=/branches/arwinss/; revision=66740
1 parent ef02ab3 commit a5e65cd

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

arwinss/server/gre/gdiobj.c

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,50 @@
2828
DPRINT("%s:%i: Delay\n", __FILE__, __LINE__); \
2929
KeDelayExecutionThread(KernelMode, FALSE, &ShortDelay)
3030

31+
/* GDI handle table can hold 0x10000 handles */
32+
#define GDI_HANDLE_COUNT 0x10000
33+
#define GDI_GLOBAL_PROCESS (0x0)
34+
#define GDI_CFONT_MAX 16
35+
36+
/* Handle Masks and shifts */
37+
#define GDI_ENTRY_STOCK_MASK 0x00000080
38+
#define GDI_ENTRY_REUSE_MASK 0x0000ff00
39+
#define GDI_ENTRY_REUSE_INC 0x00000100
40+
#define GDI_ENTRY_BASETYPE_MASK 0x001f0000
41+
#define GDI_ENTRY_FLAGS_MASK 0xff000000
42+
#define GDI_ENTRY_REUSECNT_SHIFT 8
43+
#define GDI_ENTRY_UPPER_SHIFT 16
44+
45+
/* Handle macros */
46+
#define GDI_HANDLE_CREATE(i, t) \
47+
((HANDLE)(((i) & GDI_HANDLE_INDEX_MASK) | ((t) & GDI_HANDLE_TYPE_MASK)))
48+
49+
#define GDI_HANDLE_GET_INDEX(h) \
50+
(((ULONG_PTR)(h)) & GDI_HANDLE_INDEX_MASK)
51+
52+
#define GDI_HANDLE_GET_TYPE(h) \
53+
(((ULONG_PTR)(h)) & GDI_HANDLE_TYPE_MASK)
54+
55+
#define GDI_HANDLE_IS_TYPE(h, t) \
56+
((t) == (((ULONG_PTR)(h)) & GDI_HANDLE_TYPE_MASK))
57+
58+
#define GDI_HANDLE_IS_STOCKOBJ(h) \
59+
(0 != (((ULONG_PTR)(h)) & GDI_HANDLE_STOCK_MASK))
60+
61+
#define GDI_HANDLE_SET_STOCKOBJ(h) \
62+
((h) = (HANDLE)(((ULONG_PTR)(h)) | GDI_HANDLE_STOCK_MASK))
63+
64+
#define GDI_HANDLE_GET_UPPER(h) \
65+
(((ULONG_PTR)(h)) & GDI_HANDLE_UPPER_MASK)
66+
67+
#define GDI_HANDLE_GET_REUSECNT(h) \
68+
(((ULONG_PTR)(h)) >> GDI_HANDLE_REUSECNT_SHIFT)
69+
70+
#define GDI_ENTRY_GET_REUSECNT(e) \
71+
((((ULONG_PTR)(e)) & GDI_ENTRY_REUSE_MASK) >> GDI_ENTRY_REUSECNT_SHIFT)
72+
73+
#define GDI_OBJECT_GET_TYPE_INDEX(t) \
74+
((t & GDI_HANDLE_BASETYPE_MASK) >> GDI_HANDLE_BASETYPE_SHIFT)
3175
#include "gdidbg.c"
3276

3377
/* static */ /* FIXME: -fno-unit-at-a-time breaks this */

arwinss/server/include/win32k.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
3939
#include <wincon.h>
4040
#define _NOCSECT_TYPE
4141
#include <ddrawi.h>
42+
#include <imm.h>
4243

4344
/* SEH Support with PSEH */
4445
#include <pseh/pseh2.h>

0 commit comments

Comments
 (0)