27 #include "guile-mappings.h"
29 #include "swig-runtime.h"
32 #include "engine-helpers-guile.h"
33 #include "gnc-helpers.h"
41 SCM info_scm = SCM_EOL;
43 info_scm = scm_cons (SCM_BOOL (info.round), info_scm);
44 info_scm = scm_cons (SCM_BOOL (info.force_fit), info_scm);
45 info_scm = scm_cons (SCM_BOOL (info.monetary), info_scm);
46 info_scm = scm_cons (SCM_BOOL (info.use_locale), info_scm);
47 info_scm = scm_cons (SCM_BOOL (info.use_symbol), info_scm);
48 info_scm = scm_cons (SCM_BOOL (info.use_separators), info_scm);
50 info_scm = scm_cons (scm_from_int (info.min_decimal_places), info_scm);
51 info_scm = scm_cons (scm_from_int (info.max_decimal_places), info_scm);
53 info_scm = scm_cons (gnc_commodity_to_scm (info.commodity), info_scm);
55 info_scm = scm_cons (scm_from_locale_symbol (
"print-info"), info_scm);
61 gnc_scm2printinfo(SCM info_scm)
66 info_scm = SCM_CDR (info_scm);
67 info.commodity = gnc_scm_to_commodity (SCM_CAR (info_scm));
69 info_scm = SCM_CDR (info_scm);
70 info.max_decimal_places = scm_to_int (SCM_CAR (info_scm));
72 info_scm = SCM_CDR (info_scm);
73 info.min_decimal_places = scm_to_int (SCM_CAR (info_scm));
75 info_scm = SCM_CDR (info_scm);
76 info.use_separators = scm_is_true (SCM_CAR (info_scm));
78 info_scm = SCM_CDR (info_scm);
79 info.use_symbol = scm_is_true (SCM_CAR (info_scm));
81 info_scm = SCM_CDR (info_scm);
82 info.use_locale = scm_is_true (SCM_CAR (info_scm));
84 info_scm = SCM_CDR (info_scm);
85 info.monetary = scm_is_true (SCM_CAR (info_scm));
87 info_scm = SCM_CDR (info_scm);
88 info.force_fit = scm_is_true (SCM_CAR (info_scm));
90 info_scm = SCM_CDR (info_scm);
91 info.round = scm_is_true (SCM_CAR (info_scm));
114 const char *name, *tz;
115 SCM info_scm = SCM_EOL, comm_scm, def_comm_scm;
123 comm_scm = SWIG_NewPointerObj(comm, SWIG_TypeQuery(
"_p_gnc_commodity"), 0);
125 SWIG_TypeQuery(
"_p_gnc_commodity"), 0);
128 info_scm = scm_cons (scm_from_utf8_string (tz), info_scm);
130 info_scm = scm_cons (SCM_BOOL_F, info_scm);
131 info_scm = scm_cons (def_comm_scm, info_scm);
132 info_scm = scm_cons (comm_scm, info_scm);
133 info_scm = scm_cons (name ? scm_from_utf8_string (name) : SCM_BOOL_F, info_scm);
utility functions for the GnuCash UI
const char * gnc_commodity_get_quote_tz(const gnc_commodity *cm)
gnc_commodity * gnc_default_currency(void)
All type declarations for the whole Gnucash engine.
gnc_quote_source * gnc_commodity_get_quote_source(const gnc_commodity *cm)
const char * gnc_quote_source_get_internal_name(const gnc_quote_source *source)