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

189{
190 if (!m_window)
191 return nullptr;
192
193#ifdef MAYAFLUX_PLATFORM_WINDOWS
194 return glfwGetWin32Window(m_window);
195#elif MAYAFLUX_PLATFORM_LINUX
196#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
197 if (glfwGetPlatform() == GLFW_PLATFORM_WAYLAND) {
198 return glfwGetWaylandWindow(m_window);
199 }
200#endif
201#if defined(GLFW_EXPOSE_NATIVE_X11)
202 if (glfwGetPlatform() == GLFW_PLATFORM_X11) {
203 return reinterpret_cast<void*>(glfwGetX11Window(m_window));
204 }
205#endif
206 return nullptr;
207#elif MAYAFLUX_PLATFORM_MACOS
208 return glfwGetCocoaWindow(m_window);
209#else
210 return m_window;
211#endif
212}

References m_window.