14 #define SCROLL_NOWHERE 0x00 15 #define SCROLL_TOP_ARROW 0x01 16 #define SCROLL_TOP_RECT 0x02 17 #define SCROLL_THUMB 0x03 18 #define SCROLL_BOTTOM_RECT 0x04 19 #define SCROLL_BOTTOM_ARROW 0x05 21 #define SCROLL_FIRST_DELAY 200 23 #define SCROLL_REPEAT_DELAY 50 25 #define SCROLL_TIMER 0 28 #define SCROLL_MIN_RECT 4 31 #define SCROLL_MIN_THUMB 6 34 #define SCROLL_ARROW_THUMB_OVERLAP 0 39 #define MINTRACKTHUMB 8 42 #define SA_SSI_HIDE 0x0001 43 #define SA_SSI_SHOW 0x0002 44 #define SA_SSI_REFRESH 0x0004 45 #define SA_SSI_REPAINT_ARROWS 0x0008 47 #define SBRG_SCROLLBAR 0 48 #define SBRG_TOPRIGHTBTN 1 49 #define SBRG_PAGEUPRIGHT 2 50 #define SBRG_SCROLLBOX 3 51 #define SBRG_PAGEDOWNLEFT 4 52 #define SBRG_BOTTOMLEFTBTN 5 54 #define CHANGERGSTATE(item, status) \ 55 if(Info->rgstate[(item)] != (status)) \ 57 Info->rgstate[(item)] = (status); 92 return &pSBInfo->
Horz;
94 return &pSBInfo->
Vert;
98 ERR(
"IntGetSBData Wrong Extra bytes for CTL Scrollbar!\n");
104 ERR(
"IntGetSBData Bad Bar!\n");
174 INT Thumb, ThumbBox, ThumbPos, cxy, mx;
192 cxy = ClientRect.
bottom - ClientRect.
top;
197 cxy = ClientRect.
right - ClientRect.
left;
206 if(cxy <= (2 * Thumb))
238 ThumbPos = Thumb + ThumbBox;
283 ERR(
"Trying to get scrollinfo for unknown scrollbar type %d\n", nBar);
289 ERR(
"IntGetScrollInfo No window scrollbar info!\n");
342 ERR(
"Trying to get scrollinfo for unknown scrollbar type %d\n", nBar);
369 pSBTrack->
nBar == nBar &&
394 LPSCROLLBAR_INFO infoPtr;
406 default:
return FALSE;
413 SCROLL_GetScrollBarRect(
hwnd, nBar, &
info->rcScrollBar, &nDummy,
414 &
info->dxyLineButton, &
info->xyThumbTop);
419 info->xyThumbBottom =
info->xyThumbTop +
info->dxyLineButton;
421 infoPtr = SCROLL_GetInternalInfo(
hwnd, nBar,
TRUE);
426 info->rgstate[0] = 0;
430 if (infoPtr->minVal >= infoPtr->maxVal -
max(infoPtr->page - 1, 0))
443 info->rgstate[1] = 0;
450 info->rgstate[2] = 0;
451 if (infoPtr->curVal == infoPtr->minVal)
457 info->rgstate[3] = 0;
462 info->rgstate[4] = 0;
463 if (infoPtr->curVal >= infoPtr->maxVal - 1)
469 info->rgstate[5] = 0;
491 DWORD OldPos = 0, CurrentPos = 0;
496 static PWND PrevHwnd[3] = { 0 };
497 static DWORD PrevPos[3] = { 0 };
498 static DWORD PrevMax[3] = { 0 };
499 static INT PrevAction[3] = { 0 };
507 ERR(
"Trying to set scrollinfo for unknown scrollbar type %d\n", nBar);
544 bChangeParams =
TRUE;
568 bChangeParams =
TRUE;
576 bChangeParams =
TRUE;
582 if (
Info->nPage > MaxPage)
584 pSBData->
page =
Info->nPage = MaxPage;
594 else if (
Info->nPos > MaxPos)
596 pSBData->
pos =
Info->nPos = MaxPos;
612 new_flags =
Window->pSBInfo->WSBflags;
619 bChangeParams =
TRUE;
621 else if ((nBar !=
SB_CTL) && bChangeParams)
629 if ((nBar !=
SB_CTL) && bChangeParams)
640 if (
Window->pSBInfo->WSBflags != new_flags)
642 Window->pSBInfo->WSBflags = new_flags;
648 if ((
Window != PrevHwnd[nBar]) || (
action != PrevAction[nBar]))
656 PrevAction[nBar] =
action;
684 if (bRedraw && bVisible)
688 TRACE(
"Not using themes.\n");
708 TRACE(
"Using themes.\n");
729 if ((
Window != PrevHwnd[nBar]) || (CurrentPos != PrevPos[nBar]) ||
730 (lpsi->
nMax != PrevMax[nBar]))
734 PrevPos[nBar] = CurrentPos;
735 PrevMax[nBar] = lpsi->
nMax;
772 ERR(
"Trying to get scrollinfo for unknown scrollbar type %d\n",
Bar);
778 ERR(
"Failed to create scrollbars for window.\n");
821 ERR(
"Trying to get scrollinfo for unknown scrollbar type %d\n",
Bar);
827 ERR(
"Failed to create scrollbars for window.\n");
861 ERR(
"Unable to allocate memory for scrollbar information for window %p\n",
Window->head.h);
869 ERR(
"Unable to allocate memory for scrollbar information for window %p\n",
Window->head.h);
874 Window->pSBInfo->Vert.posMax = 100;
875 Window->pSBInfo->Horz.posMax = 100;
953 ULONG old_style, set_bits = 0, clear_bits = 0;
981 old_style =
IntSetStyle( Wnd, set_bits, clear_bits );
982 if ((old_style & clear_bits) != 0 || (old_style & set_bits) != set_bits)
1002 HBRUSH hSaveBrush, hBrush;
1008 BottomSelected =
TRUE;
1065 Rect.top += ThumbTop;
1068 Rect.bottom =
Rect.top + ThumbSize;
1085 Rect.left += ThumbTop;
1089 Rect.right =
Rect.left + ThumbSize;
1114 RECT RectLT, RectRB;
1115 INT ScrollDirFlagLT, ScrollDirFlagRB;
1226 if (
Info.dxyLineButton)
1259 if (!pWnd)
return 0;
1288 TRACE(
"Enter NtUserGetScrollBarInfo\n");
1317 TRACE(
"Leave NtUserGetScrollBarInfo, ret=%i\n",_ret_);
1338 TRACE(
"Enter NtUserGetScrollInfo\n");
1351 ERR(
"NtUserGetScrollInfo Failed size.\n");
1359 ERR(
"NtUserGetScrollInfo Bad window.\n");
1373 ERR(
"NtUserGetScrollInfo Failed copy to user.\n");
1382 TRACE(
"Leave NtUserGetScrollInfo, ret=%i\n",_ret_);
1401 TRACE(
"Enter NtUserEnableScrollBar\n");
1416 OrigArrows =
Window->pSBInfo->WSBflags;
1417 Window->pSBInfo->WSBflags = wArrows;
1430 ERR(
"Trying to set scrollinfo for unknown scrollbar type %u\n", wSBflags);
1455 ERR(
"FIXME: EnableScrollBar wSBflags %u wArrows %u Chg %d\n", wSBflags, wArrows, Chg);
1467 TRACE(
"Leave NtUserEnableScrollBar, ret=%i\n",_ret_);
1486 TRACE(
"Enter NtUserSetScrollInfo\n");
1509 TRACE(
"Leave NtUserSetScrollInfo, ret=%lu\n", _ret_);
1523 TRACE(
"Enter NtUserShowScrollBar\n");
1533 (nBar ==
SB_HORZ) ? 0 : bShow);
1539 TRACE(
"Leave NtUserShowScrollBar, ret%lu\n", _ret_);
1564 TRACE(
"Enter NtUserSetScrollBarInfo\n");
1577 ERR(
"Trying to set scrollinfo for unknown scrollbar type %d\n",
Obj);
1606 TRACE(
"Leave NtUserSetScrollBarInfo, ret=%i\n",_ret_);
#define ERROR_INVALID_PARAMETER
VOID FASTCALL UserEnterShared(VOID)
GLint GLint GLsizei width
#define STATE_SYSTEM_UNAVAILABLE
#define STATE_SYSTEM_OFFSCREEN
__kernel_entry W32KAPI BOOL APIENTRY NtGdiPatBlt(_In_ HDC hdcDest, _In_ INT x, _In_ INT y, _In_ INT cx, _In_ INT cy, _In_ DWORD dwRop)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
HGDIOBJ FASTCALL IntGetSysColorBrush(INT Object)
#define UserIsDesktopWindow(pWnd)
#define ASSERT_REFS_CO(_obj_)
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
BOOLEAN FASTCALL co_WinPosSetWindowPos(PWND Window, HWND WndInsertAfter, INT x, INT y, INT cx, INT cy, UINT flags)
#define CCHILDREN_SCROLLBAR
static __inline VOID UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
#define CTLCOLOR_SCROLLBAR
IN PVOID IN PVOID IN USHORT IN USHORT Size
HDC FASTCALL UserGetDCEx(PWND Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
#define MmCopyToCaller(x, y, z)
BOOL WINAPI DrawFrameControl(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
VOID FASTCALL IntGetClientRect(PWND WindowObject, RECTL *Rect)
#define WS_EX_LEFTSCROLLBAR
__kernel_entry W32KAPI HBRUSH APIENTRY NtGdiSelectBrush(_In_ HDC hdc, _In_ HBRUSH hbrush)
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
static __inline PVOID DesktopHeapAlloc(IN PDESKTOP Desktop, IN SIZE_T Bytes)
static __inline VOID UserDerefObjectCo(PVOID obj)
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
HWND WINAPI GetCapture(void)
#define WM_CTLCOLORSCROLLBAR
#define STATE_SYSTEM_PRESSED
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
BOOL WINAPI IsWindowEnabled(_In_ HWND)
PWND FASTCALL UserGetWindowObject(HWND hWnd)
LONG NTAPI UserGetSystemMetrics(ULONG Index)
BOOLEAN FASTCALL co_WinPosShowWindow(PWND Wnd, INT Cmd)
VOID FASTCALL UserEnterExclusive(VOID)
#define NT_SUCCESS(StatCode)
#define EXCEPTION_EXECUTE_HANDLER
#define DECLARE_RETURN(type)
#define UserIsMessageWindow(pWnd)
#define ExAllocatePoolWithTag(hernya, size, tag)
BOOL FASTCALL co_IntSetCaretPos(int X, int Y)
VOID FASTCALL SetLastNtError(NTSTATUS Status)
BOOL FASTCALL IntEnableWindow(HWND hWnd, BOOL bEnable)
struct _USER_MESSAGE_QUEUE * MessageQueue
FORCEINLINE VOID RECTL_vOffsetRect(_Inout_ RECTL *prcl, _In_ INT cx, _In_ INT cy)
VOID FASTCALL UserLeave(VOID)
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
BOOL FASTCALL co_UserRedrawWindow(PWND Window, const RECTL *UpdateRect, PREGION UpdateRgn, ULONG Flags)
struct tagSCROLLBARINFO SCROLLBARINFO
INT FASTCALL UserReleaseDC(PWND Window, HDC hDc, BOOL EndPaint)
ENGAPI INT APIENTRY EngMulDiv(_In_ INT a, _In_ INT b, _In_ INT c)
#define SIF_DISABLENOSCROLL
ULONG FASTCALL IntSetStyle(PWND pwnd, ULONG set_bits, ULONG clear_bits)
FORCEINLINE BOOL RECTL_bIsEmptyRect(_In_ const RECTL *prcl)
#define RtlZeroMemory(Destination, Length)
#define RtlCopyMemory(Destination, Source, Length)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define _SEH2_EXCEPT(...)
static int UpdateRect(TreeListData *pData, unsigned uItem, unsigned uSub)
static __inline BOOL DesktopHeapFree(IN PDESKTOP Desktop, IN PVOID lpMem)
#define _SEH2_GetExceptionCode()
#define _SEH2_YIELD(__stmt)
#define ExFreePoolWithTag(_P, _T)
HBRUSH FASTCALL GetControlBrush(PWND pwnd, HDC hdc, UINT ctlType)
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
#define STATE_SYSTEM_INVISIBLE
struct _SBINFOEX SBINFOEX
LRESULT FASTCALL co_WinPosGetNonClientSize(PWND Window, RECT *WindowRect, RECT *ClientRect)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *