Jamba C++ API  5.1.1
Types.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 pongasoft
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5  * use this file except in compliance with the License. You may obtain a copy of
6  * the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * License for the specific language governing permissions and limitations under
14  * the License.
15  *
16  * @author Yan Pujante
17  */
18 #pragma once
19 
20 #include <vstgui4/vstgui/lib/cbitmap.h>
21 #include <vstgui4/vstgui/lib/cfont.h>
22 #include <vstgui4/vstgui/lib/vstkeycode.h>
23 #include <pongasoft/Utils/Lerp.h>
24 
25 #if VSTGUI_LIVE_EDITING
26 #define EDITOR_MODE 1
27 #endif
28 
29 namespace VSTGUI {
34 enum CKeyboardEventResult : int32_t
35 {
38 };
39 
40 }
41 
42 namespace pongasoft {
43 namespace VST {
44 namespace GUI {
45 
46 using namespace VSTGUI;
47 
48 // Defines a Bitmap types shortcut notation
49 using BitmapPtr = CBitmap *;
50 using BitmapSPtr = SharedPointer<CBitmap>;
51 
52 // Defines a Font types shortcut notation
53 using FontPtr = CFontDesc *;
54 using FontSPtr = SharedPointer<CFontDesc>;
55 
56 // Defines a Gradient types shortcut notation
57 using GradientPtr = CGradient *;
58 using GradientSPtr = SharedPointer<CGradient>;
59 
64 
68 using KeyboardEventCallback = std::function<CKeyboardEventResult(VstKeyCode const&)>;
69 
70 }
71 }
72 }
Definition: Clock.h:22
SharedPointer< CGradient > GradientSPtr
Definition: Types.h:58
CKeyboardEventResult
VSTGUI defines a CMouseEventResult enum for mouse handling but no enumeration for keyboard events whi...
Definition: Types.h:34
CFontDesc * FontPtr
Definition: Types.h:53
Definition: Types.h:29
SharedPointer< CBitmap > BitmapSPtr
Definition: Types.h:50
Definition: Types.h:37
std::function< CKeyboardEventResult(VstKeyCode const &)> KeyboardEventCallback
Used to register global keyboard hooks.
Definition: Types.h:68
Definition: Types.h:36
CBitmap * BitmapPtr
Definition: Types.h:49
SharedPointer< CFontDesc > FontSPtr
Definition: Types.h:54
CGradient * GradientPtr
Definition: Types.h:57