VCV Rack API v2
context.hpp
Go to the documentation of this file.
1#pragma once
2#include <common.hpp>
3
4
5namespace rack {
6
7
8namespace history {
9struct State;
10} // namespace history
11
12
13namespace engine {
14struct Engine;
15} // namespace engine
16
17
18namespace window {
19struct Window;
20} // namespace window
21
22
23namespace patch {
24struct Manager;
25} // namespace patch
26
27
28namespace widget {
29struct EventState;
30} // namespace widget
31
32
33namespace app {
34struct Scene;
35} // namespace app
36
37
40struct Context {
41 widget::EventState* event = NULL;
47
49};
50
51
57void contextSet(Context* context);
58
61 return contextGet();
62}
63
65#define APP rack::contextGet()
66
67
68} // namespace rack
#define DEPRECATED
Attribute for deprecated functions and symbols.
Definition: common.hpp:24
Root namespace for the Rack API.
Definition: AudioDisplay.hpp:9
Context * contextGet()
Returns the global Context pointer.
DEPRECATED Context * appGet()
Deprecated.
Definition: context.hpp:60
void contextSet(Context *context)
Sets the context for this thread.
Rack instance state.
Definition: context.hpp:40
patch::Manager * patch
Definition: context.hpp:46
engine::Engine * engine
Definition: context.hpp:43
window::Window * window
Definition: context.hpp:44
app::Scene * scene
Definition: context.hpp:42
history::State * history
Definition: context.hpp:45
Definition: Scene.hpp:12
Manages Modules and Cables and steps them in time.
Definition: Engine.hpp:22
Definition: history.hpp:160
Handles the Rack patch file state.
Definition: patch.hpp:13
Definition: event.hpp:113
OS window with OpenGL context.
Definition: Window.hpp:55