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
24 struct SensorDevice
25 {
31 zForce * zForce;
37 Connection * Connection;
43 DeviceType DeviceType;
49 uint32_t DeviceIndex;
55 Device ** StorageDevices;
61 uint32_t NumberOfStorageDevices;
67 void * PrivateProtocolData;
79 void ( * Destructor)(Device * self);
80 CartesianCoordinates Resolution;
81 TouchActiveArea TouchActiveArea;
82 ReverseTouchActiveArea ReverseTouchActiveArea;
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
242 bool ( * GetReverseTouchActiveArea)(SensorDevice * self);
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
307 bool ( * GetReflectiveEdgeFilter)(SensorDevice * self);
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
409 bool ( * GetDetectedObjectSizeRestriction)(SensorDevice * self);
410
429 bool ( * SetDetectedObjectSizeRestriction)(SensorDevice * self, uint32_t minimumSize,
430 uint32_t maximumSize,
431 bool minimumSizeIsValid,
432 bool maximumSizeIsValid);
433
447 bool ( * GetNumberOfTrackedObjects) (SensorDevice * self);
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
588 bool ( * GetFloatingProtection) (SensorDevice * self);
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
675 bool ( * GetDoubleClickPrevention) (SensorDevice * self);
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
SensorDevice_New
DLLINTERNAL SensorDevice * SensorDevice_New(Connection *connection, DeviceType deviceType, uint32_t deviceIndex, size_t size)
Internal call used to create a new SensorDevice.
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
SensorDevice::GetResolution
bool(* GetResolution)(SensorDevice *self)
Get the Resolution.
Definition: SensorDevice.h:201
SensorDevice::ReverseTouchActiveArea
ReverseTouchActiveArea ReverseTouchActiveArea
Reverse The Touch Active Area of the device.
Definition: SensorDevice.h:82
SensorDevice::GetFlipXY
bool(* GetFlipXY)(SensorDevice *self)
Get the Flip X/Y axes setting.
Definition: SensorDevice.h:275
SensorDevice::GetTouchActiveArea
bool(* GetTouchActiveArea)(SensorDevice *self)
Get the Touch Active Area.
Definition: SensorDevice.h:369
SensorDevice::TouchActiveArea
TouchActiveArea TouchActiveArea
Touch Active Area of the device.
Definition: SensorDevice.h:81
SensorDevice::SetFloatingProtection
bool(* SetFloatingProtection)(SensorDevice *self, bool enabled, bool enabledIsValid, uint32_t time, bool timeIsValid)
Set Floating Protection.
Definition: SensorDevice.h:607
SensorDevice::Destructor
void(* Destructor)(Device *self)
Destructor.
Definition: SensorDevice.h:79
SensorDevice::Connection
Connection * Connection
Definition: SensorDevice.h:37
SensorDevice::DeviceIndex
uint32_t DeviceIndex
Definition: SensorDevice.h:49
SensorDevice::GetReflectiveEdgeFilter
bool(* GetReflectiveEdgeFilter)(SensorDevice *self)
Get the Reflective Edge Filter setting.
Definition: SensorDevice.h:307
SensorDevice::SetDisable
bool(* SetDisable)(SensorDevice *self)
Disable the device.
Definition: SensorDevice.h:149
SensorDevice::SetDoubleClickPrevention
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
SensorDevice::StorageDevices
Device ** StorageDevices
Definition: SensorDevice.h:55
SensorDevice::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: SensorDevice.h:652
SensorDevice::SetTouchMode
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
SensorDevice::GetOperationModes
bool(* GetOperationModes)(SensorDevice *self)
Get the Operating Modes.
Definition: SensorDevice.h:164
SensorDevice::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: SensorDevice.h:391
SensorDevice::Resolution
CartesianCoordinates Resolution
Resolution of the device.
Definition: SensorDevice.h:80
SensorDevice::SetEnable
bool(* SetEnable)(SensorDevice *self, bool continuousMode, uint32_t numberOfMessages)
Enable the device.
Definition: SensorDevice.h:118
SensorDevice::GetOffset
bool(* GetOffset)(SensorDevice *self)
Get the X and Y offsets.
Definition: SensorDevice.h:478
SensorDevice::GetSnappingFilter
bool(* GetSnappingFilter)(SensorDevice *self)
Get the state of Snapping Filter.
Definition: SensorDevice.h:623
SensorDevice::GetHidDisplaySize
bool(* GetHidDisplaySize)(SensorDevice *self)
Get the Hid Display Size.
Definition: SensorDevice.h:513
SensorDevice::GetTouchMode
bool(* GetTouchMode)(SensorDevice *self)
Get the Touch Mode.
Definition: SensorDevice.h:548
SensorDevice::GetEnable
bool(* GetEnable)(SensorDevice *self)
Ask the Device if it is enabled.
Definition: SensorDevice.h:98
SensorDevice::PrivateProtocolData
void * PrivateProtocolData
Definition: SensorDevice.h:67
SensorDevice::SetOperationModes
bool(* SetOperationModes)(SensorDevice *self, OperationModes modeMask, OperationModes modeValues)
Set the Operating Modes.
Definition: SensorDevice.h:185
SensorDevice::SetNumberOfTrackedObjects
bool(* SetNumberOfTrackedObjects)(SensorDevice *self, uint32_t numberOfTrackedObjects)
Set the number of tracked objects.
Definition: SensorDevice.h:463
SensorDevice::SetHidDisplaySize
bool(* SetHidDisplaySize)(SensorDevice *self, uint32_t sizeX, bool sizeXIsValid, uint32_t sizeY, bool sizeYIsValid)
Set the Hid Display Size.
Definition: SensorDevice.h:532
SensorDevice::SetReflectiveEdgeFilter
bool(* SetReflectiveEdgeFilter)(SensorDevice *self, bool isFilterOn)
Enable/Disable the Reflective Edge Filter.
Definition: SensorDevice.h:323
SensorDevice::GetDoubleClickPrevention
bool(* GetDoubleClickPrevention)(SensorDevice *self)
Get the state of Double-Click Prevention.
Definition: SensorDevice.h:675
SensorDevice::GetReverseTouchActiveArea
bool(* GetReverseTouchActiveArea)(SensorDevice *self)
Get the X- and Y-axes Reverse setting.
Definition: SensorDevice.h:242
SensorDevice::GetMergeTouches
bool(* GetMergeTouches)(SensorDevice *self)
Get the current Merge Touches setting.
Definition: SensorDevice.h:338
SensorDevice::GetDisable
bool(* GetDisable)(SensorDevice *self)
Ask the Device if it is disabled.
Definition: SensorDevice.h:133
SensorDevice::SetDetectedObjectSizeRestriction
bool(* SetDetectedObjectSizeRestriction)(SensorDevice *self, uint32_t minimumSize, uint32_t maximumSize, bool minimumSizeIsValid, bool maximumSizeIsValid)
Set the Detected Object Size Restriction.
Definition: SensorDevice.h:429
SensorDevice::SetMergeTouches
bool(* SetMergeTouches)(SensorDevice *self, bool areTouchesMerged)
Enable/Disable the Merge Touches setting.
Definition: SensorDevice.h:354
SensorDevice::GetDetectedObjectSizeRestriction
bool(* GetDetectedObjectSizeRestriction)(SensorDevice *self)
Get the Detected Object Size Restriction.
Definition: SensorDevice.h:409
SensorDevice::SetOffset
bool(* SetOffset)(SensorDevice *self, uint32_t offsetX, bool offsetXIsValid, uint32_t offsetY, bool offsetYIsValid)
Set the X and Y offsets.
Definition: SensorDevice.h:497
SensorDevice::GetNumberOfTrackedObjects
bool(* GetNumberOfTrackedObjects)(SensorDevice *self)
Get the number of tracked objects.
Definition: SensorDevice.h:447
SensorDevice::SetReverseTouchActiveArea
bool(* SetReverseTouchActiveArea)(SensorDevice *self, bool xIsReversed, bool yIsReversed)
Enable/Disable Reversing the X- and/or Y-Axes.
Definition: SensorDevice.h:260
SensorDevice::SetResolution
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
SensorDevice::NumberOfStorageDevices
uint32_t NumberOfStorageDevices
Definition: SensorDevice.h:61
SensorDevice::SetFlipXY
bool(* SetFlipXY)(SensorDevice *self, bool axesAreFlipped)
Enable/Disable flipping the X- and Y-axes.
Definition: SensorDevice.h:292
SensorDevice::zForce
zForce * zForce
Definition: SensorDevice.h:31
SensorDevice::DeviceType
DeviceType DeviceType
Definition: SensorDevice.h:43
SensorDevice::GetFloatingProtection
bool(* GetFloatingProtection)(SensorDevice *self)
Get the state of Floating Protection.
Definition: SensorDevice.h:588
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