using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SharpDX.DirectManipulation
{
partial class CompositorNative
{
///
/// Class ID for compositor
///
public static readonly Guid DirectCompositionCompositorClassId = new Guid("79DEA627-A08A-43AC-8EF5-6900B9299126");
///
/// Creates a default implementation of IDirectManipulationCompositor that wraps a DirectComposition render tree.
///
///
public static CompositorNative CreateDefaultDirectCompositor()
{
CompositorNative newCompositor = new CompositorNative(IntPtr.Zero);
Utilities.CreateComInstance(DirectCompositionCompositorClassId, Utilities.CLSCTX.ClsctxInprocServer, Utilities.GetGuidFromType(typeof(Compositor)), newCompositor);
return newCompositor;
}
///
/// Associates content with the compositor, assigns a composition device to the content, and specifies the position of the content in the composition tree relative to other composition visuals.
Syntax AddContent( [in]???????????? *content, [in, optional]?? device, [in]???????????? *parentVisual, [in]???????????? *childVisual
/// );
Parameters - content [in]
-
The content to add to the composition tree.
content is placed between parentVisual and childVisual in the composition tree.
- device [in, optional]
-
The device used to compose the content.
Note??device is created by the application.
- parentVisual [in]
-
The parent in the composition tree for the content being added.
parentVisual must also be a parent of childVisual in the composition tree.
- childVisual [in]
-
The child in the composition tree for the content being added.
parentVisual must also be a parent of childVisual in the composition tree.
Return valueIf the method succeeds, it returns . Otherwise, it returns an error code.
RemarksAll content, regardless of type, must be added to the compositor. This can be primary content, obtained from the viewport by calling GetPrimaryContent, or secondary content, such as a panning indicator, created by calling CreateContent.
///
If the application uses a system-provided :
- device must be an object, and parent and child visuals must be objects.
- device, parentVisual, and childVisual cannot be null.
- device, parentVisual, and childVisual objects are created and owned by the application.
///
- When content is added to the composition tree using this method, the new composition visuals are inserted between parentVisual and childVisual. The new visuals should not be destroyed until they are disassociated from the compositor with RemoveContent.
If the application uses a custom implementation of :
- device, parentVisual, and childVisual must be a valid type for the compositor. They do not have to be or objects.
- device, parentVisual, and childVisual can be null, depending on the compositor.
Requirements
///
///
The content to add to the composition tree.
content is placed between parentVisual and childVisual in the composition tree.
/// The device used to compose the content.
Note??device is created by the application.
/// The parent in the composition tree for the content being added.
parentVisual must also be a parent of childVisual in the composition tree.
/// The child in the composition tree for the content being added.
parentVisual must also be a parent of childVisual in the composition tree.
/// No documentation.
///
/// Hh768898
/// HRESULT IDirectManipulationCompositor::AddContent([In] IDirectManipulationContent* content,[In, Optional] IUnknown* device,[In, Optional] IUnknown* parentVisual,[In, Optional] IUnknown* childVisual)
/// IDirectManipulationCompositor::AddContent
public void AddContent(SharpDX.DirectManipulation.Content content, SharpDX.ComObject device, SharpDX.ComObject arentVisualRef, SharpDX.ComObject childVisual)
{
AddContent(content, (SharpDX.IUnknown)device, (SharpDX.IUnknown)arentVisualRef, (SharpDX.IUnknown)childVisual);
}
}
}