DEFINITION MODULE WPSCHEME;

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

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

TYPE PSOMClass              = SOM.PSOMClass;
TYPE INTEGER4               = SOM.INTEGER4;
TYPE somMToken              = SOM.somMToken;
TYPE somDToken              = SOM.somDToken;
TYPE somMethodProc          = SOM.somMethodProc;
TYPE PWPSchemePalette       = POINTER TO WPSchemePalette;
TYPE PM_WPSchemePalette     = POINTER TO M_WPSchemePalette;

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

CONST SYSCLR_CSYSCOLORS     = WINSYS.SYSCLR_CSYSCOLORS;

TYPE CELL                   = WPPALET.CELL;

CONST
  (*
   * Scheme palette entry
   *)
  CCHSCHEMENAME = 30;
  CCHFONTNAME   = 60;

TYPE
  SCHEME        = RECORD
    cell         : CELL;   (* Size of the data that follows *)
    RGBSysColor  : ARRAY [0..SYSCLR_CSYSCOLORS-1] OF LONGCARD;
    cxBorder     : LONGCARD;
    cyBorder     : LONGCARD;
    szName       : ARRAY [0..CCHSCHEMENAME] OF CHAR; (* Name of scheme *)
    szWindowFont : ARRAY [0..CCHFONTNAME] OF CHAR;   (* System font *)
    szTitleFont  : ARRAY [0..CCHFONTNAME] OF CHAR;   (* System font *)
    szMenuFont   : ARRAY [0..CCHFONTNAME] OF CHAR;   (* System font *)
    szIconFont   : ARRAY [0..CCHFONTNAME] OF CHAR;   (* System font *)
                 END;
  PSCHEME      = POINTER TO SCHEME;



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

CONST
  WPSchemePalette_MajorVersion     = 1;
  WPSchemePalette_MinorVersion     = 2;

TYPE 
  WPSchemePaletteClassDataStructure   = RECORD
    classObject                         : PSOMClass;
                                        END;

VAR
  WPSchemePaletteClassData : WPSchemePaletteClassDataStructure;

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


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


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

CONST
  M_WPSchemePalette_MajorVersion   = 1;
  M_WPSchemePalette_MinorVersion   = 2;

TYPE 
  M_WPSchemePaletteClassDataStructure   = RECORD
    classObject                           : PSOMClass;
                                          END;

VAR
  M_WPSchemePaletteClassData : M_WPSchemePaletteClassDataStructure;

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


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


END WPSCHEME.
