1 // This file is part of VSTGUI. It is subject to the license terms
2 // in the LICENSE file found in the top-level directory of this
3 // distribution and at http://github.com/steinbergmedia/vstgui/LICENSE
4 
5 #pragma once
6 
7 #include "iplatformframe.h"
8 
9 //------------------------------------------------------------------------
10 namespace VSTGUI {
11 namespace X11 {
12 
13 //------------------------------------------------------------------------
14 class IEventHandler
15 {
16 public:
17 	virtual void onEvent () = 0;
18 };
19 
20 //------------------------------------------------------------------------
21 class ITimerHandler
22 {
23 public:
24 	virtual void onTimer () = 0;
25 };
26 
27 //------------------------------------------------------------------------
28 class IRunLoop : public virtual IReference
29 {
30 public:
31 	virtual bool registerEventHandler (int fd, IEventHandler* handler) = 0;
32 	virtual bool unregisterEventHandler (IEventHandler* handler) = 0;
33 
34 	virtual bool registerTimer (uint64_t interval, ITimerHandler* handler) = 0;
35 	virtual bool unregisterTimer (ITimerHandler* handler) = 0;
36 };
37 
38 //------------------------------------------------------------------------
39 class FrameConfig : public IPlatformFrameConfig
40 {
41 public:
42 	SharedPointer<IRunLoop> runLoop;
43 };
44 
45 //------------------------------------------------------------------------
46 class IX11Frame
47 {
48 public:
49 	virtual uint32_t getX11WindowID () const = 0;
50 };
51 
52 //------------------------------------------------------------------------
53 } // X11
54 } // VSTGUI
55