Merge remote-tracking branch 'origin/master' into tizen
authorTizenAPI-Bot <tizenapi@samsung.com>
Tue, 7 Mar 2023 08:51:36 +0000 (08:51 +0000)
committerTizenAPI-Bot <tizenapi@samsung.com>
Tue, 7 Mar 2023 08:51:36 +0000 (08:51 +0000)
.github/workflows/build-branches.yml
.github/workflows/build-pull-request.yml
.github/workflows/check-api-level.yml
.github/workflows/deploy-packages.yml
.github/workflows/nightly-release.yml
.github/workflows/postback-pull-request.yml
src/Tizen.NUI/src/public/BaseComponents/ImageView.cs
src/Tizen.NUI/src/public/Common/Layer.cs

index 57a264c..a92c8ad 100644 (file)
@@ -18,10 +18,10 @@ jobs:
   build:
     runs-on: ubuntu-20.04
     steps:
-    - uses: actions/checkout@v2
+    - uses: actions/checkout@v3
 
     - name: Setup .NET Core
-      uses: actions/setup-dotnet@v1
+      uses: actions/setup-dotnet@v3
       with:
         dotnet-version: 3.1.402
 
@@ -29,7 +29,7 @@ jobs:
       run: ./build.sh full
 
     - name: Checkout APITool
-      uses: actions/checkout@v2
+      uses: actions/checkout@v3
       with:
         repository: TizenAPI/APITool
         path: .apitool
index 8ce814b..9e21c10 100644 (file)
@@ -15,7 +15,7 @@ jobs:
     - uses: actions/checkout@v2
 
     - name: Setup .NET Core
-      uses: actions/setup-dotnet@v1
+      uses: actions/setup-dotnet@v3
       with:
         dotnet-version: 3.1.402
 
@@ -67,7 +67,7 @@ jobs:
     runs-on: ubuntu-20.04
     steps:
     - name: Setup .NET Core
-      uses: actions/setup-dotnet@v1
+      uses: actions/setup-dotnet@v3
       with:
         dotnet-version: 3.1.x
 
index 57c130d..33c1565 100644 (file)
@@ -20,7 +20,7 @@ jobs:
 
     - name: Add Labels
       if: ${{ steps.metadata.outputs.data }}
-      uses: actions/github-script@v2
+      uses: actions/github-script@v6
       env:
         BRANCH_METADATA: ${{ steps.metadata.outputs.data }}
       with:
index a08d73c..15e6932 100644 (file)
@@ -28,7 +28,7 @@ jobs:
         ref: ${{ env.TARGET_BRANCH }}
         fetch-depth: 0
     
-    - uses: actions/setup-dotnet@v1
+    - uses: actions/setup-dotnet@v3
       with:
         dotnet-version: '6.0.102'
 
@@ -51,7 +51,7 @@ jobs:
       run: |
         VERSION=$VERSION_PREFIX.$((10000+$(git rev-list --count HEAD)))
         echo VERSION=$VERSION
-        echo "::set-output name=version::$VERSION"
+        echo "version=$VERSION" >> $GITHUB_OUTPUT
 
     - name: Build
       env:
index d3ac78d..790663c 100644 (file)
@@ -28,7 +28,7 @@ jobs:
             TARGETS="${TARGETS} $x"
           fi
         done
-        echo "::set-output name=targets::${TARGETS}"
+        echo "targets=${TARGETS}" >> $GITHUB_OUTPUT
 
     - name: Trigger Release
       uses: actions/github-script@v4
index a04217b..202a321 100644 (file)
@@ -21,7 +21,7 @@ jobs:
 
     - name: Find Pull Request
       id: pull_request
-      uses: actions/github-script@v2
+      uses: actions/github-script@v6
       env:
         WORKFLOW_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
       with:
@@ -41,7 +41,7 @@ jobs:
 
     - name: Report Error if Failure
       if: ${{ github.event.workflow_run.conclusion == 'failure' }}
-      uses: actions/github-script@v2
+      uses: actions/github-script@v6
       env:
         PR_NUMBER: ${{ steps.pull_request.outputs.number }}
       with:
index 295c04c..7ef9663 100755 (executable)
@@ -37,6 +37,22 @@ namespace Tizen.NUI.BaseComponents
         private EventHandler<ResourceLoadedEventArgs> _resourceLoadedEventHandler;
         private _resourceLoadedCallbackType _resourceLoadedCallback;
 
+        /// <summary>
+        /// Convert non-null string that some keyword change as application specific directory.
+        /// </summary>
+        /// <param name="value">Inputed and replaced after this function finished</param>
+        /// <returns>Replaced url</returns>
+        private static string ConvertResourceUrl(ref string value)
+        {
+            value ??= "";
+            if (value.StartsWith("*Resource*"))
+            {
+                string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
+                value = value.Replace("*Resource*", resource);
+            }
+            return value;
+        }
+
         // Collection of image-sensitive properties.
         private static readonly List<int> cachedImagePropertyKeyList = new List<int> {
             Visual.Property.Type,
@@ -101,9 +117,9 @@ namespace Tizen.NUI.BaseComponents
         /// </summary>
         /// <param name="url">The URL of the image resource to display.</param>
         /// <since_tizen> 3 </since_tizen>
-        public ImageView(string url) : this(Interop.ImageView.New(url), true)
+        public ImageView(string url) : this(Interop.ImageView.New(ConvertResourceUrl(ref url)), true)
         {
-            ResourceUrl = url;
+            _resourceUrl = url;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
         }
@@ -115,16 +131,18 @@ namespace Tizen.NUI.BaseComponents
         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public ImageView(string url, bool shown) : this(Interop.ImageView.New(url), true)
+        public ImageView(string url, bool shown) : this(Interop.ImageView.New(ConvertResourceUrl(ref url)), true)
         {
-            ResourceUrl = url;
+            _resourceUrl = url;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             SetVisible(shown);
         }
 
-        internal ImageView(string url, Uint16Pair size, bool shown = true) : this(Interop.ImageView.New(url, Uint16Pair.getCPtr(size)), true)
+        internal ImageView(string url, Uint16Pair size, bool shown = true) : this(Interop.ImageView.New(ConvertResourceUrl(ref url), Uint16Pair.getCPtr(size)), true)
         {
-            ResourceUrl = url;
+            _resourceUrl = url;
+            _desired_width = size?.GetWidth() ?? -1;
+            _desired_height = size?.GetHeight() ?? -1;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
             if (!shown)
@@ -620,10 +638,10 @@ namespace Tizen.NUI.BaseComponents
                 return;
             }
 
-            Interop.ImageView.SetImage(SwigCPtr, url);
+            Interop.ImageView.SetImage(SwigCPtr, ConvertResourceUrl(ref url));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
-            ResourceUrl = url;
+            _resourceUrl = url;
         }
 
         /// <summary>
@@ -1166,10 +1184,12 @@ namespace Tizen.NUI.BaseComponents
                 return;
             }
 
-            Interop.ImageView.SetImage(SwigCPtr, url, Uint16Pair.getCPtr(size));
+            Interop.ImageView.SetImage(SwigCPtr, ConvertResourceUrl(ref url), Uint16Pair.getCPtr(size));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
-            ResourceUrl = url;
+            _resourceUrl = url;
+            _desired_width = size?.GetWidth() ?? -1;
+            _desired_height = size?.GetHeight() ?? -1;
         }
 
         internal ViewResourceReadySignal ResourceReadySignal(View view)
@@ -1277,13 +1297,7 @@ namespace Tizen.NUI.BaseComponents
 
         private void SetResourceUrl(string value)
         {
-            value = (value == null ? "" : value);
-            if (value.StartsWith("*Resource*"))
-            {
-                string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
-                value = value.Replace("*Resource*", resource);
-            }
-            if(_resourceUrl != value)
+            if(_resourceUrl != ConvertResourceUrl(ref value))
             {
                 _resourceUrl = value;
                 if(string.IsNullOrEmpty(_resourceUrl))
index cc9629c..a611fa2 100755 (executable)
@@ -533,8 +533,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public void MoveAbove(Layer target)
         {
-            Interop.Layer.MoveAbove(SwigCPtr, Layer.getCPtr(target));
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            RaiseAbove(target);
         }
 
         /// <summary>
@@ -545,8 +544,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public void MoveBelow(Layer target)
         {
-            Interop.Layer.MoveBelow(SwigCPtr, Layer.getCPtr(target));
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            LowerBelow(target);
         }
 
         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.