Add GetMouseButton to identify right/left mouse button click
[platform/core/uifw/dali-core.git] / dali / internal / event / events / touch-data-impl.cpp
old mode 100644 (file)
new mode 100755 (executable)
index 678829d..481407a
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -159,22 +159,31 @@ void TouchData::AddPoint( const Integration::Point& point )
   mPoints.push_back( point );
 }
 
-DevelDevice::Class::Type TouchData::GetDeviceClass( std::size_t point ) const
+Device::Class::Type TouchData::GetDeviceClass( std::size_t point ) const
 {
   if( point < mPoints.size() )
   {
     return mPoints[ point ].GetDeviceClass();
   }
-  return DevelDevice::Class::NONE;
+  return Device::Class::NONE;
 }
 
-DevelDevice::Subclass::Type TouchData::GetDeviceSubclass( std::size_t point ) const
+Device::Subclass::Type TouchData::GetDeviceSubclass( std::size_t point ) const
 {
   if( point < mPoints.size() )
   {
     return mPoints[ point ].GetDeviceSubclass();
   }
-  return DevelDevice::Subclass::NONE;
+  return Device::Subclass::NONE;
+}
+
+MouseButton::Type TouchData::GetMouseButton( std::size_t point ) const
+{
+  if( point < mPoints.size() )
+  {
+    return mPoints[ point ].GetMouseButton();
+  }
+  return MouseButton::INVALID;
 }
 
 } // namsespace Internal