X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fintegration-api%2Fscene.h;h=3f2d7ed3a0c3cc059c8e7330333e8de07235c559;hb=refs%2Fchanges%2F44%2F271544%2F2;hp=0bfac7f7ad4a6d8aa6516f308b0ae4a93a46e2fd;hpb=3cd51c673cc0fa04cbf0183b73c5a2a4329065e1;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/integration-api/scene.h b/dali/integration-api/scene.h index 0bfac7f..3f2d7ed 100644 --- a/dali/integration-api/scene.h +++ b/dali/integration-api/scene.h @@ -2,7 +2,7 @@ #define DALI_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. @@ -41,6 +41,11 @@ namespace Internal DALI_INTERNAL class Scene; } +namespace Graphics +{ +class RenderTarget; +} + namespace Integration { struct Event; @@ -59,6 +64,7 @@ public: using KeyEventGeneratedSignalType = Signal; ///< key event generated signal type using TouchEventSignalType = Signal; ///< Touch signal type using WheelEventSignalType = Signal; ///< WheelEvent signal type + using WheelEventGeneratedSignalType = Signal; ///< WheelEvent generated signal type using FrameCallbackContainer = std::vector, int32_t> >; @@ -218,6 +224,13 @@ public: void Discard(); /** + * @brief Sets the render target for the surface. + * + * @param[in] renderTarget The render target for the surface + */ + void SetSurfaceRenderTarget(Graphics::RenderTarget* renderTarget); + + /** * @brief Retrieve the Scene that the given actor belongs to. * @return The Scene. */ @@ -314,6 +327,30 @@ public: bool IsSurfaceRectChanged() const; /** + * @brief Send message to acknowledge for completing window rotation with current window orientation. + * + * If this function is called, the message is sent to render thread, then mSurfaceRectChanged in scene-graph-scene is set with true. + * After that, render thread checks whether window rotation event is received, mSurfaceRectChanged and the neccessary flag are set. + * If they are all true, rotation done function is called to complete window rotation. + */ + void SetRotationCompletedAcknowledgement(); + + /** + * @brief Query wheter is set to acknowledge for completing surface rotation. + * @return true it should be acknowledged. + * + * If SetRotationCompletedAcknowledgement() is called and the related message is received to scene-graph-scene, + * then mSurfaceRectChanged in scene-graph-scene is set with true. + * + * When this function is called, the mSurfaceRectChanged in scene-graph-scene is return. + * Then, the flag will be reset. + * + * @note This function should be not called the application's main thread. + * Because this function should be called in windwow surface's postrender() function to complete window rotation manually. + */ + bool IsRotationCompletedAcknowledgementSet() const; + + /** * @brief This signal is emitted just after the event processing is finished. * * @return The signal to connect to @@ -375,6 +412,23 @@ public: */ WheelEventSignalType& WheelEventSignal(); + /** + * @brief When a custom wheel event occurs, it need to process the focused actor first. + * + * Therefore, KeyboardFocusManager first checks whether WheelEvent is generated as WheelEventGeneratedSignal. + * After that wheelEventProcessor must invoke WheelEvent only if wheelEventGeneratedSignal () is not consumed. + * + * This is only valid for custom wheel events. + * + * A callback of the following type may be connected: + * @code + * bool YourCallbackName(const WheelEvent& event); + * @endcode + * + * @return The return is true if WheelEvent is consumed, otherwise false. + */ + WheelEventGeneratedSignalType& WheelEventGeneratedSignal(); + public: // Not intended for application developers /** * @brief This constructor is used by Dali::New() methods.