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);
|
||||
|
||||
|
||||
typedef gpointer (*SplitCallback)(Split *s, gpointer data);
|
||||
gpointer xaccAccountForEachSplit(Account *account,
|
||||
gpointer (*thunk)(Split *s, gpointer data),
|
||||
SplitCallback,
|
||||
gpointer data);
|
||||
|
||||
/* 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
|
||||
transaction was traversed exactly once. */
|
||||
typedef gboolean (*TransactionCallback)(Transaction *t, void *data);
|
||||
gboolean
|
||||
xaccAccountForEachTransaction(Account *account,
|
||||
gboolean (*proc)(Transaction *t, void *data),
|
||||
TransactionCallback,
|
||||
void *data);
|
||||
|
||||
/* Visit every transaction in the account that hasn't already been
|
||||
@ -360,8 +362,7 @@ xaccAccountForEachTransaction(Account *account,
|
||||
transaction was traversed exactly once. */
|
||||
gboolean
|
||||
xaccAccountVisitUnvisitedTransactions(Account *account,
|
||||
gboolean (*proc)(Transaction *t,
|
||||
void *data),
|
||||
TransactionCallback,
|
||||
void *data,
|
||||
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
|
||||
the result list */
|
||||
typedef gpointer (*AccountCallback)(Account *a, gpointer data);
|
||||
GSList *xaccGroupMapAccounts(AccountGroup *grp,
|
||||
gpointer (*thunk)(Account *a, gpointer data),
|
||||
AccountCallback,
|
||||
gpointer data);
|
||||
|
||||
/* The xaccGroupForEachAccount() method will traverse the AccountGroup
|
||||
@ -180,8 +181,7 @@ GSList *xaccGroupMapAccounts(AccountGroup *grp,
|
||||
*/
|
||||
|
||||
gpointer xaccGroupForEachAccount (AccountGroup *grp,
|
||||
gpointer (*func) (Account *a,
|
||||
gpointer data),
|
||||
AccountCallback,
|
||||
gpointer data,
|
||||
gboolean deeply);
|
||||
|
||||
@ -266,10 +266,10 @@ gboolean xaccSplitTransactionTraverse(Split *split, int stage);
|
||||
* a traversal is undefined, so don't do that.
|
||||
*/
|
||||
|
||||
int
|
||||
xaccGroupStagedTransactionTraversal(AccountGroup *grp,
|
||||
typedef int (*TransactionCallbackInt)(Transaction *t, void *data);
|
||||
int xaccGroupStagedTransactionTraversal(AccountGroup *grp,
|
||||
unsigned int stage,
|
||||
int (*thunk)(Transaction *t, void *data),
|
||||
TransactionCallbackInt,
|
||||
void *data);
|
||||
|
||||
/* xaccAccountStagedTransactionTraversal() calls thunk on each
|
||||
@ -286,8 +286,7 @@ xaccGroupStagedTransactionTraversal(AccountGroup *grp,
|
||||
|
||||
int xaccAccountStagedTransactionTraversal(Account *a,
|
||||
unsigned int stage,
|
||||
int (*thunk)(Transaction *t,
|
||||
void *data),
|
||||
TransactionCallbackInt,
|
||||
void *data);
|
||||
|
||||
/* Traverse all of the transactions in the given account group.
|
||||
@ -307,7 +306,7 @@ int xaccAccountStagedTransactionTraversal(Account *a,
|
||||
transaction was traversed exactly once. */
|
||||
gboolean
|
||||
xaccGroupForEachTransaction(AccountGroup *g,
|
||||
gboolean (*proc)(Transaction *t, void *data),
|
||||
TransactionCallback,
|
||||
void *data);
|
||||
|
||||
/* Visit every transaction in the account that hasn't already been
|
||||
@ -321,8 +320,7 @@ xaccGroupForEachTransaction(AccountGroup *g,
|
||||
transaction was traversed exactly once. */
|
||||
gboolean
|
||||
xaccGroupVisitUnvisitedTransactions(AccountGroup *g,
|
||||
gboolean (*proc)(Transaction *t,
|
||||
void *data),
|
||||
TransactionCallback,
|
||||
void *data,
|
||||
GHashTable *visited_txns);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user