44
44
CongPluginCallbackConfigure configure_callback;
47
46
GList *list_of_service; /* ptrs of type CongService */
49
GList *list_of_document_factory; /* ptrs of type CongServiceDocumentFactory */
50
GList *list_of_importer; /* ptrs of type CongServiceImporter */
51
GList *list_of_exporter; /* ptrs of type CongServiceExporter */
53
GList *list_of_print_method; /* ptrs of type CongServicePrintMethod */
55
GList *list_of_thumbnailer; /* ptrs of type CongThumnbailer */
56
GList *list_of_editor_element; /* ptrs of type CongPluginEditorElement */
57
GList *list_of_editor_node_factory; /* ptrs of type CongServiceEditorNodeFactory */
58
GList *list_of_doc_tool; /* ptrs of type CongServiceDocTool */
59
GList *list_of_node_tool; /* ptrs of type CongServiceNodeTool */
60
GList *list_of_property_dialog; /* ptrs of type CongServiceNodePropertyDialog */
64
49
CONG_DEFINE_CLASS (CongPlugin, cong_plugin, CONG_PLUGIN, GObject, G_TYPE_OBJECT)
237
222
g_return_if_fail (IS_CONG_PLUGIN (plugin));
238
223
g_return_if_fail (callback);
241
cong_plugin_for_each_service_of_type (plugin,
225
cong_plugin_for_each_service_of_type (plugin,
242
226
CONG_SERVICE_DOCUMENT_FACTORY_TYPE,
243
227
(CongServiceCallback*)callback,
246
g_list_foreach(PRIVATE(plugin)->list_of_document_factory, (GFunc)callback, user_data);
261
242
g_return_if_fail (IS_CONG_PLUGIN (plugin));
262
243
g_return_if_fail (callback);
265
245
cong_plugin_for_each_service_of_type (plugin,
266
246
CONG_SERVICE_IMPORTER_TYPE,
267
247
(CongServiceCallback*)callback,
270
g_list_foreach(PRIVATE (plugin)->list_of_importer, (GFunc)callback, user_data);
285
262
g_return_if_fail (IS_CONG_PLUGIN (plugin));
286
263
g_return_if_fail (callback);
289
265
cong_plugin_for_each_service_of_type (plugin,
290
266
CONG_SERVICE_EXPORTER_TYPE,
291
267
(CongServiceCallback*)callback,
294
g_list_foreach(PRIVATE (plugin)->list_of_exporter, (GFunc)callback, user_data);
298
271
#if ENABLE_PRINTING
310
283
g_return_if_fail (IS_CONG_PLUGIN (plugin));
311
284
g_return_if_fail (callback);
314
286
cong_plugin_for_each_service_of_type (plugin,
315
287
CONG_SERVICE_PRINT_METHOD_TYPE,
316
288
(CongServiceCallback*)callback,
319
g_list_foreach(PRIVATE (plugin)->list_of_print_method, (GFunc)callback, user_data);
335
304
g_return_if_fail (IS_CONG_PLUGIN (plugin));
336
305
g_return_if_fail (callback);
339
307
cong_plugin_for_each_service_of_type (plugin,
340
308
CONG_SERVICE_DOC_TOOL_TYPE,
341
309
(CongServiceCallback*)callback,
344
g_list_foreach(PRIVATE (plugin)->list_of_doc_tool, (GFunc)callback, user_data);
359
324
g_return_if_fail (IS_CONG_PLUGIN (plugin));
360
325
g_return_if_fail (callback);
363
327
cong_plugin_for_each_service_of_type (plugin,
364
328
CONG_SERVICE_NODE_TOOL_TYPE,
365
329
(CongServiceCallback*)callback,
368
g_list_foreach(PRIVATE (plugin)->list_of_node_tool, (GFunc)callback, user_data);
1057
1018
return property_dialog;
1022
* cong_plugin_register_custom_property_page:
1033
CongServiceNodePropertyPage*
1034
cong_plugin_register_custom_property_page (CongPlugin *plugin,
1036
const gchar *description,
1037
const gchar *service_id,
1038
CongCustomPropertyPageFactoryMethod factory_method,
1041
CongServiceNodePropertyPage *property_page;
1043
g_return_val_if_fail (IS_CONG_PLUGIN (plugin), NULL);
1044
g_return_val_if_fail (name, NULL);
1045
g_return_val_if_fail (description, NULL);
1046
g_return_val_if_fail (service_id, NULL);
1048
property_page = cong_service_node_property_page_construct (g_object_new (CONG_SERVICE_NODE_PROPERTY_PAGE_TYPE, NULL),
1055
cong_plugin_add_service (plugin,
1056
CONG_SERVICE (property_page));
1058
return property_page;
1062
* cong_plugin_register_custom_property_page_for_element:
1072
CongServiceNodePropertyPage*
1073
cong_plugin_register_custom_property_page_for_element (CongPlugin *plugin,
1074
const gchar *element_name,
1075
const gchar *service_id,
1076
CongCustomPropertyPageFactoryMethod factory_method,
1079
CongServiceNodePropertyPage *property_page;
1083
g_return_val_if_fail (IS_CONG_PLUGIN (plugin), NULL);
1084
g_return_val_if_fail (element_name, NULL);
1085
g_return_val_if_fail (service_id, NULL);
1087
/* Generate a user-visible name for this plugin property page */
1089
name = g_strdup (element_name);
1091
name = g_strdup_printf (_("<%s> property page"), element_name);
1094
/* Generate a user-visible description for this plugin */
1095
description = g_strdup_printf (_("Provides a Properties page for the <%s> element"), element_name);
1097
property_page = cong_plugin_register_custom_property_page (plugin,
1104
g_free (description);
1106
return property_page;
1060
1110
#if ENABLE_PRINTING
1062
1112
* cong_plugin_register_print_method: