Commit 4955bebf authored by Diederik van Arkel's avatar Diederik van Arkel

Renamed Rect to OSRect

parent f61d787d
......@@ -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
......
......@@ -3,7 +3,7 @@ definition module pictCCall_12
from rgnCCall_12 import HRGN
from ostoolbox import OSToolbox
from ostypes import Rect, HDC
from ostypes import OSRect, HDC
:: *PIC
......@@ -94,10 +94,10 @@ winSetPolyPoint :: !Int !Int !Int !Int !*OSToolbox -> *OSToolbox
winFreePolyShape :: !Int !*OSToolbox -> *OSToolbox
winInvertWedge :: !Rect !Pt !Pt !PIC -> PIC
winEraseWedge :: !Rect !Pt !Pt !PIC -> PIC
winFillWedge :: !Rect !Pt !Pt !PIC -> PIC
winDrawWedge :: !Rect !Pt !Pt !PIC -> PIC
winInvertWedge :: !OSRect !Pt !Pt !PIC -> PIC
winEraseWedge :: !OSRect !Pt !Pt !PIC -> PIC
winFillWedge :: !OSRect !Pt !Pt !PIC -> PIC
winDrawWedge :: !OSRect !Pt !Pt !PIC -> PIC
winInvertCircle :: !Pt !Int !PIC -> PIC
......@@ -106,39 +106,39 @@ winFillCircle :: !Pt !Int !PIC -> PIC
winDrawCircle :: !Pt !Int !PIC -> PIC
winInvertOval :: !Rect !PIC -> PIC
winEraseOval :: !Rect !PIC -> PIC
winFillOval :: !Rect !PIC -> PIC
winDrawOval :: !Rect !PIC -> PIC
winInvertOval :: !OSRect !PIC -> PIC
winEraseOval :: !OSRect !PIC -> PIC
winFillOval :: !OSRect !PIC -> PIC
winDrawOval :: !OSRect !PIC -> PIC
winInvertRoundRectangle :: !Rect !Int !Int !PIC -> PIC
winEraseRoundRectangle :: !Rect !Int !Int !PIC -> PIC
winFillRoundRectangle :: !Rect !Int !Int !PIC -> PIC
winDrawRoundRectangle :: !Rect !Int !Int !PIC -> PIC
winInvertRoundRectangle :: !OSRect !Int !Int !PIC -> PIC
winEraseRoundRectangle :: !OSRect !Int !Int !PIC -> PIC
winFillRoundRectangle :: !OSRect !Int !Int !PIC -> PIC
winDrawRoundRectangle :: !OSRect !Int !Int !PIC -> PIC
winScrollRectangle :: !Rect !Pt !PIC -> (!Rect,!PIC)
winCopyRectangle :: !Rect !Pt !PIC -> PIC
winCopyRectangleTo :: !Rect !Pt !PIC -> PIC
winMoveRectangle :: !Rect !Pt !PIC -> PIC
winMoveRectangleTo :: !Rect !Pt !PIC -> PIC
winScrollRectangle :: !OSRect !Pt !PIC -> (!OSRect,!PIC)
winCopyRectangle :: !OSRect !Pt !PIC -> PIC
winCopyRectangleTo :: !OSRect !Pt !PIC -> PIC
winMoveRectangle :: !OSRect !Pt !PIC -> PIC
winMoveRectangleTo :: !OSRect !Pt !PIC -> PIC
winInvertRectangle :: !Rect !PIC -> PIC
winEraseRectangle :: !Rect !PIC -> PIC
winFillRectangle :: !Rect !PIC -> PIC
winDrawRectangle :: !Rect !PIC -> PIC
winInvertRectangle :: !OSRect !PIC -> PIC
winEraseRectangle :: !OSRect !PIC -> PIC
winFillRectangle :: !OSRect !PIC -> PIC
winDrawRectangle :: !OSRect !PIC -> PIC
winDrawChar :: !Int !PIC -> PIC
winDrawString :: !{#Char} !PIC -> PIC
winDrawCCurve :: !Rect !Pt !Pt !RGBcolor !PIC -> PIC
winDrawCCurve :: !OSRect !Pt !Pt !RGBcolor !PIC -> PIC
winDrawCLine :: !Pt !Pt !RGBcolor !PIC -> PIC
winDrawCPoint :: !Pt !RGBcolor !PIC -> PIC
winDrawCurve :: !Rect !Pt !Pt !PIC -> PIC
winDrawCurve :: !OSRect !Pt !Pt !PIC -> PIC
winDrawLine :: !Pt !Pt !PIC -> PIC
winDrawPoint :: !Pt !PIC -> PIC
......@@ -156,7 +156,7 @@ winSetMode :: !Int !PIC -> PIC
winSetBackColor :: !RGBcolor !PIC -> PIC
winSetPenColor :: !RGBcolor !PIC -> PIC
winClipPicture :: !Rect !PIC -> PIC
winClipPicture :: !OSRect !PIC -> PIC
winClipRgnPicture :: !HRGN !PIC -> PIC // Operation to set the clipping region
winSetClipRgnPicture :: !HRGN !PIC -> PIC // Operation to completely set the clipping region
winGetClipRgnPicture :: !PIC -> (!HRGN,!PIC) // Operation to retrieve the current clipping region
......
implementation module pictCCall_12
from ostypes import Rect, HDC
from ostypes import OSRect, HDC
import rgnCCall_12//, intrface_12
......@@ -295,7 +295,7 @@ winFreePolyShape _ _
}
winInvertWedge :: !Rect !Pt !Pt !PIC -> PIC
winInvertWedge :: !OSRect !Pt !Pt !PIC -> PIC
winInvertWedge _ _ _ _
= code
{
......@@ -304,7 +304,7 @@ winInvertWedge _ _ _ _
.end
}
winEraseWedge :: !Rect !Pt !Pt !PIC -> PIC
winEraseWedge :: !OSRect !Pt !Pt !PIC -> PIC
winEraseWedge _ _ _ _
= code
{
......@@ -313,7 +313,7 @@ winEraseWedge _ _ _ _
.end
}
winFillWedge :: !Rect !Pt !Pt !PIC -> PIC
winFillWedge :: !OSRect !Pt !Pt !PIC -> PIC
winFillWedge _ _ _ _
= code
{
......@@ -322,7 +322,7 @@ winFillWedge _ _ _ _
.end
}
winDrawWedge :: !Rect !Pt !Pt !PIC -> PIC
winDrawWedge :: !OSRect !Pt !Pt !PIC -> PIC
winDrawWedge _ _ _ _
= code
{
......@@ -369,7 +369,7 @@ winDrawCircle _ _ _
}
winInvertOval :: !Rect !PIC -> PIC
winInvertOval :: !OSRect !PIC -> PIC
winInvertOval _ _
= code
{
......@@ -378,7 +378,7 @@ winInvertOval _ _
.end
}
winEraseOval :: !Rect !PIC -> PIC
winEraseOval :: !OSRect !PIC -> PIC
winEraseOval _ _
= code
{
......@@ -387,7 +387,7 @@ winEraseOval _ _
.end
}
winFillOval :: !Rect !PIC -> PIC
winFillOval :: !OSRect !PIC -> PIC
winFillOval _ _
= code
{
......@@ -396,7 +396,7 @@ winFillOval _ _
.end
}
winDrawOval :: !Rect !PIC -> PIC
winDrawOval :: !OSRect !PIC -> PIC
winDrawOval _ _
= code
{
......@@ -406,7 +406,7 @@ winDrawOval _ _
}
winInvertRoundRectangle :: !Rect !Int !Int !PIC -> PIC
winInvertRoundRectangle :: !OSRect !Int !Int !PIC -> PIC
winInvertRoundRectangle _ _ _ _
= code
{
......@@ -415,7 +415,7 @@ winInvertRoundRectangle _ _ _ _
.end
}
winEraseRoundRectangle :: !Rect !Int !Int !PIC -> PIC
winEraseRoundRectangle :: !OSRect !Int !Int !PIC -> PIC
winEraseRoundRectangle _ _ _ _
= code
{
......@@ -424,7 +424,7 @@ winEraseRoundRectangle _ _ _ _
.end
}
winFillRoundRectangle :: !Rect !Int !Int !PIC -> PIC
winFillRoundRectangle :: !OSRect !Int !Int !PIC -> PIC
winFillRoundRectangle _ _ _ _
= code
{
......@@ -433,7 +433,7 @@ winFillRoundRectangle _ _ _ _
.end
}
winDrawRoundRectangle :: !Rect !Int !Int !PIC -> PIC
winDrawRoundRectangle :: !OSRect !Int !Int !PIC -> PIC
winDrawRoundRectangle _ _ _ _
= code
{
......@@ -443,7 +443,7 @@ winDrawRoundRectangle _ _ _ _
}
winScrollRectangle :: !Rect !Pt !PIC -> (!Rect,!PIC)
winScrollRectangle :: !OSRect !Pt !PIC -> (!OSRect,!PIC)
winScrollRectangle _ _ _
= code
{
......@@ -452,7 +452,7 @@ winScrollRectangle _ _ _
.end
}
winCopyRectangle :: !Rect !Pt !PIC -> PIC
winCopyRectangle :: !OSRect !Pt !PIC -> PIC
winCopyRectangle _ _ _
= code
{
......@@ -461,7 +461,7 @@ winCopyRectangle _ _ _
.end
}
winCopyRectangleTo :: !Rect !Pt !PIC -> PIC
winCopyRectangleTo :: !OSRect !Pt !PIC -> PIC
winCopyRectangleTo _ _ _
= code
{
......@@ -470,7 +470,7 @@ winCopyRectangleTo _ _ _
.end
}
winMoveRectangle :: !Rect !Pt !PIC -> PIC
winMoveRectangle :: !OSRect !Pt !PIC -> PIC
winMoveRectangle _ _ _
= code
{
......@@ -479,7 +479,7 @@ winMoveRectangle _ _ _
.end
}
winMoveRectangleTo :: !Rect !Pt !PIC -> PIC
winMoveRectangleTo :: !OSRect !Pt !PIC -> PIC
winMoveRectangleTo _ _ _
= code
{
......@@ -489,7 +489,7 @@ winMoveRectangleTo _ _ _
}
winInvertRectangle :: !Rect !PIC -> PIC
winInvertRectangle :: !OSRect !PIC -> PIC
winInvertRectangle _ _
= code
{
......@@ -498,7 +498,7 @@ winInvertRectangle _ _
.end
}
winEraseRectangle :: !Rect !PIC -> PIC
winEraseRectangle :: !OSRect !PIC -> PIC
winEraseRectangle _ _
= code
{
......@@ -507,7 +507,7 @@ winEraseRectangle _ _
.end
}
winFillRectangle :: !Rect !PIC -> PIC
winFillRectangle :: !OSRect !PIC -> PIC
winFillRectangle _ _
= code
{
......@@ -516,7 +516,7 @@ winFillRectangle _ _
.end
}
winDrawRectangle :: !Rect !PIC -> PIC
winDrawRectangle :: !OSRect !PIC -> PIC
winDrawRectangle _ _
= code
{
......@@ -545,7 +545,7 @@ winDrawString _ _
}
winDrawCCurve :: !Rect !Pt !Pt !RGBcolor !PIC -> PIC
winDrawCCurve :: !OSRect !Pt !Pt !RGBcolor !PIC -> PIC
winDrawCCurve _ _ _ _ _
= code
{
......@@ -572,7 +572,7 @@ winDrawCPoint _ _ _
.end
}
winDrawCurve :: !Rect !Pt !Pt !PIC -> PIC
winDrawCurve :: !OSRect !Pt !Pt !PIC -> PIC
winDrawCurve _ _ _ _
= code
{
......@@ -692,7 +692,7 @@ winSetPenColor _ _
}
winClipPicture :: !Rect !PIC -> PIC
winClipPicture :: !OSRect !PIC -> PIC
winClipPicture _ _
= code
{
......
......@@ -246,7 +246,7 @@ where
# (_,controls,itemHs) = getUpdateControls cPtr (sizeToRect whSize) whItems
= (controls,{wsH & wshHandle=Just {wlsH & wlsHandle={wH & whItems=itemHs}}})
where
getUpdateControls :: !OSWindowPtr !Rect ![WElementHandle .ls .pst] -> (!Bool,![ControlUpdateInfo],![WElementHandle .ls .pst])
getUpdateControls :: !OSWindowPtr !OSRect ![WElementHandle .ls .pst] -> (!Bool,![ControlUpdateInfo],![WElementHandle .ls .pst])
getUpdateControls cPtr clipRect [itemH:itemHs]
# (found,controls,itemH) = getUpdateControl cPtr clipRect itemH
| found
......@@ -255,7 +255,7 @@ where
# (found,controls,itemHs) = getUpdateControls cPtr clipRect itemHs
= (found,controls,[itemH:itemHs])
where
getUpdateControl :: !OSWindowPtr !Rect !(WElementHandle .ls .pst) -> (!Bool,![ControlUpdateInfo],!WElementHandle .ls .pst)
getUpdateControl :: !OSWindowPtr !OSRect !(WElementHandle .ls .pst) -> (!Bool,![ControlUpdateInfo],!WElementHandle .ls .pst)
getUpdateControl cPtr clipRect (WItemHandle itemH=:{wItemPtr,wItemNr,wItemShow,wItemPos,wItemSize,wItems})
| cPtr==wItemPtr
= (True,[{cuItemNr=wItemNr,cuItemPtr=wItemPtr,cuArea=clipRect1}],WItemHandle itemH)
......
......@@ -794,7 +794,7 @@ where
visScrolls = osScrollbarsAreVisible wMetrics domainRect (toTuple whSize) hasScrolls
contentRect = osGetWindowContentRect wMetrics visScrolls (sizeToRect whSize)
getWElementHandlesUpdateInfo :: !OSWindowMetrics !Id !Rect ![WElementHandle .ls .pst] -> (!Bool,UpdateInfo,![WElementHandle .ls .pst])
getWElementHandlesUpdateInfo :: !OSWindowMetrics !Id !OSRect ![WElementHandle .ls .pst] -> (!Bool,UpdateInfo,![WElementHandle .ls .pst])
getWElementHandlesUpdateInfo _ _ _ []
= (False,undef,[])
getWElementHandlesUpdateInfo wMetrics cId clipRect [itemH:itemHs]
......@@ -805,7 +805,7 @@ where
# (found,updInfo,itemHs)= getWElementHandlesUpdateInfo wMetrics cId clipRect itemHs
= (found,updInfo,[itemH:itemHs])
where
getWElementHandleUpdateInfo :: !OSWindowMetrics !Id !Rect !(WElementHandle .ls .pst) -> (!Bool,UpdateInfo,!WElementHandle .ls .pst)
getWElementHandleUpdateInfo :: !OSWindowMetrics !Id !OSRect !(WElementHandle .ls .pst) -> (!Bool,UpdateInfo,!WElementHandle .ls .pst)
getWElementHandleUpdateInfo wMetrics cId clipRect (WItemHandle itemH=:{wItemId,wItemNr,wItemPtr,wItemKind,wItemPos,wItemSize,wItems,wItemInfo})
| isNothing wItemId || cId<>fromJust wItemId
| not (isRecursiveControl wItemKind)
......
......@@ -258,10 +258,10 @@ accPicture drawf picture
:: Region
= { region_shape :: ![RegionShape]
, region_bound :: !Rect
, region_bound :: !OSRect
}
:: RegionShape
= RegionRect !Rect
= RegionRect !OSRect
| RegionPolygon !Point2 ![Vector2]
......@@ -296,7 +296,7 @@ instance toRegion PolygonAt where
shape = closeShape zero polygon_shape
bound = polybound p shape {rleft=x,rtop=y,rright=x,rbottom=y}
polybound :: !Point2 ![Vector2] !Rect -> Rect
polybound :: !Point2 ![Vector2] !OSRect -> OSRect
polybound p [v:vs] {rleft=minx,rtop=miny,rright=maxx,rbottom=maxy}
= polybound p` vs {rleft=minx`,rtop=miny`,rright=maxx`,rbottom=maxy`}
where
......@@ -336,7 +336,7 @@ instance + Region where
</