Search Results for

    Show / Hide Table of Contents

    Interface IChroma

    Interface for basic Chroma functionality.

    Namespace: Colore
    Assembly: Colore.dll
    Syntax
    public interface IChroma : IDisposable

    Properties

    ChromaLink

    Gets an instance of the IChromaLink interface for interacting with ChromaLink devices.

    Declaration
    IChromaLink ChromaLink { get; }
    Property Value
    Type Description
    IChromaLink

    Headset

    Gets an instance of the IHeadset interface for interacting with a Razer Chroma headset.

    Declaration
    IHeadset Headset { get; }
    Property Value
    Type Description
    IHeadset

    Initialized

    Gets a value indicating whether the Chroma SDK has been initialized or not.

    Declaration
    bool Initialized { get; }
    Property Value
    Type Description
    Boolean

    Keyboard

    Gets an instance of the IKeyboard interface for interacting with a Razer Chroma keyboard.

    Declaration
    IKeyboard Keyboard { get; }
    Property Value
    Type Description
    IKeyboard

    Keypad

    Gets an instance of the IKeypad interface for interacting with a Razer Chroma keypad.

    Declaration
    IKeypad Keypad { get; }
    Property Value
    Type Description
    IKeypad

    Mouse

    Gets an instance of the IMouse interface for interacting with a Razer Chroma mouse.

    Declaration
    IMouse Mouse { get; }
    Property Value
    Type Description
    IMouse

    Mousepad

    Gets an instance of the IMousepad interface for interacting with a Razer Chroma mouse pad.

    Declaration
    IMousepad Mousepad { get; }
    Property Value
    Type Description
    IMousepad

    SdkVersion

    Gets the version of the Chroma SDK that Colore is currently using.

    Declaration
    SdkVersion SdkVersion { get; }
    Property Value
    Type Description
    SdkVersion

    Version

    Gets the Version of Colore.

    Declaration
    Version Version { get; }
    Property Value
    Type Description
    Version

    Methods

    GetDeviceAsync(Guid)

    Gets an instance of IGenericDevice for the device with the specified ID.

    Declaration
    Task<IGenericDevice> GetDeviceAsync(Guid deviceId)
    Parameters
    Type Name Description
    Guid deviceId

    The Guid of the device to get, valid IDs can be found in Devices.

    Returns
    Type Description
    Task<IGenericDevice>

    An instance of IGenericDevice.

    HandleMessage(IntPtr, Int32, IntPtr, IntPtr)

    Handles a Windows message and fires the appropriate events.

    Declaration
    bool HandleMessage(IntPtr handle, int msgId, IntPtr wParam, IntPtr lParam)
    Parameters
    Type Name Description
    IntPtr handle

    The HWnd property of the Message struct.

    Int32 msgId

    The Msg property of the Message struct.

    IntPtr wParam

    The wParam property of the Message struct.

    IntPtr lParam

    The lParam property of the Message struct.

    Returns
    Type Description
    Boolean

    true if the message was handled by Chroma, false otherwise (message was ignored).

    Remarks

    Non-Chroma messages will be ignored.

    InitializeAsync(AppInfo)

    Initializes the SDK if it hasn't already.

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

    Information about the application.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Remarks

    Manually modifying the SDK init state is untested and may result in undefined behaviour, usage is at your own risk.

    QueryAsync(Guid)

    Queries the SDK for information regarding a specific device.

    Declaration
    Task<DeviceInfo> QueryAsync(Guid deviceId)
    Parameters
    Type Name Description
    Guid deviceId

    The device ID to query for, valid IDs can be found in Devices.

    Returns
    Type Description
    Task<DeviceInfo>

    A struct with information regarding the device type and whether it's connected.

    Register(IntPtr)

    Registers to start receiving Chroma events.

    Declaration
    void Register(IntPtr handle)
    Parameters
    Type Name Description
    IntPtr handle

    Handle to the application Window that is running the message loop.

    Remarks

    Chroma events are sent using the Windows message API, as such, there has to be something handling Windows messages to receive them. Messages need to be passed to the message handler in Colore to be processed, as this cannot be automated.

    SetAllAsync(Color)

    Sets all Chroma devices to the specified Color.

    Declaration
    Task SetAllAsync(Color color)
    Parameters
    Type Name Description
    Color color

    The Color to set.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    UninitializeAsync()

    Uninitializes the SDK if it has been initialized.

    Declaration
    Task UninitializeAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Remarks

    Manually modifying the SDK init state is untested and may result in undefined behaviour, usage is at your own risk.

    Unregister()

    Unregisters from receiving Chroma events.

    Declaration
    void Unregister()

    Events

    ApplicationState

    Raised when information about application state is received from messages.

    Declaration
    event EventHandler<ApplicationStateEventArgs> ApplicationState
    Event Type
    Type Description
    EventHandler<ApplicationStateEventArgs>
    Remarks

    Requires that application has registered for receiving messages with Register(IntPtr) and that Windows messages are being forwarded to Colore using HandleMessage(IntPtr, Int32, IntPtr, IntPtr).

    DeviceAccess

    Raised when information about device access is received from messages.

    Declaration
    event EventHandler<DeviceAccessEventArgs> DeviceAccess
    Event Type
    Type Description
    EventHandler<DeviceAccessEventArgs>
    Remarks

    Requires that application has registered for receiving messages with Register(IntPtr) and that Windows messages are being forwarded to Colore using HandleMessage(IntPtr, Int32, IntPtr, IntPtr).

    SdkSupport

    Raised when information about SDK support is received from messages.

    Declaration
    event EventHandler<SdkSupportEventArgs> SdkSupport
    Event Type
    Type Description
    EventHandler<SdkSupportEventArgs>
    Remarks

    Requires that application has registered for receiving messages with Register(IntPtr) and that Windows messages are being forwarded to Colore using HandleMessage(IntPtr, Int32, IntPtr, IntPtr).

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