Search Results for

    Show / Hide Table of Contents

    Class NativeApi

    Helper class to more easily make calls to native Chroma SDK functions.

    Inheritance
    Object
    NativeApi
    Implements
    IChromaApi
    Namespace: Colore.Native
    Assembly: Colore.dll
    Syntax
    public class NativeApi : Object, IChromaApi

    Constructors

    NativeApi(INativeSdkMethods)

    Initializes a new instance of the NativeApi class.

    Declaration
    public NativeApi(INativeSdkMethods nativeSdkMethods = null)
    Parameters
    Type Name Description
    INativeSdkMethods nativeSdkMethods

    The instance of NativeSdkMethods to use for accessing the Chroma SDK functions. If null, a default implementation will be used.

    Methods

    CreateChromaLinkEffectAsync(ChromaLinkEffectType)

    Creates a new Chroma Link effect without any effect data.

    Declaration
    public Task<Guid> CreateChromaLinkEffectAsync(ChromaLinkEffectType effectType)
    Parameters
    Type Name Description
    ChromaLinkEffectType effectType

    The type of effect to create.

    Returns
    Type Description
    Task<Guid>

    A Guid for the created effect.

    CreateChromaLinkEffectAsync<T>(ChromaLinkEffectType, T)

    Helper method for creating Chroma Link effects with parameter struct.

    Declaration
    public Task<Guid> CreateChromaLinkEffectAsync<T>(ChromaLinkEffectType effectType, T data)
        where T : struct, ValueType
    Parameters
    Type Name Description
    ChromaLinkEffectType effectType

    The type of effect to create.

    T data

    Effect options struct.

    Returns
    Type Description
    Task<Guid>

    A Guid for the created effect.

    Type Parameters
    Name Description
    T

    The effect struct type.

    CreateDeviceEffectAsync(Guid, EffectType)

    Creates a new device effect without any effect data.

    Declaration
    public Task<Guid> CreateDeviceEffectAsync(Guid deviceId, EffectType effectType)
    Parameters
    Type Name Description
    Guid deviceId

    The ID of the device to create the effect for.

    EffectType effectType

    The type of effect to create.

    Returns
    Type Description
    Task<Guid>

    A Guid for the created effect.

    CreateDeviceEffectAsync<T>(Guid, EffectType, T)

    Helper method for creating device effects with relevant structure parameter.

    Declaration
    public Task<Guid> CreateDeviceEffectAsync<T>(Guid deviceId, EffectType effectType, T data)
        where T : struct, ValueType
    Parameters
    Type Name Description
    Guid deviceId

    The ID of the device to create the effect for.

    EffectType effectType

    The type of effect to create.

    T data

    The effect structure parameter.

    Returns
    Type Description
    Task<Guid>

    A Guid for the created effect.

    Type Parameters
    Name Description
    T

    The structure type, needs to be compatible with the effect type.

    CreateHeadsetEffectAsync(HeadsetEffectType)

    Creates a new headset effect without any effect data.

    Declaration
    public Task<Guid> CreateHeadsetEffectAsync(HeadsetEffectType effectType)
    Parameters
    Type Name Description
    HeadsetEffectType effectType

    The type of effect to create.

    Returns
    Type Description
    Task<Guid>

    A Guid for the created effect.

    CreateHeadsetEffectAsync<T>(HeadsetEffectType, T)

    Helper method for creating headset effects with parameter struct.

    Declaration
    public Task<Guid> CreateHeadsetEffectAsync<T>(HeadsetEffectType effectType, T data)
        where T : struct, ValueType
    Parameters
    Type Name Description
    HeadsetEffectType effectType

    The type of effect to create.

    T data

    Effect options struct.

    Returns
    Type Description
    Task<Guid>

    A Guid for the created effect.

    Type Parameters
    Name Description
    T

    The effect struct type.

    CreateKeyboardEffectAsync(KeyboardEffectType)

    Creates a new keyboard effect without any effect data.

    Declaration
    public Task<Guid> CreateKeyboardEffectAsync(KeyboardEffectType effectType)
    Parameters
    Type Name Description
    KeyboardEffectType effectType

    The type of effect to create.

    Returns
    Type Description
    Task<Guid>

    A Guid for the created effect.

    CreateKeyboardEffectAsync<T>(KeyboardEffectType, T)

    Helper method for creating keyboard effects with relevant structure parameter.

    Declaration
    public Task<Guid> CreateKeyboardEffectAsync<T>(KeyboardEffectType effectType, T data)
        where T : struct, ValueType
    Parameters
    Type Name Description
    KeyboardEffectType effectType

    The type of effect to create.

    T data

    The effect structure parameter.

    Returns
    Type Description
    Task<Guid>

    A Guid for the created effect.

    Type Parameters
    Name Description
    T

    The structure type, needs to be compatible with the effect type.

    CreateKeypadEffectAsync(KeypadEffectType)

    Creates a new keypad effect without any effect data.

    Declaration
    public Task<Guid> CreateKeypadEffectAsync(KeypadEffectType effectType)
    Parameters
    Type Name Description
    KeypadEffectType effectType

    THe type of effect to create.

    Returns
    Type Description
    Task<Guid>

    A Guid for the created effect.

    CreateKeypadEffectAsync<T>(KeypadEffectType, T)

    Helper method for creating keypad effects with parameter struct.

    Declaration
    public Task<Guid> CreateKeypadEffectAsync<T>(KeypadEffectType effectType, T data)
        where T : struct, ValueType
    Parameters
    Type Name Description
    KeypadEffectType effectType

    The type of effect to create.

    T data

    Effect options struct.

    Returns
    Type Description
    Task<Guid>

    A Guid for the created effect.

    Type Parameters
    Name Description
    T

    The effect struct type.

    CreateMouseEffectAsync(MouseEffectType)

    Creates a new mouse effect without any effect data.

    Declaration
    public Task<Guid> CreateMouseEffectAsync(MouseEffectType effectType)
    Parameters
    Type Name Description
    MouseEffectType effectType

    The type of effect to create.

    Returns
    Type Description
    Task<Guid>

    A Guid for the created effect.

    CreateMouseEffectAsync<T>(MouseEffectType, T)

    Helper method for creating mouse effects with parameter struct.

    Declaration
    public Task<Guid> CreateMouseEffectAsync<T>(MouseEffectType effectType, T data)
        where T : struct, ValueType
    Parameters
    Type Name Description
    MouseEffectType effectType

    The type of effect to create.

    T data

    Effect options struct.

    Returns
    Type Description
    Task<Guid>

    A Guid for the created effect.

    Type Parameters
    Name Description
    T

    The effect struct type.

    CreateMousepadEffectAsync(MousepadEffectType)

    Creates a new mousepad effect without any effect data.

    Declaration
    public Task<Guid> CreateMousepadEffectAsync(MousepadEffectType effectType)
    Parameters
    Type Name Description
    MousepadEffectType effectType

    The type of effect to create.

    Returns
    Type Description
    Task<Guid>

    A Guid for the created effect.

    CreateMousepadEffectAsync<T>(MousepadEffectType, T)

    Helper method for creating mouse pad effects with parameter struct.

    Declaration
    public Task<Guid> CreateMousepadEffectAsync<T>(MousepadEffectType effectType, T data)
        where T : struct, ValueType
    Parameters
    Type Name Description
    MousepadEffectType effectType

    The type of effect to create.

    T data

    Effect options struct.

    Returns
    Type Description
    Task<Guid>

    A Guid for the created effect.

    Type Parameters
    Name Description
    T

    The effect struct type.

    DeleteEffectAsync(Guid)

    Deletes an effect with the specified Guid.

    Declaration
    public Task DeleteEffectAsync(Guid effectId)
    Parameters
    Type Name Description
    Guid effectId

    Effect ID to delete.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    InitializeAsync(AppInfo)

    Initializes the Chroma SDK.

    Declaration
    public Task InitializeAsync(AppInfo info)
    Parameters
    Type Name Description
    AppInfo info

    Information about the application, currently unused for native SDK.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    QueryDeviceAsync(Guid)

    Query for device information.

    Declaration
    public Task<SdkDeviceInfo> QueryDeviceAsync(Guid deviceId)
    Parameters
    Type Name Description
    Guid deviceId

    Device ID, found in Devices.

    Returns
    Type Description
    Task<SdkDeviceInfo>

    A populated SdkDeviceInfo structure with information about the requested device.

    RegisterEventNotifications(IntPtr)

    Registers for Chroma SDK notifications.

    Declaration
    public void RegisterEventNotifications(IntPtr hwnd)
    Parameters
    Type Name Description
    IntPtr hwnd

    App handle for the window handling events.

    SetEffectAsync(Guid)

    Set effect.

    Declaration
    public Task SetEffectAsync(Guid effectId)
    Parameters
    Type Name Description
    Guid effectId

    Effect ID to set.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    UninitializeAsync()

    Uninitializes the Chroma SDK.

    Declaration
    public Task UninitializeAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    UnregisterEventNotifications()

    Unregisters from receiving Chroma SDK notifications.

    Declaration
    public void UnregisterEventNotifications()

    Implements

    IChromaApi
    In This Article
    Back to top Copyright © 2015-2021 by Adam Hellberg and Brandon Scott
    Generated by DocFX