On Saturday 25 February 2006 9:07 pm, Derek Atkins wrote: > >> I'd propose: > >> > >> typedef void (*QofEventHandlerWithArg)(QofEntity*, QofEventId, > >> gpointer);
Umm, those are the exact arguments that we already have for QofEventHandler. Did you actually mean: typedef void (*QofEventHandlerWithArg)(QofEntity*, QofEventId, gpointer handler_data, gpointer event_data); ? Or just that the existing gpointer should be handled differently? (which could be confusing.) Currently, the gpointer is set when the handler is registered, not when it is used after an event is generated. Do you need both? Is the current gpointer used? Maybe if the qof_event_register_handler_with_arg sets the original gpointer in HandlerInfo as NULL and uses the gpointer passed from qof_event_gen_with_arg instead? Then the handler prototype would be the same but the implementation would differ according to HOW the prototype is registered. That's confusing too. Using two prototypes that take the same arguments but handle them differently will need some careful documentation. > >> void qof_event_add_handler_with_arg(QofEventHandlerWithArg); qof_event_regsister_handler_with_arg > >> void qof_event_del_handler_with_arg(QofEventHandlerWithArg); qof_event_unregister_handler_with_arg > >> void qof_event_with_arg(QofEntity*, QofEventId, gpointer); qof_event_gen_with_arg -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
pgpe0Peot1ZYP.pgp
Description: PGP signature
_______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel