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

354{
355 auto* win = static_cast<GlfwWindow*>(glfwGetWindowUserPointer(window));
356 if (!win)
357 return;
358
359 WindowEvent event;
361 event.timestamp = glfwGetTime();
362
363 event.data = WindowEvent::MousePosData {
364 .x = xpos,
365 .y = ypos
366 };
367
368 win->m_event_source.signal(event);
369
370 if (win->m_event_callback) {
371 win->m_event_callback(event);
372 }
373}
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: