Making DALi public API typesafe using guaranteed types; uint8_t, uint32_t
[platform/core/uifw/dali-core.git] / dali / public-api / events / touch-point.h
index 3cd23f8..e6f099b 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TOUCH_POINT_H__
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,6 +18,9 @@
  *
  */
 
+// EXTERNAL INCLUDES
+#include <cstdint> // uint32_t
+
 // INTERNAL INCLUDES
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/actors/actor.h>
@@ -35,7 +38,7 @@ namespace Dali
  * or where touch has stopped.
  * @SINCE_1_0.0
  */
-struct DALI_IMPORT_API TouchPoint
+struct DALI_CORE_API TouchPoint
 {
   // Enumerations
 
@@ -69,7 +72,7 @@ struct DALI_IMPORT_API TouchPoint
    * @param[in] screenX The X co-ordinate relative to the screen's origin
    * @param[in] screenY The Y co-ordinate relative to the screen's origin
    */
-  TouchPoint(int id, State state, float screenX, float screenY);
+  TouchPoint(int32_t id, State state, float screenX, float screenY);
 
   /**
    * @brief Constructor.
@@ -82,7 +85,7 @@ struct DALI_IMPORT_API TouchPoint
    * @param[in] localX  The X co-ordinate relative to the top-left (0.0, 0.0, 0.5) of the actor
    * @param[in] localY  The Y co-ordinate relative to the top-left (0.0, 0.0, 0.5) of the actor
    */
-  TouchPoint(int id, State state, float screenX, float screenY, float localX, float localY);
+  TouchPoint(int32_t id, State state, float screenX, float screenY, float localX, float localY);
 
   /**
    * @brief Destructor.
@@ -95,7 +98,7 @@ struct DALI_IMPORT_API TouchPoint
   /**
    * @brief Each touch point has a unique device ID which specifies the touch device for that point.
    */
-  int deviceId;
+  int32_t deviceId;
 
   /**
    * @brief State of the point.