PrusaSlicer-NonPlainar/xs/xsp/GUI_Preview.xsp
2018-09-18 13:35:05 +02:00

28 lines
1.0 KiB
Plaintext

%module{Slic3r::XS};
%{
#include <xsinit.h>
#include "slic3r/GUI/GUI_PreviewIface.hpp"
%}
%name{Slic3r::GUI::Preview} class PreviewIface {
void register_on_viewport_changed_callback(SV* callback)
%code%{ THIS->register_on_viewport_changed_callback((void*)callback); %};
void set_number_extruders(unsigned int number_extruders);
void reset_gcode_preview_data();
void reload_print(bool force = false);
void set_canvas_as_dirty();
void set_enabled(bool enabled);
void set_bed_shape(Pointfs shape);
void select_view(std::string direction);
void set_viewport_from_scene(SV *ui)
%code%{ THIS->set_viewport_from_scene((wxGLCanvas*)wxPli_sv_2_object(aTHX_ ui, "Wx::GLCanvas")); %};
void set_viewport_into_scene(SV *ui)
%code%{ THIS->set_viewport_into_scene((wxGLCanvas*)wxPli_sv_2_object(aTHX_ ui, "Wx::GLCanvas")); %};
void SetDropTarget(SV *ui)
%code%{ THIS->set_drop_target((wxDropTarget*)wxPli_sv_2_object(aTHX_ ui, "Wx::DropTarget")); %};
};