en:docs:fapi:viogetstate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:docs:fapi:viogetstate [2021/09/19 05:55] – created prokusheven:docs:fapi:viogetstate [2021/11/04 12:45] (current) prokushev
Line 1: Line 1:
 +{{page>en:templates:fapiint}}
 +
 +====== 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. 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==+===== Syntax ===== 
 +<code c>
  VioGetState (RequestBlock, VioHandle)  VioGetState (RequestBlock, VioHandle)
 +</code>
  
-==Parameters== +===== Parameters =====
-;RequestBlock (PVOID) - input/output : Address of the video state structures consisting of six different structures depending on the request type: +
- '''Type        Definition''' +
-      Get palette registers +
-      Get overscan (border) color +
-      Get blink/background intensity switch +
-      Get color registers +
-      Reserved +
-      Get the scan line for underlining +
-      Get target VioSetMode display configuration. +
-      Reserved +
-:The six structures, depending on request type, are:+
  
-;VIOPALSTATE:Applies to EGA, VGA, or IBM Personal System/2 Display Adapter. +  * RequestBlock (PVOID) - input/output Address of the video state structures consisting of six different structures depending on the request type:
-:length (USHORT) - input : Length of structure, including length. +
-:38 Maximum valid value. +
-:type (USHORT) - input : Request type 0 for palette registers. +
-:palette (USHORT) - input: First palette register in the palette register sequence; must be specified in the range 0 through 15. The palette registers are returned in sequential order. The number returned is based upon length. +
-:color (USHORT*(length-6)/2) - output:Color value for each palette register. The maximum number of entries in the color value array is 16.+
  
-;VIOOVERSCAN: Applies to CGA, VGA, or IBM Personal System/2 Display Adapter. +^ Type ^ Definition ^ 
-:length (USHORT) - input : Length of structure, including length. Only valid value. +| 0 | Get palette registers | 
-:type (USHORT) - input : Request type for overscan (border) color. +| Get overscan (border) color | 
-:color (USHORT) - input : Color value.+| 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 |
  
-;VIOINTENSITY: Applies to CGAEGAMCGA, VGA, or IBM Personal System/2 Display Adapter. +The six structuresdepending on request typeare:
-:length (USHORT) - input: Length of structure, including length. Only valid value. +
-:type (USHORT) - input: Request type 2 for blink/background intensity switch. +
-:switch (USHORT) - output: Switch set as: +
-::0 Blinking foreground colors enabled. +
-::1 High intensity background colors enabled.+
  
-;VIOCOLORREG: Applies to VGA, or IBM Personal System/2 Display Adapter. +  * VIOPALSTATE:Applies to EGA, VGA, or IBM Personal System/2 Display Adapter. 
-:length (USHORT) - input : Length of structure, including length. +    length (USHORT) - input : Length of structure, including length. 
- 12     Length in bytes.  +      * 38 Maximum valid value
-:type (USHORT) - input : Request type for color registers.  +    type (USHORT) - input : Request type for palette registers. 
-:first color (USHORT) - input : First color register to get in the color register sequence; must be specified in the range 0 through 255. The color registers are returned in sequential order. +    * palette (USHORT) - input: First palette register in the palette register sequence; must be specified in the range 0 through 15. The palette registers are returned in sequential order. The number returned is based upon length
-:number color (USHORTinput : Number of color registers to get; must be specified in the range 1 through 256. +    color (USHORT*(length-6)/2) - output:Color value for each palette register. The maximum number of entries in the color value array is 16.
-:datarea (PCH) - input Far address of a data area where the color registers are returned. The size of the data area must be three bytes times the number of color registers to getThe format of each entry returned is as follows: +
- Byte 1  Red value +
- Byte 2  Green value +
- Byte 3  Blue value+
  
-;VIOSETULINELOC:Applies to EGA, VGA, or IBM Personal System/2 Display Adapter. +  * VIOOVERSCAN: Applies to CGA, VGA, or IBM Personal System/2 Display Adapter. 
-:length (USHORT) - input : Length of structure, including length. Length in bytes.  +    length (USHORT) - input : Length of structure, including length. Only valid value
-:type (USHORT) - input : Request type 5 to get the scan line for underlining. Underlining is enabled only when the foreground color is 1 or 9+    type (USHORT) - input : Request type for overscan (border) color. 
-:scanline (USHORT) - output The value returned is in the range 0 through 31 and is the scan line minus 1. A value of 32 means underlining is disabled.+    * color (USHORT) - input Color value.
  
-;VIOSETTARGET +  * VIOINTENSITY: Applies to CGA, EGA, MCGA, VGA, or IBM Personal System/2 Display Adapter. 
-:length (USHORT) - input : Length of structure, including length. Length in bytes+    length (USHORT) - input: Length of structure, including length. Only valid value
-:type (USHORT) - input : Request type 6 to get display configuration selected to be the target of the next VioSetMode+    type (USHORT) - input: Request type 2 for blink/background intensity switch
-:select (USHORT) - output:Configuration+    * switch (USHORT) - output: Switch set as
-::Default selection algorithm. See VioSetMode+      *Blinking foreground colors enabled
-::Primary +      High intensity background colors enabled.
-::2 Secondary +
-;VioHandle (HVIO) - input :  Reserved word of 0s.+
  
-==Return Code== +  * VIOCOLORREG: Applies to VGA, or IBM Personal System/2 Display Adapter. 
-;rc (USHORT) - return:Return code descriptions are+    *length (USHORT) - input Length of structure, including length. 
-*0 NO_ERROR +      12     Length in bytes.  
-*355 ERROR_VIO_MODE +    type (USHORT) - input : Request type 3 for color registers.  
-*421 ERROR_VIO_INVALID_PARMS +    first color (USHORT) - input : First color register to get in the color register sequence; must be specified in the range 0 through 255. The color registers are returned in sequential order. 
-*436 ERROR_VIO_INVALID_HANDLE +    number color (USHORT) - input : Number of color registers to get; must be specified in the range 1 through 256. 
-*438 ERROR_VIO_INVALID_LENGTH +    datarea (PCH) - input : Far address of a data area where the color registers are returned. The size of the data area must be three bytes times the number of color registers to get. The format of each entry returned is as follows:
-*465 ERROR_VIO_DETACHED +
-*494 ERROR_VIO_EXTENDED_SG+
  
-==Remarks== +| Byte 1 | Red value | 
-===Family API Considerations===+| Byte 2 | Green value | 
 +| Byte 3 | Blue value | 
 + 
 +  * VIOSETULINELOC:Applies to EGA, VGA, or IBM Personal System/2 Display Adapter. 
 +    * length (USHORT) - input : Length of structure, including length. Length in bytes.  
 +    * type (USHORT) - input : Request type 5 to get the scan line for underlining. Underlining is enabled only when the foreground color is 1 or 9. 
 +    * scanline (USHORT) - output : The value returned is in the range 0 through 31 and is the scan line minus 1. A value of 32 means underlining is disabled. 
 + 
 +  * VIOSETTARGET 
 +    * length (USHORT) - input : Length of structure, including length. Length in bytes. 
 +    * type (USHORT) - input : Request type 6 to get display configuration selected to be the target of the next VioSetMode. 
 +    * select (USHORT) - output:Configuration: 
 +      * 0 Default selection algorithm. See VioSetMode. 
 +      * 1 Primary 
 +      * 2 Secondary 
 + 
 +  * VioHandle (HVIO) - input :  Reserved word of 0s. 
 + 
 +===== Return Code ===== 
 + 
 +rc (USHORT) - return:Return code descriptions are: 
 + 
 +  *0 NO_ERROR 
 +  *355 ERROR_VIO_MODE 
 +  *421 ERROR_VIO_INVALID_PARMS 
 +  *436 ERROR_VIO_INVALID_HANDLE 
 +  *438 ERROR_VIO_INVALID_LENGTH 
 +  *465 ERROR_VIO_DETACHED 
 +  *494 ERROR_VIO_EXTENDED_SG 
 + 
 +===== 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. Request type = 6, Get Target VioSetMode Display Configuration, and request type = 5, Get Underline Location, are not supported in the family API.
  
-==Bindings== +===== Bindings ===== 
-===C=== + 
-<PRE>+====C==== 
 +<code c>
 typedef struct _VIOPALSTATE { typedef struct _VIOPALSTATE {
   USHORT  cb;                   /* Length of this structure in bytes */   USHORT  cb;                   /* Length of this structure in bytes */
Line 133: Line 148:
  
 USHORT           rc;            /* return code */ USHORT           rc;            /* return code */
-</PRE>+</code>
  
-===MASM=== +====MASM==== 
-<PRE>+<code c>
 VIOPALSTATE struc VIOPALSTATE struc
   viopal_cb               dw ? ;Length of this structure in bytes   viopal_cb               dw ? ;Length of this structure in bytes
Line 185: Line 200:
  
 Returns WORD Returns WORD
-</PRE>+</code> 
  
-[[Category:Vio]]+{{page>en:templates:fapi}}