GIMP Module Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# GimpModule

## Name

GimpModule -- Common definitions for creating a pluggable GIMP module.

## Synopsis

    struct      GimpModule;
    struct      GimpModuleInfo;
    enum        GimpModuleState;
    const GimpModuleInfo* (*GimpModuleQueryFunc)
                                                (GTypeModule *module);
    gboolean    (*GimpModuleRegisterFunc)       (GTypeModule *module);
    GimpModule* gimp_module_new                 (const gchar *filename,
                                                 gboolean load_inhibit,
                                                 gboolean verbose);
    void        gimp_module_modified            (GimpModule *module);
    gboolean    gimp_module_query_module        (GimpModule *module);
    void        gimp_module_set_load_inhibit    (GimpModule *module,
                                                 gboolean load_inhibit);
    const gchar* gimp_module_state_name         (GimpModuleState state);
    GimpModuleInfo* gimp_module_info_new        (const gchar *purpose,
                                                 const gchar *author,
                                                 const gchar *version,
                                                 const gchar *copyright,
                                                 const gchar *date);
    GimpModuleInfo* gimp_module_info_copy       (const GimpModuleInfo *info);
    void        gimp_module_info_free           (GimpModuleInfo *info);

## Object Hierarchy

      GObject
       +----GTypeModule
             +----GimpModule

## Signal Prototypes

    "modified"  void        user_function      (GimpModule *gimpmodule,
                                                gpointer user_data);

## Description

Common definitions for creating a pluggable GIMP module.

## Details

### struct GimpModule

    struct GimpModule;

### struct GimpModuleInfo

    struct GimpModuleInfo
    {
      gchar *purpose;
      gchar *author;
      gchar *version;
      gchar *copyright;
      gchar *date;
    };

### enum GimpModuleState

    typedef enum
    {
      GIMP_MODULE_STATE_ERROR,       /* missing gimp_module_register function
                                      * or other error
                                      */
      GIMP_MODULE_STATE_LOADED,      /* an instance of a type implemented by
                                      * this module is allocated
                                      */
      GIMP_MODULE_STATE_LOAD_FAILED, /* gimp_module_register returned FALSE
                                      */
      GIMP_MODULE_STATE_NOT_LOADED   /* there are no instances allocated of
                                      * types implemented by this module
                                      */
    } GimpModuleState;

### GimpModuleQueryFunc ()

    const GimpModuleInfo* (*GimpModuleQueryFunc)
                                                (GTypeModule *module);

`module` : |
Returns : |

### GimpModuleRegisterFunc ()

    gboolean    (*GimpModuleRegisterFunc)       (GTypeModule *module);

`module` : |
Returns : |

### gimp_module_new ()

    GimpModule* gimp_module_new                 (const gchar *filename,
                                                 gboolean load_inhibit,
                                                 gboolean verbose);

`filename` : |
`load_inhibit` : |
`verbose` : |
Returns : |

### gimp_module_modified ()

    void        gimp_module_modified            (GimpModule *module);

`module` : |

### gimp_module_query_module ()

    gboolean    gimp_module_query_module        (GimpModule *module);

`module` : |
Returns : |

### gimp_module_set_load_inhibit ()

    void        gimp_module_set_load_inhibit    (GimpModule *module,
                                                 gboolean load_inhibit);

`module` : |
`load_inhibit` : |

### gimp_module_state_name ()

    const gchar* gimp_module_state_name         (GimpModuleState state);

`state` : |
Returns : |

### gimp_module_info_new ()

    GimpModuleInfo* gimp_module_info_new        (const gchar *purpose,
                                                 const gchar *author,
                                                 const gchar *version,
                                                 const gchar *copyright,
                                                 const gchar *date);

`purpose` : |
`author` : |
`version` : |
`copyright` : |
`date` : |
Returns : |

### gimp_module_info_copy ()

    GimpModuleInfo* gimp_module_info_copy       (const GimpModuleInfo *info);

`info` : |
Returns : |

### gimp_module_info_free ()

    void        gimp_module_info_free           (GimpModuleInfo *info);

`info` : |

## Signals

### The "modified" signal

    void        user_function                  (GimpModule *gimpmodule,
                                                gpointer user_data);

`gimpmodule` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

## See Also

GModule

GTypeModule

<<< Previous Page | Home | Up | Next Page >>>
GIMP Module Library | GimpModuleDB