gui: mouse button events are now routed all the way to the EventManager.
[fail.git] / sdl / sdl.aidl
blob1651866ece5fc4d587c782c94bb0abdfda3bd7d8
1 #include "../gui/gui.aidl"
3 namespace awful { namespace sdl
5         class App
6         {
7                 // For now it will just init everything with default values when the singleton is created because I'm lazy.
8                 // I'll do the rest later.
9                 static Pointer< App > GetInstance();
10                 
11                 // The event loop. It will use signals to send events and render the scene.
12                 void run();
13                 
14                 // This signal is triggered after processing the SDL events to render the next frame.
15                 // The parameter is the elapsed time in second (with a millisecond precision) since the last
16                 // frame.
17                 Signal< float > FrameUpdate;
19                 // This signal is triggered when a mouse button event is received.
20                 // Parameters, in order:
21                 //  float x, float y: mouse cursor coordinates
22                 //      enum gui::MouseButton: button code
23                 //      bool: true if pressed, false if released
24                 Signal< float, float, enum gui::EventHandler::MouseButton, bool > MouseButtonEvent;
26                 // This flags that the buffers must be swapped after FrameUpdate. It's reset after each frame.
27                 // It's to avoid swapping/blitting unnecessarily if the application have an idle status
28                 // where it doesn't render anything.
29                 void needSwap();
30         };