Jump to content

VioSetCurType: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Ak120 (talk | contribs)
mNo edit summary
 
Line 5: Line 5:


==Parameters==
==Parameters==
;CursorData (PVIOCURSORINFO) - input : Cursor characteristics.
;CursorData (P[[VIOCURSORINFO]]) - input : Cursor characteristics.
:Address of the cursor-characteristics structure.
:Address of the cursor-characteristics structure.
;VioHandle (HVIO) - input : VIO presentation-space handle.
;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.
: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
;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  
*356 ERROR_VIO_WIDTH
* 356   ERROR_VIO_WIDTH  
*421 ERROR_VIO_INVALID_PARMS
* 421   ERROR_VIO_INVALID_PARMS  
*436 ERROR_VIO_INVALID_HANDLE
* 436   ERROR_VIO_INVALID_HANDLE  
*465 ERROR_VIO_DETACHED
* 465   ERROR_VIO_DETACHED


==Remarks==
==Remarks==

Latest revision as of 15:39, 28 February 2020

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.