Move windows to uptr. Add simple text editing.

This commit is contained in:
jmsgrogan 2020-06-20 16:34:10 +01:00
parent 2bcc7b3d83
commit b99708e7d3
55 changed files with 1257 additions and 994 deletions

View file

@ -23,62 +23,62 @@ class XcbInterface
private:
bool mUseOpenGl;
std::map<unsigned, WindowPtr> mWindows;
std::map<WindowPtr, unsigned> mHandles;
unsigned mDefaultWindow;
xcb_connection_t* mConnection;
xcb_screen_t* mScreen;
unsigned mGraphicsContext;
_XDisplay* mX11Display;
GlxInterfacePtr mGlxInterface;
bool mUseOpenGl;
std::map<unsigned, mt::Window*> mWindows;
std::map<mt::Window*, unsigned> mHandles;
unsigned mDefaultWindow;
xcb_connection_t* mConnection;
xcb_screen_t* mScreen;
unsigned mGraphicsContext;
_XDisplay* mX11Display;
GlxInterfacePtr mGlxInterface;
public:
XcbInterface();
XcbInterface();
~XcbInterface();
~XcbInterface();
void SetUseOpenGl(bool use);
void onPaint(std::shared_ptr<DesktopManager> desktopManager);
void SetUseOpenGl(bool use);
void onPaint(DesktopManager* desktopManager);
void Initialize();
void Initialize();
void InitializeOpenGl();
void InitializeOpenGl();
void CreateOpenGlDrawable(WindowPtr window);
void CreateOpenGlDrawable(mt::Window* window);
void Loop(std::shared_ptr<DesktopManager> desktopManager);
void Loop(DesktopManager* desktopManager);
void LoopOpenGl(std::shared_ptr<DesktopManager> desktopManager);
void LoopOpenGl(DesktopManager* desktopManager);
void ShutDown();
void ShutDown();
void AddWindow(WindowPtr window);
void AddWindow(mt::Window* window);
void ShowWindow(WindowPtr window);
void ShowWindow(mt::Window* window);
void PaintWindow(WindowPtr window);
void PaintWindow(mt::Window* window);
void ClearWindow(WindowPtr window);
void ClearWindow(mt::Window* window);
private:
void Connect();
void Connect();
void UpdateScreen();
void UpdateScreen();
uint32_t GetEventMask();
uint32_t GetEventMask();
void OnKeyPress(xcb_key_press_event_t* event, DesktopManagerPtr);
void OnKeyPress(xcb_key_press_event_t* event, DesktopManager*);
void OnKeyRelease(xcb_key_press_event_t* event, DesktopManagerPtr);
void OnKeyRelease(xcb_key_press_event_t* event, DesktopManager*);
void OnButtonPress(xcb_button_press_event_t* event, DesktopManagerPtr);
void OnButtonPress(xcb_button_press_event_t* event, DesktopManager*);
void MapWindow(WindowPtr window);
void MapWindow(mt::Window* window);
void CreateGraphicsContext();
void CreateGraphicsContext();
};