mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
use callback function typedefs in prototypes
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4986 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
322a693ec6
commit
03f42dbf11
@ -327,8 +327,9 @@ void xaccAccountSetQuoteTZ (Account *account, const char *tz);
|
|||||||
const char * xaccAccountGetQuoteTZ (Account *account);
|
const char * xaccAccountGetQuoteTZ (Account *account);
|
||||||
|
|
||||||
|
|
||||||
|
typedef gpointer (*SplitCallback)(Split *s, gpointer data);
|
||||||
gpointer xaccAccountForEachSplit(Account *account,
|
gpointer xaccAccountForEachSplit(Account *account,
|
||||||
gpointer (*thunk)(Split *s, gpointer data),
|
SplitCallback,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
/* Traverse all of the transactions in the given account. Continue
|
/* Traverse all of the transactions in the given account. Continue
|
||||||
@ -344,9 +345,10 @@ gpointer xaccAccountForEachSplit(Account *account,
|
|||||||
|
|
||||||
The result of this function will not be FALSE IFF every relevant
|
The result of this function will not be FALSE IFF every relevant
|
||||||
transaction was traversed exactly once. */
|
transaction was traversed exactly once. */
|
||||||
|
typedef gboolean (*TransactionCallback)(Transaction *t, void *data);
|
||||||
gboolean
|
gboolean
|
||||||
xaccAccountForEachTransaction(Account *account,
|
xaccAccountForEachTransaction(Account *account,
|
||||||
gboolean (*proc)(Transaction *t, void *data),
|
TransactionCallback,
|
||||||
void *data);
|
void *data);
|
||||||
|
|
||||||
/* Visit every transaction in the account that hasn't already been
|
/* Visit every transaction in the account that hasn't already been
|
||||||
@ -360,8 +362,7 @@ xaccAccountForEachTransaction(Account *account,
|
|||||||
transaction was traversed exactly once. */
|
transaction was traversed exactly once. */
|
||||||
gboolean
|
gboolean
|
||||||
xaccAccountVisitUnvisitedTransactions(Account *account,
|
xaccAccountVisitUnvisitedTransactions(Account *account,
|
||||||
gboolean (*proc)(Transaction *t,
|
TransactionCallback,
|
||||||
void *data),
|
|
||||||
void *data,
|
void *data,
|
||||||
GHashTable *visited_txns);
|
GHashTable *visited_txns);
|
||||||
|
|
||||||
|
@ -167,8 +167,9 @@ Account * xaccGroupGetParentAccount (AccountGroup *group);
|
|||||||
|
|
||||||
/* if the function returns null for a given item, it won't show up in
|
/* if the function returns null for a given item, it won't show up in
|
||||||
the result list */
|
the result list */
|
||||||
|
typedef gpointer (*AccountCallback)(Account *a, gpointer data);
|
||||||
GSList *xaccGroupMapAccounts(AccountGroup *grp,
|
GSList *xaccGroupMapAccounts(AccountGroup *grp,
|
||||||
gpointer (*thunk)(Account *a, gpointer data),
|
AccountCallback,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
/* The xaccGroupForEachAccount() method will traverse the AccountGroup
|
/* The xaccGroupForEachAccount() method will traverse the AccountGroup
|
||||||
@ -180,8 +181,7 @@ GSList *xaccGroupMapAccounts(AccountGroup *grp,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
gpointer xaccGroupForEachAccount (AccountGroup *grp,
|
gpointer xaccGroupForEachAccount (AccountGroup *grp,
|
||||||
gpointer (*func) (Account *a,
|
AccountCallback,
|
||||||
gpointer data),
|
|
||||||
gpointer data,
|
gpointer data,
|
||||||
gboolean deeply);
|
gboolean deeply);
|
||||||
|
|
||||||
@ -266,10 +266,10 @@ gboolean xaccSplitTransactionTraverse(Split *split, int stage);
|
|||||||
* a traversal is undefined, so don't do that.
|
* a traversal is undefined, so don't do that.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
typedef int (*TransactionCallbackInt)(Transaction *t, void *data);
|
||||||
xaccGroupStagedTransactionTraversal(AccountGroup *grp,
|
int xaccGroupStagedTransactionTraversal(AccountGroup *grp,
|
||||||
unsigned int stage,
|
unsigned int stage,
|
||||||
int (*thunk)(Transaction *t, void *data),
|
TransactionCallbackInt,
|
||||||
void *data);
|
void *data);
|
||||||
|
|
||||||
/* xaccAccountStagedTransactionTraversal() calls thunk on each
|
/* xaccAccountStagedTransactionTraversal() calls thunk on each
|
||||||
@ -286,8 +286,7 @@ xaccGroupStagedTransactionTraversal(AccountGroup *grp,
|
|||||||
|
|
||||||
int xaccAccountStagedTransactionTraversal(Account *a,
|
int xaccAccountStagedTransactionTraversal(Account *a,
|
||||||
unsigned int stage,
|
unsigned int stage,
|
||||||
int (*thunk)(Transaction *t,
|
TransactionCallbackInt,
|
||||||
void *data),
|
|
||||||
void *data);
|
void *data);
|
||||||
|
|
||||||
/* Traverse all of the transactions in the given account group.
|
/* Traverse all of the transactions in the given account group.
|
||||||
@ -307,7 +306,7 @@ int xaccAccountStagedTransactionTraversal(Account *a,
|
|||||||
transaction was traversed exactly once. */
|
transaction was traversed exactly once. */
|
||||||
gboolean
|
gboolean
|
||||||
xaccGroupForEachTransaction(AccountGroup *g,
|
xaccGroupForEachTransaction(AccountGroup *g,
|
||||||
gboolean (*proc)(Transaction *t, void *data),
|
TransactionCallback,
|
||||||
void *data);
|
void *data);
|
||||||
|
|
||||||
/* Visit every transaction in the account that hasn't already been
|
/* Visit every transaction in the account that hasn't already been
|
||||||
@ -321,8 +320,7 @@ xaccGroupForEachTransaction(AccountGroup *g,
|
|||||||
transaction was traversed exactly once. */
|
transaction was traversed exactly once. */
|
||||||
gboolean
|
gboolean
|
||||||
xaccGroupVisitUnvisitedTransactions(AccountGroup *g,
|
xaccGroupVisitUnvisitedTransactions(AccountGroup *g,
|
||||||
gboolean (*proc)(Transaction *t,
|
TransactionCallback,
|
||||||
void *data),
|
|
||||||
void *data,
|
void *data,
|
||||||
GHashTable *visited_txns);
|
GHashTable *visited_txns);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user