Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/plugin_api.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/plugin_api.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/plugin_api.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/plugin_api.html on line 8

The resource editor API

This chapter lists the structures that support the resource editor plugin API, the functions exported by PhAB that support the API, and the functions you need to provide in your plugin.

Resource editor code is put in a DLL. You can put one, two, or more resource editors into a single DLL. Alternatively, you can put the frugal resource editor for a resource type in one DLL, and the full editor in another. Each DLL is organized as an addon that uses the Addon Interface API.

The DLL must declare the addon interface as:

#define RESPLUGIN_VERSION 202

AOInterface_t interfaces[]=
{
  { "PhAB Resource Editors", RESPLUGIN_VERSION, &tab },
  { 0,0,0 }
};

Note that the RESPLUGIN_VERSION is defined as 202.

The tab variable must point to an instance of the ResPlugin_t structure.

Resource Editor API structures

You have to provide all the methods defined in ResPlugin_t, ResPluginFrugalEditor_t, and ResPluginFullEditor_t in the resource editor plugin, otherwise PhAB will not load and use the plugin.

When a new plugin instance is created, it is given a pointer to a structure that is exported from PhAB to the plugin and contains functions that the plugin can call into PhAB. All these functions take at least a PhABHandle_t as an argument.

Functions defined in ResPlugin_t that you must provide in the plugin:

Functions defined in ResPluginCommon_t that you must provide in the plugin:

Functions defined in ResPluginFrugalEditor_t that you must provide in the plugin:

Functions defined in ResPluginFullEditor_t that you must provide in the plugin:

Functions exported from PhAB

The resource editor's window supporting functions

These functions are exported from PhAB in the PhABResExportFull_t structure, which is passed as a pointer when the plugin instance is created. They are convenience functions that a full editor can use in order to ensure a consistent look for the resource editor windows. We recommend that you use these functions to create and manage the editor window, except for the case when your plugin spawns an external application. In that case the external application should provide the window.


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/plugin_api.html on line 170

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/plugin_api.html on line 170