en:ibm:prcp:mou:getscalefact

Differences

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

Link to this comparison view

en:ibm:prcp:mou:getscalefact [2016/02/04 05:20] – created valeriusen:ibm:prcp:mou:getscalefact [2016/09/15 04:07] (current) valerius
Line 1: Line 1:
 ==== MouGetScaleFact ==== ==== MouGetScaleFact ====
  
-**Bindings**: C, MASM +**Bindings**: [[getscalefact#bindings|C]][[getscalefact#MASM bindings|MASM]]
  
 This call returns a pair of 1-word scaling factors for the current mouse device.  This call returns a pair of 1-word scaling factors for the current mouse device. 
Line 35: Line 35:
 The units of the scale factor depend on the mode of the display screen for the session. If the screen is operating in text mode, the scaling units are relative to characters. If the screen is  The units of the scale factor depend on the mode of the display screen for the session. If the screen is operating in text mode, the scaling units are relative to characters. If the screen is 
 operating in graphics mode, the scaling units are relative to pels.  operating in graphics mode, the scaling units are relative to pels. 
 +
 +=== C bindings ===
 +
 +<code c>
 +typedef struct _SCALEFACT {   /* mousc */
 +  USHORT rowScale;            /* row scaling factor */
 +  USHORT colScale;            /* column coordinate scaling factor */
 +} SCALEFACT;
 +
 +#define INCL_MOU
 +
 +USHORT  rc = MouGetScaleFact(ScaleStruct, DeviceHandle);
 +
 +PSCALEFACT       ScaleStruct;   /* 2-word structure */
 +HMOU             DeviceHandle;  /* Mouse device handle */
 +
 +USHORT           rc;            /* return code */
 +</code>
 +
 +=== MASM bindings ===
 +
 +<code asm>
 +SCALEFACT struc
 +  mousc_rowScale  dw  ? ;row scaling factor
 +  mousc_colScale  dw  ? ;column coordinate scaling factor
 +SCALEFACT ends
 +
 +EXTRN  MouGetScaleFact:FAR
 +INCL_MOU            EQU 1
 +
 +PUSH@  OTHER   ScaleStruct   ;2-word structure
 +PUSH   WORD    DeviceHandle  ;Mouse device handle
 +CALL   MouGetScaleFact
 +
 +Returns WORD
 +</code>