DEFINITION MODULE WPPGMGRP;

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

  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 WINDEF;

TYPE PSOMClass              = SOM.PSOMClass;
TYPE INTEGER4               = SOM.INTEGER4;
TYPE somMToken              = SOM.somMToken;
TYPE somDToken              = SOM.somDToken;
TYPE somMethodProc          = SOM.somMethodProc;
TYPE PWPProgramGroup        = POINTER TO WPProgramGroup;
TYPE PM_WPProgramGroup      = POINTER TO M_WPProgramGroup;

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

TYPE HPROGRAM               = WINDEF.HPROGRAM;

CONST
  IDKEY_HGROUP  = 1;


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

CONST
  WPProgramGroup_MajorVersion     = 1;
  WPProgramGroup_MinorVersion     = 2;

TYPE
  WPProgramGroupClassDataStructure     = RECORD
    classObject                          : PSOMClass;
    wpSetGroupHandle                     : somMToken;
    wpQueryGroupHandle                   : somMToken;
    wpAddProgramRef                      : somMToken;
    wpChangeProgramRef                   : somMToken;
    wpDeleteProgramRef                   : somMToken;
                                         END;

VAR
  WPProgramGroupClassData : WPProgramGroupClassDataStructure;

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


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

PROCEDURE( Self : PWPProgramGroup ) wpQueryGroupHandle( ) : HPROGRAM;

PROCEDURE( Self : PWPProgramGroup ) wpAddProgramRef
(
  hProgram      : HPROGRAM
)               : BOOLEAN;

PROCEDURE( Self : PWPProgramGroup ) wpChangeProgramRef
(
  hProgram      : HPROGRAM
)               : BOOLEAN;

PROCEDURE( Self : PWPProgramGroup ) wpDeleteProgramRef
(
  hProgram      : HPROGRAM
)               : BOOLEAN;


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

CONST
  M_WPProgramGroup_MajorVersion   = 1;
  M_WPProgramGroup_MinorVersion   = 2;

TYPE
  M_WPProgramGroupClassDataStructure   = RECORD
    classObject                          : PSOMClass;
                                         END;

VAR
  M_WPProgramGroupClassData : M_WPProgramGroupClassDataStructure;

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


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


END WPPGMGRP.
