Files
OpenRGB/Controllers/OKSController/RGBController_OKSKeyboard.h
Adam Honse a3b023d86c RGBController API Overhaul
* Reorganize and clean up RGBController API functions
    * Add functions to get protected RGBController member values
    * Make NetworkClient, ProfileManager, and ResourceManager friend classes so they can access protected members
    * Protected previously-public RGBController members
        * Information strings (name, vendor, description, version, serial location)
        * Device type
        * Active mode
        * Flags
        * LEDs vector
        * LED alternate names vector
        * Modes vector
        * Colors vector
        * Zones vector
    * Add CONTROLLER_FLAG_HIDDEN to allow plugins to hide controllers from control GUI
    * Add update reason codes to RGBController update callback and signal updates on more RGBController events
    * Add loop zone types and segmented zone type
    * Add matrix map field to segments
    * Rework matrix_map_type from using pointers to vector to prevent memory leaks
    * Rework KeyboardLayoutManager to return new matrix_map_type
    * Add access mutex to RGBController API
    * Add per-zone modes ot RGBController API
    * Add JSON description functions to RGBController API
2026-01-11 13:10:40 -06:00

72 lines
2.6 KiB
C++

/*---------------------------------------------------------*\
| RGBController_OKSKeyboard.h |
| |
| RGBController for OKS keyboard |
| |
| Merafour (OKS) 24 Feb 2023 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include "OKSKeyboardController.h"
/*-----------------------------------------------------*\
| mode |
\*-----------------------------------------------------*/
enum user_param_view_mode_t
{
UP_RGB_MODES_MASK = 0x7F,
UP_RGB_PAUSE__MASK = 0x80,
UP_RGB_PAUSE_ON = 0x80,
UP_RGB_PAUSE_OFF = 0x00,
/*------------------------------------------------------------*\
| direct mode,eg:OpenRGB+Artemis |
\*------------------------------------------------------------*/
UP_RGB_MODES_DIRECT = 0x00,
/*------------------------------------------------------------*\
| user define mode |
\*------------------------------------------------------------*/
UP_RGB_MODES_UDEF1 = 0x01,
UP_RGB_MODES_UDEF2 = 0x02,
UP_RGB_MODES_UDEF3 = 0x03,
UP_RGB_MODES_UDEF4 = 0x04,
UP_RGB_MODES_UDEF5 = 0x05,
UP_RGB_MODES_RECORD = 0x06,
/*------------------------------------------------------------*\
| default mode |
\*------------------------------------------------------------*/
UP_RGB_MODES_RACE = 0x07,
UP_RGB_MODES_BREAT = 0x08,
UP_RGB_MODES_RIPPLE = 0x09,
UP_RGB_MODES_DIFF = 0x0A,
UP_RGB_MODES_WAVE = 0x0B,
UP_RGB_MODES_CLICK = 0x0C,
UP_RGB_MODES_BRIGHT = 0x0D,
UP_RGB_MODES_LUMA_CYCLE = 0x0E,
UP_RGB_MODES_ROTATE = 0x0F,
UP_RGB_MODES_HID_MENU = 0x10,
UP_RGB_MODES_NONE = 0x12,
};
class RGBController_OKSKeyboard : public RGBController
{
public:
RGBController_OKSKeyboard(OKSKeyboardController* controller_ptr);
~RGBController_OKSKeyboard();
void SetupZones();
void DeviceUpdateLEDs();
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();
private:
OKSKeyboardController* controller;
};