2015-09-29 12:08:48 -07:00
|
|
|
/********************************************************************\
|
|
|
|
|
* This program is free software; you can redistribute it and/or *
|
|
|
|
|
* modify it under the terms of the GNU General Public License as *
|
|
|
|
|
* published by the Free Software Foundation; either version 2 of *
|
|
|
|
|
* the License, or (at your option) any later version. *
|
|
|
|
|
* *
|
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
|
* *
|
|
|
|
|
* You should have received a copy of the GNU General Public License*
|
|
|
|
|
* along with this program; if not, contact: *
|
|
|
|
|
* *
|
|
|
|
|
* Free Software Foundation Voice: +1-617-542-5942 *
|
|
|
|
|
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
|
|
|
|
|
* Boston, MA 02110-1301, USA gnu@gnu.org *
|
|
|
|
|
* *
|
|
|
|
|
\********************************************************************/
|
|
|
|
|
|
2006-10-15 19:02:05 +00:00
|
|
|
%module sw_core_utils
|
|
|
|
|
%{
|
2013-12-08 18:02:25 +00:00
|
|
|
#include <config.h>
|
2013-12-11 14:45:40 +00:00
|
|
|
#include <gnc-environment.h>
|
2006-10-15 19:02:05 +00:00
|
|
|
#include <gnc-glib-utils.h>
|
2013-10-07 14:06:23 +00:00
|
|
|
#include <gnc-prefs.h>
|
2010-08-29 19:02:57 +00:00
|
|
|
#include <gnc-path.h>
|
2010-09-08 07:14:05 +00:00
|
|
|
#include <gnc-filepath-utils.h>
|
2011-01-31 04:29:48 +00:00
|
|
|
#include <gnc-locale-utils.h>
|
2006-10-15 19:02:05 +00:00
|
|
|
#include <glib.h>
|
2019-02-21 17:00:15 +01:00
|
|
|
#include <gnc-version.h>
|
2011-11-20 18:27:00 +00:00
|
|
|
%}
|
|
|
|
|
#if defined(SWIGGUILE)
|
|
|
|
|
%{
|
2013-12-14 16:40:42 +00:00
|
|
|
#include "guile-mappings.h"
|
|
|
|
|
|
2006-10-15 19:02:05 +00:00
|
|
|
SCM scm_init_sw_core_utils_module (void);
|
|
|
|
|
%}
|
2011-11-20 18:27:00 +00:00
|
|
|
#endif
|
|
|
|
|
#if defined(SWIGPYTHON)
|
|
|
|
|
%{
|
|
|
|
|
#if PY_VERSION_HEX >= 0x03000000
|
|
|
|
|
PyObject*
|
|
|
|
|
#else
|
|
|
|
|
void
|
|
|
|
|
#endif
|
|
|
|
|
SWIG_init (void);
|
|
|
|
|
%}
|
|
|
|
|
#endif
|
2006-10-16 03:35:56 +00:00
|
|
|
%import "base-typemaps.i"
|
2006-10-15 19:02:05 +00:00
|
|
|
|
2013-12-11 14:45:40 +00:00
|
|
|
%include <gnc-environment.h>
|
2013-10-07 14:06:23 +00:00
|
|
|
%include <gnc-prefs.h>
|
2019-02-21 17:00:15 +01:00
|
|
|
%include <gnc-version.h>
|
2006-10-15 19:02:05 +00:00
|
|
|
|
2010-12-30 15:51:32 +00:00
|
|
|
%newobject gnc_path_get_bindir;
|
2010-10-13 16:11:44 +00:00
|
|
|
gchar * gnc_path_get_bindir(void);
|
2010-12-30 15:51:32 +00:00
|
|
|
|
|
|
|
|
%newobject gnc_path_get_stdreportsdir;
|
2010-08-29 19:02:57 +00:00
|
|
|
gchar * gnc_path_get_stdreportsdir(void);
|
2010-12-30 15:51:32 +00:00
|
|
|
|
2012-12-12 17:42:33 +00:00
|
|
|
%newobject gnc_path_find_localized_html_file;
|
|
|
|
|
gchar * gnc_path_find_localized_html_file(const gchar *);
|
|
|
|
|
|
2017-08-22 16:33:34 +02:00
|
|
|
%newobject gnc_build_userdata_path;
|
|
|
|
|
gchar * gnc_build_userdata_path(const gchar *);
|
2012-12-18 10:25:49 +00:00
|
|
|
|
2010-09-08 07:14:05 +00:00
|
|
|
gchar * gnc_build_report_path(const gchar *);
|
|
|
|
|
gchar * gnc_build_stdreports_path(const gchar *);
|
2010-08-29 19:02:57 +00:00
|
|
|
|
2007-02-19 23:45:15 +00: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 16:24:38 +00:00
|
|
|
%newobject gnc_utf8_strip_invalid_strdup;
|
|
|
|
|
gchar * gnc_utf8_strip_invalid_strdup(const gchar *);
|
2010-12-30 15:51:32 +00:00
|
|
|
|
2008-04-01 22:07:28 +00:00
|
|
|
%newobject gnc_locale_from_utf8;
|
|
|
|
|
gchar * gnc_locale_from_utf8(const gchar *);
|
2010-12-30 15:51:32 +00:00
|
|
|
|
2008-04-02 18:10:35 +00:00
|
|
|
%newobject gnc_locale_to_utf8;
|
|
|
|
|
gchar * gnc_locale_to_utf8(const gchar *);
|
2010-12-30 15:51:32 +00:00
|
|
|
|
2011-01-31 04:29:48 +00:00
|
|
|
const char * gnc_locale_default_iso_currency_code (void);
|
|
|
|
|
|
2011-11-20 18:27:00 +00:00
|
|
|
#if defined(SWIGGUILE)
|
2008-04-02 18:10:35 +00: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);
|
|
|
|
|
}
|
|
|
|
|
%}
|
2015-02-23 18:26:45 -05:00
|
|
|
#elif defined(SWIGPYTHON)
|
2011-11-20 18:27:00 +00:00
|
|
|
gboolean gnc_utf8_validate(const gchar *, gssize, const gchar**);
|
|
|
|
|
#endif
|