GetCapabilities

Get current driver capabilities.

Declaration

Source position: videoh.inc line 130

  function GetCapabilities : Word;

Description

GetCapabilities returns the capabilities of the current driver. It is an or-ed combination of the following constants:

cpUnderLine
Video driver supports underline attribute
cpBlink
Video driver supports blink attribute
cpColor
Video driver supports color
cpChangeFont
Video driver supports changing screen font.
cpChangeMode
Video driver supports changing mode
cpChangeCursor
Video driver supports changing cursor shape.

Note that the video driver should not yet be initialized to use this function. It is a property of the driver.

Errors

None.

See also

Name Description
GetCursorType Get screen cursor type
GetVideoDriver Get a copy of the current video driver.

Example

Program Example4;
{ Program to demonstrate the GetCapabilities function. }
Uses video;
Var
  W: Word;
  Procedure TestCap(Cap: Word; Msg : String);
  begin
    Write(Msg,' : ');
    If (W and Cap=Cap) then
      Writeln('Yes')
    else
      Writeln('No');
  end;
begin
  W:=GetCapabilities;
  Writeln('Video driver supports following functionality');
  TestCap(cpUnderLine,'Underlined characters');
  TestCap(cpBlink,'Blinking characters');
  TestCap(cpColor,'Color characters');
  TestCap(cpChangeFont,'Changing font');
  TestCap(cpChangeMode,'Changing video mode');
  TestCap(cpChangeCursor,'Changing cursor shape');
end.