summaryrefslogtreecommitdiff
path: root/users/vitoni/vitoni.h
blob: 1f2603713570e8aaf620450623ccf674b143929b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2021 Victor Toni (@vitoni)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <stdint.h>
#include <stdbool.h>

#include <quantum/action.h>

#include "rgb_matrix_effects.h"

/**
 * @brief Executes periodic tasks, eg. fading or checking for upcoming supend.
 * @details Function declaration as weak as the implementation might "disappear" depending on the RGB settings used.
 * The weak declaration avoids having to change `keymap.c`.
 */
__attribute__((weak))
void matrix_scan_user_rgb(void);

/**
 * @brief Executes tasks based on user activity, eg. fading in.
 * @details Function declaration as weak as the implementation might "disappear" depending on the RGB settings used.
 * The weak declaration avoids having to change `keymap.c`.
 * @param[in]   keycode
 * @param[in]   record
 * @return `false` if further processing should be stopped, `true` otherwise
 */
__attribute__((weak))
bool process_record_user_rgb(const uint16_t keycode, const keyrecord_t *record);