summaryrefslogtreecommitdiff
path: root/src/window/xcb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/window/xcb.cpp')
-rw-r--r--src/window/xcb.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/window/xcb.cpp b/src/window/xcb.cpp
index 9a33bb8..c762945 100644
--- a/src/window/xcb.cpp
+++ b/src/window/xcb.cpp
@@ -9,6 +9,7 @@
#include "device.h"
namespace saw {
+class xcb_window;
class xcb_device final : public device {
public:
::Display *display;
@@ -121,7 +122,7 @@ void xcb_device::handle_events() {
auto find = windows.find(expose->window);
if (find != windows.end()) {
assert(find->second);
- find->second->resizeevent(static_cast<size_t>(expose->x),
+ find->second->resize_event(static_cast<size_t>(expose->x),
static_cast<size_t>(expose->y),
static_cast<size_t>(expose->width),
static_cast<size_t>(expose->height));
@@ -133,7 +134,7 @@ void xcb_device::handle_events() {
auto find = windows.find(button->event);
if (find != windows.end()) {
assert(find->second);
- find->second->mouseevent(button->event_x, button->event_y,
+ find->second->mouse_event(button->event_x, button->event_y,
button->detail, false);
}
} break;
@@ -143,7 +144,7 @@ void xcb_device::handle_events() {
auto find = windows.find(button->event);
if (find != windows.end()) {
assert(find->second);
- find->second->mouseevent(button->event_x, button->event_y,
+ find->second->mouse_event(button->event_x, button->event_y,
button->detail, true);
}
} break;
@@ -177,7 +178,7 @@ void xcb_device::handle_events() {
auto find = windows.find(key->event);
if (find != windows.end()) {
assert(find->second);
- find->second->keyboardevent(key->event_x, key->event_y,
+ find->second->keyboard_event(key->event_x, key->event_y,
key->detail, repeat, repeat);
}
} break;
@@ -187,7 +188,7 @@ void xcb_device::handle_events() {
auto find = windows.find(key->event);
if (find != windows.end()) {
assert(find->second);
- find->second->keyboardevent(key->event_x, key->event_y,
+ find->second->keyboard_event(key->event_x, key->event_y,
key->detail, true, false);
}
} break;
@@ -314,7 +315,7 @@ void xcb_window::hide() {
xcb_unmap_window(device_.xcb_connection, xcb_window_);
}
-const video_mode &xcb_window::videoMode() const { return video_mode_; }
+const video_mode &xcb_window::get_video_mode() const { return video_mode_; }
const std::string_view xcb_window::title() const { return window_title_; }
@@ -329,13 +330,13 @@ void xcb_window::resize(size_t width, size_t height) {
video_mode_.height = height;
}
-conveyor<window::variant_event> xcb_window::onevent() {
+conveyor<window::variant_event> xcb_window::on_event() {
auto caf = new_conveyor_and_feeder<window::variant_event>();
event_feeder = std::move(caf.feeder);
return std::move(caf.conveyor);
}
-void xcb_window::resizeevent(size_t x, size_t y, size_t width, size_t height) {
+void xcb_window::resize_event(size_t x, size_t y, size_t width, size_t height) {
(void)x;
(void)y;
/// @todo maybe include x and y?
@@ -348,7 +349,7 @@ void xcb_window::resizeevent(size_t x, size_t y, size_t width, size_t height) {
}
}
-void xcb_window::mouseevent(int16_t x, int16_t y, uint16_t state,
+void xcb_window::mouse_event(int16_t x, int16_t y, uint16_t state,
bool pressed) {
if (x < 0 || y < 0) {
return;
@@ -379,7 +380,7 @@ void xcb_window::mouse_move_event(int16_t x, int16_t y) {
}
}
-void xcb_window::keyboardevent(int16_t x, int16_t y, uint32_t keycode,
+void xcb_window::keyboard_event(int16_t x, int16_t y, uint32_t keycode,
bool pressed, bool repeat) {
if (x < 0 || y < 0) {
return;