![]() |
![]() |
![]() |
Pigment 0.3 Reference Manual | ![]() |
---|---|---|---|---|
#include <pgm/pgm.h> #define PGM_PLUGIN_PATH_NAME gboolean (*PgmPluginInitFunc) (void); gboolean (*PgmPluginShutdownFunc) (void); PgmViewport* (*PgmPluginCreateFunc) (void); PgmPluginDesc; #define PGM_PLUGIN_DEFINE (init,shutdown,create,name,description,license,origin,author)
Various structs and macros used by Pigment for plugins handling.
Last reviewed on 2007-04-12 (0.1.5)
#define PGM_PLUGIN_PATH_NAME "PGM_PLUGIN_PATH"
The name of the plugin path environment variable name.
gboolean (*PgmPluginInitFunc) (void);
A plugin should provide a pointer to a function of this type in the PgmPluginDesc struct. This function will be called to initialize the plugin.
Returns : | TRUE if the initialization successes, FALSE otherwise.
|
gboolean (*PgmPluginShutdownFunc) (void);
A plugin should provide a pointer to a function of this type in the PgmPluginDesc struct. This function will be called to shutdown the plugin.
Returns : | TRUE if the deinitialization successes, FALSE otherwise.
|
PgmViewport* (*PgmPluginCreateFunc) (void);
A plugin should provide a pointer to a function of this prototype in the
PgmPluginDesc
struct. This function will be called by the user to create
the PgmViewport
.
Returns : | a new PgmViewport. |
typedef struct { PgmPluginInitFunc init; PgmPluginShutdownFunc shutdown; PgmPluginCreateFunc create; gchar *name; gchar *description; gchar *license; gchar *origin; gchar *author; } PgmPluginDesc;
Pigment Plugin description structure.
PgmPluginInitFunc init ; |
the plugin initialization function pointer. |
PgmPluginShutdownFunc shutdown ; |
the plugin shutdown function pointer. |
PgmPluginCreateFunc create ; |
the plugin create function pointer (returning a PgmViewport ).
|
gchar *name ; |
the plugin name. |
gchar *description ; |
the plugin description. |
gchar *license ; |
the plugin license. |
gchar *origin ; |
the plugin origin URL. |
gchar *author ; |
the plugin author. |
#define PGM_PLUGIN_DEFINE(init,shutdown,create,name,description,license,origin,author)
Utility macro to create a PgmPluginDesc plugin description structure. This is the entry point for every Pigment plugin and it is highly recommended to use this macro to avoid common mistakes making entry point unusable.
init : |
the plugin initialization function pointer. |
shutdown : |
the plugin shutdown function pointer. |
create : |
the plugin creation function pointer (returning a PgmViewport ).
|
name : |
the plugin name. |
description : |
the plugin description. |
license : |
the plugin license. |
origin : |
the plugin origin URL. |
author : |
the plugin author. |