8 #include <GLFW/glfw3.h>
12 #define GLFW_EXPOSE_NATIVE_X11 1
13 #ifdef CLOUDVIEWER_GLFW_HAS_WAYLAND
14 #define GLFW_EXPOSE_NATIVE_WAYLAND 1
16 #include <GLFW/glfw3native.h>
20 namespace visualization {
24 const int platform = glfwGetPlatform();
25 if (platform == GLFW_PLATFORM_X11) {
26 return (
void*)glfwGetX11Window(glfw_window);
28 #ifdef CLOUDVIEWER_GLFW_HAS_WAYLAND
29 else if (platform == GLFW_PLATFORM_WAYLAND) {
30 return (
void*)glfwGetWaylandWindow(glfw_window);
39 const int platform = glfwGetPlatform();
41 if (platform == GLFW_PLATFORM_X11) {
42 Display* d = glfwGetX11Display();
43 auto x11win = glfwGetX11Window(glfw_window);
46 memset(&e, 0,
sizeof(e));
48 e.xexpose.window = x11win;
50 XSendEvent(d, x11win, False, ExposureMask, &e);
static Application & GetInstance()
void ShowMessageBox(const char *title, const char *message)
void ShowNativeAlert(const char *message)
void PostNativeExposeEvent(GLFWwindow *glfw_window)
void * GetNativeDrawable(GLFWwindow *glfw_window)
Generic file read and write utility for python interface.