#define DALI_INTERNAL_SCENE_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
/**
* @copydoc Dali::Integration::Scene::New
*/
- static ScenePtr New(Size size, int32_t orientation = 0);
+ static ScenePtr New(Size size, int32_t windowOrientation = 0, int32_t screenOrientation = 0);
/**
* virtual destructor
*
* @param[in] width The width of rotated surface
* @param[in] height The height of rotated surface
- * @param[in] orientation The orientation of rotated surface
+ * @param[in] windowOrientation the current window orientation
+ * @param[in] screenOrientation the current screen orientation
*/
- void SurfaceRotated(float width, float height, int32_t orientation);
+ void SurfaceRotated(float width, float height, int32_t windowOrientation, int32_t screenOrientation);
/**
* @copydoc Dali::Integration::Scene::SetRotationCompletedAcknowledgement
int32_t GetCurrentSurfaceOrientation() const;
/**
+ * @copydoc Dali::Integration::Scene::GetCurrentScreenOrientation
+ */
+ int32_t GetCurrentScreenOrientation() const;
+
+ /**
* @copydoc Dali::Integration::Scene::GetCurrentSurfaceRect
*/
const Rect<int32_t>& GetCurrentSurfaceRect() const;
bool EmitKeyEventGeneratedSignal(const Dali::KeyEvent& event);
/**
+ * Used by the KeyEventProcessor to emit InterceptKeyEventSignal signals.
+ * @param[in] event The key event.
+ * @return The return is true if KeyEvent is consumed, otherwise false.
+ */
+ bool EmitInterceptKeyEventSignal(const Dali::KeyEvent& event);
+
+ /**
* Emits the event processing finished signal.
*
* @see Dali::Scene::SignalEventProcessingFinished()
void EmitWheelEventSignal(const Dali::WheelEvent& event);
/**
+ * Used by the WheelEventProcessor to emit WheelEventGenerated signals.
+ * @param[in] event The wheel event.
+ * @return The return is true if WheelEvent is consumed, otherwise false.
+ */
+ bool EmitWheelEventGeneratedSignal(const Dali::WheelEvent& event);
+
+ /**
* @copydoc Dali::Integration::Scene::AddFrameRenderedCallback
*/
void AddFrameRenderedCallback(std::unique_ptr<CallbackBase> callback, int32_t frameId);
Integration::Scene::KeyEventGeneratedSignalType& KeyEventGeneratedSignal();
/**
+ * @copydoc Integration::Scene::InterceptKeyEventSignal()
+ */
+ Integration::Scene::KeyEventGeneratedSignalType& InterceptKeyEventSignal();
+
+ /**
* @copydoc Integration::Scene::SignalEventProcessingFinished()
*/
Integration::Scene::EventProcessingFinishedSignalType& EventProcessingFinishedSignal();
*/
Integration::Scene::WheelEventSignalType& WheelEventSignal();
+ /**
+ * @copydoc Integration::Scene::WheelEventGeneratedSignal()
+ */
+ Integration::Scene::WheelEventGeneratedSignalType& WheelEventGeneratedSignal();
+
public:
/**
* From RenderTaskDefaults; retrieve the default root actor.
* Second-phase constructor.
*
* @param[in] size The size of the set surface
- * @param[in] orientation The orientation of the set surface for this scene
+ * @param[in] windowOrientation The rotated angle of the set surface for this scene
+ * @param[in] screenOrientation The rotated angle of the screen
*/
- void Initialize(Size size, int32_t orientation);
+ void Initialize(Size size, int32_t windowOrientation, int32_t screenOrientation);
// Undefined
Scene(const Scene&) = delete;
*
* @param[in] width The width of rotated surface
* @param[in] height The height of rotated surface
- * @param[in] orientation The orientation of rotated surface
+ * @param[in] windowOrientation the current window orientation
+ * @param[in] screenOrientation the current screen orientation
*/
- void ChangedSurface(float width, float height, int32_t orientation);
+ void ChangedSurface(float width, float height, int32_t windowOrientation, int32_t screenOrientation);
private:
Internal::SceneGraph::Scene* mSceneObject;
// The Surface's orientation
int32_t mSurfaceOrientation;
+ // The Screen's orientation
+ int32_t mScreenOrientation;
+
// The key event signal
Integration::Scene::KeyEventSignalType mKeyEventSignal;
Integration::Scene::KeyEventGeneratedSignalType mKeyEventGeneratedSignal;
+ Integration::Scene::KeyEventGeneratedSignalType mInterceptKeyEventSignal;
// The event processing finished signal
Integration::Scene::EventProcessingFinishedSignalType mEventProcessingFinishedSignal;
Integration::Scene::TouchEventSignalType mTouchedSignal;
// The wheel event signal
- Integration::Scene::WheelEventSignalType mWheelEventSignal;
+ Integration::Scene::WheelEventSignalType mWheelEventSignal;
+ Integration::Scene::WheelEventGeneratedSignalType mWheelEventGeneratedSignal;
};
} // namespace Internal