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

◆ glfw_cursor_pos_callback()

void MayaFlux::Core::GlfwWindow::glfw_cursor_pos_callback ( GLFWwindow *  window,
double  xpos,
double  ypos 
)
staticprivate

Definition at line 368 of file GlfwWindow.cpp.

369{
370 auto* win = static_cast<GlfwWindow*>(glfwGetWindowUserPointer(window));
371 if (!win)
372 return;
373
374 WindowEvent event;
376 event.timestamp = glfwGetTime();
377
378 event.data = WindowEvent::MousePosData {
379 .x = xpos,
380 .y = ypos
381 };
382
383 win->m_event_source.signal(event);
384
385 if (win->m_event_callback) {
386 win->m_event_callback(event);
387 }
388}
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_MOTION, MayaFlux::Core::WindowEvent::type, and MayaFlux::Core::WindowEvent::MousePosData::x.

Referenced by setup_callbacks().

+ Here is the caller graph for this function: