mirror of
https://github.com/reactos/reactos.git
synced 2024-11-17 12:27:17 +00:00
ebe3d5273e
- Improve the scrolling support for bitmaps, DIBs and text formats. This completes the work started in CORE-10679 by Ricardo Hanke. Includes scrolling with the keyboard and the mouse wheel. - Add support for the CF_DSP* clipboard formats, as well as CF_TEXT and CF_OEMTEXT. - Add support for owner-display clipboard format CF_OWNERDISPLAY. - Realize any palette found in the clipboard (CF_PALETTE) before displaying the clipboard data format we want. - Remove dead code. - Update the file headers.
31 lines
1.3 KiB
C
31 lines
1.3 KiB
C
/*
|
|
* PROJECT: ReactOS Clipboard Viewer
|
|
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
|
* PURPOSE: Scrolling related helper functions.
|
|
* COPYRIGHT: Copyright 2015-2018 Ricardo Hanke
|
|
* Copyright 2015-2018 Hermes Belusca-Maito
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
typedef struct _SCROLLSTATE
|
|
{
|
|
UINT uLinesToScroll; /* Number of lines to scroll on one wheel rotation movement (== one "click" == WHEEL_DELTA ticks) */
|
|
INT iWheelCarryoverX; /* Unused wheel ticks (< WHEEL_DELTA) */
|
|
INT iWheelCarryoverY;
|
|
INT nPageX; /* Number of lines per page */
|
|
INT nPageY;
|
|
INT CurrentX; /* Current scrollbar position */
|
|
INT CurrentY;
|
|
INT MaxX; /* Maximum scrollbar position */
|
|
INT MaxY;
|
|
INT nMaxWidth; /* Maximum span of displayed data */
|
|
INT nMaxHeight;
|
|
} SCROLLSTATE, *LPSCROLLSTATE;
|
|
|
|
void OnKeyScroll(HWND hWnd, WPARAM wParam, LPARAM lParam, LPSCROLLSTATE state);
|
|
void OnMouseScroll(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LPSCROLLSTATE state);
|
|
void OnScroll(HWND hWnd, INT nBar, WPARAM wParam, INT iDelta, LPSCROLLSTATE state);
|
|
|
|
void UpdateLinesToScroll(LPSCROLLSTATE state);
|
|
void UpdateWindowScrollState(HWND hWnd, INT nMaxWidth, INT nMaxHeight, LPSCROLLSTATE lpState);
|