forked from Shell4026/ShellEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindowImplUnix.h
More file actions
39 lines (29 loc) · 845 Bytes
/
Copy pathWindowImplUnix.h
File metadata and controls
39 lines (29 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include "../WindowImpl.h"
#include <X11/Xlib.h>
namespace sh::window {
class WindowImplUnix : public WindowImpl
{
private:
Display* display;
int screen;
::Window win, root;
XEvent e;
Atom wmDeleteMessage;
int widthPrevious;
int heightPrevious;
private:
auto CovertKeyCode(unsigned int keycode) -> Event::KeyType;
static auto CheckEvent(Display*, XEvent*, XPointer userData) -> int;
public:
~WindowImplUnix() override;
auto Create(const std::string& title, int wsize, int hsize, uint32_t style) -> WinHandle override;
void Close() override;
void ProcessEvent() override;
auto GetDisplay() -> Display*;
void SetTitle(std::string_view title) override;
auto GetWidth() const->uint32_t override;
auto GetHeight() const->uint32_t override;
void StopTimer(uint32_t ms) override;
};
}