aboutsummaryrefslogtreecommitdiff
path: root/pictCCall_12.icl
blob: dceb7bbf0ede0477b380806f63986e8ab201e960 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
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 "SSIIIII-II"
		.end
	}

winGetCharWidth ::  !Char !Fnt !Int !HDC !*OSToolbox -> ( !Int, !*OSToolbox)
winGetCharWidth _ _ _ _ _
	= code
	{
		.inline WinGetCharWidth
			ccall WinGetCharWidth "ISIIIII-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 "SIIIII-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-IIII"
		.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
	}