Table of Contents

This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS

Note: This is legacy API call. It is recommended to use 32-bit equivalent

2021/09/17 04:47 · prokushev · 0 Comments
2021/08/20 03:18 · prokushev · 0 Comments

VioGetState

This call returns the current settings of the palette registers, overscan (border) colour, blink/background intensity switch, colour registers, underline location, or target VioSetMode display configuration.

Syntax

 VioGetState (RequestBlock, VioHandle)

Parameters

Type Definition
0 Get palette registers
1 Get overscan (border) color
2 Get blink/background intensity switch
3 Get color registers
4 Reserved
5 Get the scan line for underlining
6 Get target VioSetMode display configuration.
7 Reserved

The six structures, depending on request type, are:

Byte 1 Red value
Byte 2 Green value
Byte 3 Blue value

Return Code

rc (USHORT) - return:Return code descriptions are:

Remarks

Family API Considerations

Request type = 6, Get Target VioSetMode Display Configuration, and request type = 5, Get Underline Location, are not supported in the family API.

Bindings

C

typedef struct _VIOPALSTATE {
  USHORT  cb;                   /* Length of this structure in bytes */
  USHORT  type;                 /* Request type=0 get palette registers */
  USHORT  iFirst;               /* First palette register to return */
  USHORT  acolor[1];            /* Color value palette register */
  }VIOPALSTATE;
typedef VIOPALSTATE far *PVIOPALSTATE;
 
typedef struct _VIOOVERSCAN {
  USHORT  cb;                   /* Length of this structure */
  USHORT  type;                 /* Request type=1 get overscan
                                    (border) color */
  USHORT  color;                /* Color value */
  }VIOOVERSCAN;
typedef VIOOVERSCAN far *PVIOOVERSCAN;
 
typedef struct _VIOINTENSITY {
  USHORT  cb;                   /* Length of this structure */
  USHORT  type;                 /* Request type=2 get blink/background
                                    intensity switch */
  USHORT  fs;                   /* Value of blink/background switch */
  }VIOINTENSITY;
typedef VIOINTENSITY far *PVIOINTENSITY;
 
typedef struct _VIOCOLORREG {   /* viocreg */
  USHORT  cb;
  USHORT  type;
  USHORT  firstcolorreg;
  USHORT  numcolorregs;
  PCH     colorregaddr;
  }VIOCOLORREG;
typedef VIOCOLORREG far *PVIOCOLORREG;
 
typedef struct _VIOSETULINELOC { /* viouline */
  USHORT  cb;
  USHORT  type;
  USHORT  scanline;
  }VIOSETULINELOC;
typedef VIOSETULINELOC far *PVIOSETULINELOC;
 
typedef struct _VIOSETTARGET {  /* viosett */
  USHORT  cb;
  USHORT  type;
  USHORT  defaultalgorithm;
  }VIOSETTARGET;
typedef VIOSETTARGET far *PVIOSETTARGET;
 
#define INCL_VIO
 
USHORT  rc = VioGetState(RequestBlock, VioHandle);
 
PVOID            RequestBlock;  /* Request block */
HVIO             VioHandle;     /* Vio handle */
 
USHORT           rc;            /* return code */

MASM

VIOPALSTATE struc
  viopal_cb               dw ? ;Length of this structure in bytes
  viopal_type             dw ? ;Request type=0 get palette registers
  viopal_iFirst           dw ? ;First palette register to return
  viopal_acolor  dw 1  dup (?) ;Color value palette register
VIOPALSTATE ends
 
VIOOVERSCAN struc
  vioos_cb                dw ? ;Length of this structure
  vioos_type              dw ? ;Request type=1 get overscan (border) color
  vioos_color             dw ? ;Color value
VIOOVERSCAN ends
 
VIOINTENSITY struc
  vioint_cb               dw ? ;Length of this structure
  vioint_type             dw ? ;Request type=2 get blink/background
                              ; intensity switch
  vioint_fs               dw ? ;Value of blink/background switch
VIOINTENSITY ends
 
VIOCOLORREG struc
  viocreg_cb              dw ? ;
  viocreg_type            dw ? ;
  viocreg_firstcolorreg   dw ? ;
  viocreg_numcolorregs    dw ? ;
  viocreg_colorregaddr    dd ? ;
VIOCOLORREG ends
 
VIOSETULINELOC struc
  viouline_cb             dw ? ;
  viouline_type           dw ? ;
  viouline_scanline       dw ? ;
VIOSETULINELOC ends
 
VIOSETTARGET struc
  viosett_cb               dw ? ;
  viosett_type             dw ? ;
  viosett_defaultalgorithm dw ? ;
VIOSETTARGET    ends
 
EXTRN  VioGetState:FAR
INCL_VIO            EQU 1
 
PUSH@  OTHER   RequestBlock     ;Request block
PUSH   WORD    VioHandle        ;Vio handle
CALL   VioGetState
 
Returns WORD