aboutsummaryrefslogblamecommitdiff
path: root/pictCCall_12.icl
blob: 7ca03e9156bea77e792c52f805b6b5d6fac3ee6d (plain) (tree)



























































                                                                                        
                                                        






                                            
                                                         







                                                        
                                                             






                                                   
                                                           







                                                                                  
                                                             






                                                                             
                                                           






                                                              
                                                            






                                                                                        
                                                            






                                        
                                                       






                                       
                                                      






                                         
                                                      






                                   
                                                    







                                                                                     
                                                                   







                                                            
                                                         






                                                                                
                                                                  

                     
                                                                   

                                        
                                                       






                                         
                                                       






                                        
                                                      






                                       
                                                     






                                       
                                                     































































                                                                  
                                                             






                                               
                                                            






                                              
                                                           






                                              
                                                           







                                          
                                                         






                                         
                                                        






                                        
                                                       






                                        
                                                       







                                       
                                                        






                                      
                                                       






                                     
                                                      






                                     
                                                      







                                                           
                                                                    






                                                          
                                                                   






                                                         
                                                                  






                                                         
                                                                  







                                                         
                                                                   






                                                          
                                                                    






                                              
                                                             






                                                
                                                               






                                              
                                                             






                                                
                                                               







                                            
                                                             






                                           
                                                            






                                          
                                                           






                                          
                                                           







                                    
                                                   






                                        
                                                     







                                                         
                                                               






                                                
                                                          






                                             
                                                         






                                              
                                                           






                                     
                                                      






                                     
                                                     







                                   
                                                   






                                     
                                                     






                                   
                                                   






                                     
                                                     






                                                     
                                                     







                                      
                                                     






                                      
                                                     






                                   
                                                  






                                           
                                                         






                                          
                                                        







                                        
                                                         







                                                  
                                                         







                                                                  
                                                            







                                                                      
                                                            






                                                  
                                                     

                     
                               
                 

                               
                                         
             




                                                                         
                                                                    
                     
implementation module pictCCall_12


from	ostypes	import :: OSRect{..}, :: HDC
import	rgnCCall_12


::	*PIC
	:== (	!HDC
		,	!*OSToolbox
		)
::	Pt
	:== (	!Int
		,	!Int
		)
::	RGBcolor
	:==	(	!Int
		,	!Int
		,	!Int
		)
::	Fnt
	:== (	!{#Char}
		,	!Int
		,	!Int
		)



iWhitePattern		:== 4
iLtGreyPattern		:== 3
iGreyPattern		:== 2
iDkGreyPattern		:== 1
iBlackPattern		:== 0

iModeNotBic			:== 7
iModeNotXor			:== 6
iModeNotOr			:== 5
iModeNotCopy		:== 4
iModeBic			:== 3
iModeXor			:== 2
iModeOr				:== 1
iModeCopy			:== 0

iStrikeOut			:== 8
iUnderline			:== 4
iItalic				:== 2
iBold				:== 1

//	PA: constants for drawing polygons.
ALTERNATE			:== 1
WINDING				:== 2
//	PA: end of addition.


//	PA: win(Create/Destroy)ScreenHDC added to temporarily create a HDC of a screen.
//		Never use these values for a window or control.
winCreateScreenHDC :: !*OSToolbox -> PIC
winCreateScreenHDC _
	= code
	{
		.inline WinCreateScreenHDC
			ccall WinCreateScreenHDC "I-pI"
		.end
	}

winDestroyScreenHDC :: !PIC -> *OSToolbox
winDestroyScreenHDC _
	= code
	{
		.inline WinDestroyScreenHDC
			ccall WinDestroyScreenHDC "pI-I"
		.end
	}

// MW: this is never used in the object IO
winGetPicStringWidth ::  !{#Char} !PIC -> ( !Int, !PIC)
winGetPicStringWidth _ _
	= code
	{
		.inline WinGetPicStringWidth
			ccall WinGetPicStringWidth "SpI-IpI"
		.end
	}

winGetPicCharWidth ::  !Char !PIC -> ( !Int, !PIC)
winGetPicCharWidth _ _
	= code
	{
		.inline WinGetPicCharWidth
			ccall WinGetPicCharWidth "IpI-IpI"
		.end
	}
// END MW

winGetStringWidth ::  !{#Char} !Fnt !Int !HDC !*OSToolbox -> ( !Int, !*OSToolbox)
winGetStringWidth _ _ _ _ _
	= code
	{
		.inline WinGetStringWidth
			ccall WinGetStringWidth "SSIIIpI-II"
		.end
	}

winGetCharWidth ::  !Char !Fnt !Int !HDC !*OSToolbox -> ( !Int, !*OSToolbox)
winGetCharWidth _ _ _ _ _
	= code
	{
		.inline WinGetCharWidth
			ccall WinGetCharWidth "ISIIIpI-II"
		.end
	}

winGetPicFontInfo ::  !PIC -> ( !Int, !Int, !Int, !Int, !PIC)
winGetPicFontInfo _
	= code
	{
		.inline WinGetPicFontInfo
			ccall WinGetPicFontInfo "pI-IIIIpI"
		.end
	}

winGetFontInfo ::  !Fnt !Int !HDC !*OSToolbox -> ( !Int, !Int, !Int, !Int, !*OSToolbox)
winGetFontInfo _ _ _ _
	= code
	{
		.inline WinGetFontInfo
			ccall WinGetFontInfo "SIIIpI-IIIII"
		.end
	}

winSetFontStyle ::  !Int !PIC ->  PIC
winSetFontStyle _ _
	= code
	{
		.inline WinSetFontStyle
			ccall WinSetFontStyle "IpI-pI"
		.end
	}

winSetFontSize ::  !Int !PIC ->  PIC
winSetFontSize _ _
	= code
	{
		.inline WinSetFontSize
			ccall WinSetFontSize "IpI-pI"
		.end
	}

winSetFontName ::  !{#Char} !PIC ->  PIC
winSetFontName _ _
	= code
	{
		.inline WinSetFontName
			ccall WinSetFontName "SpI-pI"
		.end
	}

winSetFont ::  !Fnt !PIC ->  PIC
winSetFont _ _
	= code
	{
		.inline WinSetFont
			ccall WinSetFont "SIIpI-pI"
		.end
	}


winPrintResizedBitmap :: !(!Int,!Int) !(!Int,!Int) !(!Int,!Int) !{#Char} !PIC -> PIC
winPrintResizedBitmap _ _ _ _ _
	= code
	{
		.inline WinPrintResizedBitmap
			ccall WinPrintResizedBitmap "IIIIIISpI-pI"
		.end
	}

//	PA: Routines to DRAW bitmaps.
winDrawBitmap :: !(!Int,!Int) !(!Int,!Int) !Int !PIC -> PIC
winDrawBitmap _ _ _ _
	= code
	{
		.inline WinDrawBitmap
			ccall WinDrawBitmap "IIIIIpI-pI"
		.end
	}

winDrawResizedBitmap :: !(!Int,!Int) !(!Int,!Int) !(!Int,!Int) !Int !PIC -> PIC
winDrawResizedBitmap _ _ _ _ _
	= code
	{
		.inline WinDrawResizedBitmap
			ccall WinDrawResizedBitmap "IIIIIIIpI-pI"
		.end
	}

winCreateBitmap :: !{#Char} !HDC !*OSToolbox -> (!Int,!*OSToolbox)
winCreateBitmap _ _ _
	= code
	{
		.inline WinCreateBitmap
			ccall WinCreateBitmap "Spp-pI"
		.end
	}

winInvertPolygon ::  !PIC ->  PIC
winInvertPolygon _
	= code
	{
		.inline WinInvertPolygon
			ccall WinInvertPolygon "pI-pI"
		.end
	}

winErasePolygon ::  !PIC ->  PIC
winErasePolygon _
	= code
	{
		.inline WinErasePolygon
			ccall WinErasePolygon "pI-pI"
		.end
	}

winFillPolygon ::  !PIC ->  PIC
winFillPolygon _
	= code
	{
		.inline WinFillPolygon
			ccall WinFillPolygon "pI-pI"
		.end
	}

winDrawPolygon ::  !PIC ->  PIC
winDrawPolygon _
	= code
	{
		.inline WinDrawPolygon
			ccall WinDrawPolygon "pI-pI"
		.end
	}

winAddPolygonPoint ::  !Pt !*OSToolbox ->  *OSToolbox
winAddPolygonPoint _ _
	= code
	{
		.inline WinAddPolygonPoint
			ccall WinAddPolygonPoint "III-I"
		.end
	}

winStartPolygon ::  !Int !*OSToolbox ->  *OSToolbox
winStartPolygon _ _
	= code
	{
		.inline WinStartPolygon
			ccall WinStartPolygon "II-I"
		.end
	}

winEndPolygon :: !*OSToolbox -> *OSToolbox
winEndPolygon _
	= code
	{	
		.inline WinEndPolygon
			ccall WinEndPolygon "I-I"
		.end
	}

/*	Operations to create, modify, and destroy polygon shapes.
*/
winAllocPolyShape :: !Int !*OSToolbox -> (!Int,!*OSToolbox)
winAllocPolyShape _ _
	= code
	{	
		.inline WinAllocPolyShape
			ccall WinAllocPolyShape "II-II"
		.end
	}

winSetPolyPoint :: !Int !Int !Int !Int !*OSToolbox -> *OSToolbox
winSetPolyPoint _ _ _ _ _
	= code
	{	
		.inline WinSetPolyPoint
			ccall WinSetPolyPoint "IIIII-I"
		.end
	}

winFreePolyShape :: !Int !*OSToolbox -> *OSToolbox
winFreePolyShape _ _
	= code
	{	
		.inline WinFreePolyShape
			ccall WinFreePolyShape "II-I"
		.end
	}


winInvertWedge ::  !OSRect !Pt !Pt !PIC ->  PIC
winInvertWedge _ _ _ _
	= code
	{
		.inline WinInvertWedge
			ccall WinInvertWedge "IIIIIIIIpI-pI"
		.end
	}

winEraseWedge ::  !OSRect !Pt !Pt !PIC ->  PIC
winEraseWedge _ _ _ _
	= code
	{
		.inline WinEraseWedge
			ccall WinEraseWedge "IIIIIIIIpI-pI"
		.end
	}

winFillWedge ::  !OSRect !Pt !Pt !PIC ->  PIC
winFillWedge _ _ _ _
	= code
	{
		.inline WinFillWedge
			ccall WinFillWedge "IIIIIIIIpI-pI"
		.end
	}

winDrawWedge ::  !OSRect !Pt !Pt !PIC ->  PIC
winDrawWedge _ _ _ _
	= code
	{
		.inline WinDrawWedge
			ccall WinDrawWedge "IIIIIIIIpI-pI"
		.end
	}


winInvertCircle ::  !Pt !Int !PIC ->  PIC
winInvertCircle _ _ _
	= code
	{
		.inline WinInvertCircle
			ccall WinInvertCircle "IIIpI-pI"
		.end
	}

winEraseCircle ::  !Pt !Int !PIC ->  PIC
winEraseCircle _ _ _
	= code
	{
		.inline WinEraseCircle
			ccall WinEraseCircle "IIIpI-pI"
		.end
	}

winFillCircle ::  !Pt !Int !PIC ->  PIC
winFillCircle _ _ _
	= code
	{
		.inline WinFillCircle
			ccall WinFillCircle "IIIpI-pI"
		.end
	}

winDrawCircle ::  !Pt !Int !PIC ->  PIC
winDrawCircle _ _ _
	= code
	{
		.inline WinDrawCircle
			ccall WinDrawCircle "IIIpI-pI"
		.end
	}


winInvertOval ::  !OSRect !PIC ->  PIC
winInvertOval _ _
	= code
	{
		.inline WinInvertOval
			ccall WinInvertOval "IIIIpI-pI"
		.end
	}

winEraseOval ::  !OSRect !PIC ->  PIC
winEraseOval _ _
	= code
	{
		.inline WinEraseOval
			ccall WinEraseOval "IIIIpI-pI"
		.end
	}

winFillOval ::  !OSRect !PIC ->  PIC
winFillOval _ _
	= code
	{
		.inline WinFillOval
			ccall WinFillOval "IIIIpI-pI"
		.end
	}

winDrawOval ::  !OSRect !PIC ->  PIC
winDrawOval _ _
	= code
	{
		.inline WinDrawOval
			ccall WinDrawOval "IIIIpI-pI"
		.end
	}


winInvertRoundRectangle ::  !OSRect !Int !Int !PIC ->  PIC
winInvertRoundRectangle _ _ _ _
	= code
	{
		.inline WinInvertRoundRectangle
			ccall WinInvertRoundRectangle "IIIIIIpI-pI"
		.end
	}

winEraseRoundRectangle ::  !OSRect !Int !Int !PIC ->  PIC
winEraseRoundRectangle _ _ _ _
	= code
	{
		.inline WinEraseRoundRectangle
			ccall WinEraseRoundRectangle "IIIIIIpI-pI"
		.end
	}

winFillRoundRectangle ::  !OSRect !Int !Int !PIC ->  PIC
winFillRoundRectangle _ _ _ _
	= code
	{
		.inline WinFillRoundRectangle
			ccall WinFillRoundRectangle "IIIIIIpI-pI"
		.end
	}

winDrawRoundRectangle ::  !OSRect !Int !Int !PIC ->  PIC
winDrawRoundRectangle _ _ _ _
	= code
	{
		.inline WinDrawRoundRectangle
			ccall WinDrawRoundRectangle "IIIIIIpI-pI"
		.end
	}


winScrollRectangle :: !OSRect !Pt !PIC -> (!OSRect,!PIC)
winScrollRectangle _ _ _
	= code
	{
		.inline WinScrollRectangle
			ccall WinScrollRectangle "IIIIIIpI-IIIIpI"
		.end
	}

winScrollRectangle2 :: !OSRect !Pt !PIC -> (!OSRect,!PIC)
winScrollRectangle2 _ _ _
	= code
	{
		.inline WinScrollRectangle2
			ccall WinScrollRectangle2 "IIIIIIpI-IIIIpI"
		.end
	}

winCopyRectangle ::  !OSRect !Pt !PIC ->  PIC
winCopyRectangle _ _ _
	= code
	{
		.inline WinCopyRectangle
			ccall WinCopyRectangle "IIIIIIpI-pI"
		.end
	}

winCopyRectangleTo ::  !OSRect !Pt !PIC ->  PIC
winCopyRectangleTo _ _ _
	= code
	{
		.inline WinCopyRectangleTo
			ccall WinCopyRectangleTo "IIIIIIpI-pI"
		.end
	}

winMoveRectangle ::  !OSRect !Pt !PIC ->  PIC
winMoveRectangle _ _ _
	= code
	{
		.inline WinMoveRectangle
			ccall WinMoveRectangle "IIIIIIpI-pI"
		.end
	}

winMoveRectangleTo ::  !OSRect !Pt !PIC ->  PIC
winMoveRectangleTo _ _ _
	= code
	{
		.inline WinMoveRectangleTo
			ccall WinMoveRectangleTo "IIIIIIpI-pI"
		.end
	}


winInvertRectangle ::  !OSRect !PIC ->  PIC
winInvertRectangle _ _
	= code
	{
		.inline WinInvertRectangle
			ccall WinInvertRectangle "IIIIpI-pI"
		.end
	}

winEraseRectangle ::  !OSRect !PIC ->  PIC
winEraseRectangle _ _
	= code
	{
		.inline WinEraseRectangle
			ccall WinEraseRectangle "IIIIpI-pI"
		.end
	}

winFillRectangle ::  !OSRect !PIC ->  PIC
winFillRectangle _ _
	= code
	{
		.inline WinFillRectangle
			ccall WinFillRectangle "IIIIpI-pI"
		.end
	}

winDrawRectangle ::  !OSRect !PIC ->  PIC
winDrawRectangle _ _
	= code
	{
		.inline WinDrawRectangle
			ccall WinDrawRectangle "IIIIpI-pI"
		.end
	}


winDrawChar ::  !Int !PIC ->  PIC
winDrawChar _ _
	= code
	{
		.inline WinDrawChar
			ccall WinDrawChar "IpI-pI"
		.end
	}

winDrawString ::  !{#Char} !PIC ->  PIC
winDrawString _ _
	= code
	{
		.inline WinDrawString
			ccall WinDrawString "SpI-pI"
		.end
	}


winDrawCCurve ::  !OSRect !Pt !Pt !RGBcolor !PIC ->  PIC
winDrawCCurve _ _ _ _ _
	= code
	{
		.inline WinDrawCCurve
			ccall WinDrawCCurve "IIIIIIIIIIIpI-pI"
		.end
	}

winDrawCLine ::  !Pt !Pt !RGBcolor !PIC ->  PIC
winDrawCLine _ _ _ _
	= code
	{
		.inline WinDrawCLine
			ccall WinDrawCLine "IIIIIIIpI-pI"
		.end
	}

winDrawCPoint ::  !Pt !RGBcolor !PIC ->  PIC
winDrawCPoint _ _ _
	= code
	{
		.inline WinDrawCPoint
			ccall WinDrawCPoint "IIIIIpI-pI"
		.end
	}

winDrawCurve ::  !OSRect !Pt !Pt !PIC ->  PIC
winDrawCurve _ _ _ _
	= code
	{
		.inline WinDrawCurve
			ccall WinDrawCurve "IIIIIIIIpI-pI"
		.end
	}

winDrawLine ::  !Pt !Pt !PIC ->  PIC
winDrawLine _ _ _
	= code
	{
		.inline WinDrawLine
			ccall WinDrawLine "IIIIpI-pI"
		.end
	}

winDrawPoint ::  !Pt !PIC ->  PIC
winDrawPoint _ _
	= code
	{
		.inline WinDrawPoint
			ccall WinDrawPoint "IIpI-pI"
		.end
	}


winLinePen ::  !Pt !PIC ->  PIC
winLinePen _ _
	= code
	{
		.inline WinLinePen
			ccall WinLinePen "IIpI-pI"
		.end
	}

winLinePenTo ::  !Pt !PIC ->  PIC
winLinePenTo _ _
	= code
	{
		.inline WinLinePenTo
			ccall WinLinePenTo "IIpI-pI"
		.end
	}

winMovePen ::  !Pt !PIC ->  PIC
winMovePen _ _
	= code
	{
		.inline WinMovePen
			ccall WinMovePen "IIpI-pI"
		.end
	}

winMovePenTo ::  !Pt !PIC ->  PIC
winMovePenTo _ _
	= code
	{
		.inline WinMovePenTo
			ccall WinMovePenTo "IIpI-pI"
		.end
	}

winGetPenPos :: !PIC -> (!Int,!Int,!HDC,!*OSToolbox)
winGetPenPos _
	= code
	{	
		.inline WinGetPenPos
			ccall WinGetPenPos "pI-IIpI"
		.end
	}


winSetPenSize ::  !Int !PIC ->  PIC
winSetPenSize _ _
	= code
	{
		.inline WinSetPenSize
			ccall WinSetPenSize "IpI-pI"
		.end
	}

winSetPattern ::  !Int !PIC ->  PIC
winSetPattern _ _
	= code
	{
		.inline WinSetPattern
			ccall WinSetPattern "IpI-pI"
		.end
	}

winSetMode ::  !Int !PIC ->  PIC
winSetMode _ _
	= code
	{
		.inline WinSetMode
			ccall WinSetMode "IpI-pI"
		.end
	}

winSetBackColor ::  !RGBcolor !PIC ->  PIC
winSetBackColor _ _
	= code
	{
		.inline WinSetBackColor
			ccall WinSetBackColor "IIIpI-pI"
		.end
	}

winSetPenColor ::  !RGBcolor !PIC ->  PIC
winSetPenColor _ _
	= code
	{
		.inline WinSetPenColor
			ccall WinSetPenColor "IIIpI-pI"
		.end
	}


winClipPicture ::  !OSRect !PIC ->  PIC
winClipPicture _ _
	= code
	{
		.inline WinClipPicture
			ccall WinClipPicture "IIIIpI-pI"
		.end
	}

//	PA: operation to set the clipping region.
winClipRgnPicture :: !HRGN !PIC -> PIC
winClipRgnPicture _ _
	= code
	{	
		.inline WinClipRgnPicture
			ccall WinClipRgnPicture "ppI-pI"
		.end
	}

//	PA+++: new operation to set the complete clipping region.
winSetClipRgnPicture :: !HRGN !PIC -> PIC
winSetClipRgnPicture _ _
	= code
	{
		.inline WinSetClipRgnPicture
			ccall WinSetClipRgnPicture "ppI-pI"
		.end
	}

//	PA+++: new operation to retrieve the current clipping region.
winGetClipRgnPicture :: !PIC -> (!HRGN,!PIC)
winGetClipRgnPicture _
	= code
	{
		.inline WinGetClipRgnPicture
			ccall WinGetClipRgnPicture "pI-ppI"
		.end
	}

winDeleteObject :: !Int !*OSToolbox -> *OSToolbox
winDeleteObject _ _
	= code
	{	
		.inline WinDeleteObject
			ccall WinDeleteObject "pI-I"
		.end
	}

winDonePicture :: !PIC -> !PIC
winDonePicture _
    = code
    {
        .inline WinDonePicture
            ccall WinDonePicture "pI-pI"
        .end
    }

winInitPicture :: !Int !Int !RGBcolor !RGBcolor !Pt !Fnt !Pt !PIC -> PIC
winInitPicture _ _ _ _ _ _ _ _
	= code
	{
		.inline WinInitPicture
			ccall WinInitPicture "IIIIIIIIIISIIIIpI-pI"
		.end
	}