{
if (_resourceUrl != null)
{
- Size2D imageSize = ImageLoading.GetOriginalImageSize(_resourceUrl, true);
+ Size2D imageSize = ImageLoader.GetOriginalImageSize(_resourceUrl, true);
if( imageSize.Height > 0 && imageSize.Width > 0 && _desired_width > 0 && _desired_height > 0 )
{
int adjustedDesiredWidth, adjustedDesiredHeight;
}
}
- internal void Raise()
- {
- var parentChildren = GetParent()?.Children;
-
- if (parentChildren != null)
- {
- int currentIndex = parentChildren.IndexOf(this);
-
- // If the view is not already the last item in the list.
- if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
- {
- View temp = parentChildren[currentIndex + 1];
- parentChildren[currentIndex + 1] = this;
- parentChildren[currentIndex] = temp;
-
- Interop.NDalic.Raise(SwigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
- }
- }
-
- internal void Lower()
- {
- var parentChildren = GetParent()?.Children;
-
- if (parentChildren != null)
- {
- int currentIndex = parentChildren.IndexOf(this);
-
- // If the view is not already the first item in the list.
- if (currentIndex > 0 && currentIndex < parentChildren.Count)
- {
- View temp = parentChildren[currentIndex - 1];
- parentChildren[currentIndex - 1] = this;
- parentChildren[currentIndex] = temp;
-
- Interop.NDalic.Lower(SwigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
- }
- }
-
- /// <summary>
- /// Raises the view to above the target view.
- /// </summary>
- /// <remarks>The sibling order of views within the parent will be updated automatically.
- /// Views on the level above the target view will still be shown above this view.
- /// Raising this view above views with the same sibling order as each other will raise this view above them.
- /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
- /// </remarks>
- /// <param name="target">Will be raised above this view.</param>
- internal void RaiseAbove(View target)
- {
- var parentChildren = GetParent()?.Children;
-
- if (parentChildren != null)
- {
- int currentIndex = parentChildren.IndexOf(this);
- int targetIndex = parentChildren.IndexOf(target);
-
- if (currentIndex < 0 || targetIndex < 0 ||
- currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
- {
- NUILog.Error("index should be bigger than 0 and less than children of layer count");
- return;
- }
- // If the currentIndex is less than the target index and the target has the same parent.
- if (currentIndex < targetIndex)
- {
- parentChildren.Remove(this);
- parentChildren.Insert(targetIndex, this);
-
- Interop.NDalic.RaiseAbove(SwigCPtr, View.getCPtr(target));
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
- }
-
- }
-
- /// <summary>
- /// Lowers the view to below the target view.
- /// </summary>
- /// <remarks>The sibling order of views within the parent will be updated automatically.
- /// Lowering this view below views with the same sibling order as each other will lower this view above them.
- /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
- /// </remarks>
- /// <param name="target">Will be lowered below this view.</param>
- internal void LowerBelow(View target)
- {
- var parentChildren = GetParent()?.Children;
-
- if (parentChildren != null)
- {
- int currentIndex = parentChildren.IndexOf(this);
- int targetIndex = parentChildren.IndexOf(target);
- if (currentIndex < 0 || targetIndex < 0 ||
- currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
- {
- NUILog.Error("index should be bigger than 0 and less than children of layer count");
- return;
- }
-
- // If the currentIndex is not already the 0th index and the target has the same parent.
- if ((currentIndex != 0) && (targetIndex != -1) &&
- (currentIndex > targetIndex))
- {
- parentChildren.Remove(this);
- parentChildren.Insert(targetIndex, this);
-
- Interop.NDalic.LowerBelow(SwigCPtr, View.getCPtr(target));
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
- }
-
- }
-
internal string GetName()
{
string ret = Interop.Actor.GetName(SwigCPtr);
/// <summary>
/// Search through this View's hierarchy for a View with the given unique ID.
- /// The View itself is also considered in the search.
/// </summary>
- /// <param name="id">The ID of the View to find</param>
- /// <returns>A View if found or a null if not</returns>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public View FindChildByID(uint id)
+ /// <param name="id">The ID of the View to find.</param>
+ /// <returns>A handle to the View if found, or an empty handle if not.</returns>
+ /// <since_tizen> 9 </since_tizen>
+ public View FindDescendantByID(uint id)
{
- IntPtr cPtr = Interop.Actor.FindChildById(SwigCPtr, id);
- View ret = this.GetInstanceSafely<View>(cPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return FindChildById(id);
+ }
+
+ /// <summary>
+ /// Raise view above the next sibling view.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
+ public void Raise()
+ {
+ var parentChildren = GetParent()?.Children;
+
+ if (parentChildren != null)
+ {
+ int currentIndex = parentChildren.IndexOf(this);
+
+ // If the view is not already the last item in the list.
+ if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
+ {
+ View temp = parentChildren[currentIndex + 1];
+ parentChildren[currentIndex + 1] = this;
+ parentChildren[currentIndex] = temp;
+
+ Interop.NDalic.Raise(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+ }
+
+ /// <summary>
+ /// Lower the view below the previous sibling view.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
+ public void Lower()
+ {
+ var parentChildren = GetParent()?.Children;
+
+ if (parentChildren != null)
+ {
+ int currentIndex = parentChildren.IndexOf(this);
+
+ // If the view is not already the first item in the list.
+ if (currentIndex > 0 && currentIndex < parentChildren.Count)
+ {
+ View temp = parentChildren[currentIndex - 1];
+ parentChildren[currentIndex - 1] = this;
+ parentChildren[currentIndex] = temp;
+
+ Interop.NDalic.Lower(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+ }
+
+ /// <summary>
+ /// Raises the view to above the target view.
+ /// </summary>
+ /// <remarks>The sibling order of views within the parent will be updated automatically.
+ /// Views on the level above the target view will still be shown above this view.
+ /// Once a raise or lower API is used then that view will have an exclusive sibling order independent of insertion.
+ /// </remarks>
+ /// <param name="target">Will be raised above this view.</param>
+ /// <since_tizen> 9 </since_tizen>
+ public void RaiseAbove(View target)
+ {
+ var parentChildren = GetParent()?.Children;
+
+ if (parentChildren != null)
+ {
+ int currentIndex = parentChildren.IndexOf(this);
+ int targetIndex = parentChildren.IndexOf(target);
+
+ if (currentIndex < 0 || targetIndex < 0 ||
+ currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
+ {
+ NUILog.Error("index should be bigger than 0 and less than children of layer count");
+ return;
+ }
+ // If the currentIndex is less than the target index and the target has the same parent.
+ if (currentIndex < targetIndex)
+ {
+ parentChildren.Remove(this);
+ parentChildren.Insert(targetIndex, this);
+
+ Interop.NDalic.RaiseAbove(SwigCPtr, View.getCPtr(target));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// Lowers the view to below the target view.
+ /// </summary>
+ /// <remarks>The sibling order of views within the parent will be updated automatically.
+ /// Once a raise or lower API is used then that view will have an exclusive sibling order independent of insertion.
+ /// </remarks>
+ /// <param name="target">Will be lowered below this view.</param>
+ /// <since_tizen> 9 </since_tizen>
+ public void LowerBelow(View target)
+ {
+ var parentChildren = GetParent()?.Children;
+
+ if (parentChildren != null)
+ {
+ int currentIndex = parentChildren.IndexOf(this);
+ int targetIndex = parentChildren.IndexOf(target);
+ if (currentIndex < 0 || targetIndex < 0 ||
+ currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
+ {
+ NUILog.Error("index should be bigger than 0 and less than children of layer count");
+ return;
+ }
+
+ // If the currentIndex is not already the 0th index and the target has the same parent.
+ if ((currentIndex != 0) && (targetIndex != -1) &&
+ (currentIndex > targetIndex))
+ {
+ parentChildren.Remove(this);
+ parentChildren.Insert(targetIndex, this);
+
+ Interop.NDalic.LowerBelow(SwigCPtr, View.getCPtr(target));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
}
}
{
/// <summary>
- /// Loading an image.
+ /// A class containing methods providing image loading
/// </summary>
- /// <remarks>Hidden API: Only for inhouse or developing usage. The behavior and interface can be changed anytime.</remarks>
- [EditorBrowsable(EditorBrowsableState.Never)]
- // in API6 ~ API8, this has been "public class", not "public static class". to support not-rebuilt API6~API8's Application, this is reverted bact to "public class".
+ /// <since_tizen> 9 </since_tizen>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1052:Static holder types should be Static or NotInheritable", Justification = "<Pending>")]
- public class ImageLoading
+ public class ImageLoader
{
/// <summary>
/// Load an image synchronously from local file.
}
/// <summary>
- /// Get the size of an original image consider rotation
+ /// Get the size of an original image rotated according to image metadata
/// </summary>
/// <param name="filename">The name of the image.</param>
/// <returns>Dimension of the original image.</returns>
- /// <remarks>Hidden API: Only for inhouse or developing usage. The behavior and interface can be changed anytime.</remarks>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static Size2D GetOriginalImageSize(string filename)
{
return GetOriginalImageSize(filename, true);
}
/// <summary>
- /// Get the size of an original image consider rotation
+ /// Get the size of an original image rotated according to image metadata
/// </summary>
/// <param name="filename">The name of the image.</param>
/// <param name="orientationCorrection">Reorient the image to respect any orientation metadata in its header.</param>
/// <returns>Dimension of the original image.</returns>
- /// <remarks>Hidden API: Only for inhouse or developing usage. The behavior and interface can be changed anytime.</remarks>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static Size2D GetOriginalImageSize(string filename, bool orientationCorrection)
{
var val = new Uint16Pair(Interop.ImageLoading.GetOriginalImageSize(filename, orientationCorrection), true);