| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <X11/Xlib.h> |
| 7 |
#include <X11/Xutil.h> |
| 8 |
#include <X11/keysym.h> |
| 9 |
#include <memory> |
| 10 |
#include <thread> |
| 11 |
|
| 12 |
class GLX11Window |
| 13 |
{ |
| 14 |
public: |
| 15 |
GLX11Window(Display* display, Window parent_window, Colormap color_map, Window window, int width, |
| 16 |
int height); |
| 17 |
~GLX11Window(); |
| 18 |
|
| 19 |
Display* GetDisplay() const { return m_display; } |
| 20 |
Window GetParentWindow() const { return m_parent_window; } |
| 21 |
Window GetWindow() const { return m_window; } |
| 22 |
int GetWidth() const { return m_width; } |
| 23 |
int GetHeight() const { return m_height; } |
| 24 |
|
| 25 |
void UpdateDimensions(); |
| 26 |
|
| 27 |
static std::unique_ptr<GLX11Window> Create(Display* display, Window parent_window, |
| 28 |
XVisualInfo* vi); |
| 29 |
|
| 30 |
private: |
| 31 |
Display* m_display; |
| 32 |
Window m_parent_window; |
| 33 |
Colormap m_color_map; |
| 34 |
Window m_window; |
| 35 |
|
| 36 |
int m_width; |
| 37 |
int m_height; |
| 38 |
}; |