applying more refactor changes

dev
Claudius Holeksa 2023-02-26 19:37:34 +01:00
parent 80e8f7f0fd
commit e73e31e876
4 changed files with 9 additions and 9 deletions

View File

@ -38,7 +38,7 @@ void xcb_device::handle_events() {
auto find = windows.find(motion->event);
if (find != windows.end()) {
assert(find->second);
find->second->mouseMoveevent(motion->event_x, motion->event_y);
find->second->mouse_move_event(motion->event_x, motion->event_y);
}
} break;
case XCB_EXPOSE: {

View File

@ -12,7 +12,7 @@
namespace saw {
namespace {
glx_library_extensions glxLibraryExtensions(const char *extension_string) {
glx_library_extensions load_glx_library_extensions(const char *extension_string) {
std::string_view extensions_view{extension_string};
std::set<std::string_view> extensions;
while (1) {
@ -37,7 +37,7 @@ glx_library_extensions glxLibraryExtensions(const char *extension_string) {
}
return {extensions_view, glXCreateContextAttribsARB};
}
int translateRenderTypeSetting(GlSettings::RenderType cmp) {
int translate_render_type_setting(GlSettings::RenderType cmp) {
switch (cmp) {
case GlSettings::RenderType::RGBA:
return GLX_RGBA_BIT;
@ -45,7 +45,7 @@ int translateRenderTypeSetting(GlSettings::RenderType cmp) {
}
return 0;
}
int translateDrawableTypeSetting(GlSettings::DrawableType cmp) {
int translate_drawable_type_setting(GlSettings::DrawableType cmp) {
int i = 0;
if (static_cast<int32_t>(cmp) &
static_cast<int32_t>(GlSettings::DrawableType::windowBit)) {
@ -121,7 +121,7 @@ own<gl_context> creategl_context(io_provider &provider,
attributes.push_back(settings.renderable ? True : False);
attributes.push_back(GLX_RENDER_TYPE);
attributes.push_back(translateRenderTypeSetting(settings.render_type));
attributes.push_back(translate_render_type_setting(settings.render_type));
attributes.push_back(GLX_RED_SIZE);
attributes.push_back(settings.red_bits);
@ -145,7 +145,7 @@ own<gl_context> creategl_context(io_provider &provider,
attributes.push_back(settings.double_buffer ? True : False);
attributes.push_back(GLX_DRAWABLE_TYPE);
attributes.push_back(translateDrawableTypeSetting(settings.drawable_type));
attributes.push_back(translate_drawable_type_setting(settings.drawable_type));
attributes.push_back(GLX_X_VISUAL_TYPE);
attributes.push_back(GLX_TRUE_COLOR);
@ -154,7 +154,7 @@ own<gl_context> creategl_context(io_provider &provider,
int num_fb_configs = 0;
glx_library_extensions lib_ext = glxLibraryExtensions(
glx_library_extensions lib_ext = load_glx_library_extensions(
glXQueryExtensionsString(device->display, device->screen));
GLXFBConfig *fb_configs = glXChooseFBConfig(

View File

@ -76,7 +76,7 @@ void xcb_window::mouseevent(int16_t x, int16_t y, uint16_t state, bool pressed)
}
}
void xcb_window::mouseMoveevent(int16_t x, int16_t y) {
void xcb_window::mouse_move_event(int16_t x, int16_t y) {
if (x < 0 || y < 0) {
return;
}

View File

@ -40,7 +40,7 @@ public:
void resizeevent(size_t x, size_t y, size_t width, size_t height);
void mouseevent(int16_t x, int16_t y, uint16_t state, bool pressed);
void mouseMoveevent(int16_t x, int16_t y);
void mouse_move_event(int16_t x, int16_t y);
void keyboardevent(int16_t x, int16_t y, uint32_t keycode, bool pressed,
bool repeat);
};