LMMS
Loading...
Searching...
No Matches
iplugview.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// Project : SDK Core
3//
4// Category : SDK GUI Interfaces
5// Filename : pluginterfaces/gui/iplugview.h
6// Created by : Steinberg, 12/2007
7// Description : Plug-in User Interface
8//
9//-----------------------------------------------------------------------------
10// This file is part of a Steinberg SDK. It is subject to the license terms
11// in the LICENSE file found in the top-level directory of this distribution
12// and at www.steinberg.net/sdklicenses.
13// No part of the SDK, including this file, may be copied, modified, propagated,
14// or distributed except according to the terms contained in the LICENSE file.
15//-----------------------------------------------------------------------------
16
17#pragma once
18
21
22namespace Steinberg {
23
24class IPlugFrame;
25
26//------------------------------------------------------------------------
29
30//------------------------------------------------------------------------
35{
36 ViewRect (int32 l = 0, int32 t = 0, int32 r = 0, int32 b = 0)
37 : left (l), top (t), right (r), bottom (b)
38 {
39 }
40
45
46 //--- ---------------------------------------------------------------------
47 int32 getWidth () const { return right - left; }
48 int32 getHeight () const { return bottom - top; }
49};
50
51SMTG_TYPE_SIZE_CHECK (ViewRect, 16, 16, 16, 16)
52
53//------------------------------------------------------------------------
63
67
71
75
80
82//------------------------------------------------------------------------
83
84//------------------------------------------------------------------------
122class IPlugView : public FUnknown
123{
124public:
125//------------------------------------------------------------------------
129
137 virtual tresult PLUGIN_API attached (void* parent, FIDString type) = 0;
138
141 virtual tresult PLUGIN_API removed () = 0;
142
144 virtual tresult PLUGIN_API onWheel (float distance) = 0;
145
153 virtual tresult PLUGIN_API onKeyDown (char16 key, int16 keyCode, int16 modifiers) = 0;
154
160 virtual tresult PLUGIN_API onKeyUp (char16 key, int16 keyCode, int16 modifiers) = 0;
161
163 virtual tresult PLUGIN_API getSize (ViewRect* size) = 0;
164
167 virtual tresult PLUGIN_API onSize (ViewRect* newSize) = 0;
168
170 virtual tresult PLUGIN_API onFocus (TBool state) = 0;
171
173 virtual tresult PLUGIN_API setFrame (IPlugFrame* frame) = 0;
174
176 virtual tresult PLUGIN_API canResize () = 0;
177
180 virtual tresult PLUGIN_API checkSizeConstraint (ViewRect* rect) = 0;
181//------------------------------------------------------------------------
182 static const FUID iid;
183};
184
185DECLARE_CLASS_IID (IPlugView, 0x5BC32507, 0xD06049EA, 0xA6151B52, 0x2B755B29)
186
187//------------------------------------------------------------------------
196class IPlugFrame : public FUnknown
197{
198public:
199//------------------------------------------------------------------------
202 virtual tresult PLUGIN_API resizeView (IPlugView* view, ViewRect* newSize) = 0;
203//------------------------------------------------------------------------
204 static const FUID iid;
205};
206
207DECLARE_CLASS_IID (IPlugFrame, 0x367FAF01, 0xAFA94693, 0x8D4DA2A0, 0xED0882A3)
208
209#if SMTG_OS_LINUX
210//------------------------------------------------------------------------
211namespace Linux {
212
213using TimerInterval = uint64;
214using FileDescriptor = int;
215
216//------------------------------------------------------------------------
223class IEventHandler : public FUnknown
224{
225public:
226 virtual void PLUGIN_API onFDIsSet (FileDescriptor fd) = 0;
227//------------------------------------------------------------------------
228 static const FUID iid;
229};
230DECLARE_CLASS_IID (IEventHandler, 0x561E65C9, 0x13A0496F, 0x813A2C35, 0x654D7983)
231
232//------------------------------------------------------------------------
239class ITimerHandler : public FUnknown
240{
241public:
242 virtual void PLUGIN_API onTimer () = 0;
243//------------------------------------------------------------------------
244 static const FUID iid;
245};
246DECLARE_CLASS_IID (ITimerHandler, 0x10BDD94F, 0x41424774, 0x821FAD8F, 0xECA72CA9)
247
248//------------------------------------------------------------------------
263class IRunLoop : public FUnknown
264{
265public:
266 virtual tresult PLUGIN_API registerEventHandler (IEventHandler* handler, FileDescriptor fd) = 0;
267 virtual tresult PLUGIN_API unregisterEventHandler (IEventHandler* handler) = 0;
268
269 virtual tresult PLUGIN_API registerTimer (ITimerHandler* handler,
270 TimerInterval milliseconds) = 0;
271 virtual tresult PLUGIN_API unregisterTimer (ITimerHandler* handler) = 0;
272//------------------------------------------------------------------------
273 static const FUID iid;
274};
275DECLARE_CLASS_IID (IRunLoop, 0x18C35366, 0x97764F1A, 0x9C5B8385, 0x7A871389)
276
277//------------------------------------------------------------------------
278} // namespace Linux
279
280#endif
281
282//------------------------------------------------------------------------
283} // namespace Steinberg
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
Definition funknown.h:233
Definition funknown.h:361
Definition iplugview.h:197
virtual tresult PLUGIN_API resizeView(IPlugView *view, ViewRect *newSize)=0
static const FUID iid
Definition iplugview.h:204
Definition iplugview.h:123
virtual tresult PLUGIN_API onSize(ViewRect *newSize)=0
virtual tresult PLUGIN_API canResize()=0
virtual tresult PLUGIN_API onWheel(float distance)=0
virtual tresult PLUGIN_API removed()=0
virtual tresult PLUGIN_API onKeyUp(char16 key, int16 keyCode, int16 modifiers)=0
virtual tresult PLUGIN_API attached(void *parent, FIDString type)=0
virtual tresult PLUGIN_API isPlatformTypeSupported(FIDString type)=0
static const FUID iid
Definition iplugview.h:182
virtual tresult PLUGIN_API getSize(ViewRect *size)=0
virtual tresult PLUGIN_API checkSizeConstraint(ViewRect *rect)=0
virtual tresult PLUGIN_API onKeyDown(char16 key, int16 keyCode, int16 modifiers)=0
virtual tresult PLUGIN_API onFocus(TBool state)=0
virtual tresult PLUGIN_API setFrame(IPlugFrame *frame)=0
int * l
Definition inflate.c:1579
struct huft * t
Definition inflate.c:943
#define DECLARE_CLASS_IID(ClassName, l1, l2, l3, l4)
Definition funknown.h:74
static uintptr_t parent
Definition pugl.h:1644
Definition baseiids.cpp:43
unsigned long long uint64
Definition ftypes.h:67
short int16
Definition ftypes.h:43
const FIDString kPlatformTypeUIView
UIView pointer. (iOS).
Definition iplugview.h:74
int16 char16
Definition ftypes.h:101
int int32
Definition ftypes.h:50
const FIDString kPlatformTypeNSView
NSView pointer. (Mac OS X).
Definition iplugview.h:70
const char8 * FIDString
Definition ftypes.h:117
const FIDString kPlatformTypeHIView
HIViewRef. (Mac OS X).
Definition iplugview.h:66
uint8 TBool
Definition ftypes.h:89
const FIDString kPlatformTypeX11EmbedWindowID
X11 Window ID. (X11).
Definition iplugview.h:79
const FIDString kPlatformTypeHWND
HWND handle. (Microsoft Windows).
Definition iplugview.h:62
int32 tresult
Definition ftypes.h:76
Definition iplugview.h:35
int32 getHeight() const
Definition iplugview.h:48
int32 left
Definition iplugview.h:41
int32 bottom
Definition iplugview.h:44
int32 right
Definition iplugview.h:43
int32 getWidth() const
Definition iplugview.h:47
ViewRect(int32 l=0, int32 t=0, int32 r=0, int32 b=0)
Definition iplugview.h:36
int32 top
Definition iplugview.h:42
#define SMTG_TYPE_SIZE_CHECK(Type, Platform64Size, MacOS32Size, Win32Size, Linux32Size)
Definition typesizecheck.h:54
ZCONST char * key
Definition crypt.c:587
int r
Definition crypt.c:458
b
Definition crypt.c:628
ulg size
Definition extract.c:2350
void handler(int signal)
Definition fileio.c:1632
typedef int(UZ_EXP MsgFn)()
#define const
Definition zconf.h:137