Creating plugins
Contents |
Creating plugins backlight
Plugins backlight designed to create light effects.
Plugins are located in the directory:
c:\Program Files\AmbiBox\Plugins\Backlight\[Name catalog of plugin]
Plugin created as a DLL and exports the following functions:
//--------------------------------------------------------------------------- // AmbiBox backlight plugins interface // Copyright (C) AmbiBox 2004-2014 // AmbiBox@mail.ru // http://www.ambibox.ru //--------------------------------------------------------------------------- #ifndef BACKLIGHT_PLUGINS_H #define BACKLIGHT_PLUGINS_H #include <windows.h> typedef int (__stdcall *SIR_INPUTCALLBACK)(DWORD *InputData, DWORD dwLedsCount); #pragma pack (push, 1) typedef struct _BACKLIGHT_PLUGIN_SETTINGS { DWORD dwPluginVersion; // Версия плагина и полей структуры. // Versions and structure fields. // Start structure plugin version 1 DWORD dwEventMethod; // Transmission method data to the main program. // Способ передачи данных основной программе. // 0 - a callback function. // 0 - через функцию обратного вызова. // 1 - a message WM_SETPLUGINDATA. // 1 - через сообщение WM_SETPLUGINDATA. DWORD dwMinEventTime; // Minimal interval the call CallBack functions in milliseconds. // Минимальный интервал вызова CallBack функции в миллисекундах. DWORD dwLedsCount; // Number of RGB LEDs (zones) supported by the device. // Количество RGB LED светодиодов (зон) поддерживаемых устройством. DWORD dwBitOfColor; // RGB space size in bits // Размер RGB пространства в битах, // 8, 9, 10, 11, 12 - bits per color (бит на цвет). // InputData - data must be specified in bit dwBitOfColor. // InputData - данные должны быть в битности указанной в dwBitOfColor. SIR_INPUTCALLBACK input_func; // The callback function is called by the plugin. // Функция обратного вызова которая вызывается плагином. HWND hWndEvent; // Handle for transmit plugin data WM_SETPLUGINDATA // Хэндл для передачи данных плагина через WM_SETPLUGINDATA DWORD dwMessageID; // message ID. WM_SETPLUGINDATA = dwMessageID // идентификатор сообщения. WM_SETPLUGINDATA = dwMessageID // SendMessage(hWndEvent, WM_SETPLUGINDATA, ....); // lParam = (LPARAM)InputData; wParam = (WPARAM)dwLedsCount; // InputData - array (a pointer to the buffer) with RGB data. // InputData - массив (указатель на буффер) с RGB данными. // Order in an array of colors such a R0, G0, B0, R1, G1, B1, ...., Rn, Gn, Bn. // Порядок цветов в массиве такой R0, G0, B0, R1, G1, B1, ...., Rn, Gn, Bn. // Size of InputData = dwLedsCount * 3; (number of zones * 3 color). // Размер InputData = dwLedsCount * 3; (количество зон * на 3 цвета) wchar_t Language[100]; // Имя языка "English", "Deutsch", "Russian" и т.д. // Language name "English", "Deutsch", "Russian" and etc. DWORD dwProfile; // Номер профиля // Profile number // End structure plugin version 1 } BACKLIGHT_PLUGIN_SETTINGS, *LPBACKLIGHT_PLUGIN_SETTINGS; #pragma pack (pop) typedef wchar_t *(__stdcall *SIR_DLL_FUNC_GETNAME)(void); typedef wchar_t *(__stdcall *SIR_DLL_FUNC_GETVERSION)(void); typedef wchar_t *(__stdcall *SIR_DLL_FUNC_GETDESCRIPTION)(void); typedef int (__stdcall *SIR_DLL_FUNC_INIT)(void); typedef int (__stdcall *SIR_DLL_FUNC_UNINIT)(void); typedef int (__stdcall *SIR_DLL_FUNC_START)(void); typedef int (__stdcall *SIR_DLL_FUNC_STOP)(void); typedef int (__stdcall *SIR_DLL_FUNC_SHOWSETTINGS)(HWND); typedef int (__stdcall *SIR_DLL_FUNC_SETBACKLIGHTSETTINGS)(LPBACKLIGHT_PLUGIN_SETTINGS settings); typedef int (__stdcall *SIR_DLL_FUNC_SAVESETTINGS)(void); /* Экспортируемые функции плагина */ extern "C" __declspec(dllexport) wchar_t * __stdcall SIR_GetName(void); extern "C" __declspec(dllexport) wchar_t * __stdcall SIR_GetVersion(void); extern "C" __declspec(dllexport) wchar_t * __stdcall SIR_GetDescription(void); extern "C" __declspec(dllexport) int __stdcall SIR_Init(void); extern "C" __declspec(dllexport) int __stdcall SIR_UnInit(void); extern "C" __declspec(dllexport) int __stdcall SIR_Start(void); extern "C" __declspec(dllexport) int __stdcall SIR_Stop(void); extern "C" __declspec(dllexport) int __stdcall SIR_ShowSettings(HWND hWndParent); extern "C" __declspec(dllexport) int __stdcall SIR_SetBacklightSettings(LPBACKLIGHT_PLUGIN_SETTINGS settings); extern "C" __declspec(dllexport) int __stdcall SIR_SaveSettings(void); /* Examle: //------------------------------------------------------------------------------ /** * @brief Получение имени пагина. * @brief Getting name of the plugin. * * @detailed Функция работает вне зависимости от инициализации плагина. * @detailed The function works regardless of initialization plugin. * * @param Нет параметров. * @param No params. * * @return Имя плагина. * @return Plugin name. */ /* wchar_t * __stdcall SIR_GetName(void) { return L"ColorMusic"; } //------------------------------------------------------------------------------ /** * @brief Получение версии плагина. * @brief Getting version of the plugin. * * @detailed Функция работает вне зависимости от инициализации плагина. * @detailed The function works regardless of initialization plugin. * * @param Нет параметров. * @param No params. * * @return Версия плагина. * @return Plugin version. */ /* wchar_t * __stdcall SIR_GetVersion(void) { return L"2.0.3"; } //------------------------------------------------------------------------------ /** * @brief Получение дополнительной информации о плагине (имя автора, сайт и др.). * @brief Get additional information (author's name, website, etc.). * * @detailed Функция работает вне зависимости от инициализации плагина. * @detailed The function works regardless of initialization plugin. * * @param Нет параметров. * @param No params. * * @return Дополнительная информация. * @return Additional information. */ /* wchar_t * __stdcall SIR_GetDescription(void) { return L"Plugin for Backlight\n\rDeveloper Maxim\n\r Web: http://www.ambibox.ru\n\rE-mail:AmbiBox@mail.ru"; } //------------------------------------------------------------------------------ /** * @brief Инициализация плагина. * @brief Initialize the plugin. * * @detailed Позволяет сделать плагину начальные настройки. * @detailed Allows you to make the initial settings of the plugin. * * @param Нет параметров. * @param No params. * * @return Код ошибки. * @return Error code. */ /* int __stdcall SIR_Init(void) { int ErrorCode = 3; return 0; // Success, no errors return ErrorCode; // Error code > 0 } //------------------------------------------------------------------------------ /** * @brief Деинициализация плагина. * @brief UnInitialize the plugin. * * @detailed Плагин после этой команды плагин перестает работать. * @detailed Plugin after this command plugin stops working. * * @param Нет параметров. * @param No params. * * @return Код ошибки. * @return Error code. */ /* int __stdcall SIR_UnInit(void) { int ErrorCode = 3; return 0; // Success, no errors return ErrorCode; // Error code > 0 } //------------------------------------------------------------------------------ /** * @brief Запускает плагин. * @brief Runs the plugin. * * @detailed После этой команды плагину разрешается передавать данные в основную программу. * Функция работает только после инициализации плагина. * @detailed After this command, the plugin is allowed to transmit data to the main program. * This function works only when plugin initialization. * * @param Нет параметров. * @param No params. * * @return Код ошибки. * @return Error code. */ /* int __stdcall SIR_Start(void) { int ErrorCode = 3; return 0; // Success, no errors return ErrorCode; // Error code > 0 } //------------------------------------------------------------------------------ /** * @brief Stops plugin. * @brief Останавливает плагин * * @detailed После этой команды плагину запрещается передавать данные в основную программу. Функция работает только после инициализации плагина. * @detailed After this command, the plugin must not transmit data to the main program. This function works only when plugin initialization. * * @param Нет параметров. * @param No params. * * @return Код ошибки. * @return Error code. */ /* int __stdcall SIR_Stop(void) { int ErrorCode = 3; return 0; // Success, no errors return ErrorCode; // Error code > 0 } //------------------------------------------------------------------------------ /** * @brief Вызов окна диалога настройки параметров плагина. * @brief Show settings plugin. * * @detailed Функция работает только после инициализации плагина. * @detailed This function works only when plugin initialization. * * @param Хэнл окна AmbiBox. * @param HANDLE window of AmbiBox. * * @return Код ошибки. * @return Error code. */ /* int __stdcall SIR_ShowSettings(HWND hWndParent) { int ErrorCode = 3; return 0; // Success, no errors return ErrorCode; // Error code > 0 } //------------------------------------------------------------------------------ /** * @brief Передача настроек плагину. * @brief Transmit settings to a plugin. * * @detailed Функция работает только после инициализации плагина. * @detailed This function works only when plugin initialization. * * @param Парметры устройства и AmbiBox. * @param Parameters of device and AmbiBox. * * @return Код ошибки. * @return Error code. */ /* int __stdcall SIR_SetBacklightSettings(LPBACKLIGHT_PLUGIN_SETTINGS settings) { int ErrorCode = 3; return 0; // Success, no errors return ErrorCode; // Error code > 0 } //------------------------------------------------------------------------------ /** * @brief Сохранение настроек. * @brief Save settings. * * @detailed Функция работает только после инициализации плагина. * @detailed This function works only when plugin initialization. * * @param Нет параметров. * @param No params. * * @return Код ошибки. * @return Error code. */ /* int __stdcall SIR_SaveSettings(void) { int ErrorCode = 3; return 0; // Success, no errors return ErrorCode; // Error code > 0 } //------------------------------------------------------------------------------ /** * @brief Функция обратного вызова. * @brief Callback function. * * @detailed Вызывается плагином для передачи данных светодиодам. * InputData - массив (указатель на буффер) с RGB данными. * Порядок цветов в массиве такой R0, G0, B0, R1, G1, B1, ...., Rn, Gn, Bn. * Размер InputData = dwLedsCount * 3; (количество зон * на 3 цвета). * dwLedsCount - количество данных равное количеству зон. * @detailed Called by plugin for data transmission to LEDs. * InputData - array (a pointer to the buffer) with RGB data. * Order in an array of colors such a R0, G0, B0, R1, G1, B1, ...., Rn, Gn, Bn. * Size of InputData = dwLedsCount * 3; (number of zones * 3 color). * dwLedsCount - quantity of data equal to the number of zones. * * @param Массив цветовых данных, количество зон. * @param Array of colors, number of zones * * @return Код ошибки. * @return Error code. */ /* typedef int (__stdcall *SIR_INPUTCALLBACK)(DWORD *InputData, DWORD dwLedsCount); */ #endif
Create global plugins
Plugins backlight designed to create light effects and interact with the remote control.
Plugins are located in the directory:
c:\Program Files\AmbiBox\Plugins\Global\[Name catalog of plugin]
Plugin created as a DLL and exports the following functions:
//--------------------------------------------------------------------------- // AmbiBox global plugins interface // Copyright (C) AmbiBox 2004-2014 // AmbiBox@mail.ru // http://www.ambibox.ru //--------------------------------------------------------------------------- #ifndef AMBIBOX_PLUGINS_H #define AMBIBOX_PLUGINS_H #include <windows.h> // Types of the plugin // Типы плагина #define AMB_TYPE_BACKLIGHT 0x0001 #define AMB_TYPE_IR 0x0002 // Error codes // Коды ошибок #define AMB_NO_ERROR 0x0000 #define AMB_ERROR_INIT 0x0001 #define AMB_ERROR_START 0x0002 #define AMB_ERROR_SETTINGS 0x0003 #define AMB_ERROR_NO_BACKLIGHT_TYPE 0x0004 #define AMB_ERROR_NO_IR_TYPE 0x0005 #define AMB_ERROR_NO_CORRECT_PID 0x0006 #define AMB_ERROR_COMMAND 0x0007 #define AMB_ERROR_DEVICE_NOT_LOCKED 0x0008 #define AMB_ERROR_SMALL_TIME 0x0009 #define AMB_ERROR_NOT_SENDED 0x000A #define AMB_ERROR_ALREADY_LOCKED 0x000B #define AMB_BUTTON_PROCESSED 0 #define AMB_BUTTON_NOT_PROCESSED -1 // Event method // Метод сообщений #define AMB_EVENT_CALLBACK 0x0000 #define AMB_EVENT_WM_MESSAGE 0x0001 // Commands to the device // Команды на устройство #define AMB_LOCK_DEVICE 0x0001 #define AMB_UNLOCK_DEVICE 0x0002 #define AMB_DATA_TO_DEVICE 0x0003 #pragma pack (push, 1) typedef struct _BACKLIGHT_DATA { DWORD dwPluginID; // ID плагина, задается AmbiBox. // Plugin ID, set by AmbiBox. DWORD *InputData; // InputData - array (a pointer to the buffer) with RGB data. // InputData - массив (указатель на буффер) с RGB данными. DWORD dwDataSize; // Size of InputData = dwLedsCount * 3; (number of zones * 3 color). // Размер InputData = dwLedsCount * 3; (количество зон * на 3 цвета) DWORD dwDeviceCommand; // Commands for device // Команды для устройства } BACKLIGHT_DATA, *LPBACKLIGHT_DATA; // Callback function for transmit IR data to the plugin // Функция обратного для передачи ИК данных в плагин typedef int (__stdcall *AMB_IRCALLBACK)(BYTE *IR_Data, DWORD IR_Size, wchar_t *ButtonName); // Callback function for transmit data to the LEDs // Функция обратного вызова для передачи данных на светодиоды typedef int (__stdcall *AMB_BACKLIGHTCALLBACK)(LPBACKLIGHT_DATA backlight); // Callback function for logging // Функция обратного вызова для логирования typedef void (__stdcall *AMB_LOGCALLBACK)(wchar_t *Message); typedef struct _AMBIBOX_PLUGIN_SETTINGS { DWORD dwPluginVersion; // Версия плагина и полей структуры. // Versions and structure fields. // Start structure plugin version 1 DWORD dwPluginID; // ID плагина, задается AmbiBox. // Plugin ID, set by AmbiBox. DWORD dwEventMethod; // Transmission method data to the main program. // Способ передачи данных основной программе. // 0 - a callback function. // 0 - через функцию обратного вызова. // 1 - a message WM_SETPLUGINDATA. // 1 - через сообщение WM_SETPLUGINDATA. DWORD dwMinEventTime; // Minimal interval the call CallBack functions in milliseconds. // Минимальный интервал вызова CallBack функции в миллисекундах. DWORD dwLedsCount; // Number of RGB LEDs (zones) supported by the device. // Количество RGB LED светодиодов (зон) поддерживаемых устройством. DWORD dwBitOfColor; // RGB space size in bits // Размер RGB пространства в битах, // 8, 9, 10, 11, 12 - bits per color (бит на цвет). // InputData - data must be specified in bit dwBitOfColor. // InputData - данные должны быть в битности указанной в dwBitOfColor. AMB_BACKLIGHTCALLBACK InputBacklightFunc; // The callback function is called by the plugin. // Функция обратного вызова которая вызывается плагином. HWND hWndEvent; // Handle for transmit plugin data WM_SETPLUGINDATA // Хэндл для передачи данных плагина через WM_SETPLUGINDATA DWORD dwMessageID; // message ID. WM_SETPLUGINDATA = dwMessageID // идентификатор сообщения. WM_SETPLUGINDATA = dwMessageID // SendMessage(hWndEvent, WM_SETPLUGINDATA, ....); // wParam = NULL; lParam = (LPARAM)(LPBACKLIGHT_DATA)backlight_data; AMB_IRCALLBACK OutputIrFunc; // A callback function? is called by AmbiBox, // a for transmitting to the plugin IR data, set by plugin. // Функция обратного вызова которая вызывается AmbiBox, // для передачи в плагин ИК данных, задается плагином. wchar_t Language[100]; // Имя языка "English", "Deutsch", "Russian" и т.д. // Language name "English", "Deutsch", "Russian" and etc. DWORD dwProfile; // Номер профиля // Profile number // End structure plugin version 1 } AMBIBOX_PLUGIN_SETTINGS, *LPAMBIBOX_PLUGIN_SETTINGS; #pragma pack (pop) typedef void (__stdcall *AMB_DLL_FUNC_SETLOGFUNC)(AMB_LOGCALLBACK); typedef DWORD (__stdcall *AMB_DLL_FUNC_GETTYPE)(void); typedef wchar_t *(__stdcall *AMB_DLL_FUNC_GETNAME)(void); typedef wchar_t *(__stdcall *AMB_DLL_FUNC_GETVERSION)(void); typedef wchar_t *(__stdcall *AMB_DLL_FUNC_GETDESCRIPTION)(void); typedef int (__stdcall *AMB_DLL_FUNC_INIT)(void); typedef int (__stdcall *AMB_DLL_FUNC_UNINIT)(void); typedef int (__stdcall *AMB_DLL_FUNC_START)(void); typedef int (__stdcall *AMB_DLL_FUNC_STOP)(void); typedef int (__stdcall *AMB_DLL_FUNC_SHOWSETTINGS)(HWND); typedef int (__stdcall *AMB_DLL_FUNC_SETPLUGINSETTINGS)(LPAMBIBOX_PLUGIN_SETTINGS settings); typedef int (__stdcall *AMB_DLL_FUNC_SAVESETTINGS)(void); /* Экспортируемые функции плагина */ extern "C" __declspec(dllexport) void __stdcall AMB_SetLogFunc(AMB_LOGCALLBACK WriteToLog); extern "C" __declspec(dllexport) DWORD __stdcall AMB_GetType(void); extern "C" __declspec(dllexport) wchar_t * __stdcall AMB_GetName(void); extern "C" __declspec(dllexport) wchar_t * __stdcall AMB_GetVersion(void); extern "C" __declspec(dllexport) wchar_t * __stdcall AMB_GetDescription(void); extern "C" __declspec(dllexport) int __stdcall AMB_Init(void); extern "C" __declspec(dllexport) int __stdcall AMB_UnInit(void); extern "C" __declspec(dllexport) int __stdcall AMB_Start(void); extern "C" __declspec(dllexport) int __stdcall AMB_Stop(void); extern "C" __declspec(dllexport) int __stdcall AMB_ShowSettings(HWND hWndParent); extern "C" __declspec(dllexport) int __stdcall AMB_SetPluginSettings(LPAMBIBOX_PLUGIN_SETTINGS settings); extern "C" __declspec(dllexport) int __stdcall AMB_SaveSettings(void); /* Examle: //------------------------------------------------------------------------------ /** * @brief Получение типа плагина. * @brief Getting type of the plugin. * * @detailed Функция работает вне зависимости от инициализации плагина. * @detailed The function works regardless of initialization plugin. * * @param Нет параметров. * @param No params. * * @return Имя плагина. * @return Plugin name. */ /* void __stdcall AMB_SetLogFunc(AMB_LOGCALLBACK WriteToLog) { } //------------------------------------------------------------------------------ /** * @brief Получение типа плагина. * @brief Getting type of the plugin. * * @detailed Функция работает вне зависимости от инициализации плагина. * @detailed The function works regardless of initialization plugin. * * @param Нет параметров. * @param No params. * * @return Ничего не возвращает. * @return No return. */ /* DWORD __stdcall AMB_GetType(void) { return (TYPE_BACKLIGHT | TYPE_IR); } //------------------------------------------------------------------------------ /** * @brief Получение имени пагина. * @brief Getting name of the plugin. * * @detailed Функция работает вне зависимости от инициализации плагина. * @detailed The function works regardless of initialization plugin. * * @param Нет параметров. * @param No params. * * @return Имя плагина. * @return Plugin name. */ /* wchar_t * __stdcall AMB_GetName(void) { return L"Color Music"; } //------------------------------------------------------------------------------ /** * @brief Получение версии плагина. * @brief Getting version of the plugin. * * @detailed Функция работает вне зависимости от инициализации плагина. * @detailed The function works regardless of initialization plugin. * * @param Нет параметров. * @param No params. * * @return Версия плагина. * @return Plugin version. */ /* wchar_t * __stdcall AMB_GetVersion(void) { return L"2.0.3"; } //------------------------------------------------------------------------------ /** * @brief Получение дополнительной информации о плагине (имя автора, сайт и др.). * @brief Get additional information (author's name, website, etc.). * * @detailed Функция работает вне зависимости от инициализации плагина. * @detailed The function works regardless of initialization plugin. * * @param Нет параметров. * @param No params. * * @return Дополнительная информация. * @return Additional information. */ /* wchar_t * __stdcall AMB_GetDescription(void) { return L"Plugin for Backlight\n\rDeveloper Maxim\n\r Web: http://www.ambibox.ru\n\rE-mail:AmbiBox@mail.ru"; } //------------------------------------------------------------------------------ /** * @brief Инициализация плагина. * @brief Initialize the plugin. * * @detailed Позволяет сделать плагину начальные настройки. * @detailed Allows you to make the initial settings of the plugin. * * @param Нет параметров. * @param No params. * * @return Код ошибки. * @return Error code. */ /* int __stdcall AMB_Init(void) { int ErrorCode = 3; return 0; // Success, no errors return ErrorCode; // Error code > 0 } //------------------------------------------------------------------------------ /** * @brief Деинициализация плагина. * @brief UnInitialize the plugin. * * @detailed Плагин после этой команды плагин перестает работать. * @detailed Plugin after this command plugin stops working. * * @param Нет параметров. * @param No params. * * @return Код ошибки. * @return Error code. */ /* int __stdcall AMB_UnInit(void) { int ErrorCode = 3; return 0; // Success, no errors return ErrorCode; // Error code > 0 } //------------------------------------------------------------------------------ /** * @brief Запускает плагин. * @brief Runs the plugin. * * @detailed После этой команды плагину разрешается передавать данные в основную программу. * Функция работает только после инициализации плагина. * @detailed After this command, the plugin is allowed to transmit data to the main program. * This function works only when plugin initialization. * * @param Нет параметров. * @param No params. * * @return Код ошибки. * @return Error code. */ /* int __stdcall AMB_Start(void) { int ErrorCode = 3; return 0; // Success, no errors return ErrorCode; // Error code > 0 } //------------------------------------------------------------------------------ /** * @brief Stops plugin. * @brief Останавливает плагин * * @detailed После этой команды плагину запрещается передавать данные в основную программу. Функция работает только после инициализации плагина. * @detailed After this command, the plugin must not transmit data to the main program. This function works only when plugin initialization. * * @param Нет параметров. * @param No params. * * @return Код ошибки. * @return Error code. */ /* int __stdcall AMB_Stop(void) { int ErrorCode = 3; return 0; // Success, no errors return ErrorCode; // Error code > 0 } //------------------------------------------------------------------------------ /** * @brief Вызов окна диалога настройки параметров плагина. * @brief Show settings plugin. * * @detailed Функция работает только после инициализации плагина. * @detailed This function works only when plugin initialization. * * @param Хэнл окна AmbiBox. * @param HANDLE window of AmbiBox. * * @return Код ошибки. * @return Error code. */ /* int __stdcall AMB_ShowSettings(HWND hWndParent) { int ErrorCode = 3; return 0; // Success return ErrorCode; // Error code > 0 } //------------------------------------------------------------------------------ /** * @brief Передача настроек плагину. * @brief Transmit settings to a plugin. * * @detailed Функция работает только после инициализации плагина. * @detailed This function works only when plugin initialization. * * @param Парметры устройства и AmbiBox. * @param Parameters of device and AmbiBox. * * @return Код ошибки. * @return Error code. */ /* int __stdcall AMB_SetPluginSettings(LAMBIBOX_PLUGIN_SETTINGS settings) { int ErrorCode = 3; return 0; // Success, no errors return ErrorCode; // Error code > 0 } //------------------------------------------------------------------------------ /** * @brief Сохранение настроек. * @brief Save settings. * * @detailed Функция работает только после инициализации плагина. * @detailed This function works only when plugin initialization. * * @param Нет параметров. * @param No params. * * @return Код ошибки. * @return Error code. */ /* int __stdcall AMB_SaveSettings(void) { int ErrorCode = 3; return 0; // Success, no errors return ErrorCode; // Error code > 0 } */ //------------------------------------------------------------------------------ /** * @brief Передает ИК данные. * @brief Transmits IR data. * * @detailed Функция работает только после инициализации плагина. * @detailed This function works only when plugin initialization. * * @param Буффер с данными, размер буффера, имя кнопки. * @param Buffer with data, size of buffer, button name. * * @return Код ошибки. * @return Error code. */ /* int __stdcall IR_Data(BYTE *IR_Data, DWORD IR_Size, wchar_t *ButtonName) { int ErrorCode = 3; return AMB_BUTTON_PROCESSED; //Success, button processed return AMB_BUTTON_NOT_PROCESSED; //Success, button not processed return ErrorCode; // Error code > 0 } */ //------------------------------------------------------------------------------ /** * @brief Функция обратного вызова. * @brief Callback function. * * @detailed Вызывается плагином для передачи данных светодиодам. * InputData - массив (указатель на буффер) с RGB данными. * Порядок цветов в массиве такой R0, G0, B0, R1, G1, B1, ...., Rn, Gn, Bn. * Размер InputData = dwLedsCount * 3; (количество зон * на 3 цвета). * dwDataSize - количество данных равное количеству зон * 3. * @detailed Called by plugin for data transmission to LEDs. * InputData - array (a pointer to the buffer) with RGB data. * Order in an array of colors such a R0, G0, B0, R1, G1, B1, ...., Rn, Gn, Bn. * Size of InputData = dwLedsCount * 3; (number of zones * 3 color). * dwDataSize - quantity of data equal to the number of zones * 3. * * @param BACKLIGHT_DATA. * @param BACKLIGHT_DATA. * * @return Код ошибки. * @return Error code. */ /* typedef int (__stdcall *AMB_BACKLIGHTCALLBACK)(LPBACKLIGHT_DATA backlight); */ #endif
Order initialization of plugins and calling functions by program AmbiBox
Local plugins
SIR_GetName()
SIR_GetVersion()
SIR_GetDescription()
SIR_Init()
SIR_SetBacklightSettings()
SIR_SaveSettings()
SIR_Start()
SIR_SetBacklightSettings()
SIR_GetName()
SIR_GetVersion()
SIR_GetDescription()
SIR_SaveSettings()
SIR_Stop()
SIR_SaveSettings()
SIR_SetBacklightSettings()
SIR_UnInit()
Global plugins
AMB_SetLogFunc()
AMB_GetName()
AMB_GetVersion()
AMB_GetDescription()
AMB_Init()
AMB_SetPluginSettings()
AMB_SaveSettings()
AMB_Start()
AMB_SetPluginSettings()
AMB_GetName()
AMB_GetVersion()
AMB_GetDescription()
AMB_SaveSettings()
AMB_Stop()
AMB_SaveSettings()
AMB_SetPluginSettings()
AMB_UnInit()