A function you must write to indicate there are changes in the resource editor data
typedef int ResPluginAnyChangesF_t ( ResPluginHandle_t handle )
This function is exported in the ResPluginFullEditor_t structure.
This function is called by PhAB to ask the full editor whether it contains changes or not. If there are no changes, the plugin should return RESPLUGIN_NO_CHANGES. If there are changes, the plugin should return RESPLUGIN_CHANGES.
The plugin can also return RESPLUGIN_WAIT if it cannot answer right away. In this case the plugin has to call back later into PhAB, using the answer_changes() function. PhAB will not destroy the plugin instance until the call to answer_changes() is made. The RESPLUGIN_WAIT can be used in the case where the plugin spawns an external application to edit the resource, as described in the Plugin lifecycle section.
This function should return one of:
This sample function is from the complete plugin example at the end of this chapter.
static int plugin_full_any_changes( ResPluginHandle_t handle ) { PluginFullInstance_t *instance = ( PluginFullInstance_t * ) handle; char *p; PtGetResource( instance->full_widget, Pt_ARG_TEXT_STRING, &p, 0 ); if( !strcmp( p, instance->value_master ) ) return RESPLUGIN_NO_CHANGES; return RESPLUGIN_CHANGES; }
QNX Neutrino
answer_changes(), ResPluginFrugalCreateF_t, ResPluginFullCreateF_t, ResPluginFullEditor_t.