MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ glfw_scroll_callback()

void MayaFlux::Core::GlfwWindow::glfw_scroll_callback ( GLFWwindow *  window,
double  xoffset,
double  yoffset 
)
staticprivate

Definition at line 413 of file GlfwWindow.cpp.

414{
415 auto* win = static_cast<GlfwWindow*>(glfwGetWindowUserPointer(window));
416 if (!win)
417 return;
418
419 WindowEvent event;
421 event.timestamp = glfwGetTime();
422 event.data = WindowEvent::ScrollData {
423 .x_offset = xoffset,
424 .y_offset = yoffset
425 };
426
427 win->m_event_source.signal(event);
428
429 if (win->m_event_callback) {
430 win->m_event_callback(event);
431 }
432}
GlfwWindow(const WindowCreateInfo &create_info, const GraphicsSurfaceInfo &surface_info, GlobalGraphicsConfig::GraphicsApi api, GlfwPreInitConfig pre_init_config={})
Creates a window with the given configuration.

References MayaFlux::Core::MOUSE_SCROLLED, MayaFlux::Core::WindowEvent::type, and MayaFlux::Core::WindowEvent::ScrollData::x_offset.

Referenced by setup_callbacks().

+ Here is the caller graph for this function: