2006-10-15 14:02:05 -05:00
|
|
|
%module sw_core_utils
|
|
|
|
%{
|
|
|
|
#include <gnc-glib-utils.h>
|
2013-05-03 07:03:00 -05:00
|
|
|
#include <gnc-core-prefs.h>
|
2010-08-29 14:02:57 -05:00
|
|
|
#include <gnc-path.h>
|
2010-09-08 02:14:05 -05:00
|
|
|
#include <gnc-filepath-utils.h>
|
2011-01-30 22:29:48 -06:00
|
|
|
#include <gnc-locale-utils.h>
|
2006-10-15 14:02:05 -05:00
|
|
|
#include <glib.h>
|
2011-11-20 12:27:00 -06:00
|
|
|
%}
|
|
|
|
#if defined(SWIGGUILE)
|
|
|
|
%{
|
2012-01-23 13:33:31 -06:00
|
|
|
#include <guile-mappings.h>
|
2006-10-15 14:02:05 -05:00
|
|
|
SCM scm_init_sw_core_utils_module (void);
|
|
|
|
%}
|
2011-11-20 12:27:00 -06:00
|
|
|
#endif
|
|
|
|
#if defined(SWIGPYTHON)
|
|
|
|
%{
|
|
|
|
#if PY_VERSION_HEX >= 0x03000000
|
|
|
|
PyObject*
|
|
|
|
#else
|
|
|
|
void
|
|
|
|
#endif
|
|
|
|
SWIG_init (void);
|
|
|
|
%}
|
|
|
|
#endif
|
2006-10-15 22:35:56 -05:00
|
|
|
%import "base-typemaps.i"
|
2006-10-15 14:02:05 -05:00
|
|
|
|
2013-05-03 07:03:38 -05:00
|
|
|
%include <gnc-core-prefs.h>
|
2006-10-15 14:02:05 -05:00
|
|
|
|
2010-12-30 09:51:32 -06:00
|
|
|
%newobject gnc_path_get_bindir;
|
2010-10-13 11:11:44 -05:00
|
|
|
gchar * gnc_path_get_bindir(void);
|
2010-12-30 09:51:32 -06:00
|
|
|
|
|
|
|
%newobject gnc_path_get_stdreportsdir;
|
2010-08-29 14:02:57 -05:00
|
|
|
gchar * gnc_path_get_stdreportsdir(void);
|
2010-12-30 09:51:32 -06:00
|
|
|
|
2012-12-12 11:42:33 -06:00
|
|
|
%newobject gnc_path_find_localized_html_file;
|
|
|
|
gchar * gnc_path_find_localized_html_file(const gchar *);
|
|
|
|
|
2012-12-18 04:25:49 -06:00
|
|
|
%newobject gnc_build_dotgnucash_path;
|
2010-09-08 02:14:05 -05:00
|
|
|
gchar * gnc_build_dotgnucash_path(const gchar *);
|
2012-12-18 04:25:49 -06:00
|
|
|
|
2010-09-08 02:14:05 -05:00
|
|
|
gchar * gnc_build_report_path(const gchar *);
|
|
|
|
gchar * gnc_build_stdreports_path(const gchar *);
|
2010-08-29 14:02:57 -05:00
|
|
|
|
2007-02-19 17:45:15 -06:00
|
|
|
void gnc_scm_log_warn(const gchar *);
|
|
|
|
void gnc_scm_log_error(const gchar *);
|
|
|
|
void gnc_scm_log_msg(const gchar *);
|
|
|
|
void gnc_scm_log_debug(const gchar *);
|
|
|
|
|
2007-05-29 11:24:38 -05:00
|
|
|
%newobject gnc_utf8_strip_invalid_strdup;
|
|
|
|
gchar * gnc_utf8_strip_invalid_strdup(const gchar *);
|
2010-12-30 09:51:32 -06:00
|
|
|
|
2008-04-01 17:07:28 -05:00
|
|
|
%newobject gnc_locale_from_utf8;
|
|
|
|
gchar * gnc_locale_from_utf8(const gchar *);
|
2010-12-30 09:51:32 -06:00
|
|
|
|
2008-04-02 13:10:35 -05:00
|
|
|
%newobject gnc_locale_to_utf8;
|
|
|
|
gchar * gnc_locale_to_utf8(const gchar *);
|
2010-12-30 09:51:32 -06:00
|
|
|
|
2011-01-30 22:29:48 -06:00
|
|
|
const char * gnc_locale_default_iso_currency_code (void);
|
|
|
|
|
2011-11-20 12:27:00 -06:00
|
|
|
#if defined(SWIGGUILE)
|
2008-04-02 13:10:35 -05:00
|
|
|
%rename ("gnc-utf8?") wrap_gnc_utf8_validate;
|
|
|
|
%inline %{
|
|
|
|
/* This helper function wraps gnc_utf8_validate() into a predicate. */
|
|
|
|
gboolean wrap_gnc_utf8_validate(const gchar *);
|
|
|
|
gboolean wrap_gnc_utf8_validate(const gchar * str)
|
|
|
|
{
|
|
|
|
return gnc_utf8_validate(str, -1, 0);
|
|
|
|
}
|
|
|
|
%}
|
2011-11-20 12:27:00 -06:00
|
|
|
#elsif defined(SWIGPYTHON)
|
|
|
|
gboolean gnc_utf8_validate(const gchar *, gssize, const gchar**);
|
|
|
|
#endif
|