GnuCash  4.8a-80-g9825132ea+
Macros | Typedefs | Functions

QOF event handling interface. More...

#include "qof.h"

Go to the source code of this file.

Macros

#define QOF_MAKE_EVENT(x)   (1<<(x))
 Allow application-specific events to be created. More...
 
#define QOF_EVENT_BASE   8
 Allow scope for more defaults in future. More...
 
#define QOF_EVENT_NONE   (0)
 Default events for backwards compatibility. More...
 
#define QOF_EVENT_CREATE   QOF_MAKE_EVENT(0)
 
#define QOF_EVENT_MODIFY   QOF_MAKE_EVENT(1)
 
#define QOF_EVENT_DESTROY   QOF_MAKE_EVENT(2)
 
#define QOF_EVENT_ADD   QOF_MAKE_EVENT(3)
 
#define QOF_EVENT_REMOVE   QOF_MAKE_EVENT(4)
 
#define QOF_EVENT__LAST   QOF_MAKE_EVENT(QOF_EVENT_BASE-1)
 
#define QOF_EVENT_ALL   (0xff)
 

Typedefs

typedef gint QofEventId
 Define the type of events allowed. More...
 
typedef void(* QofEventHandler) (QofInstance *ent, QofEventId event_type, gpointer handler_data, gpointer event_data)
 Handler invoked when an event is generated. More...
 

Functions

gint qof_event_register_handler (QofEventHandler handler, gpointer handler_data)
 Register a handler for events. More...
 
void qof_event_unregister_handler (gint handler_id)
 Unregister an event handler. More...
 
void qof_event_gen (QofInstance *entity, QofEventId event_type, gpointer event_data)
 Invoke all registered event handlers using the given arguments. More...
 
void qof_event_suspend (void)
 Suspend all engine events. More...
 
void qof_event_resume (void)
 Resume engine event generation. More...
 

Detailed Description

QOF event handling interface.

Author
Copyright 2000 Dave Peticolas dave@.nosp@m.kron.nosp@m.do.co.nosp@m.m
Copyright 2006 Neil Williams linux.nosp@m.@cod.nosp@m.ehelp.nosp@m..co..nosp@m.uk

Definition in file qofevent.h.