MayaFlux 0.2.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 408 of file GlfwWindow.cpp.

409{
410 auto* win = static_cast<GlfwWindow*>(glfwGetWindowUserPointer(window));
411 if (!win)
412 return;
413
414 WindowEvent event;
416 event.timestamp = glfwGetTime();
417 event.data = WindowEvent::ScrollData {
418 .x_offset = xoffset,
419 .y_offset = yoffset
420 };
421
422 win->m_event_source.signal(event);
423
424 if (win->m_event_callback) {
425 win->m_event_callback(event);
426 }
427}
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: