-
I have been trying to get a handle of the current window because i want to draw from a Dinamic or Shared Library in Linux with Raylib so far i have done this but it doesnt recognize IntPtr
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 17 replies
-
are you using C# ? |
Beta Was this translation helpful? Give feedback.
-
About the window handle, are you on Windows? In what platform are you trying to get it? // Get native window handle
void *GetWindowHandle(void)
{
#if defined(PLATFORM_DESKTOP) && defined(_WIN32)
// NOTE: Returned handle is: void *HWND (windows.h)
return glfwGetWin32Window(CORE.Window.handle);
#endif
#if defined(PLATFORM_DESKTOP) && defined(__linux__)
// NOTE: Returned handle is: unsigned long Window (X.h)
// typedef unsigned long XID;
// typedef XID Window;
//unsigned long id = (unsigned long)glfwGetX11Window(CORE.Window.handle);
//return NULL; // TODO: Find a way to return value... cast to void *?
return (void *)CORE.Window.handle;
#endif
#if defined(__APPLE__)
// NOTE: Returned handle is: (objc_object *)
return (void *)glfwGetCocoaWindow(CORE.Window.handle);
#endif
return NULL;
} On Linux platforms, the returned window handle is probably not the expected one. |
Beta Was this translation helpful? Give feedback.
-
Linux its complex, but it should be considered in development |
Beta Was this translation helpful? Give feedback.
Linux its complex, but it should be considered in development