/*
- * 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.
#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>
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 );
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;
}
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;
}
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;
}
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;
}
/*
- * 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.
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
/*
- * 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.
#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;
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)
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);
}
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;
}
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;
}
${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
+++ /dev/null
-#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
+++ /dev/null
-#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
$(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 \
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 ),
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 )
{
}
// 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
{
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
/**
* 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
/*
- * 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.
: 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 )
{
: 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 )
{
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;
}
#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.
#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
{
* @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.
* @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;
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.
};
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 } );
}
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;
}
// INTERNAL INCLUDES
#include <dali/public-api/events/key-event.h>
-#include <dali/devel-api/events/key-event-devel.h>
namespace Dali
{
*
* @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:
private:
std::string mDeviceName;
- DevelDevice::Class::Type mDeviceClass;
- DevelDevice::Subclass::Type mDeviceSubclass;
+ Device::Class::Type mDeviceClass;
+ Device::Subclass::Type mDeviceSubclass;
};
} // namespace Internal
/*
- * 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.
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
#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.
*/
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:
${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
namespace Dali
{
+/**
+ * @addtogroup dali_core_events
+ * @{
+ */
/**
* @brief Information about device types
* 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
/*
- * 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.
#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
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();
}
#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.
// INTERNAL INCLUDES
#include <dali/public-api/common/dali-common.h>
+#include <dali/public-api/events/device.h>
namespace Dali
{
*/
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
/**
/*
- * 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.
// 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>
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 )
#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.
// 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>
*/
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
$(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 \