Razer Chroma SDK  v4.1
Razer Chroma SDK C++ Documentation
RzChromaSDK.h File Reference

Exported API. More...

#include "RzErrors.h"
#include "RzChromaSDKDevices.h"
#include "RzChromaSDKTypes.h"

Go to the source code of this file.

Functions

RZRESULT InitSDK (ChromaSDK::APPINFOTYPE *pAppInfo)
 
RZRESULT UnInit (void)
 
RZRESULT CreateEffect (RZDEVICEID DeviceId, ChromaSDK::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID *pEffectId)
 
RZRESULT CreateKeyboardEffect (ChromaSDK::Keyboard::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID *pEffectId)
 
RZRESULT CreateMouseEffect (ChromaSDK::Mouse::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID *pEffectId)
 
RZRESULT CreateHeadsetEffect (ChromaSDK::Headset::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID *pEffectId)
 
RZRESULT CreateMousepadEffect (ChromaSDK::Mousepad::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID *pEffectId)
 
RZRESULT CreateKeypadEffect (ChromaSDK::Keypad::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID *pEffectId)
 
RZRESULT CreateChromaLinkEffect (ChromaSDK::ChromaLink::EFFECT_TYPE Effect, PRZPARAM pParam, RZEFFECTID *pEffectId)
 
RZRESULT DeleteEffect (RZEFFECTID EffectId)
 
RZRESULT SetEffect (RZEFFECTID EffectId)
 

Detailed Description

Exported API.

Function Documentation

◆ CreateChromaLinkEffect()

RZRESULT CreateChromaLinkEffect ( ChromaSDK::ChromaLink::EFFECT_TYPE  Effect,
PRZPARAM  pParam,
RZEFFECTID pEffectId 
)

Create effects for Chroma Linked devices. Read more at the Chroma Link Developer Guide.

Parameters
[in]EffectChroma Link effect type.
[in]pParamPointer to a parameter type specified by Effect defined in RzChromaSDKTypes.h
[in,out]pEffectIdValid effect Id if successful. Set it to NULL if not required.
Returns
RZRESULT_NOT_VALID_STATE: Chroma SDK not in a valid state. Did you forgot to call Init()?
RZRESULT_INVALID_PARAMETER: Invalid parameter.
RZRESULT_NOT_SUPPORTED: Effect not supported for this device.
For other error codes, please refer to Windows System Error Codes from Windows SDK (WinError.h).
Examples
ChromaSDKImpl.cpp.

◆ CreateEffect()

RZRESULT CreateEffect ( RZDEVICEID  DeviceId,
ChromaSDK::EFFECT_TYPE  Effect,
PRZPARAM  pParam,
RZEFFECTID pEffectId 
)

Create generic effect for specific devices.

Parameters
[in]DeviceIdDevice Id defined in RzChromaSDKDevices.h
[in]EffectStandard effect type.
[in]pParamPointer to a parameter type specified by Effect.
[in,out]pEffectIdValid effect Id if successful. Set it to NULL if not required.
Returns
RZRESULT_NOT_VALID_STATE: Chroma SDK not in a valid state. Did you forgot to call Init()?
RZRESULT_INVALID_PARAMETER: Invalid parameter.
RZRESULT_DEVICE_NOT_AVAILABLE: Device not supported.
RZRESULT_NOT_SUPPORTED: Effect not supported for this device.
For other error codes, please refer to Windows System Error Codes from Windows SDK (WinError.h).
Examples
ChromaSDKImpl.cpp.

◆ CreateHeadsetEffect()

RZRESULT CreateHeadsetEffect ( ChromaSDK::Headset::EFFECT_TYPE  Effect,
PRZPARAM  pParam,
RZEFFECTID pEffectId 
)

Create headset effect.

Parameters
[in]EffectHeadset effect type.
[in]pParamPointer to a parameter type specified by Effect defined in RzChromaSDKTypes.h
[in,out]pEffectIdValid effect Id if successful. Set it to NULL if not required.
Returns
RZRESULT_NOT_VALID_STATE: Chroma SDK not in a valid state. Did you forgot to call Init()?
RZRESULT_INVALID_PARAMETER: Invalid parameter.
RZRESULT_NOT_SUPPORTED: Effect not supported for this device.
For other error codes, please refer to Windows System Error Codes from Windows SDK (WinError.h).
Examples
ChromaSDKImpl.cpp.

◆ CreateKeyboardEffect()

RZRESULT CreateKeyboardEffect ( ChromaSDK::Keyboard::EFFECT_TYPE  Effect,
PRZPARAM  pParam,
RZEFFECTID pEffectId 
)

Create keyboard effect.

Parameters
[in]EffectKeyboard effect type.
[in]pParamPointer to a parameter type specified by Effect.
[in,out]pEffectIdValid effect Id if successful. Set it to NULL if not required.
Returns
RZRESULT_NOT_VALID_STATE: Chroma SDK not in a valid state. Did you forgot to call Init()?
RZRESULT_INVALID_PARAMETER: Invalid parameter.
RZRESULT_NOT_SUPPORTED: Effect not supported for this device.
For other error codes, please refer to Windows System Error Codes from Windows SDK (WinError.h).
Examples
ChromaSDKImpl.cpp.

◆ CreateKeypadEffect()

RZRESULT CreateKeypadEffect ( ChromaSDK::Keypad::EFFECT_TYPE  Effect,
PRZPARAM  pParam,
RZEFFECTID pEffectId 
)

Create keypad effect.

Parameters
[in]EffectKeypad effect type.
[in]pParamPointer to a parameter type specified by Effect defined in RzChromaSDKTypes.h
[in,out]pEffectIdValid effect Id if successful. Set it to NULL if not required.
Returns
RZRESULT_NOT_VALID_STATE: Chroma SDK not in a valid state. Did you forgot to call Init()?
RZRESULT_INVALID_PARAMETER: Invalid parameter.
RZRESULT_NOT_SUPPORTED: Effect not supported for this device.
For other error codes, please refer to Windows System Error Codes from Windows SDK (WinError.h).
Examples
ChromaSDKImpl.cpp.

◆ CreateMouseEffect()

RZRESULT CreateMouseEffect ( ChromaSDK::Mouse::EFFECT_TYPE  Effect,
PRZPARAM  pParam,
RZEFFECTID pEffectId 
)

Create mouse effect.

Parameters
[in]EffectMouse effect type.
[in]pParamPointer to a parameter type specified by Effect.
[in,out]pEffectIdValid effect Id if successful. Set it to NULL if not required.
Returns
RZRESULT_NOT_VALID_STATE: Chroma SDK not in a valid state. Did you forgot to call Init()?
RZRESULT_INVALID_PARAMETER: Invalid parameter.
RZRESULT_NOT_SUPPORTED: Effect not supported for this device.
For other error codes, please refer to Windows System Error Codes from Windows SDK (WinError.h).
Examples
ChromaSDKImpl.cpp.

◆ CreateMousepadEffect()

RZRESULT CreateMousepadEffect ( ChromaSDK::Mousepad::EFFECT_TYPE  Effect,
PRZPARAM  pParam,
RZEFFECTID pEffectId 
)

Create mousepad effect.

Parameters
[in]EffectMousemat effect type.
[in]pParamPointer to a parameter type specified by Effect defined in RzChromaSDKTypes.h
[in,out]pEffectIdValid effect Id if successful. Set it to NULL if not required.
Returns
RZRESULT_NOT_VALID_STATE: Chroma SDK not in a valid state. Did you forgot to call Init()?
RZRESULT_INVALID_PARAMETER: Invalid parameter.
RZRESULT_NOT_SUPPORTED: Effect not supported for this device.
For other error codes, please refer to Windows System Error Codes from Windows SDK (WinError.h).

◆ DeleteEffect()

RZRESULT DeleteEffect ( RZEFFECTID  EffectId)

Delete effect

Parameters
[in]EffectIdId of the effect that needs to be deleted.
Returns
RZRESULT_NOT_VALID_STATE: Chroma SDK not in a valid state. Did you forgot to call Init()?
RZRESULT_NOT_FOUND: Effect Id not found.
For other error codes, please refer to Windows System Error Codes from Windows SDK (WinError.h).
Examples
ChromaSDKImpl.cpp.

◆ InitSDK()

RZRESULT InitSDK ( ChromaSDK::APPINFOTYPE pAppInfo)

Initialize Chroma SDK and display application information specified in APPINFOTYPE.

Parameters
[in]pAppInfoApplication information defined in RzChromaSDKTypes.h.
Returns
RZRESULT_ALREADY_INITIALIZED: Chroma SDK has already been initialized.
For other error codes, please refer to Windows System Error Codes from Windows SDK (WinError.h).
Examples
ChromaSDKImpl.cpp.

◆ SetEffect()

RZRESULT SetEffect ( RZEFFECTID  EffectId)

Set effect.

Parameters
[in]EffectIdId of the effect that needs to be set.
Returns
RZRESULT_NOT_VALID_STATE: Chroma SDK not in a valid state. Did you forgot to call Init()?
RZRESULT_ACCESS_DENIED: No permision to access device.
RZRESULT_NOT_FOUND: Effect Id not found.
For other error codes, please refer to Windows System Error Codes from Windows SDK (WinError.h).
Examples
ChromaSDKImpl.cpp.

◆ UnInit()

RZRESULT UnInit ( void  )

UnInitialize Chroma SDK.

Returns
RZRESULT_NOT_VALID_STATE: Chroma SDK not in a valid state. For every Init() call there should be a corresponding UnInit().
For other error codes, please refer to Windows System Error Codes from Windows SDK (WinError.h).
Examples
ChromaSDKImpl.cpp.