// EXTERNAL INCLUDES
#include <dali/devel-api/common/stage-devel.h>
#include <dali/integration-api/adaptor-framework/adaptor.h>
+#include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+namespace
+{
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
+}
ProcessorController::ProcessorController()
: mHandler(nullptr),
mPostHandler(nullptr),
+ mProcessRegistered(false),
mKeepRenderingApplied(false),
mProcessingEvents(false),
mProcessEventsIdleRequested(false)
{
- {
- try
- {
- Dali::Adaptor::Get().RegisterProcessor(*this);
- Dali::Adaptor::Get().RegisterProcessor(*this, true);
- }
- CALL_CATCH_EXCEPTION();
- }
}
ProcessorController::~ProcessorController()
{
try
{
- Dali::Adaptor::Get().UnregisterProcessor(*this);
- Dali::Adaptor::Get().UnregisterProcessor(*this, true);
+ if(mProcessRegistered)
+ {
+ Dali::Adaptor::Get().UnregisterProcessor(*this);
+ Dali::Adaptor::Get().UnregisterProcessor(*this, true);
+
+ mProcessRegistered = false;
+ }
}
CALL_CATCH_EXCEPTION();
}
if(DALI_LIKELY(mHandler != nullptr))
{
+ DALI_TRACE_SCOPE(gTraceFilter, "NUI_PROCESS");
mHandler();
}
}
else
{
- if(DALI_LIKELY(mPostHandler != nullptr))
+ if(mPostHandler != nullptr)
{
+ DALI_TRACE_SCOPE(gTraceFilter, "NUI_POST_PROCESS");
mPostHandler();
}
// Make awake events can be applied after PostProcess done.
void ProcessorController::Awake()
{
+ DALI_ASSERT_ALWAYS(mProcessRegistered && "ProcessorController should be initialized before call Awake");
+
if(!mProcessingEvents && !mKeepRenderingApplied)
{
if(DALI_LIKELY(Dali::Stage::IsInstalled())) ///< Avoid worker thread calling.
}
}
+void ProcessorController::RegisterProcess()
+{
+ if(!mProcessRegistered)
+ {
+ try
+ {
+ Dali::Adaptor::Get().RegisterProcessor(*this);
+ Dali::Adaptor::Get().RegisterProcessor(*this, true);
+
+ mProcessRegistered = true;
+ }
+ CALL_CATCH_EXCEPTION();
+ }
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// ProcessorController Bindings
SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_ProcessorController() {
}
}
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ProcessorController_Initialize(void* jarg1)
+{
+ ProcessorController* processorController = (ProcessorController *) jarg1;
+
+ if( processorController )
+ {
+ processorController->RegisterProcess();
+ }
+}
+
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ProcessorController_SetCallback( void* jarg1, ProcessorController::ProcessorControllerProcessCallback callback )
{
ProcessorController* processorController = (ProcessorController *) jarg1;
public:
/**
- * @brief Constructor - creates a ProcessorController and registers it with dali-core.
+ * @brief Constructor - creates a ProcessorController.
*
*/
ProcessorController();
~ProcessorController();
/**
+ * @brief Register this processor into dali-core.
+ */
+ void RegisterProcess();
+
+ /**
* @copydoc Dali::Integration::Processor::Process()
*/
void Process(bool postProcessor) override;
ProcessorControllerProcessCallback mHandler; ///< PreProcessHandler before Relayout
ProcessorControllerProcessCallback mPostHandler; ///< PostProcessHandler after Relayout
+ bool mProcessRegistered : 1; ///< True if we call RegisterProcess. False otherwise.
bool mKeepRenderingApplied : 1; ///< True if we call Stage::KeepRendering(0.0f). It need to avoid duplicated keep rendering call
bool mProcessingEvents : 1; ///< True if we are running Process now.
bool mProcessEventsIdleRequested : 1; ///< True if we call Adaptor::RequestProcessEventsOnIdle(). It need to avoid duplicated request call.
{
try
{
- Dali::Scene3D::Loader::AnimationDefinition animationDefinition = Dali::Scene3D::Loader::LoadBvh(filename, "LoadedBvhAnimation", scale);
+ Dali::Scene3D::Loader::AnimationDefinition animationDefinition = Dali::Scene3D::Loader::LoadBvh(filename, "LoadedBvhAnimation", false, scale);
if(csUseRootNodeTranslate && animationDefinition.GetPropertyCount() > 0u)
{
{
try
{
- Dali::Scene3D::Loader::AnimationDefinition animationDefinition = Dali::Scene3D::Loader::LoadBvhFromBuffer(rawBuffer, csBufferLength, "LoadedBvhAnimation", scale);
+ Dali::Scene3D::Loader::AnimationDefinition animationDefinition = Dali::Scene3D::Loader::LoadBvhFromBuffer(rawBuffer, csBufferLength, "LoadedBvhAnimation", false, scale);
if(csUseRootNodeTranslate && animationDefinition.GetPropertyCount() > 0u)
{
return result;
}
-SWIGEXPORT void SWIGSTDCALL CSharp_Dali_MotionData_LoadBvh(void* csMotionData, char* csFileName, void* csScale, bool csSynchronousLoad)
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_MotionData_LoadBvh(void* csMotionData, char* csFileName, bool csUseRootTranslationOnly, void* csScale, bool csSynchronousLoad)
{
Dali::Scene3D::MotionData* motionData = (Dali::Scene3D::MotionData*)csMotionData;
{
try
{
- motionData->LoadBvh(filename, scale, csSynchronousLoad);
+ motionData->LoadBvh(filename, csUseRootTranslationOnly, scale, csSynchronousLoad);
}
CALL_CATCH_EXCEPTION();
}
}
-SWIGEXPORT void SWIGSTDCALL CSharp_Dali_MotionData_LoadBvhFromBuffer(void* csMotionData, char* csBuffer, int csBufferLength, void* csScale, bool csSynchronousLoad)
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_MotionData_LoadBvhFromBuffer(void* csMotionData, char* csBuffer, int csBufferLength, bool csUseRootTranslationOnly, void* csScale, bool csSynchronousLoad)
{
Dali::Scene3D::MotionData* motionData = (Dali::Scene3D::MotionData*)csMotionData;
{
try
{
- motionData->LoadBvhFromBuffer(rawBuffer, csBufferLength, scale, csSynchronousLoad);
+ motionData->LoadBvhFromBuffer(rawBuffer, csBufferLength, csUseRootTranslationOnly, scale, csSynchronousLoad);
}
CALL_CATCH_EXCEPTION();
}
return result;
}
+ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_SceneView_SetResolution(void *csSceneView, uint32_t width, uint32_t height)
+ {
+ Dali::Scene3D::SceneView *sceneView = (Dali::Scene3D::SceneView *)csSceneView;
+
+ if (!sceneView)
+ {
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Scene3D::SceneView", 0);
+ return;
+ }
+ {
+ try
+ {
+ sceneView->SetResolution(width, height);
+ }
+ CALL_CATCH_EXCEPTION();
+ }
+ }
+
+ SWIGEXPORT uint32_t SWIGSTDCALL CSharp_Dali_SceneView_GetResolutionWidth(void *csSceneView)
+ {
+ Dali::Scene3D::SceneView *sceneView = (Dali::Scene3D::SceneView *)csSceneView;
+ uint32_t result = 0u;
+
+ if (!sceneView)
+ {
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Scene3D::SceneView", 0);
+ return 0;
+ }
+ {
+ try
+ {
+ result = static_cast<uint32_t>(sceneView->GetResolutionWidth());
+ }
+ CALL_CATCH_EXCEPTION(0);
+ }
+ return result;
+ }
+
+ SWIGEXPORT uint32_t SWIGSTDCALL CSharp_Dali_SceneView_GetResolutionHeight(void *csSceneView)
+ {
+ Dali::Scene3D::SceneView *sceneView = (Dali::Scene3D::SceneView *)csSceneView;
+ uint32_t result = 0u;
+
+ if (!sceneView)
+ {
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Scene3D::SceneView", 0);
+ return 0;
+ }
+ {
+ try
+ {
+ result = static_cast<uint32_t>(sceneView->GetResolutionHeight());
+ }
+ CALL_CATCH_EXCEPTION(0);
+ }
+ return result;
+ }
+
+ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_SceneView_ResetResolution(void *csSceneView)
+ {
+ Dali::Scene3D::SceneView *sceneView = (Dali::Scene3D::SceneView *)csSceneView;
+
+ if (!sceneView)
+ {
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Scene3D::SceneView", 0);
+ return;
+ }
+ {
+ try
+ {
+ sceneView->ResetResolution();
+ }
+ CALL_CATCH_EXCEPTION();
+ }
+ }
+
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_SceneView_SetFramebufferMultiSamplingLevel(void *csSceneView, uint32_t multiSamplingLevel)
{
Dali::Scene3D::SceneView *sceneView = (Dali::Scene3D::SceneView *)csSceneView;
return result;
}
+ SWIGEXPORT int SWIGSTDCALL CSharp_Dali_SceneView_Property_AlphaMaskURL_get()
+ {
+ int jresult;
+ int result;
+
+ result = (int)Dali::Scene3D::SceneView::Property::ALPHA_MASK_URL;
+ jresult = (int)result;
+ return jresult;
+ }
+
+ SWIGEXPORT int SWIGSTDCALL CSharp_Dali_SceneView_Property_MaskContentScale_get()
+ {
+ int jresult;
+ int result;
+
+ result = (int)Dali::Scene3D::SceneView::Property::MASK_CONTENT_SCALE;
+ jresult = (int)result;
+ return jresult;
+ }
+
+ SWIGEXPORT int SWIGSTDCALL CSharp_Dali_SceneView_Property_CropToMask_get()
+ {
+ int jresult;
+ int result;
+
+ result = (int)Dali::Scene3D::SceneView::Property::CROP_TO_MASK;
+ jresult = (int)result;
+ return jresult;
+ }
+
#ifdef __cplusplus
}
#endif
Name: dali2-csharp-binder
Summary: The DALI Csharp Binder
-Version: 2.3.1
+Version: 2.3.2
Release: 1
Group: uifw/graphic
License: Apache-2.0 and BSD-3-Clause and MIT