C++ and glue/gmodule
- From: Johannes Schmid <johannes schmid gmx de>
- To: gtkmm-list gnome org
- Subject: C++ and glue/gmodule
- Date: Sat, 12 Aug 2006 15:36:18 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi!
I am working on C++ wrapper for libanjuta which will allow it to write
Anjuta plugins in C++.
The last problem I have is that anjuta uses glue/gmodule to load plugins
and some weird macros in every plugin to export some symbols in the
plugins. How can I wrap this to C++ in a clean or at least in a working way.
All plugins derive from Anjuta::Plugin (AnjutaPlugin) and "activate()"
is called to activate them after the class has been created. But in
addition this macro is used for the gmodule mechanism:
#define ANJUTA_SIMPLE_PLUGIN(class_name, prefix) \
G_MODULE_EXPORT void glue_register_components (GluePlugin *plugin); \
G_MODULE_EXPORT GType glue_get_component_type (GluePlugin *plugin, const
char *name); \
G_MODULE_EXPORT void \
glue_register_components (GluePlugin *plugin) \
{ \
prefix##_get_type (plugin); \
} \
G_MODULE_EXPORT GType \
glue_get_component_type (GluePlugin *plugin, const char *name) \
{ \
if (!strcmp (name, #class_name)) { \
return prefix##_get_type (plugin); \
} else { \
return G_TYPE_INVALID; \
} \
}
Thanks and regards,
Johannes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFE3dlS7Dsf+G5b/WsRAl/6AJ9SXPTL9LYRR0Q83fgQ3EiLdhRO1wCeOSgD
E8QPj+Jf/3LgYbWYB/Tm5cg=
=QpmI
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]