The text of a manual · part 21 of 23
VRC 4000 Software Driver Manual: Appendix E TWDriver Application Programming Interface, pages 180 to 188
Pages 180 to 188 of 206, from VRC 4000 Software Driver Manual
The original document is the PDF (1.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Symbol VRC-4000
Page 180
VRC 4000 Software Driver Manual
BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE WORD BYTE BYTE BYTE BYTE BYTE WORD WORD WORD BYTE } TTWInfo;
CalFileOK; AutoReInit; TSname[60]; InitStatus; EvalVersion; Zsupport; ARIsupport; Down1; Up1; Down2; Up2; Down3; Up3; SoundOff; NumScreens; PortType: Baud: Parity: Databits: Stopbits: IRQshare: ReArm: OverrunErrs: ParityErrs: FramingErrs: RFU[100];
/* 0 = OK or a DOS file error */ /* 0 = Disabled, 1 = Enabled */ /* touchScreen name, $ terminated */ /* initialisation status, 1 = OK */ /* 0=Production, 1=Evaluation */ /* 1 = Z supported ; 0 = not */ /* 1 = ARI supported ; 0 = not */ /* ButtonDown1 setting */ /* ButtonUp1 setting */ /* ButtonDown2 setting */ /* ButtonUp2 setting */ /* ButtonDown3 setting */ /* ButtonUp3 setting */ /* 1 = Sound Off ; 0 = On */ /* Number of touchscreens */ /* 1 = Serial ; 2 = Bus ; 3 = Other */ /* 1200, 2400, 4800, or 9600 */ /* 'N', 'O', 'E' */ /* '7' or '8' */ /* '1' or '2' */ /* 1 = On ; 0 = Off */ /* 1 = On ; 0 = Off */ /* Count of overrun errors */ /* count of parity errors */ /* count of framing errors */ /* Reserved for future use */
Note: CalibFilePath is actually the Windows directory pathname, with the calibration filename (TWcalib) appended. There will always be a pathname here, whether or not the file actually exists. CalFileOK is set to 0 if the file is found, if the correct number of bytes were read from it, the file version number was correct, and the hardware type matched the current touchscreen. Otherwise
E-10
Page 181
Appendix E: TWDriver Application Programming Interface it is set to the DOS error code returned on opening or reading the file, or: E1: E2: E3:
File length wrong Incorrect file version ID Incorrect hardware type
AutoInit is false if AutoReInit=No in WIN.INI, otherwise it is set true.
E-11
Page 182
VRC 4000 Software Driver Manual
Function:
TWSetButtonMode
Syntax:TWSetButtonMode(wTWButtonMode,bDown1,bUp1,bDown2,bUp2,bDown3,bUp3) Description:
This function sets the ButtonMode used by TWdriver. See the TWdriver User documentation for a description of ButtonModes.
Parameters:
wTWButtonMode. Must be 0, 1, 2, 3, 4, 5, or 6. bDown1 defines the event for first button press. bUp1 defines the event for first button release. bDown2 defines the event for second button press. bUp2 defines the event for second button release. bDown3 defines the event for subsequent button presses. bUp3 defines the event for subsequent button releases. The values for bDown1 .. bUp3 are: 0 = None 1 = Immediate 2 = Touchdown 4 = Liftoff 8 = Time 16 = Tap 32 = Zpress 64 = Zrelease ButtonMode 0 means “User Defined Button Mode”, in which case bDown1 .. bUp3 may take any set of legal values. ButtonModes 1 - 6 have pre-defined configurations, which the caller must specify when calling this function: ButtonMode 1: ButtonMode 2: ButtonMode 3: ButtonMode 4: ButtonMode 5: ButtonMode 6:
E-12
2,4,2,4,2,4 8,4,0,0,0,0 8,4,16,4,0,0 16,4,16,4,16,4 8,8,1,4,0,0 4,1,4,1,4,1
Page 183
Appendix E: TWDriver Application Programming Interface
Function:
TWSetClickTime
Syntax:
TWSetClickTime(wTWClickTime)
Description:
This function sets the ClickTime used by TWdriver. See the TWdriver User documentation for a description of ClickTime.
Parameter:
wTWClickTime
E-13
Page 184
VRC 4000 Software Driver Manual
Function: Syntax:
TWSetSensitivity TWSetSensitivity(wTWSensitivity)
Description:
This function sets the Sensitivity used by TWdriver. See the TWdriver User documentation for a description of Sensitivity.
Parameter:
wTWSensitivity. A value of zero restores the default value for the touchscreen in use.
E-14
Page 185
Appendix E: TWDriver Application Programming Interface
Function:
TWSetStabilisation
Syntax:
TWSetStabilisation(wTWStabilisation)
Description:
This function sets the Stabilization used by TWdriver. See the TWdriver User documentation for a description of Stabilization.
Parameter:
wTWStabilisation. A value of zero restores the default value for the touchscreen in use.
E-15
Page 186
VRC 4000 Software Driver Manual
Function: Syntax:
TWSetButton
Description:
This function sets the Button to be emulated by TWdriver.
Parameter:
bTWButton. 0 for Left, 1 for Right, 2 for Both. Any other value is ignored.
E-16
TWSetButton(bTWButton)
Page 187
Appendix E: TWDriver Application Programming Interface
Function: Syntax:
TWSetTouchOffset
Description:
This function sets the TouchOffset used by TWdriver. See the TWdriver User documentation for a description of TouchOffset.
Parameter:
bTWTouchOffset. 0 = Touch offset off. 1 = Touch offset on.
TWSetTouchOffset(bTWTouchOffset)
E-17
Page 188
VRC 4000 Software Driver Manual
Function: Syntax:
TWSetSound
Description:
This function sets Sound On or Off.
Parameter:
bTWSound. 0 = Sound On. 1 = Sound Off.
E-18
TWSetSound(bTWSound)