en:ibm:prcp:mou:setscalefact

Differences

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

Link to this comparison view

en:ibm:prcp:mou:setscalefact [2016/02/04 07:35] – created valeriusen:ibm:prcp:mou:setscalefact [2016/09/15 04:50] (current) valerius
Line 1: Line 1:
 ==== MouSetScaleFact ==== ==== MouSetScaleFact ====
  
-**Bindings**: C, MASM +**Bindings**: [[setscalefact#bindings|C]][[setscalefact#MASM bindings|MASM]]
  
 This call assigns to the current mouse device driver a new pair of 1-word scaling factors.  This call assigns to the current mouse device driver a new pair of 1-word scaling factors. 
Line 34: Line 34:
  
 The number of pixels moved does not have to correspond 1-to-1 with the number of mickeys the mouse moves. The scaling factor defines a sensitivity for the mouse that is a ratio of the number of mickeys required to move the cursor 8 pixels on the screen. The sensitivity determines at what rate the cursor moves on the screen.  The number of pixels moved does not have to correspond 1-to-1 with the number of mickeys the mouse moves. The scaling factor defines a sensitivity for the mouse that is a ratio of the number of mickeys required to move the cursor 8 pixels on the screen. The sensitivity determines at what rate the cursor moves on the screen. 
 +
 +=== 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 = MouSetScaleFact(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  MouSetScaleFact:FAR
 +INCL_MOU            EQU 1
 +
 +PUSH@  OTHER   ScaleStruct   ;2-word structure
 +PUSH   WORD    DeviceHandle  ;Mouse device handle
 +CALL   MouSetScaleFact
 +
 +Returns WORD
 +</code>