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

364{
365 auto* win = static_cast<GlfwWindow*>(glfwGetWindowUserPointer(window));
366 if (!win)
367 return;
368
369 WindowEvent event;
371 event.timestamp = glfwGetTime();
372
373 event.data = WindowEvent::MousePosData {
374 .x = xpos,
375 .y = ypos
376 };
377
378 win->m_event_source.signal(event);
379
380 if (win->m_event_callback) {
381 win->m_event_callback(event);
382 }
383}
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: