43 typedef QofSession * (*QofSessionCB) (void);
46 gchar *gnc_normalize_account_separator (
const gchar* separator);
47 gboolean gnc_reverse_balance(
const Account *account);
51 gboolean gnc_using_unreversed_budgets (QofBook* book);
57 gboolean gnc_reverse_budget_balance (
const Account *account, gboolean unreversed);
61 void gnc_set_use_equity_type_opening_balance_account (QofBook* book);
62 gboolean gnc_using_equity_type_opening_balance_account (QofBook* book);
65 #define GNC_PREFS_GROUP_OPEN_SAVE "dialogs.open-save" 66 #define GNC_PREFS_GROUP_EXPORT "dialogs.export-accounts" 67 #define GNC_PREFS_GROUP_REPORT "dialogs.report" 68 #define GNC_PREF_AUTO_DECIMAL_POINT "auto-decimal-point" 69 #define GNC_PREF_AUTO_DECIMAL_PLACES "auto-decimal-places" 73 gchar *gnc_get_default_directory (
const gchar *section);
74 void gnc_set_default_directory (
const gchar *section,
75 const gchar *directory);
78 QofBook * gnc_get_current_book (
void);
88 gboolean gnc_is_new_book (
void);
90 void gnc_set_current_book_tax_name_type (gboolean name_changed,
91 const gchar *tax_name,
92 gboolean type_changed,
93 const gchar *tax_type);
94 const gchar * gnc_get_current_book_tax_name (
void);
95 const gchar * gnc_get_current_book_tax_type (
void);
134 Account * gnc_get_current_root_account (
void);
135 gnc_commodity_table * gnc_get_current_commodities (
void);
169 gboolean show_leaf_accounts);
189 char *gnc_ui_account_get_tax_info_string (
const Account *account);
191 char *gnc_ui_account_get_tax_info_sub_acct_string (
const Account *account);
193 const char * gnc_get_reconcile_str (
char reconciled_flag);
194 const char * gnc_get_reconcile_valid_flags (
void);
195 const char * gnc_get_reconcile_flag_order (
void);
222 EQUITY_OPENING_BALANCE,
223 EQUITY_RETAINED_EARNINGS,
228 GNCEquityType equity_type,
229 gnc_commodity *currency);
230 gboolean gnc_account_create_opening_balance (
Account *account,
294 typedef struct _GNCPrintAmountInfo
296 const gnc_commodity *commodity;
298 guint8 max_decimal_places;
299 guint8 min_decimal_places;
301 unsigned int use_separators : 1;
302 unsigned int use_symbol : 1;
303 unsigned int use_locale : 1;
304 unsigned int monetary : 1;
305 unsigned int force_fit : 1;
306 unsigned int round : 1;
313 gboolean use_symbol);
316 gboolean use_symbol);
319 gboolean use_symbol);
322 gboolean use_symbol);
359 const gchar *printable_value(gdouble val, gint denom);
360 gchar *number_to_words(gdouble val, gint64 denom);
361 gchar *numeric_to_words(gnc_numeric val);
375 gnc_numeric *result,
char **endstr);
388 char **endstr, gboolean skip);
400 gunichar negative_sign, gunichar decimal_point,
401 gunichar group_separator,
const char *ignore_list,
402 gnc_numeric *result,
char **endstr);
428 void gnc_ui_util_init (
void);
432 void gnc_ui_util_remove_registered_prefs (
void);
455 gint *cursor_position);
468 const gchar *symbol);
481 const gchar *incoming_text,
482 const gchar **symbol);
gchar * gnc_filter_text_for_currency_commodity(const gnc_commodity *comm, const gchar *incoming_text, const gchar **symbol)
Returns the incoming text removed of currency symbol.
gboolean xaccParseAmount(const char *in_str, gboolean monetary, gnc_numeric *result, char **endstr)
Parses in_str to obtain a numeric result.
gnc_commodity * gnc_locale_default_currency_nodefault(void)
Returns the default currency of the current locale, or NULL if no sensible currency could be identifi...
Business Interface: Object OWNERs.
const char * gnc_print_amount_with_bidi_ltr_isolate(gnc_numeric val, GNCPrintAmountInfo info)
Make a string representation of a gnc_numeric.
gboolean gnc_book_use_book_currency(QofBook *book)
Returns TRUE if both book-currency and default gain/loss policy KVPs exist and are valid and trading ...
const char * xaccPrintAmount(gnc_numeric val, GNCPrintAmountInfo info)
Make a string representation of a gnc_numeric.
void gnc_book_option_num_field_source_change_cb(gboolean num_action)
Calls gnc_book_option_num_field_source_change to initiate registered callbacks when num_field_source ...
gboolean xaccParseAmountPosSign(const char *in_str, gboolean monetary, gnc_numeric *result, char **endstr, gboolean skip)
Parses in_str to a gnc_numeric, with a flag to indicate whether the locale's positive sign (or in abs...
gnc_commodity * gnc_default_report_currency(void)
Return the default currency for use in reports, as set by the user.
gnc_commodity * gnc_default_currency(void)
Return the default currency set by the user.
gchar * gnc_get_account_name_for_register(const Account *account)
Get either the full name of the account or the simple name, depending on the configuration parameter ...
Account handling public routines.
const char * gnc_get_doclink_flag_order(void)
Get a string containing document link flag order.
const gchar * gnc_book_get_book_currency_name(QofBook *book)
Returns pointer to Book Currency name for book or NULL; determines that both book-currency and defaul...
gboolean xaccParseAmountExtended(const char *in_str, gboolean monetary, gunichar negative_sign, gunichar decimal_point, gunichar group_separator, const char *ignore_list, gnc_numeric *result, char **endstr)
Converts a string to a gnc_numeric.
const gchar * gnc_book_get_default_gains_policy(QofBook *book)
Returns pointer to default gain/loss policy for book or NULL; determines that both book-currency and ...
void gnc_book_option_book_currency_selected_cb(gboolean use_book_currency)
Calls gnc_book_option_book_currency_selected to initiate registered callbacks when currency accountin...
void gnc_filter_text_set_cursor_position(const gchar *incoming_text, const gchar *symbol, gint *cursor_position)
Updates cursor_position after removal of currency symbols.
gnc_commodity * gnc_book_get_book_currency(QofBook *book)
Returns pointer to Book Currency for book or NULL; determines that both book-currency and default gai...
gchar * gnc_filter_text_for_currency_symbol(const gchar *incoming_text, const gchar *symbol)
Returns the incoming text removed of a currency symbol.
int xaccSPrintAmount(char *buf, gnc_numeric val, GNCPrintAmountInfo info)
Make a string representation of a gnc_numeric.
gchar * gnc_get_account_name_for_split_register(const Account *account, gboolean show_leaf_accounts)
Get either the full name of the account or the simple name, depending on the show_leaf_accounts.
Account * gnc_book_get_default_gain_loss_acct(QofBook *book)
Returns pointer to default gain/loss account for book or NULL; determines that both book-currency and...
gnc_commodity * gnc_account_or_default_currency(const Account *account, gboolean *currency_from_account_found)
Returns a gnc_commodity that is a currency, suitable for being a Transaction's currency.
gchar * gnc_wrap_text_with_bidi_ltr_isolate(const char *text)
This function helps with GTK's use of 'Unicode Bidirectional Text Algorithm'.
gchar * gnc_filter_text_for_control_chars(const gchar *incoming_text)
Returns the incoming text removed of control characters.
const char * gnc_get_doclink_str(char link_flag)
Get a string representing the document link type.
gint64 time64
Many systems, including Microsoft Windows and BSD-derived Unixes like Darwin, are retaining the int-3...
const char * gnc_get_doclink_valid_flags(void)
Get a string containing documentation link valid flags.
Account * gnc_account_lookup_for_register(const Account *base_account, const gchar *name)
Retrieve the account matching the given name starting from the descendants of base_account.
gnc_commodity * gnc_locale_default_currency(void)
Returns the default currency of the current locale.