Neonode zForce(TM) SDK
SensorDevice.h
Go to the documentation of this file.
1 
11 #ifndef DEVICE_SENSORDEVICE_SENSORDEVICE_H
12 #define DEVICE_SENSORDEVICE_SENSORDEVICE_H 1
13 
14 #ifndef ZFORCECOMMON_H
15  #error Please include "zForceCommon.h" before this file.
16 #endif // ZFORCECOMMON_H
17 
25 {
49  uint32_t DeviceIndex;
79  void ( * Destructor)(Device * self);
83 
98  bool ( * GetEnable)(SensorDevice * self);
99 
118  bool ( * SetEnable)(SensorDevice * self, bool continuousMode, uint32_t numberOfMessages);
119 
133  bool ( * GetDisable)(SensorDevice * self);
134 
149  bool ( * SetDisable)(SensorDevice * self);
150 
164  bool ( * GetOperationModes)(SensorDevice * self);
165 
185  bool ( * SetOperationModes)(SensorDevice * self, OperationModes modeMask,
186  OperationModes modeValues);
187 
201  bool ( * GetResolution)(SensorDevice * self);
202 
225  bool ( * SetResolution)(SensorDevice * self, uint32_t x, bool xIsValid,
226  uint32_t y, bool yIsValid,
227  uint32_t z, bool zIsValid);
228 
243 
260  bool ( * SetReverseTouchActiveArea)(SensorDevice * self, bool xIsReversed, bool yIsReversed);
261 
275  bool ( * GetFlipXY)(SensorDevice * self);
276 
292  bool ( * SetFlipXY)(SensorDevice * self, bool axesAreFlipped);
293 
308 
323  bool ( * SetReflectiveEdgeFilter)(SensorDevice * self, bool isFilterOn);
324 
338  bool ( * GetMergeTouches)(SensorDevice * self);
339 
354  bool ( * SetMergeTouches)(SensorDevice * self, bool areTouchesMerged);
355 
369  bool ( * GetTouchActiveArea)(SensorDevice * self);
370 
391  bool ( * SetTouchActiveArea)(SensorDevice * self, uint32_t lowerBoundX,
392  uint32_t upperBoundX, bool xIsValid,
393  uint32_t lowerBoundY,
394  uint32_t upperBoundY, bool yIsValid);
395 
410 
429  bool ( * SetDetectedObjectSizeRestriction)(SensorDevice * self, uint32_t minimumSize,
430  uint32_t maximumSize,
431  bool minimumSizeIsValid,
432  bool maximumSizeIsValid);
433 
448 
463  bool ( * SetNumberOfTrackedObjects) (SensorDevice * self, uint32_t numberOfTrackedObjects);
464 
478  bool ( * GetOffset) (SensorDevice * self);
479 
497  bool ( * SetOffset) (SensorDevice * self, uint32_t offsetX, bool offsetXIsValid,
498  uint32_t offsetY, bool offsetYIsValid);
499 
513  bool ( * GetHidDisplaySize) (SensorDevice * self);
514 
532  bool ( * SetHidDisplaySize) (SensorDevice * self, uint32_t sizeX, bool sizeXIsValid,
533  uint32_t sizeY, bool sizeYIsValid);
534 
548  bool ( * GetTouchMode) (SensorDevice * self);
549 
569  bool ( * SetTouchMode) (SensorDevice * self, TouchModes touchMode, bool touchModeIsValid,
570  uint32_t clickOnTouchTime,
571  bool clickOnTouchTimeIsValid,
572  uint32_t clickOnTouchRadius,
573  bool clickOnTouchRadiusIsValid);
574 
589 
607  bool ( * SetFloatingProtection) (SensorDevice * self, bool enabled, bool enabledIsValid,
608  uint32_t time, bool timeIsValid);
609 
623  bool ( * GetSnappingFilter) (SensorDevice * self);
624 
652  bool ( * SetSnappingFilter) (SensorDevice * self, bool enabled, bool enabledIsValid,
653  uint32_t leftInner,
654  uint32_t leftOuter, bool leftIsValid,
655  uint32_t rightInner,
656  uint32_t rightOuter, bool rightIsValid,
657  uint32_t topInner,
658  uint32_t topOuter, bool topIsValid,
659  uint32_t bottomInner,
660  uint32_t bottomOuter, bool bottomIsValid);
661 
676 
698  bool ( * SetDoubleClickPrevention) (SensorDevice * self, bool enabled, bool enabledIsValid,
699  uint32_t doubleClickPreventionTime,
700  bool doubleClickPreventionTimeIsValid,
701  uint32_t doubleClickPreventionRadius,
702  bool doubleClickPreventionRadiusIsValid);
703 };
704 
705 #ifdef __cplusplus
706 extern "C"
707 {
708 #endif // __cplusplus
709 
725 DLLINTERNAL SensorDevice * SensorDevice_New (Connection * connection, DeviceType deviceType, uint32_t deviceIndex,
726  size_t size);
727 
728 #ifdef __cplusplus
729 }
730 #endif // __cplusplus
731 
732 #endif // DEVICE_SENSORDEVICE_SENSORDEVICE_H
DLLINTERNAL SensorDevice * SensorDevice_New(Connection *connection, DeviceType deviceType, uint32_t deviceIndex, size_t size)
Internal call used to create a new SensorDevice.
Struct representing a coordinate.
Definition: zForceTypes.h:206
The main Connection struct.
Definition: Connection.h:66
Device base class.
Definition: Device.h:26
This structure represents whether the Touch Active Area coordinates are reversed or not.
Definition: zForceTypes.h:242
Struct representing a SensorDevice, a meta device.
Definition: SensorDevice.h:25
bool(* GetResolution)(SensorDevice *self)
Get the Resolution.
Definition: SensorDevice.h:201
ReverseTouchActiveArea ReverseTouchActiveArea
Reverse The Touch Active Area of the device.
Definition: SensorDevice.h:82
bool(* GetFlipXY)(SensorDevice *self)
Get the Flip X/Y axes setting.
Definition: SensorDevice.h:275
bool(* GetTouchActiveArea)(SensorDevice *self)
Get the Touch Active Area.
Definition: SensorDevice.h:369
TouchActiveArea TouchActiveArea
Touch Active Area of the device.
Definition: SensorDevice.h:81
bool(* SetFloatingProtection)(SensorDevice *self, bool enabled, bool enabledIsValid, uint32_t time, bool timeIsValid)
Set Floating Protection.
Definition: SensorDevice.h:607
void(* Destructor)(Device *self)
Destructor.
Definition: SensorDevice.h:79
Connection * Connection
Definition: SensorDevice.h:37
uint32_t DeviceIndex
Definition: SensorDevice.h:49
bool(* GetReflectiveEdgeFilter)(SensorDevice *self)
Get the Reflective Edge Filter setting.
Definition: SensorDevice.h:307
bool(* SetDisable)(SensorDevice *self)
Disable the device.
Definition: SensorDevice.h:149
bool(* SetDoubleClickPrevention)(SensorDevice *self, bool enabled, bool enabledIsValid, uint32_t doubleClickPreventionTime, bool doubleClickPreventionTimeIsValid, uint32_t doubleClickPreventionRadius, bool doubleClickPreventionRadiusIsValid)
Set Double-Click Prevention.
Definition: SensorDevice.h:698
Device ** StorageDevices
Definition: SensorDevice.h:55
bool(* SetSnappingFilter)(SensorDevice *self, bool enabled, bool enabledIsValid, uint32_t leftInner, uint32_t leftOuter, bool leftIsValid, uint32_t rightInner, uint32_t rightOuter, bool rightIsValid, uint32_t topInner, uint32_t topOuter, bool topIsValid, uint32_t bottomInner, uint32_t bottomOuter, bool bottomIsValid)
Set Snapping Filter.
Definition: SensorDevice.h:652
bool(* SetTouchMode)(SensorDevice *self, TouchModes touchMode, bool touchModeIsValid, uint32_t clickOnTouchTime, bool clickOnTouchTimeIsValid, uint32_t clickOnTouchRadius, bool clickOnTouchRadiusIsValid)
Set the Touch Mode.
Definition: SensorDevice.h:569
bool(* GetOperationModes)(SensorDevice *self)
Get the Operating Modes.
Definition: SensorDevice.h:164
bool(* SetTouchActiveArea)(SensorDevice *self, uint32_t lowerBoundX, uint32_t upperBoundX, bool xIsValid, uint32_t lowerBoundY, uint32_t upperBoundY, bool yIsValid)
Set the Touch Active Area.
Definition: SensorDevice.h:391
CartesianCoordinates Resolution
Resolution of the device.
Definition: SensorDevice.h:80
bool(* SetEnable)(SensorDevice *self, bool continuousMode, uint32_t numberOfMessages)
Enable the device.
Definition: SensorDevice.h:118
bool(* GetOffset)(SensorDevice *self)
Get the X and Y offsets.
Definition: SensorDevice.h:478
bool(* GetSnappingFilter)(SensorDevice *self)
Get the state of Snapping Filter.
Definition: SensorDevice.h:623
bool(* GetHidDisplaySize)(SensorDevice *self)
Get the Hid Display Size.
Definition: SensorDevice.h:513
bool(* GetTouchMode)(SensorDevice *self)
Get the Touch Mode.
Definition: SensorDevice.h:548
bool(* GetEnable)(SensorDevice *self)
Ask the Device if it is enabled.
Definition: SensorDevice.h:98
void * PrivateProtocolData
Definition: SensorDevice.h:67
bool(* SetOperationModes)(SensorDevice *self, OperationModes modeMask, OperationModes modeValues)
Set the Operating Modes.
Definition: SensorDevice.h:185
bool(* SetNumberOfTrackedObjects)(SensorDevice *self, uint32_t numberOfTrackedObjects)
Set the number of tracked objects.
Definition: SensorDevice.h:463
bool(* SetHidDisplaySize)(SensorDevice *self, uint32_t sizeX, bool sizeXIsValid, uint32_t sizeY, bool sizeYIsValid)
Set the Hid Display Size.
Definition: SensorDevice.h:532
bool(* SetReflectiveEdgeFilter)(SensorDevice *self, bool isFilterOn)
Enable/Disable the Reflective Edge Filter.
Definition: SensorDevice.h:323
bool(* GetDoubleClickPrevention)(SensorDevice *self)
Get the state of Double-Click Prevention.
Definition: SensorDevice.h:675
bool(* GetReverseTouchActiveArea)(SensorDevice *self)
Get the X- and Y-axes Reverse setting.
Definition: SensorDevice.h:242
bool(* GetMergeTouches)(SensorDevice *self)
Get the current Merge Touches setting.
Definition: SensorDevice.h:338
bool(* GetDisable)(SensorDevice *self)
Ask the Device if it is disabled.
Definition: SensorDevice.h:133
bool(* SetDetectedObjectSizeRestriction)(SensorDevice *self, uint32_t minimumSize, uint32_t maximumSize, bool minimumSizeIsValid, bool maximumSizeIsValid)
Set the Detected Object Size Restriction.
Definition: SensorDevice.h:429
bool(* SetMergeTouches)(SensorDevice *self, bool areTouchesMerged)
Enable/Disable the Merge Touches setting.
Definition: SensorDevice.h:354
bool(* GetDetectedObjectSizeRestriction)(SensorDevice *self)
Get the Detected Object Size Restriction.
Definition: SensorDevice.h:409
bool(* SetOffset)(SensorDevice *self, uint32_t offsetX, bool offsetXIsValid, uint32_t offsetY, bool offsetYIsValid)
Set the X and Y offsets.
Definition: SensorDevice.h:497
bool(* GetNumberOfTrackedObjects)(SensorDevice *self)
Get the number of tracked objects.
Definition: SensorDevice.h:447
bool(* SetReverseTouchActiveArea)(SensorDevice *self, bool xIsReversed, bool yIsReversed)
Enable/Disable Reversing the X- and/or Y-Axes.
Definition: SensorDevice.h:260
bool(* SetResolution)(SensorDevice *self, uint32_t x, bool xIsValid, uint32_t y, bool yIsValid, uint32_t z, bool zIsValid)
Set the Resolution.
Definition: SensorDevice.h:225
uint32_t NumberOfStorageDevices
Definition: SensorDevice.h:61
bool(* SetFlipXY)(SensorDevice *self, bool axesAreFlipped)
Enable/Disable flipping the X- and Y-axes.
Definition: SensorDevice.h:292
zForce * zForce
Definition: SensorDevice.h:31
DeviceType DeviceType
Definition: SensorDevice.h:43
bool(* GetFloatingProtection)(SensorDevice *self)
Get the state of Floating Protection.
Definition: SensorDevice.h:588
This structure represents the Touch Active Area of a sensor.
Definition: zForceTypes.h:224
Main struct.
Definition: zForce.h:29
TouchModes
Enum describing what touch mode a device can be in.
Definition: zForceTypes.h:191
DeviceType
Enum describing the different device types that exists.
Definition: zForceTypes.h:90
OperationModes
Enum describing the OperationModes that a sensor can operate in.
Definition: zForceTypes.h:155