// Copyright © 2020 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
namespace CefSharp.DevTools.LayerTree
{
///
/// Information about a compositing layer.
///
[System.Runtime.Serialization.DataContractAttribute]
public class Layer : CefSharp.DevTools.DevToolsDomainEntityBase
{
///
/// The unique id for this layer.
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("layerId"), IsRequired = (true))]
public string LayerId
{
get;
set;
}
///
/// The id of parent (not present for root).
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("parentLayerId"), IsRequired = (false))]
public string ParentLayerId
{
get;
set;
}
///
/// The backend id for the node associated with this layer.
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("backendNodeId"), IsRequired = (false))]
public int? BackendNodeId
{
get;
set;
}
///
/// Offset from parent layer, X coordinate.
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("offsetX"), IsRequired = (true))]
public long OffsetX
{
get;
set;
}
///
/// Offset from parent layer, Y coordinate.
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("offsetY"), IsRequired = (true))]
public long OffsetY
{
get;
set;
}
///
/// Layer width.
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("width"), IsRequired = (true))]
public long Width
{
get;
set;
}
///
/// Layer height.
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("height"), IsRequired = (true))]
public long Height
{
get;
set;
}
///
/// Transformation matrix for layer, default is identity matrix
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("transform"), IsRequired = (false))]
public long[] Transform
{
get;
set;
}
///
/// Transform anchor point X, absent if no transform specified
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("anchorX"), IsRequired = (false))]
public long? AnchorX
{
get;
set;
}
///
/// Transform anchor point Y, absent if no transform specified
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("anchorY"), IsRequired = (false))]
public long? AnchorY
{
get;
set;
}
///
/// Transform anchor point Z, absent if no transform specified
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("anchorZ"), IsRequired = (false))]
public long? AnchorZ
{
get;
set;
}
///
/// Indicates how many time this layer has painted.
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("paintCount"), IsRequired = (true))]
public int PaintCount
{
get;
set;
}
///
/// Indicates whether this layer hosts any content, rather than being used for
/// transform/scrolling purposes only.
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("drawsContent"), IsRequired = (true))]
public bool DrawsContent
{
get;
set;
}
///
/// Set if layer is not visible.
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("invisible"), IsRequired = (false))]
public bool? Invisible
{
get;
set;
}
///
/// Rectangles scrolling on main thread only.
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("scrollRects"), IsRequired = (false))]
public System.Collections.Generic.IList ScrollRects
{
get;
set;
}
///
/// Sticky position constraint information
///
[System.Runtime.Serialization.DataMemberAttribute(Name = ("stickyPositionConstraint"), IsRequired = (false))]
public CefSharp.DevTools.LayerTree.StickyPositionConstraint StickyPositionConstraint
{
get;
set;
}
}
}