Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'xs/src/libslic3r/Utils.hpp')
-rw-r--r--xs/src/libslic3r/Utils.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/xs/src/libslic3r/Utils.hpp b/xs/src/libslic3r/Utils.hpp
index 0066aa5e6..e5157741e 100644
--- a/xs/src/libslic3r/Utils.hpp
+++ b/xs/src/libslic3r/Utils.hpp
@@ -84,6 +84,21 @@ inline T next_highest_power_of_2(T v)
return ++ v;
}
+class PerlCallback {
+public:
+ PerlCallback(void *sv) : m_callback(nullptr) { this->register_callback(sv); }
+ PerlCallback() : m_callback(nullptr) {}
+ ~PerlCallback() { this->deregister_callback(); }
+ void register_callback(void *sv);
+ void deregister_callback();
+ void call();
+ void call(int i);
+ void call(int i, int j);
+// void call(const std::vector<int> &ints);
+private:
+ void *m_callback;
+};
+
} // namespace Slic3r
#endif // slic3r_Utils_hpp_