Interface ILauncherApiMedia
- Namespace
- Hi3Helper.Plugin.Core.Management.Api
- Assembly
- Hi3Helper.Plugin.Core.dll
Defines the contract for managing launcher media assets such as background images, image sequences, videos, and logo overlays. This interface is intended for use in plugin scenarios where the launcher UI requires dynamic or customizable media content.
[GeneratedComInterface]
[Guid("436f6c6c-6170-7365-727f-000000000021")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[IUnknownDerived<InterfaceInformation, InterfaceImplementation>]
public interface ILauncherApiMedia : ILauncherApi, IInitializableTask, IFree
Remarks
This interface inherits from IInitializableTask, requiring implementers to provide asynchronous initialization logic.
Methods
DownloadAssetAsync(LauncherPathEntry, FileHandle, FileReadProgressDelegate, in Guid, out nint)
void DownloadAssetAsync(LauncherPathEntry entry, FileHandle outputStreamHandle, PluginFiles.FileReadProgressDelegate downloadProgress, in Guid cancelToken, out nint result)
Parameters
entryLauncherPathEntryoutputStreamHandleFileHandledownloadProgressPluginFiles.FileReadProgressDelegatecancelTokenGuidresultnint
DownloadAssetAsync(string, FileHandle, FileReadProgressDelegate, in Guid, out nint)
void DownloadAssetAsync(string fileUrl, FileHandle outputStreamHandle, PluginFiles.FileReadProgressDelegate downloadProgress, in Guid cancelToken, out nint result)
Parameters
fileUrlstringoutputStreamHandleFileHandledownloadProgressPluginFiles.FileReadProgressDelegatecancelTokenGuidresultnint
Free()
void Free()
GetBackgroundEntries(out nint, out int, out bool, out bool)
Get the background image's URL entries for the launcher.
This method returns a handle to the PluginDisposableMemory<T> of LauncherPathEntry.
Pass this method to ToManagedSpan<T>(MarshalToMemorySelectorDelegate) to get the span.
void GetBackgroundEntries(out nint handle, out int count, out bool isDisposable, out bool isAllocated)
Parameters
handlenintThe handle to the LauncherPathEntry struct
countintHow much data is available from the
handleisDisposableboolWhether if the handle can be freed or not
isAllocatedbooltrueif it's not empty. Otherwise,false
GetBackgroundFlag(out LauncherBackgroundFlag)
Gets the current background flag, which indicates the type and source of the launcher background.
void GetBackgroundFlag(out LauncherBackgroundFlag result)
Parameters
resultLauncherBackgroundFlagA LauncherBackgroundFlag value which representing the type (image, image sequence, video) and source (file, zip) of the background.
Remarks
This method returns a LauncherBackgroundFlag value via result which representing the type (image, image sequence, video) and source (file, zip) of the background.
GetBackgroundSpriteFps(out float)
Gets the background sprite FPS (frames per second) for the launcher background image sequence.
void GetBackgroundSpriteFps(out float result)
Parameters
resultfloatFrames per second for the sprites to cycle. Returns 0 if the background image is static.
GetLogoFlag(out LauncherBackgroundFlag)
Gets the current logo flag, which indicates the type and source of the logo.
void GetLogoFlag(out LauncherBackgroundFlag result)
Parameters
resultLauncherBackgroundFlagA LauncherBackgroundFlag value which representing the type (image, image sequence, video) and source (file, zip) of the logo.
Remarks
This method returns a LauncherBackgroundFlag value via resultwhich representing the type (image, image sequence, video) and source (file, zip) of the logo.
GetLogoOverlayEntries(out nint, out int, out bool, out bool)
Gets the logo overlay's URL entries for the launcher.
This method returns a handle to the PluginDisposableMemory<T> of LauncherPathEntry.
Pass this method to ToManagedSpan<T>(MarshalToMemorySelectorDelegate) to get the span.
void GetLogoOverlayEntries(out nint handle, out int count, out bool isDisposable, out bool isAllocated)
Parameters
handlenintThe handle to the LauncherPathEntry struct
countintHow much data is available from the
handleisDisposableboolWhether if the handle can be freed or not
isAllocatedbooltrueif it's not empty. Otherwise,false
InitAsync(in Guid, out nint)
void InitAsync(in Guid cancelToken, out nint result)