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

◆ get_native_handle()

void * MayaFlux::Core::GlfwWindow::get_native_handle ( ) const
overridevirtual

Get native window handle (platform-specific)

Returns
Pointer to the native window handle

Implements MayaFlux::Core::Window.

Definition at line 178 of file GlfwWindow.cpp.

179{
180 if (!m_window)
181 return nullptr;
182
183#ifdef MAYAFLUX_PLATFORM_WINDOWS
184 return glfwGetWin32Window(m_window);
185#elif MAYAFLUX_PLATFORM_LINUX
186#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
187 if (glfwGetPlatform() == GLFW_PLATFORM_WAYLAND) {
188 return glfwGetWaylandWindow(m_window);
189 }
190#endif
191#if defined(GLFW_EXPOSE_NATIVE_X11)
192 if (glfwGetPlatform() == GLFW_PLATFORM_X11) {
193 return reinterpret_cast<void*>(glfwGetX11Window(m_window));
194 }
195#endif
196 return nullptr;
197#elif MAYAFLUX_PLATFORM_MACOS
198 return glfwGetCocoaWindow(m_window);
199#else
200 return m_window;
201#endif
202}

References m_window.