Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| en:docs:fapi:viosetstate [2021/09/05 06:20] – created prokushev | en:docs:fapi:viosetstate [2021/11/04 12:45] (current) – prokushev | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | {{page> | ||
| + | |||
| + | ====== VioSetState ====== | ||
| + | |||
| This call performs one of the following functions; set palette registers, sets the overscan (border) colour, set the blink/ | This call performs one of the following functions; set palette registers, sets the overscan (border) colour, set the blink/ | ||
| - | ==Syntax== | + | ===== Syntax ===== | 
| + | <code c> | ||
|   |   | ||
| + | </ | ||
| + | ===== Parameters ===== | ||
| + | |||
| + | * RequestBlock (PVOID) - input : Address of the video state structures consisting of six different structures depending on the request type: | ||
| + | * 0 - Set palette registers | ||
| + | * 1 - Set overscan (border) color | ||
| + |     * 2 - Set blink/ | ||
| + |     * 3 - Set color registers  | ||
| + |     * 4 - Reserved  | ||
| + |     * 5 - Set underline location  | ||
| + |     * 6 - Set target VioSetMode display configuration  | ||
| + | * 7 - Reserved | ||
| - | ==Parameters== | ||
| - | ; | ||
| - | ::0 - Set palette registers | ||
| - | ::1 - Set overscan (border) color | ||
| - | ::2 - Set blink/ | ||
| - | ::3 - Set color registers  | ||
| - | ::4 - Reserved  | ||
| - | ::5 - Set underline location  | ||
| - | ::6 - Set target VioSetMode display configuration  | ||
| - | ::7 - Reserved | ||
| The six structures, depending on request type, are: | The six structures, depending on request type, are: | ||
| - | {|class=" | ||
| - | ! ||Applies to||length (USHORT) - input : Length of structure, including length.||reqtype (USHORT) - input|| | ||
| - | |- | ||
| - | |VIOPALSTATE||EGA, | ||
| - | :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)/ | ||
| - | |- | ||
| - | |VIOOVERSCAN||CGA, | ||
| - | |- | ||
| - | |VIOINTENSITY||CGA, | ||
| - | :switch (USHORT) - input : Switch set as: | ||
| - | ::0 - Blinking foreground colors enabled. | ||
| - | ::1 - High intensity background colors enabled. | ||
| - | |- | ||
| - | |VIOCOLORREG||VGA, | ||
| - | :first color (USHORT) - input : First color register to set in the color register sequence; must be specified in the range 0 through 255. The color registers are set in sequential order. | ||
| - | :number color (USHORT) - input : Number of color registers to set; must be specified in the range 1 through 256. | ||
| - | :datarea (PCH) - input : Far address of a data area containing one three-byte entry for each color register to be set. The format of each entry is as follows: | ||
| - | ::Byte 1 - Red value | ||
| - | ::Byte 2 - Green value | ||
| - | ::Byte 3 - Blue value | ||
| - | |- | ||
| - | | || || ||4|| | ||
| - | |- | ||
| - | |VIOSETULINELOC||EGA, | ||
| - | :scanline (USHORT) - input : Scan line minus 1. Values of 0 through 31 are acceptable. A value of 32 means underlining is disabled.  | ||
| - | |- | ||
| - | |VIOSETTARGET|| ||Only valid value.||Request type 6 to set display configuration to be the target of the next VioSetMode.|| | ||
| - | :select (USHORT) - input : Configuration: | ||
| - | ::0 - Default selection algorithm. See VioSetMode. | ||
| - | ::1 - Primary | ||
| - | ::2 - Secondary | ||
| - | |} | ||
| - | ;VioHandle (HVIO) - input : Reserved word of 0s. | ||
| - | ==Return Code== | + | ^ ^ Applies to ^ length (USHORT) - input : Length of structure, including length. ^ reqtype (USHORT) - input ^ ^ | 
| + | | VIOPALSTATE | EGA, VGA, or IBM Personal System/2 Display Adapter | 38 - Maximum valid value |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)/ | ||
| + | |VIOOVERSCAN|CGA, | ||
| + | |VIOINTENSITY|CGA, | ||
| + | | ::: | ::: | ::: | ::: | 0 - Blinking foreground colors enabled. | | ||
| + | | ::: | ::: | ::: | ::: | 1 - High intensity background colors enabled. | | ||
| + | |VIOCOLORREG|VGA, | ||
| + | | ::: | ::: | ::: | ::: |number color (USHORT) - input : Number of color registers to set; must be specified in the range 1 through 256. | | ||
| + | | ::: | ::: | ::: | ::: |datarea (PCH) - input : Far address of a data area containing one three-byte entry for each color register to be set. The format of each entry is as follows: | | ||
| + | | ::: | ::: | ::: | ::: |Byte 1 - Red value | | ||
| + | | ::: | ::: | ::: | ::: |Byte 2 - Green value | | ||
| + | | ::: | ::: | ::: | ::: |Byte 3 - Blue value | | ||
| + | |VIOSETULINELOC|EGA, | ||
| + | |VIOSETTARGET| |Only valid value.|Request type 6 to set display configuration to be the target of the next VioSetMode.| :select (USHORT) - input : Configuration: | ||
| + | | ::: | ::: | ::: | ::: | 0 - Default selection algorithm. See VioSetMode. | | ||
| + | | ::: | ::: | ::: | ::: | 1 - Primary | | ||
| + | | ::: | ::: | ::: | ::: | 2 - Secondary | | ||
| + | |||
| + | * VioHandle (HVIO) - input : Reserved word of 0s. | ||
| + | |||
| + | ===== Return Code ===== | ||
| ;rc (USHORT) - return: | ;rc (USHORT) - return: | ||
| *0 NO_ERROR | *0 NO_ERROR | ||
| Line 60: | Line 55: | ||
| *494 ERROR_VIO_EXTENDED_SG | *494 ERROR_VIO_EXTENDED_SG | ||
| - | ===Family API Considerations=== | + | ===== Remarks ===== | 
| + | |||
| + | ==== Family API Considerations ==== | ||
| Request type = 6, Set Target VioSetMode Display Configuration, | Request type = 6, Set Target VioSetMode Display Configuration, | ||
| Set Underline Location, are not supported in the family API. | Set Underline Location, are not supported in the family API. | ||
| Some options operate differently in the DOS mode than in the OS/2 mode. Therefore, the following considerations applies to VioSetMode when coding for the DOS mode: | Some options operate differently in the DOS mode than in the OS/2 mode. Therefore, the following considerations applies to VioSetMode when coding for the DOS mode: | ||
| - | * VioSetMode clears the screen. | ||
| - | ==Bindings== | + | * VioSetMode clears the screen. | 
| - | === C === | + | |
| - | <PRE> | + | ===== Bindings ===== | 
| + | |||
| + | ==== C ==== | ||
| + | <code c> | ||
| typedef struct _VIOPALSTATE { | typedef struct _VIOPALSTATE { | ||
|   USHORT  |   USHORT  | ||
| Line 125: | Line 125: | ||
| USHORT  | USHORT  | ||
| - | </PRE> | + | </code> | 
| - | ===MASM=== | + | ====MASM==== | 
| - | <PRE> | + | <code asm> | 
| VIOPALSTATE struc | VIOPALSTATE struc | ||
|   viopal_cb  |   viopal_cb  | ||
| Line 177: | Line 177: | ||
| Returns WORD | Returns WORD | ||
| - | </PRE> | + | </code> | 
| [[http:// | [[http:// | ||
| + | |||
| + | {{page> | ||




