Sunday, September 27, 2009

C API : Callback functions


The C API now provides a way for C programs to respond to changes in the model. The following code will set "f" as a callback function:

void f();

void tc_main()
{
tc_callback( f );
}

The callback function will be triggered whenever the dataChanged() signal is emitted, which indicates that one of the following has occurred: items inserted or deleted, some table value has changed, an item has been renamed.

No comments: