diff options
Diffstat (limited to 'quantum/visualizer/visualizer.h')
| -rw-r--r-- | quantum/visualizer/visualizer.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/quantum/visualizer/visualizer.h b/quantum/visualizer/visualizer.h index f37ce8416..463934849 100644 --- a/quantum/visualizer/visualizer.h +++ b/quantum/visualizer/visualizer.h | |||
| @@ -130,20 +130,22 @@ void run_next_keyframe(keyframe_animation_t* animation, visualizer_state_t* stat | |||
| 130 | // Does nothing, useful for adding delays | 130 | // Does nothing, useful for adding delays |
| 131 | bool keyframe_no_operation(keyframe_animation_t* animation, visualizer_state_t* state); | 131 | bool keyframe_no_operation(keyframe_animation_t* animation, visualizer_state_t* state); |
| 132 | 132 | ||
| 133 | // Call this once, when the initial animation has finished, alternatively you can call it | ||
| 134 | // directly from the initalize_user_visualizer function (the animation can be null) | ||
| 135 | bool enable_visualization(keyframe_animation_t* animation, visualizer_state_t* state); | ||
| 136 | |||
| 137 | // The master can set userdata which will be transferred to the slave | 133 | // The master can set userdata which will be transferred to the slave |
| 138 | #ifdef VISUALIZER_USER_DATA_SIZE | 134 | #ifdef VISUALIZER_USER_DATA_SIZE |
| 139 | void visualizer_set_user_data(void* user_data); | 135 | void visualizer_set_user_data(void* user_data); |
| 140 | #endif | 136 | #endif |
| 141 | 137 | ||
| 142 | // These functions have to be implemented by the user | 138 | // These functions have to be implemented by the user |
| 143 | void initialize_user_visualizer(visualizer_state_t* state); | 139 | // Called regularly each time the state has changed (but not every scan loop) |
| 144 | void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status); | 140 | void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status); |
| 141 | // Called when the computer goes to suspend, will also stop calling update_user_visualizer_state | ||
| 145 | void user_visualizer_suspend(visualizer_state_t* state); | 142 | void user_visualizer_suspend(visualizer_state_t* state); |
| 143 | // You have to start at least one animation as a response to the following two functions | ||
| 144 | // When the animation has finished the visualizer will resume normal operation and start calling the | ||
| 145 | // update_user_visualizer_state again | ||
| 146 | // Called when the keyboard boots up | ||
| 147 | void initialize_user_visualizer(visualizer_state_t* state); | ||
| 148 | // Called when the computer resumes from a suspend | ||
| 146 | void user_visualizer_resume(visualizer_state_t* state); | 149 | void user_visualizer_resume(visualizer_state_t* state); |
| 147 | 150 | ||
| 148 | |||
| 149 | #endif /* VISUALIZER_H */ | 151 | #endif /* VISUALIZER_H */ |
