DEFINITION MODULE WPPORT;

(***************************************************************************
  OS/2 2.1 Workplace class interface for WPPort

  Copyright (c) 1994 by Juergen Neuhoff
****************************************************************************)

(*$XL+       Modula-2 language extensions: '_' allowed for symbol names *)
(*$CDECL+    C-style procedures                                         *)
(*$A         default alignment for record fields                        *)

IMPORT SOM;
IMPORT WPTRANS;

TYPE PSOMClass              = SOM.PSOMClass;
TYPE INTEGER4               = SOM.INTEGER4;
TYPE somMToken              = SOM.somMToken;
TYPE somDToken              = SOM.somDToken;
TYPE somMethodProc          = SOM.somMethodProc;
TYPE PWPPort                 = POINTER TO WPPort;
TYPE PM_WPPort               = POINTER TO M_WPPort;

(************************************************************************
  Additional TYPE- and CONST-declarations supporting WPPort
*************************************************************************)

(*************************************************************************
  SOM class API for WPPort, including type-bound procedures
**************************************************************************)

CONST
  WPPort_MajorVersion     = 1;
  WPPort_MinorVersion     = 1;

TYPE
  WPPortClassDataStructure     = RECORD
    classObject                  : PSOMClass;
    prtGetPortInfo               : somMToken;
    prtSetPortInfo               : somMToken;
    prtSettings                  : somMToken;
    prtGetDeviceObject           : somMToken;
    prtSetPortDiscardhwndDlg     : somMToken;
    prtSetPortInstallhwndDlg     : somMToken;
    prtPrintPort                 : somMToken;
    prtSetIcon                   : somMToken;
    prtChangePort                : somMToken;
                                 END;

VAR
  WPPortClassData : WPPortClassDataStructure;

TYPE
  (*$SOM+ *)
  WPPort = RECORD( WPTRANS.WPTransient ) END;
  (*$SOM- *)


PROCEDURE WPPortNewClass
(
  majorVersion  : INTEGER4;
  minorVersion  : INTEGER4
)               : PSOMClass;


(*************************************************************************
  SOM class API for M_WPPort, including type-bound procedures
**************************************************************************)

CONST
  M_WPPort_MajorVersion   = 1;
  M_WPPort_MinorVersion   = 1;

TYPE
  M_WPPortClassDataStructure   = RECORD
    classObject                  : PSOMClass;
                                 END;

VAR
  M_WPPortClassData : M_WPPortClassDataStructure;

TYPE
  (*$SOM+ *)
  M_WPPort = RECORD( WPTRANS.M_WPTransient ) END;
  (*$SOM- *)


PROCEDURE M_WPPortNewClass
(
  majorVersion : INTEGER4;
  minorVersion : INTEGER4
)              : PSOMClass;


END WPPORT.
