00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00034 #ifndef QOF_EVENT_H
00035 #define QOF_EVENT_H
00036
00037 #include "qof.h"
00038
00040 typedef gint QofEventId;
00041
00053 #define QOF_MAKE_EVENT(x) (1<<(x))
00054
00057 #define QOF_EVENT_BASE 8
00058
00069 #define QOF_EVENT_NONE (0)
00070
00071 #define QOF_EVENT_CREATE QOF_MAKE_EVENT(0)
00072
00079 #define QOF_EVENT_MODIFY QOF_MAKE_EVENT(1)
00080
00081 #define QOF_EVENT_DESTROY QOF_MAKE_EVENT(2)
00082 #define QOF_EVENT_ADD QOF_MAKE_EVENT(3)
00083 #define QOF_EVENT_REMOVE QOF_MAKE_EVENT(4)
00084
00092 #define QOF_EVENT_COMMIT QOF_MAKE_EVENT(5)
00093 #define QOF_EVENT__LAST QOF_MAKE_EVENT(QOF_EVENT_BASE-1)
00094 #define QOF_EVENT_ALL (0xff)
00095
00104 typedef void (*QofEventHandler) (QofEntity * ent, QofEventId event_type,
00105 gpointer handler_data, gpointer event_data);
00106
00114 gint qof_event_register_handler (QofEventHandler handler,
00115 gpointer handler_data);
00116
00121 void qof_event_unregister_handler (gint handler_id);
00122
00144 void qof_event_gen (QofEntity * entity, QofEventId event_type,
00145 gpointer event_data);
00146
00153 void qof_event_suspend (void);
00154
00156 void qof_event_resume (void);
00157
00158 #endif
00159