[Win32SS]
[reactos.git] / reactos / win32ss / user / ntuser / userfuncs.h
1 #pragma once
2
3 FORCEINLINE PMENU UserGetMenuObject(HMENU hMenu)
4 {
5 return UserGetObject(gHandleTable, hMenu, TYPE_MENU);
6 }
7
8 #define ASSERT_REFS_CO(_obj_) \
9 { \
10 LONG ref = ((PHEAD)_obj_)->cLockObj;\
11 if (!(ref >= 1)){ \
12 ERR_CH(UserObj, "ASSERT: obj 0x%p, refs %ld\n", _obj_, ref); \
13 ASSERT(FALSE); \
14 } \
15 }
16
17 #if 0
18 #define ASSERT_REFS_CO(_obj_) \
19 { \
20 PSINGLE_LIST_ENTRY e; \
21 BOOL gotit=FALSE; \
22 LONG ref = ((PHEAD)_obj_)->cLockObj;\
23 if (!(ref >= 1)){ \
24 ERR_CH(UserObj, "obj 0x%p, refs %i\n", _obj_, ref); \
25 ASSERT(FALSE); \
26 } \
27 \
28 e = PsGetCurrentThreadWin32Thread()->ReferencesList.Next; \
29 while (e) \
30 { \
31 PUSER_REFERENCE_ENTRY ref = CONTAINING_RECORD(e, USER_REFERENCE_ENTRY, Entry); \
32 if (ref->obj == _obj_){ gotit=TRUE; break; } \
33 e = e->Next; \
34 } \
35 ASSERT(gotit); \
36 }
37 #endif
38
39 #define DUMP_REFS(obj) TRACE_CH(UserObj,"obj 0x%x, refs %i\n",obj, ((PHEAD)obj)->cLockObj)
40
41 PWND FASTCALL IntGetWindowObject(HWND hWnd);
42
43 /*************** DDE.C ****************/
44
45 BOOL FASTCALL IntDdeSendMessageHook(PWND,UINT,WPARAM,LPARAM);
46 BOOL APIENTRY IntDdePostMessageHook(IN PWND,IN UINT,IN WPARAM,IN OUT LPARAM*,IN OUT LONG_PTR*);
47 BOOL APIENTRY IntDdeGetMessageHook(PMSG,LONG_PTR);
48
49 /*************** MAIN.C ***************/
50
51 NTSTATUS NTAPI InitThreadCallback(PETHREAD Thread);
52
53 /*************** WINSTA.C ***************/
54
55 HWINSTA FASTCALL UserGetProcessWindowStation(VOID);
56
57 /*************** FOCUS.C ***************/
58
59 HWND FASTCALL UserGetActiveWindow(VOID);
60
61 HWND FASTCALL UserGetForegroundWindow(VOID);
62
63 HWND FASTCALL co_UserSetFocus(PWND Window);
64
65 /*************** WINDC.C ***************/
66
67 INT FASTCALL UserReleaseDC(PWND Window, HDC hDc, BOOL EndPaint);
68 HDC FASTCALL UserGetDCEx(PWND Window OPTIONAL, HANDLE ClipRegion, ULONG Flags);
69 HDC FASTCALL UserGetWindowDC(PWND Wnd);
70
71 /*************** SESSION.C ***************/
72
73 extern PRTL_ATOM_TABLE gAtomTable;
74 NTSTATUS FASTCALL InitSessionImpl(VOID);
75
76 /*************** METRIC.C ***************/
77
78 BOOL NTAPI InitMetrics(VOID);
79 LONG NTAPI UserGetSystemMetrics(ULONG Index);
80
81 /*************** KEYBOARD.C ***************/
82
83 DWORD FASTCALL UserGetKeyState(DWORD key);
84 DWORD FASTCALL UserGetKeyboardType(DWORD TypeFlag);
85 HKL FASTCALL UserGetKeyboardLayout(DWORD dwThreadId);
86
87
88 /*************** MISC.C ***************/
89
90 BOOL FASTCALL
91 UserSystemParametersInfo(
92 UINT uiAction,
93 UINT uiParam,
94 PVOID pvParam,
95 UINT fWinIni);
96
97 VOID FASTCALL IntSetWindowState(PWND, UINT);
98 VOID FASTCALL IntClearWindowState(PWND, UINT);
99 PTHREADINFO FASTCALL IntTID2PTI(HANDLE);
100
101 /*************** MESSAGE.C ***************/
102
103 BOOL FASTCALL
104 UserPostMessage(HWND Wnd,
105 UINT Msg,
106 WPARAM wParam,
107 LPARAM lParam);
108
109 /*************** WINDOW.C ***************/
110
111 PWND FASTCALL UserGetWindowObject(HWND hWnd);
112 VOID FASTCALL co_DestroyThreadWindows(struct _ETHREAD *Thread);
113 HWND FASTCALL UserGetShellWindow(VOID);
114 HDC FASTCALL UserGetDCEx(PWND Window OPTIONAL, HANDLE ClipRegion, ULONG Flags);
115 BOOLEAN co_UserDestroyWindow(PVOID Object);
116 PWND FASTCALL UserGetAncestor(PWND Wnd, UINT Type);
117
118 /*************** MENU.C ***************/
119
120 HMENU FASTCALL UserCreateMenu(PDESKTOP Desktop, BOOL PopupMenu);
121 BOOL FASTCALL UserSetMenuDefaultItem(PMENU Menu, UINT uItem, UINT fByPos);
122 BOOL FASTCALL UserDestroyMenu(HMENU hMenu);
123
124 /*************** SCROLLBAR.C ***************/
125
126 DWORD FASTCALL co_UserShowScrollBar(PWND Wnd, int nBar, BOOL fShowH, BOOL fShowV);
127
128 /************** NONCLIENT **************/
129
130 VOID FASTCALL DefWndDoSizeMove(PWND pwnd, WORD wParam);
131
132 /* EOF */