DEFINITION MODULE WPDESK;

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

  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 WPFOLDER;
IMPORT OS2DEF;

TYPE PSOMClass              = SOM.PSOMClass;
TYPE INTEGER4               = SOM.INTEGER4;
TYPE somMToken              = SOM.somMToken;
TYPE somDToken              = SOM.somDToken;
TYPE somMethodProc          = SOM.somMethodProc;
TYPE PWPDesktop              = POINTER TO WPDesktop;
TYPE PM_WPDesktop            = POINTER TO M_WPDesktop;

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

TYPE HWND                    = OS2DEF.HWND;

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

CONST
  WPDesktop_MajorVersion     = 1;
  WPDesktop_MinorVersion     = 2;

TYPE
  WPDesktopClassDataStructure    = RECORD
    classObject                    : PSOMClass;
    wpIsCurrentDesktop             : somMToken;
    wpAddDesktopLockup1Page        : somMToken;
    wpAddDesktopLockup2Page        : somMToken;
    wpAddDesktopLockup3Page        : somMToken;
                                   END;

VAR
  WPDesktopClassData : WPDesktopClassDataStructure;

TYPE
  (*$SOM+ *)
  WPDesktop = RECORD( WPFOLDER.WPFolder ) END;
  (*$SOM- *)


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

PROCEDURE( Self : PWPDesktop ) wpIsCurrentDesktop( ) : BOOLEAN;

PROCEDURE( Self : PWPDesktop ) wpAddDesktopLockup1Page
(
  hwndNotebook  : HWND
)               : LONGCARD;

PROCEDURE( Self : PWPDesktop ) wpAddDesktopLockup2Page
(
  hwndNotebook  : HWND
)               : LONGCARD;

PROCEDURE( Self : PWPDesktop ) wpAddDesktopLockup3Page
(
  hwndNotebook  : HWND
)               : LONGCARD;


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

CONST
  M_WPDesktop_MajorVersion   = 1;
  M_WPDesktop_MinorVersion   = 2;

TYPE
  M_WPDesktopClassDataStructure   = RECORD
    classObject                     : PSOMClass;
                                    END;

VAR
  M_WPDesktopClassData : M_WPDesktopClassDataStructure;

TYPE
  (*$SOM+ *)
  M_WPDesktop = RECORD( WPFOLDER.M_WPFolder ) END;
  (*$SOM- *)


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


END WPDESK.
