stuff-from-scratch/src/windows/ui_interfaces/x11/XcbWindowInterface.h
2021-04-17 13:57:14 +01:00

30 lines
724 B
C++

#pragma once
#include <memory>
namespace mt
{
class Window;
class Screen;
}
struct xcb_connection_t;
struct xcb_screen_t;
class XcbWindowInterface
{
public:
static std::unique_ptr<XcbWindowInterface> Create();
void Add(mt::Window* window, xcb_connection_t* connection, mt::Screen* screen, uint32_t eventMask) const;
void Show(mt::Window* window, xcb_connection_t* connection) const;
void Paint(mt::Window* window, xcb_connection_t* connection, xcb_screen_t* screen, unsigned gc) const;
void Clear(mt::Window* window, xcb_connection_t* connection) const;
void Map(mt::Window* window, xcb_connection_t* connection) const;
};
using XcbWindowInterfacePtr = std::unique_ptr<XcbWindowInterface>;