namespace Tizen.NUI.Components
{
/// <summary>
- /// PoppedEventArgs is a class to record popped event arguments which will be sent to user.
+ /// PoppedEventArgs is a class to record <see cref="Navigator.Popped"/> event arguments which will be sent to user.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public class PoppedEventArgs : EventArgs
{
/// <summary>
/// Page popped by Navigator.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public Page Page { get; internal set; }
}
/// <summary>
/// An event fired when Pop of a page has been finished.
- /// Notice that Popped event handler should be removed when it is called not to call it duplicate.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <remarks>
+ /// When you free resources in the Popped event handler, please make sure if the popped page is the page you find.
+ /// </remarks>
+ /// <since_tizen> 9 </since_tizen>
public event EventHandler<PoppedEventArgs> Popped;
/// <summary>
/// Gets or sets whether to synchronous loading the resourceurl of image.<br />
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API level 9 and will be removed in API level 11. Please use SynchronousLoading instead!")]
public bool SynchronosLoading
{
get
}
/// <summary>
- /// Gets or sets whether to synchronous loading the resourceurl of image.<br />
+ /// Gets or sets whether the image of the ResourceUrl property will be loaded synchronously.<br />
/// </summary>
- /// This will be public opened in tizen_7.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <remarks>
+ /// Changing this property make this ImageView load image synchronously at the next loading
+ /// by following operation: <see cref="Reload"/>, <see cref="SetImage"/>,
+ /// and by some properties those cause reloading: <see cref="ResourceUrl"/>, <see cref="PreMultipliedAlpha"/> and etc.
+ /// </remarks>
+ /// <since_tizen> 9 </since_tizen>
public bool SynchronousLoading
{
get
/// <summary>
/// Gets or sets the mode to adjust view size to preserve the aspect ratio of the image resource.
- /// If this is set to be true, then the width or height, which is not set by user explicitly, can be adjusted to preserve the aspect ratio of the image resource.
- /// AdjustViewSize works only if ImageView is added to a View having Layout.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <remarks>
+ /// This is false by default.
+ /// If this is set to be true, then the width or height value, which is not set by user explicitly, can be changed automatically
+ /// to preserve the aspect ratio of the image resource.
+ /// AdjustViewSize works only if ImageView is added to a View having Layout.
+ /// e.g. If the image resource size is (100, 100), then the ImageView requests size (100, 100) to its parent layout by default.
+ /// If the ImageView's HeightSpecification is 50 and AdjustViewSize is true, then the ImageView requests size (50, 50) instead of (100, 50).
+ /// </remarks>
+ /// <since_tizen> 9 </since_tizen>
public bool AdjustViewSize { get; set; } = false;
internal Selector<string> ResourceUrlSelector
/// <summary>
/// The width for the borderline of the View.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public float? BorderlineWidth
{
get => (float?)GetValue(BorderlineWidthProperty);
/// <summary>
/// The color for the borderline of the View.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public Color BorderlineColor
{
get => (Color)GetValue(BorderlineColorProperty);
/// <summary>
/// The Relative offset for the borderline of the View.
- /// recommand [-1.0f to 1.0f] range.
- /// If -1.0f, borderline draw inside of View.
- /// If 1.0f, borderline draw outside of View.
- /// If 0.0f, borderline draw half at inside and half at outside.
+ /// Recommended range : [-1.0f to 1.0f].
+ /// If -1.0f, draw borderline inside of the View.
+ /// If 1.0f, draw borderline outside of the View.
+ /// If 0.0f, draw borderline half inside and half outside.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public float? BorderlineOffset
{
get => (float?)GetValue(BorderlineOffsetProperty);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ /// <summary>
+ /// Get native player handle.
+ /// <example>
+ /// How to get native player handle
+ /// <code>
+ /// VideoView videoView = new VideoView();
+ /// videoView.ResourceUrl = "some xxx video path";
+ /// var handle = videoView.NativeHandle;
+ /// if(handle?.IsInvalid == false)
+ /// {
+ /// IntPtr nativeHandle = handle.DangerousGetHandle();
+ /// // do something with nativeHandle
+ /// }
+ /// </code>
+ /// </example>
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
+ public SafeHandle NativeHandle
+ {
+ get
+ {
+ return new NUI.SafeNativePlayerHandle(this);
+ }
+ }
+
internal VideoViewSignal FinishedSignal()
{
VideoViewSignal ret = new VideoViewSignal(Interop.VideoView.FinishedSignal(SwigCPtr), false);
/// Contains and encapsulates Native Player handle.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
+ [Obsolete("Deprecated in API9, will be removed in API11. Please use VideoView.NativeHandle instead!")]
public class SafeNativePlayerHandle : SafeHandle
{
/// <summary>
--- /dev/null
+/*
+ * Copyright(c) 2021 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.
+ *
+ */
+
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Contains and encapsulates Native Player handle.
+ /// </summary>
+ internal class SafeNativePlayerHandle : SafeHandle
+ {
+ /// <summary>
+ /// Constructor, Native player handle is set to handle.
+ /// </summary>
+ internal SafeNativePlayerHandle(VideoView videoView) : base(global::System.IntPtr.Zero, false)
+ {
+ if (videoView != null)
+ {
+ SetHandle(videoView.GetNativePlayerHandle());
+ }
+ }
+
+ /// <summary>
+ /// Null check if the handle is valid or not.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool IsInvalid
+ {
+ get
+ {
+ return handle == global::System.IntPtr.Zero;
+ }
+ }
+ /// <summary>
+ /// Release handle itself.
+ /// </summary>
+ /// <returns>true when released successfully.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override bool ReleaseHandle()
+ {
+ SetHandle(global::System.IntPtr.Zero);
+ return true;
+ }
+ }
+}
/// <summary>
/// The width for the borderline of the View.
- /// Note that, an image background may not have borderline if it uses a Border property.
/// </summary>
/// <remarks>
/// <para>
/// animation.AnimateTo(view, "BorderlineWidth", 100.0f);
/// </code>
/// </para>
+ /// Note that, an image background may not have borderline if it uses the Border property.
/// </remarks>
- /// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public float BorderlineWidth
{
get
/// </code>
/// </para>
/// </remarks>
- /// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public Color BorderlineColor
{
get
/// <summary>
/// The Relative offset for the borderline of the View.
- /// recommand [-1.0f to 1.0f] range.
- /// If -1.0f, borderline draw inside of View.
- /// If 1.0f, borderline draw outside of View.
- /// If 0.0f, borderline draw half at inside and half at outside.
+ /// Recommended range : [-1.0f to 1.0f].
+ /// If -1.0f, draw borderline inside of the View.
+ /// If 1.0f, draw borderline outside of the View.
+ /// If 0.0f, draw borderline half inside and half outside.
/// It is 0.0f by default.
/// </summary>
/// <remarks>
/// </code>
/// </para>
/// </remarks>
- /// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public float BorderlineOffset
{
get
{
}
- protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
- {
- Interop.TimePeriod.DeleteTimePeriod(swigCPtr);
- }
-
/// <summary>
/// The constructor.
/// Creates an time period object with the user-defined alpha function.
/// Creates an time period object with the user-defined alpha function.
/// </summary>
/// <since_tizen> 9 </since_tizen>
- public TimePeriod(float delayMilliSeconds, float durationMilliSeconds) : this(Interop.TimePeriod.NewTimePeriod(MilliSecondsToSeconds((int)delayMilliSeconds), MilliSecondsToSeconds((int)durationMilliSeconds)), true)
+ public TimePeriod(int delayMilliSeconds, int durationMilliSeconds) : this(Interop.TimePeriod.NewTimePeriod(MilliSecondsToSeconds(delayMilliSeconds), MilliSecondsToSeconds(durationMilliSeconds)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
{
return (int)(sec * 1000);
}
+
+ /// This will not be public opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.TimePeriod.DeleteTimePeriod(swigCPtr);
+ }
}
}
/// [Draft] Enumeration for the alignment of the linear layout items
/// </summary>
/// <since_tizen> 6 </since_tizen>
+ [Obsolete("Deprecated in API9, will be removed in API11. Please use HorizontalAlignment and VerticalAlignment instead!")]
public enum Alignment
{
/// <summary>
/// [Draft] Get/Set the alignment in the layout
/// </summary>
/// <since_tizen> 6 </since_tizen>
+ [Obsolete("Deprecated in API9, will be removed in API11. Please use HorizontalAlignment and VerticalAlignment properties instead!")]
public LinearLayout.Alignment LinearAlignment
{
get
/// <summary>
/// Get/Set the horizontal alignment in the layout
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public HorizontalAlignment HorizontalAlignment { get; set; } = HorizontalAlignment.Begin;
/// <summary>
/// Get/Set the vertical alignment in the layout
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public VerticalAlignment VerticalAlignment { get; set; } = VerticalAlignment.Top;
private float totalLength = 0.0f;
[EditorBrowsable(EditorBrowsableState.Never)]
static public Window Get(View view)
{
- if(view == null)
+ if (view == null)
{
NUILog.Error("if there is no view, it can not get a window");
return null;
return ret;
}
+ /// <summary>
+ /// Get Native Window handle.
+ /// <example>
+ /// How to get Native Window handle
+ /// <code>
+ /// Window window = NUIApplication.GetDefaultWindow();
+ /// var handle = window.NativeHandle;
+ /// if(handle?.IsInvalid == false)
+ /// {
+ /// IntPtr nativeHandle = handle.DangerousGetHandle();
+ /// // do something with nativeHandle
+ /// }
+ /// </code>
+ /// </example>
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
+ public SafeHandle NativeHandle
+ {
+ get
+ {
+ return new NUI.SafeNativeWindowHandle(this);
+ }
+ }
}
}
/// Contains and encapsulates Native Window handle.
/// </summary>
/// <since_tizen> 4 </since_tizen>
+ [Obsolete("Deprecated in API9, will be removed in API11. Please use Window.NativeHandle instead!")]
public class SafeNativeWindowHandle : SafeHandle
{
/// <summary>
--- /dev/null
+/*
+ * Copyright(c) 2021 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.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Contains and encapsulates Native Window handle.
+ /// </summary>
+ internal class SafeNativeWindowHandle : SafeHandle
+ {
+ /// <summary>
+ ///Constructor, Native window handle is set to handle.
+ /// </summary>
+ internal SafeNativeWindowHandle(Window currentWindow) : base(IntPtr.Zero, false)
+ {
+ SetHandle(currentWindow != null ? currentWindow.GetNativeWindowHandler() : IntPtr.Zero);
+ }
+ /// <summary>
+ /// Null check if the handle is valid or not.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool IsInvalid
+ {
+ get
+ {
+ return this.handle == IntPtr.Zero;
+ }
+ }
+ /// <summary>
+ /// Release handle itself.
+ /// </summary>
+ /// <returns>true when released successfully.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override bool ReleaseHandle()
+ {
+ SetHandle(global::System.IntPtr.Zero);
+ return true;
+ }
+ }
+}