first changes
parent
2281b46406
commit
a48919b95d
|
@ -12,7 +12,7 @@
|
|||
#include "window_xcb.h"
|
||||
|
||||
namespace saw {
|
||||
class XcbDevice final : public Device {
|
||||
class xcb_device final : public device {
|
||||
public:
|
||||
::Display *display;
|
||||
int screen;
|
||||
|
@ -20,28 +20,28 @@ public:
|
|||
xcb_connection_t *xcb_connection;
|
||||
xcb_screen_t *xcb_screen;
|
||||
|
||||
Own<InputStream> async_notifier;
|
||||
SinkConveyor async_conveyor;
|
||||
own<input_stream> async_notifier;
|
||||
sink_conveyor async_conveyor;
|
||||
|
||||
std::map<xcb_window_t, XcbWindow *> windows;
|
||||
std::map<xcb_window_t, xcb_window *> windows;
|
||||
|
||||
std::vector<xcb_generic_event_t *> pending_events;
|
||||
|
||||
public:
|
||||
XcbDevice(::Display *display, int screen, xcb_connection_t *xcb_connection,
|
||||
xcb_screen_t *xcb_screen, Own<InputStream> &&an);
|
||||
~XcbDevice();
|
||||
xcb_device(::Display *display, int screen, xcb_connection_t *xcb_connection,
|
||||
xcb_screen_t *xcb_screen, own<input_stream> &&an);
|
||||
~xcb_device();
|
||||
|
||||
void windowDestroyed(xcb_window_t window_id);
|
||||
void handleEvents();
|
||||
void window_destroyed(xcb_window_t window_id);
|
||||
void handle_events();
|
||||
|
||||
Own<XcbWindow> createXcbWindow(const VideoMode &mode,
|
||||
own<xcb_window> create_xcb_window(const video_mode &mode,
|
||||
std::string_view title_view, int visual_id);
|
||||
Own<Window> createWindow(const VideoMode &video_mode,
|
||||
own<window> create_window(const video_mode &video_mode,
|
||||
std::string_view title_view) override;
|
||||
|
||||
void flush() override;
|
||||
};
|
||||
|
||||
Own<XcbDevice> createXcbDevice(IoProvider &provider);
|
||||
own<xcb_device> create_xcb_device(io_provider &provider);
|
||||
} // namespace saw
|
||||
|
|
|
@ -9,15 +9,15 @@
|
|||
#include "window.h"
|
||||
|
||||
namespace saw {
|
||||
class Device {
|
||||
class device {
|
||||
public:
|
||||
virtual ~Device() = default;
|
||||
virtual ~device() = default;
|
||||
|
||||
virtual Own<Window> createWindow(const VideoMode &mode,
|
||||
virtual own<window> create_window(const video_mode &mode,
|
||||
std::string_view title_view) = 0;
|
||||
virtual void flush() = 0;
|
||||
};
|
||||
|
||||
class IoProvider;
|
||||
Own<Device> createDevice(IoProvider &provider);
|
||||
class io_provider;
|
||||
own<device> create_device(io_provider &provider);
|
||||
} // namespace saw
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <cstddef>
|
||||
|
||||
namespace saw {
|
||||
class VideoMode {
|
||||
class video_mode {
|
||||
public:
|
||||
size_t width = 128;
|
||||
size_t height = 128;
|
||||
|
|
Loading…
Reference in New Issue