13#define SCROLL_NOWHERE 0x00
14#define SCROLL_TOP_ARROW 0x01
15#define SCROLL_TOP_RECT 0x02
16#define SCROLL_THUMB 0x03
17#define SCROLL_BOTTOM_RECT 0x04
18#define SCROLL_BOTTOM_ARROW 0x05
20#define SCROLL_FIRST_DELAY 200
21#define SCROLL_REPEAT_DELAY 50
26#define SCROLL_MIN_RECT 4
29#define SCROLL_MIN_THUMB 6
32#define SCROLL_ARROW_THUMB_OVERLAP 0
34#define MINTRACKTHUMB 8
37#define SA_SSI_HIDE 0x0001
38#define SA_SSI_SHOW 0x0002
39#define SA_SSI_REFRESH 0x0004
40#define SA_SSI_REPAINT_ARROWS 0x0008
42#define SBRG_SCROLLBAR 0
43#define SBRG_TOPRIGHTBTN 1
44#define SBRG_PAGEUPRIGHT 2
45#define SBRG_SCROLLBOX 3
46#define SBRG_PAGEDOWNLEFT 4
47#define SBRG_BOTTOMLEFTBTN 5
49#define CHANGERGSTATE(item, status) \
50 if(Info->rgstate[(item)] != (status)) \
52 Info->rgstate[(item)] = (status);
86 return &pSBInfo->
Horz;
88 return &pSBInfo->
Vert;
92 ERR(
"IntGetSBData Wrong Extra bytes for CTL Scrollbar\n");
98 ERR(
"IntGetSBData Bad Bar\n");
168 INT Thumb, ThumbBox, ThumbPos, cxy, mx;
186 cxy = ClientRect.
bottom - ClientRect.
top;
191 cxy = ClientRect.
right - ClientRect.
left;
200 if(cxy <= (2 * Thumb))
230 ThumbPos = Thumb + ThumbBox;
271 lpsi->
fMask &= ~SIF_THEMED;
275 ERR(
"Trying to get scrollinfo for unknown scrollbar type %d\n", nBar);
281 ERR(
"IntGetScrollInfo No window scrollbar info\n");
320 lpsi->
fMask &= ~SIF_THEMED;
324 ERR(
"Trying to get scrollinfo for unknown scrollbar type %d\n", nBar);
346 if (pSBTrack && pSBTrack->
nBar == nBar && pSBTrack->
spwndTrack == pWnd)
370 LPSCROLLBAR_INFO infoPtr;
382 default:
return FALSE;
389 SCROLL_GetScrollBarRect(
hwnd, nBar, &
info->rcScrollBar, &nDummy,
390 &
info->dxyLineButton, &
info->xyThumbTop);
395 info->xyThumbBottom =
info->xyThumbTop +
info->dxyLineButton;
397 infoPtr = SCROLL_GetInternalInfo(
hwnd, nBar,
TRUE);
402 info->rgstate[0] = 0;
406 if (infoPtr->minVal >= infoPtr->maxVal -
max(infoPtr->page - 1, 0))
419 info->rgstate[1] = 0;
426 info->rgstate[2] = 0;
427 if (infoPtr->curVal == infoPtr->minVal)
433 info->rgstate[3] = 0;
438 info->rgstate[4] = 0;
439 if (infoPtr->curVal >= infoPtr->maxVal - 1)
445 info->rgstate[5] = 0;
476 ERR(
"Trying to set scrollinfo for unknown scrollbar type %d\n", nBar);
509 bChangeParams =
TRUE;
533 bChangeParams =
TRUE;
541 bChangeParams =
TRUE;
547 if (
Info->nPage > MaxPage)
548 pSBData->
page =
Info->nPage = MaxPage;
555 else if (
Info->nPos > MaxPos)
556 pSBData->
pos =
Info->nPos = MaxPos;
565 new_flags =
Window->pSBInfo->WSBflags;
572 bChangeParams =
TRUE;
574 else if ((nBar !=
SB_CTL) && bChangeParams)
581 if ((nBar !=
SB_CTL) && bChangeParams)
592 if (
Window->pSBInfo->WSBflags != new_flags)
594 Window->pSBInfo->WSBflags = new_flags;
625 if (bRedraw && bVisible)
652 if (bChangeParams || (OldPos != pSBData->
pos))
678 ERR(
"Trying to get scrollinfo for unknown scrollbar type %d\n",
Bar);
684 ERR(
"Failed to create scrollbars for window\n");
727 ERR(
"Trying to get scrollinfo for unknown scrollbar type %d\n",
Bar);
733 ERR(
"Failed to create scrollbars for window\n");
777 Window->pSBInfo->Vert.posMax = 100;
778 Window->pSBInfo->Horz.posMax = 100;
854 ULONG old_style, set_bits = 0, clear_bits = 0;
881 old_style =
IntSetStyle(Wnd, set_bits, clear_bits);
882 if ((old_style & clear_bits) != 0 || (old_style & set_bits) != set_bits)
902 HBRUSH hSaveBrush, hBrush;
908 BottomSelected =
TRUE;
963 Rect.top += ThumbTop;
983 Rect.left += ThumbTop;
1011 RECT RectLT, RectRB;
1012 INT ScrollDirFlagLT, ScrollDirFlagRB;
1106 if (
Info.dxyLineButton)
1128 if (!pWnd)
return 0;
1150 TRACE(
"Enter NtUserGetScrollBarInfo\n");
1175 TRACE(
"Leave NtUserGetScrollBarInfo, ret=%i\n", Ret);
1194 TRACE(
"Enter NtUserGetScrollInfo\n");
1205 ERR(
"NtUserGetScrollInfo Failed size\n");
1213 ERR(
"NtUserGetScrollInfo Bad window\n");
1227 ERR(
"NtUserGetScrollInfo Failed copy to user\n");
1235 TRACE(
"Leave NtUserGetScrollInfo, ret=%i\n", Ret);
1254 TRACE(
"Enter NtUserEnableScrollBar\n");
1265 OrigArrows =
Window->pSBInfo->WSBflags;
1266 Window->pSBInfo->WSBflags = wArrows;
1280 ERR(
"Trying to set scrollinfo for unknown scrollbar type %u\n", wSBflags);
1305 ERR(
"FIXME: EnableScrollBar wSBflags %u wArrows %u Chg %d\n", wSBflags, wArrows, Chg);
1312 if (OrigArrows == wArrows)
1324 TRACE(
"Leave NtUserEnableScrollBar, ret=%i\n", Ret);
1343 TRACE(
"Enter NtUserSetScrollInfo\n");
1364 TRACE(
"Leave NtUserSetScrollInfo, ret=%lu\n", Ret);
1376 TRACE(
"Enter NtUserShowScrollBar\n");
1384 (nBar ==
SB_HORZ) ? 0 : bShow);
1388 TRACE(
"Leave NtUserShowScrollBar, ret=%lu\n",
ret);
1411 TRACE(
"Enter NtUserSetScrollBarInfo\n");
1423 ERR(
"Trying to set scrollinfo for unknown scrollbar type %d\n",
Obj);
1450 TRACE(
"Leave NtUserSetScrollBarInfo, ret=%i\n", Ret);
#define DBG_DEFAULT_CHANNEL(ch)
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_PARAMETER
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static const WCHAR Cleanup[]
#define ExAllocatePoolWithTag(hernya, size, tag)
GLint GLint GLsizei width
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define UserHMGetHandle(obj)
struct _SBINFOEX SBINFOEX
#define EXCEPTION_EXECUTE_HANDLER
HGDIOBJ FASTCALL IntGetSysColorBrush(INT Object)
#define MmCopyToCaller(x, y, z)
#define ExFreePoolWithTag(_P, _T)
__kernel_entry W32KAPI HBRUSH APIENTRY NtGdiSelectBrush(_In_ HDC hdc, _In_ HBRUSH hbrush)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiPatBlt(_In_ HDC hdcDest, _In_ INT x, _In_ INT y, _In_ INT cx, _In_ INT cy, _In_ DWORD dwRop)
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
HBRUSH FASTCALL DefWndControlColor(HDC hDC, UINT ctlType)
BOOLEAN FASTCALL co_WinPosSetWindowPos(PWND Window, HWND WndInsertAfter, INT x, INT y, INT cx, INT cy, UINT flags)
LRESULT FASTCALL co_WinPosGetNonClientSize(PWND Window, RECT *WindowRect, RECT *ClientRect)
BOOLEAN FASTCALL co_WinPosShowWindow(PWND Wnd, INT Cmd)
VOID FASTCALL UserLeave(VOID)
VOID FASTCALL UserEnterShared(VOID)
VOID FASTCALL UserEnterExclusive(VOID)
static __inline VOID UserDerefObjectCo(PVOID obj)
static __inline VOID UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_YIELD(__stmt)
struct _USER_MESSAGE_QUEUE * MessageQueue
static int UpdateRect(TreeListData *pData, unsigned uItem, unsigned uSub)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
BOOL FASTCALL co_UserRedrawWindow(PWND Window, const RECTL *UpdateRect, PREGION UpdateRgn, ULONG Flags)
PWND FASTCALL UserGetWindowObject(HWND hWnd)
#define ASSERT_REFS_CO(_obj_)
INT FASTCALL UserReleaseDC(PWND Window, HDC hDc, BOOL EndPaint)
HDC FASTCALL UserGetDCEx(PWND Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
FORCEINLINE BOOL RECTL_bIsEmptyRect(_In_ const RECTL *prcl)
FORCEINLINE VOID RECTL_vOffsetRect(_Inout_ RECTL *prcl, _In_ INT cx, _In_ INT cy)
BOOL FASTCALL co_IntSetCaretPos(int X, int Y)
static __inline PVOID DesktopHeapAlloc(IN PDESKTOP Desktop, IN SIZE_T Bytes)
#define UserIsMessageWindow(pWnd)
static __inline BOOL DesktopHeapFree(IN PDESKTOP Desktop, IN PVOID lpMem)
#define UserIsDesktopWindow(pWnd)
LONG NTAPI UserGetSystemMetrics(ULONG Index)
HBRUSH FASTCALL GetControlBrush(PWND pwnd, HDC hdc, UINT ctlType)
ULONG FASTCALL IntSetStyle(PWND pwnd, ULONG set_bits, ULONG clear_bits)
BOOL FASTCALL IntEnableWindow(HWND hWnd, BOOL bEnable)
VOID FASTCALL IntGetClientRect(PWND WindowObject, RECTL *Rect)
ENGAPI INT APIENTRY EngMulDiv(_In_ INT a, _In_ INT b, _In_ INT c)
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
#define STATE_SYSTEM_PRESSED
#define CTLCOLOR_SCROLLBAR
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI DrawFrameControl(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
HWND WINAPI GetCapture(void)
#define WM_CTLCOLORSCROLLBAR
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
#define CCHILDREN_SCROLLBAR
#define SIF_DISABLENOSCROLL
#define STATE_SYSTEM_INVISIBLE
#define STATE_SYSTEM_OFFSCREEN
BOOL WINAPI IsWindowEnabled(_In_ HWND)
#define STATE_SYSTEM_UNAVAILABLE
struct tagSCROLLBARINFO SCROLLBARINFO
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define WS_EX_LEFTSCROLLBAR