Move device codes & related TouchData & KeyEvent methods to Public API 07/153807/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 29 Sep 2017 16:01:17 +0000 (17:01 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 29 Sep 2017 16:08:46 +0000 (17:08 +0100)
Change-Id: I241cac5fb236d02bc87a0aeb71b2bca0cb0985b1

22 files changed:
automated-tests/src/dali/utc-Dali-KeyEvent.cpp
automated-tests/src/dali/utc-Dali-Stage.cpp
automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp
dali/devel-api/CMakeLists.txt
dali/devel-api/events/key-event-devel.h [deleted file]
dali/devel-api/events/touch-event-devel.h [deleted file]
dali/devel-api/file.list
dali/integration-api/events/key-event-integ.cpp
dali/integration-api/events/key-event-integ.h
dali/integration-api/events/point.cpp
dali/integration-api/events/point.h
dali/internal/event/events/key-event-impl.cpp
dali/internal/event/events/key-event-impl.h
dali/internal/event/events/touch-data-impl.cpp
dali/internal/event/events/touch-data-impl.h
dali/public-api/CMakeLists.txt
dali/public-api/events/device.h [moved from dali/devel-api/events/device.h with 55% similarity]
dali/public-api/events/key-event.cpp
dali/public-api/events/key-event.h
dali/public-api/events/touch-data.cpp
dali/public-api/events/touch-data.h
dali/public-api/file.list

index db3e48c..b45671a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 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.
@@ -20,7 +20,6 @@
 #include <stdlib.h>
 #include <dali/public-api/dali-core.h>
 #include <dali/integration-api/events/key-event-integ.h>
-#include <dali/devel-api/events/key-event-devel.h>
 
 #include <dali-test-suite-utils.h>
 
@@ -311,8 +310,8 @@ int UtcDaliIntegrationKeyEvent(void)
     const unsigned long timeStamp(132);
     const Integration::KeyEvent::State keyState(Integration::KeyEvent::Up);
     const std::string deviceName("hwKeyboard");
-    const DevelDevice::Class::Type deviceClass = DevelDevice::Class::KEYBOARD;
-    const DevelDevice::Subclass::Type deviceSubclass = DevelDevice::Subclass::NONE;
+    const Device::Class::Type deviceClass = Device::Class::KEYBOARD;
+    const Device::Subclass::Type deviceSubclass = Device::Subclass::NONE;
 
     Integration::KeyEvent keyEvent(keyName, keyString, keyCode, keyModifier, timeStamp, keyState, deviceName, deviceClass, deviceSubclass );
     DALI_TEST_EQUALS( keyEvent.type, Integration::Event::Key, TEST_LOCATION );
@@ -345,8 +344,8 @@ int UtcDaliIntegrationKeyEventConvertor(void)
   DALI_TEST_EQUALS( keyEvent.time, 0lu, TEST_LOCATION );
   DALI_TEST_EQUALS( keyEvent.state, Integration::KeyEvent::Down, TEST_LOCATION);
   DALI_TEST_EQUALS( keyEvent.deviceName, "", TEST_LOCATION);
-  DALI_TEST_EQUALS( keyEvent.deviceClass, DevelDevice::Class::NONE, TEST_LOCATION);
-  DALI_TEST_EQUALS( keyEvent.deviceSubclass, DevelDevice::Subclass::NONE, TEST_LOCATION);
+  DALI_TEST_EQUALS( keyEvent.deviceClass, Device::Class::NONE, TEST_LOCATION);
+  DALI_TEST_EQUALS( keyEvent.deviceSubclass, Device::Subclass::NONE, TEST_LOCATION);
 
   END_TEST;
 }
@@ -357,7 +356,7 @@ int UtcDaliKeyEventSetDeviceName(void)
 
   KeyEvent event(TEST_STRING_1,"i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::Down);
 
-  DALI_TEST_EQUALS( DevelKeyEvent::GetDeviceName( event ), "", TEST_LOCATION);
+  DALI_TEST_EQUALS( event.GetDeviceName(), "", TEST_LOCATION);
 
   END_TEST;
 }
@@ -368,7 +367,7 @@ int UtcDaliKeyEventSetDeviceClass(void)
 
   KeyEvent event(TEST_STRING_1,"i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::Down);
 
-  DALI_TEST_EQUALS( DevelKeyEvent::GetDeviceClass( event ), DevelDevice::Class::NONE, TEST_LOCATION);
+  DALI_TEST_EQUALS( event.GetDeviceClass(), Device::Class::NONE, TEST_LOCATION);
 
   END_TEST;
 }
@@ -379,7 +378,7 @@ int UtcDaliKeyEventSetDeviceSubclass(void)
 
   KeyEvent event(TEST_STRING_1,"i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::Down);
 
-  DALI_TEST_EQUALS( DevelKeyEvent::GetDeviceSubclass( event ), DevelDevice::Subclass::NONE, TEST_LOCATION);
+  DALI_TEST_EQUALS( event.GetDeviceSubclass(), Device::Subclass::NONE, TEST_LOCATION);
 
   END_TEST;
 }
index 102e451..4dabb87 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 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.
@@ -883,7 +883,7 @@ int UtcDaliStageKeyEventGeneratedSignalP(void)
   KeyEventGeneratedReceivedFunctor functor2( data2 );
   GetImplementation( stage ).ConnectSignal( &application, "keyEventGenerated", functor2 );
 
-  Integration::KeyEvent event( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
+  Integration::KeyEvent event( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
@@ -894,7 +894,7 @@ int UtcDaliStageKeyEventGeneratedSignalP(void)
 
   data.Reset();
 
-  Integration::KeyEvent event2( "i", "i", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
+  Integration::KeyEvent event2( "i", "i", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event2 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
@@ -905,7 +905,7 @@ int UtcDaliStageKeyEventGeneratedSignalP(void)
 
   data.Reset();
 
-  Integration::KeyEvent event3( "a", "a", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
+  Integration::KeyEvent event3( "a", "a", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event3 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
@@ -916,7 +916,7 @@ int UtcDaliStageKeyEventGeneratedSignalP(void)
 
   data.Reset();
 
-  Integration::KeyEvent event4( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
+  Integration::KeyEvent event4( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event4 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
@@ -936,7 +936,7 @@ int UtcDaliStageSignalKeyEventP(void)
   KeyEventReceivedFunctor functor( data );
   stage.KeyEventSignal().Connect( &application, functor );
 
-  Integration::KeyEvent event( "i", "i", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
+  Integration::KeyEvent event( "i", "i", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
@@ -947,7 +947,7 @@ int UtcDaliStageSignalKeyEventP(void)
 
   data.Reset();
 
-  Integration::KeyEvent event2( "i", "i", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
+  Integration::KeyEvent event2( "i", "i", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event2 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
@@ -958,7 +958,7 @@ int UtcDaliStageSignalKeyEventP(void)
 
   data.Reset();
 
-  Integration::KeyEvent event3( "a", "a", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
+  Integration::KeyEvent event3( "a", "a", 0, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event3 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
@@ -969,7 +969,7 @@ int UtcDaliStageSignalKeyEventP(void)
 
   data.Reset();
 
-  Integration::KeyEvent event4( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, DevelDevice::Class::NONE, DevelDevice::Subclass::NONE );
+  Integration::KeyEvent event4( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event4 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
index 844a67a..6250198 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 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.
@@ -21,7 +21,6 @@
 #include <dali/public-api/dali-core.h>
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <dali/integration-api/system-overlay.h>
-#include <dali/devel-api/events/touch-event-devel.h>
 #include <dali-test-suite-utils.h>
 
 using namespace Dali;
@@ -51,8 +50,8 @@ struct TestPoint
   Vector2 ellipseRadius;
   float pressure;
   Degree angle;
-  DevelDevice::Class::Type deviceClass;
-  DevelDevice::Subclass::Type deviceSubclass;
+  Device::Class::Type deviceClass;
+  Device::Subclass::Type deviceSubclass;
 
   TestPoint()
   : deviceId(-1), state(PointState::FINISHED), radius(0), pressure(0)
@@ -142,8 +141,8 @@ struct TouchDataFunctor
       p.ellipseRadius = touchData.GetEllipseRadius(i);
       p.pressure = touchData.GetPressure(i);
       p.angle = touchData.GetAngle(i);
-      p.deviceClass = DevelTouchData::GetDeviceClass(touchData, i);
-      p.deviceSubclass = DevelTouchData::GetDeviceSubclass(touchData, i);
+      p.deviceClass = touchData.GetDeviceClass(i);
+      p.deviceSubclass = touchData.GetDeviceSubclass(i);
       signalData.touchData.points.push_back(p);
     }
 
@@ -286,8 +285,8 @@ Integration::TouchEvent GenerateSingleTouch( PointState::Type state, const Vecto
   Integration::Point point;
   point.SetState( state );
   point.SetScreenPosition( screenPosition );
-  point.SetDeviceClass( DevelDevice::Class::TOUCH );
-  point.SetDeviceSubclass( DevelDevice::Subclass::NONE );
+  point.SetDeviceClass( Device::Class::TOUCH );
+  point.SetDeviceSubclass( Device::Subclass::NONE );
   touchEvent.points.push_back( point );
   return touchEvent;
 }
@@ -2007,7 +2006,7 @@ int UtcDaliTouchDataGetDeviceAPINegative(void)
   application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, screenCoordinates ) );
 
   TouchData data = handleData.touchData;
-  DALI_TEST_EQUALS( DevelTouchData::GetDeviceClass( data, -1 ), DevelDevice::Class::NONE, TEST_LOCATION );
-  DALI_TEST_EQUALS( DevelTouchData::GetDeviceSubclass( data, -1 ), DevelDevice::Subclass::NONE, TEST_LOCATION );
+  DALI_TEST_EQUALS( data.GetDeviceClass( -1 ), Device::Class::NONE, TEST_LOCATION );
+  DALI_TEST_EQUALS( data.GetDeviceSubclass( -1 ), Device::Subclass::NONE, TEST_LOCATION );
   END_TEST;
 }
index 7345f37..c39c63a 100644 (file)
@@ -40,9 +40,6 @@ SET( DEVEL_API_HEADERS
   ${CMAKE_CURRENT_SOURCE_DIR}/common/stage-devel.h
 
   ${CMAKE_CURRENT_SOURCE_DIR}/events/hit-test-algorithm.h
-  ${CMAKE_CURRENT_SOURCE_DIR}/events/device.h
-  ${CMAKE_CURRENT_SOURCE_DIR}/events/touch-event-devel.h
-  ${CMAKE_CURRENT_SOURCE_DIR}/events/key-event-devel.h
 
   ${CMAKE_CURRENT_SOURCE_DIR}/images/distance-field.h
   ${CMAKE_CURRENT_SOURCE_DIR}/images/native-image-interface-extension.h
diff --git a/dali/devel-api/events/key-event-devel.h b/dali/devel-api/events/key-event-devel.h
deleted file mode 100644 (file)
index 417dd48..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef DALI_KEY_EVENT_DEVEL_H
-#define DALI_KEY_EVENT_DEVEL_H
-
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// INTERNAL_INCLUDES
-#include <dali/public-api/events/key-event.h>
-#include <dali/devel-api/events/device.h>
-
-namespace Dali
-{
-
-namespace DevelKeyEvent
-{
-
-/**
- * @brief Get the device name the key event originated from
- *
- * @param[in] keyEvent The KeyEvent to retrieve the device name from
- * @return The device name
- */
-DALI_IMPORT_API std::string GetDeviceName( const KeyEvent& keyEvent );
-
-/**
- * @brief Get the device class the key event originated from
- *
- * The device class type is classification type of the input device of event received
- * @param[in] keyEvent The KeyEvent to retrieve the device class from
- * @return The type of the device class
- */
-DALI_IMPORT_API DevelDevice::Class::Type GetDeviceClass( const KeyEvent& keyEvent );
-
-/**
- * @brief Get the device subclass the key event originated from
- *
- * The device subclass type is subclassification type of the input device of event received.
- * @param[in] keyEvent The KeyEvent to retrieve the device subclass from
- * @return The type of the device subclass
- */
-DALI_IMPORT_API DevelDevice::Subclass::Type GetDeviceSubclass( const KeyEvent& keyEvent );
-
-} // namespace DevelKeyEvent
-
-} // namespace Dali
-
-#endif  //DALI_KEY_EVENT_DEVEL_H
diff --git a/dali/devel-api/events/touch-event-devel.h b/dali/devel-api/events/touch-event-devel.h
deleted file mode 100644 (file)
index 6ab21db..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef DALI_TOUCH_DATA_DEVEL_H
-#define DALI_TOUCH_DATA_DEVEL_H
-
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// INTERNAL_INCLUDES
-#include <dali/public-api/events/touch-data.h>
-#include <dali/devel-api/events/device.h>
-
-namespace Dali
-{
-
-namespace DevelTouchData
-{
-
-/**
- * @brief Get the device class type the mouse/touch event originated from
- *
- * The device class type is classification type of the input device of event received.
- * @param[in] touch The TouchData to retrieve the device class from
- * @param[in] point The point required
- * @return The type of the device class
- */
-DALI_IMPORT_API DevelDevice::Class::Type GetDeviceClass( const TouchData& touch, std::size_t point );
-
-/**
- * @brief Get the device subclass type the mouse/touch event originated from
- *
- * The device subclass type is subclassification type of the input device of event received.
- * @param[in] touch The TouchData to retrieve the device subclass from
- * @param[in] point The point required
- * @return The type of the device subclass
- */
-DALI_IMPORT_API DevelDevice::Subclass::Type GetDeviceSubclass( const TouchData& touch, std::size_t point );
-
-} // namespace DevelTouchData
-
-} // namespace Dali
-
-#endif //DALI_TOUCH_DATA_DEVEL_H
index d0c6797..d8c9ef3 100644 (file)
@@ -42,10 +42,7 @@ devel_api_core_common_header_files = \
   $(devel_api_src_dir)/common/stage-devel.h
 
 devel_api_core_events_header_files = \
-  $(devel_api_src_dir)/events/hit-test-algorithm.h \
-  $(devel_api_src_dir)/events/device.h \
-  $(devel_api_src_dir)/events/touch-event-devel.h \
-  $(devel_api_src_dir)/events/key-event-devel.h
+  $(devel_api_src_dir)/events/hit-test-algorithm.h
 
 devel_api_core_images_header_files = \
   $(devel_api_src_dir)/images/distance-field.h \
index 56dd3e4..6d42ac6 100644 (file)
@@ -33,14 +33,14 @@ KeyEvent::KeyEvent()
   time( 0 ),
   state( KeyEvent::Down ),
   deviceName( "" ),
-  deviceClass( DevelDevice::Class::NONE ),
-  deviceSubclass( DevelDevice::Subclass::NONE )
+  deviceClass( Device::Class::NONE ),
+  deviceSubclass( Device::Subclass::NONE )
 {
 }
 
 KeyEvent::KeyEvent( const std::string& keyName, const std::string& keyString, int keyCode, int keyModifier,
                     unsigned long timeStamp, const State& keyState, const std::string& deviceName,
-                    const DevelDevice::Class::Type deviceClass, const DevelDevice::Subclass::Type deviceSubclass )
+                    const Device::Class::Type deviceClass, const Device::Subclass::Type deviceSubclass )
 : Event( Key ),
   keyName( keyName ),
   keyString( keyString ),
@@ -63,8 +63,8 @@ KeyEvent::KeyEvent( const Dali::KeyEvent& event )
   time( event.time ),
   state( static_cast< Integration::KeyEvent::State >( event.state ) ),
   deviceName( "" ),
-  deviceClass( DevelDevice::Class::NONE ),
-  deviceSubclass( DevelDevice::Subclass::NONE )
+  deviceClass( Device::Class::NONE ),
+  deviceSubclass( Device::Subclass::NONE )
 {
 }
 
index 9040707..9a1fd9a 100644 (file)
@@ -24,7 +24,6 @@
 // INTERNAL INCLUDES
 #include <dali/integration-api/events/event.h>
 #include <dali/public-api/events/key-event.h>
-#include <dali/devel-api/events/key-event-devel.h>
 
 namespace Dali DALI_IMPORT_API
 {
@@ -72,8 +71,8 @@ struct KeyEvent : public Event
            unsigned long timeStamp,
            const State& keyState,
            const std::string& deviceName,
-           const DevelDevice::Class::Type deviceClass,
-           const DevelDevice::Subclass::Type deviceSubclass );
+           const Device::Class::Type deviceClass,
+           const Device::Subclass::Type deviceSubclass );
 
   /*
    * Constructor, creates a Integration::KeyEvent from a Dali::KeyEvent
@@ -127,12 +126,12 @@ struct KeyEvent : public Event
   /**
    * Class of device KeyEvent originated from
    */
-  DevelDevice::Class::Type deviceClass;
+  Device::Class::Type deviceClass;
 
   /**
    * Subclass of device KeyEvent originated from
    */
-  DevelDevice::Subclass::Type deviceSubclass;
+  Device::Subclass::Type deviceSubclass;
 };
 
 } // namespace Integration
index def483f..19b44b0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 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.
@@ -28,8 +28,8 @@ Point::Point()
 : mTouchPoint( 0, TouchPoint::Started, 0.0f, 0.0f ),
   mEllipseRadius(),
   mAngle( 0.0f ),
-  mDeviceClass( DevelDevice::Class::NONE ),
-  mDeviceSubclass( DevelDevice::Subclass::NONE ),
+  mDeviceClass( Device::Class::NONE ),
+  mDeviceSubclass( Device::Subclass::NONE ),
   mPressure( 1.0f ),
   mRadius( 0.0f )
 {
@@ -39,8 +39,8 @@ Point::Point( const TouchPoint& touchPoint )
 : mTouchPoint( touchPoint ),
   mEllipseRadius(),
   mAngle( 0.0f ),
-  mDeviceClass( DevelDevice::Class::NONE ),
-  mDeviceSubclass( DevelDevice::Subclass::NONE ),
+  mDeviceClass( Device::Class::NONE ),
+  mDeviceSubclass( Device::Subclass::NONE ),
   mPressure( 1.0f ),
   mRadius( 0.0f )
 {
@@ -146,22 +146,22 @@ const TouchPoint& Point::GetTouchPoint() const
   return mTouchPoint;
 }
 
-void Point::SetDeviceClass( DevelDevice::Class::Type deviceClass )
+void Point::SetDeviceClass( Device::Class::Type deviceClass )
 {
   mDeviceClass = deviceClass;
 }
 
-void Point::SetDeviceSubclass( DevelDevice::Subclass::Type deviceSubclass )
+void Point::SetDeviceSubclass( Device::Subclass::Type deviceSubclass )
 {
   mDeviceSubclass = deviceSubclass;
 }
 
-DevelDevice::Class::Type Point::GetDeviceClass() const
+Device::Class::Type Point::GetDeviceClass() const
 {
   return mDeviceClass;
 }
 
-DevelDevice::Subclass::Type Point::GetDeviceSubclass() const
+Device::Subclass::Type Point::GetDeviceSubclass() const
 {
   return mDeviceSubclass;
 }
index 6570c65..f55ea8e 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTEGRATION_POINT_H__
 
 /*
- * Copyright (c) 2016 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.
@@ -23,7 +23,7 @@
 #include <dali/public-api/math/degree.h>
 #include <dali/public-api/math/vector2.h>
 #include <dali/public-api/events/touch-point.h>
-#include <dali/devel-api/events/device.h>
+#include <dali/public-api/events/device.h>
 
 namespace Dali
 {
@@ -110,13 +110,13 @@ struct DALI_IMPORT_API Point
    * @brief Sets the class of the device for the event
    * @param[in] deviceClass The class of the device.
    */
-  void SetDeviceClass( DevelDevice::Class::Type deviceClass );
+  void SetDeviceClass( Device::Class::Type deviceClass );
 
   /**
    * @brief Sets the subclass of the device for the event
    * @param[in] deviceSubclass The subclass of the device.
    */
-  void SetDeviceSubclass( DevelDevice::Subclass::Type deviceSubclass );
+  void SetDeviceSubclass( Device::Subclass::Type deviceSubclass );
 
   /**
    * @brief Retrieve the Unique Device ID of the point.
@@ -170,13 +170,13 @@ struct DALI_IMPORT_API Point
    * @brief Retrieve the class of the device for the event.
    * @return The class of the device
    */
-  DevelDevice::Class::Type GetDeviceClass() const;
+  Device::Class::Type GetDeviceClass() const;
 
   /**
    * @brief Retrieve the subclass of the device for the event.
    * @return The subclass of the device
    */
-  DevelDevice::Subclass::Type GetDeviceSubclass() const;
+  Device::Subclass::Type GetDeviceSubclass() const;
 
 
 
@@ -219,8 +219,8 @@ private:
   TouchPoint mTouchPoint; ///< Stores screen position, device Id, local & screen positions and the hit-actor. @see TouchPoint
   Vector2 mEllipseRadius; ///< Radius of both the horizontal and vertical radius (useful if an ellipse).
   Degree mAngle; ///< The angle of the press point, relative to the Y-Axis.
-  DevelDevice::Class::Type mDeviceClass;
-  DevelDevice::Subclass::Type mDeviceSubclass;
+  Device::Class::Type mDeviceClass;
+  Device::Subclass::Type mDeviceSubclass;
   float mPressure; ///< The touch pressure.
   float mRadius; ///< Radius of the press point, an average of the ellipse radius.
 };
index 68e9ad8..8395e20 100644 (file)
@@ -45,8 +45,8 @@ namespace Internal
 
 KeyEventImpl::KeyEventImpl( KeyEvent* keyEvent )
 : mDeviceName( "" ),
-  mDeviceClass( DevelDevice::Class::NONE ),
-  mDeviceSubclass( DevelDevice::Subclass::NONE )
+  mDeviceClass( Device::Class::NONE ),
+  mDeviceSubclass( Device::Subclass::NONE )
 {
   gKeyEventToImplMapping.PushBack( { keyEvent, this } );
 }
@@ -85,22 +85,22 @@ void KeyEventImpl::SetDeviceName( const std::string& deviceName )
   mDeviceName = deviceName;
 }
 
-DevelDevice::Class::Type KeyEventImpl::GetDeviceClass() const
+Device::Class::Type KeyEventImpl::GetDeviceClass() const
 {
   return mDeviceClass;
 }
 
-void KeyEventImpl::SetDeviceClass( DevelDevice::Class::Type deviceClass )
+void KeyEventImpl::SetDeviceClass( Device::Class::Type deviceClass )
 {
   mDeviceClass = deviceClass;
 }
 
-DevelDevice::Subclass::Type KeyEventImpl::GetDeviceSubclass() const
+Device::Subclass::Type KeyEventImpl::GetDeviceSubclass() const
 {
   return mDeviceSubclass;
 }
 
-void KeyEventImpl::SetDeviceSubclass( DevelDevice::Subclass::Type deviceSubclass )
+void KeyEventImpl::SetDeviceSubclass( Device::Subclass::Type deviceSubclass )
 {
   mDeviceSubclass = deviceSubclass;
 }
index b6245b1..e6b4896 100644 (file)
@@ -20,7 +20,6 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/events/key-event.h>
-#include <dali/devel-api/events/key-event-devel.h>
 
 namespace Dali
 {
@@ -68,28 +67,28 @@ public:
    *
    * @return The device class
    */
-  DevelDevice::Class::Type GetDeviceClass() const;
+  Device::Class::Type GetDeviceClass() const;
 
   /**
    * @brief Set the device class to the KeyEvent
    *
    * @param[in] deviceClass Device class to set
    */
-  void SetDeviceClass( DevelDevice::Class::Type deviceClass );
+  void SetDeviceClass( Device::Class::Type deviceClass );
 
   /**
    * @brief Get the device subclass the key event originated from
    *
    * @return The device subclass
    */
-  DevelDevice::Subclass::Type GetDeviceSubclass() const;
+  Device::Subclass::Type GetDeviceSubclass() const;
 
   /**
    * @brief Set the device subclass to the KeyEvent
    *
    * @param[in] deviceClass Device subclass to set
    */
-  void SetDeviceSubclass( DevelDevice::Subclass::Type deviceSubclass );
+  void SetDeviceSubclass( Device::Subclass::Type deviceSubclass );
 
 private:
 
@@ -102,8 +101,8 @@ private:
 private:
 
   std::string mDeviceName;
-  DevelDevice::Class::Type mDeviceClass;
-  DevelDevice::Subclass::Type mDeviceSubclass;
+  Device::Class::Type mDeviceClass;
+  Device::Subclass::Type mDeviceSubclass;
 };
 
 } // namespace Internal
index 678829d..58547ea 100644 (file)
@@ -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,22 @@ 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;
 }
 
 } // namsespace Internal
index 1f53a11..15bfb4f 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_TOUCH_DATA_H__
 
 /*
- * Copyright (c) 2016 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.
@@ -158,19 +158,19 @@ public:
    */
   void AddPoint( const Integration::Point& point );
 
-    /**
+  /**
    * @brief Get the device class the mouse/touch event originated from
    *
    * @return The device class
    */
-  DevelDevice::Class::Type GetDeviceClass( std::size_t point ) const;
+  Device::Class::Type GetDeviceClass( std::size_t point ) const;
 
   /**
    * @brief Get the device subclass the mouse/touch event originated from
    *
    * @return The device subclass
    */
-  DevelDevice::Subclass::Type GetDeviceSubclass( std::size_t point ) const;
+  Device::Subclass::Type GetDeviceSubclass( std::size_t point ) const;
 
 private:
 
index 618e22c..19f1972 100644 (file)
@@ -126,6 +126,7 @@ SET(PUBLIC_API_HEADERS
   ${CMAKE_CURRENT_SOURCE_DIR}/common/vector-wrapper.h
   ${CMAKE_CURRENT_SOURCE_DIR}/common/view-mode.h
 
+  ${CMAKE_CURRENT_SOURCE_DIR}/events/device.h
   ${CMAKE_CURRENT_SOURCE_DIR}/events/gesture.h
   ${CMAKE_CURRENT_SOURCE_DIR}/events/gesture-detector.h
   ${CMAKE_CURRENT_SOURCE_DIR}/events/hover-event.h
similarity index 55%
rename from dali/devel-api/events/device.h
rename to dali/public-api/events/device.h
index aab32e0..b04ed5e 100644 (file)
 
 namespace Dali
 {
+/**
+ * @addtogroup dali_core_events
+ * @{
+ */
 
 /**
  * @brief Information about device types
@@ -28,61 +32,69 @@ namespace Dali
  * A widget viewer application by Dali have to deliver events to widget applications
  * Server for handling events actually delivers any events to widget applications
  * The server needs to know input device information such as type to deliver events of proper type to widget applications
+ * @SINCE_1_2.60
  */
-namespace DevelDevice
+namespace Device
 {
 
 /**
  * @brief Categorization type about input Device
+ * @SINCE_1_2.60
  */
 namespace Class
 {
 
 /**
  * @brief An enum of Device Class types.
+ * @SINCE_1_2.60
  */
 enum Type
 {
-  NONE,      ///< Not a device
-  USER,      ///< The user/seat (the user themselves)
-  KEYBOARD,  ///< A regular keyboard, numberpad or attached buttons
-  MOUSE,     ///< A mouse, trackball or touchpad relative motion device
-  TOUCH,     ///< A touchscreen with fingers or stylus
-  PEN,       ///< A special pen device
-  POINTER,   ///< A pointing device based on laser, infrared or similar technology
-  GAMEPAD    ///< A gamepad controller or joystick
+  NONE,      ///< Not a device. @SINCE_1_2.60
+  USER,      ///< The user/seat (the user themselves). @SINCE_1_2.60
+  KEYBOARD,  ///< A regular keyboard, numberpad or attached buttons. @SINCE_1_2.60
+  MOUSE,     ///< A mouse, trackball or touchpad relative motion device. @SINCE_1_2.60
+  TOUCH,     ///< A touchscreen with fingers or stylus. @SINCE_1_2.60
+  PEN,       ///< A special pen device. @SINCE_1_2.60
+  POINTER,   ///< A pointing device based on laser, infrared or similar technology. @SINCE_1_2.60
+  GAMEPAD    ///< A gamepad controller or joystick. @SINCE_1_2.60
 };
 
-} // namespace DeviceClass
+} // namespace Class
 
 /**
- * @brief Subcategorization type about input device
+ * @brief Subcategorization type about input device.
+ * @SINCE_1_2.60
  */
 namespace Subclass
 {
 
 /**
  * @brief An enum of Device Subclass types.
+ * @SINCE_1_2.60
  */
 enum Type
 {
-  NONE, ///< Not a device
-  FINGER, ///< The normal flat of your finger
-  FINGERNAIL, ///< A fingernail
-  KNUCKLE, ///< A Knuckle
-  PALM, ///< The palm of a users hand
-  HAND_SIDE, ///< The side of your hand
-  HAND_FLAT, ///< The flat of your hand
-  PEN_TIP, ///< The tip of a pen
-  TRACKPAD, ///< A trackpad style mouse
-  TRACKPOINT, //< A trackpoint style mouse
-  TRACKBALL, ///< A trackball style mouse
+  NONE, ///< Not a device. @SINCE_1_2.60
+  FINGER, ///< The normal flat of your finger. @SINCE_1_2.60
+  FINGERNAIL, ///< A fingernail. @SINCE_1_2.60
+  KNUCKLE, ///< A Knuckle. @SINCE_1_2.60
+  PALM, ///< The palm of a users hand. @SINCE_1_2.60
+  HAND_SIDE, ///< The side of your hand. @SINCE_1_2.60
+  HAND_FLAT, ///< The flat of your hand. @SINCE_1_2.60
+  PEN_TIP, ///< The tip of a pen. @SINCE_1_2.60
+  TRACKPAD, ///< A trackpad style mouse. @SINCE_1_2.60
+  TRACKPOINT, //< A trackpoint style mouse. @SINCE_1_2.60
+  TRACKBALL, ///< A trackball style mouse. @SINCE_1_2.60
 };
 
-} // namespace DeviceSubclass
+} // namespace Subclass
 
-} // namespace DevelDevice
+} // namespace Device
 
+/**
+ * @}
+ */
 } // namespace Dali
 
 #endif  //DALI_KEY_EVENT_DEVEL_H
index 6d9b156..b061b88 100644 (file)
@@ -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.
@@ -19,7 +19,6 @@
 #include <dali/public-api/events/key-event.h>
 
 // INTERNAL INCLUDES
-#include <dali/devel-api/events/key-event-devel.h>
 #include <dali/internal/event/events/key-event-impl.h>
 
 namespace Dali
@@ -119,19 +118,19 @@ bool KeyEvent::IsAltModifier() const
   return false;
 }
 
-std::string DevelKeyEvent::GetDeviceName( const KeyEvent& keyEvent )
+std::string KeyEvent::GetDeviceName() const
 {
-  return GetImplementation( &keyEvent )->GetDeviceName();
+  return GetImplementation( this )->GetDeviceName();
 }
 
-DevelDevice::Class::Type DevelKeyEvent::GetDeviceClass( const KeyEvent& keyEvent )
+Device::Class::Type KeyEvent::GetDeviceClass() const
 {
-  return GetImplementation( &keyEvent )->GetDeviceClass();
+  return GetImplementation( this )->GetDeviceClass();
 }
 
-DevelDevice::Subclass::Type DevelKeyEvent::GetDeviceSubclass( const KeyEvent& keyEvent )
+Device::Subclass::Type KeyEvent::GetDeviceSubclass() const
 {
-  return GetImplementation( &keyEvent )->GetDeviceSubclass();
+  return GetImplementation( this )->GetDeviceSubclass();
 }
 
 
index f0d5681..804eef9 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_KEY_EVENT_H__
 
 /*
- * 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.
@@ -23,6 +23,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
+#include <dali/public-api/events/device.h>
 
 namespace Dali
 {
@@ -125,6 +126,32 @@ struct DALI_IMPORT_API KeyEvent
    */
   bool IsAltModifier() const;
 
+  /**
+   * @brief Get the device name the key event originated from.
+   *
+   * @SINCE_1_2.60
+   * @return The device name
+   */
+  std::string GetDeviceName() const;
+
+  /**
+   * @brief Get the device class the key event originated from.
+   *
+   * The device class type is classification type of the input device of event received
+   * @SINCE_1_2.60
+   * @return The type of the device class
+   */
+  Device::Class::Type GetDeviceClass() const;
+
+  /**
+   * @brief Get the device subclass the key event originated from.
+   *
+   * The device subclass type is subclassification type of the input device of event received.
+   * @SINCE_1_2.60
+   * @return The type of the device subclass
+   */
+  Device::Subclass::Type GetDeviceSubclass() const;
+
   // Data
 
   /**
index 1dcdbd6..a18a927 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 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.
@@ -20,7 +20,6 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/actors/actor.h>
-#include <dali/devel-api/events/touch-event-devel.h>
 #include <dali/internal/event/events/touch-data-impl.h>
 
 #include <cstdio>
@@ -103,14 +102,14 @@ Degree TouchData::GetAngle( std::size_t point ) const
   return GetImplementation( *this ).GetAngle( point );
 }
 
-DevelDevice::Class::Type DevelTouchData::GetDeviceClass( const TouchData& touch, std::size_t point )
+Device::Class::Type TouchData::GetDeviceClass( std::size_t point ) const
 {
-  return GetImplementation( touch ).GetDeviceClass( point );
+  return GetImplementation( *this ).GetDeviceClass( point );
 }
 
-DevelDevice::Subclass::Type DevelTouchData::GetDeviceSubclass( const TouchData& touch, std::size_t point )
+Device::Subclass::Type TouchData::GetDeviceSubclass( std::size_t point ) const
 {
-  return GetImplementation( touch ).GetDeviceSubclass( point );
+  return GetImplementation( *this ).GetDeviceSubclass( point );
 }
 
 TouchData::TouchData( Internal::TouchData* internal )
index 2208ee7..9b7961d 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TOUCH_DATA_H__
 
 /*
- * Copyright (c) 2016 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.
@@ -23,6 +23,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
+#include <dali/public-api/events/device.h>
 #include <dali/public-api/events/point-state.h>
 #include <dali/public-api/object/base-handle.h>
 #include <dali/public-api/math/degree.h>
@@ -220,6 +221,26 @@ public:
    */
   Degree GetAngle( std::size_t point ) const;
 
+  /**
+   * @brief Get the device class type the mouse/touch event originated from.
+   *
+   * The device class type is classification type of the input device of event received.
+   * @SINCE_1_2.60
+   * @param[in] point The point required
+   * @return The type of the device class
+   */
+  Device::Class::Type GetDeviceClass( std::size_t point ) const;
+
+  /**
+   * @brief Get the device subclass type the mouse/touch event originated from.
+   *
+   * The device subclass type is subclassification type of the input device of event received.
+   * @SINCE_1_2.60
+   * @param[in] point The point required
+   * @return The type of the device subclass
+   */
+  Device::Subclass::Type GetDeviceSubclass( std::size_t point ) const;
+
 public: // Not intended for application developers
 
   /// @cond internal
index d594cd0..0315f04 100644 (file)
@@ -132,6 +132,7 @@ public_api_core_common_header_files = \
   $(public_api_src_dir)/common/view-mode.h
 
 public_api_core_events_header_files = \
+  $(public_api_src_dir)/events/device.h \
   $(public_api_src_dir)/events/gesture.h \
   $(public_api_src_dir)/events/gesture-detector.h \
   $(public_api_src_dir)/events/hover-event.h \