targetState |= (IsSelected ? ControlStates.Selected : (IsFocused ? ControlStates.Focused : 0));
}
- if (SetControlState(targetState, touchInfo))
+ if (SetControlState(targetState, ControlStateChangedInfo.InputMethodType.Touch, touchInfo))
{
OnUpdate();
return new LottieFrameInfo(stillImageFrame, stillImageFrame);
}
- internal bool IsStillImage()
+ /// <summary>
+ /// Inhouse API.
+ /// Whether this LottieFrameInfo represents one frame or more.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool IsStillImage()
{
return StartFrame == EndFrame;
}
- internal void Show(LottieAnimationView lottieView, bool noPlay = false)
+ /// <summary>
+ /// Inhouse API.
+ /// Play specified LottieAnimationView with this frame information.
+ /// </summary>
+ /// <param name="lottieView">The target LottieAnimationView to play.</param>
+ /// <param name="noPlay">Whether go direct to the EndFrame. It is false by default.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void Show(LottieAnimationView lottieView, bool noPlay = false)
{
if (!BeReadyToShow(lottieView))
{
}
set
{
- SetControlState(value, null);
+ SetControlState(value, ControlStateChangedInfo.InputMethodType.None, null);
}
}
- /// <summary>
- /// Set ControlState with specified change environment
- /// </summary>
- /// <param name="state">New state value</param>
- /// <param name="touchInfo">The touch information in case the state has changed by touching.</param>
- /// <return>True, if the state changed successfully.</return>
- internal bool SetControlState(ControlStates state, Touch touchInfo)
- {
- if (controlStates == state)
- {
- return false;
- }
-
- var prevState = controlStates;
-
- controlStates = state;
-
- var changeInfo = new ControlStateChangedInfo(prevState, state, ControlStateChangedInfo.InputMethodType.Touch, touchInfo);
-
- ControlStateChangeEventInternal?.Invoke(this, changeInfo);
-
- OnControlStateChanged(changeInfo);
-
- if (controlStatePropagation)
- {
- foreach (View child in Children)
- {
- child.SetControlState(state, touchInfo);
- }
- }
-
- ControlStateChangeEvent?.Invoke(this, changeInfo);
-
- return true;
- }
-
/// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public bool IsResourcesCreated
}
/// <summary>
+ /// Set ControlState with specified inpu environment
+ /// </summary>
+ /// <param name="state">New state value</param>
+ /// <param name="inputMethod">Indicates the input method that triggered this change.</param>
+ /// <param name="inputData">The input method data that depends on the inputMethod.</param>
+ /// <return>True, if the state changed successfully.</return>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected bool SetControlState(ControlStates state, ControlStateChangedInfo.InputMethodType inputMethod, object inputData)
+ {
+ if (controlStates == state)
+ {
+ return false;
+ }
+
+ var prevState = controlStates;
+
+ controlStates = state;
+
+ var changeInfo = new ControlStateChangedInfo(prevState, state, inputMethod, inputData);
+
+ ControlStateChangeEventInternal?.Invoke(this, changeInfo);
+
+ OnControlStateChanged(changeInfo);
+
+ if (controlStatePropagation)
+ {
+ foreach (View child in Children)
+ {
+ child.SetControlState(state, inputMethod, inputData);
+ }
+ }
+
+ ControlStateChangeEvent?.Invoke(this, changeInfo);
+
+ return true;
+ }
+
+ /// <summary>
/// Called after the View's ControlStates changed.
/// </summary>
/// <param name="controlStateChangedInfo">The information including state changed variables.</param>
}
/// <summary>
+ /// The class represents the information of the situation where the View's control state changes.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public class ControlStateChangedInfo
{
/// <summary>
- /// The previous control state.
+ /// Create an instance with mandatory fields.
/// </summary>
+ /// <param name="previousState">The previous control state.</param>
+ /// <param name="currentState">The current control state.</param>
+ /// <param name="inputMethod">Indicates the input method that triggered this change.</param>
+ /// <param name="inputData">The input method data that depends on the inputMethod.</param>
[EditorBrowsable(EditorBrowsableState.Never)]
public ControlStateChangedInfo(ControlStates previousState, ControlStates currentState, InputMethodType inputMethod, object inputData)
{
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ /// <summary>
+ /// Inhouse API.
+ /// This allows the user to specify whether this layer should consume touch (including gestures).
+ /// If set, any layers behind this layer will not be hit-test.
+ /// </summary>
+ /// <param name="consume">Whether the layer should consume touch (including gestures).</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetTouchConsumed(bool consume)
+ {
+ Interop.Layer.Layer_SetTouchConsumed(swigCPtr, consume);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Inhouse API.
+ /// This allows the user to specify whether this layer should consume hover.
+ /// If set, any layers behind this layer will not be hit-test.
+ /// </summary>
+ /// <param name="consume">Whether the layer should consume hover</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetHoverConsumed(bool consume)
+ {
+ Interop.Layer.Layer_SetHoverConsumed(swigCPtr, consume);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
internal uint GetDepth()
{
var parentChildren = window?.LayersChildren;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal void SetTouchConsumed(bool consume)
- {
- Interop.Layer.Layer_SetTouchConsumed(swigCPtr, consume);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
internal bool IsTouchConsumed()
{
bool ret = Interop.Layer.Layer_IsTouchConsumed(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
-
- internal void SetHoverConsumed(bool consume)
- {
- Interop.Layer.Layer_SetHoverConsumed(swigCPtr, consume);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
internal bool IsHoverConsumed()
{
bool ret = Interop.Layer.Layer_IsHoverConsumed(swigCPtr);
{
/// <summary>
- /// The platform provided shadow drawing for View
+ /// Represents a shadow with color and blur radius for a View.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public class Shadow : ShadowBase
private static readonly Color defaultColor = new Color(0, 0, 0, 0.5f);
- /// <summary></summary>
+ /// <summary>
+ /// Create a Shadow with default values.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Shadow() : base()
{
Color = defaultColor;
}
- /// <summary></summary>
+ /// <summary>
+ /// Create a Shadow with custom values.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Shadow(float blurRadius, Vector2 offset, Color color, Vector2 extents) : base(offset, extents)
{
Color = color;
}
- /// <summary></summary>
+ /// <summary>
+ /// Copy constructor.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Shadow(Shadow other) : this(other.BlurRadius, other.Offset, other.Color, other.Extents)
{
}
- /// <summary></summary>
+ /// <summary>
+ /// Create a Shadow from a propertyMap.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
internal Shadow(PropertyMap propertyMap) : base(propertyMap)
{
/// <remark>
/// Negative value is ignored. (no blur)
/// </remark>
+ [EditorBrowsable(EditorBrowsableState.Never)]
public float BlurRadius { get; set; }
/// <inheritdoc/>