Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
en:docs:fapi:viosetmode [2018/09/01 10:05] – created prokushev | en:docs:fapi:viosetmode [2021/08/27 12:45] – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{page> | ||
+ | |||
+ | ====== VioSetMode ====== | ||
+ | |||
This call sets the mode of the display. | This call sets the mode of the display. | ||
==Syntax== | ==Syntax== | ||
+ | |||
| | ||
Line 41: | Line 46: | ||
rc (USHORT) - return | rc (USHORT) - return | ||
Return code descriptions are: | Return code descriptions are: | ||
- | *0 | + | |
- | *355 ERROR_VIO_MODE | + | *355 ERROR_VIO_MODE |
- | *430 ERROR_VIO_ILLEGAL_DURING_POPUP | + | *430 ERROR_VIO_ILLEGAL_DURING_POPUP |
- | *436 ERROR_VIO_INVALID_HANDLE | + | *436 ERROR_VIO_INVALID_HANDLE |
- | *438 ERROR_VIO_INVALID_LENGTH | + | *438 ERROR_VIO_INVALID_LENGTH |
- | *465 ERROR_VIO_DETACHED | + | *465 ERROR_VIO_DETACHED |
- | *467 ERROR_VIO_FONT | + | *467 ERROR_VIO_FONT |
- | *468 ERROR_VIO_USER_FONT | + | *468 ERROR_VIO_USER_FONT |
- | *494 ERROR_VIO_EXTENDED_SG | + | *494 ERROR_VIO_EXTENDED_SG |
==Remarks== | ==Remarks== | ||
Line 67: | Line 72: | ||
Note: Although graphics mode support is provided in VioSetMode, this support is not provided by the Base Video Handlers provided with OS/2. | Note: Although graphics mode support is provided in VioSetMode, this support is not provided by the Base Video Handlers provided with OS/2. | ||
- | {|class=" | + | |
- | |+Table 5-1. Display Mode Attributes Supported by Adapters | + | Table 5-1. Display Mode Attributes Supported by Adapters |
- | |- | + | |
- | !BIOS MODE||TYPE||COLOR||COLS||ROWS||HRES||VRES||VALID ADAPTER/ | + | ^BIOS MODE^TYPE^COLOR^COLS^ROWS^HRES^VRES^VALID ADAPTER/ |
- | |- | + | |0|5|4|40|25|320|200|[CGA/ |
- | |0||5||4||40||25||320||200||[CGA/CD], CGA/Comp, [EGA/CD], [EGA/ECD], VGA/Mono, VGA/Color, VGA/Plasma | + | |0*|5|4|40|25|320|350|[EGA/ |
- | |- | + | |0+|5|4|40|25|360|400|VGA/ |
- | |0*||5||4||40||25||320||350||[EGA/ECD], VGA/Mono, VGA/Color, VGA/Plasma | + | |0# |
- | |- | + | |1|1|4|40|25|320|200|CGA/ |
- | |0+||5||4||40||25||360||400||VGA/Mono, VGA/Color | + | |1*|1|4|40|25|320|350|EGA/ |
- | |- | + | |1+|1|4|40|25|360|400|[VGA/ |
- | |0#||5||4|| 40||25||320||400||VGA/Mono, VGA/Color, VGA/Plasma | + | |1# |
- | |- | + | |2|5|4|80|25|640|200|[CGA/ |
- | |1||1||4||40||25||320||200||CGA/CD, CGA/Comp, EGA/CD, EGA/ECD, [VGA/Mono], VGA/Color, [VGA/ | + | |2*|5|4|80|25|640|350|[EGA/ |
- | |- | + | |2+|5|4|80|25|720|400|VGA/ |
- | |1*||1||4|| 40||25||320||350||EGA/ECD, [VGA/Mono], VGA/Color, [VGA/ | + | |2# |
- | |- | + | |3|1|4|80|25|640|200|CGA/ |
- | |1+||1||4|| 40||25||360||400||[VGA/ | + | |3*|1|4|80|25|640|350|EGA/ |
- | |- | + | |3+|1|4|80|25|720|400|[VGA/ |
- | |1#||1||4||40||25||320||400||[VGA/ | + | |3# |
- | |- | + | |7|0|0|80|25|720|350|MPA/ |
- | ||2||5||4||80||25||640||200||[CGA/CD], CGA/Comp, [EGA/CD], [EGA/ECD], VGA/Mono, VGA/Color, VGA/Plasma | + | |7+|0|0|80|25|720|400|VGA/ |
- | |- | + | |7# |
- | ||2*||5||4||80||25||640||350||[EGA/ECD], VGA/Mono, VGA/Color, VGA/Plasma | + | |n/ |
- | |- | + | |n/ |
- | |2+||5||4||80||25||720||400||VGA/Mono, VGA/Color | + | |n/ |
- | |- | + | |4|3|2|[40]|[25]|320|200|CGA/ |
- | |2#||5||4||80||25||640||400||VGA/Mono, VGA/Color, VGA/Plasma | + | |5|7|2|[40]|[25]|320|200|[CGA/ |
- | |- | + | |6|3|1|[80]|[25]|640|200|CGA/ |
- | |3||1||4||80||25||640||200||CGA/CD, CGA/Comp, EGA/CD, EGA/ECD, [VGA/Mono], VGA/Color, [VGA/ | + | |D|3|4|[40]|[25]|320|200|EGA/ |
- | |- | + | |E|3|4|[80]|[25]|640|200|EGA/ |
- | |3*||1||4||80||25||640||350||EGA/ECD, [VGA/Mono], VGA/Color, [VGA/ | + | |F|2|0|[80]|[25]|640|350|EGA/ |
- | |- | + | |10|3|4|[80]|[25]|640|350|EGA/ |
- | |3+||1||4||80||25||720||400||[VGA/ | + | |11|3|1|[80]|[30]|640|480|VGA/ |
- | |- | + | |12|3|4|[80]|[30]|640|480|[VGA/ |
- | |3#||1||4|| 80||25||640||400||[VGA/ | + | |13|3|8|[40]|[25]|320|200|[VGA/ |
- | |- | + | |n/ |
- | |7||0||0||80||25||720||350||MPA/MD, EGA/MD, VGA/Mono, VGA/Color | + | |n/ |
- | |- | + | |n/ |
- | |7+||0||0||80||25||720||400||VGA/Mono, VGA/Color | + | |n/ |
- | |- | + | |
- | |7#||0||0||80||25||640||400||VGA/Mono, VGA/Color, VGA/Plasma | + | MPA |
- | |- | + | CGA Color Graphics Adapter |
- | |n/a||0||0||80||25||640||350||VGA/Mono, VGA/Color, VGA/Plasma | + | EGA |
- | |- | + | VGA Video Graphics Array, PS/2 Display Adapter |
- | |n/a||1||4||80||30||720||480||[VGA/ | + | 8514A |
- | |- | + | |
- | |n/a||1||4|| 80||30||640||480||[VGA/ | + | MD 5151 Monochrome Display |
- | |- | + | CD 5153 Color Display |
- | |4||3||2||[40]||[25]||320||200||CGA/CD, CGA/Comp, EGA/CD, EGA/ECD, [VGA/Mono], VGA/ | + | ECD 5154 Enhanced Color Display |
- | |- | + | MONO 8503 PS/2 Monochrome Display, 8507/8604 Display |
- | |5||7||2||[40]||[25]||320||200||[CGA/CD], CGA/Comp, [EGA/CD], [EGA/ECD], VGA/Mono, VGA/Color, VGA/Plasma | + | HMONO |
- | |- | + | COLOR |
- | |6||3||1||[80]||[25]||640||200||CGA/CD, CGA/Comp, EGA/CD, EGA/ECD, VGA/Mono, VGA/Color, VGA/Plasma | + | HCOLOR |
- | |- | + | PLASMA |
- | |D||3||4||[40]||[25]||320||200||EGA/CD, EGA/ECD, [VGA/Mono], VGA/Color, [VGA/ | + | COMP Composite Video Monitor |
- | |- | + | |
- | |E||3||4||[80]||[25]||640||200||EGA/CD, EGA/ECD, [VGA/Mono], VGA/Color, [VGA/ | + | |
- | |- | + | |
- | |F||2||0||[80]||[25]||640||350||EGA/MD, VGA/Mono, VGA/Color, VGA/Plasma | + | |
- | |- | + | |
- | |10||3||4||[80]||[25]||640||350||EGA/ECD, [VGA/Mono], VGA/Color, [VGA/ | + | |
- | |- | + | |
- | |11||3||1||[80]||[30]||640||480||VGA/Mono, VGA/Color, VGA/Plasma | + | |
- | |- | + | |
- | |12||3||4||[80]||[30]||640||480||[VGA/ | + | |
- | |- | + | |
- | |13||3||8||[40]||[25]||320||200||[VGA/ | + | |
- | |- | + | |
- | |n/a||11||8||[80]||[30]||640||480||[8514A/ | + | |
- | |- | + | |
- | |n/a||11||4||[80]||[30]||640||480||[8514A/ | + | |
- | |- | + | |
- | |n/a||11||8||[85]||[38]||1024||768||[8514A/ | + | |
- | |- | + | |
- | |n/a||11||4||[85]||[38]||1024||768||[8514A/ | + | |
- | |- | + | |
- | |colspan=8|Display Adapters: | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | |- | + | |
- | |colspan=8|Displays: | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
Notes: | Notes: | ||
Line 166: | Line 133: | ||
#For BIOS modes 0, 2, 5, the color burst is disabled on the CGA and VGA. | #For BIOS modes 0, 2, 5, the color burst is disabled on the CGA and VGA. | ||
#The Personal System/2 Display Adapter 8514/A™ has advanced function modes, which are supported through the 8514/A display adapter interface, not the VIO Subsystem. Refer to the '' | #The Personal System/2 Display Adapter 8514/A™ has advanced function modes, which are supported through the 8514/A display adapter interface, not the VIO Subsystem. Refer to the '' | ||
- | |} | + | |
Note: For text modes in full-screen, | Note: For text modes in full-screen, | ||
===PM Considerations=== | ===PM Considerations=== | ||
+ | |||
Windowable VIO sessions support only 80-column, color text modes. When VioSetMode is called from a Windowable VIO session, it only verifies that an 80-column text mode was requested, with Text Rows between 1 and 255. The resulting mode, which can be queried using VioGetMode, always has Type = 1, Color = 4, Text Columns = 80, Text Rows = requested Text Rows, Horizontal Resolution = 640, and Vertical Resolution = 16 * (Text Rows). | Windowable VIO sessions support only 80-column, color text modes. When VioSetMode is called from a Windowable VIO session, it only verifies that an 80-column text mode was requested, with Text Rows between 1 and 255. The resulting mode, which can be queried using VioGetMode, always has Type = 1, Color = 4, Text Columns = 80, Text Rows = requested Text Rows, Horizontal Resolution = 640, and Vertical Resolution = 16 * (Text Rows). | ||
===Family API Considerations=== | ===Family API Considerations=== | ||
+ | |||
Some options operate differently in the DOS mode than in the OS/2 mode. Therefore, the following consideration 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 consideration applies to VioSetMode when coding for the DOS mode: | ||
Line 209: | Line 178: | ||
===MASM Binding=== | ===MASM Binding=== | ||
- | <PRE> | + | <code asm> |
VIOMODEINFO struc | VIOMODEINFO struc | ||
viomi_cb | viomi_cb | ||
Line 235: | Line 204: | ||
Returns WORD | Returns WORD | ||
- | </PRE> | + | </code> |