|
Packit Service |
2781ba |
/* Originally from: LIBGIMP - The GIMP Library
|
|
Packit Service |
2781ba |
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
|
Packit Service |
2781ba |
*
|
|
Packit Service |
2781ba |
* This library is free software; you can redistribute it and/or
|
|
Packit Service |
2781ba |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
2781ba |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
2781ba |
* version 3 of the License, or (at your option) any later version.
|
|
Packit Service |
2781ba |
*
|
|
Packit Service |
2781ba |
* This library is distributed in the hope that it will be useful,
|
|
Packit Service |
2781ba |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
2781ba |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
2781ba |
* Lesser General Public License for more details.
|
|
Packit Service |
2781ba |
*
|
|
Packit Service |
2781ba |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
2781ba |
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
|
|
Packit Service |
2781ba |
*
|
|
Packit Service |
2781ba |
* (C) 1999 Austin Donnelly <austin@gimp.org>
|
|
Packit Service |
2781ba |
*/
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
#ifndef __GEGL_MODULE_H__
|
|
Packit Service |
2781ba |
#define __GEGL_MODULE_H__
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
#include <gmodule.h>
|
|
Packit Service |
2781ba |
#include "gegl-plugin.h"
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
G_BEGIN_DECLS
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
typedef enum
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GEGL_MODULE_STATE_ERROR, /* missing gegl_module_register function
|
|
Packit Service |
2781ba |
* or other error
|
|
Packit Service |
2781ba |
*/
|
|
Packit Service |
2781ba |
GEGL_MODULE_STATE_LOADED, /* an instance of a type implemented by
|
|
Packit Service |
2781ba |
* this module is allocated
|
|
Packit Service |
2781ba |
*/
|
|
Packit Service |
2781ba |
GEGL_MODULE_STATE_LOAD_FAILED, /* gegl_module_register returned FALSE
|
|
Packit Service |
2781ba |
*/
|
|
Packit Service |
2781ba |
GEGL_MODULE_STATE_NOT_LOADED /* there are no instances allocated of
|
|
Packit Service |
2781ba |
* types implemented by this module
|
|
Packit Service |
2781ba |
*/
|
|
Packit Service |
2781ba |
} GeglModuleState;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
typedef const GeglModuleInfo * (* GeglModuleQueryFunc) (GTypeModule *module);
|
|
Packit Service |
2781ba |
typedef gboolean (* GeglModuleRegisterFunc) (GTypeModule *module);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
#define GEGL_TYPE_MODULE (gegl_module_get_type ())
|
|
Packit Service |
2781ba |
#define GEGL_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_MODULE, GeglModule))
|
|
Packit Service |
2781ba |
#define GEGL_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_MODULE, GeglModuleClass))
|
|
Packit Service |
2781ba |
#define GEGL_IS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_MODULE))
|
|
Packit Service |
2781ba |
#define GEGL_IS_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_MODULE))
|
|
Packit Service |
2781ba |
#define GEGL_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_MODULE, GeglModuleClass))
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
typedef struct _GeglModuleClass GeglModuleClass;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
struct _GeglModule
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GTypeModule parent_instance;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
/*< public >*/
|
|
Packit Service |
2781ba |
gchar *filename; /* path to the module */
|
|
Packit Service |
2781ba |
gboolean verbose; /* verbose error reporting */
|
|
Packit Service |
2781ba |
GeglModuleState state; /* what's happened to the module */
|
|
Packit Service |
2781ba |
gboolean on_disk; /* TRUE if file still exists */
|
|
Packit Service |
2781ba |
gboolean load_inhibit; /* user requests not to load at boot time */
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
/* stuff from now on may be NULL depending on the state the module is in */
|
|
Packit Service |
2781ba |
/*< private >*/
|
|
Packit Service |
2781ba |
GModule *module; /* handle on the module */
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
/*< public >*/
|
|
Packit Service |
2781ba |
GeglModuleInfo *info; /* returned values from module_query */
|
|
Packit Service |
2781ba |
gchar *last_module_error;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
/*< private >*/
|
|
Packit Service |
2781ba |
GeglModuleQueryFunc query_module;
|
|
Packit Service |
2781ba |
GeglModuleRegisterFunc register_module;
|
|
Packit Service |
2781ba |
};
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
struct _GeglModuleClass
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GTypeModuleClass parent_class;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
void (* modified) (GeglModule *module);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
/* Padding for future expansion */
|
|
Packit Service |
2781ba |
void (* _gegl_reserved1) (void);
|
|
Packit Service |
2781ba |
void (* _gegl_reserved2) (void);
|
|
Packit Service |
2781ba |
void (* _gegl_reserved3) (void);
|
|
Packit Service |
2781ba |
void (* _gegl_reserved4) (void);
|
|
Packit Service |
2781ba |
};
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
GType gegl_module_get_type (void) G_GNUC_CONST;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
GeglModule * gegl_module_new (const gchar *filename,
|
|
Packit Service |
2781ba |
gboolean load_inhibit,
|
|
Packit Service |
2781ba |
gboolean verbose);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
gboolean gegl_module_query_module (GeglModule *module);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
void gegl_module_modified (GeglModule *module);
|
|
Packit Service |
2781ba |
void gegl_module_set_load_inhibit (GeglModule *module,
|
|
Packit Service |
2781ba |
gboolean load_inhibit);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
const gchar * gegl_module_state_name (GeglModuleState state);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
/* GeglModuleInfo functions */
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
GeglModuleInfo * gegl_module_info_new (guint32 abi_version);
|
|
Packit Service |
2781ba |
GeglModuleInfo * gegl_module_info_copy (const GeglModuleInfo *info);
|
|
Packit Service |
2781ba |
void gegl_module_info_free (GeglModuleInfo *info);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
GType
|
|
Packit Service |
2781ba |
gegl_module_register_type (GTypeModule *module,
|
|
Packit Service |
2781ba |
GType parent_type,
|
|
Packit Service |
2781ba |
const gchar *type_name,
|
|
Packit Service |
2781ba |
const GTypeInfo *type_info,
|
|
Packit Service |
2781ba |
GTypeFlags flags);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
G_END_DECLS
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
#endif /* __GEGL_MODULE_INFO_H__ */
|