add #ifdef __cplusplus extern "C" {} wrappers to .h files

This commit is contained in:
Christopher Lam 2024-02-24 17:58:15 +08:00
parent 68b3f976f4
commit c345fc9d3c
25 changed files with 213 additions and 0 deletions

View File

@ -30,6 +30,11 @@
#include <gtk/gtk.h>
#include <gnc-date.h>
#ifdef __cplusplus
extern "C"
{
#endif
/***********************************************************************\
* gnc_dup_trans_dialog *
@ -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

View File

@ -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
@ -40,4 +44,8 @@ void gnc_ui_object_references_show( const gchar* explanation, GList* objlist );
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* DIALOG_OBJECT_REFERENCES_H */

View File

@ -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)
@ -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

View File

@ -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

View File

@ -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

View File

@ -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 *
@ -37,5 +42,8 @@
* Return: nothing *
\********************************************************************/
void gnc_stock_split_dialog (GtkWidget *parent, Account * initial);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -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"
@ -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_ */

View File

@ -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
@ -68,4 +72,8 @@ void gnc_doclink_business_dialog (GtkWindow *parent);
*/
void gnc_doclink_trans_dialog (GtkWindow *parent);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -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"
@ -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_ */

View File

@ -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

View File

@ -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

View File

@ -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,
@ -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_ */

View File

@ -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"
@ -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_ */

View File

@ -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 */

View File

@ -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"
@ -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 */

View File

@ -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

View File

@ -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"
@ -48,4 +52,8 @@ void gnc_ui_scheduled_xaction_editor_dialog_destroy(GncSxEditorDialog *sxd);
**/
void gnc_ui_sx_initialize (void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -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"
@ -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_ */

View File

@ -29,6 +29,11 @@
#include "gnc-plugin.h"
#ifdef __cplusplus
extern "C"
{
#endif
G_BEGIN_DECLS
/* type macros */
@ -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 */

View File

@ -43,6 +43,11 @@
#include "gnc-split-reg.h"
#include "Query.h"
#ifdef __cplusplus
extern "C"
{
#endif
G_BEGIN_DECLS
/* type macros */
@ -177,5 +182,10 @@ G_END_DECLS
/** @} */
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* __GNC_PLUGIN_PAGE_REGISTER_H */

View File

@ -32,6 +32,11 @@
#include "gnc-ledger-display.h"
#include "gnucash-register.h"
#ifdef __cplusplus
extern "C"
{
#endif
#define GNC_SPLIT_REG(obj) G_TYPE_CHECK_INSTANCE_CAST( obj, gnc_split_reg_get_type(), GNCSplitReg )
#define GNC_SPLIT_REG_CLASS(klass) G_TYPE_CHECK_CLASS_CAST( klass, gnc_split_reg_get_type(), GNCSplitRegClass )
#define IS_GNC_SPLIT_REG(obj) G_TYPE_CHECK_INSTANCE_TYPE( obj, gnc_split_reg_get_type() )
@ -308,4 +313,8 @@ gchar *gsr_get_register_state_section (GNCSplitReg *gsr);
void gnc_split_reg_set_moved_cb( GNCSplitReg *gsr, GFunc cb, gpointer cb_data );
#ifdef __cplusplus
}
#endif
#endif /* GNC_SPLIT_REG_H */

View File

@ -23,9 +23,18 @@
#ifndef WINDOW_AUTOCLEAR_H
#define WINDOW_AUTOCLEAR_H
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct _AutoClearWindow AutoClearWindow;
AutoClearWindow *autoClearWindow (GtkWidget *parent, Account *account);
void gnc_ui_autoclear_window_raise(AutoClearWindow * autoClearData);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -25,6 +25,11 @@
#ifndef GNC_LEDGER_DISPLAY_H
#define GNC_LEDGER_DISPLAY_H
#ifdef __cplusplus
extern "C"
{
#endif
#include <glib.h>
#include "Account.h"
@ -131,4 +136,8 @@ void gnc_ledger_display_close (GNCLedgerDisplay* ledger_display);
* mode by default */
gboolean gnc_ledger_display_default_double_line (GNCLedgerDisplay* gld);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -25,6 +25,10 @@
#include "split-register-model.h"
#include "table-allgui.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @ingroup Register
* @addtogroup Gnome
* @{
@ -112,5 +116,9 @@ gboolean gnucash_sheet_is_read_only (GnucashSheet *sheet);
void gnucash_sheet_set_has_focus (GnucashSheet *sheet, gboolean has_focus);
#ifdef __cplusplus
}
#endif
/** @} */
#endif

View File

@ -34,6 +34,11 @@
#include "gnc-engine.h"
#ifdef __cplusplus
extern "C"
{
#endif
/** @name Cleanup functions for business objects
* Provides the high-level API for checking and repairing ('scrubbing
* clean') the various data objects used by the business functions.
@ -104,6 +109,10 @@ void gncScrubBusinessAccount (Account *acc, QofPercentageFunc percentagefunc);
*/
void gncScrubBusinessAccountTree (Account *acc, QofPercentageFunc percentagefunc);
#ifdef __cplusplus
}
#endif
/** @} */
#endif /* GNC_SCRUBBUSINESS_H */
/** @} */