en:ibm:prcp:vio:getcurtype

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:ibm:prcp:vio:getcurtype [2016/02/04 10:38] – created valeriusen:ibm:prcp:vio:getcurtype [2016/09/15 05:06] (current) valerius
Line 1: Line 1:
 ==== VioGetCurType ==== ==== VioGetCurType ====
  
-**Bindings**: C, MASM +**Bindings**: [[getcurtype#bindings|C]][[getcurtype#MASM bindings|MASM]]
  
 This call returns the cursor type.  This call returns the cursor type. 
Line 41: Line 41:
  
 In DOS mode, [[en:ibm:prcp:vio:getcurtype|VioGetCurType]] returns only two values for cursorattrib: 0 = visible cursor, and -1 = hidden cursor.  In DOS mode, [[en:ibm:prcp:vio:getcurtype|VioGetCurType]] returns only two values for cursorattrib: 0 = visible cursor, and -1 = hidden cursor. 
 +
 +=== C bindings ===
 +
 +<code c>
 +typedef struct _VIOCURSORINFO {  /* vioci */
 +  USHORT   yStart;               /*cursor start line */
 +  USHORT   cEnd;                 /* cursor end line */
 +  USHORT   cx;                   /* cursor width */
 +  USHORT   attr;                 /* -1=hidden cursor, any other=normal
 +                                       cursor */
 +} VIOCURSORINFO;
 +
 +#define INCL_VIO
 +
 +USHORT  rc = VioGetCurType(CursorData, VioHandle);
 +
 +PVIOCURSORINFO   CursorData;    /* Cursor characteristics */
 +HVIO             VioHandle;     /* Vio handle */
 +
 +USHORT           rc;            /* return code */
 +</code>
 +
 +=== MASM bindings ===
 +
 +<code c>
 +VIOCURSORINFO struc
 +  vioci_yStart dw  ? ;cursor start line
 +  vioci_cEnd   dw  ? ;cursor end line
 +  vioci_cx     dw  ? ;cursor width
 +  vioci_attr   dw  ? ;-1=hidden cursor, any other=normal cursor
 +VIOCURSORINFO ends
 +
 +EXTRN  VioGetCurType:FAR
 +INCL_VIO            EQU 1
 +
 +PUSH@  OTHER   CursorData    ;Cursor characteristics
 +PUSH   WORD    VioHandle     ;Vio handle
 +CALL   VioGetCurType
 +
 +Returns WORD
 +</code>