Jump to content

VioGetState: Difference between revisions

From EDM2
Ak120 (talk | contribs)
m Ak120 moved page OS2 API:CPI:VioGetState to VioGetState
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
==Description==
==Description==
Gets the current settings of the:
Gets the current settings of the:
* Blink and background intensity switch
* Blink and background intensity switch
* Color registers
* Color registers
Line 19: Line 18:


rc = VioGetState(RequestBlock, VioHandle);
rc = VioGetState(RequestBlock, VioHandle);
</PRE>
</PRE>
==Parameters==
==Parameters==
; RequestBlock (PVIOD) - in/out : Request block.
;RequestBlock (PVIOD) - in/out : Request block.
 
The address of the video-state structures consisting of six different structures depending on the request type:
The address of the video-state structures consisting of six different structures depending on the request type:
 
  Type Definition  
  Type       Definition  
   0   Get palette registers  
   0           Get palette registers  
   1   Get overscan (border) color  
   1           Get overscan (border) color  
   2   Get blink and background intensity switch  
   2           Get blink and background intensity switch  
   3   Get color registers  
   3           Get color registers  
   4   Reserved
   4           Reserved  
   5   Get the scan line for underlining
   5           Get the scan line for underlining  
   6   Get target VioSetMode display configuration
   6           Get target VioSetMode display configuration  
 
The six structures, depending on request type, are:
The six structures, depending on request type, are:
VIOPALSTATE
VIOOVERSCAN
VIOINTENSITY
VIOCOLORREG
VIOSETULINELOC
VIOSETTARGET
;VioHandle (HVIO) - input : Reserved. Must be 0.


            VIOPALSTATE
            VIOOVERSCAN
            VIOINTENSITY
            VIOCOLORREG
            VIOSETULINELOC
            VIOSETTARGET
; VioHandle (HVIO) - input : Reserved. Must be 0.
==Return Code==
==Return Code==
  rc (APIRET) - returns
  rc (APIRET) - returns
VioGetState returns one of the following values:
VioGetState returns one of the following values:
* 0  NO_ERROR
* 355 ERROR_VIO_MODE
* 421 ERROR_VIO_INVALID_PARMS
* 436 ERROR_VIO_INVALID_HANDLE
* 438 ERROR_VIO_INVALID_LENGTH


* 0          NO_ERROR
* 355        ERROR_VIO_MODE
* 421        ERROR_VIO_INVALID_PARMS
* 436        ERROR_VIO_INVALID_HANDLE
* 438        ERROR_VIO_INVALID_LENGTH
==Remarks==
==Remarks==
Note: VioGetState allows access to hardware-dependent features. Not all video hardware will honor these settings or return valid settings.
Note: VioGetState allows access to hardware-dependent features. Not all video hardware will honor these settings or return valid settings.


==Example Code==
[[Category:Vio]]
<PRE>
 
</PRE>
==Related Functions==
* [[OS2 API:CPI:
 
 
[[Category:The OS/2 API Project]]

Revision as of 21:10, 27 January 2017

Description

Gets the current settings of the:

  • Blink and background intensity switch
  • Color registers
  • Overscan (border) color
  • Palette registers
  • Target VioSetMode display configuration
  • Underline location

Syntax

#define INCL_VIO
#include <os2.h>

PVIOD     RequestBlock;  /*  Request block. */
HVIO      VioHandle;     /*  Reserved.  Must be 0. */
APIRET    rc;            /*  Return code. */

rc = VioGetState(RequestBlock, VioHandle);

Parameters

RequestBlock (PVIOD) - in/out
Request block.

The address of the video-state structures consisting of six different structures depending on the request type:

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

The six structures, depending on request type, are:

VIOPALSTATE
VIOOVERSCAN
VIOINTENSITY
VIOCOLORREG
VIOSETULINELOC
VIOSETTARGET 
VioHandle (HVIO) - input
Reserved. Must be 0.

Return Code

rc (APIRET) - returns

VioGetState returns one of the following values:

  • 0 NO_ERROR
  • 355 ERROR_VIO_MODE
  • 421 ERROR_VIO_INVALID_PARMS
  • 436 ERROR_VIO_INVALID_HANDLE
  • 438 ERROR_VIO_INVALID_LENGTH

Remarks

Note: VioGetState allows access to hardware-dependent features. Not all video hardware will honor these settings or return valid settings.