Blender V5.3
GHOST_SystemDBusUnix.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2026 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#ifdef WITH_GHOST_DBUS
12
13# include <cstdint>
14# include <functional>
15# include <memory>
16# include <string>
17# include <thread>
18# include <variant>
19
23using GHOST_DBusValue = std::variant<bool, int32_t, uint32_t, double, std::string>;
24
39class GHOST_SystemDBusUnix {
40 public:
42 struct Data;
43
44 private:
45 std::shared_ptr<Data> data_;
46 std::thread thread_;
47
48 public:
49 using SettingChangedFn = std::function<void(const GHOST_DBusValue &value)>;
50
51 GHOST_SystemDBusUnix();
52 ~GHOST_SystemDBusUnix();
53
54 GHOST_SystemDBusUnix(const GHOST_SystemDBusUnix &) = delete;
55 GHOST_SystemDBusUnix &operator=(const GHOST_SystemDBusUnix &) = delete;
56
64 void setting_add(const char *name_space, const char *key, SettingChangedFn on_change);
65
74 bool start();
75
89 bool wait_initial(int timeout_ms);
90};
91
92#endif /* WITH_GHOST_DBUS */
btGeneric6DofConstraint & operator=(btGeneric6DofConstraint &other)