Revert "[Tizen] Change nui property get/set not to use PropertyValue (part5)"
authortscholb <scholb.kim@samsung.com>
Wed, 2 Nov 2022 08:32:51 +0000 (17:32 +0900)
committertscholb <scholb.kim@samsung.com>
Wed, 2 Nov 2022 08:32:51 +0000 (17:32 +0900)
This reverts commit e1a8a6ce889bfd3028f76bf76698ff812c300e61.

dali-csharp-binder/file.list
dali-csharp-binder/src/internal-visual-property-get-set-wrap.cpp [deleted file]

index 1eb6134..4e7d4d8 100755 (executable)
@@ -35,8 +35,6 @@ SET( dali_csharp_binder_common_src_files
   ${dali_csharp_binder_dir}/src/tts-player-wrap.cpp
   ${dali_csharp_binder_dir}/src/input-method-context-wrap.cpp
   ${dali_csharp_binder_dir}/src/input-method-options-wrap.cpp
-  ${dali_csharp_binder_dir}/src/internal-property-get-set-wrap.cpp
-  ${dali_csharp_binder_dir}/src/internal-visual-property-get-set-wrap.cpp
   ${dali_csharp_binder_dir}/src/animation-wrap.cpp
   ${dali_csharp_binder_dir}/src/adaptor-wrap.cpp
   ${dali_csharp_binder_dir}/src/extents-wrap.cpp
@@ -56,6 +54,7 @@ SET( dali_csharp_binder_common_src_files
   ${dali_csharp_binder_dir}/src/native-image-queue-wrap.cpp
   ${dali_csharp_binder_dir}/src/style-manager-wrap.cpp
   ${dali_csharp_binder_dir}/src/drag-and-drop-wrap.cpp
+  ${dali_csharp_binder_dir}/src/internal-property-get-set-wrap.cpp
 )
 
 # added for key grab binding only for tizen
diff --git a/dali-csharp-binder/src/internal-visual-property-get-set-wrap.cpp b/dali-csharp-binder/src/internal-visual-property-get-set-wrap.cpp
deleted file mode 100755 (executable)
index f4c7087..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * 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.
- * 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/dali.h>
-#include <dali-toolkit/dali-toolkit.h>
-#include <dali-toolkit/devel-api/controls/control-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-actions-devel.h>
-#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali/integration-api/debug.h>
-#include <string>
-
-// INTERNAL INCLUDES
-#include "common.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-  typedef char *(SWIGSTDCALL *SWIG_CSharpStringHelperCallback)(const char *);
-  extern SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback;
-
-  enum InternalPropertyReturnType
-  {
-    NO_ERROR = 0,
-    ERROR_UNKNOWN = 1,
-    ERROR_IMPOSSIBLE_SET = 2,
-  };
-
-  // Update visual property by Action::UPDATE_PROPERTY.
-
-  SWIGEXPORT int SWIGSTDCALL CSharp_Dali_View_InternalUpdateVisualPropertyFloat(void *view, int visualIndex, int visualPropertyIndex, float valFloat)
-  {
-    Dali::Toolkit::Control *pControl = (Dali::Toolkit::Control *)view;
-
-    if (!pControl)
-    {
-      SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_CSharpArgumentNullException, "view is null!");
-      return (int)InternalPropertyReturnType::ERROR_UNKNOWN;
-    }
-
-    try
-    {
-      Dali::Property::Map tempMap;
-      tempMap.Insert(visualPropertyIndex, valFloat);
-      Dali::Toolkit::DevelControl::DoAction(*pControl, visualIndex, Dali::Toolkit::DevelVisual::Action::UPDATE_PROPERTY, std::move(tempMap));
-    }
-    CALL_CATCH_EXCEPTION((int)InternalPropertyReturnType::ERROR_UNKNOWN);
-
-    return (int)InternalPropertyReturnType::NO_ERROR;
-  }
-
-  SWIGEXPORT int SWIGSTDCALL CSharp_Dali_View_InternalUpdateVisualPropertyInt(void *view, int visualIndex, int visualPropertyIndex, int valInt)
-  {
-    Dali::Toolkit::Control *pControl = (Dali::Toolkit::Control *)view;
-
-    if (!pControl)
-    {
-      SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_CSharpArgumentNullException, "view is null!");
-      return (int)InternalPropertyReturnType::ERROR_UNKNOWN;
-    }
-
-    try
-    {
-      Dali::Property::Map tempMap;
-      tempMap.Insert(visualPropertyIndex, valInt);
-      Dali::Toolkit::DevelControl::DoAction(*pControl, visualIndex, Dali::Toolkit::DevelVisual::Action::UPDATE_PROPERTY, std::move(tempMap));
-    }
-    CALL_CATCH_EXCEPTION((int)InternalPropertyReturnType::ERROR_UNKNOWN);
-
-    return (int)InternalPropertyReturnType::NO_ERROR;
-  }
-
-  SWIGEXPORT int SWIGSTDCALL CSharp_Dali_View_InternalUpdateVisualPropertyVector4(void *view, int visualIndex, int visualPropertyIndex, void *vector4)
-  {
-    Dali::Toolkit::Control *pControl = (Dali::Toolkit::Control *)view;
-    const Dali::Vector4 *pVector4 = (const Dali::Vector4 *)vector4;
-
-    if (!pControl)
-    {
-      SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_CSharpArgumentNullException, "view is null!");
-      return (int)InternalPropertyReturnType::ERROR_UNKNOWN;
-    }
-    if (!pVector4)
-    {
-      SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_CSharpArgumentNullException, "vector4 is null!");
-      return (int)InternalPropertyReturnType::ERROR_UNKNOWN;
-    }
-
-    try
-    {
-      Dali::Property::Map tempMap;
-      tempMap.Insert(visualPropertyIndex, *pVector4);
-      Dali::Toolkit::DevelControl::DoAction(*pControl, visualIndex, Dali::Toolkit::DevelVisual::Action::UPDATE_PROPERTY, std::move(tempMap));
-    }
-    CALL_CATCH_EXCEPTION((int)InternalPropertyReturnType::ERROR_UNKNOWN);
-
-    return (int)InternalPropertyReturnType::NO_ERROR;
-  }
-
-  // Other Actions witch is not Action::UPDATE_PROPERTY.
-
-  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_View_DoActionWithEmptyAttributes(void *view, int visualIndex, int actionId, void *vector4)
-  {
-    Dali::Toolkit::Control *pControl  = (Dali::Toolkit::Control *)view;
-
-    if (!pControl) {
-      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::Control & type is null", 0);
-    }
-    {
-      try {
-        Dali::Toolkit::DevelControl::DoAction(*pControl, visualIndex, actionId, Dali::Property::Value());
-      } CALL_CATCH_EXCEPTION();
-    }
-  }
-
-  // Get value from visual
-  // NOTE : Control.GetProperty(visualIndex) is not enought because it cannot get custom registed visual.
-  // NOTE : Currently, there is no way to get value from visual directly. We need to use CreatePropertyMap.
-
-  SWIGEXPORT int SWIGSTDCALL CSharp_Dali_Actor_InternalRetrievingVisualPropertyInt(void *view, int visualIndex, int visualPropertyIndex, int *valInt)
-  {
-    Dali::Toolkit::Control *pControl  = (Dali::Toolkit::Control *)view;
-
-    if (!pControl)
-    {
-      SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_CSharpArgumentNullException, "view is null!");
-      return (int)InternalPropertyReturnType::ERROR_UNKNOWN;
-    }
-    if (!valInt)
-    {
-      SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_CSharpArgumentNullException, "valInt is null!");
-      return (int)InternalPropertyReturnType::ERROR_UNKNOWN;
-    }
-
-    try
-    {
-      Dali::Toolkit::Internal::Control& internalControl = Dali::Toolkit::Internal::GetImplementation(*pControl);
-      Dali::Toolkit::Visual::Base       visualBase      = Dali::Toolkit::DevelControl::GetVisual(internalControl, visualIndex);
-      if(visualBase)
-      {
-        Dali::Property::Map tempMap;
-        visualBase.CreatePropertyMap(tempMap);
-        Dali::Property::Value* retValuePtr = tempMap.Find(visualPropertyIndex);
-        if(retValuePtr)
-        {
-          *valInt = retValuePtr->Get<int>();
-        }
-      }
-    }
-    CALL_CATCH_EXCEPTION((int)InternalPropertyReturnType::ERROR_UNKNOWN);
-
-    return (int)InternalPropertyReturnType::NO_ERROR;
-  }
-
-  SWIGEXPORT int SWIGSTDCALL CSharp_Dali_Actor_InternalRetrievingVisualPropertyString(void *view, int visualIndex, int visualPropertyIndex, char** valString)
-  {
-    Dali::Toolkit::Control *pControl  = (Dali::Toolkit::Control *)view;
-
-    if (!pControl)
-    {
-      SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_CSharpArgumentNullException, "view is null!");
-      return (int)InternalPropertyReturnType::ERROR_UNKNOWN;
-    }
-    if (!valString)
-    {
-      SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_CSharpArgumentNullException, "valString is null!");
-      return (int)InternalPropertyReturnType::ERROR_UNKNOWN;
-    }
-
-    try
-    {
-      Dali::Toolkit::Internal::Control& internalControl = Dali::Toolkit::Internal::GetImplementation(*pControl);
-      Dali::Toolkit::Visual::Base       visualBase      = Dali::Toolkit::DevelControl::GetVisual(internalControl, visualIndex);
-      if(visualBase)
-      {
-        Dali::Property::Map tempMap;
-        visualBase.CreatePropertyMap(tempMap);
-        Dali::Property::Value* retValuePtr = tempMap.Find(visualPropertyIndex);
-        if(retValuePtr)
-        {
-          //typemap in
-          std::string temp = retValuePtr->Get<std::string>();
-
-          //Typemap argout in c++ file.
-          //This will convert c++ string to c# string
-          *valString = SWIG_csharp_string_callback(temp.c_str());
-        }
-      }
-    }
-    CALL_CATCH_EXCEPTION((int)InternalPropertyReturnType::ERROR_UNKNOWN);
-
-    return (int)InternalPropertyReturnType::NO_ERROR;
-  }
-
-  SWIGEXPORT int SWIGSTDCALL CSharp_Dali_Actor_InternalRetrievingVisualPropertyVector4(void *view, int visualIndex, int visualPropertyIndex, void *vector4)
-  {
-    Dali::Toolkit::Control *pControl  = (Dali::Toolkit::Control *)view;
-    Dali::Vector4 *pVector4 = (Dali::Vector4 *)vector4;
-
-    if (!pControl)
-    {
-      SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_CSharpArgumentNullException, "view is null!");
-      return (int)InternalPropertyReturnType::ERROR_UNKNOWN;
-    }
-    if (!pVector4)
-    {
-      SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_CSharpArgumentNullException, "vector4 is null!");
-      return (int)InternalPropertyReturnType::ERROR_UNKNOWN;
-    }
-
-    try
-    {
-      Dali::Toolkit::Internal::Control& internalControl = Dali::Toolkit::Internal::GetImplementation(*pControl);
-      Dali::Toolkit::Visual::Base       visualBase      = Dali::Toolkit::DevelControl::GetVisual(internalControl, visualIndex);
-      if(visualBase)
-      {
-        Dali::Property::Map tempMap;
-        visualBase.CreatePropertyMap(tempMap);
-        Dali::Property::Value* retValuePtr = tempMap.Find(visualPropertyIndex);
-        if(retValuePtr)
-        {
-          *pVector4 = retValuePtr->Get<Dali::Vector4>();
-        }
-      }
-    }
-    CALL_CATCH_EXCEPTION((int)InternalPropertyReturnType::ERROR_UNKNOWN);
-
-    return (int)InternalPropertyReturnType::NO_ERROR;
-  }
-#ifdef __cplusplus
-}
-#endif