Use internal extern "C" { ... } for C++

- removes warnings compiling swig engine
...
[ 10%] Generating swig-engine.cpp
.../libgnucash/engine/engine-helpers.h:31: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gnc-date.h:83: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/qofquery.h:90: Warning 302: Identifier 'QofQuery' redefined (ignored),
.../libgnucash/engine/gnc-option.hpp:55: Warning 302: previous definition of 'QofQuery'.
.../libgnucash/engine/gnc-commodity.h:56: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncBusiness.h:40: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncEntry.h:37: Warning 313: Unrecognized extern type "C++".
This commit is contained in:
Richard Cohen 2023-01-23 13:57:38 +00:00
parent 062f3fb19d
commit 1cec0cb3f3
319 changed files with 861 additions and 712 deletions

View File

@ -22,10 +22,6 @@
%{
/* Includes the header in the wrapper code */
#include <glib.h>
#ifdef __cplusplus
extern "C"
{
#endif
#include <config.h>
#include <gnc-euro.h>
#include <gnc-ui-util.h>
@ -36,18 +32,14 @@ extern "C"
#endif
#include <gnc-accounting-period.h>
#include <gnc-session.h>
#ifdef __cplusplus
}
#endif
%}
#if defined(SWIGGUILE) //Always C++
%{
extern "C"
{
#include "guile-mappings.h"
extern "C"
{
SCM scm_init_sw_app_utils_module (void);
}
%}

View File

@ -23,11 +23,6 @@
/* Includes the header in the wrapper code */
#include <glib.h>
#ifdef __cplusplus
extern "C"
{
#endif
#include <config.h>
#include "qof.h"
#include "qoflog.h"
@ -58,9 +53,6 @@ extern "C"
#include "gncTaxTable.h"
#include "gncVendor.h"
#ifdef __cplusplus
}
#endif
%}
#if defined(SWIGGUILE) //Always C++
%{

View File

@ -28,6 +28,10 @@
#include <glib.h>
#include <libguile.h>
#ifdef __cplusplus
extern "C" {
#endif
SCM gnc_glist_to_scm_list(GList *glist, const gchar *wct);
GList* gnc_scm_list_to_glist(SCM wcp_list);
@ -37,4 +41,8 @@ int gnc_glist_string_p(SCM list);
GSList * gnc_scm_to_gslist_string(SCM list);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -27,8 +27,7 @@
#include "swig-runtime.h"
#include <libguile.h>
#include <cstring>
extern "C"
{
#include "Account.h"
#include "engine-helpers.h"
#include "gnc-engine-guile.h"
@ -43,7 +42,6 @@ extern "C"
#ifndef HAVE_STRPTIME
# include "strptime.h"
#endif
}
/** \todo Code dependent on the private query headers
qofquery-p.h and qofquerycore-p.h may need to be modified.

View File

@ -27,15 +27,15 @@
#include <glib.h>
#include <libguile.h>
#ifdef __cplusplus
extern "C"
{
#endif
#include "gnc-engine.h"
#include <gncTaxTable.h> /* for GncAccountValue */
#include "gnc-hooks.h"
#ifdef __cplusplus
extern "C"
{
#endif
/* Helpers for various conversions to and from guile */
GDate gnc_time64_to_GDate(SCM x);

View File

@ -27,6 +27,10 @@
#include <glib.h>
#include <libguile.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Helper function to get the string representation of
* a guile string.
*
@ -74,4 +78,8 @@ SCM gnc_scm_call_1_to_vector(SCM func, SCM arg);
* comments. */
gchar *gnc_scm_strip_comments (SCM scm_text);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -28,7 +28,15 @@
#include "gnc-ui-util.h"
#ifdef __cplusplus
extern "C" {
#endif
SCM gnc_printinfo2scm(GNCPrintAmountInfo info);
GNCPrintAmountInfo gnc_scm2printinfo(SCM info_scm);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -3,8 +3,6 @@
#include <libguile.h>
#include <numeric>
extern "C"
{
#include <config.h>
#include <qof.h>
@ -13,7 +11,6 @@ extern "C"
#include "gnc-engine-guile.h"
#include "gnc-guile-utils.h"
#include "gnc-kvp-guile.h"
}
/* NOTE: There are some problems with this approach. Currently,
* guids are stored simply as strings in scheme, so some

View File

@ -21,12 +21,13 @@
#ifndef KVP_SCM_H
#define KVP_SCM_H
#include <qof.h>
#include <libguile.h>
#ifdef __cplusplus
extern "C"
{
#endif
#include <qof.h>
#include <libguile.h>
KvpValue* gnc_scm_to_kvp_value_ptr(SCM kvpval);
SCM gnc_kvp_value_ptr_to_scm(KvpValue* val);

View File

@ -23,15 +23,11 @@
#include <libguile.h>
#include "guile-mappings.h"
extern "C"
{
#include "gnc-engine-guile.h"
#include "test-engine-stuff.h"
#include "test-stuff.h"
#include "Query.h"
#include "TransLog.h"
}
static void
test_query (Query *q, SCM val2str)

View File

@ -23,15 +23,12 @@
#include "guile-mappings.h"
#include <libguile.h>
extern "C"
{
#include "gnc-engine-guile.h"
#include "gnc-guile-utils.h"
#include "test-engine-stuff.h"
#include "test-stuff.h"
#include "Query.h"
#include "TransLog.h"
}
static void
test_query (Query *q, SCM val2str)

View File

@ -22,15 +22,12 @@
#include <libguile.h>
#include <glib.h>
extern "C"
{
#include "gnc-engine-guile.h"
#include "test-engine-stuff.h"
#include "test-stuff.h"
#include "Query.h"
#include "TransLog.h"
}
static void
test_query (QofQuery *q)

View File

@ -25,6 +25,11 @@
#include <glib.h>
#include <qof.h>
#ifdef __cplusplus
extern "C" {
#endif
/** @file unittest-support.h
* @brief Macros and logging-capture functions to ease writing GLib-testing
* based unit tests.
@ -356,4 +361,8 @@ void gnc_log_shutdown (void);
void gnc_log_set_handler (guint logdomain, gchar *logdomain, GLogFunc * func, gpointer data);
*/
#ifdef __cplusplus
}
#endif
#endif /*UNITTEST_SUPPORT_H*/

View File

@ -34,6 +34,10 @@
#include "dialog-search.h"
#ifdef __cplusplus
extern "C" {
#endif
#define GNC_TYPE_GENERAL_SEARCH \
(gnc_general_search_get_type ())
@ -91,4 +95,8 @@ GType gnc_general_search_get_type (void);
void gnc_general_search_grab_focus (GNCGeneralSearch *gsl);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -25,6 +25,10 @@
#include "qof.h"
#include "search-param.h"
#ifdef __cplusplus
extern "C" {
#endif
#define GNC_TYPE_SEARCH_CORE_TYPE (gnc_search_core_type_get_type ())
#define GNC_SEARCH_CORE_TYPE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_SEARCH_CORE_TYPE, GNCSearchCoreType))
#define GNC_SEARCH_CORE_TYPE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_SEARCH_CORE_TYPE, GNCSearchCoreTypeClass))
@ -81,5 +85,8 @@ void gnc_search_core_register_type (const char *type_name,
void gnc_search_core_initialize (void);
void gnc_search_core_finalize (void);
#ifdef __cplusplus
}
#endif
#endif /* ! _GNCSEARCH_CORE_TYPE_H */

View File

@ -23,6 +23,10 @@
#ifndef DIALOG_DOCLINK_UTILS_H
#define DIALOG_DOCLINK_UTILS_H
#ifdef __cplusplus
extern "C" {
#endif
#define GNC_DOC_LINK_PATH_HEAD "assoc-head"
/* Note, assoc-head is the old name for the document link head which has been
kept for compatibility */
@ -120,4 +124,8 @@ gchar * gnc_doclink_get_unescaped_just_uri (const gchar *uri);
*/
void gnc_doclink_pref_path_head_changed (GtkWindow *parent, const gchar *old_path_head_uri);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -34,10 +34,18 @@
* loading/open and for saving.
*/
#ifdef __cplusplus
extern "C" {
#endif
void gnc_ui_file_access_for_open (GtkWindow *parent);
void gnc_ui_file_access_for_save_as (GtkWindow *parent);
void gnc_ui_file_access_for_export (GtkWindow *parent);
#ifdef __cplusplus
}
#endif
/** @} */
#endif /* DIALOG_FILE_ACCESS_H */

View File

@ -23,10 +23,7 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
\********************************************************************/
extern "C"
{
#include <config.h> // Need this to include Account.h
}
#include <Account.h> // To include as C++ overriding later indirect includes
#include <gtk/gtk.h>
@ -37,8 +34,6 @@ extern "C"
#include "dialog-options.hpp"
#include <libguile.h>
extern "C"
{
#include <qofbookslots.h> // for OPTION_SECTION_ACCOUNTS
#include "dialog-utils.h"
@ -46,7 +41,6 @@ extern "C"
#include <gnc-prefs.h> // for GNC_PREFS_NUM_SOURCE
#include "gnc-session.h" // for gnc_get_current_session
#include "gnc-ui.h" // for DF_MANUAL
}
#include <iostream>
#include <sstream>

View File

@ -62,6 +62,10 @@
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
#endif
/** This function adds a full page of preferences to the preferences
* dialog. When the dialog is created, the specified widget will be
* pulled from the specified glade file and added to the preferences
@ -104,6 +108,10 @@ void gnc_preferences_add_to_page (const gchar *filename,
* the window stack instead of creating a new dialog. */
void gnc_preferences_dialog (GtkWindow *parent);
#ifdef __cplusplus
}
#endif
#endif
/** @} */
/** @} */

View File

@ -22,4 +22,13 @@
* *
**********************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
void gnc_reset_warnings_dialog (GtkWindow *parent);
#ifdef __cplusplus
}
#endif

View File

@ -29,7 +29,6 @@
#include <glib/gi18n.h>
#include <gnc-quotes.hpp>
extern "C" {
#include "dialog-transfer.h"
#include "dialog-utils.h"
#include "gnc-amount-edit.h"
@ -48,7 +47,6 @@ extern "C" {
#include "engine-helpers.h"
#include "QuickFill.h"
#include <gnc-commodity.h>
}
#define DIALOG_TRANSFER_CM_CLASS "dialog-transfer"

View File

@ -26,6 +26,10 @@
#include "Account.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _xferDialog XferDialog;
/** Opens up a window to do an automatic transfer between accounts
@ -221,4 +225,8 @@ gboolean gnc_xfer_dialog_run_exchange_dialog(
Account *reg_acc, Transaction *txn, gnc_commodity *xfer_com,
gboolean expanded);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -29,6 +29,10 @@
#include <gtk/gtk.h>
#include "qof.h"
#ifdef __cplusplus
extern "C" {
#endif
#define GNC_PREF_GRID_LINES_HORIZONTAL "grid-lines-horizontal"
#define GNC_PREF_GRID_LINES_VERTICAL "grid-lines-vertical"
@ -165,4 +169,8 @@ gnc_cost_policy_select_new (void);
*/
gchar* gnc_get_negative_color (void);
#ifdef __cplusplus
}
#endif
#endif /* DIALOG_UTILS_H */

View File

@ -33,6 +33,10 @@
#include "Account.h"
#ifdef __cplusplus
extern "C" {
#endif
#define GNC_TYPE_ACCOUNT_SEL (gnc_account_sel_get_type())
#define GNC_ACCOUNT_SEL(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, GNC_TYPE_ACCOUNT_SEL, GNCAccountSel)
#define GNC_ACCOUNT_SEL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, GNC_TYPE_ACCOUNT_SEL, GNCAccountSelClass)
@ -108,4 +112,8 @@ gint gnc_account_sel_get_num_account (GNCAccountSel *gas);
void gnc_account_sel_purge_account (GNCAccountSel *gas, Account *acc, gboolean recursive);
void gnc_account_sel_set_hexpand (GNCAccountSel *gas, gboolean expand);
#ifdef __cplusplus
}
#endif
#endif /* GNC_ACCOUNT_SEL_H */

View File

@ -32,6 +32,10 @@
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
#endif
#define GNC_TYPE_AMOUNT_EDIT (gnc_amount_edit_get_type ())
#define GNC_AMOUNT_EDIT(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, GNC_TYPE_AMOUNT_EDIT, GNCAmountEdit)
#define GNC_AMOUNT_EDIT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST(klass, GNC_TYPE_AMOUNT_EDIT, GNCAmountEditClass)
@ -245,4 +249,8 @@ void gnc_amount_edit_show_warning_symbol (GNCAmountEdit *gae, gboolean show);
*/
void gnc_amount_edit_make_mnemonic_target (GNCAmountEdit *gae, GtkWidget *label);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -27,6 +27,10 @@
#include <glib.h>
#include <Account.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Account splits are analysed; attempts to find a unique combination
* of uncleared splits which would set cleared balance to
* toclear_value. If this is not possible, *errmsg will be error
@ -36,4 +40,8 @@
GList * gnc_account_get_autoclear_splits (Account *account, gnc_numeric toclear_value,
gchar **errmsg);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -27,6 +27,10 @@
#include <gtk/gtk.h>
#include "qof.h"
#ifdef __cplusplus
extern "C" {
#endif
/** Callback that is used to notify the autosave subsystem when the
QofBook changed its dirty state. */
void gnc_autosave_dirty_handler (QofBook *book, gboolean dirty);
@ -34,4 +38,8 @@ void gnc_autosave_dirty_handler (QofBook *book, gboolean dirty);
/** Removes any still existing autosave timer from the event loop. */
void gnc_autosave_remove_timer(QofBook *book);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -34,6 +34,10 @@
#include "gnc-commodity.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Callback function to return the printable string of a commodity */
const char * gnc_commodity_edit_get_string (gpointer ptr);
@ -45,4 +49,8 @@ const char * gnc_commodity_edit_get_string (gpointer ptr);
gpointer gnc_commodity_edit_new_select (gpointer arg, gpointer ptr,
GtkWidget *toplevel);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -24,6 +24,10 @@
#include "qof.h"
#ifdef __cplusplus
extern "C" {
#endif
#define NO_COMPONENT (-1)
@ -333,4 +337,8 @@ gint gnc_forall_gui_components (const char *component_class,
GNCComponentHandler handler,
gpointer iter_data);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -57,6 +57,10 @@
#include "gnc-commodity.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @name Basic Object Implementation */
/** @{ */
@ -126,6 +130,10 @@ void gnc_currency_edit_clear_display (GNCCurrencyEdit *gce);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/** @} */

View File

@ -35,6 +35,10 @@
#include <time.h>
#include "gnc-date.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum
{
GNC_DATE_EDIT_SHOW_TIME = 1 << 0,
@ -135,4 +139,9 @@ void gnc_date_activates_default (GNCDateEdit *gde, gboolean state);
void gnc_date_grab_focus (GNCDateEdit *gde);
void gnc_date_make_mnemonic_target (GNCDateEdit *gde, GtkWidget *label);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -31,6 +31,10 @@
#include "qof.h"
#ifdef __cplusplus
extern "C" {
#endif
#define GNC_TYPE_DATE_FORMAT (gnc_date_format_get_type ())
#define GNC_DATE_FORMAT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gnc_date_format_get_type(), GNCDateFormat)
#define GNC_DATE_FORMAT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gnc_date_format_get_type(), GNCDateFormatClass)
@ -71,4 +75,8 @@ const char* gnc_date_format_get_custom (GNCDateFormat *gdf);
void gnc_date_format_refresh (GNCDateFormat *gdf);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -119,6 +119,10 @@
#include "qof.h"
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum
{
GNC_FILE_DIALOG_OPEN,
@ -168,4 +172,8 @@ typedef void (*GNCShutdownCB) (int);
void gnc_file_set_shutdown_callback (GNCShutdownCB cb);
gboolean gnc_file_save_in_progress (void);
#ifdef __cplusplus
}
#endif
#endif /* GNC_FILE_H */

View File

@ -29,6 +29,10 @@
#include "FreqSpec.h"
#include "Recurrence.h"
#ifdef __cplusplus
extern "C" {
#endif
#define GNC_TYPE_FREQUENCY (gnc_frequency_get_type())
#define GNC_FREQUENCY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, GNC_TYPE_FREQUENCY, GncFrequency)
#define GNC_FREQENCY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, GNC_TYPE_FREQUENCY, GncFrequency)
@ -101,4 +105,8 @@ void gnc_frequency_set_frequency_label_text (GncFrequency *gf, const gchar *txt)
*/
void gnc_frequency_set_date_label_text (GncFrequency *gf, const gchar *txt);
#ifdef __cplusplus
}
#endif
#endif /* !defined( GNC_FREQUENCY_H ) */

View File

@ -31,6 +31,10 @@
#ifndef GNC_GENERAL_SELECT_H
#define GNC_GENERAL_SELECT_H
#ifdef __cplusplus
extern "C" {
#endif
#define GNC_TYPE_GENERAL_SELECT (gnc_general_select_get_type ())
#define GNC_GENERAL_SELECT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gnc_general_select_get_type(), GNCGeneralSelect)
#define GNC_GENERAL_SELECT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gnc_general_select_get_type(), \ GNCGeneralSelectClass)
@ -83,5 +87,9 @@ GType gnc_general_select_get_type (void);
void gnc_general_select_make_mnemonic_target (GNCGeneralSelect *gsl, GtkWidget *label);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -37,6 +37,10 @@
#include <gnc-main-window.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Initialize the gnome-utils library
* Should be run once before using any gnome-utils features.
*/
@ -101,6 +105,10 @@ GncMainWindow *gnc_gui_init (void);
int gnc_ui_start_event_loop (void);
gboolean gnucash_ui_is_running (void);
#ifdef __cplusplus
}
#endif
#endif
/** @} */
/** @} */

View File

@ -41,6 +41,10 @@
#include <glib.h>
#include <glib-object.h>
#ifdef __cplusplus
extern "C" {
#endif
/** @name Gobject Tracking Functions
* @{
*
@ -165,6 +169,10 @@ type_name##_get_type (void) \
return g_define_type_id_static; \
} /* closes type_name##_get_type() */
#ifdef __cplusplus
}
#endif
#endif /* GNC_GOBJECT_UTILS_H */
/** @} */

View File

@ -37,6 +37,10 @@
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
#endif
/** @name gtk Miscellaneous Functions
@{
*/
@ -96,5 +100,9 @@ void gnc_menubar_model_remove_items_with_attrib (GMenuModel *menu_model, const g
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* GNC_GTK_UTILS_H */
/** @} */

View File

@ -23,6 +23,10 @@
#ifndef QUERY_USER_H
#define QUERY_USER_H
#ifdef __cplusplus
extern "C" {
#endif
extern void
gnc_info_dialog (GtkWindow *parent,
const char *format, ...) G_GNUC_PRINTF (2, 3);
@ -30,5 +34,9 @@ gnc_info_dialog (GtkWindow *parent,
void gnc_error_dialog (GtkWindow* parent, const char* format, ...) G_GNUC_PRINTF (2, 3);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -39,8 +39,6 @@
#include "dialog-options.hpp"
#include <libguile.h>
extern "C"
{
#include <config.h>
@ -88,7 +86,6 @@ extern "C"
# include <sys/types.h>
# include <sys/stat.h> // for stat(2)
#endif
}
/** Names of signals generated by the main window. */
enum

View File

@ -23,8 +23,6 @@
#include <gnc-option.hpp>
#include <gnc-option-impl.hpp>
#include "gnc-option-gtk-ui.hpp"
extern "C"
{
#include <config.h> // for scanf format string
#include <qof.h>
#include <gnc-engine.h> // for GNC_MOD_GUI
@ -38,7 +36,6 @@ extern "C"
#include "gnc-tree-view-account.h" // for GNC_TREE_VIEW_ACCOUNT
#include "gnc-tree-model-budget.h" // for gnc_tree_model_budget
#include "misc-gnome-utils.h" // for xxxgtk_textview_set_text
}
/*Something somewhere in windows.h defines ABSOLUTE to something and
*that contaminates using it in RelativeDateType. Undef it.

View File

@ -24,11 +24,19 @@
#define GNC_SPLASH_H
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
#endif
void gnc_show_splash_screen (void);
void gnc_destroy_splash_screen (void);
void gnc_update_splash_screen (const gchar *string, double percentage);
GtkWindow *gnc_get_splash_screen (void);
#ifdef __cplusplus
}
#endif
#define GNC_SPLASH_PERCENTAGE_UNKNOWN 101
#endif

View File

@ -34,6 +34,10 @@
#include "gnc-budget.h"
#ifdef __cplusplus
extern "C" {
#endif
/* The budget list columns. */
enum
{
@ -54,4 +58,8 @@ gboolean gnc_tree_model_budget_get_iter_for_budget(GtkTreeModel *tm,
GtkTreeIter *iter,
GncBudget *bgt);
/** @} */
#ifdef __cplusplus
}
#endif
#endif // __GNC_TREE_MODEL_BUDGET_H__

View File

@ -37,6 +37,10 @@
#include "gnc-pricedb.h"
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Documentation references ****************************************/
#ifdef G_OS_WIN32
@ -191,5 +195,9 @@ GtkWindow *gnc_ui_get_main_window (GtkWidget *widget);
void gnc_set_busy_cursor(GtkWidget *w, gboolean update_now);
void gnc_unset_busy_cursor(GtkWidget *w);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -20,8 +20,16 @@
#ifndef __GTT_UTIL_H__
#define __GTT_UTIL_H__
#ifdef __cplusplus
extern "C" {
#endif
/* Some gtk-like utilities */
void xxxgtk_textview_set_text (GtkTextView *text, const char *str);
char * xxxgtk_textview_get_text (GtkTextView *text);
#ifdef __cplusplus
}
#endif
#endif /* __GTT_UTIL_H__ */

View File

@ -36,6 +36,10 @@
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* Retrieve the print settings from the GtkPrintOperation @a op and save them in
* a static variable.
@ -69,6 +73,10 @@ GtkPrintSettings *gnc_print_get_settings(void);
/** Key for saving the PDF-export directory in the print settings */
#define GNC_GTK_PRINT_SETTINGS_EXPORT_DIR "gnc-pdf-export-directory"
#ifdef __cplusplus
}
#endif
/** @} */
/** @} */

View File

@ -24,9 +24,7 @@
#include "config.h"
#include <glib.h>
// GoogleTest is written in C++, however, the function we test in C.
extern "C" {
#include "../gnc-autoclear.h"
}
#include <memory>
#include <Account.h>
#include <Split.h>

View File

@ -29,8 +29,6 @@
#include <gnc-optiondb.h>
#include <libguile.h>
extern "C"
{
#include <config.h>
#include <platform.h>
@ -68,7 +66,6 @@ extern "C"
#include "gnc-plugin-page-account-tree.h"
#include "gnc-engine.h"
}
static QofLogModule log_module = GNC_MOD_IMPORT;

View File

@ -27,8 +27,6 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
extern "C"
{
#include <config.h>
#include <string.h>
#include <stdlib.h>
@ -52,7 +50,6 @@ extern "C"
#ifdef __MINGW32__
#include <Windows.h>
#endif
}
#include <gnc-locale-utils.hpp>
#include <boost/locale.hpp>

View File

@ -22,4 +22,13 @@
* Boston, MA 02110-1301, USA gnu@gnu.org *
\********************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
void gnc_ui_sx_loan_assistant_create(void);
#ifdef __cplusplus
}
#endif

View File

@ -31,7 +31,6 @@
#include <optional>
#include <stdexcept>
extern "C" {
#include "Transaction.h"
#include "engine-helpers.h"
#include "dialog-utils.h"
@ -49,7 +48,6 @@ void stock_assistant_prepare (GtkAssistant *assistant, GtkWidget *page,
gpointer user_data);
void stock_assistant_finish (GtkAssistant *assistant, gpointer user_data);
void stock_assistant_cancel (GtkAssistant *gtkassistant, gpointer user_data);
}
enum class FieldMask : unsigned;
bool operator &(FieldMask lhs, FieldMask rhs);

View File

@ -25,6 +25,10 @@
#include "Account.h"
#ifdef __cplusplus
extern "C" {
#endif
/********************************************************************\
* gnc_stock_transaction_assistant *
* opens up a assistant to record a stock transaction *
@ -35,4 +39,8 @@
\********************************************************************/
void gnc_stock_transaction_assistant (GtkWidget *parent, Account * account);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -30,6 +30,10 @@
#include "gncTaxTable.h"
#include "gncInvoice.h"
#ifdef __cplusplus
extern "C" {
#endif
#define GNC_PREFS_GROUP_INVOICE "dialogs.business.invoice"
#define GNC_PREFS_GROUP_BILL "dialogs.business.bill"
@ -106,4 +110,8 @@ gpointer gnc_simple_combo_get_value (GtkComboBox *cbox);
void gnc_simple_combo_set_value (GtkComboBox *cbox, gpointer data);
#ifdef __cplusplus
}
#endif
#endif /* GNC_BUSINESS_GNOME_UTILS_H_ */

View File

@ -26,15 +26,12 @@
#include <glib/gi18n.h>
#include "business-options-gnome.h"
extern "C"
{
#include <config.h> // for scanf format string
#include <qof.h>
#include <business-gnome-utils.h>
#include <gnc-ui-util.h> // for gnc_get_current_book
#include <gnc-general-search.h> // for GNC_GENERAL_SEARCH
#include "dialog-utils.h" // for gnc_builder_add_from_file
}
#include <iostream>

View File

@ -30,6 +30,10 @@
#include "gnc-main-window.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @addtogroup Reports
@{ */
/** @file dialog-custom-report.h
@ -45,6 +49,10 @@ gnc_ui_custom_report_edit_name(GncMainWindow * window, SCM scm_guid);
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* DIALOG_CUSTOM_REPORT_H */

View File

@ -23,6 +23,10 @@
#ifndef DIALOG_NEW_USER_H
#define DIALOG_NEW_USER_H
#ifdef __cplusplus
extern "C" {
#endif
#define GNC_PREFS_GROUP_NEW_USER "dialogs.new-user"
#define GNC_PREF_FIRST_STARTUP "first-startup"
@ -39,4 +43,8 @@ void gnc_new_user_dialog_register_qif_assistant (void (*cb_fcn)(void));
/* private */
void gncp_new_user_finish (void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -30,7 +30,6 @@
#include <time.h>
#include <gnc-quotes.hpp>
extern "C" {
#include "dialog-utils.h"
#include "gnc-accounting-period.h"
#include "gnc-amount-edit.h"
@ -48,7 +47,6 @@ extern "C" {
#include "gnc-ui-util.h"
#include "gnc-warnings.h"
#include <gnc-glib-utils.h>
}
#define DIALOG_PRICE_DB_CM_CLASS "dialog-price-edit-db"

View File

@ -28,8 +28,6 @@
#include <gnc-optiondb-impl.hpp>
#include <libguile.h>
extern "C"
{
#include <config.h>
#include "swig-runtime.h"
@ -39,7 +37,6 @@ extern "C"
#include "guile-mappings.h"
#include "gnc-guile-utils.h"
#include "gnc-ui.h"
}
#include "dialog-report-column-view.hpp"
#include <gnc-report.h>

View File

@ -24,10 +24,10 @@
#define GNC_DIALOG_COLUMN_VIEW_H
#include <libguile.h>
extern "C"
{
#include <gtk/gtk.h>
extern "C"
{
typedef struct gncp_column_view_edit gnc_column_view_edit;
GtkWidget * gnc_column_view_edit_options(GncOptionDB* odb, SCM view);

View File

@ -28,8 +28,6 @@
#include <gnc-optiondb.h>
#include <libguile.h>
extern "C"
{
#include <config.h>
#include "dialog-report-style-sheet.h"
@ -41,7 +39,6 @@ extern "C"
#include "gnc-guile-utils.h"
#include "gnc-ui.h"
#include <guile-mappings.h>
}
#include "gnc-report.h"
#define DIALOG_STYLE_SHEETS_CM_CLASS "style-sheets-dialog"

View File

@ -42,8 +42,6 @@
#include <gnc-optiondb-impl.hpp>
#include <libguile.h>
extern "C"
{
#include <config.h>
#include <sys/stat.h>
@ -76,8 +74,6 @@ extern "C"
#include "guile-mappings.h"
#include "gnc-icons.h"
#include "print-session.h"
}
#include <memory>
#include <gnc-report.h>

View File

@ -25,6 +25,14 @@
#include <glib.h>
#ifdef __cplusplus
extern "C" {
#endif
void gnc_main_gui_init(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -30,8 +30,6 @@
#include "dialog-report-column-view.hpp"
#include <libguile.h>
extern "C"
{
#include <config.h>
#include <errno.h>
@ -44,7 +42,6 @@ extern "C"
#include "guile-mappings.h"
#include "gnc-plugin-page-report.h"
}
#include "gnc-report.h"
/********************************************************************

View File

@ -30,11 +30,9 @@
#include "gnucash-commands.hpp"
#include "gnucash-core-app.hpp"
extern "C" {
#include <glib/gi18n.h>
#include <gnc-engine.h>
#include <gnc-prefs.h>
}
#include <boost/locale.hpp>
#include <boost/optional.hpp>

View File

@ -32,14 +32,12 @@
#include "gnucash-commands.hpp"
#include "gnucash-core-app.hpp"
extern "C" {
#include <gnc-engine-guile.h>
#include <gnc-prefs.h>
#include <gnc-prefs-utils.h>
#include <gnc-gnome-utils.h>
#include <gnc-session.h>
#include <qoflog.h>
}
#include <boost/locale.hpp>
#include <fstream>

View File

@ -31,7 +31,6 @@
#include "gnucash-core-app.hpp"
extern "C" {
#include <glib/gi18n.h>
#include <binreloc.h>
#include <gnc-engine.h>
@ -45,7 +44,6 @@ extern "C" {
#include <gnc-splash.h>
#include <gnc-version.h>
#include "gnucash-locale-platform.h"
}
#include <boost/algorithm/string.hpp>
#include <boost/locale.hpp>

View File

@ -25,6 +25,14 @@
#ifndef GNUCASH_LOCALE_PLATFORM_H
#define GNUCASH_LOCALE_PLATFORM_H
#ifdef __cplusplus
extern "C" {
#endif
char *set_platform_locale(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -32,7 +32,6 @@
#include "gnucash-commands.hpp"
#include "gnucash-core-app.hpp"
extern "C" {
#include <glib/gi18n.h>
#include <dialog-new-user.h>
#include <gfec.h>
@ -59,7 +58,6 @@ extern "C" {
#include <gnucash-register.h>
#include <search-core-type.h>
#include <top-level.h>
}
#include <boost/locale.hpp>
#include <boost/optional.hpp>

View File

@ -25,6 +25,14 @@
#include "gnc-html.h"
#ifdef __cplusplus
extern "C" {
#endif
GncHtml* gnc_html_factory_create_html( void );
#ifdef __cplusplus
}
#endif
#endif

View File

@ -28,6 +28,10 @@ typedef struct _gnc_html_history gnc_html_history;
#include "gnc-html.h"
#ifdef __cplusplus
extern "C" {
#endif
struct _gnc_html_history_node
{
char* type;
@ -59,6 +63,10 @@ gnc_html_history_node * gnc_html_history_node_new(URLType type,
void gnc_html_history_node_destroy(gnc_html_history_node *
node);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -29,8 +29,6 @@
#include <guid.hpp>
extern "C"
{
#include "config.h"
#include <gtk/gtk.h>
@ -50,7 +48,6 @@ extern "C"
#include "gnc-csv-gnumeric-popup.h"
#include "go-charmap-sel.h"
}
#include <algorithm>
#include <exception>

View File

@ -28,9 +28,17 @@
#ifndef GNC_ASSISTANT_CSV_IMPORT_PRICE_H
#define GNC_ASSISTANT_CSV_IMPORT_PRICE_H
#ifdef __cplusplus
extern "C" {
#endif
/** The gnc_file_csv_price_import() will let the user import the
* commodity prices from a file.
*/
void gnc_file_csv_price_import (void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -30,8 +30,6 @@
#include <guid.hpp>
extern "C"
{
#include <config.h>
#include <gtk/gtk.h>
@ -57,7 +55,6 @@ extern "C"
#include "gnc-csv-gnumeric-popup.h"
#include "go-charmap-sel.h"
}
#include "gnc-imp-settings-csv-tx.hpp"
#include "gnc-import-tx.hpp"

View File

@ -29,8 +29,17 @@
#define GNC_ASSISTANT_CSV_IMPORT_TRANS_H
#ifdef __cplusplus
extern "C" {
#endif
/** The gnc_file_csv_trans_import() will let the user import the
* account tree or transactions to a delimited file.
*/
void gnc_file_csv_trans_import (void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -30,6 +30,10 @@
#include <gtk/gtk.h>
#include "Account.h"
#ifdef __cplusplus
extern "C" {
#endif
/** Enumeration for the mappings liststore */
enum GncImportColumn {MAPPING_STRING, MAPPING_FULLPATH, MAPPING_ACCOUNT};
@ -49,4 +53,8 @@ void gnc_csv_account_map_change_mappings (Account *old_account, Account *new_acc
*/
Account * gnc_csv_account_map_search (const gchar *map_string);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -72,6 +72,10 @@
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
char const *name;
@ -95,5 +99,9 @@ void gnumeric_create_popup_menu (GnumericPopupMenuElement const *elements,
int sensitive_filter,
GdkEventButton *event);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -24,7 +24,6 @@
#include <glib.h>
#include <glib/gi18n.h>
extern "C" {
#include <platform.h>
#if PLATFORM(WINDOWS)
#include <windows.h>
@ -32,7 +31,6 @@ extern "C" {
#include "engine-helpers.h"
#include "gnc-ui-util.h"
}
#include <exception>
#include <map>

View File

@ -24,7 +24,6 @@
#ifndef GNC_PRICE_PROPS_HPP
#define GNC_PRICE_PROPS_HPP
extern "C" {
#include <platform.h>
#if PLATFORM(WINDOWS)
#include <windows.h>
@ -33,7 +32,6 @@ extern "C" {
#include <glib/gi18n.h>
#include "gnc-pricedb.h"
#include "gnc-commodity.h"
}
#include <string>
#include <map>

View File

@ -23,13 +23,11 @@
#include <glib.h>
#include <glib/gi18n.h>
extern "C" {
#include <platform.h>
#if PLATFORM(WINDOWS)
#include <windows.h>
#endif
#include "engine-helpers.h"
#include "gnc-csv-account-map.h"
#include "gnc-ui-util.h"
@ -38,8 +36,6 @@ extern "C" {
#include "gnc-pricedb.h"
#include <gnc-exp-parser.h>
}
#include <algorithm>
#include <exception>
#include <map>

View File

@ -24,7 +24,6 @@
#ifndef GNC_TRANS_PROPS_HPP
#define GNC_TRANS_PROPS_HPP
extern "C" {
#include <platform.h>
#if PLATFORM(WINDOWS)
#include <windows.h>
@ -35,7 +34,6 @@ extern "C" {
#include "Account.h"
#include "Transaction.h"
#include "gnc-commodity.h"
}
#include <string>
#include <map>

View File

@ -34,8 +34,6 @@
#include <string>
#include <vector>
extern "C"
{
#include <config.h>
#include <gtk/gtk.h>
@ -44,7 +42,6 @@ extern "C"
#include "Account.h"
#include "gnc-state.h"
#include "gnc-ui-util.h"
}
constexpr auto group_prefix = "Import csv,price - ";

View File

@ -28,11 +28,9 @@
#ifndef GNC_CSV_PRICE_IMPORT_SETTINGS_H
#define GNC_CSV_PRICE_IMPORT_SETTINGS_H
extern "C" {
#include <config.h>
#include "Account.h"
#include "gnc-commodity.h"
}
#include <string>
#include <vector>

View File

@ -34,8 +34,6 @@
#include <string>
#include <vector>
extern "C"
{
#include <config.h>
#include <gtk/gtk.h>
@ -44,7 +42,6 @@ extern "C"
#include "Account.h"
#include "gnc-state.h"
#include "gnc-ui-util.h"
}
constexpr auto group_prefix = "Import csv,transaction - ";

View File

@ -28,11 +28,9 @@
#ifndef GNC_CSV_TRANS_IMPORT_SETTINGS_H
#define GNC_CSV_TRANS_IMPORT_SETTINGS_H
extern "C" {
#include <config.h>
#include "Account.h"
#include "gnc-commodity.h"
}
#include <string>
#include <vector>

View File

@ -29,8 +29,6 @@
#include "gnc-imp-settings-csv.hpp"
#include <sstream>
extern "C"
{
#include <config.h>
#include <gtk/gtk.h>
@ -39,7 +37,6 @@ extern "C"
#include "Account.h"
#include "gnc-state.h"
#include "gnc-ui-util.h"
}
#include <algorithm>
#include <iostream>

View File

@ -28,11 +28,9 @@
#ifndef GNC_CSV_IMPORT_SETTINGS_H
#define GNC_CSV_IMPORT_SETTINGS_H
extern "C" {
#include <config.h>
#include "Account.h"
#include "gnc-commodity.h"
}
#include <string>
#include <vector>

View File

@ -22,7 +22,6 @@
#include <guid.hpp>
extern "C" {
#include <platform.h>
#if PLATFORM(WINDOWS)
#include <windows.h>
@ -33,7 +32,6 @@ extern "C" {
#include "gnc-ui-util.h" //get book
#include "gnc-commodity.h"
#include "gnc-pricedb.h"
}
#include <algorithm>
#include <exception>

View File

@ -30,10 +30,8 @@
#ifndef GNC_PRICE_IMPORT_HPP
#define GNC_PRICE_IMPORT_HPP
extern "C" {
#include "config.h"
#include "gnc-commodity.h"
}
#include <vector>
#include <set>

View File

@ -23,14 +23,12 @@
#include <guid.hpp>
extern "C" {
#include <platform.h>
#if PLATFORM(WINDOWS)
#include <windows.h>
#endif
#include <glib/gi18n.h>
}
#include <algorithm>
#include <exception>

View File

@ -29,12 +29,10 @@
#ifndef GNC_TX_IMPORT_HPP
#define GNC_TX_IMPORT_HPP
extern "C" {
#include <config.h>
#include "Account.h"
#include "Transaction.h"
}
#include <vector>
#include <set>

View File

@ -11,9 +11,7 @@
#include <boost/locale.hpp>
#include <boost/algorithm/string.hpp>
extern "C" {
#include <glib/gi18n.h>
}
#include <glib/gi18n.h>
void
GncCsvTokenizer::set_separators(const std::string& separators)

View File

@ -34,9 +34,7 @@
#ifndef GNC_CSV_TOKENIZER_HPP
#define GNC_CSV_TOKENIZER_HPP
extern "C" {
#include <config.h>
}
#include <iostream>
#include <fstream> // fstream

View File

@ -35,9 +35,7 @@
#ifndef GNC_DUMMY_TOKENIZER_HPP
#define GNC_DUMMY_TOKENIZER_HPP
extern "C" {
#include <config.h>
}
#include <iostream>
#include <fstream> // fstream

View File

@ -37,9 +37,7 @@
#ifndef GNC_FW_TOKENIZER_HPP
#define GNC_FW_TOKENIZER_HPP
extern "C" {
#include <config.h>
}
#include <iostream>
#include <fstream> // fstream

View File

@ -14,11 +14,9 @@
#include <boost/locale.hpp>
#include <boost/algorithm/string.hpp>
extern "C" {
#include <go-glib-extras.h>
#include <glib.h>
#include <glib/gstdio.h>
}
std::unique_ptr<GncTokenizer> gnc_tokenizer_factory(GncImpFileFormat fmt)
{

View File

@ -35,9 +35,7 @@
#ifndef GNC_TOKENIZER_HPP
#define GNC_TOKENIZER_HPP
extern "C" {
#include <config.h>
}
#include <iostream>
#include <fstream> // fstream

View File

@ -35,6 +35,10 @@
#include "gnc-tree-view-account.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
GtkWidget *dialog; /* Dialog Widget */
@ -125,5 +129,9 @@ Account * gnc_import_select_account(GtkWidget *parent,
gboolean * ok_pressed
);
#ifdef __cplusplus
}
#endif
#endif
/**@}*/

View File

@ -31,6 +31,10 @@
#include "Transaction.h"
#include "import-settings.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _transactioninfo GNCImportTransInfo;
typedef struct _selected_match_info GNCImportSelectedMatchInfo;
typedef struct _matchinfo
@ -259,6 +263,10 @@ gint
gnc_import_MatchInfo_get_probability (const GNCImportMatchInfo * info);
/**@}*/
#ifdef __cplusplus
}
#endif
#endif
/** @} */

View File

@ -36,6 +36,10 @@
#include "Transaction.h"
#include "import-backend.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _main_matcher_info GNCImportMainMatcher;
typedef void (*GNCTransactionProcessedCB) (GNCImportTransInfo *trans_info,
@ -221,5 +225,9 @@ void gnc_gen_trans_list_show_reconcile_after_close_button (GNCImportMainMatcher
*/
GtkWidget* gnc_gen_trans_list_get_reconcile_after_close_button (GNCImportMainMatcher *info);
#ifdef __cplusplus
}
#endif
#endif
/**@}*/

View File

@ -29,6 +29,10 @@
#include <glib.h>
#include "import-backend.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef GHashTable GNCImportPendingMatches;
typedef enum _import_match_type {
@ -58,5 +62,9 @@ gnc_import_PendingMatches_get_match_type(GNCImportPendingMatches *map,
const char *
gnc_import_PendingMatches_get_type_str(GNCImportPendingMatchType type);
#ifdef __cplusplus
}
#endif
#endif
/** @} */

Some files were not shown because too many files have changed in this diff Show More