RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Scroll_Request

WindowManager
» SWI Calls
» Wimp_Poll
» Reason Codes
» Scroll_Request

Scroll_Request

(Reason Code 10)
Exit
Block
+0 Window handle
+4 Visible area minimum x
+8 Visible area minimum y
+12 Visible area maximum x
+16 Visible area maximum y
+20 Scroll x offset
+24 Scroll y offset
+28 Handle to open window behind (-1 top of stack, -2 for bottom of stack)
+32 Scroll x direction
+36 Scroll y direction
+40 Destination icon handle (or -1 for window work area); only present for extended scroll requests

Use

This code is returned from Wimp_Poll and indicates that a user is requesting to scroll a window. It contains the current scroll offsets and the direction that the window is being asked to scroll.

Notes

This event code is used for both “Normal” scroll requests and “Extended” scroll requests. Applications can determine which type of scroll request they’ve received by examining the Scroll x direction & Scroll y direction fields. If the bottom two bits of both fields are zero, it is an extended scroll request. Otherwise, it is a normal scroll request.

“Normal” scroll requests are only sent to windows if one of the Scroll Requests bits are set in the Window Flag of the window being asked to scroll.

“Extended” scroll requests can either be directed towards the window work area or an icon. Window work areas will only receive the event if they advertise support for extended scroll requests via bit 1 of the Extra Window Flags. Icons will only receive the event if they advertise support for via the ‘YS’ validation string flag.

To actually implement the window scroll, applications must call Wimp_OpenWindow after the new scroll offsets have been calculated.

The scroll offsets are in OS units, so an applications wishing to scroll in pixels must carry out the necessary scaling to calculate the correct values.

See also

  • Reason Codes
  • Wimp_OpenWindow
  • Wimp_Poll
  • Window Flags
Revised on May 21, 2020 10:23:25 by Jeffrey Lee (213) (62.252.28.250)
Edit | Back in time (6 revisions) | See changes | History | Views: Print | Source | Linked from: WindowManager Window System Area, Extra Window Flags, Window Flags, Wimp_AutoScroll, AutoScroll Status Flags, AutoScroll Block, Scroll Directions, Reason Codes, AutoScroll Entry Flags, Validation String Y

Search the Wiki

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys