2013-06-22 15:16:45 +00:00
|
|
|
%module{Slic3r::XS};
|
|
|
|
%package{Slic3r::XS};
|
|
|
|
|
2015-12-07 23:39:54 +00:00
|
|
|
#include <xsinit.h>
|
2016-11-24 12:44:51 +00:00
|
|
|
#include "Utils.hpp"
|
2013-06-23 13:33:07 +00:00
|
|
|
|
|
|
|
%{
|
|
|
|
|
2013-06-22 15:16:45 +00:00
|
|
|
%}
|
2014-11-09 19:41:27 +00:00
|
|
|
|
|
|
|
%package{Slic3r};
|
|
|
|
%{
|
|
|
|
|
|
|
|
SV*
|
|
|
|
VERSION()
|
|
|
|
CODE:
|
|
|
|
RETVAL = newSVpv(SLIC3R_VERSION, 0);
|
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
2017-02-19 15:04:57 +00:00
|
|
|
SV*
|
|
|
|
BUILD()
|
|
|
|
CODE:
|
|
|
|
RETVAL = newSVpv(SLIC3R_BUILD, 0);
|
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
2016-10-21 08:18:01 +00:00
|
|
|
SV*
|
|
|
|
DEBUG_OUT_PATH_PREFIX()
|
|
|
|
CODE:
|
|
|
|
RETVAL = newSVpv(SLIC3R_DEBUG_OUT_PATH_PREFIX, 0);
|
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
2016-10-21 14:53:42 +00:00
|
|
|
SV*
|
|
|
|
FORK_NAME()
|
|
|
|
CODE:
|
2019-04-15 14:14:19 +00:00
|
|
|
RETVAL = newSVpv(SLIC3R_APP_NAME, 0);
|
2016-10-21 14:53:42 +00:00
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
2016-11-24 12:44:51 +00:00
|
|
|
void
|
|
|
|
set_logging_level(level)
|
|
|
|
unsigned int level;
|
|
|
|
CODE:
|
|
|
|
Slic3r::set_logging_level(level);
|
|
|
|
|
2017-03-03 11:53:05 +00:00
|
|
|
void
|
|
|
|
trace(level, message)
|
|
|
|
unsigned int level;
|
|
|
|
char *message;
|
|
|
|
CODE:
|
|
|
|
Slic3r::trace(level, message);
|
|
|
|
|
2018-08-09 19:15:49 +00:00
|
|
|
void
|
|
|
|
disable_multi_threading()
|
|
|
|
CODE:
|
|
|
|
Slic3r::disable_multi_threading();
|
|
|
|
|
2017-10-17 18:00:15 +00:00
|
|
|
void
|
|
|
|
set_var_dir(dir)
|
|
|
|
char *dir;
|
|
|
|
CODE:
|
|
|
|
Slic3r::set_var_dir(dir);
|
|
|
|
|
2018-02-12 07:57:32 +00:00
|
|
|
void
|
|
|
|
set_local_dir(dir)
|
|
|
|
char *dir;
|
|
|
|
CODE:
|
|
|
|
Slic3r::set_local_dir(dir);
|
|
|
|
|
2017-10-17 18:00:15 +00:00
|
|
|
char*
|
|
|
|
var_dir()
|
|
|
|
CODE:
|
|
|
|
RETVAL = const_cast<char*>(Slic3r::var_dir().c_str());
|
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
2017-12-10 12:19:44 +00:00
|
|
|
void
|
|
|
|
set_resources_dir(dir)
|
|
|
|
char *dir;
|
|
|
|
CODE:
|
|
|
|
Slic3r::set_resources_dir(dir);
|
|
|
|
|
|
|
|
char*
|
|
|
|
resources_dir()
|
|
|
|
CODE:
|
|
|
|
RETVAL = const_cast<char*>(Slic3r::resources_dir().c_str());
|
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
2017-10-17 18:00:15 +00:00
|
|
|
std::string
|
|
|
|
var(file_name)
|
|
|
|
const char *file_name;
|
|
|
|
CODE:
|
|
|
|
RETVAL = Slic3r::var(file_name);
|
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
2017-10-25 10:53:31 +00:00
|
|
|
void
|
|
|
|
set_data_dir(dir)
|
|
|
|
char *dir;
|
|
|
|
CODE:
|
|
|
|
Slic3r::set_data_dir(dir);
|
|
|
|
|
|
|
|
char*
|
|
|
|
data_dir()
|
|
|
|
CODE:
|
|
|
|
RETVAL = const_cast<char*>(Slic3r::data_dir().c_str());
|
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
2017-12-21 15:56:33 +00:00
|
|
|
local_encoded_string
|
2017-08-03 15:31:31 +00:00
|
|
|
encode_path(src)
|
|
|
|
const char *src;
|
|
|
|
CODE:
|
2017-08-30 12:57:13 +00:00
|
|
|
RETVAL = Slic3r::encode_path(src);
|
|
|
|
OUTPUT: RETVAL
|
2017-08-03 15:31:31 +00:00
|
|
|
|
|
|
|
std::string
|
|
|
|
decode_path(src)
|
|
|
|
const char *src;
|
|
|
|
CODE:
|
2017-08-30 12:57:13 +00:00
|
|
|
RETVAL = Slic3r::decode_path(src);
|
|
|
|
OUTPUT: RETVAL
|
2017-08-03 15:31:31 +00:00
|
|
|
|
|
|
|
std::string
|
|
|
|
normalize_utf8_nfc(src)
|
|
|
|
const char *src;
|
|
|
|
CODE:
|
2017-08-30 12:57:13 +00:00
|
|
|
RETVAL = Slic3r::normalize_utf8_nfc(src);
|
|
|
|
OUTPUT: RETVAL
|
2017-08-03 15:31:31 +00:00
|
|
|
|
2017-12-21 15:56:33 +00:00
|
|
|
std::string
|
|
|
|
path_to_filename(src)
|
|
|
|
const char *src;
|
|
|
|
CODE:
|
|
|
|
RETVAL = Slic3r::PerlUtils::path_to_filename(src);
|
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
2017-12-21 19:11:19 +00:00
|
|
|
local_encoded_string
|
|
|
|
path_to_filename_raw(src)
|
|
|
|
const char *src;
|
|
|
|
CODE:
|
|
|
|
RETVAL = Slic3r::PerlUtils::path_to_filename(src);
|
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
2017-12-21 15:56:33 +00:00
|
|
|
std::string
|
|
|
|
path_to_stem(src)
|
|
|
|
const char *src;
|
|
|
|
CODE:
|
|
|
|
RETVAL = Slic3r::PerlUtils::path_to_stem(src);
|
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
|
|
|
std::string
|
|
|
|
path_to_extension(src)
|
|
|
|
const char *src;
|
|
|
|
CODE:
|
|
|
|
RETVAL = Slic3r::PerlUtils::path_to_extension(src);
|
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
|
|
|
std::string
|
|
|
|
path_to_parent_path(src)
|
|
|
|
const char *src;
|
|
|
|
CODE:
|
|
|
|
RETVAL = Slic3r::PerlUtils::path_to_parent_path(src);
|
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
2016-11-06 16:42:36 +00:00
|
|
|
void
|
|
|
|
xspp_test_croak_hangs_on_strawberry()
|
|
|
|
CODE:
|
|
|
|
try {
|
|
|
|
throw 1;
|
|
|
|
} catch (...) {
|
|
|
|
croak("xspp_test_croak_hangs_on_strawberry: exception catched\n");
|
|
|
|
}
|
2014-11-09 19:41:27 +00:00
|
|
|
%}
|