[dali_2.1.27] Merge branch 'devel/master' 05/276505/1
authorDavid Steele <david.steele@samsung.com>
Fri, 17 Jun 2022 10:28:42 +0000 (11:28 +0100)
committerDavid Steele <david.steele@samsung.com>
Fri, 17 Jun 2022 10:28:42 +0000 (11:28 +0100)
Change-Id: I7ade132f41981c24ba781d200e84be80be170244

build/tizen/configure.ac
build/tizen/dali2-csharp-binder.pc.in
dali-csharp-binder/src/keyboard-focus-manager-wrap.cpp
dali-csharp-binder/src/view-wrapper-impl-wrap.cpp
packaging/dali-csharp-binder.spec

index 849f8e0..5367cb3 100644 (file)
@@ -109,11 +109,39 @@ else
   dataReadOnlyDir=${prefix}/share/dali/
 fi
 
+if test x$includedir != x; then
+  INCLUDE_DIR=$includedir
+else
+  INCLUDE_DIR=$prefix/include/
+fi
+if test x$libdir != x; then
+  LIB_DIR=$libdir
+else
+  LIB_DIR=$prefix/lib/
+fi
+if test x$bindir != x; then
+  BIN_DIR=$bindir
+else
+  BIN_DIR=$prefix/bin/
+fi
+
+PREFIX=$prefix
+EXEC_PREFIX=$exec_prefix
+DEV_INCLUDE_PATH=$INCLUDE_DIR
+
 AC_SUBST(dataReadWriteDir)
 AC_SUBST(dataReadOnlyDir)
 AC_SUBST(DALI_CSHARP_BINDER_CFLAGS)
 AC_SUBST(DALI_PROFILE_CFLAGS)
 
+AC_SUBST(INCLUDE_DIR)
+AC_SUBST(LIB_DIR)
+AC_SUBST(BIN_DIR)
+
+AC_SUBST(PREFIX)
+AC_SUBST(EXEC_PREFIX)
+AC_SUBST(DEV_INCLUDE_PATH)
+
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_FILES([dali2-csharp-binder.pc])
 
@@ -124,6 +152,10 @@ echo "
 Configuration
 -------------
   Prefix:                           $prefix
+  EXEC_PREFIX:                      $EXEC_PREFIX
+  INCLUDE_DIR:                      $INCLUDE_DIR
+  LIB_DIR:                          $LIB_DIR
+  BIN_DIR:                          $BIN_DIR
   Debug Build:                      $enable_debug
   Compile flags:                    $DALI_CSHARP_BINDER_CFLAGS
   Profile:                          $enable_profile
index 6a0964b..04974ed 100644 (file)
@@ -1,13 +1,14 @@
 # Package Information for pkg-config
 
 prefix=@PREFIX@
-exec_prefix=@EXEC_DIR@
+exec_prefix=@EXEC_PREFIX@
+apiversion=@DALI_CSHARP_BINDER_VERSION@
 libdir=@LIB_DIR@
-includedir=@INC_DIR@
+includedir=@DEV_INCLUDE_PATH@
 
 Name: DALi C# binder
 Description: DALi C# binder Libaray
-Version: @VERSION@
+Version: ${apiversion}
 Requires: dali-core dali-adaptor dali-toolkit
 Libs: -L${libdir} -ldali2-csharp-binder
 Cflags: -I${includedir}/dali-csharp-binder
index 040f37f..71e5895 100755 (executable)
@@ -513,8 +513,18 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_KeyboardPreFocusChangeSignal_Emit(void * ja
 }
 
 
-SWIGEXPORT void * SWIGSTDCALL CSharp_KeyboardFocusManager_GetNearestFocusableActor(Dali::Actor rootActor, Dali::Actor currentFocusedActor, Dali::Toolkit::Control::KeyboardFocus::Direction direction) {
+SWIGEXPORT void * SWIGSTDCALL CSharp_KeyboardFocusManager_GetNearestFocusableActor(void * jarg1, void * jarg2, Dali::Toolkit::Control::KeyboardFocus::Direction direction) {
   void * jresult;
+  Dali::Actor *argp1 = (Dali::Actor *)jarg1;
+  Dali::Actor *argp2 = (Dali::Actor *)jarg2;
+  Dali::Actor rootActor;
+  Dali::Actor currentFocusedActor;
+  if (argp1) {
+    rootActor = *argp1;
+  }
+  if (argp2) {
+    currentFocusedActor = *argp2;
+  }
   Dali::Actor result;
   {
     try {
index 61b0af2..de6935a 100755 (executable)
@@ -137,7 +137,12 @@ Dali::Vector3 SwigDirector_ViewWrapperImpl::GetNaturalSize() {
       SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Unexpected null return for type Dali::Vector3", 0);
       return c_result;
     }
-    c_result = *(Dali::Vector3 *)jresult;
+
+    // Tizen.NUI.ViewWrapperImpl.DirectorGetNaturalSize() is assigned to swig_callbackGetNaturalSize().
+    // Tizen.NUI.ViewWrapperImpl.DirectorGetNaturalSize() returns Dali::Vector2.
+    // Moreover, Dali::Vector3 supports operator '=' with Dali::Vector2.
+    // Not to cause ASAN heap-buffer-overflow issue here, casting Dali::Vector2 and assigning it to Dali::Vector3 is required.
+    c_result = *(Dali::Vector2 *)jresult;
   }
   return c_result;
 }
index 73f1b05..78d9573 100644 (file)
@@ -21,7 +21,7 @@
 
 Name: dali2-csharp-binder
 Summary: The DALI Csharp Binder
-Version: 2.1.26
+Version: 2.1.27
 Release: 1
 Group: uifw/graphic
 License: Apache-2.0 and BSD-3-Clause and MIT