MayaFlux 0.1.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 398 of file GlfwWindow.cpp.

399{
400 auto* win = static_cast<GlfwWindow*>(glfwGetWindowUserPointer(window));
401 if (!win)
402 return;
403
404 WindowEvent event;
406 event.timestamp = glfwGetTime();
407 event.data = WindowEvent::ScrollData {
408 .x_offset = xoffset,
409 .y_offset = yoffset
410 };
411
412 win->m_event_source.signal(event);
413
414 if (win->m_event_callback) {
415 win->m_event_callback(event);
416 }
417}
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: