ReactOS  0.4.12-dev-43-g63b00d8
scrollutils.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Clipboard Viewer
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: Scrolling related helper functions.
5  * COPYRIGHT: Copyright 2015-2018 Ricardo Hanke
6  * Copyright 2015-2018 Hermes Belusca-Maito
7  */
8 
9 #pragma once
10 
11 typedef struct _SCROLLSTATE
12 {
13  UINT uLinesToScroll; /* Number of lines to scroll on one wheel rotation movement (== one "click" == WHEEL_DELTA ticks) */
14  INT iWheelCarryoverX; /* Unused wheel ticks (< WHEEL_DELTA) */
16  INT nPageX; /* Number of lines per page */
18  INT CurrentX; /* Current scrollbar position */
20  INT MaxX; /* Maximum scrollbar position */
22  INT nMaxWidth; /* Maximum span of displayed data */
25 
26 void OnKeyScroll(HWND hWnd, WPARAM wParam, LPARAM lParam, LPSCROLLSTATE state);
27 void OnMouseScroll(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LPSCROLLSTATE state);
28 void OnScroll(HWND hWnd, INT nBar, WPARAM wParam, INT iDelta, LPSCROLLSTATE state);
29 
30 void UpdateLinesToScroll(LPSCROLLSTATE state);
31 void UpdateWindowScrollState(HWND hWnd, INT nMaxWidth, INT nMaxHeight, LPSCROLLSTATE lpState);
struct _SCROLLSTATE * LPSCROLLSTATE
HWND hWnd
Definition: settings.c:17
int32_t INT
Definition: typedefs.h:56
WPARAM wParam
Definition: combotst.c:138
UINT_PTR WPARAM
Definition: windef.h:207
LONG_PTR LPARAM
Definition: windef.h:208
UINT uLinesToScroll
Definition: scrollutils.h:13
void OnKeyScroll(HWND hWnd, WPARAM wParam, LPARAM lParam, LPSCROLLSTATE state)
Definition: scrollutils.c:11
unsigned int UINT
Definition: ndis.h:50
void OnScroll(HWND hWnd, INT nBar, WPARAM wParam, INT iDelta, LPSCROLLSTATE state)
Definition: scrollutils.c:124
static int state
Definition: maze.c:121
void OnMouseScroll(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LPSCROLLSTATE state)
Definition: scrollutils.c:61
INT iWheelCarryoverY
Definition: scrollutils.h:15
void UpdateLinesToScroll(LPSCROLLSTATE state)
Definition: scrollutils.c:241
void UpdateWindowScrollState(HWND hWnd, INT nMaxWidth, INT nMaxHeight, LPSCROLLSTATE lpState)
Definition: scrollutils.c:256
INT iWheelCarryoverX
Definition: scrollutils.h:14
LPARAM lParam
Definition: combotst.c:139
struct _SCROLLSTATE SCROLLSTATE