VioSetCurType: Difference between revisions
m Ak120 moved page OS2 API:CPI:VioSetCurType to VioSetCurType |
mNo edit summary |
||
Line 1: | Line 1: | ||
Sets the cursor type. | Sets the cursor type. | ||
==Syntax== | ==Syntax== | ||
VioSetCurType (CursorData, VioHandle) | |||
==Parameters== | ==Parameters== | ||
; CursorData (PVIOCURSORINFO) - input : Cursor characteristics. | ;CursorData (PVIOCURSORINFO) - input : Cursor characteristics. | ||
Address of the cursor-characteristics structure. | :Address of the cursor-characteristics structure. | ||
;VioHandle (HVIO) - input : VIO presentation-space handle. | |||
:This must be 0, unless the caller is a Presentation Manager application; in this case, it must be the value returned by VioCreatePS. | |||
==Return Code== | ==Return Code== | ||
rc (APIRET) - returns | |||
VioSetCurType returns one of the following values: | VioSetCurType returns one of the following values: | ||
* 0 NO_ERROR | * 0 NO_ERROR | ||
* 355 ERROR_VIO_MODE | * 355 ERROR_VIO_MODE | ||
Line 35: | Line 23: | ||
To set the cursor start line (yStart) and the cursor end line (cEnd) independent of the number of scan lines for each character cell, you can specify these parameters as percentages. The OS/2 operating system then calculates the physical start and end scan lines, respectively, by multiplying the percentage specified for the parameter by the total number of scan lines in the character cell and rounding to the nearest scan line. Percentages are specified as negative values (or 0) in the range 0 through -100. Specifying yStart = -90 and cEnd = -100 requests a cursor that occupies the bottom 10% of the character cell. | To set the cursor start line (yStart) and the cursor end line (cEnd) independent of the number of scan lines for each character cell, you can specify these parameters as percentages. The OS/2 operating system then calculates the physical start and end scan lines, respectively, by multiplying the percentage specified for the parameter by the total number of scan lines in the character cell and rounding to the nearest scan line. Percentages are specified as negative values (or 0) in the range 0 through -100. Specifying yStart = -90 and cEnd = -100 requests a cursor that occupies the bottom 10% of the character cell. | ||
The actual appearance of the cursor is hardware dependent. The video hardware might not support the specified parameters. | The actual appearance of the cursor is hardware dependent. The video hardware might not support the specified parameters. | ||
[[Category: | [[Category:Vio]] |
Revision as of 23:21, 26 February 2017
Sets the cursor type.
Syntax
VioSetCurType (CursorData, VioHandle)
Parameters
- CursorData (PVIOCURSORINFO) - input
- Cursor characteristics.
- Address of the cursor-characteristics structure.
- VioHandle (HVIO) - input
- VIO presentation-space handle.
- This must be 0, unless the caller is a Presentation Manager application; in this case, it must be the value returned by VioCreatePS.
Return Code
rc (APIRET) - returns
VioSetCurType returns one of the following values:
- 0 NO_ERROR
- 355 ERROR_VIO_MODE
- 356 ERROR_VIO_WIDTH
- 421 ERROR_VIO_INVALID_PARMS
- 436 ERROR_VIO_INVALID_HANDLE
- 465 ERROR_VIO_DETACHED
Remarks
To set the cursor start line (yStart) and the cursor end line (cEnd) independent of the number of scan lines for each character cell, you can specify these parameters as percentages. The OS/2 operating system then calculates the physical start and end scan lines, respectively, by multiplying the percentage specified for the parameter by the total number of scan lines in the character cell and rounding to the nearest scan line. Percentages are specified as negative values (or 0) in the range 0 through -100. Specifying yStart = -90 and cEnd = -100 requests a cursor that occupies the bottom 10% of the character cell.
The actual appearance of the cursor is hardware dependent. The video hardware might not support the specified parameters.