ReactOS 0.4.15-dev-7788-g1ad9096
scrollex.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Win32k subsystem
4 * PURPOSE: Window scrolling function
5 * FILE: win32ss/user/ntuser/scrollex.c
6 * PROGRAMER: Filip Navara (xnavara@volny.cz)
7 */
8
9#include <win32k.h>
10
11DBG_DEFAULT_CHANNEL(UserPainting);
12
13static
16{
17 PTHRDCARETINFO CaretInfo;
18 PTHREADINFO pti;
19 PUSER_MESSAGE_QUEUE ThreadQueue;
20 HWND hWndCaret;
21 PWND WndCaret;
22
24
26 ThreadQueue = pti->MessageQueue;
27 CaretInfo = &ThreadQueue->CaretInfo;
28 hWndCaret = CaretInfo->hWnd;
29
30 WndCaret = ValidateHwndNoErr(hWndCaret);
31
32 // FIXME: Check for WndCaret can be NULL
33 if (WndCaret == Window ||
35 {
36 POINT pt, FromOffset, ToOffset;
37 RECTL rcCaret;
38
39 pt.x = CaretInfo->Pos.x;
40 pt.y = CaretInfo->Pos.y;
41 IntGetClientOrigin(WndCaret, &FromOffset);
42 IntGetClientOrigin(Window, &ToOffset);
43 rcCaret.left = pt.x;
44 rcCaret.top = pt.y;
45 rcCaret.right = pt.x + CaretInfo->Size.cx;
46 rcCaret.bottom = pt.y + CaretInfo->Size.cy;
47 if (RECTL_bIntersectRect(lprc, lprc, &rcCaret))
48 {
50 lprc->left = pt.x;
51 lprc->top = pt.y;
52 return hWndCaret;
53 }
54 }
55
56 return 0;
57}
58
59/*
60 Old GetUpdateRgn, for scrolls, see above note.
61 */
64{
65 int RegionType;
66 RECTL Rect;
67 PREGION UpdateRgn;
68
70
71 if (bErase)
72 {
74 }
75
76 Window->state &= ~WNDS_UPDATEDIRTY;
77
78 if (Window->hrgnUpdate == NULL)
79 {
80 REGION_SetRectRgn(Rgn, 0, 0, 0, 0);
81 return NULLREGION;
82 }
83
84 UpdateRgn = REGION_LockRgn(Window->hrgnUpdate);
85 if (!UpdateRgn)
86 return ERROR;
87
88 Rect = Window->rcClient;
90 REGION_SetRectRgn(Rgn, Rect.left, Rect.top, Rect.right, Rect.bottom);
91 RegionType = IntGdiCombineRgn(Rgn, Rgn, UpdateRgn, RGN_AND);
92 REGION_bOffsetRgn(Rgn, -Window->rcClient.left, -Window->rcClient.top);
93 REGION_UnlockRgn(UpdateRgn);
94
95 return RegionType;
96}
97
98static
101 HDC hDC,
102 INT dx,
103 INT dy,
104 const RECTL *prcScroll,
105 const RECTL *prcClip,
106 HRGN hrgnUpdate,
107 PREGION RgnUpdate,
108 RECTL *prcUpdate)
109{
110 PDC pDC;
111 RECTL rcScroll, rcClip, rcSrc, rcDst;
112 INT Result;
113
114 if (GdiGetClipBox(hDC, &rcClip) == ERROR)
115 {
116 ERR("GdiGetClipBox failed for HDC %p\n", hDC);
117 return ERROR;
118 }
119
120 rcScroll = rcClip;
121 if (prcClip)
122 {
123 RECTL_bIntersectRect(&rcClip, &rcClip, prcClip);
124 }
125
126 if (prcScroll)
127 {
128 rcScroll = *prcScroll;
129 RECTL_bIntersectRect(&rcSrc, &rcClip, prcScroll);
130 }
131 else
132 {
133 rcSrc = rcClip;
134 }
135
136 rcDst = rcSrc;
137 RECTL_vOffsetRect(&rcDst, dx, dy);
138 RECTL_bIntersectRect(&rcDst, &rcDst, &rcClip);
139
140 if (!NtGdiBitBlt( hDC,
141 rcDst.left,
142 rcDst.top,
143 rcDst.right - rcDst.left,
144 rcDst.bottom - rcDst.top,
145 hDC,
146 rcDst.left - dx,
147 rcDst.top - dy,
148 SRCCOPY,
149 0,
150 0))
151 {
152 return ERROR;
153 }
154
155 /* Calculate the region that was invalidated by moving or
156 could not be copied, because it was not visible */
157 if (RgnUpdate || hrgnUpdate || prcUpdate)
158 {
159 PREGION RgnOwn, RgnTmp;
160
161 pDC = DC_LockDc(hDC);
162 if (!pDC)
163 {
164 return ERROR;
165 }
166
167 if (hrgnUpdate)
168 {
169 NT_ASSERT(RgnUpdate == NULL);
170 RgnUpdate = REGION_LockRgn(hrgnUpdate);
171 if (!RgnUpdate)
172 {
173 DC_UnlockDc(pDC);
174 return ERROR;
175 }
176 }
177
178 /* Begin with the shifted and then clipped scroll rect */
179 rcDst = rcScroll;
180 RECTL_vOffsetRect(&rcDst, dx, dy);
181 RECTL_bIntersectRect(&rcDst, &rcDst, &rcClip);
182 if (RgnUpdate)
183 {
184 RgnOwn = RgnUpdate;
185 REGION_SetRectRgn(RgnOwn, rcDst.left, rcDst.top, rcDst.right, rcDst.bottom);
186 }
187 else
188 {
189 RgnOwn = IntSysCreateRectpRgnIndirect(&rcDst);
190 }
191
192 /* Add the source rect */
193 RgnTmp = IntSysCreateRectpRgnIndirect(&rcSrc);
194 IntGdiCombineRgn(RgnOwn, RgnOwn, RgnTmp, RGN_OR);
195
196 /* Substract the part of the dest that was visible in source */
197 IntGdiCombineRgn(RgnTmp, RgnTmp, pDC->prgnVis, RGN_AND);
198 REGION_bOffsetRgn(RgnTmp, dx, dy);
199 Result = IntGdiCombineRgn(RgnOwn, RgnOwn, RgnTmp, RGN_DIFF);
200
201 /* DO NOT Unlock DC while messing with prgnVis! */
202 DC_UnlockDc(pDC);
203
204 REGION_Delete(RgnTmp);
205
206 if (prcUpdate)
207 {
208 REGION_GetRgnBox(RgnOwn, prcUpdate);
209 }
210
211 if (hrgnUpdate)
212 {
213 REGION_UnlockRgn(RgnUpdate);
214 }
215 else if (!RgnUpdate)
216 {
217 REGION_Delete(RgnOwn);
218 }
219 }
220 else
222
223 return Result;
224}
225
226DWORD
229 PWND Window,
230 INT dx,
231 INT dy,
232 const RECT *prcScroll,
233 const RECT *prcClip,
234 HRGN hrgnUpdate,
235 LPRECT prcUpdate,
236 UINT flags)
237{
238 INT Result;
239 RECTL rcScroll, rcClip, rcCaret;
240 PWND CaretWnd;
241 HDC hDC;
242 PREGION RgnUpdate = NULL, RgnTemp, RgnWinupd = NULL;
243 HWND hwndCaret;
244 DWORD dcxflags = 0;
245 int rdw_flags;
246 USER_REFERENCE_ENTRY CaretRef;
247
249 {
250 return ERROR;
251 }
252
253 IntGetClientRect(Window, &rcClip);
254
255 if (prcScroll)
256 RECTL_bIntersectRect(&rcScroll, &rcClip, prcScroll);
257 else
258 rcScroll = rcClip;
259
260 if (prcClip)
261 RECTL_bIntersectRect(&rcClip, &rcClip, prcClip);
262
263 if (rcClip.right <= rcClip.left || rcClip.bottom <= rcClip.top ||
264 (dx == 0 && dy == 0))
265 {
266 return NULLREGION;
267 }
268
269 /* We must use a copy of the region, as we can't hold an exclusive lock
270 * on it while doing callouts to user-mode */
271 RgnUpdate = IntSysCreateRectpRgn(0, 0, 0, 0);
272 if(!RgnUpdate)
273 {
275 return ERROR;
276 }
277
278 if (hrgnUpdate)
279 {
280 RgnTemp = REGION_LockRgn(hrgnUpdate);
281 if (!RgnTemp)
282 {
284 Result = ERROR;
285 goto Cleanup;
286 }
287 IntGdiCombineRgn(RgnUpdate, RgnTemp, NULL, RGN_COPY);
288 REGION_UnlockRgn(RgnTemp);
289 }
290
291 /* ScrollWindow uses the window DC, ScrollWindowEx doesn't */
293 {
294 dcxflags = DCX_USESTYLE;
295
296 if (!(Window->pcls->style & (CS_OWNDC|CS_CLASSDC)))
297 dcxflags |= DCX_CACHE; // AH??? wine~ If not Powned or with Class go Cheap!
298
300 dcxflags |= DCX_CACHE|DCX_NOCLIPCHILDREN;
301 }
302 else
303 {
304 /* So in this case ScrollWindowEx uses Cache DC. */
305 dcxflags = DCX_CACHE|DCX_USESTYLE;
306 if (flags & SW_SCROLLCHILDREN) dcxflags |= DCX_NOCLIPCHILDREN;
307 }
308
309 hDC = UserGetDCEx(Window, 0, dcxflags);
310 if (!hDC)
311 {
312 /* FIXME: SetLastError? */
313 Result = ERROR;
314 goto Cleanup;
315 }
316
318
319 rcCaret = rcScroll;
320 hwndCaret = co_IntFixCaret(Window, &rcCaret, flags);
321
323 dx,
324 dy,
325 &rcScroll,
326 &rcClip,
327 NULL,
328 RgnUpdate,
329 prcUpdate);
330
332
333 /*
334 * Take into account the fact that some damage may have occurred during
335 * the scroll. Keep a copy in hrgnWinupd to be added to hrngUpdate at the end.
336 */
337
338 RgnTemp = IntSysCreateRectpRgn(0, 0, 0, 0);
339 if (!RgnTemp)
340 {
342 Result = ERROR;
343 goto Cleanup;
344 }
345
346 if (co_IntGetUpdateRgn(Window, RgnTemp, FALSE) != NULLREGION)
347 {
348 PREGION RgnClip = IntSysCreateRectpRgnIndirect(&rcClip);
349 if (RgnClip)
350 {
351 if (hrgnUpdate)
352 {
353 RgnWinupd = IntSysCreateRectpRgn(0, 0, 0, 0);
354 // FIXME: What to do if RgnWinupd == NULL??
355 IntGdiCombineRgn( RgnWinupd, RgnTemp, 0, RGN_COPY);
356 }
357
358 REGION_bOffsetRgn(RgnTemp, dx, dy);
359
360 IntGdiCombineRgn(RgnTemp, RgnTemp, RgnClip, RGN_AND);
361
362 if (hrgnUpdate)
363 IntGdiCombineRgn( RgnWinupd, RgnWinupd, RgnTemp, RGN_OR );
364
365 co_UserRedrawWindow(Window, NULL, RgnTemp, rdw_flags );
366
367 REGION_Delete(RgnClip);
368 }
369 }
370 REGION_Delete(RgnTemp);
371
373 {
374 PWND Child;
375 RECTL rcChild;
376 POINT ClientOrigin;
378 RECTL rcDummy;
380
381 IntGetClientOrigin(Window, &ClientOrigin);
382
383 for (Child = Window->spwndChild; Child; Child = Child->spwndNext)
384 {
385 rcChild = Child->rcWindow;
386 RECTL_vOffsetRect(&rcChild, -ClientOrigin.x, -ClientOrigin.y);
387
388 /* Adjust window positions */
389 RECTL_vOffsetRect(&Child->rcWindow, dx, dy);
390 RECTL_vOffsetRect(&Child->rcClient, dx, dy);
391
392 if (!prcScroll || RECTL_bIntersectRect(&rcDummy, &rcChild, &rcScroll))
393 {
394 UserRefObjectCo(Child, &WndRef);
395
396 if (UserIsDesktopWindow(Window->spwndParent))
397 lParam = MAKELONG(Child->rcClient.left, Child->rcClient.top);
398 else
399 lParam = MAKELONG(rcChild.left + dx, rcChild.top + dy);
400
401 /* wine sends WM_POSCHANGING, WM_POSCHANGED messages */
402 /* windows sometimes a WM_MOVE */
404
406 }
407 }
408 }
409
410 if (flags & (SW_INVALIDATE | SW_ERASE))
411 {
413 NULL,
414 RgnUpdate,
415 rdw_flags | /* HACK */
417 }
418
419 if (hwndCaret && (CaretWnd = UserGetWindowObject(hwndCaret)))
420 {
421 UserRefObjectCo(CaretWnd, &CaretRef);
422
423 co_IntSetCaretPos(rcCaret.left + dx, rcCaret.top + dy);
424 co_UserShowCaret(CaretWnd);
425
426 UserDerefObjectCo(CaretWnd);
427 }
428
429 if (hrgnUpdate && (Result != ERROR))
430 {
431 /* Give everything back to the caller */
432 RgnTemp = REGION_LockRgn(hrgnUpdate);
433 /* The handle should still be valid */
434 ASSERT(RgnTemp);
435 if (RgnWinupd)
436 IntGdiCombineRgn(RgnTemp, RgnUpdate, RgnWinupd, RGN_OR);
437 else
438 IntGdiCombineRgn(RgnTemp, RgnUpdate, NULL, RGN_COPY);
439 REGION_UnlockRgn(RgnTemp);
440 }
441
442Cleanup:
443 if (RgnWinupd)
444 {
445 REGION_Delete(RgnWinupd);
446 }
447
448 if (RgnUpdate)
449 {
450 REGION_Delete(RgnUpdate);
451 }
452
453 return Result;
454}
455
456
459 int dx,
460 int dy,
461 CONST RECT *lpRect,
462 CONST RECT *prcClip)
463{
464 return IntScrollWindowEx( pWnd, dx, dy, lpRect, prcClip, 0, NULL,
466}
467
468/*
469 * NtUserScrollDC
470 *
471 * Status
472 * @implemented
473 */
476 HDC hDC,
477 INT dx,
478 INT dy,
479 const RECT *prcUnsafeScroll,
480 const RECT *prcUnsafeClip,
481 HRGN hrgnUpdate,
482 LPRECT prcUnsafeUpdate)
483{
484 BOOL Ret = FALSE;
487 RECTL rcScroll, rcClip, rcUpdate;
488
489 TRACE("Enter NtUserScrollDC\n");
491
493 {
494 if (prcUnsafeScroll)
495 {
496 ProbeForRead(prcUnsafeScroll, sizeof(*prcUnsafeScroll), 1);
497 rcScroll = *prcUnsafeScroll;
498 }
499 if (prcUnsafeClip)
500 {
501 ProbeForRead(prcUnsafeClip, sizeof(*prcUnsafeClip), 1);
502 rcClip = *prcUnsafeClip;
503 }
504 if (prcUnsafeUpdate)
505 {
506 ProbeForWrite(prcUnsafeUpdate, sizeof(*prcUnsafeUpdate), 1);
507 }
508 }
510 {
512 }
513 _SEH2_END;
514
515 if (!NT_SUCCESS(Status))
516 {
518 goto Exit; // Return FALSE
519 }
520
522 dx,
523 dy,
524 prcUnsafeScroll ? &rcScroll : NULL,
525 prcUnsafeClip ? &rcClip : NULL,
526 hrgnUpdate,
527 NULL,
528 prcUnsafeUpdate ? &rcUpdate : NULL);
529 if(Result == ERROR)
530 {
531 /* FIXME: Only if hRgnUpdate is invalid we should SetLastError(ERROR_INVALID_HANDLE) */
532 goto Exit; // Return FALSE
533 }
534
535 if (prcUnsafeUpdate)
536 {
538 {
539 *prcUnsafeUpdate = rcUpdate;
540 }
542 {
544 }
545 _SEH2_END;
546
547 if (!NT_SUCCESS(Status))
548 {
549 /* FIXME: SetLastError? */
550 /* FIXME: correct? We have already scrolled! */
551 goto Exit; // Return FALSE
552 }
553 }
554
555 Ret = TRUE;
556
557Exit:
558 TRACE("Leave NtUserScrollDC, ret=%i\n", Ret);
559 UserLeave();
560 return Ret;
561}
562
563/*
564 * NtUserScrollWindowEx
565 *
566 * Status
567 * @implemented
568 */
569
572 HWND hWnd,
573 INT dx,
574 INT dy,
575 const RECT *prcUnsafeScroll,
576 const RECT *prcUnsafeClip,
577 HRGN hrgnUpdate,
578 LPRECT prcUnsafeUpdate,
579 UINT flags)
580{
583 PWND Window = NULL;
584 RECTL rcScroll, rcClip, rcUpdate;
586
587 TRACE("Enter NtUserScrollWindowEx\n");
589
592 {
593 Window = NULL; /* prevent deref at cleanup */
594 goto Cleanup; // Return ERROR
595 }
596 UserRefObjectCo(Window, &Ref);
597
599 {
600 if (prcUnsafeScroll)
601 {
602 ProbeForRead(prcUnsafeScroll, sizeof(*prcUnsafeScroll), 1);
603 rcScroll = *prcUnsafeScroll;
604 }
605
606 if (prcUnsafeClip)
607 {
608 ProbeForRead(prcUnsafeClip, sizeof(*prcUnsafeClip), 1);
609 rcClip = *prcUnsafeClip;
610 }
611 }
613 {
615 }
616 _SEH2_END;
617
618 if (!NT_SUCCESS(Status))
619 {
621 goto Cleanup; // Return ERROR
622 }
623
625 dx, dy,
626 prcUnsafeScroll ? &rcScroll : NULL,
627 prcUnsafeClip ? &rcClip : NULL,
628 hrgnUpdate,
629 prcUnsafeUpdate ? &rcUpdate : NULL,
630 flags);
631
632 if (prcUnsafeUpdate)
633 {
635 {
636 /* Probe here, to not fail on invalid pointer before scrolling */
637 ProbeForWrite(prcUnsafeUpdate, sizeof(*prcUnsafeUpdate), 1);
638 *prcUnsafeUpdate = rcUpdate;
639 }
641 {
643 }
644 _SEH2_END;
645
646 if (!NT_SUCCESS(Status))
647 {
649 Result = ERROR;
650 }
651 }
652
653Cleanup:
654 if (Window)
656
657 TRACE("Leave NtUserScrollWindowEx, ret=%lu\n", Result);
658 UserLeave();
659 return Result;
660}
661
662/* EOF */
static HDC hDC
Definition: 3dtext.c:33
#define DCX_USESTYLE
Definition: GetDCEx.c:10
HWND hWnd
Definition: settings.c:17
LONG NTSTATUS
Definition: precomp.h:26
#define ERR(fmt,...)
Definition: debug.h:110
#define DBG_DEFAULT_CHANNEL(ch)
Definition: debug.h:103
LPARAM lParam
Definition: combotst.c:139
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:238
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:220
#define DCX_NOCLIPCHILDREN
Definition: dce.h:40
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define APIENTRY
Definition: api.h:79
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
#define ValidateHwndNoErr(hwnd)
Definition: precomp.h:84
static const WCHAR Cleanup[]
Definition: register.c:80
#define pt(x, y)
Definition: drawing.c:79
#define ERROR(name)
Definition: error_private.h:53
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:102
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:143
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
RegionType
Status
Definition: gdiplustypes.h:25
GLbitfield flags
Definition: glext.h:7161
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define UserHMGetHandle(obj)
Definition: ntuser.h:230
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97
#define ASSERT(a)
Definition: mode.c:44
static HDC
Definition: imagelist.c:92
unsigned int UINT
Definition: ndis.h:50
#define FASTCALL
Definition: nt_native.h:50
__kernel_entry W32KAPI BOOL APIENTRY NtGdiBitBlt(_In_ HDC hdcDst, _In_ INT x, _In_ INT y, _In_ INT cx, _In_ INT cy, _In_opt_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ DWORD rop4, _In_ DWORD crBackColor, _In_ FLONG fl)
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
BOOL FASTCALL IntGetClientOrigin(PWND Window OPTIONAL, LPPOINT Point)
Definition: winpos.c:71
VOID FASTCALL UserLeave(VOID)
Definition: ntuser.c:251
VOID FASTCALL UserEnterExclusive(VOID)
Definition: ntuser.c:242
static __inline VOID UserDerefObjectCo(PVOID obj)
Definition: object.h:40
static __inline VOID UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
Definition: object.h:27
#define CONST
Definition: pedump.c:81
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:159
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:34
#define IntSysCreateRectpRgnIndirect(prc)
Definition: region.h:93
static HWND FASTCALL co_IntFixCaret(PWND Window, RECTL *lprc, UINT flags)
Definition: scrollex.c:15
BOOL APIENTRY NtUserScrollDC(HDC hDC, INT dx, INT dy, const RECT *prcUnsafeScroll, const RECT *prcUnsafeClip, HRGN hrgnUpdate, LPRECT prcUnsafeUpdate)
Definition: scrollex.c:475
DWORD FASTCALL IntScrollWindowEx(PWND Window, INT dx, INT dy, const RECT *prcScroll, const RECT *prcClip, HRGN hrgnUpdate, LPRECT prcUpdate, UINT flags)
Definition: scrollex.c:228
BOOL FASTCALL IntScrollWindow(PWND pWnd, int dx, int dy, CONST RECT *lpRect, CONST RECT *prcClip)
Definition: scrollex.c:458
static INT FASTCALL UserScrollDC(HDC hDC, INT dx, INT dy, const RECTL *prcScroll, const RECTL *prcClip, HRGN hrgnUpdate, PREGION RgnUpdate, RECTL *prcUpdate)
Definition: scrollex.c:100
INT FASTCALL co_IntGetUpdateRgn(PWND Window, PREGION Rgn, BOOL bErase)
Definition: scrollex.c:63
DWORD APIENTRY NtUserScrollWindowEx(HWND hWnd, INT dx, INT dy, const RECT *prcUnsafeScroll, const RECT *prcUnsafeClip, HRGN hrgnUpdate, LPRECT prcUnsafeUpdate, UINT flags)
Definition: scrollex.c:571
#define STATUS_SUCCESS
Definition: shellext.h:65
static void Exit(void)
Definition: sock.c:1330
#define TRACE(s)
Definition: solgame.cpp:4
Definition: polytest.cpp:41
long bottom
Definition: polytest.cpp:53
long right
Definition: polytest.cpp:53
long top
Definition: polytest.cpp:53
long left
Definition: polytest.cpp:53
Definition: window.c:28
Definition: region.h:8
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
struct _USER_MESSAGE_QUEUE * MessageQueue
Definition: win32.h:89
THRDCARETINFO CaretInfo
Definition: msgqueue.h:92
Definition: object.h:4
Definition: ntuser.h:694
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
int32_t INT
Definition: typedefs.h:58
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define SW_SCROLLWNDDCE
Definition: undocuser.h:92
BOOL FASTCALL IntIsWindowDrawable(PWND Wnd)
Definition: painting.c:861
VOID FASTCALL co_IntPaintWindows(PWND Wnd, ULONG Flags, BOOL Recurse)
Definition: painting.c:403
BOOL FASTCALL IntIntersectWithParents(PWND Child, RECTL *WindowRect)
Definition: painting.c:35
BOOL FASTCALL co_UserRedrawWindow(PWND Window, const RECTL *UpdateRect, PREGION UpdateRgn, ULONG Flags)
Definition: painting.c:888
PWND FASTCALL UserGetWindowObject(HWND hWnd)
Definition: window.c:122
#define ASSERT_REFS_CO(_obj_)
Definition: userfuncs.h:14
INT FASTCALL UserReleaseDC(PWND Window, HDC hDc, BOOL EndPaint)
Definition: windc.c:918
HDC FASTCALL UserGetDCEx(PWND Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFDEVICE Child
Definition: wdffdo.h:536
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
Definition: error.c:31
BOOL FASTCALL RECTL_bIntersectRect(_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
Definition: rect.c:55
FORCEINLINE VOID RECTL_vOffsetRect(_Inout_ RECTL *prcl, _In_ INT cx, _In_ INT cy)
Definition: rect.h:31
VOID FASTCALL REGION_Delete(PREGION pRgn)
Definition: region.c:2449
PREGION FASTCALL REGION_LockRgn(_In_ HRGN hrgn)
Definition: region.c:2358
VOID FASTCALL REGION_SetRectRgn(PREGION rgn, INT LeftRect, INT TopRect, INT RightRect, INT BottomRect)
Definition: region.c:2665
VOID FASTCALL REGION_UnlockRgn(_In_ PREGION prgn)
Definition: region.c:2373
INT FASTCALL REGION_GetRgnBox(PREGION Rgn, PRECTL pRect)
Definition: region.c:2543
PREGION FASTCALL IntSysCreateRectpRgn(INT LeftRect, INT TopRect, INT RightRect, INT BottomRect)
Definition: region.c:2407
BOOL FASTCALL REGION_bOffsetRgn(_Inout_ PREGION prgn, _In_ INT cx, _In_ INT cy)
Definition: region.c:2707
INT FASTCALL IntGdiCombineRgn(PREGION prgnDest, PREGION prgnSrc1, PREGION prgnSrc2, INT iCombineMode)
Definition: region.c:2487
BOOL FASTCALL co_UserHideCaret(PWND Window OPTIONAL)
Definition: caret.c:226
BOOL FASTCALL co_IntSetCaretPos(int X, int Y)
Definition: caret.c:193
BOOL FASTCALL co_UserShowCaret(PWND Window OPTIONAL)
Definition: caret.c:262
#define UserIsDesktopWindow(pWnd)
Definition: desktop.h:194
LRESULT FASTCALL co_IntSendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:1445
BOOL FASTCALL IntIsChildWindow(PWND Parent, PWND BaseWindow)
Definition: window.c:927
VOID FASTCALL IntGetClientRect(PWND WindowObject, RECTL *Rect)
Definition: winpos.c:92
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:22
LONG_PTR LPARAM
Definition: windef.h:208
#define RGN_DIFF
Definition: wingdi.h:358
#define NULLREGION
Definition: wingdi.h:361
#define RGN_COPY
Definition: wingdi.h:357
#define RGN_AND
Definition: wingdi.h:356
#define SRCCOPY
Definition: wingdi.h:333
#define RGN_OR
Definition: wingdi.h:359
#define DCX_CACHE
Definition: winuser.h:2114
#define SW_SCROLLCHILDREN
Definition: winuser.h:2578
#define SW_INVALIDATE
Definition: winuser.h:2579
#define RDW_ERASE
Definition: winuser.h:1211
#define RDW_NOCHILDREN
Definition: winuser.h:1222
#define RDW_ALLCHILDREN
Definition: winuser.h:1221
#define WM_MOVE
Definition: winuser.h:1610
_In_ int _Inout_ LPRECT lprc
Definition: winuser.h:4466
#define SW_ERASE
Definition: winuser.h:2580
#define CS_OWNDC
Definition: winuser.h:655
#define CS_CLASSDC
Definition: winuser.h:650
#define RDW_INVALIDATE
Definition: winuser.h:1214
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
#define NT_ASSERT
Definition: rtlfuncs.h:3310