ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
Native.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <string>
11 #include <vector>
12 
13 #include "FileDialog.h"
14 
15 struct GLFWwindow;
16 
17 namespace cloudViewer {
18 namespace visualization {
19 namespace gui {
20 
21 void* GetNativeDrawable(GLFWwindow* glfw_window);
22 // Note that Windows cannot post an expose event so it must draw immediately.
23 // Therefore this function cannot be called while drawing.
24 void PostNativeExposeEvent(GLFWwindow* glfw_window);
25 void ShowNativeAlert(const char* message);
26 
27 #ifdef __APPLE__
28 void MacTransformIntoApp();
29 void SetNativeMenubar(void* menubar);
30 #endif // __APPLE_
31 
32 #if defined(__APPLE__) || defined(_WIN32)
33 void ShowNativeFileDialog(
34  FileDialog::Mode mode,
35  const std::string& path,
36  const std::vector<std::pair<std::string, std::string>>& filters,
37  std::function<void(const char*)> on_ok,
38  std::function<void()> on_cancel);
39 #endif // __APPLE__ || _WIN32
40 
41 } // namespace gui
42 } // namespace visualization
43 } // namespace cloudViewer
static const std::string path
Definition: PointCloud.cpp:59
void ShowNativeAlert(const char *message)
Definition: NativeLinux.cpp:55
void PostNativeExposeEvent(GLFWwindow *glfw_window)
Definition: NativeLinux.cpp:38
void * GetNativeDrawable(GLFWwindow *glfw_window)
Definition: NativeLinux.cpp:23
Generic file read and write utility for python interface.