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 {
29 zForce * zForce;
35 Connection * Connection;
41 DeviceType DeviceType;
47 uint32_t DeviceIndex;
53 Device ** StorageDevices;
59 uint32_t NumberOfStorageDevices;
65 void * PrivateProtocolData;
77 void ( * Destructor)(Device * self);
83 CartesianCoordinates Resolution;
89 TouchActiveArea TouchActiveArea;
95 ReverseTouchActiveArea ReverseTouchActiveArea;
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
273 bool ( * GetReverseTouchActiveArea)(SensorDevice * self);
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
346 bool ( * GetReflectiveEdgeFilter)(SensorDevice * self);
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
460 bool ( * GetDetectedObjectSizeRestriction)(SensorDevice * self);
461
482 bool ( * SetDetectedObjectSizeRestriction)(SensorDevice * self, uint32_t minimumSize,
483 uint32_t maximumSize,
484 bool minimumSizeIsValid,
485 bool maximumSizeIsValid);
486
502 bool ( * GetNumberOfTrackedObjects) (SensorDevice * self);
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
659 bool ( * GetFloatingProtection) (SensorDevice * self);
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
748 bool ( * GetDoubleClickPrevention) (SensorDevice * self);
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
AirDevice_New
DLLINTERNAL AirDevice * AirDevice_New(Connection *connection, DeviceType deviceType, uint32_t deviceIndex, size_t size)
Internal call used to create a new AirDevice.
AirDevice
Struct representing a AirDevice.
Definition: AirDevice.h:23
AirDevice::GetOperationModes
bool(* GetOperationModes)(SensorDevice *self)
Get the Operating Modes.
Definition: AirDevice.h:187
AirDevice::SetFlipXY
bool(* SetFlipXY)(SensorDevice *self, bool axesAreFlipped)
Enable/Disable flipping the X- and Y-axes.
Definition: AirDevice.h:329
AirDevice::SetOperationModes
bool(* SetOperationModes)(SensorDevice *self, OperationModes modeMask, OperationModes modeValues)
Set the Operating Modes.
Definition: AirDevice.h:210
AirDevice::GetDoubleClickPrevention
bool(* GetDoubleClickPrevention)(SensorDevice *self)
Get the state of Double-Click Prevention.
Definition: AirDevice.h:748
AirDevice::GetFlipXY
bool(* GetFlipXY)(SensorDevice *self)
Get the Flip X/Y axes setting.
Definition: AirDevice.h:310
AirDevice::SetDisable
bool(* SetDisable)(SensorDevice *self)
Disable the device.
Definition: AirDevice.h:170
AirDevice::SetEnable
bool(* SetEnable)(SensorDevice *self, bool continuousMode, uint32_t numberOfMessages)
Enable the device.
Definition: AirDevice.h:135
AirDevice::SetNumberOfTrackedObjects
bool(* SetNumberOfTrackedObjects)(SensorDevice *self, uint32_t numberOfTrackedObjects)
Set the number of tracked objects.
Definition: AirDevice.h:520
AirDevice::ReverseTouchActiveArea
ReverseTouchActiveArea ReverseTouchActiveArea
Definition: AirDevice.h:95
AirDevice::SetDetectedObjectSizeRestriction
bool(* SetDetectedObjectSizeRestriction)(SensorDevice *self, uint32_t minimumSize, uint32_t maximumSize, bool minimumSizeIsValid, bool maximumSizeIsValid)
Set the Detected Object Size Restriction.
Definition: AirDevice.h:482
AirDevice::SetFloatingProtection
bool(* SetFloatingProtection)(SensorDevice *self, bool enabled, bool enabledIsValid, uint32_t time, bool timeIsValid)
Set Floating Protection.
Definition: AirDevice.h:680
AirDevice::GetMergeTouches
bool(* GetMergeTouches)(SensorDevice *self)
Get the current Merge Touches setting.
Definition: AirDevice.h:381
AirDevice::SetReflectiveEdgeFilter
bool(* SetReflectiveEdgeFilter)(SensorDevice *self, bool isFilterOn)
Enable/Disable the Reflective Edge Filter.
Definition: AirDevice.h:364
AirDevice::TouchActiveArea
TouchActiveArea TouchActiveArea
Definition: AirDevice.h:89
AirDevice::Resolution
CartesianCoordinates Resolution
Definition: AirDevice.h:83
AirDevice::SetDoubleClickPrevention
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
AirDevice::GetSnappingFilter
bool(* GetSnappingFilter)(SensorDevice *self)
Get the state of Snapping Filter.
Definition: AirDevice.h:696
AirDevice::GetDisable
bool(* GetDisable)(SensorDevice *self)
Ask the Device if it is disabled.
Definition: AirDevice.h:152
AirDevice::Connection
Connection * Connection
Definition: AirDevice.h:35
AirDevice::DeviceIndex
uint32_t DeviceIndex
Definition: AirDevice.h:47
AirDevice::GetHidDisplaySize
bool(* GetHidDisplaySize)(SensorDevice *self)
Get the Hid Display Size.
Definition: AirDevice.h:576
AirDevice::GetResolution
bool(* GetResolution)(SensorDevice *self)
Get the Resolution.
Definition: AirDevice.h:228
AirDevice::GetTouchMode
bool(* GetTouchMode)(SensorDevice *self)
Get the Touch Mode.
Definition: AirDevice.h:615
AirDevice::SetOffset
bool(* SetOffset)(SensorDevice *self, uint32_t offsetX, bool offsetXIsValid, uint32_t offsetY, bool offsetYIsValid)
Set the X and Y offsets.
Definition: AirDevice.h:558
AirDevice::NumberOfStorageDevices
uint32_t NumberOfStorageDevices
Definition: AirDevice.h:59
AirDevice::SetResolution
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
AirDevice::DeviceType
DeviceType DeviceType
Definition: AirDevice.h:41
AirDevice::zForce
zForce * zForce
Definition: AirDevice.h:29
AirDevice::SetMergeTouches
bool(* SetMergeTouches)(SensorDevice *self, bool areTouchesMerged)
Enable/Disable the Merge Touches setting.
Definition: AirDevice.h:399
AirDevice::GetTouchActiveArea
bool(* GetTouchActiveArea)(SensorDevice *self)
Get the Touch Active Area.
Definition: AirDevice.h:416
AirDevice::GetDetectedObjectSizeRestriction
bool(* GetDetectedObjectSizeRestriction)(SensorDevice *self)
Get the Detected Object Size Restriction.
Definition: AirDevice.h:460
AirDevice::GetOffset
bool(* GetOffset)(SensorDevice *self)
Get the X and Y offsets.
Definition: AirDevice.h:537
AirDevice::SetSnappingFilter
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
AirDevice::GetFloatingProtection
bool(* GetFloatingProtection)(SensorDevice *self)
Get the state of Floating Protection.
Definition: AirDevice.h:659
AirDevice::GetEnable
bool(* GetEnable)(SensorDevice *self)
Ask the Device if it is enabled.
Definition: AirDevice.h:113
AirDevice::StorageDevices
Device ** StorageDevices
Definition: AirDevice.h:53
AirDevice::GetReflectiveEdgeFilter
bool(* GetReflectiveEdgeFilter)(SensorDevice *self)
Get the Reflective Edge Filter setting.
Definition: AirDevice.h:346
AirDevice::SetTouchMode
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
AirDevice::Destructor
void(* Destructor)(Device *self)
Destructor.
Definition: AirDevice.h:77
AirDevice::GetNumberOfTrackedObjects
bool(* GetNumberOfTrackedObjects)(SensorDevice *self)
Get the number of tracked objects.
Definition: AirDevice.h:502
AirDevice::SetTouchActiveArea
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
AirDevice::GetReverseTouchActiveArea
bool(* GetReverseTouchActiveArea)(SensorDevice *self)
Get the X- and Y-axes Reverse setting.
Definition: AirDevice.h:273
AirDevice::SetReverseTouchActiveArea
bool(* SetReverseTouchActiveArea)(SensorDevice *self, bool xIsReversed, bool yIsReversed)
Enable/Disable Reversing the X- and/or Y-Axes.
Definition: AirDevice.h:293
AirDevice::SetHidDisplaySize
bool(* SetHidDisplaySize)(SensorDevice *self, uint32_t sizeX, bool sizeXIsValid, uint32_t sizeY, bool sizeYIsValid)
Set the Hid Display Size.
Definition: AirDevice.h:597
AirDevice::PrivateProtocolData
void * PrivateProtocolData
Definition: AirDevice.h:65
CartesianCoordinates
Struct representing a coordinate.
Definition: zForceTypes.h:206
Connection
The main Connection struct.
Definition: Connection.h:66
Device
Device base class.
Definition: Device.h:26
ReverseTouchActiveArea
This structure represents whether the Touch Active Area coordinates are reversed or not.
Definition: zForceTypes.h:242
SensorDevice
Struct representing a SensorDevice, a meta device.
Definition: SensorDevice.h:25
TouchActiveArea
This structure represents the Touch Active Area of a sensor.
Definition: zForceTypes.h:224
zForce
Main struct.
Definition: zForce.h:29
TouchModes
TouchModes
Enum describing what touch mode a device can be in.
Definition: zForceTypes.h:191
DeviceType
DeviceType
Enum describing the different device types that exists.
Definition: zForceTypes.h:90
OperationModes
OperationModes
Enum describing the OperationModes that a sensor can operate in.
Definition: zForceTypes.h:155