forked from enlightenment/efl
eeze/sensor: Add more sensor types used in Tizen.
Just setting up the sensor types in the lib and fake module.
This commit is contained in:
parent
6777b743d2
commit
9d47faa761
|
@ -65,6 +65,9 @@
|
|||
typedef enum
|
||||
{
|
||||
EEZE_SENSOR_TYPE_ACCELEROMETER, /**< Accelerometer sensor */
|
||||
EEZE_SENSOR_TYPE_GRAVITY, /**< Gravity sensor */
|
||||
EEZE_SENSOR_TYPE_LINEAR_ACCELERATION, /**< */
|
||||
EEZE_SENSOR_TYPE_DEVICE_ORIENTATION, /**< */
|
||||
EEZE_SENSOR_TYPE_MAGNETIC, /**< Magnetic sensor */
|
||||
EEZE_SENSOR_TYPE_ORIENTATION, /**< Orientation sensor */
|
||||
EEZE_SENSOR_TYPE_GYROSCOPE, /**< Gyroscope sensor */
|
||||
|
@ -74,7 +77,12 @@ typedef enum
|
|||
EEZE_SENSOR_TYPE_MOTION_SHAKE, /**< Shake motion sensor */
|
||||
EEZE_SENSOR_TYPE_MOTION_DOUBLETAP, /**< Doubletap motion sensor */
|
||||
EEZE_SENSOR_TYPE_MOTION_PANNING, /**< Panning motion sensor */
|
||||
EEZE_SENSOR_TYPE_MOTION_PANNING_BROWSE, /**< */
|
||||
EEZE_SENSOR_TYPE_MOTION_TILT, /**< */
|
||||
EEZE_SENSOR_TYPE_MOTION_FACEDOWN, /**< Facedown motion sensor */
|
||||
EEZE_SENSOR_TYPE_MOTION_DIRECT_CALL, /**< */
|
||||
EEZE_SENSOR_TYPE_MOTION_SMART_ALERT, /**< */
|
||||
EEZE_SENSOR_TYPE_MOTION_NO_MOVE, /**< */
|
||||
/* Non-Tizen from here */
|
||||
EEZE_SENSOR_TYPE_BAROMETER, /**< Barometer sensor */
|
||||
EEZE_SENSOR_TYPE_TEMPERATURE, /**< Temperature sensor */
|
||||
|
@ -96,6 +104,9 @@ typedef enum
|
|||
* @{
|
||||
*/
|
||||
EAPI int EEZE_SENSOR_EVENT_ACCELEROMETER;
|
||||
EAPI int EEZE_SENSOR_EVENT_GRAVITY;
|
||||
EAPI int EEZE_SENSOR_EVENT_LINEAR_ACCELERATION;
|
||||
EAPI int EEZE_SENSOR_EVENT_DEVICE_ORIENTATION;
|
||||
EAPI int EEZE_SENSOR_EVENT_MAGNETIC;
|
||||
EAPI int EEZE_SENSOR_EVENT_ORIENTATION;
|
||||
EAPI int EEZE_SENSOR_EVENT_GYROSCOPE;
|
||||
|
@ -105,7 +116,12 @@ EAPI int EEZE_SENSOR_EVENT_SNAP;
|
|||
EAPI int EEZE_SENSOR_EVENT_SHAKE;
|
||||
EAPI int EEZE_SENSOR_EVENT_DOUBLETAP;
|
||||
EAPI int EEZE_SENSOR_EVENT_PANNING;
|
||||
EAPI int EEZE_SENSOR_EVENT_PANNING_BROWSE;
|
||||
EAPI int EEZE_SENSOR_EVENT_TILT;
|
||||
EAPI int EEZE_SENSOR_EVENT_FACEDOWN;
|
||||
EAPI int EEZE_SENSOR_EVENT_DIRECT_CALL;
|
||||
EAPI int EEZE_SENSOR_EVENT_SMART_ALERT;
|
||||
EAPI int EEZE_SENSOR_EVENT_NO_MOVE;
|
||||
EAPI int EEZE_SENSOR_EVENT_BAROMETER;
|
||||
EAPI int EEZE_SENSOR_EVENT_TEMPERATURE;
|
||||
/**@}*/
|
||||
|
|
|
@ -336,6 +336,15 @@ eeze_sensor_init(void)
|
|||
if (EEZE_SENSOR_EVENT_ACCELEROMETER == 0)
|
||||
EEZE_SENSOR_EVENT_ACCELEROMETER = ecore_event_type_new();
|
||||
|
||||
if (EEZE_SENSOR_EVENT_GRAVITY == 0)
|
||||
EEZE_SENSOR_EVENT_GRAVITY = ecore_event_type_new();
|
||||
|
||||
if (EEZE_SENSOR_EVENT_LINEAR_ACCELERATION == 0)
|
||||
EEZE_SENSOR_EVENT_LINEAR_ACCELERATION = ecore_event_type_new();
|
||||
|
||||
if (EEZE_SENSOR_EVENT_DEVICE_ORIENTATION == 0)
|
||||
EEZE_SENSOR_EVENT_DEVICE_ORIENTATION = ecore_event_type_new();
|
||||
|
||||
if (EEZE_SENSOR_EVENT_MAGNETIC == 0)
|
||||
EEZE_SENSOR_EVENT_MAGNETIC = ecore_event_type_new();
|
||||
|
||||
|
@ -363,9 +372,24 @@ eeze_sensor_init(void)
|
|||
if (EEZE_SENSOR_EVENT_PANNING == 0)
|
||||
EEZE_SENSOR_EVENT_PANNING = ecore_event_type_new();
|
||||
|
||||
if (EEZE_SENSOR_EVENT_PANNING_BROWSE == 0)
|
||||
EEZE_SENSOR_EVENT_PANNING_BROWSE = ecore_event_type_new();
|
||||
|
||||
if (EEZE_SENSOR_EVENT_TILT == 0)
|
||||
EEZE_SENSOR_EVENT_TILT = ecore_event_type_new();
|
||||
|
||||
if (EEZE_SENSOR_EVENT_FACEDOWN == 0)
|
||||
EEZE_SENSOR_EVENT_FACEDOWN = ecore_event_type_new();
|
||||
|
||||
if (EEZE_SENSOR_EVENT_DIRECT_CALL == 0)
|
||||
EEZE_SENSOR_EVENT_DIRECT_CALL = ecore_event_type_new();
|
||||
|
||||
if (EEZE_SENSOR_EVENT_SMART_ALERT == 0)
|
||||
EEZE_SENSOR_EVENT_SMART_ALERT = ecore_event_type_new();
|
||||
|
||||
if (EEZE_SENSOR_EVENT_NO_MOVE == 0)
|
||||
EEZE_SENSOR_EVENT_NO_MOVE = ecore_event_type_new();
|
||||
|
||||
if (EEZE_SENSOR_EVENT_BAROMETER == 0)
|
||||
EEZE_SENSOR_EVENT_BAROMETER = ecore_event_type_new();
|
||||
|
||||
|
|
|
@ -67,6 +67,9 @@ fake_read(Eeze_Sensor_Type sensor_type, Eeze_Sensor_Obj *lobj)
|
|||
switch (sensor_type)
|
||||
{
|
||||
case EEZE_SENSOR_TYPE_ACCELEROMETER:
|
||||
case EEZE_SENSOR_TYPE_GRAVITY:
|
||||
case EEZE_SENSOR_TYPE_LINEAR_ACCELERATION:
|
||||
case EEZE_SENSOR_TYPE_DEVICE_ORIENTATION:
|
||||
case EEZE_SENSOR_TYPE_MAGNETIC:
|
||||
case EEZE_SENSOR_TYPE_ORIENTATION:
|
||||
case EEZE_SENSOR_TYPE_GYROSCOPE:
|
||||
|
@ -127,6 +130,15 @@ fake_async_read(Eeze_Sensor_Type sensor_type, void *user_data EINA_UNUSED)
|
|||
case EEZE_SENSOR_TYPE_ACCELEROMETER:
|
||||
ecore_event_add(EEZE_SENSOR_EVENT_ACCELEROMETER, obj, NULL, NULL);
|
||||
break;
|
||||
case EEZE_SENSOR_TYPE_GRAVITY:
|
||||
ecore_event_add(EEZE_SENSOR_EVENT_GRAVITY, obj, NULL, NULL);
|
||||
break;
|
||||
case EEZE_SENSOR_TYPE_LINEAR_ACCELERATION:
|
||||
ecore_event_add(EEZE_SENSOR_EVENT_LINEAR_ACCELERATION, obj, NULL, NULL);
|
||||
break;
|
||||
case EEZE_SENSOR_TYPE_DEVICE_ORIENTATION:
|
||||
ecore_event_add(EEZE_SENSOR_EVENT_DEVICE_ORIENTATION, obj, NULL, NULL);
|
||||
break;
|
||||
case EEZE_SENSOR_TYPE_MAGNETIC:
|
||||
ecore_event_add(EEZE_SENSOR_EVENT_MAGNETIC, obj, NULL, NULL);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue