#define DALI_INTEGRATION_INTERNAL_SCENEHOLDER_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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 <atomic>
#include <dali/public-api/object/base-object.h>
#include <dali/public-api/common/intrusive-ptr.h>
+#include <dali/public-api/math/uint-16-pair.h>
#include <dali/integration-api/scene.h>
#include <dali/integration-api/events/key-event-integ.h>
#include <dali/integration-api/events/point.h>
class Adaptor;
class Actor;
class Layer;
+class WheelEvent;
struct TouchPoint;
-struct WheelEvent;
-struct KeyEvent;
+class KeyEvent;
namespace Integration
{
Dali::Integration::Scene GetScene();
/**
+ * @brief Retrieves the DPI of this sceneholder.
+ * @return The DPI.
+ */
+ Uint16Pair GetDpi() const;
+
+ /**
* @brief Set the render surface
* @param[in] surface The render surface
*/
Dali::Integration::SceneHolder::KeyEventGeneratedSignalType& KeyEventGeneratedSignal() { return mScene.KeyEventGeneratedSignal(); }
/**
- * @copydoc Dali::Integration::SceneHolder::TouchSignal()
+ * @copydoc Dali::Integration::SceneHolder::TouchedSignal()
*/
- Dali::Integration::SceneHolder::TouchSignalType& TouchSignal() { return mScene.TouchSignal(); }
+ Dali::Integration::SceneHolder::TouchEventSignalType& TouchedSignal() { return mScene.TouchedSignal(); }
/**
* @copydoc Dali::Integration::SceneHolder::WheelEventSignal()
/**
* virtual destructor
*/
- virtual ~SceneHolder();
+ ~SceneHolder() override;
private: // The following methods can be overridden if required
*/
void Reset();
+ /**
+ * Initializes the DPI for this object.
+ */
+ void InitializeDpi();
+
private:
static uint32_t mSceneHolderCounter; ///< A counter to track the SceneHolder creation
Dali::Integration::TouchEventCombiner mCombiner; ///< Combines multi-touch events.
+
+ Uint16Pair mDpi; ///< The DPI for this SceneHolder.
+
std::atomic<bool> mIsBeingDeleted; ///< This is set only from the event thread and read only from the render thread
bool mAdaptorStarted:1; ///< Whether the adaptor has started or not