• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright (c) 2015 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // Copyright (c) 2023 BlackBerry Limited
7 //
8 
9 // QNXWindow.h: Definition of the implementation of OSWindow for QNX
10 
11 #ifndef UTIL_QNX_WINDOW_H
12 #define UTIL_QNX_WINDOW_H
13 
14 #include <screen/screen.h>
15 
16 #include <string>
17 
18 #include "OSWindow.h"
19 
20 class QNXWindow : public OSWindow {
21    public:
22     QNXWindow();
23     ~QNXWindow();
24 
25     bool initialize(const std::string& name, size_t width, size_t height) override;
26     void destroy() override;
27 
28     EGLNativeWindowType getNativeWindow() const override;
29     EGLNativeDisplayType getNativeDisplay() const override;
30     void* getFramebufferNativeWindow() const override;
31 
32     void messageLoop() override;
33 
34     void setMousePosition(int x, int y) override;
35     bool setPosition(int x, int y) override;
36     bool resize(int width, int height) override;
37     void setVisible(bool isVisible) override;
38 
39     void signalTestEvent() override;
40 
41    private:
42     void processMouseEvent(const screen_event_t& event);
43     void processKeyEvent(const screen_event_t& event);
44     void processPropertyChangedEvent(const screen_event_t& event);
45     void processInputControlEvent(const screen_event_t& event);
46     void processCloseEvent(const screen_event_t& event);
47 
48     screen_window_t mWindow;
49     bool mVisible;
50     pid_t mPid;
51 };
52 
53 #endif  // UTIL_QNX_WINDOW_H
54