Table of Contents

Class FontDownloadQueue

Namespace
SharpDX.DirectWrite
Assembly
SharpDX.Direct2D1.dll
[Guid("B71E6052-5AEA-4FA3-832E-F60D431F7E91")]
public class FontDownloadQueue : ComObject
Inheritance
FontDownloadQueue

Constructors

FontDownloadQueue(nint)

public FontDownloadQueue(nint nativePtr)

Parameters

nativePtr nint

Properties

GenerationCount

Gets the current generation number of the download queue, which is incremented every time after a download completes, whether failed or successful. This cookie value can be compared against cached data to determine if it is stale.

public long GenerationCount { get; }

Property Value

long

IsEmpty

Determines whether the download queue is empty. Note that the queue does not include requests that are already being downloaded. Calling BeginDownload clears the queue.

public RawBool IsEmpty { get; }

Property Value

RawBool

Methods

AddListener(FontDownloadListener, out int)

Registers a client-defined listener object that receives download notifications. All registered listener's DownloadCompleted will be called after BeginDownload completes.

public void AddListener(FontDownloadListener listener, out int token)

Parameters

listener FontDownloadListener

No documentation.

token int

No documentation.

Remarks

An FontDownloadListener can also be passed to BeginDownload using the context parameter, rather than globally registered to the queue.

BeginDownload(IUnknown)

Begins an asynchronous download operation. The download operation executes in the background until it completes or is cancelled by a CancelDownload call.

public void BeginDownload(IUnknown context)

Parameters

context IUnknown

No documentation.

Remarks

BeginDownload removes all download requests from the queue, transferring them to a background download operation. If any previous downloads are still ongoing when BeginDownload is called again, the new download does not complete until the previous downloads have finished. If the queue is empty and no active downloads are pending, the DownloadCompleted callback is called immediately with DWRITE_DOWNLOAD_RESULT_NONE.

CancelDownload()

Removes all download requests from the queue and cancels any active download operations.

public void CancelDownload()

RemoveListener(int)

Unregisters a notification handler that was previously registered using AddListener.

public void RemoveListener(int token)

Parameters

token int

No documentation.

Operators

explicit operator FontDownloadQueue(nint)

public static explicit operator FontDownloadQueue(nint nativePtr)

Parameters

nativePtr nint

Returns

FontDownloadQueue