Add XKB interface for x11

This commit is contained in:
James Grogan 2022-11-17 11:28:18 +00:00
parent 7ad237edc1
commit cf9bace272
15 changed files with 232 additions and 31 deletions

View file

@ -1,7 +1,6 @@
#include "Keyboard.h"
Keyboard::Keyboard()
:mKeyMap()
{
}

View file

@ -7,9 +7,7 @@ class Keyboard
{
public:
using KeyCode = unsigned;
protected:
std::map<KeyCode, std::string> mKeyMap;
using KeyState = unsigned;
public:
Keyboard();
@ -18,7 +16,7 @@ public:
static std::unique_ptr<Keyboard> Create();
virtual std::string GetKeyString(KeyCode code)
virtual std::string getKeyString(KeyCode code)
{
return "";
}

View file

@ -5,6 +5,7 @@
#include <memory>
#include <vector>
#include <cstdint>
#include <string>
class PaintEvent;
class MouseEvent;
@ -61,8 +62,19 @@ public:
bool isDirty() const;
void setTitle(const std::string& title)
{
mTitle = title;
}
const std::string& getTitle() const
{
return mTitle;
}
private:
WidgetPtr mWidget {nullptr};
std::string mTitle;
IPlatformWindowPtr mPlatformWindow {nullptr};
std::unique_ptr<DrawingContext> mDrawingContext;
};