MCPcopy Create free account
hub / github.com/NetHack/NetHack / DoScrollBar

Function DoScrollBar

outdated/sys/mac/macwin.c:1590–1608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1588
1589#if 1 //!TARGET_API_MAC_CARBON
1590static void
1591DoScrollBar(Point p, short code, ControlHandle theBar, NhWindow *aWin)
1592{
1593 ControlActionUPP func = NULL;
1594 Rect rect;
1595
1596 if (code == kControlUpButtonPart || code == kControlPageUpPart
1597 || code == kControlDownButtonPart || code == kControlPageDownPart)
1598 func = MoveScrollUPP;
1599 (void) TrackControl(theBar, p, func);
1600 if (!func) {
1601 if (aWin->scrollPos != GetControlValue(theBar)) {
1602 aWin->scrollPos = GetControlValue(theBar);
1603 GetWindowBounds(aWin->its_window, kWindowContentRgn, &rect);
1604 OffsetRect(&rect, -rect.left, -rect.top);
1605 InvalWindowRect(aWin->its_window, &rect);
1606 }
1607 }
1608}
1609#endif
1610
1611static int

Callers 2

macClickMenuFunction · 0.85
macClickTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected