Jump to content

VioSetCurType: Difference between revisions

From EDM2
Created page with "==Description== Sets the cursor type. ==Syntax== <PRE> #define INCL_VIO #include <os2.h> PVIOCURSORINFO CursorData; Cursor characteristics.: HVIO VioH..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Description==
Sets the cursor type.
Sets the cursor type.


==Syntax==
==Syntax==
<PRE>
VioSetCurType (CursorData, VioHandle)
#define INCL_VIO
#include <os2.h>


PVIOCURSORINFO    CursorData;  /*  Cursor characteristics. */
HVIO              VioHandle;  /*  VIO presentation-space handle. */
APIRET            rc;          /*  Return code. */
rc = VioSetCurType(CursorData, VioHandle);
</PRE>
==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.
:This must be 0, unless the caller is a Presentation Manager application; in this case, it must be the value returned by [[VioCreatePS]].


; 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
;rc (APIRET) - returns:VioSetCurType returns one of the following values:
 
*0 NO_ERROR
VioSetCurType returns one of the following values:
*355 ERROR_VIO_MODE
 
*356 ERROR_VIO_WIDTH
* 0     NO_ERROR  
*421 ERROR_VIO_INVALID_PARMS
* 355   ERROR_VIO_MODE  
*436 ERROR_VIO_INVALID_HANDLE
* 356   ERROR_VIO_WIDTH  
*465 ERROR_VIO_DETACHED
* 421   ERROR_VIO_INVALID_PARMS  
* 436   ERROR_VIO_INVALID_HANDLE  
* 465   ERROR_VIO_DETACHED


==Remarks==
==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.
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.
 
==Example Code==
<PRE>
 
</PRE>
==Related Functions==
* [[OS2 API:CPI:
 


[[Category:The OS/2 API Project]]
[[Category:Vio]]

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.