2008年6月9日

Load arbitary module to any gtk+ applications
为任意 gtk+ 程序加载模块

gtk+ 图形库有一个特殊的环境变量,可以让你为任意的 gtk+ 程序加载模块,而不需要这个程序本身支持插件,或者扩展功能。只要在运行程序前,设定 GTK_MODULES 这个环境变量,让它指向所有需要加载的模块。而GTK_MODULES指定的模块,本身是符合 gtk 模块接口 的动态模块。

You can load arbitrary gtk modules/plugins to any gtk+ application without the application explicitly support gtk modules. All you need to do is set the environment variable GTK_MODULES to all the modules or plugins you want to load before starting the application. The modules are dynamic libraries compliant gtk module API.