Open3D (C++ API)  0.20.0
Loading...
Searching...
No Matches
Native.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------------
2// - Open3D: www.open3d.org -
3// ----------------------------------------------------------------------------
4// Copyright (c) 2018-2026 www.open3d.org
5// SPDX-License-Identifier: MIT
6// ----------------------------------------------------------------------------
7
8#pragma once
9
10#include <string>
11#include <vector>
12
13#include "FileDialog.h"
14
15struct GLFWwindow;
16
17namespace open3d {
18namespace visualization {
19namespace gui {
20
21void* GetNativeDrawable(GLFWwindow* glfw_window);
22// GLFW uses the generic Windows application icon unless the native window is
23// assigned the icon embedded in the executable.
24#ifdef _WIN32
25void SetNativeWindowIcon(GLFWwindow* glfw_window);
26#endif // _WIN32
27// Note that Windows cannot post an expose event so it must draw immediately.
28// Therefore this function cannot be called while drawing.
29void PostNativeExposeEvent(GLFWwindow* glfw_window);
30void ShowNativeAlert(const char* message);
31
32#ifdef __APPLE__
34void SetNativeMenubar(void* menubar);
35// Synchronize the CAMetalLayer's drawableSize and contentsScale with the
36// window's current backing-store pixel dimensions after the window resizes
37// or moves to a different display (Retina ↔ non-Retina). Must be called
38// before recreating the Filament swap chain so drawable and viewport agree.
39void ResizeNativeWindow(GLFWwindow* glfw_window);
40#endif // __APPLE_
41
42#if defined(__APPLE__) || defined(_WIN32)
45 const std::string& path,
46 const std::vector<std::pair<std::string, std::string>>& filters,
47 std::function<void(const char*)> on_ok,
48 std::function<void()> on_cancel);
49#endif // __APPLE__ || _WIN32
50
51} // namespace gui
52} // namespace visualization
53} // namespace open3d
Mode
Definition FileDialog.h:26
void SetNativeWindowIcon(GLFWwindow *glfw_window)
Definition NativeWin32.cpp:23
void SetNativeMenubar(void *menubar)
Definition NativeMacOS.mm:137
void PostNativeExposeEvent(GLFWwindow *glfw_window)
Definition NativeLinux.cpp:39
void ShowNativeAlert(const char *message)
Definition NativeLinux.cpp:56
void MacTransformIntoApp()
Definition NativeMacOS.mm:24
void * GetNativeDrawable(GLFWwindow *glfw_window)
Definition NativeLinux.cpp:22
void ShowNativeFileDialog(FileDialog::Mode type, const std::string &path, const std::vector< std::pair< std::string, std::string > > &filters, std::function< void(const char *)> on_ok, std::function< void()> on_cancel)
Definition NativeMacOS.mm:142
void ResizeNativeWindow(GLFWwindow *glfw_window)
Definition NativeMacOS.mm:82
Definition PinholeCameraIntrinsic.cpp:16