Line data Source code
1 :
2 : /* Copyright (c) 2011-2017, Stefan Eilemann <eile@eyescale.ch>
3 : * Petros Kataras <petroskataras@gmail.com>
4 : *
5 : * This library is free software; you can redistribute it and/or modify it under
6 : * the terms of the GNU Lesser General Public License version 2.1 as published
7 : * by the Free Software Foundation.
8 : *
9 : * This library is distributed in the hope that it will be useful, but WITHOUT
10 : * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 : * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 : * details.
13 : *
14 : * You should have received a copy of the GNU Lesser General Public License
15 : * along with this library; if not, write to the Free Software Foundation, Inc.,
16 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 : */
18 :
19 : #ifndef EQSEQUEL_DETAIL_WINDOW_H
20 : #define EQSEQUEL_DETAIL_WINDOW_H
21 :
22 : #include <eq/window.h> // base class
23 : #include <seq/types.h>
24 :
25 : namespace seq
26 : {
27 : namespace detail
28 : {
29 : class Window : public eq::Window
30 : {
31 : public:
32 : explicit Window(eq::Pipe* parent);
33 :
34 : Config* getConfig();
35 : Pipe* getPipe();
36 : seq::Renderer* getRenderer();
37 : detail::Renderer* getRendererImpl();
38 :
39 : /** @name Operations. */
40 : //@{
41 : void frameStart(const uint128_t& frameID, const uint32_t frameNumber) final;
42 : void frameFinish(const uint128_t& frameID,
43 : const uint32_t frameNumber) final;
44 : bool configInitGL(const uint128_t& initID) final;
45 : bool configExitGL() final;
46 :
47 : bool processEvent(eq::EventType type) final;
48 : bool processEvent(eq::EventType type, SizeEvent& event) final;
49 : bool processEvent(eq::EventType type, PointerEvent& event) final;
50 : bool processEvent(eq::EventType type, KeyEvent& event) final;
51 : bool processEvent(AxisEvent& event) final;
52 : bool processEvent(ButtonEvent& event) final;
53 :
54 2 : bool initContext() { return eq::Window::configInitGL(uint128_t()); }
55 2 : bool exitContext() { return eq::Window::configExitGL(); }
56 : //@}
57 :
58 : private:
59 : virtual ~Window();
60 :
61 : template <class E>
62 : bool _processEvent(eq::EventType type, E& event);
63 : template <class E>
64 : bool _processEvent(E& event);
65 : };
66 : }
67 : }
68 :
69 : #endif // EQSEQUEL_DETAIL_WINDOW_H
|