Add WindowDriver::beep function
This commit is contained in:
@@ -20,6 +20,7 @@ namespace Nova {
|
|||||||
virtual ~WindowDriver() = default;
|
virtual ~WindowDriver() = default;
|
||||||
|
|
||||||
virtual void poll_events() = 0;
|
virtual void poll_events() = 0;
|
||||||
|
virtual void beep() = 0;
|
||||||
|
|
||||||
virtual WindowID create_window(std::string_view title = "Nova", u32 width = 800, u32 height = 600) = 0;
|
virtual WindowID create_window(std::string_view title = "Nova", u32 width = 800, u32 height = 600) = 0;
|
||||||
virtual void destroy_window(WindowID window) = 0;
|
virtual void destroy_window(WindowID window) = 0;
|
||||||
|
|||||||
@@ -65,6 +65,10 @@ void X11WindowDriver::poll_events() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void X11WindowDriver::beep(){
|
||||||
|
XBell(m_display, 100);
|
||||||
|
}
|
||||||
|
|
||||||
WindowID X11WindowDriver::create_window(std::string_view title, u32 width, u32 height) {
|
WindowID X11WindowDriver::create_window(std::string_view title, u32 width, u32 height) {
|
||||||
NOVA_AUTO_TRACE();
|
NOVA_AUTO_TRACE();
|
||||||
|
|
||||||
@@ -109,7 +113,7 @@ void X11WindowDriver::set_window_position(WindowID id, i32 x, i32 y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u32 X11WindowDriver::get_window_count() const {
|
u32 X11WindowDriver::get_window_count() const {
|
||||||
return m_windows.size();
|
return static_cast<u32>(m_windows.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* X11WindowDriver::get_surface_extension() const {
|
const char* X11WindowDriver::get_surface_extension() const {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ namespace Nova {
|
|||||||
~X11WindowDriver() override;
|
~X11WindowDriver() override;
|
||||||
|
|
||||||
void poll_events() override;
|
void poll_events() override;
|
||||||
|
void beep() override;
|
||||||
|
|
||||||
WindowID create_window(std::string_view title, u32 width, u32 height) override;
|
WindowID create_window(std::string_view title, u32 width, u32 height) override;
|
||||||
void destroy_window(WindowID window) override;
|
void destroy_window(WindowID window) override;
|
||||||
|
|||||||
Reference in New Issue
Block a user