DEFINITION MODULE WPMWV;

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

  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;
IMPORT WPOBJECT;

TYPE PSOMClass              = SOM.PSOMClass;
TYPE INTEGER4               = SOM.INTEGER4;
TYPE somMToken              = SOM.somMToken;
TYPE somDToken              = SOM.somDToken;
TYPE somMethodProc          = SOM.somMethodProc;
TYPE PWPMinWinViewer        = POINTER TO WPMinWinViewer;
TYPE PM_WPMinWinViewer      = POINTER TO M_WPMinWinViewer;

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

TYPE HWND                   = OS2DEF.HWND;
TYPE PWPObject              = WPOBJECT.PWPObject;

TYPE
  PMINWINDATA               = POINTER TO MINWINDATA;
  MINWINDATA                = RECORD
    hwndFrame                 : HWND;
    Object                    : PWPObject;
    MinWinObject              : PWPObject;
    ulState                   : LONGCARD;
    ulMinimized               : LONGCARD;
    pNext                     : PMINWINDATA;
                              END;

(*
PROCEDURE ProcessMinWinMsg( ulMsg:LONGCARD; mp1,mp2:MPARAM ):LONGCARD;
PROCEDURE AddMinWindow() : PMINWINDATA;
PROCEDURE FindMinWindow( hwndFrame:HWND ):PMINWINDATA;
PROCEDURE RemoveMinWindow( hwndFrame:HWND ):BOOLEAN;
PROCEDURE ChangeMinWindowState( Object:PWPObject; ulState:LONGCARD):BOOLEAN;
*)

CONST (* ulType is SYS_DEFAULT or OBJ_DEFAULT *)
  SYS_DEFAULT = 1;
  OBJ_DEFAULT = 2;

(*
PROCEDURE RelocateObjectMinWindows
( Object:PWPObject; ulMoveFrom,ulMoveTo,ulType:LONGCARD ):BOOLEAN;
PROCEDURE RelocateMinWindow
( VAR MinWindow:MINWINDATA; ulMoveFrom,ulMoveTo:LONGCARD );
PROCEDURE CreateMinWinObject
( hwndFrame:HWND; Object:PWPObject ):PWPObject;
*)


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

CONST
  WPMinWinViewer_MajorVersion     = 1;
  WPMinWinViewer_MinorVersion     = 2;

TYPE
  WPMinWinViewerClassDataStructure     = RECORD
    classObject                          : PSOMClass;
    wpFindMinWindow                      : somMToken;
                                         END;

VAR
  WPMinWinViewerClassData : WPMinWinViewerClassDataStructure;

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


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

PROCEDURE( Self : PWPMinWinViewer ) wpFindMinWindow
(
  hwndFrame     : HWND
)               : PWPObject;


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

CONST
  M_WPMinWinViewer_MajorVersion   = 1;
  M_WPMinWinViewer_MinorVersion   = 2;

TYPE
  M_WPMinWinViewerClassDataStructure   = RECORD
    classObject                          : PSOMClass;
                                         END;

VAR
  M_WPMinWinViewerClassData : M_WPMinWinViewerClassDataStructure;

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


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


END WPMWV.
