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

◆ glfw_window_focus_callback()

void MayaFlux::Core::GlfwWindow::glfw_window_focus_callback ( GLFWwindow *  window,
int  focused 
)
staticprivate

Definition at line 290 of file GlfwWindow.cpp.

291{
292 auto* win = static_cast<GlfwWindow*>(glfwGetWindowUserPointer(window));
293 if (!win)
294 return;
295
296 win->m_state.is_focused = (focused == GLFW_TRUE);
297
298 WindowEvent event;
299 event.type = focused ? WindowEventType::WINDOW_FOCUS_GAINED
301 event.timestamp = glfwGetTime();
302
303 win->m_event_source.signal(event);
304
305 if (win->m_event_callback) {
306 win->m_event_callback(event);
307 }
308}
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::WindowState::is_focused, m_state, MayaFlux::Core::WindowEvent::type, MayaFlux::Core::WINDOW_FOCUS_GAINED, and MayaFlux::Core::WINDOW_FOCUS_LOST.

Referenced by setup_callbacks().

+ Here is the caller graph for this function: