Jump to content

VioSetState: Difference between revisions

From EDM2
Ak120 (talk | contribs)
No edit summary
Line 1: Line 1:
==Description==
==Description==
Sets one or more of the following states:
Sets one or more of the following states:
* Blink and background intensity switch
* Blink and background intensity switch
* Color registers
* Color registers
Line 8: Line 7:
* Target VioSetMode display configuration
* Target VioSetMode display configuration
* Underline location  
* Underline location  


==Syntax==
==Syntax==
<PRE>
<PRE>
#define INCL_VIO
#define INCL_VIO
#include <os2.h>
#include <os2.h>
Line 21: Line 18:


rc = VioSetState(RequestBlock, VioHandle);
rc = VioSetState(RequestBlock, VioHandle);
</PRE>


</PRE>
==Parameters==
==Parameters==
; RequestBlock (PVIOD) - input : Address of the video state structures (consisting of six different structures, depending on the request type):
; RequestBlock (PVIOD) - input : Address of the video state structures (consisting of six different structures, depending on the request type):


  Type           Definition   
Type         Definition   
  0            Set palette registers  
  0            Set palette registers  
  1            Set overscan (border) color  
  1            Set overscan (border) color  
Line 36: Line 33:


The six structures, depending on request type, are:
The six structures, depending on request type, are:
* VIOPALSTATE
* VIOPALSTATE
* VIOOVERSCAN
* VIOOVERSCAN
Line 50: Line 46:
  rc (APIRET) - returns
  rc (APIRET) - returns
VioSetState returns one of the following values:
VioSetState returns one of the following values:
* 0          NO_ERROR  
* 0          NO_ERROR  
* 355        ERROR_VIO_MODE  
* 355        ERROR_VIO_MODE  
Line 56: Line 51:
* 436        ERROR_VIO_INVALID_HANDLE  
* 436        ERROR_VIO_INVALID_HANDLE  
* 438        ERROR_VIO_INVALID_LENGTH
* 438        ERROR_VIO_INVALID_LENGTH
==Remarks==
==Remarks==
VioSetState allows setting of hardware-dependent features. Not all video hardware will honor these settings.  
VioSetState allows setting of hardware-dependent features. Not all video hardware will honor these settings.  


==Example Code==
==Example Code==
<PRE>


</PRE>
==Related Functions==
==Related Functions==
* [[OS2 API:CPI:


[[Category:The OS/2 API Project]]
[[Category:The OS/2 API Project]]

Revision as of 18:48, 8 September 2016

Description

Sets one or more of the following states:

  • 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;
HVIO      VioHandle;     /*  VIO presentation-space handle */
APIRET    rc;            /*  Return code. */

rc = VioSetState(RequestBlock, VioHandle);

Parameters

RequestBlock (PVIOD) - input
Address of the video state structures (consisting of six different structures, depending on the request type):
Type         Definition  
0            Set palette registers 
1            Set overscan (border) color 
2            Set blink/background intensity switch 
3            Set color registers 
4            Reserved 
5            Set underline location 
6            Set target VioSetMode display configuration 

The six structures, depending on request type, are:

  • VIOPALSTATE
  • VIOOVERSCAN
  • VIOINTENSITY
  • VIOCOLORREG
  • VIOSETULINELOC
  • VIOSETTARGET
VioHandle (HVIO) - input
VIO presentation-space handle

Reserved. Must be 0.

Return Code

rc (APIRET) - returns

VioSetState 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

VioSetState allows setting of hardware-dependent features. Not all video hardware will honor these settings.

Example Code

Related Functions