Skip to content

Commit

Permalink
add #ifdef __cplusplus extern "C" {} wrappers to .h files
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Feb 25, 2024
1 parent 68b3f97 commit c345fc9
Show file tree
Hide file tree
Showing 25 changed files with 213 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gnucash/gnome-utils/dialog-dup-trans.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
#include <gtk/gtk.h>
#include <gnc-date.h>

#ifdef __cplusplus
extern "C"
{
#endif


/***********************************************************************\
* gnc_dup_trans_dialog *
Expand Down Expand Up @@ -89,4 +94,8 @@ gboolean
gnc_dup_time64_dialog (GtkWidget * parent, const char *window_title,
const char* title, time64 *date);

#ifdef __cplusplus
}
#endif

#endif // DIALOGDUPTRANS_H
8 changes: 8 additions & 0 deletions gnucash/gnome-utils/dialog-object-references.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#ifndef DIALOG_OBJECT_REFERENCES_H
#define DIALOG_OBJECT_REFERENCES_H

#ifdef __cplusplus
extern "C" {
#endif

/** @addtogroup GUI
@{ */
/** @file dialog-object-references.h
Expand All @@ -40,4 +44,8 @@ void gnc_ui_object_references_show( const gchar* explanation, GList* objlist );

/** @} */

#ifdef __cplusplus
}
#endif

#endif /* DIALOG_OBJECT_REFERENCES_H */
8 changes: 8 additions & 0 deletions gnucash/gnome-utils/gnc-recurrence.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
#include <glib.h>
#include "Recurrence.h"

#ifdef __cplusplus
extern "C" {
#endif

#define GNC_TYPE_RECURRENCE (gnc_recurrence_get_type())
G_DECLARE_FINAL_TYPE (GncRecurrence, gnc_recurrence, GNC, RECURRENCE, GtkBox)

Expand All @@ -43,4 +47,8 @@ void gnc_recurrence_set(GncRecurrence *gr, const Recurrence *r);
long as the GncRecurrence is around. */
const Recurrence * gnc_recurrence_get(GncRecurrence *gr);

#ifdef __cplusplus
}
#endif

#endif
8 changes: 8 additions & 0 deletions gnucash/gnome-utils/gnc-sx-instance-dense-cal-adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,17 @@
#include <glib.h>
#include "gnc-sx-instance-model.h"

#ifdef __cplusplus
extern "C" {
#endif

#define GNC_TYPE_SX_INSTANCE_DENSE_CAL_ADAPTER (gnc_sx_instance_dense_cal_adapter_get_type ())
G_DECLARE_FINAL_TYPE (GncSxInstanceDenseCalAdapter, gnc_sx_instance_dense_cal_adapter, GNC, SX_INSTANCE_DENSE_CAL_ADAPTER, GObject)

GncSxInstanceDenseCalAdapter* gnc_sx_instance_dense_cal_adapter_new(GncSxInstanceModel *instances);

#ifdef __cplusplus
}
#endif

#endif // _GNC_SX_INSTANCE_DENSE_CAL_ADAPTER_H
8 changes: 8 additions & 0 deletions gnucash/gnome-utils/window-main-summarybar.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
#ifndef WINDOW_MAIN_SUMMARYBAR_H
#define WINDOW_MAIN_SUMMARYBAR_H

#ifdef __cplusplus
extern "C" {
#endif

GtkWidget * gnc_main_window_summary_new(void);

#ifdef __cplusplus
}
#endif

#endif
8 changes: 8 additions & 0 deletions gnucash/gnome/assistant-stock-split.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@

#include "Account.h"

#ifdef __cplusplus
extern "C"
{
#endif

/********************************************************************\
* gnc_stock_split_dialog *
* opens up a window to record a stock split *
Expand All @@ -37,5 +42,8 @@
* Return: nothing *
\********************************************************************/
void gnc_stock_split_dialog (GtkWidget *parent, Account * initial);
#ifdef __cplusplus
}
#endif

#endif
8 changes: 8 additions & 0 deletions gnucash/gnome/dialog-customer.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#ifndef GNC_DIALOG_CUSTOMER_H_
#define GNC_DIALOG_CUSTOMER_H_

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _customer_window CustomerWindow;

#include "gncCustomer.h"
Expand All @@ -46,4 +50,8 @@ GNCSearchWindow *gnc_customer_search (GtkWindow *parent, GncCustomer *start, Qof
GNCSearchWindow * gnc_customer_search_select (GtkWindow *parent, gpointer start, gpointer book);
GNCSearchWindow * gnc_customer_search_edit (GtkWindow *parent, gpointer start, gpointer book);

#ifdef __cplusplus
}
#endif

#endif /* GNC_DIALOG_CUSTOMER_H_ */
8 changes: 8 additions & 0 deletions gnucash/gnome/dialog-doclink.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#ifndef DIALOG_DOCLINK_H
#define DIALOG_DOCLINK_H

#ifdef __cplusplus
extern "C" {
#endif

/** Present the right edit dialog for the uri.
*
* The function allocates memory for the uri. The calling function should
Expand Down Expand Up @@ -68,4 +72,8 @@ void gnc_doclink_business_dialog (GtkWindow *parent);
*/
void gnc_doclink_trans_dialog (GtkWindow *parent);

#ifdef __cplusplus
}
#endif

#endif
8 changes: 8 additions & 0 deletions gnucash/gnome/dialog-employee.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#ifndef GNC_DIALOG_EMPLOYEE_H_
#define GNC_DIALOG_EMPLOYEE_H_

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _employee_window EmployeeWindow;

#include "gncEmployee.h"
Expand All @@ -46,4 +50,8 @@ GNCSearchWindow * gnc_employee_search (GtkWindow *parent, GncEmployee *start, Qo
GNCSearchWindow * gnc_employee_search_select (GtkWindow *parent, gpointer start, gpointer book);
GNCSearchWindow * gnc_employee_search_edit (GtkWindow *parent, gpointer start, gpointer book);

#ifdef __cplusplus
}
#endif

#endif /* GNC_DIALOG_EMPLOYEE_H_ */
9 changes: 9 additions & 0 deletions gnucash/gnome/dialog-find-account.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@

#include "Account.h"

#ifdef __cplusplus
extern "C"
{
#endif

void gnc_find_account_dialog (GtkWidget *parent, Account *account);

#ifdef __cplusplus
}
#endif

#endif
9 changes: 9 additions & 0 deletions gnucash/gnome/dialog-find-transactions.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,16 @@
#include "gnc-ledger-display.h"
#include "dialog-search.h"

#ifdef __cplusplus
extern "C"
{
#endif

GNCSearchWindow *
gnc_ui_find_transactions_dialog_create (GtkWindow *parent, GNCLedgerDisplay * ledger);

#ifdef __cplusplus
}
#endif

#endif
9 changes: 9 additions & 0 deletions gnucash/gnome/dialog-invoice.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ typedef struct _invoice_window InvoiceWindow;
#include "dialog-search.h"
#include "dialog-query-view.h"

#ifdef __cplusplus
extern "C"
{
#endif

typedef enum
{
INVSORT_BY_STANDARD = 0,
Expand Down Expand Up @@ -129,4 +134,8 @@ gboolean gnc_invoice_window_document_has_user_state (InvoiceWindow *iw);
void gnc_invoice_window_entryUpCB (GtkWidget *widget, gpointer data);
void gnc_invoice_window_entryDownCB (GtkWidget *widget, gpointer data);

#ifdef __cplusplus
}
#endif

#endif /* GNC_DIALOG_INVOICE_H_ */
8 changes: 8 additions & 0 deletions gnucash/gnome/dialog-job.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#ifndef GNC_DIALOG_JOB_H_
#define GNC_DIALOG_JOB_H_

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _job_window JobWindow;

#include "gncJob.h"
Expand All @@ -48,4 +52,8 @@ GNCSearchWindow * gnc_job_search (GtkWindow *parent, GncJob *start,
GNCSearchWindow * gnc_job_search_select (GtkWindow *parent, gpointer start, gpointer book);
GNCSearchWindow * gnc_job_search_edit (GtkWindow *parent, gpointer start, gpointer book);

#ifdef __cplusplus
}
#endif

#endif /* GNC_DIALOG_JOB_H_ */
9 changes: 9 additions & 0 deletions gnucash/gnome/dialog-lot-viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,18 @@

#include "Account.h"

#ifdef __cplusplus
extern "C"
{
#endif

typedef struct _GNCLotViewer GNCLotViewer;

/** Create and realize and show a lot-viewing dialog. */
GNCLotViewer * gnc_lot_viewer_dialog (GtkWindow *parent, Account *account);

#ifdef __cplusplus
}
#endif

#endif /* LOT_VIEWER_H */
8 changes: 8 additions & 0 deletions gnucash/gnome/dialog-payment.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
#ifndef _DIALOG_PAYMENT_H
#define _DIALOG_PAYMENT_H

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _payment_window PaymentWindow;

#include "gncOwner.h"
Expand Down Expand Up @@ -51,4 +55,8 @@ void gnc_ui_payment_window_set_amount (PaymentWindow *pw, gnc_numeric amount);
void gnc_ui_payment_window_set_postaccount (PaymentWindow *pw, const Account* account);
void gnc_ui_payment_window_set_xferaccount (PaymentWindow *pw, const Account* account);

#ifdef __cplusplus
}
#endif

#endif /* _DIALOG_PAYMENT_H */
9 changes: 9 additions & 0 deletions gnucash/gnome/dialog-print-check.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,19 @@

#include "print-session.h"

#ifdef __cplusplus
extern "C"
{
#endif

typedef struct _print_check_dialog PrintCheckDialog;

void gnc_ui_print_check_dialog_create(GtkWidget *parent,
GList *splits,
Account* account);

#ifdef __cplusplus
}
#endif

#endif
8 changes: 8 additions & 0 deletions gnucash/gnome/dialog-sx-editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#include "SchedXaction.h"
#include <gtk/gtk.h>

#ifdef __cplusplus
extern "C" {
#endif

#define DIALOG_SCHEDXACTION_CM_CLASS "dialog-scheduledtransactions"
#define DIALOG_SCHEDXACTION_EDITOR_CM_CLASS "dialog-scheduledtransaction-editor"

Expand All @@ -48,4 +52,8 @@ void gnc_ui_scheduled_xaction_editor_dialog_destroy(GncSxEditorDialog *sxd);
**/
void gnc_ui_sx_initialize (void);

#ifdef __cplusplus
}
#endif

#endif
8 changes: 8 additions & 0 deletions gnucash/gnome/dialog-vendor.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#ifndef GNC_DIALOG_VENDOR_H_
#define GNC_DIALOG_VENDOR_H_

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _vendor_window VendorWindow;

#include "gncVendor.h"
Expand All @@ -46,4 +50,8 @@ GNCSearchWindow * gnc_vendor_search (GtkWindow *parent, GncVendor *start, QofBoo
GNCSearchWindow * gnc_vendor_search_select (GtkWindow *parent, gpointer start, gpointer book);
GNCSearchWindow * gnc_vendor_search_edit (GtkWindow *parent, gpointer start, gpointer book);

#ifdef __cplusplus
}
#endif

#endif /* GNC_DIALOG_VENDOR_H_ */
9 changes: 9 additions & 0 deletions gnucash/gnome/gnc-plugin-business.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@

#include "gnc-plugin.h"

#ifdef __cplusplus
extern "C"
{
#endif

G_BEGIN_DECLS

/* type macros */
Expand All @@ -52,4 +57,8 @@ void gnc_invoice_remind_invoices_due_cb (void);
void gnc_plugin_business_split_reg_ui_update (GncPluginPage *plugin_page);


#ifdef __cplusplus
}
#endif

#endif /* __GNC_PLUGIN_BUSINESS_H */
10 changes: 10 additions & 0 deletions gnucash/gnome/gnc-plugin-page-register.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
#include "gnc-split-reg.h"
#include "Query.h"

#ifdef __cplusplus
extern "C"
{
#endif

G_BEGIN_DECLS

/* type macros */
Expand Down Expand Up @@ -177,5 +182,10 @@ G_END_DECLS
/** @} */
/** @} */


#ifdef __cplusplus
}
#endif

#endif /* __GNC_PLUGIN_PAGE_REGISTER_H */

0 comments on commit c345fc9

Please sign in to comment.