aboutsummaryrefslogtreecommitdiff
path: root/osdocumentinterface.dcl
diff options
context:
space:
mode:
authorCamil Staps2015-07-01 17:36:37 +0200
committerCamil Staps2015-07-01 17:36:37 +0200
commit7553b7f9d4dddc2235c137d41de8ce22547bebe3 (patch)
tree34f8fb4b36640317d728a60586424f67f9befbe7 /osdocumentinterface.dcl
parentgitignore (diff)
Initial commit
Diffstat (limited to 'osdocumentinterface.dcl')
-rw-r--r--osdocumentinterface.dcl76
1 files changed, 76 insertions, 0 deletions
diff --git a/osdocumentinterface.dcl b/osdocumentinterface.dcl
new file mode 100644
index 0000000..c674537
--- /dev/null
+++ b/osdocumentinterface.dcl
@@ -0,0 +1,76 @@
+definition module osdocumentinterface
+
+// Clean object I/O library, version 1.2
+
+import StdIOCommon
+from menuCrossCall_12 import :: HMENU
+import ostoolbar, ostoolbox, ostypes
+
+:: OSDInfo
+ = OSMDInfo !OSMDInfo
+ | OSSDInfo !OSSDInfo
+ | OSNoInfo
+:: OSMDInfo
+ = { osmdOSInfo :: !OSInfo // The general document interface infrastructure
+ , osmdWindowMenu :: !HMENU // The Window menu in the MDI menu bar
+ }
+:: OSSDInfo
+ = { ossdOSInfo :: !OSInfo // The general document interface infrastructure
+ }
+:: OSInfo
+ = { osFrame :: !HWND // The frame window of the (M/S)DI frame window
+ , osToolbar :: !Maybe OSToolbar // The toolbar of the (M/S)DI frame window (Nothing if no toolbar)
+ , osClient :: !HWND // The client window of the (M/S)DI frame window
+ , osMenuBar :: !HMENU // The menu bar of the (M/S)DI frame window
+ }
+:: OSMenuBar
+ = { menuBar :: !HMENU
+ , menuWindow :: !HWND
+ , menuClient :: !HWND
+ }
+
+/* Before using osOpenMDI, osOpenSDI, or osCloseOSDInfo evaluate osInitialiseDI.
+*/
+osInitialiseDI :: !*OSToolbox -> *OSToolbox
+
+/* emptyOSDInfo creates a OSDInfo with dummy values for the argument document interface.
+*/
+emptyOSDInfo :: !DocumentInterface -> OSDInfo
+
+/* getOSDInfoDocumentInterface returns the DocumentInterface of the argument OSDInfo.
+*/
+getOSDInfoDocumentInterface :: !OSDInfo -> DocumentInterface
+
+/* getOSDInfoOSMenuBar returns the OSMenuBar info from the argument OSDInfo.
+ setOSDInfoOSMenuBar sets the OSMenuBar info in the OSDInfo.
+*/
+getOSDInfoOSMenuBar :: !OSDInfo -> Maybe OSMenuBar
+setOSDInfoOSMenuBar :: !OSMenuBar !OSDInfo -> OSDInfo
+
+/* getOSDInfoOSInfo returns the OSInfo from the argument OSDInfo if present.
+ setOSDInfoOSInfo sets the OSInfo in the OSDInfo.
+*/
+getOSDInfoOSInfo :: !OSDInfo -> Maybe OSInfo
+setOSDInfoOSInfo :: !OSInfo !OSDInfo -> OSDInfo
+
+/* osOpenMDI creates the infrastructure of a MDI process.
+ If the first Bool argument is True, then the frame window is shown, otherwise it is hidden.
+ The second Bool indicates whether the process accepts file open events.
+ osOpenSDI creates the infrastructure of a SDI process.
+ The Bool argument indicates whether the process accepts file open events.
+ osOpenNDI creates the infrastructure of a NDI process.
+ osCloseOSDInfo destroys the infrastructure.
+*/
+osOpenMDI :: !Bool !Bool !*OSToolbox -> (!OSDInfo,!*OSToolbox)
+osOpenSDI :: !Bool !*OSToolbox -> (!OSDInfo,!*OSToolbox)
+osOpenNDI :: !*OSToolbox -> (!OSDInfo,!*OSToolbox)
+osCloseOSDInfo:: !OSDInfo !*OSToolbox -> *OSToolbox
+
+/* getOSDInfoOSToolbar retrieves the OSToolbar, if any.
+*/
+getOSDInfoOSToolbar :: !OSDInfo -> Maybe OSToolbar
+
+/* osOSDInfoIsActive tests if the given OSDInfo represents the interactive process with the
+ active menu system. (Always True on Windows; use menu bar on Mac.)
+*/
+osOSDInfoIsActive :: !OSDInfo !*OSToolbox -> (!Bool, !*OSToolbox)