1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 # define _GNM_PLUGIN_H_
6 #include <goffice/goffice.h>
7 #include <goffice/app/module-plugin-defs.h>
8 #include <tools/gnm-solver.h>
13 #define GNM_PLUGIN_LOADER_MODULE_TYPE (gnm_plugin_loader_module_get_type ())
14 #define GNM_PLUGIN_LOADER_MODULE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNM_PLUGIN_LOADER_MODULE_TYPE, GnmPluginLoaderModule))
15 GType
gnm_plugin_loader_module_get_type (void);
17 #define GNM_PLUGIN_SERVICE_FUNCTION_GROUP_TYPE (gnm_plugin_service_function_group_get_type ())
18 #define GNM_PLUGIN_SERVICE_FUNCTION_GROUP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNM_PLUGIN_SERVICE_FUNCTION_GROUP_TYPE, GnmPluginServiceFunctionGroup))
19 #define GNM_IS_PLUGIN_SERVICE_FUNCTION_GROUP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNM_PLUGIN_SERVICE_FUNCTION_GROUP_TYPE))
21 GType
gnm_plugin_service_function_group_get_type (void);
22 typedef struct GnmPluginServiceFunctionGroup_ GnmPluginServiceFunctionGroup
;
24 gboolean (*func_desc_load
) (GOPluginService
*service
, char const *name
,
25 GnmFuncDescriptor
*res
);
26 } GnmPluginServiceFunctionGroupCallbacks
;
28 #define GNM_PLUGIN_SERVICE_UI_TYPE (gnm_plugin_service_ui_get_type ())
29 #define GNM_PLUGIN_SERVICE_UI(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNM_PLUGIN_SERVICE_UI_TYPE, PluginServiceUI))
30 #define GNM_IS_PLUGIN_SERVICE_UI(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNM_PLUGIN_SERVICE_UI_TYPE))
32 GType
gnm_plugin_service_ui_get_type (void);
33 typedef struct GnmPluginServiceUI_ PluginServiceUI
;
35 void (*plugin_func_exec_action
) (
36 GOPluginService
*service
, GnmAction
const *action
,
37 WorkbookControl
*wbc
, GOErrorInfo
**ret_error
);
38 } GnmPluginServiceUICallbacks
;
40 /* This type is intended for use with "ui" service.
41 * Plugins should define arrays of structs of the form:
42 * GnmModulePluginUIActions <service-id>_actions[] = { ... };
46 void (*handler
) (GnmAction
const *action
, WorkbookControl
*wbc
);
47 } GnmModulePluginUIActions
;
49 #define GNM_PLUGIN_SERVICE_SOLVER_TYPE (gnm_plugin_service_solver_get_type ())
50 #define GNM_PLUGIN_SERVICE_SOLVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNM_PLUGIN_SERVICE_SOLVER_TYPE, PluginServiceSolver))
51 #define GNM_IS_PLUGIN_SERVICE_SOLVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNM_PLUGIN_SERVICE_SOLVER_TYPE))
53 GType
gnm_plugin_service_solver_get_type (void);
54 typedef struct GnmPluginServiceSolver_ PluginServiceSolver
;
56 GnmSolverCreator creator
;
57 GnmSolverFactoryFunctional functional
;
58 } GnmPluginServiceSolverCallbacks
;
60 /**************************************************************************/
61 #define GNM_PLUGIN_MODULE_HEADER \
62 G_MODULE_EXPORT GOPluginModuleDepend const go_plugin_depends [] = { \
63 { "goffice", GOFFICE_API_VERSION }, \
64 { "gnumeric", GNM_VERSION_FULL } \
66 G_MODULE_EXPORT GOPluginModuleHeader const go_plugin_header = \
67 { GOFFICE_MODULE_PLUGIN_MAGIC_NUMBER, G_N_ELEMENTS (go_plugin_depends) }
69 /**************************************************************************/
71 void gnm_plugins_init (GOCmdContext
*c
);
75 #endif /* _GNM_PLUGIN_H_ */