Browse Source

+ introduced legacy code page functions to the video driver itself (they can
optionally be implemented for operating systems with non-unicode consoles)

git-svn-id: branches/unicodekvm@48911 -

nickysn 4 years ago
parent
commit
a4db719eb4

+ 6 - 2
packages/rtl-console/src/amicommon/video.pp

@@ -849,7 +849,7 @@ end;
 const
   SysVideoDriver : TVideoDriver = (
     InitDriver : @SysInitVideo;
-    InitEnhancedDriver: nil;
+    InitEnhancedDriver : Nil;
     DoneDriver : @SysDoneVideo;
     UpdateScreen : @SysUpdateScreen;
     ClearScreen : @SysClearScreen;
@@ -859,7 +859,11 @@ const
     SetCursorPos : @SysSetCursorPos;
     GetCursorType : @SysGetCursorType;
     SetCursorType : @SysSetCursorType;
-    GetCapabilities : @SysGetCapabilities
+    GetCapabilities : @SysGetCapabilities;
+    GetActiveCodePage : Nil;
+    ActivateCodePage : Nil;
+    GetSupportedCodePageCount : Nil;
+    GetSupportedCodePage : Nil;
   );
 {$ifdef Amiga68k}
 function CreateRastport: PRastPort;

+ 16 - 12
packages/rtl-console/src/go32v2/video.pp

@@ -306,18 +306,22 @@ end;
 
 Const
   SysVideoDriver : TVideoDriver = (
-    InitDriver      : @SysInitVideo;
-    InitEnhancedDriver: nil;
-    DoneDriver      : @SysDoneVideo;
-    UpdateScreen    : @SysUpdateScreen;
-    ClearScreen     : Nil;
-    SetVideoMode    : @SysSetVideoMode;
-    GetVideoModeCount : @SysGetVideoModeCount;
-    GetVideoModeData : @SysGetVideoModedata;
-    SetCursorPos    : @SysSetCursorPos;
-    GetCursorType   : @SysGetCursorType;
-    SetCursorType   : @SysSetCursorType;
-    GetCapabilities : @SysGetCapabilities
+    InitDriver                : @SysInitVideo;
+    InitEnhancedDriver        : Nil;
+    DoneDriver                : @SysDoneVideo;
+    UpdateScreen              : @SysUpdateScreen;
+    ClearScreen               : Nil;
+    SetVideoMode              : @SysSetVideoMode;
+    GetVideoModeCount         : @SysGetVideoModeCount;
+    GetVideoModeData          : @SysGetVideoModedata;
+    SetCursorPos              : @SysSetCursorPos;
+    GetCursorType             : @SysGetCursorType;
+    SetCursorType             : @SysSetCursorType;
+    GetCapabilities           : @SysGetCapabilities;
+    GetActiveCodePage         : Nil;
+    ActivateCodePage          : Nil;
+    GetSupportedCodePageCount : Nil;
+    GetSupportedCodePage      : Nil;
   );
 
 initialization

+ 16 - 12
packages/rtl-console/src/inc/videoh.inc

@@ -53,18 +53,22 @@ type
   TEnhancedVideoBuf = array of TEnhancedVideoCell;
 
   TVideoDriver = Record
-    InitDriver        : Procedure;
-    InitEnhancedDriver: Procedure;
-    DoneDriver        : Procedure;
-    UpdateScreen      : Procedure(Force : Boolean);
-    ClearScreen       : Procedure;
-    SetVideoMode      : Function (Const Mode : TVideoMode) : Boolean;
-    GetVideoModeCount : Function : Word;
-    GetVideoModeData  : Function(Index : Word; Var Data : TVideoMode) : Boolean;
-    SetCursorPos      : procedure (NewCursorX, NewCursorY: Word);
-    GetCursorType     : function : Word;
-    SetCursorType     : procedure (NewType: Word);
-    GetCapabilities   : Function : Word;
+    InitDriver               : Procedure;
+    InitEnhancedDriver       : Procedure;
+    DoneDriver               : Procedure;
+    UpdateScreen             : Procedure(Force : Boolean);
+    ClearScreen              : Procedure;
+    SetVideoMode             : Function (Const Mode : TVideoMode) : Boolean;
+    GetVideoModeCount        : Function : Word;
+    GetVideoModeData         : Function(Index : Word; Var Data : TVideoMode) : Boolean;
+    SetCursorPos             : procedure (NewCursorX, NewCursorY: Word);
+    GetCursorType            : function : Word;
+    SetCursorType            : procedure (NewType: Word);
+    GetCapabilities          : Function : Word;
+    GetActiveCodePage        : function : TSystemCodePage;
+    ActivateCodePage         : procedure(CodePage: TSystemCodePage);
+    GetSupportedCodePageCount: function : Integer;
+    GetSupportedCodePage     : function(Index: Integer): TSystemCodePage;
   end;
 
 const

+ 16 - 12
packages/rtl-console/src/msdos/video.pp

@@ -279,18 +279,22 @@ end;
 
 Const
   SysVideoDriver : TVideoDriver = (
-    InitDriver      : @SysInitVideo;
-    InitEnhancedDriver: nil;
-    DoneDriver      : @SysDoneVideo;
-    UpdateScreen    : @SysUpdateScreen;
-    ClearScreen     : Nil;
-    SetVideoMode    : @SysSetVideoMode;
-    GetVideoModeCount : @SysGetVideoModeCount;
-    GetVideoModeData : @SysGetVideoModedata;
-    SetCursorPos    : @SysSetCursorPos;
-    GetCursorType   : @SysGetCursorType;
-    SetCursorType   : @SysSetCursorType;
-    GetCapabilities : @SysGetCapabilities
+    InitDriver                : @SysInitVideo;
+    InitEnhancedDriver        : Nil;
+    DoneDriver                : @SysDoneVideo;
+    UpdateScreen              : @SysUpdateScreen;
+    ClearScreen               : Nil;
+    SetVideoMode              : @SysSetVideoMode;
+    GetVideoModeCount         : @SysGetVideoModeCount;
+    GetVideoModeData          : @SysGetVideoModedata;
+    SetCursorPos              : @SysSetCursorPos;
+    GetCursorType             : @SysGetCursorType;
+    SetCursorType             : @SysSetCursorType;
+    GetCapabilities           : @SysGetCapabilities;
+    GetActiveCodePage         : Nil;
+    ActivateCodePage          : Nil;
+    GetSupportedCodePageCount : Nil;
+    GetSupportedCodePage      : Nil;
   );
 
 initialization

+ 16 - 12
packages/rtl-console/src/netware/video.pp

@@ -173,18 +173,22 @@ end;
 
 Const
   SysVideoDriver : TVideoDriver = (
-  InitDriver        : @SysInitVideo;
-  InitEnhancedDriver: nil;
-  DoneDriver        : @SysDoneVideo;
-  UpdateScreen      : @SysUpdateScreen;
-  ClearScreen       : Nil;
-  SetVideoMode      : @SysSetVideoMode;
-  GetVideoModeCount : @SysGetVideoModeCount;
-  GetVideoModeData  : @SysGetVideoModedata;
-  SetCursorPos      : @SysSetCursorPos;
-  GetCursorType     : @SysGetCursorType;
-  SetCursorType     : @SysSetCursorType;
-  GetCapabilities   : @SysGetCapabilities
+  InitDriver                : @SysInitVideo;
+  InitEnhancedDriver        : Nil;
+  DoneDriver                : @SysDoneVideo;
+  UpdateScreen              : @SysUpdateScreen;
+  ClearScreen               : Nil;
+  SetVideoMode              : @SysSetVideoMode;
+  GetVideoModeCount         : @SysGetVideoModeCount;
+  GetVideoModeData          : @SysGetVideoModedata;
+  SetCursorPos              : @SysSetCursorPos;
+  GetCursorType             : @SysGetCursorType;
+  SetCursorType             : @SysSetCursorType;
+  GetCapabilities           : @SysGetCapabilities;
+  GetActiveCodePage         : Nil;
+  ActivateCodePage          : Nil;
+  GetSupportedCodePageCount : Nil;
+  GetSupportedCodePage      : Nil;
 );
 
 

+ 16 - 12
packages/rtl-console/src/netwlibc/video.pp

@@ -162,18 +162,22 @@ end;
 
 Const
   SysVideoDriver : TVideoDriver = (
-  InitDriver        : @SysInitVideo;
-  InitEnhancedDriver: nil;
-  DoneDriver        : @SysDoneVideo;
-  UpdateScreen      : @SysUpdateScreen;
-  ClearScreen       : Nil;
-  SetVideoMode      : @SysSetVideoMode;
-  GetVideoModeCount : @SysGetVideoModeCount;
-  GetVideoModeData  : @SysGetVideoModedata;
-  SetCursorPos      : @SysSetCursorPos;
-  GetCursorType     : @SysGetCursorType;
-  SetCursorType     : @SysSetCursorType;
-  GetCapabilities   : @SysGetCapabilities
+  InitDriver                : @SysInitVideo;
+  InitEnhancedDriver        : Nil;
+  DoneDriver                : @SysDoneVideo;
+  UpdateScreen              : @SysUpdateScreen;
+  ClearScreen               : Nil;
+  SetVideoMode              : @SysSetVideoMode;
+  GetVideoModeCount         : @SysGetVideoModeCount;
+  GetVideoModeData          : @SysGetVideoModedata;
+  SetCursorPos              : @SysSetCursorPos;
+  GetCursorType             : @SysGetCursorType;
+  SetCursorType             : @SysSetCursorType;
+  GetCapabilities           : @SysGetCapabilities;
+  GetActiveCodePage         : Nil;
+  ActivateCodePage          : Nil;
+  GetSupportedCodePageCount : Nil;
+  GetSupportedCodePage      : Nil;
 );
 
 

+ 16 - 12
packages/rtl-console/src/os2commn/video.pp

@@ -427,18 +427,22 @@ end;
 
 Const
   SysVideoDriver : TVideoDriver = (
-    InitDriver        : @SysInitVideo;
-    InitEnhancedDriver: nil;
-    DoneDriver        : @SysDoneVideo;
-    UpdateScreen      : @SysUpdateScreen;
-    ClearScreen       : @SysClearScreen;
-    SetVideoMode      : @SysSetVideoMode;
-    GetVideoModeCount : @SysGetVideoModeCount;
-    GetVideoModeData  : @SysGetVideoModedata;
-    SetCursorPos      : @SysSetCursorPos;
-    GetCursorType     : @SysGetCursorType;
-    SetCursorType     : @SysSetCursorType;
-    GetCapabilities   : @SysGetCapabilities
+    InitDriver                : @SysInitVideo;
+    InitEnhancedDriver        : nil;
+    DoneDriver                : @SysDoneVideo;
+    UpdateScreen              : @SysUpdateScreen;
+    ClearScreen               : @SysClearScreen;
+    SetVideoMode              : @SysSetVideoMode;
+    GetVideoModeCount         : @SysGetVideoModeCount;
+    GetVideoModeData          : @SysGetVideoModedata;
+    SetCursorPos              : @SysSetCursorPos;
+    GetCursorType             : @SysGetCursorType;
+    SetCursorType             : @SysSetCursorType;
+    GetCapabilities           : @SysGetCapabilities;
+    GetActiveCodePage         : nil;
+    ActivateCodePage          : nil;
+    GetSupportedCodePageCount : nil;
+    GetSupportedCodePage      : nil;
   );
 
 procedure TargetEntry;

+ 4 - 0
packages/rtl-console/src/unix/video.pp

@@ -1380,6 +1380,10 @@ Const
     GetCursorType : @SysGetCursorType;
     SetCursorType : @SysSetCursorType;
     GetCapabilities : @SysGetCapabilities;
+    GetActiveCodePage : Nil;
+    ActivateCodePage : Nil;
+    GetSupportedCodePageCount : Nil;
+    GetSupportedCodePage : Nil;
   );
 
 initialization

+ 5 - 2
packages/rtl-console/src/win/video.pp

@@ -435,8 +435,11 @@ Const
     SetCursorPos : @SysSetCursorPos;
     GetCursorType : @SysGetCursorType;
     SetCursorType : @SysSetCursorType;
-    GetCapabilities : @SysGetCapabilities
-
+    GetCapabilities : @SysGetCapabilities;
+    GetActiveCodePage : Nil;
+    ActivateCodePage : Nil;
+    GetSupportedCodePageCount : Nil;
+    GetSupportedCodePage : Nil;
   );
 
 procedure TargetEntry;

+ 16 - 12
packages/rtl-console/src/win16/video.pp

@@ -255,18 +255,22 @@ end;
 
 const
   SysVideoDriver: TVideoDriver = (
-    InitDriver: @SysInitVideo;
-    InitEnhancedDriver: nil;
-    DoneDriver: @SysDoneVideo;
-    UpdateScreen: @SysUpdateScreen;
-    ClearScreen: nil;
-    SetVideoMode: @SysSetVideoMode;
-    GetVideoModeCount: nil;
-    GetVideoModeData: nil;
-    SetCursorPos: @SysSetCursorPos;
-    GetCursorType: @SysGetCursorType;
-    SetCursorType: @SysSetCursorType;
-    GetCapabilities: @SysGetCapabilities;
+    InitDriver                : @SysInitVideo;
+    InitEnhancedDriver        : nil;
+    DoneDriver                : @SysDoneVideo;
+    UpdateScreen              : @SysUpdateScreen;
+    ClearScreen               : nil;
+    SetVideoMode              : @SysSetVideoMode;
+    GetVideoModeCount         : nil;
+    GetVideoModeData          : nil;
+    SetCursorPos              : @SysSetCursorPos;
+    GetCursorType             : @SysGetCursorType;
+    SetCursorType             : @SysSetCursorType;
+    GetCapabilities           : @SysGetCapabilities;
+    GetActiveCodePage         : nil;
+    ActivateCodePage          : nil;
+    GetSupportedCodePageCount : nil;
+    GetSupportedCodePage      : nil;
   );
 
 begin