Commit 72a43281 authored by Diederik van Arkel's avatar Diederik van Arkel
Browse files

Renamed Rect to OSRect

parent 3c0b2323
......@@ -165,24 +165,24 @@ pictdrawcurve :: !Bool !Point2 !Curve !*Picture -> *Picture
pictundrawcurve :: !Bool !Point2 !Curve !*Picture -> *Picture
pictfillcurve :: !Bool !Point2 !Curve !*Picture -> *Picture
pictunfillcurve :: !Bool !Point2 !Curve !*Picture -> *Picture
getcurve_rect_begin_end :: !Point2 !Curve -> (!Rect,!Point2,!Point2)
getcurve_rect_begin_end :: !Point2 !Curve -> (!OSRect,!Point2,!Point2)
/* Rect drawing operations.
/* OSRect drawing operations.
pict(draw/fill)rect rect
draws/fills a rect. The pen position is not changed.
pictun(draw/fill)rect
is equal to pict(draw/fill)rect, using the background colour temporarily.
*/
pictdrawrect :: !Rect !*Picture -> *Picture
pictundrawrect :: !Rect !*Picture -> *Picture
pictfillrect :: !Rect !*Picture -> *Picture
pictunfillrect :: !Rect !*Picture -> *Picture
pictdrawrect :: !OSRect !*Picture -> *Picture
pictundrawrect :: !OSRect !*Picture -> *Picture
pictfillrect :: !OSRect !*Picture -> *Picture
pictunfillrect :: !OSRect !*Picture -> *Picture
/* Scrolling operation (handle with care).
*/
pictscroll :: !Rect !Vector2 !*Picture -> (!Rect,!*Picture)
pictscroll :: !OSRect !Vector2 !*Picture -> (!OSRect,!*Picture)
/* Polygon drawing operations.
......
......@@ -443,7 +443,7 @@ pictunfilloval center oval picture=:{pictContext,pictToolbox,pictOrigin,pictPen}
where
rect = ovalToRect (center-pictOrigin) oval
ovalToRect :: !Point2 !Oval -> Rect
ovalToRect :: !Point2 !Oval -> OSRect
ovalToRect {x,y} {oval_rx,oval_ry}
= {rleft=x-rx,rtop=y-ry,rright=x+rx,rbottom=y+ry}
where
......@@ -505,7 +505,7 @@ where
(wrect,wstart,wend) = getcurve_rect_begin_end start` curve
end = wend+pictOrigin
getcurve_rect_begin_end :: !Point2 !Curve -> (!Rect,!Point2,!Point2)
getcurve_rect_begin_end :: !Point2 !Curve -> (!OSRect,!Point2,!Point2)
getcurve_rect_begin_end start=:{x,y} {curve_oval={oval_rx,oval_ry},curve_from,curve_to,curve_clockwise}
| curve_clockwise = (rect,end,start)
| otherwise = (rect,start,end)
......@@ -520,28 +520,28 @@ where
rect = {rleft=cx-oval_rx,rtop=cy-oval_ry,rright=cx+oval_rx,rbottom=cy+oval_ry}
/* Rect drawing operations.
/* OSRect drawing operations.
pict(draw/fill)rect rect
draws/fills a rect. The pen position is not changed.
*/
pictdrawrect :: !Rect !*Picture -> *Picture
pictdrawrect :: !OSRect !*Picture -> *Picture
pictdrawrect r picture=:{pictContext,pictToolbox,pictOrigin}
# (context,tb) = winDrawRectangle (subVector (toVector pictOrigin) r) (pictContext,pictToolbox)
= {picture & pictContext=context,pictToolbox=tb}
pictundrawrect :: !Rect !*Picture -> *Picture
pictundrawrect :: !OSRect !*Picture -> *Picture
pictundrawrect r picture=:{pictContext,pictToolbox,pictOrigin,pictPen={penForeColour,penBackColour}}
# (context,tb) = winSetPenColor (toRGBtriple penBackColour) (pictContext,pictToolbox)
# (context,tb) = winDrawRectangle (subVector (toVector pictOrigin) r) (context,tb)
# (context,tb) = winSetPenColor (toRGBtriple penForeColour) (context,tb)
= {picture & pictContext=context,pictToolbox=tb}
pictfillrect :: !Rect !*Picture -> *Picture
pictfillrect :: !OSRect !*Picture -> *Picture
pictfillrect r picture=:{pictContext,pictToolbox,pictOrigin}
# (context,tb) = winFillRectangle (subVector (toVector pictOrigin) r) (pictContext,pictToolbox)
= {picture & pictContext=context,pictToolbox=tb}
pictunfillrect :: !Rect !*Picture -> *Picture
pictunfillrect :: !OSRect !*Picture -> *Picture
pictunfillrect r picture=:{pictContext,pictToolbox,pictOrigin}
# (context,tb) = winEraseRectangle (subVector (toVector pictOrigin) r) (pictContext,pictToolbox)
= {picture & pictContext=context,pictToolbox=tb}
......@@ -549,7 +549,7 @@ pictunfillrect r picture=:{pictContext,pictToolbox,pictOrigin}
/* Scrolling operation (handle with care).
*/
pictscroll :: !Rect !Vector2 !*Picture -> (!Rect,!*Picture)
pictscroll :: !OSRect !Vector2 !*Picture -> (!OSRect,!*Picture)
pictscroll r v picture=:{pictContext,pictToolbox,pictOrigin}
# (updRect,(context,tb)) = winScrollRectangle (subVector (toVector pictOrigin) r) (toTuple v) (pictContext,pictToolbox)
= (updRect,{picture & pictContext=context,pictToolbox=tb})
......
......@@ -9,12 +9,12 @@ import ostoolbox, ostypes
// Region creation and disposal operations.
osnewrgn :: !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osnewrectrgn:: !Rect !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osnewrectrgn:: !OSRect !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osdisposergn:: !OSRgnHandle !*OSToolbox -> *OSToolbox
// Setting the shape of a region to a rectangle or a polygon.
/* PA: used nowhere.
osrectrgn :: !Rect !OSRgnHandle !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osrectrgn :: !OSRect !OSRgnHandle !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
*/
ospolyrgn :: !(!Int,!Int) ![(Int,Int)] !OSRgnHandle !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
......@@ -30,5 +30,5 @@ osdiffrgn :: !OSRgnHandle !OSRgnHandle !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
the bounding box equals the region.
osisemptyrgn determines whether the region is empty (its bounding box is empty).
*/
osgetrgnbox :: !OSRgnHandle !*OSToolbox -> (!Bool,!Rect,!*OSToolbox)
osisemptyrgn:: !OSRgnHandle !*OSToolbox -> (!Bool, !*OSToolbox)
osgetrgnbox :: !OSRgnHandle !*OSToolbox -> (!Bool,!OSRect,!*OSToolbox)
osisemptyrgn:: !OSRgnHandle !*OSToolbox -> (!Bool, !*OSToolbox)
......@@ -3,7 +3,7 @@ implementation module osrgn
// Clean Object I/O library, version 1.2
import StdBool, StdInt, StdList
from ostypes import Rect
from ostypes import OSRect
import pictCCall_12, rgnCCall_12
:: OSRgnHandle
......@@ -16,7 +16,7 @@ osnewrgn :: !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osnewrgn tb
= winCreateRectRgn 0 0 1 1 tb
osnewrectrgn :: !Rect !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osnewrectrgn :: !OSRect !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osnewrectrgn {rleft,rtop,rright,rbottom} tb
= winCreateRectRgn rleft rtop rright rbottom tb
......@@ -26,7 +26,7 @@ osdisposergn osrgn tb
// Setting the shape of a Region.
osrectrgn :: !Rect !OSRgnHandle !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osrectrgn :: !OSRect !OSRgnHandle !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osrectrgn {rleft,rtop,rright,rbottom} osrgn tb
= winSetRgnToRect rleft rtop rright rbottom osrgn tb
......@@ -76,7 +76,7 @@ osdiffrgn rgn1 rgn2 tb
// Region property access functions.
osgetrgnbox :: !OSRgnHandle !*OSToolbox -> (!Bool,!Rect,!*OSToolbox)
osgetrgnbox :: !OSRgnHandle !*OSToolbox -> (!Bool,!OSRect,!*OSToolbox)
osgetrgnbox rgn tb
# (l,t, r,b, isRect,_,tb) = winGetRgnBox rgn tb
= (isRect,{rleft=l,rtop=t,rright=r,rbottom=b}, tb)
......
......@@ -30,12 +30,12 @@ osMMtoHPixels :: !Real -> Int
osMMtoVPixels :: !Real -> Int
osMaxScrollWindowSize :: (!Int,!Int)
osMaxFixedWindowSize :: (!Int,!Int)
osScreenrect :: !*OSToolbox -> (!Rect,!*OSToolbox)
osScreenrect :: !*OSToolbox -> (!OSRect,!*OSToolbox)
osPrintSetupTypical :: Bool
// osGetProcessWindowDimensions returns Rect of process window in terms of screen coordinates
osGetProcessWindowDimensions :: !OSDInfo !*OSToolbox -> (!Rect,!*OSToolbox)
// osGetProcessWindowDimensions returns OSRect of process window in terms of screen coordinates
osGetProcessWindowDimensions :: !OSDInfo !*OSToolbox -> (!OSRect,!*OSToolbox)
osDefaultWindowMetrics :: !*OSToolbox -> (!OSWindowMetrics,!*OSToolbox)
......
......@@ -6,7 +6,7 @@ import StdBool, StdInt, StdReal, StdString
import StdMaybe
import clCCall_12, clCrossCall_12, windowCrossCall_12
import osdocumentinterface, osfont
from ostypes import Rect
from ostypes import OSRect
:: OSWindowMetrics
......@@ -50,7 +50,7 @@ osMaxScrollWindowSize = winMaxScrollWindowSize
osMaxFixedWindowSize :: (!Int,!Int)
osMaxFixedWindowSize = winMaxFixedWindowSize
osScreenrect :: !*OSToolbox -> (!Rect,!*OSToolbox)
osScreenrect :: !*OSToolbox -> (!OSRect,!*OSToolbox)
osScreenrect tb
# (screenWidth, tb) = winScreenXSize tb
# (screenHeight,tb) = winScreenYSize tb
......@@ -59,7 +59,7 @@ osScreenrect tb
osPrintSetupTypical :: Bool // MW11++
osPrintSetupTypical = False
osGetProcessWindowDimensions :: !OSDInfo !*OSToolbox -> (!Rect,!*OSToolbox)
osGetProcessWindowDimensions :: !OSDInfo !*OSToolbox -> (!OSRect,!*OSToolbox)
osGetProcessWindowDimensions osdinfo tb
# maybeOSInfo = getOSDInfoOSInfo osdinfo
| isNothing maybeOSInfo
......
......@@ -8,7 +8,7 @@ definition module ostypes
:== HDC
:: HDC // PA: moved from pictCCall_12
:== Int
:: Rect // A Rect is supposed to be an ordered rectangle with
:: OSRect // A OSRect is supposed to be an ordered rectangle with
= { rleft :: !Int // rleft<=rright && rtop<=rbottom
, rtop :: !Int
, rright :: !Int
......
......@@ -8,7 +8,7 @@ implementation module ostypes
:== HDC
:: HDC // PA: moved from pictCCall_12
:== Int
:: Rect // A Rect is supposed to be an ordered rectangle with
:: OSRect // A OSRect is supposed to be an ordered rectangle with
= { rleft :: !Int // rleft<=rright && rtop<=rbottom
, rtop :: !Int
, rright :: !Int
......
......@@ -36,13 +36,13 @@ osWindowTitleBarHeight :: Int
// Calculating the view frame of window/compound with visibility of scrollbars.
osGetCompoundContentRect:: !OSWindowMetrics !(!Bool,!Bool) !Rect -> Rect
osGetCompoundHScrollRect:: !OSWindowMetrics !(!Bool,!Bool) !Rect -> Rect
osGetCompoundVScrollRect:: !OSWindowMetrics !(!Bool,!Bool) !Rect -> Rect
osGetCompoundContentRect:: !OSWindowMetrics !(!Bool,!Bool) !OSRect -> OSRect
osGetCompoundHScrollRect:: !OSWindowMetrics !(!Bool,!Bool) !OSRect -> OSRect
osGetCompoundVScrollRect:: !OSWindowMetrics !(!Bool,!Bool) !OSRect -> OSRect
osGetWindowContentRect :: !OSWindowMetrics !(!Bool,!Bool) !Rect -> Rect
osGetWindowHScrollRect :: !OSWindowMetrics !(!Bool,!Bool) !Rect -> Rect
osGetWindowVScrollRect :: !OSWindowMetrics !(!Bool,!Bool) !Rect -> Rect
osGetWindowContentRect :: !OSWindowMetrics !(!Bool,!Bool) !OSRect -> OSRect
osGetWindowHScrollRect :: !OSWindowMetrics !(!Bool,!Bool) !OSRect -> OSRect
osGetWindowVScrollRect :: !OSWindowMetrics !(!Bool,!Bool) !OSRect -> OSRect
/* Determine the size of controls:
......@@ -264,14 +264,14 @@ osDestroyCompoundControl :: !OSWindowPtr !OSWindowPtr !OSWindowPtr !*OSToolbox -
Both area and pos must in window coordinates (zero at left-top).
*/
osUpdateRadioControl :: !Rect !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
osUpdateCheckControl :: !Rect !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
osUpdatePopUpControl :: !Rect !OSWindowPtr !OSWindowPtr !(Maybe OSWindowPtr) !(!Int,!Int) !(!Int,!Int) !Bool !String !*OSToolbox -> *OSToolbox
osUpdateSliderControl :: !Rect !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
osUpdateTextControl :: !Rect !Rect !String !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
osUpdateEditControl :: !Rect !Rect !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
osUpdateButtonControl :: !Rect !Rect !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
osUpdateCompoundControl :: !Rect !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
osUpdateRadioControl :: !OSRect !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
osUpdateCheckControl :: !OSRect !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
osUpdatePopUpControl :: !OSRect !OSWindowPtr !OSWindowPtr !(Maybe OSWindowPtr) !(!Int,!Int) !(!Int,!Int) !Bool !String !*OSToolbox -> *OSToolbox
osUpdateSliderControl :: !OSRect !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
osUpdateTextControl :: !OSRect !OSRect !String !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
osUpdateEditControl :: !OSRect !OSRect !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
osUpdateButtonControl :: !OSRect !OSRect !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
osUpdateCompoundControl :: !OSRect !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
/* Control clipping operations.
......@@ -286,16 +286,16 @@ osUpdateCompoundControl :: !Rect !(!Int,!Int) !OSWindowPtr !OSWindowPtr !*OSToo
osClipCustomControl parentWindow parentPos area pos size generates the clipping region of a custom control within area.
osClipCompoundControl parentWindow parentPos area pos size generates the clipping region of a compound control within area.
*/
osClipRadioControl :: !OSWindowPtr !(!Int,!Int) !Rect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipCheckControl :: !OSWindowPtr !(!Int,!Int) !Rect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipPopUpControl :: !OSWindowPtr !(!Int,!Int) !Rect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipSliderControl :: !OSWindowPtr !(!Int,!Int) !Rect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipTextControl :: !OSWindowPtr !(!Int,!Int) !Rect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipEditControl :: !OSWindowPtr !(!Int,!Int) !Rect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipButtonControl :: !OSWindowPtr !(!Int,!Int) !Rect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipCustomButtonControl :: !OSWindowPtr !(!Int,!Int) !Rect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipCustomControl :: !OSWindowPtr !(!Int,!Int) !Rect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipCompoundControl :: !OSWindowPtr !(!Int,!Int) !Rect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipRadioControl :: !OSWindowPtr !(!Int,!Int) !OSRect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipCheckControl :: !OSWindowPtr !(!Int,!Int) !OSRect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipPopUpControl :: !OSWindowPtr !(!Int,!Int) !OSRect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipSliderControl :: !OSWindowPtr !(!Int,!Int) !OSRect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipTextControl :: !OSWindowPtr !(!Int,!Int) !OSRect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipEditControl :: !OSWindowPtr !(!Int,!Int) !OSRect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipButtonControl :: !OSWindowPtr !(!Int,!Int) !OSRect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipCustomButtonControl :: !OSWindowPtr !(!Int,!Int) !OSRect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipCustomControl :: !OSWindowPtr !(!Int,!Int) !OSRect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
osClipCompoundControl :: !OSWindowPtr !(!Int,!Int) !OSRect !(!Int,!Int) !(!Int,!Int) !*OSToolbox -> (!OSRgnHandle,!*OSToolbox)
/* Window graphics context access operations.
......@@ -322,10 +322,10 @@ osEndUpdate :: !OSWindowPtr !*OSToolbox -> *OSToolbox
(acc/app)Clipport theWindow clipRect f
applies f to the graphics context of theWindow while clipping clipRect (dummy on Windows).
*/
accGrafport :: !OSWindowPtr !.(St *OSToolbox .x) !*OSToolbox -> (!.x, !*OSToolbox)
appGrafport :: !OSWindowPtr !.(*OSToolbox -> *OSToolbox) !*OSToolbox -> *OSToolbox
accClipport :: !OSWindowPtr !Rect !.(St *OSToolbox .x) !*OSToolbox -> (!.x, !*OSToolbox)
appClipport :: !OSWindowPtr !Rect !.(*OSToolbox -> *OSToolbox) !*OSToolbox -> *OSToolbox
accGrafport :: !OSWindowPtr !.(St *OSToolbox .x) !*OSToolbox -> (!.x, !*OSToolbox)
appGrafport :: !OSWindowPtr !.(*OSToolbox -> *OSToolbox) !*OSToolbox -> *OSToolbox
accClipport :: !OSWindowPtr !OSRect !.(St *OSToolbox .x) !*OSToolbox -> (!.x, !*OSToolbox)
appClipport :: !OSWindowPtr !OSRect !.(*OSToolbox -> *OSToolbox) !*OSToolbox -> *OSToolbox
/* Scrollbar operations.
......@@ -346,7 +346,7 @@ appClipport :: !OSWindowPtr !Rect !.(*OSToolbox -> *OSToolbox) !*OSToolbox ->
toOSscrollbarRange :: !(!Int,!Int,!Int) !Int -> (!Int,!Int,!Int,!Int)
fromOSscrollbarRange :: !(!Int,!Int) !Int -> Int
osScrollbarIsVisible :: !(!Int,!Int) !Int -> Bool
osScrollbarsAreVisible :: !OSWindowMetrics !Rect !(!Int,!Int) !(!Bool,!Bool) -> (!Bool,!Bool)
osScrollbarsAreVisible :: !OSWindowMetrics !OSRect !(!Int,!Int) !(!Bool,!Bool) -> (!Bool,!Bool)
/* Window access operations.
......@@ -360,10 +360,10 @@ PA: obsolete:
osSetWindowSlider theWindow isHorizontal (osRangeMin,osThumb,osRangeMax,osThumbSize)
sets all values of the horizontal/vertical slider of the given window.
*/
osSetWindowSliderThumb :: !OSWindowMetrics !OSWindowPtr !Bool !Int !(Maybe OSWindowPtr) !(Maybe OSWindowPtr) !Rect !Rect !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetWindowSliderThumbSize :: !OSWindowMetrics !OSWindowPtr !OSWindowPtr !Bool !Int !Int !Int !(!Int,!Int) !Rect !Bool !Bool !*OSToolbox -> *OSToolbox
osSetWindowSliderThumb :: !OSWindowMetrics !OSWindowPtr !Bool !Int !(Maybe OSWindowPtr) !(Maybe OSWindowPtr) !OSRect !OSRect !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetWindowSliderThumbSize :: !OSWindowMetrics !OSWindowPtr !OSWindowPtr !Bool !Int !Int !Int !(!Int,!Int) !OSRect !Bool !Bool !*OSToolbox -> *OSToolbox
//osSetWindowSlider :: !OSWindowMetrics !OSWindowPtr !Bool !(!Int,!Int,!Int,!Int) !(!Int,!Int) !*OSToolbox -> *OSToolbox
osUpdateWindowScroll :: !OSWindowPtr !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Rect !*OSToolbox -> *OSToolbox
osUpdateWindowScroll :: !OSWindowPtr !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !OSRect !*OSToolbox -> *OSToolbox
/* osInvalidateWindow theWindow
......@@ -371,13 +371,13 @@ osUpdateWindowScroll :: !OSWindowPtr !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Re
osInvalidateWindowRect theWindow part
invalidates the part of the window identified by theWindow, forcing an update event for that part.
osValidateWindowRect theWindow part
validates the Rect part of the window identified by theWindow, eliminating the need to update that part.
validates the OSRect part of the window identified by theWindow, eliminating the need to update that part.
osValidateWindowRgn theWindow part
validate the Rgn part of the window identified by the theWindow, eliminating the need to update that part.
*/
osInvalidateWindow :: !OSWindowPtr !*OSToolbox -> *OSToolbox
osInvalidateWindowRect :: !OSWindowPtr !Rect !*OSToolbox -> *OSToolbox
osValidateWindowRect :: !OSWindowPtr !Rect !*OSToolbox -> *OSToolbox
osInvalidateWindowRect :: !OSWindowPtr !OSRect !*OSToolbox -> *OSToolbox
osValidateWindowRect :: !OSWindowPtr !OSRect !*OSToolbox -> *OSToolbox
osValidateWindowRgn :: !OSWindowPtr !OSRgnHandle !*OSToolbox -> *OSToolbox
......@@ -467,17 +467,17 @@ osSetWindowTitle:: !OSWindowPtr !String !*OSToolbox -> *OSToolbox
is True iff compound control has a private origin; otherwise related to its item position.
*/
osInvalidateCompound :: !OSWindowPtr !*OSToolbox -> *OSToolbox
//osInvalidateCompoundRect :: !OSWindowPtr !Rect !*OSToolbox -> *OSToolbox PA: not used
//osInvalidateCompoundRect :: !OSWindowPtr !OSRect !*OSToolbox -> *OSToolbox PA: not used
//osSetCompoundSliderThumb :: !OSWindowMetrics !OSWindowPtr !Bool !Int !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetCompoundSliderThumb :: !OSWindowMetrics !OSWindowPtr !OSWindowPtr !OSWindowPtr !Rect !Bool !Int !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetCompoundSliderThumb :: !OSWindowMetrics !OSWindowPtr !OSWindowPtr !OSWindowPtr !OSRect !Bool !Int !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
//osSetCompoundSliderThumbSize :: !OSWindowMetrics !OSWindowPtr !OSWindowPtr !Bool !Int !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetCompoundSliderThumbSize :: !OSWindowMetrics !OSWindowPtr !OSWindowPtr !Int !Int !Int !Rect !Bool !Bool !Bool !*OSToolbox -> *OSToolbox
osSetCompoundSliderThumbSize :: !OSWindowMetrics !OSWindowPtr !OSWindowPtr !OSWindowPtr !Int !Int !Int !OSRect !Bool !Bool !Bool !*OSToolbox -> *OSToolbox
//osSetCompoundSlider :: !OSWindowMetrics !OSWindowPtr !Bool !(!Int,!Int,!Int,!Int) !(!Int,!Int) !*OSToolbox -> *OSToolbox PA: not used
osSetCompoundSelect :: !OSWindowPtr !OSWindowPtr !Rect !(!Bool,!Bool) !(!OSWindowPtr,!OSWindowPtr) !Bool !*OSToolbox -> *OSToolbox
osSetCompoundShow :: !OSWindowPtr !OSWindowPtr !Rect !Rect !Bool !*OSToolbox -> *OSToolbox
osSetCompoundSelect :: !OSWindowPtr !OSWindowPtr !OSRect !(!Bool,!Bool) !(!OSWindowPtr,!OSWindowPtr) !Bool !*OSToolbox -> *OSToolbox
osSetCompoundShow :: !OSWindowPtr !OSWindowPtr !OSRect !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetCompoundPos :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetCompoundSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osUpdateCompoundScroll :: !OSWindowPtr !OSWindowPtr !Rect !*OSToolbox -> *OSToolbox
osUpdateCompoundScroll :: !OSWindowPtr !OSWindowPtr !OSRect !*OSToolbox -> *OSToolbox
osCompoundMovesControls :== True
osCompoundControlHasOrigin :== True
......@@ -493,9 +493,9 @@ osCompoundControlHasOrigin :== True
osSetSliderControlSize parentWindow parentPos sliderPtr pos size update
sets the new size of the slider control and updates the control if update holds.
*/
osSetSliderControlThumb :: !OSWindowPtr !OSWindowPtr !Rect !Bool !(!Int,!Int,!Int,!Int) !*OSToolbox -> *OSToolbox
osSetSliderControlSelect :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetSliderControlShow :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetSliderControlThumb :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !(!Int,!Int,!Int,!Int) !*OSToolbox -> *OSToolbox
osSetSliderControlSelect :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetSliderControlShow :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetSliderControlPos :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetSliderControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
......@@ -511,9 +511,9 @@ osSetSliderControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int)
osSetRadioControlSize parentWindow parentPos radioPtr pos size update
sets the new size of the radio control and updates the control if update holds.
*/
osSetRadioControl :: !OSWindowPtr !OSWindowPtr !OSWindowPtr !Rect !*OSToolbox -> *OSToolbox
osSetRadioControlSelect :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetRadioControlShow :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetRadioControl :: !OSWindowPtr !OSWindowPtr !OSWindowPtr !OSRect !*OSToolbox -> *OSToolbox
osSetRadioControlSelect :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetRadioControlShow :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetRadioControlPos :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetRadioControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
......@@ -529,9 +529,9 @@ osSetRadioControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !
osSetCheckControlSize parentWindow parentPos checkPtr pos size update
sets the new size of the check control and updates the control if update holds.
*/
osSetCheckControl :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetCheckControlSelect :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetCheckControlShow :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetCheckControl :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetCheckControlSelect :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetCheckControlShow :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetCheckControlPos :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetCheckControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
......@@ -547,9 +547,9 @@ osSetCheckControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !
osSetPopUpControlSize parentWindow parentPos popupPtr pos size update
sets the new size of the pop up control and updates the control if update holds.
*/
osSetPopUpControl :: !OSWindowPtr !OSWindowPtr !(Maybe OSWindowPtr) !Rect !Rect !Int !Int !String !Bool !*OSToolbox -> *OSToolbox
osSetPopUpControlSelect :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetPopUpControlShow :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetPopUpControl :: !OSWindowPtr !OSWindowPtr !(Maybe OSWindowPtr) !OSRect !OSRect !Int !Int !String !Bool !*OSToolbox -> *OSToolbox
osSetPopUpControlSelect :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetPopUpControlShow :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetPopUpControlPos :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetPopUpControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
......@@ -569,14 +569,14 @@ osSetPopUpControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !
osSetEditControlSize parentWindow parentPos editPtr pos size update
sets the new size of the edit control and updates the control if update holds.
*/
osSetEditControlText :: !OSWindowPtr !OSWindowPtr !Rect !Rect !Bool !String !*OSToolbox -> *OSToolbox
osSetEditControlText :: !OSWindowPtr !OSWindowPtr !OSRect !OSRect !Bool !String !*OSToolbox -> *OSToolbox
osGetEditControlText :: !OSWindowPtr !OSWindowPtr !*OSToolbox -> (!String,!*OSToolbox)
osSetEditControlCursor :: !OSWindowPtr !OSWindowPtr !Rect !Rect !Int !*OSToolbox -> *OSToolbox
osSetEditControlSelect :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetEditControlShow :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetEditControlCursor :: !OSWindowPtr !OSWindowPtr !OSRect !OSRect !Int !*OSToolbox -> *OSToolbox
osSetEditControlSelect :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetEditControlShow :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetEditControlPos :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetEditControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osIdleEditControl :: !OSWindowPtr !Rect !OSWindowPtr !*OSToolbox -> *OSToolbox
osIdleEditControl :: !OSWindowPtr !OSRect !OSWindowPtr !*OSToolbox -> *OSToolbox
/* On text controls:
osSetTextControlText parentWindow textPtr clipRect itemRect shown text
......@@ -590,9 +590,9 @@ osIdleEditControl :: !OSWindowPtr !Rect !OSWindowPtr !*OSToolbox ->
osSetTextControlSize parentWindow parentPos textPtr pos size update
sets the new size of the text control and updates the control if update holds.
*/
osSetTextControlText :: !OSWindowPtr !OSWindowPtr !Rect !Rect !Bool !String !*OSToolbox -> *OSToolbox
osSetTextControlSelect :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetTextControlShow :: !OSWindowPtr !OSWindowPtr !Rect !Rect !Bool !String !*OSToolbox -> *OSToolbox
osSetTextControlText :: !OSWindowPtr !OSWindowPtr !OSRect !OSRect !Bool !String !*OSToolbox -> *OSToolbox
osSetTextControlSelect :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetTextControlShow :: !OSWindowPtr !OSWindowPtr !OSRect !OSRect !Bool !String !*OSToolbox -> *OSToolbox
osSetTextControlPos :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetTextControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
......@@ -608,9 +608,9 @@ osSetTextControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(
osSetButtonControlSize parentWindow parentPos buttonPtr pos size update
sets the new size of the button control and updates the control if update holds.
*/
osSetButtonControlText :: !OSWindowPtr !OSWindowPtr !Rect !String !*OSToolbox -> *OSToolbox
osSetButtonControlSelect :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetButtonControlShow :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetButtonControlText :: !OSWindowPtr !OSWindowPtr !OSRect !String !*OSToolbox -> *OSToolbox
osSetButtonControlSelect :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetButtonControlShow :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetButtonControlPos :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetButtonControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
......@@ -626,8 +626,8 @@ osSetButtonControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int)
osCustomButtonControlHasOrigin
is True iff the control has a private origin; otherwise related to its item position.
*/
osSetCustomButtonControlSelect :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetCustomButtonControlShow :: !OSWindowPtr !OSWindowPtr !Rect !Rect !Bool !*OSToolbox -> *OSToolbox
osSetCustomButtonControlSelect :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetCustomButtonControlShow :: !OSWindowPtr !OSWindowPtr !OSRect !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetCustomButtonControlPos :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetCustomButtonControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osCustomButtonControlHasOrigin :== True
......@@ -644,8 +644,8 @@ osCustomButtonControlHasOrigin :== True
osCustomControlHasOrigin
is True iff the control has a private origin; otherwise related to its item position.
*/
osSetCustomControlSelect :: !OSWindowPtr !OSWindowPtr !Rect !Bool !*OSToolbox -> *OSToolbox
osSetCustomControlShow :: !OSWindowPtr !OSWindowPtr !Rect !Rect !Bool !*OSToolbox -> *OSToolbox
osSetCustomControlSelect :: !OSWindowPtr !OSWindowPtr !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetCustomControlShow :: !OSWindowPtr !OSWindowPtr !OSRect !OSRect !Bool !*OSToolbox -> *OSToolbox
osSetCustomControlPos :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osSetCustomControlSize :: !OSWindowPtr !(!Int,!Int) !OSWindowPtr !(!Int,!Int) !(!Int,!Int) !Bool !*OSToolbox -> *OSToolbox
osCustomControlHasOrigin :== True
......
......@@ -9,7 +9,7 @@ from StdIOCommon import CursorShape, StandardCursor, BusyCursor, IBeamCursor,
import clCrossCall_12, clCCall_12, windowCCall_12, windowCrossCall_12
import osdocumentinterface, osevent, osfont, ospicture, osrgn, ossystem, ostypes
from menuCrossCall_12 import HMENU
from commondef import fatalError,intersectRects,rectSize,fromTuple,toTuple4,subVector
from commondef import fatalError,intersectRects,rectSize,fromTuple,toTuple4,subVector,zero
//import StdDebug,tracetypes
......@@ -49,7 +49,7 @@ osWindowTitleBarHeight :: Int; osWindowTitleBarHeight = 0;
// Calculating the view frame of window/compound with visibility of scrollbars.
osGetCompoundContentRect :: !OSWindowMetrics !(!Bool,!Bool) !Rect -> Rect
osGetCompoundContentRect :: !OSWindowMetrics !(!Bool,!Bool) !OSRect -> OSRect
osGetCompoundContentRect {osmHSliderHeight,osmVSliderWidth} (visHScroll,visVScroll) itemRect=:{rright,rbottom}
| visHScroll && visVScroll = {itemRect & rright=r`,rbottom=b`}
| visHScroll = {itemRect & rbottom=b`}
......@@ -59,7 +59,7 @@ where
r` = rright -osmVSliderWidth
b` = rbottom-osmHSliderHeight
osGetCompoundHScrollRect :: !OSWindowMetrics !(!Bool,!Bool) !Rect -> Rect
osGetCompoundHScrollRect :: !OSWindowMetrics !(!Bool,!Bool) !OSRect -> OSRect
osGetCompoundHScrollRect {osmHSliderHeight,osmVSliderWidth} (visHScroll,visVScroll) itemRect=:{rright,rbottom}
| not visHScroll = zero
| otherwise = {itemRect & rtop=b`,rright=if visVScroll r` rright}
......@@ -67,7 +67,7 @@ where
r` = rright -osmVSliderWidth
b` = rbottom-osmHSliderHeight
osGetCompoundVScrollRect :: !OSWindowMetrics !(!Bool,!Bool) !Rect -> Rect
osGetCompoundVScrollRect :: !OSWindowMetrics !(!Bool,!Bool) !OSRect -> OSRect
osGetCompoundVScrollRect {osmHSliderHeight,osmVSliderWidth} (visHScroll,visVScroll) itemRect=:{rright,rbottom}
| not visVScroll = zero
| otherwise = {itemRect & rleft=r`,rbottom=if visHScroll b` rbottom}
......@@ -76,7 +76,7 @@ where
b` = rbottom-osmHSliderHeight