ResPluginCommon_t

A superclass structure that defines the common elements of a frugal or full resource editor

Synopsis:

        typedef struct ResPluginCommon_ {
                const char *name;
                ResDatatype_t datatype;
                int datatype_version;

                /* the common functions */
                const ResPluginSetDataF_t *set_data;
                const ResPluginDestroyF_t *destroy;
                        } ResPluginCommon_t;

Description:

This is a structure that contains elements common to a frugal editor and full editor, and is the superclass for the structures ResPluginFrugalEditor_t and ResPluginFullEditor_t.

The members are:

name
Uniquely identifies the plugin in the frugal_editors or full_editors array. It has to be unique in the array.
datatype
The type of resource the editor is designed to edit. ResDatatype_t is defined as:
typedef enum { RES_DATATYPE_STRING, RES_DATATYPE_MULTI, RES_DATATYPE_CODE, RES_DATATYPE_FONT, RES_DATATYPE_COLOR, RES_DATATYPE_DOUBLE, RES_DATATYPE_NUMERIC, RES_DATATYPE_CHOICE, RES_DATATYPE_FLAG, RES_DATATYPE_PATTERN, RES_DATATYPE_LIST, RES_DATATYPE_PIXMAP, RES_DATATYPE_ALLOC } ResDatatype_t;
datatype_version
The version of the datatype that this plugin understands. All the datatypes, as described in this document, have the version 1, defined as the constant RESPLUGIN_DATATYPE_VERSION:
#define RESPLUGIN_DATATYPE_VERSION 1
Plugins should use this constant as the datatype_version. For instance, it means that a RES_DATATYPE_PIXMAP editor understands the pixmap type version 1, as described in this chapter. It's possible that in the future there will be changes to some data types. For example, if the definition of PgColor_t changed, then RES_DATATYPE_COLOR would require a version 2 editor to handle the changes.
set_data;
A pointer to the ResPluginSetDataF_t function for the resource editor.
destroy;
A pointer to the ResPluginDestroyF_t function for the resource editor.

Classification:

Photon

See also:

ResPluginDestroyF_t, ResPluginFrugalEditor_t, ResPluginFullEditor_t, ResPluginSetDataF_t.