DEFINITION MODULE WPKEYBD;

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

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

TYPE PSOMClass              = SOM.PSOMClass;
TYPE INTEGER4               = SOM.INTEGER4;
TYPE somMToken              = SOM.somMToken;
TYPE somDToken              = SOM.somDToken;
TYPE somMethodProc          = SOM.somMethodProc;
TYPE PWPKeyboard            = POINTER TO WPKeyboard;
TYPE PM_WPKeyboard          = POINTER TO M_WPKeyboard;

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

TYPE HWND                   = OS2DEF.HWND;


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

CONST
  WPKeyboard_MajorVersion     = 1;
  WPKeyboard_MinorVersion     = 2;

TYPE 
  WPKeyboardClassDataStructure   = RECORD
    classObject                    : PSOMClass;
    wpAddKeyboardMappingsPage      : somMToken;
    wpAddKeyboardTimingPage        : somMToken;
    wpAddKeyboardSpecialNeedsPage  : somMToken;
                                   END;

VAR
  WPKeyboardClassData : WPKeyboardClassDataStructure;

TYPE
  (*$SOM+ *)
  WPKeyboard = RECORD( WPABS.WPAbstract ) END;
  (*$SOM- *)


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

PROCEDURE( Self : PWPKeyboard ) wpAddKeyboardMappingsPage
(
  hwndNotebook  : HWND
)               : LONGCARD;

PROCEDURE( Self : PWPKeyboard ) wpAddKeyboardTimingPage
(
  hwndNotebook  : HWND
)               : LONGCARD;

PROCEDURE( Self : PWPKeyboard ) wpAddKeyboardSpecialNeedsPage
(
  hwndNotebook  : HWND
)               : LONGCARD;



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

CONST
  M_WPKeyboard_MajorVersion   = 1;
  M_WPKeyboard_MinorVersion   = 2;

TYPE 
  M_WPKeyboardClassDataStructure   = RECORD
    classObject                      : PSOMClass;
                                     END;

VAR
  M_WPKeyboardClassData : M_WPKeyboardClassDataStructure;

TYPE
  (*$SOM+ *)
  M_WPKeyboard = RECORD( WPABS.M_WPAbstract ) END;
  (*$SOM- *)


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

END WPKEYBD.
