Neonode zForce(TM) SDK
AirDevice.h
Go to the documentation of this file.
1 
10 #ifndef DEVICE_SENSORDEVICE_AIRDEVICE_AIRDEVICE_H
11 #define DEVICE_SENSORDEVICE_AIRDEVICE_AIRDEVICE_H 1
12 
13 #ifndef ZFORCECOMMON_H
14  #error Please include "zForceCommon.h" before this file.
15 #endif // ZFORCECOMMON_H
16 
22 struct AirDevice
23 {
47  uint32_t DeviceIndex;
77  void ( * Destructor)(Device * self);
96 
113  bool ( * GetEnable)(SensorDevice * self);
114 
135  bool ( * SetEnable)(SensorDevice * self, bool continuousMode, uint32_t numberOfMessages);
136 
152  bool ( * GetDisable)(SensorDevice * self);
153 
170  bool ( * SetDisable)(SensorDevice * self);
171 
187  bool ( * GetOperationModes)(SensorDevice * self);
188 
210  bool ( * SetOperationModes)(SensorDevice * self, OperationModes modeMask,
211  OperationModes modeValues);
212 
228  bool ( * GetResolution)(SensorDevice * self);
229 
254  bool ( * SetResolution)(SensorDevice * self, uint32_t x, bool xIsValid,
255  uint32_t y, bool yIsValid,
256  uint32_t z, bool zIsValid);
257 
274 
293  bool ( * SetReverseTouchActiveArea)(SensorDevice * self, bool xIsReversed, bool yIsReversed);
294 
310  bool ( * GetFlipXY)(SensorDevice * self);
311 
329  bool ( * SetFlipXY)(SensorDevice * self, bool axesAreFlipped);
330 
347 
364  bool ( * SetReflectiveEdgeFilter)(SensorDevice * self, bool isFilterOn);
365 
381  bool ( * GetMergeTouches)(SensorDevice * self);
382 
399  bool ( * SetMergeTouches)(SensorDevice * self, bool areTouchesMerged);
400 
416  bool ( * GetTouchActiveArea)(SensorDevice * self);
417 
440  bool ( * SetTouchActiveArea)(SensorDevice * self, uint32_t lowerBoundX,
441  uint32_t upperBoundX, bool xIsValid,
442  uint32_t lowerBoundY,
443  uint32_t upperBoundY, bool yIsValid);
444 
461 
482  bool ( * SetDetectedObjectSizeRestriction)(SensorDevice * self, uint32_t minimumSize,
483  uint32_t maximumSize,
484  bool minimumSizeIsValid,
485  bool maximumSizeIsValid);
486 
503 
520  bool ( * SetNumberOfTrackedObjects) (SensorDevice * self, uint32_t numberOfTrackedObjects);
521 
537  bool ( * GetOffset) (SensorDevice * self);
538 
558  bool ( * SetOffset) (SensorDevice * self, uint32_t offsetX, bool offsetXIsValid,
559  uint32_t offsetY, bool offsetYIsValid);
560 
576  bool ( * GetHidDisplaySize) (SensorDevice * self);
577 
597  bool ( * SetHidDisplaySize) (SensorDevice * self, uint32_t sizeX, bool sizeXIsValid,
598  uint32_t sizeY, bool sizeYIsValid);
599 
615  bool ( * GetTouchMode) (SensorDevice * self);
616 
638  bool ( * SetTouchMode) (SensorDevice * self, TouchModes touchMode, bool touchModeIsValid,
639  uint32_t clickOnTouchTime,
640  bool clickOnTouchTimeIsValid,
641  uint32_t clickOnTouchRadius,
642  bool clickOnTouchRadiusIsValid);
643 
660 
680  bool ( * SetFloatingProtection) (SensorDevice * self, bool enabled, bool enabledIsValid,
681  uint32_t time, bool timeIsValid);
682 
696  bool ( * GetSnappingFilter) (SensorDevice * self);
697 
725  bool ( * SetSnappingFilter) (SensorDevice * self, bool enabled, bool enabledIsValid,
726  uint32_t leftInner,
727  uint32_t leftOuter, bool leftIsValid,
728  uint32_t rightInner,
729  uint32_t rightOuter, bool rightIsValid,
730  uint32_t topInner,
731  uint32_t topOuter, bool topIsValid,
732  uint32_t bottomInner,
733  uint32_t bottomOuter, bool bottomIsValid);
734 
749 
771  bool ( * SetDoubleClickPrevention) (SensorDevice * self, bool enabled, bool enabledIsValid,
772  uint32_t doubleClickPreventionTime,
773  bool doubleClickPreventionTimeIsValid,
774  uint32_t doubleClickPreventionRadius,
775  bool doubleClickPreventionRadiusIsValid);
776 };
777 
778 #ifdef __cplusplus
779 extern "C"
780 {
781 #endif // __cplusplus
782 
798 DLLINTERNAL AirDevice * AirDevice_New (Connection * connection, DeviceType deviceType, uint32_t deviceIndex,
799  size_t size);
800 
801 #ifdef __cplusplus
802 }
803 #endif // __cplusplus
804 
805 #endif // DEVICE_SENSORDEVICE_AIRDEVICE_AIRDEVICE_H
DLLINTERNAL AirDevice * AirDevice_New(Connection *connection, DeviceType deviceType, uint32_t deviceIndex, size_t size)
Internal call used to create a new AirDevice.
Struct representing a AirDevice.
Definition: AirDevice.h:23
bool(* GetOperationModes)(SensorDevice *self)
Get the Operating Modes.
Definition: AirDevice.h:187
bool(* SetFlipXY)(SensorDevice *self, bool axesAreFlipped)
Enable/Disable flipping the X- and Y-axes.
Definition: AirDevice.h:329
bool(* SetOperationModes)(SensorDevice *self, OperationModes modeMask, OperationModes modeValues)
Set the Operating Modes.
Definition: AirDevice.h:210
bool(* GetDoubleClickPrevention)(SensorDevice *self)
Get the state of Double-Click Prevention.
Definition: AirDevice.h:748
bool(* GetFlipXY)(SensorDevice *self)
Get the Flip X/Y axes setting.
Definition: AirDevice.h:310
bool(* SetDisable)(SensorDevice *self)
Disable the device.
Definition: AirDevice.h:170
bool(* SetEnable)(SensorDevice *self, bool continuousMode, uint32_t numberOfMessages)
Enable the device.
Definition: AirDevice.h:135
bool(* SetNumberOfTrackedObjects)(SensorDevice *self, uint32_t numberOfTrackedObjects)
Set the number of tracked objects.
Definition: AirDevice.h:520
ReverseTouchActiveArea ReverseTouchActiveArea
Definition: AirDevice.h:95
bool(* SetDetectedObjectSizeRestriction)(SensorDevice *self, uint32_t minimumSize, uint32_t maximumSize, bool minimumSizeIsValid, bool maximumSizeIsValid)
Set the Detected Object Size Restriction.
Definition: AirDevice.h:482
bool(* SetFloatingProtection)(SensorDevice *self, bool enabled, bool enabledIsValid, uint32_t time, bool timeIsValid)
Set Floating Protection.
Definition: AirDevice.h:680
bool(* GetMergeTouches)(SensorDevice *self)
Get the current Merge Touches setting.
Definition: AirDevice.h:381
bool(* SetReflectiveEdgeFilter)(SensorDevice *self, bool isFilterOn)
Enable/Disable the Reflective Edge Filter.
Definition: AirDevice.h:364
TouchActiveArea TouchActiveArea
Definition: AirDevice.h:89
CartesianCoordinates Resolution
Definition: AirDevice.h:83
bool(* SetDoubleClickPrevention)(SensorDevice *self, bool enabled, bool enabledIsValid, uint32_t doubleClickPreventionTime, bool doubleClickPreventionTimeIsValid, uint32_t doubleClickPreventionRadius, bool doubleClickPreventionRadiusIsValid)
Set Double-Click Prevention.
Definition: AirDevice.h:771
bool(* GetSnappingFilter)(SensorDevice *self)
Get the state of Snapping Filter.
Definition: AirDevice.h:696
bool(* GetDisable)(SensorDevice *self)
Ask the Device if it is disabled.
Definition: AirDevice.h:152
Connection * Connection
Definition: AirDevice.h:35
uint32_t DeviceIndex
Definition: AirDevice.h:47
bool(* GetHidDisplaySize)(SensorDevice *self)
Get the Hid Display Size.
Definition: AirDevice.h:576
bool(* GetResolution)(SensorDevice *self)
Get the Resolution.
Definition: AirDevice.h:228
bool(* GetTouchMode)(SensorDevice *self)
Get the Touch Mode.
Definition: AirDevice.h:615
bool(* SetOffset)(SensorDevice *self, uint32_t offsetX, bool offsetXIsValid, uint32_t offsetY, bool offsetYIsValid)
Set the X and Y offsets.
Definition: AirDevice.h:558
uint32_t NumberOfStorageDevices
Definition: AirDevice.h:59
bool(* SetResolution)(SensorDevice *self, uint32_t x, bool xIsValid, uint32_t y, bool yIsValid, uint32_t z, bool zIsValid)
Set the Resolution.
Definition: AirDevice.h:254
DeviceType DeviceType
Definition: AirDevice.h:41
zForce * zForce
Definition: AirDevice.h:29
bool(* SetMergeTouches)(SensorDevice *self, bool areTouchesMerged)
Enable/Disable the Merge Touches setting.
Definition: AirDevice.h:399
bool(* GetTouchActiveArea)(SensorDevice *self)
Get the Touch Active Area.
Definition: AirDevice.h:416
bool(* GetDetectedObjectSizeRestriction)(SensorDevice *self)
Get the Detected Object Size Restriction.
Definition: AirDevice.h:460
bool(* GetOffset)(SensorDevice *self)
Get the X and Y offsets.
Definition: AirDevice.h:537
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: AirDevice.h:725
bool(* GetFloatingProtection)(SensorDevice *self)
Get the state of Floating Protection.
Definition: AirDevice.h:659
bool(* GetEnable)(SensorDevice *self)
Ask the Device if it is enabled.
Definition: AirDevice.h:113
Device ** StorageDevices
Definition: AirDevice.h:53
bool(* GetReflectiveEdgeFilter)(SensorDevice *self)
Get the Reflective Edge Filter setting.
Definition: AirDevice.h:346
bool(* SetTouchMode)(SensorDevice *self, TouchModes touchMode, bool touchModeIsValid, uint32_t clickOnTouchTime, bool clickOnTouchTimeIsValid, uint32_t clickOnTouchRadius, bool clickOnTouchRadiusIsValid)
Set the Touch Mode.
Definition: AirDevice.h:638
void(* Destructor)(Device *self)
Destructor.
Definition: AirDevice.h:77
bool(* GetNumberOfTrackedObjects)(SensorDevice *self)
Get the number of tracked objects.
Definition: AirDevice.h:502
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: AirDevice.h:440
bool(* GetReverseTouchActiveArea)(SensorDevice *self)
Get the X- and Y-axes Reverse setting.
Definition: AirDevice.h:273
bool(* SetReverseTouchActiveArea)(SensorDevice *self, bool xIsReversed, bool yIsReversed)
Enable/Disable Reversing the X- and/or Y-Axes.
Definition: AirDevice.h:293
bool(* SetHidDisplaySize)(SensorDevice *self, uint32_t sizeX, bool sizeXIsValid, uint32_t sizeY, bool sizeYIsValid)
Set the Hid Display Size.
Definition: AirDevice.h:597
void * PrivateProtocolData
Definition: AirDevice.h:65
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
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