DEFINITION MODULE WPCLRPAL;

(***************************************************************************
  OS/2 2.1 Workplace class interface for WPColorPalette;

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

TYPE PSOMClass              = SOM.PSOMClass;
TYPE INTEGER4               = SOM.INTEGER4;
TYPE somMToken              = SOM.somMToken;
TYPE somDToken              = SOM.somDToken;
TYPE somMethodProc          = SOM.somMethodProc;
TYPE PWPColorPalette        = POINTER TO WPColorPalette;
TYPE PM_WPColorPalette      = POINTER TO M_WPColorPalette;

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

TYPE CELL                   = WPPALET.CELL;

TYPE (* Paintpot structure *)
  PAINTPOT                  = RECORD
    cell                      : CELL;     (* Size of the data that follows *)
    ulRGB                     : LONGCARD; (* Color of this paintpot *)
                              END;
  PPAINTPOT                 = POINTER TO PAINTPOT;



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

CONST
  WPColorPalette_MajorVersion     = 1;
  WPColorPalette_MinorVersion     = 2;

TYPE 
  WPColorPaletteClassDataStructure   = RECORD
    classObject                        : PSOMClass;
                                       END;

VAR
  WPColorPaletteClassData : WPColorPaletteClassDataStructure;

TYPE
  (*$SOM+ *)
  WPColorPalette = RECORD( WPPALET.WPPalette ) END;
  (*$SOM- *)


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


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

CONST
  M_WPColorPalette_MajorVersion   = 1;
  M_WPColorPalette_MinorVersion   = 2;

TYPE 
  M_WPColorPaletteClassDataStructure   = RECORD
    classObject                          : PSOMClass;
                                         END;

VAR
  M_WPColorPaletteClassData : M_WPColorPaletteClassDataStructure;

TYPE
  (*$SOM+ *)
  M_WPColorPalette = RECORD( WPPALET.M_WPPalette ) END;
  (*$SOM- *)


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


END WPCLRPAL.
