Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-libraries
Commits
e734df15
Commit
e734df15
authored
Jan 25, 2000
by
Peter Achten
Browse files
(PA): changed some crosscall routines to C call routines for
efficiency improvement.
parent
c60055c6
Changes
19
Hide whitespace changes
Inline
Side-by-side
libraries/ObjectIO/ObjectIO/OS Windows/Clean System Files/cCrossCall_12.obj
View file @
e734df15
No preview for this file type
libraries/ObjectIO/ObjectIO/OS Windows/Windows_C_12/cCrossCall_12.c
View file @
e734df15
...
...
@@ -413,6 +413,48 @@ WinGetBlinkTime (int ios, int* blinktime, int* oos)
*
oos
=
ios
;
}
/* PA: The following four routines used to be crosscalls. */
extern
EXPORT_TO_CLEAN
int
WinInvalidateWindow
(
int
hwnd
,
int
ios
)
{
InvalidateRect
((
HWND
)
hwnd
,
NULL
,
FALSE
);
return
ios
;
}
extern
EXPORT_TO_CLEAN
int
WinInvalidateRect
(
int
hwnd
,
int
left
,
int
top
,
int
right
,
int
bottom
,
int
ios
)
{
RECT
rect
;
rect
.
left
=
left
;
rect
.
top
=
top
;
rect
.
right
=
right
;
rect
.
bottom
=
bottom
;
InvalidateRect
((
HWND
)
hwnd
,
&
rect
,
FALSE
);
return
ios
;
}
extern
EXPORT_TO_CLEAN
int
WinValidateRect
(
int
hwnd
,
int
left
,
int
top
,
int
right
,
int
bottom
,
int
ios
)
{
RECT
rect
;
rect
.
left
=
left
;
rect
.
top
=
top
;
rect
.
right
=
right
;
rect
.
bottom
=
bottom
;
ValidateRect
((
HWND
)
hwnd
,
&
rect
);
return
ios
;
}
extern
EXPORT_TO_CLEAN
int
WinValidateRgn
(
int
hwnd
,
int
rgn
,
int
ios
)
{
ValidateRgn
((
HWND
)
hwnd
,
(
HRGN
)
rgn
);
return
ios
;
}
/* PA: Up to here. */
static
void
InitGlobals
(
void
)
{
...
...
@@ -4560,47 +4602,6 @@ HandleCleanRequest (CrossCallInfo * pcci)
MakeReturn0Cci
(
pcci
);
}
break
;
case
CcRqINVALIDATEWINDOW
:
/* hwnd; no result. */
{
InvalidateRect
((
HWND
)
pcci
->
p1
,
NULL
,
FALSE
);
MakeReturn0Cci
(
pcci
);
}
break
;
/* Invalidate part of window/control. */
case
CcRqINVALIDATERECT
:
/* hwnd, left,top,right,bottom; no result. */
{
RECT
rect
;
rect
.
left
=
pcci
->
p2
;
rect
.
top
=
pcci
->
p3
;
rect
.
right
=
pcci
->
p4
;
rect
.
bottom
=
pcci
->
p5
;
InvalidateRect
((
HWND
)
pcci
->
p1
,
&
rect
,
FALSE
);
MakeReturn0Cci
(
pcci
);
}
break
;
/* Validate rect part of window/control. */
case
CcRqVALIDATERECT
:
/* hwnd, left,top,right,bottom; no result. */
{
RECT
rect
;
rect
.
left
=
pcci
->
p2
;
rect
.
top
=
pcci
->
p3
;
rect
.
right
=
pcci
->
p4
;
rect
.
bottom
=
pcci
->
p5
;
ValidateRect
((
HWND
)
pcci
->
p1
,
&
rect
);
MakeReturn0Cci
(
pcci
);
}
break
;
/* Validate region part of window/control. */
case
CcRqVALIDATERGN
:
/* hwnd, rgn; no result. */
{
ValidateRgn
((
HWND
)
pcci
->
p1
,
(
HRGN
)
pcci
->
p2
);
MakeReturn0Cci
(
pcci
);
}
break
;
case
CcRqDOMESSAGE
:
// idleTimerOn, sleeptime; no result.
{
MSG
ms
;
...
...
libraries/ObjectIO/ObjectIO/OS Windows/Windows_C_12/intrface_12.h
View file @
e734df15
...
...
@@ -95,6 +95,7 @@
#define CcRqCLIPBOARDHASTEXT 1812
#define CcRqGETCLIPBOARDTEXT 1811
#define CcRqSETCLIPBOARDTEXT 1810
#define CcRqGETCLIPBOARDCOUNT 1809
/* PA: added to retrieve clipboard count. */
#define CcRqDIRECTORYDIALOG 1802
/* PA: added to create directory selector dialog. */
#define CcRqFILESAVEDIALOG 1801
#define CcRqFILEOPENDIALOG 1800
...
...
@@ -139,7 +140,7 @@
#define CcRqSETWINDOWSIZE 1432
/* PA: new identifier for cross-calls */
#define CcRqSETSELECTWINDOW 1431
/* PA: new identifier for cross-calls */
#define CcRqSETWINDOWPOS 1430
/* PA: new identifier for cross-calls */
#define CcRqINVALIDATERECT
1429
/*
PA:
new identifier for cross-calls */
//
#define CcRqINVALIDATERECT 1429 PA:
has become obsolete because implemented as direct C call
#define CcRqSETEDITSELECTION 1428
/* PA: new identifier for cross-calls */
#define CcRqSETSCROLLSIZE 1427
/* PA: new identifier for cross-calls */
#define CcRqSETSCROLLPOS 1426
/* PA: new identifier for cross-calls */
...
...
@@ -155,9 +156,9 @@
#define CcRqUPDATEWINDOWRECT 1412
/* PA: added for updating rect part of a window/control. */
#define CcRqGETWINDOWTEXT 1411
#define CcRqSETWINDOWTITLE 1410
#define CcRqVALIDATERGN
1409
/*
PA:
added for validating region part of a window/control. */
#define CcRqVALIDATERECT 1408
/*
PA:
added for validating rect part of a window/control. */
#define CcRqINVALIDATEWINDOW 1407
//
#define CcRqVALIDATERGN 1409 PA:
has become obsolete because implemented as direct C call
//
#define CcRqVALIDATERECT 1408 PA:
has become obsolete because implemented as direct C call
//
#define CcRqINVALIDATEWINDOW 1407
PA: has become obsolete because implemented as direct C call
//#define CcRqRELEASEDC 1406 PA: has become obsolete because implemented as direct C call
//#define CcRqGETDC 1405 PA: has become obsolete because implemented as direct C call
#define CcRqENDPAINT 1404
...
...
@@ -307,6 +308,13 @@ extern EXPORT_TO_CLEAN void WinGetDate (int,int*,int*,int*,int*,int*);
extern
EXPORT_TO_CLEAN
int
WinWait
(
int
,
int
);
extern
EXPORT_TO_CLEAN
void
WinGetBlinkTime
(
int
,
int
*
,
int
*
);
/* PA: The following four routines used to be crosscalls. */
extern
EXPORT_TO_CLEAN
int
WinInvalidateWindow
(
int
,
int
);
extern
EXPORT_TO_CLEAN
int
WinInvalidateRect
(
int
,
int
,
int
,
int
,
int
,
int
);
extern
EXPORT_TO_CLEAN
int
WinValidateRect
(
int
,
int
,
int
,
int
,
int
,
int
);
extern
EXPORT_TO_CLEAN
int
WinValidateRgn
(
int
,
int
,
int
);
/* PA: Up to here. */
extern
EXPORT_TO_CLEAN
int
WinGetHorzResolution
(
void
);
extern
EXPORT_TO_CLEAN
int
WinGetVertResolution
(
void
);
...
...
libraries/ObjectIO/ObjectIO/OS Windows/clCrossCall_12.dcl
View file @
e734df15
...
...
@@ -148,7 +148,7 @@ CcRqSHOWWINDOW :== 1433 /* PA: added to (hide/show) windows. */
CcRqSETWINDOWSIZE
:==
1432
/* PA: added to resize windows/controls. */
CcRqSETSELECTWINDOW
:==
1431
/* PA: added to (en/dis)able windows. */
CcRqSETWINDOWPOS
:==
1430
/* PA: added to move windows/controls. */
CcRqINVALIDATERECT
:==
1429
/* PA: added for invalidating parts of a window/control. */
CcRqSETEDITSELECTION
:==
1428
/* PA: added for handling edit control selections. */
CcRqSETSCROLLSIZE
:==
1427
/* PA: added for setting thumb size of scrollbar. */
CcRqSETSCROLLPOS
:==
1426
/* PA: added for setting thumb of scrollbar. */
...
...
@@ -166,9 +166,7 @@ CcRqGETCLIENTSIZE :== 1415
CcRqUPDATEWINDOWRECT
:==
1412
/* PA: added for updating rect part of a window/control. */
CcRqGETWINDOWTEXT
:==
1411
CcRqSETWINDOWTITLE
:==
1410
CcRqVALIDATERGN
:==
1409
/* PA: added for validating region part of a window/control. */
CcRqVALIDATERECT
:==
1408
/* PA: added for validating rect part of a window/control. */
CcRqINVALIDATEWINDOW
:==
1407
CcRqENDPAINT
:==
1404
CcRqBEGINPAINT
:==
1403
CcRqDESTROYWINDOW
:==
1402
...
...
libraries/ObjectIO/ObjectIO/OS Windows/clCrossCall_12.icl
View file @
e734df15
...
...
@@ -21,6 +21,7 @@ import code from "cGameLib_12.obj", "cOSGameLib_12.obj", "ddutil.obj", "Dsutil.o
import
code
from
library
"ddraw_library"
import
code
from
library
"dsound_library"
/* ...PA */
//import StdDebug, tracetypes
//----------------------------------------------//
// Crosscall infrastructure //
...
...
@@ -44,6 +45,7 @@ import code from library "dsound_library"
IssueCleanRequest
::
!(
CrossCallInfo
->
.(.
s
->
.(*
OSToolbox
->
*(.
CrossCallInfo
,.
s
,*
OSToolbox
))))
!.
CrossCallInfo
!.
s
!*
OSToolbox
->
(!
CrossCallInfo
,!.
s
,!*
OSToolbox
)
IssueCleanRequest
callback
cci
s
tb
// # tb = trace_n ("IssueCleanRequest :"+++toOSCrossCallInfoString cci) tb
#
(
reply
,
tb
)
=
WinKickOsThread
cci
tb
=
HandleCallBacks
callback
reply
s
tb
where
...
...
@@ -52,10 +54,12 @@ where
HandleCallBacks
callback
cci
=:{
ccMsg
}
s
tb
|
ccMsg
>
2000
=
abort
(
"HandleCallBacks "
+++
toString
ccMsg
)
// # tb = trace_n ("IssueCleanRequest <-- "+++toCleanCrossCallInfoString cci) tb
|
IsReturnOrQuitCci
ccMsg
=
(
cci
,
s
,
tb
)
|
otherwise
#
(
returnCci
,
s
,
tb
)
=
callback
cci
s
tb
// # tb = trace_n ("IssueCleanRequest --> "+++toOSCrossCallInfoString returnCci) tb
#
(
replyCci
,
tb
)
=
WinKickOsThread
returnCci
tb
=
HandleCallBacks
callback
replyCci
s
tb
...
...
@@ -64,6 +68,7 @@ where
IssueCleanRequest2
::
!(
CrossCallInfo
->
.(*
OSToolbox
->
*(.
CrossCallInfo
,*
OSToolbox
)))
!.
CrossCallInfo
!*
OSToolbox
->
(!
CrossCallInfo
,!*
OSToolbox
)
IssueCleanRequest2
callback
cci
tb
// # tb = trace_n ("IssueCleanRequest2 :"+++toOSCrossCallInfoString cci) tb
#
(
reply
,
tb
)
=
WinKickOsThread
cci
tb
=
HandleCallBacks
callback
reply
tb
where
...
...
@@ -72,11 +77,13 @@ where
HandleCallBacks
callback
cci
=:{
ccMsg
}
tb
|
ccMsg
>
2000
=
abort
(
"HandleCallBacks "
+++
toString
ccMsg
)
// # tb = trace_n ("IssueCleanRequest2 <-- "+++toCleanCrossCallInfoString cci) tb
|
IsReturnOrQuitCci
ccMsg
=
(
cci
,
tb
)
#
(
returnCci
,
tb
)
=
callback
cci
tb
#
(
replyCci
,
tb
)
=
WinKickOsThread
returnCci
tb
|
otherwise
#
(
returnCci
,
tb
)
=
callback
cci
tb
// # tb = trace_n ("IssueCleanRequest2 --> "+++toOSCrossCallInfoString returnCci) tb
#
(
replyCci
,
tb
)
=
WinKickOsThread
returnCci
tb
=
HandleCallBacks
callback
replyCci
tb
// PA: macros for returning proper number of arguments within a CrossCallInfo.
...
...
@@ -290,7 +297,7 @@ CcRqSHOWWINDOW :== 1433 /* PA: added to (hide/show) windows. */
CcRqSETWINDOWSIZE
:==
1432
/* PA: added to resize windows/controls. */
CcRqSETSELECTWINDOW
:==
1431
/* PA: added to (en/dis)able windows. */
CcRqSETWINDOWPOS
:==
1430
/* PA: added to move windows/controls. */
CcRqINVALIDATERECT
:==
1429
/* PA: added for invalidating parts of a window/control. */
CcRqSETEDITSELECTION
:==
1428
/* PA: added for handling edit control selections. */
CcRqSETSCROLLSIZE
:==
1427
/* PA: added for setting thumb size of scrollbar. */
CcRqSETSCROLLPOS
:==
1426
/* PA: added for setting thumb of scrollbar. */
...
...
@@ -308,9 +315,7 @@ CcRqGETCLIENTSIZE :== 1415
CcRqUPDATEWINDOWRECT
:==
1412
/* PA: added for updating rect part of a window/control. */
CcRqGETWINDOWTEXT
:==
1411
CcRqSETWINDOWTITLE
:==
1410
CcRqVALIDATERGN
:==
1409
/* PA: added for validating region part of a window/control. */
CcRqVALIDATERECT
:==
1408
/* PA: added for validating rect part of a window/control. */
CcRqINVALIDATEWINDOW
:==
1407
CcRqENDPAINT
:==
1404
CcRqBEGINPAINT
:==
1403
CcRqDESTROYWINDOW
:==
1402
...
...
@@ -420,90 +425,3 @@ CcRETURN0 :== 10
CcRETURNmin
:==
10
CcWASQUIT
:==
1
/* PA: used for debugging purposes.
instance toString CrossCallInfo where
toString {ccMsg,p1,p2,p3,p4,p5,p6}
= toString (ccMsgString ccMsg,p1,p2,p3,p4,p5,p6)
where
ccMsgString CcRqGET_PRINTER_DC = "CcRqGET_PRINTER_DC"
ccMsgString CcRqDISPATCH_MESSAGES_WHILE_PRINTING
= "CcRqDISPATCH_MESSAGES_WHILE_PRINTING"
ccMsgString CcRqENDDOC = "CcRqENDDOC"
ccMsgString CcRqSTARTDOC = "CcRqSTARTDOC"
ccMsgString CcRqDESTROYMDIDOCWINDOW = "CcRqDESTROYMDIDOCWINDOW"
ccMsgString CcRqCREATEMDIDOCWINDOW = "CcRqCREATEMDIDOCWINDOW"
ccMsgString CcRqCREATEMDIWINDOW = "CcRqCREATEMDIWINDOW"
ccMsgString CcRqCREATESDIWINDOW = "CcRqCREATESDIWINDOW"
ccMsgString CcRqCLIPBOARDHASTEXT = "CcRqCLIPBOARDHASTEXT"
ccMsgString CcRqGETCLIPBOARDTEXT = "CcRqGETCLIPBOARDTEXT"
ccMsgString CcRqSETCLIPBOARDTEXT = "CcRqSETCLIPBOARDTEXT"
ccMsgString CcRqDIRECTORYDIALOG = "CcRqDIRECTORYDIALOG"
ccMsgString CcRqFILESAVEDIALOG = "CcRqFILESAVEDIALOG"
ccMsgString CcRqFILEOPENDIALOG = "CcRqFILEOPENDIALOG"
ccMsgString CcRqSHOWCONTROL = "CcRqSHOWCONTROL"
ccMsgString CcRqSELECTPOPUPITEM = "CcRqSELECTPOPUPITEM"
ccMsgString CcRqENABLEPOPUPITEM = "CcRqENABLEPOPUPITEM"
ccMsgString CcRqADDTOPOPUP = "CcRqADDTOPOPUP"
ccMsgString CcRqSETITEMCHECK = "CcRqSETITEMCHECK"
ccMsgString CcRqENABLECONTROL = "CcRqENABLECONTROL"
ccMsgString CcRqCREATECOMPOUND = "CcRqCREATECOMPOUND"
ccMsgString CcRqCREATESCROLLBAR = "CcRqCREATESCROLLBAR"
ccMsgString CcRqCREATECUSTOM = "CcRqCREATECUSTOM"
ccMsgString CcRqCREATEICONBUT = "CcRqCREATEICONBUT"
ccMsgString CcRqCREATEPOPUP = "CcRqCREATEPOPUP"
ccMsgString CcRqCREATECHECKBOX = "CcRqCREATECHECKBOX"
ccMsgString CcRqCREATERADIOBUT = "CcRqCREATERADIOBUT"
ccMsgString CcRqCREATEEDITTXT = "CcRqCREATEEDITTXT"
ccMsgString CcRqCREATESTATICTXT = "CcRqCREATESTATICTXT"
ccMsgString CcRqCREATEBUTTON = "CcRqCREATEBUTTON"
ccMsgString CcRqCREATEDIALOG = "CcRqCREATEDIALOG"
ccMsgString CcRqGETFONTSIZES = "CcRqGETFONTSIZES"
ccMsgString CcRqGETFONTNAMES = "CcRqGETFONTNAMES"
ccMsgString CcRqSETCLIENTSIZE = "CcRqSETCLIENTSIZE"
ccMsgString CcRqDELCONTROLTIP = "CcRqDELCONTROLTIP"
ccMsgString CcRqADDCONTROLTIP = "CcRqADDCONTROLTIP"
ccMsgString CcRqGETWINDOWSIZE = "CcRqGETWINDOWSIZE"
ccMsgString CcRqRESTACKWINDOW = "CcRqRESTACKWINDOW"
ccMsgString CcRqSHOWWINDOW = "CcRqSHOWWINDOW"
ccMsgString CcRqSETWINDOWSIZE = "CcRqSETWINDOWSIZE"
ccMsgString CcRqSETSELECTWINDOW = "CcRqSETSELECTWINDOW"
ccMsgString CcRqSETWINDOWPOS = "CcRqSETWINDOWPOS"
ccMsgString CcRqINVALIDATERECT = "CcRqINVALIDATERECT"
ccMsgString CcRqSETEDITSELECTION = "CcRqSETEDITSELECTION"
ccMsgString CcRqSETSCROLLSIZE = "CcRqSETSCROLLSIZE"
ccMsgString CcRqSETSCROLLPOS = "CcRqSETSCROLLPOS"
ccMsgString CcRqSETSCROLLRANGE = "CcRqSETSCROLLRANGE"
ccMsgString CcRqRESETCURSOR = "CcRqRESETCURSOR"
ccMsgString CcRqSETGLOBALCURSOR = "CcRqSETGLOBALCURSOR"
ccMsgString CcRqOBSCURECURSOR = "CcRqOBSCURECURSOR"
ccMsgString CcRqCHANGEWINDOWCURSOR = "CcRqCHANGEWINDOWCURSOR"
ccMsgString CcRqGETWINDOWPOS = "CcRqGETWINDOWPOS"
ccMsgString CcRqGETCLIENTSIZE = "CcRqGETCLIENTSIZE"
ccMsgString CcRqGETWINDOWTEXT = "CcRqGETWINDOWTEXT"
ccMsgString CcRqSETWINDOWTITLE = "CcRqSETWINDOWTITLE"
ccMsgString CcRqVALIDATERGN = "CcRqVALIDATERGN"
ccMsgString CcRqVALIDATERECT = "CcRqVALIDATERECT"
ccMsgString CcRqINVALIDATEWINDOW = "CcRqINVALIDATEWINDOW"
ccMsgString CcRqENDPAINT = "CcRqENDPAINT"
ccMsgString CcRqBEGINPAINT = "CcRqBEGINPAINT"
ccMsgString CcRqDESTROYWINDOW = "CcRqDESTROYWINDOW"
ccMsgString CcRqDRAWMBAR = "CcRqDRAWMBAR"
ccMsgString CcRqCREATEPOPMENU = "CcRqCREATEPOPMENU"
ccMsgString CcRqINSERTSEPARATOR = "CcRqINSERTSEPARATOR"
ccMsgString CcRqMENUENABLE = "CcRqMENUENABLE"
ccMsgString CcRqMODIFYMENU = "CcRqMODIFYMENU"
ccMsgString CcRqINSERTMENU = "CcRqINSERTMENU"
ccMsgString CcRqITEMENABLE = "CcRqITEMENABLE"
ccMsgString CcRqREMOVEMENUSHORTKEY = "CcRqREMOVEMENUSHORTKEY"
ccMsgString CcRqADDMENUSHORTKEY = "CcRqADDMENUSHORTKEY"
ccMsgString CcRqMODIFYMENUITEM = "CcRqMODIFYMENUITEM"
ccMsgString CcRqDESTROYMENU = "CcRqDESTROYMENU"
ccMsgString CcRqDELETEMENU = "CcRqDELETEMENU"
ccMsgString CcRqREMOVEMENUITEM = "CcRqREMOVEMENUITEM"
ccMsgString CcRqCHECKMENUITEM = "CcRqCHECKMENUITEM"
ccMsgString CcRqINSERTMENUITEM = "CcRqINSERTMENUITEM"
ccMsgString CcRqDOMESSAGE = "CcRqDOMESSAGE"
ccMsgString msg = "(Other message: "+++toString msg+++")"
*/
libraries/ObjectIO/ObjectIO/OS Windows/ostoolbar.icl
View file @
e734df15
...
...
@@ -9,7 +9,7 @@ import StdMisc, StdTuple
from
osbitmap
import
OSBitmap
,
OSgetBitmapSize
,
OSgetBitmapContent
from
ostypes
import
HWND
,
OSWindowPtr
,
OSNoWindowPtr
from
pictCCall_12
import
WinCreateBitmap
import
clCrossCall_12
,
windowC
ross
Call_12
import
clCrossCall_12
,
windowCCall_12
::
OSToolbar
...
...
libraries/ObjectIO/ObjectIO/OS Windows/oswindow.icl
View file @
e734df15
...
...
@@ -5,7 +5,7 @@ implementation module oswindow
import
StdBool
,
StdInt
,
StdReal
,
StdClass
,
StdOverloaded
,
StdList
,
StdMisc
,
StdTuple
import
clCrossCall_12
,
clCCall_12
,
windowCrossCall_12
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
,
HdTl
...
...
libraries/ObjectIO/ObjectIO/OS Windows/windowCCall_12.dcl
0 → 100644
View file @
e734df15
definition
module
windowCCall_12
from
ostoolbox
import
OSToolbox
from
ostypes
import
HWND
from
rgnCCall_12
import
HRGN
from
pictCCall_12
import
HDC
WinInvalidateWindow
::
!
HWND
!*
OSToolbox
->
*
OSToolbox
WinInvalidateRect
::
!
HWND
!(!
Int
,!
Int
,!
Int
,!
Int
)
!*
OSToolbox
->
*
OSToolbox
WinValidateRect
::
!
HWND
!(!
Int
,!
Int
,!
Int
,!
Int
)
!*
OSToolbox
->
*
OSToolbox
WinValidateRgn
::
!
HWND
!
HRGN
!*
OSToolbox
->
*
OSToolbox
WinGetDC
::
!
HWND
!*
OSToolbox
->
(!
HDC
,!*
OSToolbox
)
WinReleaseDC
::
!
HWND
!(!
HDC
,!*
OSToolbox
)
->
*
OSToolbox
libraries/ObjectIO/ObjectIO/OS Windows/windowCCall_12.icl
0 → 100644
View file @
e734df15
implementation
module
windowCCall_12
from
ostoolbox
import
OSToolbox
from
ostypes
import
HWND
from
rgnCCall_12
import
HRGN
from
pictCCall_12
import
HDC
WinInvalidateWindow
::
!
HWND
!*
OSToolbox
->
*
OSToolbox
WinInvalidateWindow
_
_
=
code
{
.inline
WinInvalidateWindow
ccall
WinInvalidateWindow
"II-I"
.end
}
WinInvalidateRect
::
!
HWND
!(!
Int
,!
Int
,!
Int
,!
Int
)
!*
OSToolbox
->
*
OSToolbox
WinInvalidateRect
hwnd
(
left
,
top
,
right
,
bottom
)
tb
=
code
{
.inline
WinInvalidateRect
ccall
WinInvalidateRect
"IIIIII-I"
.end
}
WinValidateRect
::
!
HWND
!(!
Int
,!
Int
,!
Int
,!
Int
)
!*
OSToolbox
->
*
OSToolbox
WinValidateRect
hwnd
(
left
,
top
,
right
,
bottom
)
tb
=
code
{
.inline
WinValidateRect
ccall
WinValidateRect
"IIIIII-I"
.end
}
WinValidateRgn
::
!
HWND
!
HRGN
!*
OSToolbox
->
*
OSToolbox
WinValidateRgn
hwnd
rgn
tb
=
code
{
.inline
WinValidateRgn
ccall
WinValidateRgn
"III-I"
.end
}
WinGetDC
::
!
HWND
!*
OSToolbox
->
(!
HDC
,!*
OSToolbox
)
WinGetDC
_
_
=
code
{
.inline
WinGetDC
ccall
WinGetDC
"II-II"
.end
}
WinReleaseDC
::
!
HWND
!(!
HDC
,!*
OSToolbox
)
->
*
OSToolbox
WinReleaseDC
hwnd
(
hdc
,
tb
)
=
code
{
.inline
WinReleaseDC
ccall
WinReleaseDC
"III-I"
.end
}
libraries/ObjectIO/ObjectIO/OS Windows/windowCrossCall_12.dcl
View file @
e734df15
...
...
@@ -89,20 +89,12 @@ WinSetWindowCursor :: !HWND !Int !*OSToolbox -> *OSToolbox
WinObscureCursor
::
!*
OSToolbox
->
*
OSToolbox
WinSetWindowTitle
::
!
HWND
!
String
!*
OSToolbox
->
*
OSToolbox
WinGetWindowText
::
!
HWND
!*
OSToolbox
->
(!
String
,
!*
OSToolbox
)
WinInvalidateWindow
::
!
HWND
!*
OSToolbox
->
*
OSToolbox
// PA: new function to invalidate portion of window/control:
WinInvalidateRect
::
!
HWND
!(!
Int
,!
Int
,!
Int
,!
Int
)
!*
OSToolbox
->
*
OSToolbox
// PA: two new functions to validate parts of a window, using a Rect and a Rgn argument.
WinValidateRect
::
!
HWND
!(!
Int
,!
Int
,!
Int
,!
Int
)
!*
OSToolbox
->
*
OSToolbox
WinValidateRgn
::
!
HWND
!
HRGN
!*
OSToolbox
->
*
OSToolbox
// PA: new function to update part of a window.
WinUpdateWindowRect
::
!
HWND
!(!
Int
,!
Int
,!
Int
,!
Int
)
!*
OSToolbox
->
*
OSToolbox
// PA: new function to (en/dis)able windows.
WinSetSelectStateWindow
::
!
HWND
!(!
Bool
,!
Bool
)
!
Bool
!
Bool
!*
OSToolbox
->
*
OSToolbox
WinBeginPaint
::
!
HWND
!*
OSToolbox
->
(!
HDC
,
!*
OSToolbox
)
WinEndPaint
::
!
HWND
!(!
HDC
,
!*
OSToolbox
)
->
*
OSToolbox
WinGetDC
::
!
HWND
!*
OSToolbox
->
(!
HDC
,
!*
OSToolbox
)
WinReleaseDC
::
!
HWND
!(!
HDC
,
!*
OSToolbox
)
->
*
OSToolbox
WinGetClientSize
::
!
HWND
!*
OSToolbox
->
(!(!
Int
,!
Int
),
!*
OSToolbox
)
WinGetWindowSize
::
!
HWND
!*
OSToolbox
->
(!(!
Int
,!
Int
),
!*
OSToolbox
)
// PA: added; returns bounding size of window
WinSetClientSize
::
!
HWND
!(!
Int
,!
Int
)
!*
OSToolbox
->
*
OSToolbox
// PA: added
...
...
libraries/ObjectIO/ObjectIO/OS Windows/windowCrossCall_12.icl
View file @
e734df15
...
...
@@ -109,6 +109,7 @@ WinGetWindowText hwnd tb
other
->
abort
"[WinGetWindowText] expected CcRETURN1 value."
=
(
text
,
tb
)
/* PA: the following four functions are now implemented as C-calls.
WinInvalidateWindow :: !HWND !*OSToolbox -> *OSToolbox
WinInvalidateWindow hwnd tb
= snd (IssueCleanRequest2 (ErrorCallback2 "WinInvalidateWindow") (Rq1Cci CcRqINVALIDATEWINDOW hwnd) tb)
...
...
@@ -124,6 +125,7 @@ WinValidateRect hwnd (left,top, right,bottom) tb
WinValidateRgn :: !HWND !HRGN !*OSToolbox -> *OSToolbox
WinValidateRgn hwnd rgn tb
= snd (IssueCleanRequest2 (ErrorCallback2 "ValidateRgn") (Rq2Cci CcRqVALIDATERGN hwnd rgn) tb)
*/
WinUpdateWindowRect
::
!
HWND
!(!
Int
,!
Int
,!
Int
,!
Int
)
!*
OSToolbox
->
*
OSToolbox
WinUpdateWindowRect
hwnd
(
left
,
top
,
right
,
bottom
)
tb
...
...
@@ -147,24 +149,6 @@ WinEndPaint :: !HWND !(!HDC, !*OSToolbox) -> *OSToolbox
WinEndPaint
hwnd
(
hdc
,
tb
)
=
snd
(
IssueCleanRequest2
(
ErrorCallback2
"EndPaint"
)
(
Rq2Cci
CcRqENDPAINT
hwnd
hdc
)
tb
)
WinGetDC
::
!
HWND
!*
OSToolbox
->
(!
HDC
,!*
OSToolbox
)
WinGetDC
_
_
=
code
{
.inline
WinGetDC
ccall
WinGetDC
"II-II"
.end
}
WinReleaseDC
::
!
HWND
!(!
HDC
,!*
OSToolbox
)
->
*
OSToolbox
WinReleaseDC
hwnd
(
hdc
,
tb
)
=
code
{
.inline
WinReleaseDC
ccall
WinReleaseDC
"III-I"
.end
}
WinGetClientSize
::
!
HWND
!*
OSToolbox
->
(!(!
Int
,!
Int
),
!*
OSToolbox
)
WinGetClientSize
hwnd
tb
#
(
rcci
,
tb
)
=
IssueCleanRequest2
(
ErrorCallback2
"WinGetClientSize"
)
(
Rq1Cci
CcRqGETCLIENTSIZE
hwnd
)
tb
...
...
libraries/ObjectIO/ObjectIO/StdControlAttribute.dcl
View file @
e734df15
...
...
@@ -44,7 +44,7 @@ isValidCheckControlAttribute :: !(ControlAttribute .st) -> Bool
isValidCompoundControlAttribute
::
!(
ControlAttribute
.
st
)
->
Bool
/* CompoundControl (y = valid, . = invalid)
ControlActivate y | ControlKeyboard y | ControlPos y
ControlActivate y | ControlKeyboard y | ControlPos y
|
ControlDeactivate y | ControlLook y | ControlResize y |
ControlFunction . | ControlMinimumSize y | ControlSelectState y |
ControlHide y | ControlModsFunction . | ControlTip y |
...
...
@@ -70,12 +70,12 @@ isValidCustomButtonControlAttribute :: !(ControlAttribute .st) -> Bool
isValidCustomControlAttribute
::
!(
ControlAttribute
.
st
)
->
Bool
/* CustomControl (y = valid, . = invalid)
ControlActivate y | ControlKeyboard
.
| ControlPos y |
ControlActivate y | ControlKeyboard
y
| ControlPos y |
ControlDeactivate y | ControlLook . | ControlResize y |
ControlFunction . | ControlMinimumSize y | ControlSelectState y |
ControlHide y | ControlModsFunction . | ControlTip y |
ControlHMargin . | ControlMouse y | ControlViewDomain . |
ControlHScroll . | ControlOrigin
y
| ControlViewSize . |
ControlHScroll . | ControlOrigin
.
| ControlViewSize . |
ControlId y | ControlOuterSize . | ControlVMargin . |
ControlItemSpace . | ControlPen y | ControlVScroll . |
| ControlWidth . |
...
...
libraries/ObjectIO/ObjectIO/StdControlAttribute.icl
View file @
e734df15
...
...
@@ -13,21 +13,21 @@ import StdControlDef
isValidButtonControlAttribute
::
!(
ControlAttribute
.
st
)
->
Bool
isValidButtonControlAttribute
(
ControlFunction
_)
=
True
isValidButtonControlAttribute
ControlHide
=
True
isValidButtonControlAttribute
(
ControlId
_)
=
True
isValidButtonControlAttribute
(
ControlModsFunction
_)
=
True
isValidButtonControlAttribute
(
ControlPos
_)
=
True
isValidButtonControlAttribute
(
ControlSelectState
_)
=
True
isValidButtonControlAttribute
ControlHide
=
True
isValidButtonControlAttribute
(
ControlFunction
_)
=
True
isValidButtonControlAttribute
(
ControlModsFunction
_)
=
True
isValidButtonControlAttribute
(
ControlTip
_)
=
True
isValidButtonControlAttribute
(
ControlWidth
_)
=
True
isValidButtonControlAttribute
_
=
False
isValidCheckControlAttribute
::
!(
ControlAttribute
.
st
)
->
Bool
isValidCheckControlAttribute
ControlHide
=
True
isValidCheckControlAttribute
(
ControlId
_)
=
True
isValidCheckControlAttribute
(
ControlPos
_)
=
True
isValidCheckControlAttribute
(
ControlSelectState
_)
=
True
isValidCheckControlAttribute
ControlHide
=
True
isValidCheckControlAttribute
(
ControlTip
_)
=
True
isValidCheckControlAttribute
_
=
False
...
...
@@ -37,43 +37,43 @@ isValidCompoundControlAttribute (ControlModsFunction _) = False
isValidCompoundControlAttribute
_
=
True
isValidCustomButtonControlAttribute
::
!(
ControlAttribute
.
st
)
->
Bool
isValidCustomButtonControlAttribute
(
ControlFunction
_)
=
True
isValidCustomButtonControlAttribute
ControlHide
=
True
isValidCustomButtonControlAttribute
(
ControlId
_)
=
True
isValidCustomButtonControlAttribute
(
ControlMinimumSize
_)
=
True
isValidCustomButtonControlAttribute
(
ControlModsFunction
_)
=
True
isValidCustomButtonControlAttribute
(
ControlPen
_)
=
True
isValidCustomButtonControlAttribute
(
ControlPos
_)
=
True
isValidCustomButtonControlAttribute
(
ControlMinimumSize
_)
=
True
isValidCustomButtonControlAttribute
(
ControlResize
_)
=
True
isValidCustomButtonControlAttribute
(
ControlSelectState
_)
=
True
isValidCustomButtonControlAttribute
ControlHide
=
True
isValidCustomButtonControlAttribute
(
ControlFunction
_)
=
True
isValidCustomButtonControlAttribute
(
ControlModsFunction
_)
=
True
isValidCustomButtonControlAttribute
(
ControlTip
_)
=
True
isValidCustomButtonControlAttribute
_
=
False
isValidCustomControlAttribute
::
!(
ControlAttribute
.
st
)
->
Bool
isValidCustomControlAttribute
(
ControlActivate
_)
=
True
isValidCustomControlAttribute
(
ControlDeactivate
_)
=
True
isValidCustomControlAttribute
ControlHide
=
True
isValidCustomControlAttribute
(
ControlId
_)
=
True
isValidCustomControlAttribute
(
ControlKeyboard
_
_
_)
=
True
isValidCustomControlAttribute
(
ControlMinimumSize
_)
=
True
isValidCustomControlAttribute
(
ControlMouse
_
_
_)
=
True
isValidCustomControlAttribute
(
ControlPen
_)
=
True
isValidCustomControlAttribute
(
ControlPos
_)
=
True
isValidCustomControlAttribute
(
ControlMinimumSize
_)
=
True
isValidCustomControlAttribute
(
ControlResize
_)
=
True
isValidCustomControlAttribute
(
ControlSelectState
_)
=
True
isValidCustomControlAttribute
ControlHide
=
True
isValidCustomControlAttribute
(
ControlActivate
_)
=
True
isValidCustomControlAttribute
(
ControlDeactivate
_)
=
True
isValidCustomControlAttribute
(
ControlMouse
_
_
_)
=
True
isValidCustomControlAttribute
(
ControlKeyboard
_
_
_)
=
True